Creating a pitch shift from scratch?

Hello there, I was checking out Ben Richard’s great tutorial and patchstorage creations. I was playing around with glacial time stretch patch he made. Obviously this is meant to run w flexi samples as an input since real time time stretch isn’t particularly viable (maybe in a delay pedal situation) but it got me wondering if there was a way to take grains with a graphic shaper and apply a custom pitch shift. Maybe something that allows for formant shifting (male->female) as well to help with chipmunking. Mostly just curious to make one as an experimental project. Any ideas? Maybe @bcrichards has some advice on this as well?

The first issue is getting the grain samples from live input to play with I’m assuming that’s a buffer rescan module, which is technically is already a pitch shifter, but I’d like more control of the grains and processing

thanks!

Comments

  • I’ve tried my hand at creating a workable pitch shifting patch to work with live audio, and I haven’t gotten great results so I’d be curious to see what techniques everyone else has used!

    the glacial patch can pitch shift the sample, independent of the sample playback speed. I agree, live pitch shift is more fun.

  • This is the closest I got. It uses a saw wave to modulate a delay module which results in a constant pitch increase or decrease, and employs unison, windowing, and voice offset to remove the artifacts from when the saw wave resets. It doesn’t sound good but it might give you some ideas.

  • Thanks!. I’m gonna mess around with it.

  • What about using Drambos built in pitch shift module?

    And if this is about building a low latency pitch shifter yourself, then I would experiment with heterodyne pitch shifting. It is widely used in radio circuits and was used in old voice scrambling systems:

    The principle is that the input signal “I” is mixed with usually a sine wave of a fixed frequency “F”. The mixing is usually done with a ring modulator. The output of the mixer now contains a two sideband signal consisting of F+I and F-I. This output is then filtered with a high Q (sharp edge) band pass filter to get rid of the unwanted sideband. The funny thing is that the lower sideband is pitch inverted - this was used for voice scrambling.

    To avoid frequency mirroring the input signal is often put through a low pass filter to prevent the pitch shifting going through the ceiling (the maximum frequency of the circuit).

  • edited March 20

    @catherder thanks this is fascinating. I went down a rabbit hole for an hour today learning about demodulation. Wouldn’t this be a frequency shift not a pitch shift tho? It wouldn’t preserve harmonic relationships I don’t think since it’s a linear, uniform transformation. Oh and yea the pitch shifter in Drambo is pretty good actually but I’m just interested in making something from scratch as a project and for educational purposes.


    As far as building this in Drambo how do you get the lower sideband isolated after a multiply module for audio in*sine osc? Does the carrier signal need to be routed into a layers mixer ?

  • I completely overlooked that this was about pitch shifters and not frequency shifting.

    I would use the Analog Filter module for the filtering. For a band pass you can put a LP24TR (Transistor) or LP24OTA (OpAmp) ladder filter in series with a HP12 high pass. But your post made me doing some more research and I came across this article that has a block diagram of the classic Bode Frequency Shifter. They avoid the filtering by using quadrature oscillators that output two 90 degree out of phase signals:

    In Drambo we have the Sinus and Cosinus functions that can help to create a quadrature oscillator.

  • @sinelanguge Yes, that's the point. Frequency shifting is much easier to build than high quality pitch shifting with formant correction.

    That's not to say that Frequency shifting wouldn't be a great playground - Moog has built a dedicated stompbox just for that effect (The Moogerfooger MF102S).

    Hard to tweak it into musical results though - gotta find those sweet spots :)


    If you need steep filtering, just chain multiple Filter modules and modulate their cutoff knobs with one knob, slider or morph knob.

  • edited March 21

    Got some wild sounds out of that. Also I didn’t know what a quadratic sine was until today. Thanks for the education! Yea I got pretty pleasantly sidetracked but am still trying to make a custom pitch shifter. Been messing around with Ben Richard’s technique using a saw LFO to modulate a delay into small chunks that are either being slowed or sped up. The issue is mostly that the chunks sound p clicky and have to be blended which requires a unison and things get pretty smeary pretty fast, and doesn’t quite fix the attack/decay clicking.

    I feel like it’s probably possible but haven’t found a solid sounding solution yet.

    also on topic but slightly different question how do those formant correction/voice gender bending systems work? A series of band passes at specific frequencies?

  • Yes, basically, peaks tuned to typical vocal formants.

    The interesting part is that you'll want to detect the formants in your original signal and apply the spectral formant shape on the effected signal. You could have many filters with envelope followers on the original signal which apply filter amplitudes to the same set of filters duplicated to process the output signal.

    Kind of a noise-less vocoder with the input signal analyzed and the shifted signal used as a carrier.

  • Sounds a bit beyond my current level but what modules would that even use

  • Wow that vocoder patch is fun af to play around with. Amazing

Sign In or Register to comment.