I need a plugin for VST(2/3) to push raw MIDI-DATA and SYS-EX (so almost everything which is typically stored in MIDI tracks to control synth voices) to my DIY Audio Workstation. I tried around with Steinbergs SDK (already used that, but very long time ago) and frameworks like SynthEdit. Howevery I did not manage to do that sufficiently and just came across JUCE.
I am familiar with C++ and also wxWidgets but for more than a decade now only a part time programmer - though this appears to be worth a try:
My workstation - especially the synthesizer - handles 64 MIDI channels at it’s inputs and is capable of handling 256 in the forthcoming version. Modules are typically interlinked via S/PDIF using one of these protocols: MIDI 2000 - an enhanced MIDI protocol for higher transmission rates - J.S 2001
To integrate it into DAWs seamlessly for me and others, I would like to forward the MIDI data from within a plugin as digital audio. (My first try was done with a plugin maker in the early 2000s using 2 channels with MIDI2AUDIO the analog way). I furthermore use(d) MIDI out with 230kbps with a UART. 16 channel MIDI controller with 230kbps serial interface - 2004
Now it is time for the next step and I like to know if the following is possible with JUCE and how:
I need a plugin which offers at least 4 MIDI channels to the DAW-user, thus having 64 channels. I am thinking of 4 virtual devices with 16 logical MIDI channels each. Future Version: 256 channels. The best was, if these devices appeared as individual “MIDI Instruments” so they could be addressed easily and the user had a good overview regarding the routing.
The code shall do … for all input channels:
- pick up the MIDI Data Stream
- add regular timing codes (my CODEs! next to standard MIDI Clock Codes)
- add channel information
- add system messages (my messages)
- Store it in a buffer
… and for the output:
- Read from all of these 4 buffers
- sort the data according to the time code of appearance
- write into a single buffer
- read from the buffer and package the information into the 2x24 S/PDIF bits
- send this data out as digital stereo out via a sound card with S/PDIF
Desired frequency for a 4 device version (64ch) would be 192kHz for 4 x 16 channels
Desired frequency for a 16 device version (256ch) would be 768kHz for 16 x 16 channels
Intended max transmission time for both: 64ch x (max 6 Bytes per MIDI-Message) = 2ms.
Can this technically be done?
I am using S/PDIF rather than USB because of latency. My synth has a key-to-sound time value below 10us when using a MIDI source with appropriate connection. For a live Keyboard input covering 1-2 channels this was about 50us. Currently I am discussing with a manufacturer from Asia who is interested in that to have a fast real time connection to synths and DAWs.
It is intended to be a free product for anybody who wants to control his studio in a better way and could be of interest of users in here too: One part of my MIDI-Receiver is a high performance MIDI Matrix feeding Sequencers and MIDI-Outs. So as a side effect, one had a rapid and cheap 16channel MIDI-out shunning USB issues. A board for that is under design and will be available for DIX guys who cannot produce their own PCBs.
I also have controllers running with MIDI that way and so the next step was, to drive Software-Synths by that in going the other way writing an input plugin: (I do not have that yet)
- Read “Audio” from a streaming bufffer which listens to a S/PDIF input
- decode S/PDIF and extract channel number and MIDI codes
- decode MIDI codes and write to the given instrument (channel number) respecting the sub channel (logical MIDI channel).
I have a $10,- FPGA device which is capable of doing this and which can drive and handle a DIY midi controller with an array of here 5x8 rotarys, several knobs, buttons, joystick and mod wheel. My larger FPGA has two additional VGA outputs to control the values and play back graphical equalizer and volume values. This could also be built via DIY.
Looking forward in hearing some suggestions.