@infinitedigits maybe you already realized this, but there are some parameters for the pitch follower synth. they are not currently exposed to lua but could/should be.
defs.add(
SynthDef.new(\pitch, {
arg in, out,
initFreq = 440.0, minFreq = 30.0, maxFreq = 10000.0,
execFreq = 50.0, maxBinsPerOctave = 16, median = 1,
ampThreshold = 0.01, peakThreshold = 0.5, downSample = 2, clar=0;
// Pitch ugen outputs an array of two values:
// first value is pitch, second is a clarity value in [0,1]
// if 'clar' argument is 0 (default) then clarity output is binary
var pc = Pitch.kr(In.ar(in),
initFreq , minFreq , maxFreq ,
execFreq , maxBinsPerOctave , median ,
ampThreshold , peakThreshold , downSample, clar
);
Out.kr(out, pc);
})
);
in particular i think it would make a lot of sense to limit the frequency range for a particular instrument.
adding lua bindings would be simple (and i’d welcome PRs on that.) for the moment, you can test things out by interacting directly with the synth through the SC REPL in maiden:
c = Crone.context
p = c.pitch_in_s[0] // left channel
p.set(\minFreq, 100)
p.set(\maxFreq, 2000)
etc
(check out the Pitch SC helpfile for breadcrumbs)
we could also consider adding some smoothing filters to the pitch output (LagUD, Median etc)
(snapping to 12tet pitch classes sounds kinda :’( )