• 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: Luke Hollingworth <email@hidden>
  • Date: Fri, 18 Jun 2010 09:51:19 +0200


On 17 Jun 2010, at 20:33, William Stewart wrote:


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


This code would actually be called twice, once for each of the two parameters that are being controlled. Thanks very much for the FilterDemo suggestion, I will check this out.

Luke
 _______________________________________________
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: 
 >Controlling multiple parameters with one custom control (From: Luke Hollingworth <email@hidden>)
 >Re: Controlling multiple parameters with one custom control (From: William Stewart <email@hidden>)

  • Prev by Date: Re: Odd problem with RemoteIO on iPad
  • Next by Date: Re: Published! Technical Note TN2274: USB Audio on the Mac
  • Previous by thread: Re: Controlling multiple parameters with one custom control
  • Next by thread: iPhone audio units: Getting rid of an unnecessary read from file in favor of reading in from memory
  • Index(es):
    • Date
    • Thread