Pitch change vs.Pitch shift??

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I started a topic awhile back where I brought up pitch-shifting. I now realize I used the wrong terminology.

I'm creating a simple echo effect, but I want to have a parameter where the echoed samples will have their pitches changed - but I'm not trying to preserve timbre. So, I realize I will get a muchkin effect, but that is OK for my purposes.

I know I need to increase the frequency to be able to do this. I have a buffer of previously played samples (to be echoed).

Can someone give me a hint?

Post

So that's obviously not that simple? Right?

Take a look at the open sourced STK.
There is a simple delay based pitch shifter. It can be easiely combined with a usual delay algorithm...

But be warned, the STK has a terrible (and old fashioned) design and therefore bad performance. Althought it is written in C++ and satisfactory for learning.

Post

But I'm curious though..

If I have an array of samples, and I take every other sample and put it into an array of half the size, will this not double the pitch? (I'll try it out - but if my thinking is wrong, could someone explain why?)

Post

jacksmash wrote:But I'm curious though..

If I have an array of samples, and I take every other sample and put it into an array of half the size, will this not double the pitch? (I'll try it out - but if my thinking is wrong, could someone explain why?)
Probably.
But that's a quite "static" solution. Cause exactly 1 (fixed) octave. A variable shifting amount would require interpolation...

A useful musical effect would be a delay effect, which can modulate the pitch of the delays continuously in both directions.

I like very much the Virus delay effect, which is able to pitch and filter modulate the delayed signal in real time. This produces enormous rich and realistic 3D pseudo reverberation and special effects with ease of use.

Post

jacksmash wrote:If I have an array of samples, and I take every other sample and put it into an array of half the size, will this not double the pitch?
It will, but you will be using buffered samples twice as fast as you're taking them in. You'll need to decide how you plan to deal with that fact.
Image
Don't do it my way.

Post

Can't I just pad an echo buffer with zeros after the pitch-shifted sample is stored?

I'm just wondering if I'm thinking about this the wrong way - that's all.

Post

You would then have bursts of noise, then silence, then noise, then silence etc, which would sound like your pitched sound through a bunch of clicks..

The delayline thing in the STK is more what you might be after, since it does preserve the length, however, for anything over about 5-7 semitones, it's really bad..

Another alternative is developing your own PSOLA. I'm in the middle of my own algorithm.. whether I'll actually finish is another matter!

DSP
Image

Post

duncanparsons wrote:Another alternative is developing your own PSOLA. I'm in the middle of my own algorithm.. whether I'll actually finish is another matter!
I did an auto-correlation splicing TimeStretch awhile ago that didn't sound completely awful, as such things go. But it needed pretty careful user adjustment for the minimum splicing duration, to avoid making ring-modulation sounds. A sax track needed a different minimum splice period than a bass track, ferinstance.

Have been thinking of using auto-correlation time-domain splicing on an IIR multiband split. With 6 or 8 bands, each band's crossover points should 'automagically' determine the minimum splicing duration (perhaps about 2X the period of each crossover freq).

Each band should more-easily find good splice points, and each band's splice points would happen at different times, depending on the periodicity in each band. Maybe that wouldn't sound as 'warbly' as conventionally splicing all frequencies at 'bad compromise' time locations.

Has anyone experimented with multiband time-domain stretching? Is that already a well-traveled path?

Post Reply

Return to “DSP and Plugin Development”