I was wondering if there was some way to pitch shift channel groups to even greater frequency scales than just 2x, since it’d be "nice" for the fastforward effect I have going in my game.
My fast forward button makes game logic go 4 times as fast, but setPitch(4.0) does nothing (I’m assuming it triggers errors on bad parameters). Is there any way of bypassing this, or doing something like it through custom DSP filtering? Or is this a forced upper limit due to buffer size on decoding or something?
I don’t really care about having sound interpolation that much at such fast playbacks, if that is a potential performance hit.
- Overkill asked 9 years ago
I just tested this and I’m not sure why you’re experiencing a limit of 2x pitch shift. The docs say that the limit is 10 and I tried it for values greater than 10 and it still worked.
The DSP pitch shift filter has a limit of 2x, but if this is a problem, you can always link multiple DSP units together. However this is time-invariant pitch shifting which means it doesn’t speed up the sound, I think this would be less suited to your needs since you said it’s for a ‘fast forward’ effect. It is also quite computationally expensive when compared to using setPitch.
- Guest answered 9 years ago
Hmm interesting, it doesn’t have a limit of 2.0 if I use software mode on my sounds. But with hardware samples, it doesn’t affect the ones playing when the pitch shift is made > 2.0 and seems to prevent new sounds from being played as long as the pitch shift is in effect. Additionally, it doesn’t give any errors in the setPitch() call’s return value. Odd.
- Overkill answered 9 years ago
Please login first to submit.