• 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: Controlling multiple parameters with one custom control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling multiple parameters with one custom control


  • Subject: Re: Controlling multiple parameters with one custom control
  • From: William Stewart <email@hidden>
  • Date: Thu, 17 Jun 2010 11:33:09 -0700


On Jun 17, 2010, at 4:27 AM, Luke Hollingworth wrote:

Hi all,

I built a plug-in which is designed to control a remote wave field synthesis (wfs) system. Each instance of the plugin controls a source at the wfs system and the audio on the track played back by the host (usually Logic) is routed out to the wfs system. The plugin has a custom Carbon view which incorporates an xy panel for controlling source position. The problem I have is that when writing automation data for 2 parameters simultaneously the mouse up notifications to the host for the second parameter do not take effect. This is the case for Logic but I have not tried it with other hosts. I found a workaround which is to send a begin parameter change gesture notification before sending the end parameter change notification like so,

const CAAUParameter param(GetComponentInstance(), parameterIndex, kAudioUnitScope_Global, 0);
AudioUnitEvent auEvent;
auEvent.mArgument.mParameter = param;
if (mousedown) {
auEvent.mEventType = kAudioUnitEvent_BeginParameterChangeGesture;
AUEventListenerNotify(m_ParameterListenerOnAU, this, &auEvent);
} else {
auEvent.mEventType = kAudioUnitEvent_BeginParameterChangeGesture;
AUEventListenerNotify(m_ParameterListenerOnAU, this, &auEvent);
auEvent.mEventType = kAudioUnitEvent_EndParameterChangeGesture;
AUEventListenerNotify(m_ParameterListenerOnAU, this, &auEvent);
}

Is there a more correct way of performing this as I would like the code to stay effective in future releases of the SDK.

In the mousedown case you are only notifying of a change to one parameter.

In the mouse up case, you do a begin and end change. So, I don't know how this would work with this code at all.

(the basic MO here is:

for each parameter a gesture can change
begin param event
while (param is changing)
AUParameterSet
end param event

You could test this with the FilterDemo code we provide, that UI allows you to change the two parameters with one gesture.

Bill

 _______________________________________________
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

  • Follow-Ups:
    • Re: Controlling multiple parameters with one custom control
      • From: Luke Hollingworth <email@hidden>
References: 
 >Controlling multiple parameters with one custom control (From: Luke Hollingworth <email@hidden>)

  • Prev by Date: Re: render callback: To memclear or not to memclear; that is the question...
  • Next by Date: Re: Deriving timing information for scheduled playback on an AUGraph
  • Previous by thread: Controlling multiple parameters with one custom control
  • Next by thread: Re: Controlling multiple parameters with one custom control
  • Index(es):
    • Date
    • Thread