relative path to current document on linux

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

relative path to current document on linux

Peter P.-2
Hi list,

this has been discussed somewhat, especially with regads to emacs, and I
wonder what the status quo is.

I am trying to load soundfiles with a path relative to my script
document. Most of the solutions suggested on the mailing list in the
path do not work, perhaps also because I am using scvim?

For example, for
        File.getcwd;
i get
        /tmp
which I suppose is scvim's way for passing the script file to sclang.
Otherwise, for
        Document.current.path;
i get
        ERROR: can't resolve relative to an unsaved file

and for
        var samplePath = thisProcess.nowExecutingPath.dirname +/+ "Samples/HiHats1.hihat2.wav";
I get
        ERROR: Message 'dirname' not understood.

What could be a way to use relative paths to a script in scvim
under Linux in 2017?

Thank you for all suggestions!
P

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: relative path to current document on linux

ddw_music
Peter P.-2 wrote
What could be a way to use relative paths to a script in scvim
under Linux in 2017?
I don't use VIM so I don't know the current status of SC support, but relative paths depend on the editor communicating to the interpreter when the current document changes. AFAIK vim doesn't do that... meaning, rudimentary document support would need to be implemented first.

I may be wrong, but vim users haven't picked up on this question and I didn't want it to be ignored. The behavior you're observing is consistent with my guess that scvim just doesn't support this at the moment.

hjh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: relative path to current document on linux

Peter P.-2
* ddw_music <[hidden email]> [2017-03-11 01:15]:
> Peter P.-2 wrote
> > What could be a way to use relative paths to a script in scvim
> > under Linux in 2017?
>
> I don't use VIM so I don't know the current status of SC support, but
> relative paths depend on the editor communicating to the interpreter when
> the current document changes. AFAIK vim doesn't do that... meaning,
> rudimentary document support would need to be implemented first.
Yes! I can losely remember something about the Document class being
broken/rewritten in Linux a while ago but was curious about the current
state of affairs.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Loading...