[PD] Best practices for pitch shifting a sample?

William Brent william.brent at gmail.com
Mon Mar 26 23:06:09 CEST 2018

Hi Andrea, check out the technique described in section 9.6 of Miller's
book: Phase bashing. It's implemented as I10.phase.bash.pd in Pd's built-in
documentation. It's more complicated than the doppler-based shifting you're
looking at, but it's dramatically better for preserving the timbre of the
original input signal. Doppler and playback speed solutions (which is what
granular pitch shifting usually involves) will stretch and contract the
spectral envelope, which can cause serious aliasing. There are also the
pitch halving and doubling techniques in E03.octave.divider.pd and
G06.octave.doubler.pd, which add or remove harmonics in ways that don't
disturb the spectral envelope too much and therefore still sound natural.
Of course, then you're limited to octave jumps which is probably not what
you want.

I know you're not looking for extern suggestions, but if you download
[tune~] from deken, you can see how I adapted the phase bash patch for
real-time use. It might be useful in connection with Miller's original
patch for understanding the technique.

On Mon, Mar 26, 2018 at 11:59 AM, <afleck at inventati.org> wrote:

> Hello,
> I started thinking about this problem because I was doing some frequency
> modulation, but when I tried to change the carrier frequency directly with
> notein and mtof~  there were sometimes unpredictable results (which can
> sometimes, but not always, be remedied by maintaining a fixed ratio between
> the carrier and modulation frequencies).
> DAWs like Ableton allow you to select a sample (such as a kick drum) and
> then play it at a bunch of different pitches (i.e. with a midi keyboard).
> How do they accomplish this? Is it with variable delay?
> I've been looking at the section on pitch shifting in Puckette's book (
> http://msp.ucsd.edu/techniques/latest/book-html/node115.
> html#sect7.pitchshift), but I thought I would ask if there's an easier
> way before I take the plunge.
> I've tried granular synthesis but it doesn't preserve the timbre very well.
> To be clear, I don't just want suggestions of externals, I actually want
> to program it myself (in pd-vanilla)
> Best,
> Andrea
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/li
> stinfo/pd-list

William Brent

“Great minds flock together”
Conflations: conversational idiom for the 21st century

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180326/0a098b18/attachment.html>

More information about the Pd-list mailing list