Creating a Discrete Parameter
Creating a Discrete Parameter
- Subject: Creating a Discrete Parameter
- From: Adam Stark <email@hidden>
- Date: Thu, 14 Aug 2008 16:48:41 +0100
Hi,
I am trying to create a parameter that takes 'discrete' values. I
want it to take values between 0 and 4 at intervals of 0.25 so that
the values would be...
0, 0.25, 0.5, 0.75, 1, 1.25, ..... , 3.5, 3.75, 4
I want the slider to snap to these values when I change it. I have
done this before for a VST plug-in and I did something like...
newparamvalue = round(paramvalue*4)/4
where paramvalue ranges from 0 to 4. I implemented this in the
SetParameter method.
The problem I have with the audio units is I don't know where to put
this code. I have tried overloading the SetParameter method but that
does not work. Can anyone tell me either:
a) how can I implement this in an audio unit?
or
b) is there an existing parameter profile that will let me do this?
Many Thanks in advance,
Adam
_______________________________________________
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