Re: Need help getting started with CoreMidi
Re: Need help getting started with CoreMidi
- Subject: Re: Need help getting started with CoreMidi
- From: David Hicks <email@hidden>
- Date: Wed, 23 Jan 2013 17:30:38 -0500
Title: Re: Need help getting started with CoreMidi
>I'm looking for some sample code I can wrap around the harmonization algorithms so I can
>1) Play a line on a MIDI keyboard and send the harmonized output to Logic, i.e. as it would see it if I were actually playing all the notes,
I think this one is doable in what will seem like a slightly roundabout way. I don’t have my code at hand but the principles are something like this:
You need to create a pair of MIDI Endpoints for your app; one is a Destination Endpoint with an appropriate Callback which would get called as the MIDI data you are playing come in to the system.
Whether you can take the input data to the Callback and harmonize it and get it into a MusicSequence that is playing a MusicPlayer, all in a timely fashion isn’t obvious to me, and somebody else might have some ideas on that. If not, you can have another thread awaiting a trigger that allows it to take the input data that you would pass to it, and this thread would harmonize it, and put it into a MusicSequence with MusicPlayer playing.
The other MIDI Endpoint mentioned above would be a SourceEndpoint; Logic will see this as an input to itself; all the notes from your MusicSequence will hit Logic at its ‘Physical Input’ and if you have a playing track armed to Record, bingo your harmonized playing goes into the recording Logic track.
Off the top of my head I think that will work, more or less as described. Your second enumerated point is not so easy, if it can be done in Logic as it is…
Best,
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