allow for passing the file name in as well

nix
Ted Moore 4 years ago
parent 94a51997f7
commit c10b879936

@ -1,5 +1,7 @@
FluidFilesPath {
*new {
^"%/../AudioFiles/".format(File.realpath(FluidDataSet.class.filenameSymbol).dirname);
arg fileName;
fileName = fileName ? "";
^("%/../AudioFiles/".format(File.realpath(FluidDataSet.class.filenameSymbol).dirname) +/+ fileName);
}
}

@ -1,3 +1,10 @@
(
// should all return the same path:
(FluidFilesPath()++"Nicol-LoopE-M.wav").postln;
FluidFilesPath("Nicol-LoopE-M.wav").postln;
FluidFilesPath("/Nicol-LoopE-M.wav").postln;
)
(
s.waitForBoot{
Routine{
@ -9,4 +16,17 @@ s.waitForBoot{
buf.play;
}.play;
}
)
(
s.waitForBoot{
Routine{
var path = FluidFilesPath("Nicol-LoopE-M.wav");
var buf = Buffer.read(s,path);
s.sync;
buf.play;
}.play;
}
)
Loading…
Cancel
Save