Hello All,
I'm working on a music app for iOS 8+ using AudioKit. Since the sequencing in AK is pretty rudimentary, I'm using the MusicPlayer API for sequencing. I'm doing this by writing user events which I convert to AKNotes upon callback. Since I'll be playing midi files, I'm using the original note events as data sources for my user events. All works nicely. The only problem is that iOS insists on playing the original note events with a sine generator. I can zero out the velocities to silence them, but I'd rather leave them unaltered. Surely there must be a way to tell the MusicPlayer not to throw note events without an assigned endpoint at a sine generator, yes? (I'm assuimng that's what's going on, btw; i.e., that the MusicPlayer uses a sine generator AU if no midi endpoint has been assigned.)
Any help appreciated.
J.
When you create a MusicSequence and MusicPlayer without specifying the midi endpoint, a Sampler AU is created for you by default, at the same time that it builds the rest of the AUGraph which lets you play back your MIDI data. There is sample code available on the developer site showing how to access the Sampler and configure it -- it only plays back sine waves because that is its default instrument.
Each track in your sequence must have its MIDI data routed to either a valid instrument node in the AUGraph or to a MIDI endpoint that you create. A track's MIDI data cannot go "nowhere".
-DS