Hi Consider the following: "~/music/samples/seq/beats/bar_matched/spending.wav" => sample; //"/home/atte/music/samples/seq/beats/bar_matched/spending.wav" => sample; SndBuf s => dac; s.read(sample); This will yield an error [chuck](via SndBuf): cannot stat file '~/music/samples/seq/beats/bar_matched/spending.wav'... It seems chuck doesn't like the tilde (~), which on linux (I suppose osx too) is standard for "the current users home directory" in my case "/home/atte/. Are there any good advise for solving this in .ck-code or should I see if I could hack it in the source? -- Atte http://atte.dk http://modlys.dk http://virb.com/atte
On 30 Sep 2009, at 09:35, Atte Andre Jensen wrote:
It seems chuck doesn't like the tilde (~), which on linux (I suppose osx too) is standard for "the current users home directory" in my case "/home/atte/. Are there any good advise for solving this in .ck- code or should I see if I could hack it in the source?
It seems that chuck is just using the C function fopen(), and the interpretation is implementation defined, tied to the C compiler. By contrast, the interpretation of "~", $HOME, etc, is done by the shell. So you expand the filename in a shell. Hans
Hans Aberg wrote:
By contrast, the interpretation of "~", $HOME, etc, is done by the shell. So you expand the filename in a shell.
Thanks. I found a much better solution for my particular use, namely use a symlink to the files I needed to access. So instead of chuck loop.ck:~/music/chuck/bla/bla/bla/file.wav I can do chuck loop.ck:bla/file.wav -- Atte http://atte.dk http://modlys.dk http://virb.com/atte
On 5 Oct 2009, at 22:04, Atte Andre Jensen wrote:
I found a much better solution for my particular use, namely use a symlink to the files I needed to access. So instead of
chuck loop.ck:~/music/chuck/bla/bla/bla/file.wav
I can do
chuck loop.ck:bla/file.wav
You might try ln -s ~ \~ if not too confusing. :-) Hans
participants (2)
-
Atte Andre Jensen
-
Hans Aberg