×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    74

    Controller plug-in flow and interaction with Engine and other plug-ins

    Hi,

    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?

    Thanks
    mghasan

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Controller plug-in flow and interaction with Engine and other plug-ins

    Isn't there already support for MIDI in Symbian devices?

    You don't need to implement format or codec plugins, they're just used by the controller plugin if it helps you to architect the solution that way.

    Basically the MMF client utility APIs access the controller plug-in through RMMFController - you can look at the open source Symbian code from the Symbian Foundation (ftp access only at the moment) to see exactly how they do that. Everything else is up to you!

    Your controller plugin could be like the one in the open source Symbian Ogg Player and just do all the decoding in the controller and interface direct to DevSound.

    If you don't need the MIDI to be accessible via the MMF client APIs then you don't need to implement any of these plugins at all if you don't want to, just decode the data and pass it to a CMdaAudioOutputStream, or direct to CMMFDevSound if you don't want the intermediate buffering layer.

    Hope that helps,
    Mark

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    74

    Re: Controller plug-in flow and interaction with Engine and other plug-ins

    Quote Originally Posted by Sorcery-ltd View Post
    Isn't there already support for MIDI in Symbian devices?

    You don't need to implement format or codec plugins, they're just used by the controller plugin if it helps you to architect the solution that way.

    Basically the MMF client utility APIs access the controller plug-in through RMMFController - you can look at the open source Symbian code from the Symbian Foundation (ftp access only at the moment) to see exactly how they do that. Everything else is up to you!

    Your controller plugin could be like the one in the open source Symbian Ogg Player and just do all the decoding in the controller and interface direct to DevSound.

    If you don't need the MIDI to be accessible via the MMF client APIs then you don't need to implement any of these plugins at all if you don't want to, just decode the data and pass it to a CMdaAudioOutputStream, or direct to CMMFDevSound if you don't want the intermediate buffering layer.

    Hope that helps,
    Mark
    Yes, its there on Symbian devices which is provided by 3rd party. Its not part of Symbian OS.

    For modular design we want to keep the code in different plug-ins, so in future the controller can support multiple formats.

    We have checked the open source Ogg Player and Audio controller (Symbian OS) and flow is clear from the code.

    Incase of MIDI file, which is different form other audio files like MP3, it only contains MIDI messages or notes which has to be converted to audio file by the MIDI Engine. Therefore the flow will be the same as other controllers from RMMFcontroller to CMyMIDIController and the only difference is the Engine.

    We want to make use of MMF faramework and controller to play the MIDI files.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,683

    Re: Controller plug-in flow and interaction with Engine and other plug-ins

    Quote Originally Posted by mghasan View Post
    Yes, its there on Symbian devices which is provided by 3rd party. Its not part of Symbian OS.
    Have you searched for midi in the documentation of any SDK? You can also try with the on-line version, http://library.forum.nokia.com

  5. #5
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Controller plug-in flow and interaction with Engine and other plug-ins

    Quote Originally Posted by wizard_hu_ View Post
    Have you searched for midi in the documentation of any SDK? You can also try with the on-line version, http://library.forum.nokia.com
    may be his/her intention is that its using third party developed MIDI engine(I think its Beatnik), coz some time back I was searching the implementation in PDK, it was not there,even the required dll (mobilebae.dll) was not there.
    Regards
    $-Nitesh-$

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Controller plug-in flow and interaction with Engine and other plug-ins

    OK, if you're developing this for device creation purposes then, yes, the format and codec plug-ins are there so you can support multiple formats from a single controller. As you can probably see from the Symbian Foundation sources, Nokia took the approach of developing a separate controller plugin for each audio format instead (with a common base class).

    You could imagine the original idea of a format plugin was to extract the media data streams from container file formats so that they were in a format that could be processed by codec plugins. For video formats the separation is obvious. For audio many files can be processed directly by the codec, so this isn't necessary in those cases. For MIDI it will depend on what input your MIDI engine needs but it may well be that neither format nor codec plugins are required. You could possibly wrap the MIDI engine as a CMMFCodec but it isn't necessary.

Similar Threads

  1. Replies: 27
    Last Post: 2009-07-03, 11:01
  2. Dealing with plug-ins and expansions
    By proberts in forum [Closed] Publishing to Nokia Store
    Replies: 0
    Last Post: 2009-06-09, 05:56
  3. Question about Format plug-in and Codec plug-in development
    By wikiexe in forum General Development Questions
    Replies: 7
    Last Post: 2007-12-06, 17:29
  4. What is plug-ins for 9210 build-in web browser?
    By Nokia_Archive in forum Symbian
    Replies: 1
    Last Post: 2002-06-02, 21:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×