From a4e6413eca77cb40deab18d5d79b2025bccf32c4 Mon Sep 17 00:00:00 2001 From: Pierre Alexandre Tremblay Date: Fri, 18 Sep 2020 15:03:08 +0100 Subject: [PATCH] another cheeky sentence... I will oblige and change the order one day but not yet --- .../10b-weighted-pitch-comparison.scd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 065bc3b..2f86a0d 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 @@ -9,6 +9,7 @@ b = Buffer.read(s,File.realpath(FluidBufPitch.class.filenameSymbol).dirname.with ~loudnessWeighedPitchStats = Array; ~confidenceWeighedPitchStats = Array; ~condidenceWeightedPitchIQRStats = Array; +~pitchIQRStats = Array; ) b.play @@ -62,4 +63,12 @@ FluidBufStats.process(s,~pitches, stats:~stats,weights: ~scaled,outliersCutoff: //now that is impressive! c = {SinOsc.ar(~condidenceWeightedPitchIQRStats[0],mul: 0.05)}.play b.play -c.free \ No newline at end of file +c.free + +//for completion, here is just with rejection of outliers - not as good, but a decent second best! +FluidBufStats.process(s,~pitches, stats:~stats,outliersCutoff: 1.5) +~stats.getn(0,14,{|x|~pitchIQRStats = 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(~pitchIQRStats[0],mul: 0.05)}.play +b.play +c.free