list of filenames of a directory
Hello ChucK-List, I wonder from time to time how a ChucK script is to access the filenames of a directory. I haven't figured that out still, has someone? thanks, renato
Hello ChucK-List,
I wonder from time to time how a ChucK script is to access the filenames of a directory. I haven't figured that out still, has someone?
Hey, Renato,
I'm not sure -when- it will get here but there is a draft on the WiKi about file in&out and exactly this is on it For what it's worth; the draft looked quite good to me... No help for right now but a bright hope for the future, yours, Kas.
Hi Kassen,
okay, meanwhile one can stick to python scripts and osc messages when
necessary. any better idea?
thank you,
renato
2008/6/7 Kassen
Hello ChucK-List,
I wonder from time to time how a ChucK script is to access the filenames of a directory. I haven't figured that out still, has someone?
Hey, Renato,
I'm not sure -when- it will get here but there is a draft on the WiKi about file in&out and exactly this is on it
For what it's worth; the draft looked quite good to me...
No help for right now but a bright hope for the future, yours, Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
2008/6/8 Renato Fabbri
Hi Kassen,
okay, meanwhile one can stick to python scripts and osc messages when necessary. any better idea?
I don't know if it's "better" but anything that can get a list of files in a dir, like BASH scripting or the Windows commandline "for" command (to loop over file names) could call a .ck file with those names as parameters? That would remove the OSC part and thus reduce complexity. I'm making this up on the spot, it may or may not be practical. Kas.
ow yeah! nice idea Kassen. That, with Std.system to execute the command line
can make it all somehow self-contained. something like:
// self-contained filenames chuck access
Std.system("chuck my-engine:filename1:filename2:filename3...")
which, when sporked, calls my-engine.ck with the filenames of a directory
all accessible by me.arg
clearly, "filename1:filename2:filename3" can be replaced by a related
command line for the given OS.
just sharing.. cheers
2008/6/8 Kassen
2008/6/8 Renato Fabbri
: Hi Kassen,
okay, meanwhile one can stick to python scripts and osc messages when necessary. any better idea?
I don't know if it's "better" but anything that can get a list of files in a dir, like BASH scripting or the Windows commandline "for" command (to loop over file names) could call a .ck file with those names as parameters? That would remove the OSC part and thus reduce complexity. I'm making this up on the spot, it may or may not be practical.
Kas.
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
2008/6/8 Renato Fabbri
ow yeah! nice idea Kassen. That, with Std.system to execute the command line can make it all somehow self-contained. something like:
// self-contained filenames chuck access Std.system("chuck my-engine:filename1:filename2:filename3...")
which, when sporked, calls my-engine.ck with the filenames of a directory all accessible by me.arg clearly, "filename1:filename2:filename3" can be replaced by a related command line for the given OS.
Exactly. And one of the cool bits could be that OS's are quite good at sorting file types which has advantages as you'll likely only be interested in .ck, .wav and maybe .aiff files. It doesn't make much sense to try to load a pdf in ChucK. Kas.
participants (2)
-
Kassen
-
Renato Fabbri