Pitch change vs.Pitch shift??
-
- KVRist
- Topic Starter
- 234 posts since 20 Mar, 2004 from Ontario, Canada
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?
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?
-
- KVRian
- 1325 posts since 1 Sep, 2004
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.
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.
-
- KVRist
- Topic Starter
- 234 posts since 20 Mar, 2004 from Ontario, Canada
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?)
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?)
-
- KVRian
- 1325 posts since 1 Sep, 2004
Probably.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?)
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.
-
- KVRAF
- 2458 posts since 3 Oct, 2002 from SF CA USA NA Earth
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.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?
-
- KVRist
- Topic Starter
- 234 posts since 20 Mar, 2004 from Ontario, Canada
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.
I'm just wondering if I'm thinking about this the wrong way - that's all.
-
- KVRAF
- 8388 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
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
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
-
- KVRAF
- 3080 posts since 17 Apr, 2005 from S.E. TN
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.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!
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?