COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 08-22-2017, 10:21 AM   #1
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 22
Default RtMidi MIDICallback Question

In app_main.cpp the function "MIDICallback" receives all the MIDI Data.

At the moment, it appears to only be coded for simple MIDI Messages with only 2 Data Bytes (CC, etc), and cannot handle large MIDI Data Dumps (Sysex, etc) that span across multiple MIDI Messages.

Say I have an external device which sends a data dump, consisting of 4 different MIDI Messages, each 1024 Bytes each.

In an attempt to support this scenario -- I created a temporary std::vector byte buffer, and try to detect when a large MIDI Message comes which starts with F0 (but does not end in F7). Then, when I detect a MIDI Message that ends in F7, I consider the tmpBuffer to be a "Data Dump".

Can I expect to receive all 4 1024 byte MIDI Messages contiguously? And would they ever be split up into larger or smaller MIDI Messages?

I am trying to figure out how to best receive, handle (and validate!) larger MIDI Sysex Dumps

Last edited by Opcode 7; 08-22-2017 at 10:42 AM.
Opcode 7 is offline   Reply With Quote
Old 08-22-2017, 11:07 AM   #2
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: York, UK
Posts: 977
Default

have some code for that will add soon
__________________
VirtualCZ | pMix | Endless Series | WDL-OL | Linkedin | Patreon
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is offline   Reply With Quote
Old 08-22-2017, 11:39 AM   #3
Opcode 7
Human being with feelings
 
Join Date: Mar 2017
Posts: 22
Default

one of the gods himself!

I am eager to see your approach -- is it currently in a branch I can pull from (or have any ideas when it will be?!)

Thank you!
Opcode 7 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.