Re: Parameters with step increase/decrease
Re: Parameters with step increase/decrease
- Subject: Re: Parameters with step increase/decrease
- From: "Kevin Dixon" <email@hidden>
- Date: Tue, 27 Nov 2007 10:53:00 -0500 (EST)
- Importance: Normal
Overriding AUEffectBase::SetParameter should work for you. You can
intercept requests to set a parameter's value, and then calculate the
nearest value there. Just avoid infinite loops :)
-Kevin
> Hi Richard,
>
> Thanks for your reply. This was my approach when using VST plug-ins
> but with an AU I cannot see where to put this code. I guess a better
> way to phrase my question would be where can I adapt the setting of a
> parameter value so that I can make these changes to it. In the VST
> SDK I just put the code in the setParameter method for the relevant
> parameter. Where would I do it in an audio unit?
>
> Thanks,
>
> Adam
>
> On 27 Nov 2007, at 15:23, Richard Dobson wrote:
>
>> Adam Stark wrote:
>>> Hi,
>>> I was wondering if anyone knew how to make a parameter take
>>> values between 0 and N with a step size. For example, values
>>> between 0 and 2 with a step size of 0.25 so it would only take
>>> the values:
>>> 0
>> ...
>>
>> ??!!
>>
>> y = s * (int)(x/s)
>>
>>
>> (is just one of the many ways to do it)
>>
>> I leave the question of rounding to nearest as an exercise (is the
>> range 0 to 2 inclusive?, etc).
>>
>>
>>
>> Richard Dobson
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Coreaudio-api mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> 40elec.qmul.ac.uk
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden