Jump to content

Adding remote start/stop/next song/previous song ot MIDIO128?


m00dawg
 Share

Recommended Posts

Can someone point in a direction for where I need to be looking in the MIDIO128 code to try and implement that feature? I poked around in seq.c and midio_sysex.c but I didn't get especially far. I suspect I may be needing to do something to/with SEQ_PlayStopButton() or scs_config.c, buttonHook()?

My plan was to have MIDIO128 interpret MIDI transport commands (Play, Stop, FFwd, Rew) so I can remotely control it using using transport controls on my MIDI keyboard or a custom control surface.

As a sort of aside, is there enough headroom to backport some CV functions to MIDIO128, say, if I toss out things I don't need? I'm really only using the MIDI playback and routing functions of MIDIO128. If it could handle some basic CV (say just following MIDI CCs) I could save on space and costs by needing only one CORE.

Link to comment
Share on other sites

Forward code would be as simple as:

     MUTEX_SDCARD_TAKE;
     SEQ_PlayFileReq(1, 1);
     MUTEX_SDCARD_GIVE;

 

Reverse code is similar but with a -1 in first parameter:

     MUTEX_SDCARD_TAKE;
     SEQ_PlayFileReq(-1, 1); // Move to previous file
     MUTEX_SDCARD_GIVE;

 

I think this will work for the Play function.

     if( FILE_SDCardAvailable() )
     { 
         if(!SEQ_BPM_IsRunning() )  // If in STOP mode.
              SEQ_PlayStopButton();
     } 
 

To do the PAUSE function just remove the ! (not) from the check.

 

I don't remember what functions may have been declared as STATIC in the .c files but I changed them to suit my needs. At lease this shows you what functions I called to do these things.   Hope this helps.

 

Pete

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...