Re: Even slider values with OpenAL pitch shifting
Re: Even slider values with OpenAL pitch shifting
- Subject: Re: Even slider values with OpenAL pitch shifting
- From: Graham Cox <email@hidden>
- Date: Wed, 16 Dec 2009 13:12:46 +1100
On 16/12/2009, at 1:01 PM, Chunk 1978 wrote:
> in OpenAL a normal sound file with no pitch has a value of
> 1.0, one octave above the normal sound the pitch shifts up to 2.0, but
> one octave below the normal sound the pitch shifts down to 0.5, not
> 0.0 as i had expected!
>
> any thoughts on how i can solve this kind of problem?
Set the slider's minimum value to 0.5?
One octave is a factor of two - going up doubles the pitch (frequency), going down halves it. If you multiplied the frequency by 0.0 it would become 0, not half its original value.
If you want the slider to operate as a linear control with 1.0 in the centre, you'll have to apply an offset and scale factor to its value externally to get the geometric range change needed.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden