Ability to send raw MIDI messages
See original GitHub issueIs there any way to send raw MIDI messages using SendEvent() in the form of a byte[] and bypass the object wrappers? Because sometimes the user needs to be able to send a non-predetermined or ambiguous MIDI command, including ones not defined in the standard MIDI spec.
For example the managed-midi library allows you to do this as such:
outputDevice.Send(new byte [] {0x90, 0x40, 0x70}, 0, 3, 0);
I was hoping that drywetmidi has an equivalent function. Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
SendMIDI and ReceiveMIDI
SendMIDI and ReceiveMIDI are multi-platform command-line tools that make it very easy to quickly send, receive and monitor MIDI messages ...
Read more >App to send raw midi to a device
Are there any simple apps that allow you to send a custom stream of midi info to a device? Not Sysex formatted, but...
Read more >Monitoring Raw MIDI data
What I would like to see is the ability to display the raw data bytes that are received at the MIDI input without...
Read more >MIDI tutorial for programmers
The MIDI messages are sent as a time sequence of one or more bytes (8 bits). The first byte is a STATUS byte,...
Read more >Midi SysEx Messages - Support, Help & Resources - in_thread
I looked into the various methods of sending raw midi described here, and they all worked for me with the limitations mentioned. (E.g....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I decided to keep current signature of
SendEvent
. BUT it’s obviously useful to have ability to get events from bytes. So I’ve added two classes:BytesToMidiEventConverter
which takes bytes array and returnsMidiEvent
read from the bytes;MidiEventToBytesConverter
which takesMidiEvent
and returns byte array representing the event.Both classes implement
IDisposable
so don’t forget to use these classes insideusing
block or callDispose
manually.So you can use
BytesToMidiEventConverter
to getMidiEvent
and then pass that event toSendEvent
method ofOutputDevice
.Although it looks a bit complicated, in my opinion this way is much more flexible since it’s basic. New classes can be used for different scenarios, not for MIDI events sending only, providing the same API.
New classes are in develop branch so if you want to use them right now, please build the library from sources.
@clarkx86, I received notification about your comment but unfortunately I don’t see it on GitHub 😦 You’re interested in when I’ll release new version of the library including changes regarding this issue. I can’t say exact date but I’ll try to make release in the beginning of February.