We are developing our own MIDI Play Controller plug-in to support playing of MIDI files on Symbian platform.
Specifically we are developing
1. MIDI Play Controller plug-in
2. Format plug-in
3. Codec Plug-in
4. Porting Open source MIDI engine to Symbian platform (To generate the audio file based on MIDI file passed to it)
MIDI File is nothing but a collection of MIDI messages, which contains the values for pitch and intensity, control signals for parameters such as volume, vibrato and panning, cues, and clock signals to set the tempo.
From our understanding,
1. Client requests MMFControllerFramework to load the controller plug-in by passing its UID.
2. MMFControllerFramework loads the MIDI Player Controller plug-in.
3. Client requests MMFControllerFramework to open the MIDI file by passing a file name and path
4. MMFControllerFramework adds DataSource by passing its UID and the data required to initialize the DataSource. MMFControllerFramework creates the corresponding DataSource and passes it to the controller via AddDataSource() call.
5. The controller plug-in creates the MIDI format plug-in (CMMFFormatDecode) and pass the DataSource. Header of the MIDI file is read and the validity check is done here.
6. The controller plug-in initializes DataSource by calling DatasourceOpen()and adds to MIDI Engine.
7. MIDI Engine parse the file and convert it to audio file.
Our questions are
1. Is the above flow is correct?
2. From where and How to interact with MIDI Engine?
3. We have MIDI file as the source data, which needs to be converted into Audio file by passing it to the MIDI Engine, and the output from the MIDI Engine is actual audio data source which will be played on Speaker. So in this case how to set / add the Data Source to controller?
a. Should we pass the Data Source (MIDI file) directly to engine from controller and pass converted audio file from MIDI Engine to format plug-in? or
b. Pass Data Source (MIDI file) to Format plug-in and then pass it to MIDI Engine to generate the audio file?
c. Do we really need Format plug-in here, as Engine can recognise all MIDI file formats and convert it to Audio file data?