diff --git a/release-packaging/Examples/dataset/1-learning examples/10b-weighted-pitch-comparison.scd b/release-packaging/Examples/dataset/1-learning examples/10b-weighted-pitch-comparison.scd index 2f86a0d..72b8e0c 100644 --- a/release-packaging/Examples/dataset/1-learning examples/10b-weighted-pitch-comparison.scd +++ b/release-packaging/Examples/dataset/1-learning examples/10b-weighted-pitch-comparison.scd @@ -59,9 +59,9 @@ b.play c.free // much better! it is even better when we move the threshold above but 0.8 confidence is quite high... If we look at our stats we see that there are still minima in the low hundreds, and maxima in the very top...These must be statistically far enough and few enough just to mess a bit our stats, so let's use the inter-quantile range to first remove them then compute the stats. FluidBufStats.process(s,~pitches, stats:~stats,weights: ~scaled,outliersCutoff: 1.5) -~stats.getn(0,14,{|x|~condidenceWeightedPitchIQRStats = x;x.reshape(7,2).do{|y| "%\t\t\t%\n".postf(y[0].round(0.1),y[1].round(0.01))}}) +~stats.getn(0,14,{|x|~confidenceWeightedPitchIQRStats = x;x.reshape(7,2).do{|y| "%\t\t\t%\n".postf(y[0].round(0.1),y[1].round(0.01))}}) //now that is impressive! -c = {SinOsc.ar(~condidenceWeightedPitchIQRStats[0],mul: 0.05)}.play +c = {SinOsc.ar(~confidenceWeightedPitchIQRStats[0],mul: 0.05)}.play b.play c.free diff --git a/release-packaging/Examples/dataset/1-learning examples/11-compositing-datasets.scd b/release-packaging/Examples/dataset/1-learning examples/11-compositing-datasets.scd index 3a866c6..687958f 100644 --- a/release-packaging/Examples/dataset/1-learning examples/11-compositing-datasets.scd +++ b/release-packaging/Examples/dataset/1-learning examples/11-compositing-datasets.scd @@ -293,16 +293,18 @@ Routine{ ~targetPitch = Buffer(s) ~targetLoud = Buffer(s) ~targetMFCC = Buffer(s) -~targetMFCCsub = Buffer(s) +~targetMFCCs = Buffer(s) +~targetMFCCsp = Buffer(s) ~targetTimbre = Buffer(s) ~targetAll= Buffer(s) ~normL.transformPoint(~flatLoudbuf[0], ~targetLoud) //normalise the loudness (all dims) ~normP.transformPoint(~flatPitchbuf[0], ~targetPitch) //normalise the pitch (all dims) -FluidBufCompose.process(s,~flatMFCCbuf[0],numFrames: 24,destination: ~targetMFCCsub) // copy the process of dimension reduction above -FluidBufCompose.process(s,~flatMFCCbuf[0],startFrame: (7*12), numFrames: 24, destination: ~targetMFCCsub,destStartFrame: 24) //keeping 48 dims -~pca.transformPoint(~targetMFCCsub, ~targetMFCC) //then down to 4 -~normT.transformPoint(~targetMFCC, ~targetTimbre) //then normalised +FluidBufCompose.process(s,~flatMFCCbuf[0],numFrames: 24,destination: ~targetMFCC) // copy the process of dimension reduction above +FluidBufCompose.process(s,~flatMFCCbuf[0],startFrame: (7*12), numFrames: 24, destination: ~targetMFCC,destStartFrame: 24) //keeping 48 dims +~stan.transformPoint(~targetMFCC,~targetMFCCs) //standardize with the same coeffs +~pca.transformPoint(~targetMFCCs, ~targetMFCCsp) //then down to 4 +~normT.transformPoint(~targetMFCCsp, ~targetTimbre) //then normalised FluidBufCompose.process(s, ~targetTimbre,destination: ~targetAll) // assembling the single query FluidBufCompose.process(s, ~targetPitch, numFrames: 4, destination: ~targetAll, destStartFrame: 4) // copying the 4 stats of pitch we care about FluidBufCompose.process(s, ~targetLoud, numFrames: 4, destination: ~targetAll, destStartFrame: 8) // same for loudness