• 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
A couple of questions about hosting aumu-type audio units
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A couple of questions about hosting aumu-type audio units


  • Subject: A couple of questions about hosting aumu-type audio units
  • From: David Hicks <email@hidden>
  • Date: Thu, 01 Sep 2011 16:03:25 -0400

I can answer the question about Program Change, at least for the DLS Synth. I have borrowed some code here from PlaySoftMIDI. Take a look at that sample to see what precedes the code below.

I have added the second call to MusicDeviceMIDIEvent, which sends Patch 72 to the default MIDI channel.

require_noerr (result = AUGraphInitialize (graph), home);

//set our bank
require_noerr (result = MusicDeviceMIDIEvent(synthUnit, 
kMidiMessage_ControlChange << 4 | midiChannelInUse, 
kMidiMessage_BankMSBControl, 0,
0/*sample offset*/), home);

require_noerr (result = MusicDeviceMIDIEvent(synthUnit,  kMidiMessage_ControlChange << 4 | midiChannelInUse, 
kMidiMessage_BankMSBControl, 0,
0/*sample offset*/), home);

// This code isn't in the project, and works to send a Program Change
require_noerr (result = MusicDeviceMIDIEvent(synthUnit, kMidiMessage_ProgramChange << 4 | midiChannelInUse, 
72, 0,
0), home);

Note that on most software synths today you change sounds using their UIs, not using MIDI Program changes. This requires either showing the CocoaView or the GenericView for the AU. Good sample code is in the CocoaAUHost project.

HTH,
David



 _______________________________________________
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: A couple of questions about hosting aumu-type audio units
      • From: Sean Lamont <email@hidden>
  • Prev by Date: A couple of questions about hosting aumu-type audio units
  • Next by Date: Re: A couple of questions about hosting aumu-type audio units
  • Previous by thread: A couple of questions about hosting aumu-type audio units
  • Next by thread: Re: A couple of questions about hosting aumu-type audio units
  • Index(es):
    • Date
    • Thread