updating the Example folder - part 1

nix
Pierre Alexandre Tremblay 6 years ago
parent af9ac0332a
commit 82f3efe98d

@ -22,14 +22,14 @@ FileDialog.new(fileMode:2,okFunc:{|x| ~path = x[0];
) )
//STEP 2: Make a FluidDataSet //STEP 2: Make a FluidDataSet
~dataset = FluidDataSet.new(s,"mfccs", 96) //12 dims * 4 stats * 2 derivatives ~dataset = FluidDataSet.new(s,"mfccs");
//STEP 3A: EITHER populate the dataset like so (and cry about how long the data point assembly takes) //STEP 3A: EITHER populate the dataset like so (and cry about how long the data point assembly takes)
( (
Routine{ Routine{
var tmpMFCCs = Buffer.new(s); var tmpMFCCs = Buffer.new(s);
var tmpStats = Buffer.new(s); var tmpStats = Buffer.new(s);
var tmpFlat = Buffer.alloc(s,12 * 4 * 2, 1); var tmpFlat = Buffer.alloc(s,12 * 4 * 2, 1);//12 dims * 4 stats * 2 derivatives
s.sync; s.sync;
~audioBuffers.do{|b| ~audioBuffers.do{|b|
("Analyzing" + b.path).postln; ("Analyzing" + b.path).postln;
@ -61,7 +61,7 @@ Routine{
var tmpStats = Buffer.new(s); var tmpStats = Buffer.new(s);
var langStats; var langStats;
var langFlat; var langFlat;
var tmpFlat = Buffer.alloc(s,12 * 4 * 2, 1); var tmpFlat = Buffer.alloc(s,12 * 4 * 2, 1); //12 dims * 4 stats * 2 derivatives
s.sync; s.sync;
~audioBuffers.do{|b| ~audioBuffers.do{|b|
("Analyzing" + b.path).postln; ("Analyzing" + b.path).postln;

@ -1,5 +1,5 @@
s.reboot s.reboot
~ds = FluidDataSet.new(s,\simple1data,1) ~ds = FluidDataSet.new(s,\simple1data)
~point = Buffer.alloc(s,1,1) ~point = Buffer.alloc(s,1,1)
( (
Routine{ Routine{
@ -50,8 +50,9 @@ Routine{
( (
Routine{ Routine{
var n; var n;
~labels.size({|x| n = x.asInt}); ~labels.size({|x| n = x.asInteger;});
n.asInt.do{|i| n.postln;
n.do{|i|
~labels.getLabel(i.asString,action: {|l|("Label for" + i ++ ":" + l).postln}); ~labels.getLabel(i.asString,action: {|l|("Label for" + i ++ ":" + l).postln});
} }
}.play }.play

Loading…
Cancel
Save