• 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
Core Audio & Playing MIDI/Garageband/Logic instruments programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Audio & Playing MIDI/Garageband/Logic instruments programmatically


  • Subject: Core Audio & Playing MIDI/Garageband/Logic instruments programmatically
  • From: David Hicks <email@hidden>
  • Date: Mon, 06 Apr 2015 15:26:52 -0400

Hi Shyamal,

I can answer with respect to Logic only. It is possible to make Logic’s plug-ins, and other 3rd party plug-ins, respond to MIDI data sent from your app.

The way I do it, and there may be others, is to set up a Music Sequence to play the MIDI data, and most importantly a MIDI Endpoint to associate with the MusicSequence. 
In this case, you want to create a Destination MIDI Endpoint.

You want Logic to treat your app as a Source, but you are sending your MIDI data out to a Destination endpoint (as opposed, say, to sending to a DLS Synth contained in an AUGraph).

Once you have created this Destination endpoint, Logic will see you as a Source in the Physical Input of the Environment. (Yes, Logic will list your app, using the string you passed in when registering your Dest endpoint.)

For any tracks in your MusicSequence that you want to send to Logic instruments, you associate those tracks with your Dest Endpoint.

result = MusicTrackSetDestMIDIEndpoint( myTrack, prMidiDestinationEndpointRef );

If you are sending a single MIDI stream, i.e. only one instrument is to sound in Logic, there’s nothing more to it except to select the Channel Strip in Logic for the instrument you want to sound. 
(Assuming it has been assigned to a software instrument. It does not need to be record-armed. Logic will assume your app, as a Source, is a MIDI keyboard playing data to this instrument and make the appropriate noises.)

If you are sending multiple MIDI streams, differentiated by MIDI channel in your app, and you want them to go to different Logic instruments, you need to set up a MIDI Channel Splitter in Logic’s Environment.
In Logic, the Channel Strip currently selected is the one to which your data will be sent. If you are doing the multi-channel thing, that Logic Channel Strip needs to be Reassigned, in the Mixer, to the MIDI Channel Splitter you have created in the Environment. In the Splitter you target, by individual MIDI channel, other Logic Channel Strips where your varied instruments are deployed.

Hit play in your app and bingo, those Logic instruments will all start making cool sounds as the MIDI data pours in.

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

  • Prev by Date: Re: Core Audio & Playing MIDI/Garageband/Logic instruments programmatically
  • Next by Date: AudioUnit plugin vs. GarageBand sandboxing
  • Previous by thread: Re: Core Audio & Playing MIDI/Garageband/Logic instruments programmatically
  • Next by thread: AudioUnit plugin vs. GarageBand sandboxing
  • Index(es):
    • Date
    • Thread