example 11: an embarassing error found by @weefuzzy (thanks!)

example 10b: a small typo found by Alice on Zoom :)
nix
Pierre Alexandre Tremblay 5 years ago
parent 503dc63d3c
commit b8af4f3125

@ -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

@ -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

Loading…
Cancel
Save