• 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
Automation in audio unit not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automation in audio unit not working


  • Subject: Automation in audio unit not working
  • From: john smith <email@hidden>
  • Date: Mon, 14 Jan 2013 12:27:30 +0100
  • Importance: Normal



Hi,

I am in the process of changing my AU code from Carbon to Cocoa, and for various reasons that caused some AU automation code to have to be changed.

I am however unable to get automation working properly. Specifically, when a parameter is changed, the host (i.e. Logic) does not seem to receive the information.

I am trying to use the information in technical note TN2104, but to no avail.

This is the code which is executed when a parameter is changed:

AudioUnitEvent myEvent;

myEvent.mArgument.mParameter.mAudioUnit = mComponentInstance;

myEvent.mArgument.mParameter.mParameterID = iParameterIndex;

myEvent.mArgument.mParameter.mScope = kAudioUnitScope_Global;

myEvent.mArgument.mParameter.mElement = 0;

myEvent.mEventType = kAudioUnitEvent_ParameterValueChange;

AUEventListenerNotify(NULL, NULL, &myEvent);



I also tried:

AudioUnitEvent myEvent;

myEvent.mArgument.mParameter.mAudioUnit = mComponentInstance;

myEvent.mArgument.mParameter.mParameterID = iParameterIndex;

myEvent.mArgument.mParameter.mScope = kAudioUnitScope_Global;

myEvent.mArgument.mParameter.mElement = 0;

myEvent.mEventType = kAudioUnitEvent_BeginParameterChangeGesture;

AUEventListenerNotify(NULL, NULL, &myEvent);

myEvent.mEventType = kAudioUnitEvent_ParameterValueChange;

AUEventListenerNotify(NULL, NULL, &myEvent);

myEvent.mEventType = kAudioUnitEvent_EndParameterChangeGesture;

AUEventListenerNotify(NULL, NULL, &myEvent);


but that did not work neither.

This is pretty much the same code as my carbon code, except I am calling this from the audio unit, rather than from the view.
This should not be a problem though, since this is what the tech note says:
"Parameter change notifications can be sent by an Audio Unit or host using AUEventListenerNotify"
Needles to say, my carbon code worked fine.

I did want to try using the cocoa view component instance, but was unable to figure out how to get the component instance parameter. (AU Cocoa views are, admittedly, insanely confusing to me).

Can anyone see what is the problem with this code? As far as I can read from the tech note, this is all which is needed to send the events.


Thanks,

Michael Olsen
PhonoXone

 _______________________________________________
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: Automation in audio unit not working
      • From: Muon Software Ltd - Dave <email@hidden>
  • Prev by Date: Re: AUSampler and inOffsetSampleFrame
  • Next by Date: RE: Automation in audio unit not working
  • Previous by thread: Using AVSampleRateKey in outputSettings for AVAssetReaderTrackOutput
  • Next by thread: RE: Automation in audio unit not working
  • Index(es):
    • Date
    • Thread