@Istealhotelsoap i think your sample is too fast for piwip. try using a sample that is of someone holding a note out a little loner. piwip struggles with fast playing still.

harmonizer - plays a random note in a specified scale randomly

follow - play a note relative to the perceived frequency of recording input

ensembler - will follow the front wave of the recording input with multiple voices, but with different modulations in pitch / time to get a “ensemble effect”

piwip is still a work in progress for sure. that being said, i like to use it to “gate” using a recording live input to play samples. its also fun to use it to make pseudo ensembles. fast pitch changes are a struggle unfortunately still

2 Likes

@Istealhotelsoap think i figured out a way out of the pops for follower mode. need to do some more tests but initially it seems like locking the frequencies to specific tones will force the realtime follower to behave more coherently by not flipping between odd frequencies. for instance, for saxophone/flute i’ve tried just dialing in the possible pitches as the pitches for those particular instruments. its a little bit annoying but i think its immensely useful for the pitch algorithm not have to pick between infinite different pitches when you already know the pitch space.

@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 :’( )

1 Like

this is a wonderful idea. and thanks for that snippet, didn’t realize I could do that via the sc repl! in addition to locking down the range, im interested in the effects of median filtering, the supercollider pitch follower examples makes use of that it seems and might help here too. will likely make pr!

1 Like