made all references to /tmp OS-agnostic

nix
Pierre Alexandre Tremblay 5 years ago
parent 54204e4b9f
commit 34559b5aad

@ -63,7 +63,7 @@ t = Main.elapsedTime;
// or write to file a human readable, sorted version of the database after sorting it by index.
(
a = File("/tmp/sc-loading.json","w");
a = File(Platform.defaultTempDir ++ "sc-loading.json","w");
~stuffsorted = Array.newFrom(~loader.index.keys).sort{|a,b| ~loader.index[a][\bounds][0]< ~loader.index[b][\bounds][0]}.do{|k|
v = ~loader.index[k];
a.write(k.asString ++ "\n");
@ -99,7 +99,7 @@ t = Main.elapsedTime;
///// write to file in human readable format, in order.
(
a = File("/tmp/sc-spliting.json","w");
a = File(Platform.defaultTempDir ++ "sc-spliting.json","w");
~stuffsorted = Array.newFrom(~slicer.index.keys).sort{|a,b| ~slicer.index[a][\bounds][0]< ~slicer.index[b][\bounds][0]}.do{|k|
v = ~slicer.index[k];
a.write(k.asString ++ "\n");
@ -120,10 +120,10 @@ t = Main.elapsedTime;
)
// write the dataset to file with the native JSON
~ds.write("/tmp/sc-dataset.json")
~ds.write(Platform.defaultTempDir ++ "sc-dataset.json")
// open the file in your default json editor
"open /tmp/sc-dataset.json".unixCmd
(Platform.defaultTempDir ++ "sc-dataset.json").openOS
//////////////////////////////////////////////////////////////////////////
// manipulating and querying the data

@ -286,7 +286,9 @@ Routine{
~query.transformJoin(~loudDSn, ~tempDS, ~globalDS) // appends 4 dims of loud to the 8 dims above
~globalDS.print//12 dim: 4 timbre, 4 pitch, 4 loud, all normalised between 0 and 1
~globalDS.write("/tmp/test12dims.json") // write to file to look at the values
~globalDS.write(Platform.defaultTempDir ++ "test12dims.json") // write to file to look at the values
// open the file in your default json editor
(Platform.defaultTempDir ++ "test12dims.json").openOS
// let's assemble the query
// first let's normalise our target descriptors

@ -172,7 +172,7 @@ t = Main.elapsedTime;
//export to reaper
(
//first create a new file that ends with rpp - it will overwrite if the file exists
f = File.new("/tmp/clusteredslices-" ++ Date.getDate.stamp ++".rpp","w+");
f = File.new(Platform.defaultTempDir ++ "clusteredslices-" ++ Date.getDate.stamp ++".rpp","w+");
if (f.isOpen , {
var path, prevpath ="", sr, count, dur, realDur;
@ -227,4 +227,4 @@ if (f.isOpen , {
)
(then open the time-stamped reaper file clusterdslice in the folder tmp)
"open /tmp".unixCmd
Platform.defaultTempDir.openOS

Loading…
Cancel
Save