
If you goal is straightforward MIDI file playback, I *strongly* recommend the new AVMIDIPlayer which is part of the AVFoundation audio API. If you use the MIDISynth in conjunction with the MusicPlayer/Sequence API, it will take care of the extra step you will need to pre-load all the instruments during the preroll stage, before you start playing. The MIDISynth loads instrument presets out of the bank you specify in response to program change messages in your MIDI file. This is different that what the Sampler AU does with samples - here, you are passing it the specific path using. When you first set up your AU, pass it the URL for the bank file using the kMusicDeviceProperty_SoundBankURL property. To use the MIDISynth AU, you need to include a SoundFont 2 (.sf2) or Downloadable Sounds (.dls) bank file with your app. Perhaps, there is similarly a location in the bundle where you can put sound banks for use by AUMIDISynth? The comments suggest it might be similar to the OS X DLSMusicDevice, which gets its instruments from a particular filesystem location (/Library/Audio/Sounds/Banks). In particular, I can't see any way to load instruments into it.

However, there appears to be no documentation, and the only mention of this unit I've found on the web is from other people who've noticed it in the headers. Line The AUMIDISynth audio unit lets a client create fully GM-compatible Midi Synth.


For instance, for Apple's DLS Music DeviceĪnd AUMIDISynth, this value returns the number of patches that are found in a given DLS or SoundFont file when loaded.
CAN I USE SF2 FILES FOR MIDIS PATCH
Line Audio unit property IDs used by AUMIDISynth (iOS) and DLSMusicDevice (OSX)įor a multi-timbral music instrument, this property can return the number of independent patches thatĪre available to be chosen as an active patch for the instrument. The following comments in AudioUnitProperties suggest it's a multi-timbral GM synth for iOS, which would be a rather nice thing to have, particularly if it supports tuning messages: In iOS 8 a new audio unit, called AUMIDISynth, has appeared in the core audo headers.
