• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Parameters with step increase/decrease
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parameters with step increase/decrease


  • Subject: Re: Parameters with step increase/decrease
  • From: "Kevin Dixon" <email@hidden>
  • Date: Tue, 27 Nov 2007 11:17:39 -0500 (EST)
  • Importance: Normal

You may have to override AUBase::SetParameter, which has 4 arguments. I
ran into this problem too, but I thought AUEffectBase would be a better
place to start. Globals()->SetParameter... is a convience wrapper to
access the AUBase variant.

-Kevin

> Hi Kevin,
>
> Thanks for your reply. I am trying this by including the function
>
> void   BeatTrack::SetParameter(UInt32	paramID, Float32 value)
> {
> 	if (paramID == 1)
> 	{
> 		value = round(value*4)/4;
> 	}
>
> 	Globals()->SetParameter(paramID, value);
> }
>
> in my code. It compiles but the parameter still behaves normally. Any
> idea what I am doing wrong?
>
> Thanks,
>
> Adam
>
> On 27 Nov 2007, at 15:53, Kevin Dixon wrote:
>
>> 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:
>>> 40mtu.edu
>>>
>>> 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

References: 
 >Parameters with step increase/decrease (From: Adam Stark <email@hidden>)
 >Re: Parameters with step increase/decrease (From: Richard Dobson <email@hidden>)
 >Re: Parameters with step increase/decrease (From: Adam Stark <email@hidden>)
 >Re: Parameters with step increase/decrease (From: "Kevin Dixon" <email@hidden>)

  • Prev by Date: Re: Parameters with step increase/decrease
  • Next by Date: Re: User-land CoreAudio driver and Leopard
  • Previous by thread: Re: Parameters with step increase/decrease
  • Next by thread: Audio levels, without using SequenceGrabber
  • Index(es):
    • Date
    • Thread