Export midi with sound fonts on iOS

Is it possible to export a MIDI sequence with sound files assigned to them as a .wav file? If so, can someone put me in the right direction?

I am currently using MIKMIDI , and I have not come across any example that does this so far.

+3
source share
1 answer

MIKMIDI does not include the ability to do this without doing most of this. However, it is possible. In essence, you need to create your own Core Audio GPU, which includes a MIDI synthesizer. Then, in the render callback for the toolbox, you pull events from MIKMIDISequence based on timestamps calculated using the AudioTimeStampnumber of frames passed to the render callback. You play them in the dashboard with MusicDeviceMIDIEvent().

You also need a way to get synthesized output. You can do this by adding general output to the AU graph, adding a rendering callback to it, then into this rendering callback, passing in AudioBufferListand writing it to a file (e.g. using ExtAudioFileWrite()).

, MIKMIDI, , . , - . EDIT: , , MIKMIDI. . .

API , MIKMIDI.

+2

Source: https://habr.com/ru/post/1653543/


All Articles