allow for passing the file name in as well

nix
Ted Moore 4 years ago
parent 94a51997f7
commit c10b879936

@ -1,5 +1,7 @@
FluidFilesPath { FluidFilesPath {
*new { *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{ s.waitForBoot{
Routine{ Routine{
@ -10,3 +17,16 @@ s.waitForBoot{
}.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