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.
Thanks.
- Overkill asked 10 years ago
- You must login to post comments
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 10 years ago
- You must login to post comments
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 10 years ago
- You must login to post comments
This is a limitation of some soundcards. Software does not have these limits. Some sound cards can only play sounds between 22 and 48khz for example.
You can find out this information with System::getDriverCaps
- Brett Paterson answered 10 years ago
- You must login to post comments
Please login first to submit.