As the title suggests I'm looking for help getting started with MIDI in RackAFX. I'm interested in creating plugins that manipulate MIDI and return that data to the client, like arpeggiators for e.g. I'm just wondering how to get started? I have the FX book but I can't seem to find anything about MIDI?
This topic is covered on this thread regarding VST:
In a nutshell, you can not send MIDI back to the RackAFX host. it is a one-way option only. This means that your plugin can only receive (sink) MIDI messages and cannot transmit (source) MIDI back to the host.
You can do this in VST3, however there are strict limitations on the kinds of MIDI messages you can transmit back; nearly all messages except for note on/off and sysex are restricted from transmission. There is another thread here that discusses how to do that with VST3:
If you want to try the VST3 version, you can use Make VST to create a VST3 project (you need the VST3 SDK, and you need to follow the rules for locating the project folder relative to the SDK root) and of course you need a VST3 client (I use Reaper now). If you are only making an arpeggiator that needs a sequence of note on/off messages, then this will work for you. If you need to manipulate more complex MIDI stuff (controllers, RPNs, etc...) then it won't due to the built in limitations on MIDI sourcing in VST3.
In my Synth book, there is a chapter dedicated to trapping and decoding MIDI messages in the 3 APIs, but it does not cover transmitting MIDI back to the host.
Hope that helps -
Thanks for the quick reply! Yes, returning the basic note on/off data to the client is all I really need to be able to do.
In the other thread you mention these functions.
midiMessage() <- all midiMessages, unfiltered
While what they do seems obvious enough, I'm very new to DLLs and working without a main() function so I was hoping for more clarity so I might avoid guesswork. If my project was made VST, how would I use these functions to for e.g. get the incoming note on and return it as a different note to my VST client (I will probably use Cubase LE for this)? I notice they all return true but I don't know where the returned data goes or how to use the functions. Changing the incoming note to a new note will represent arepeggiator processing in this case; I'm just trying to create a working template for such a device.
These are functions that RackAFX calls when it receives MIDI data. Rather than make you decode the raw MIDI bytes, I decode the most common bunch:
You then implement handlers for these functions to do as you please in response to them. If you want all the rest of the messages (which you would need to decode on your own) then set the boolean flag in your PlugIn constructor.
m_bWantAllMIDIMessages = true;
VST3 and AU do not use these message handlers.
For VST3, you would need to refer to the documentation, and/or use Make VST and look at the function:
bool Processor::doProcessEvent(Event& vstEvent)
Here, you can see where I decode the incoming VST MIDI messages, then forward those calls to the RackAFX functions above. This is where you receive MIDI messages in VST3.
If you want to transmit MIDI messages back to the host in VST3, then see the bottom of the function:
tresult PLUGIN_API Processor::process(ProcessData& data)
At the end of all of the processing, but before the last curly bracket, you would need to add the code in the thread:
to send MIDI note messages back to the host.
The links are now fixed; happened during the website overhaul.
Also, there have been several similar requests for arpeggiator code so if you implement it, you might consider posting on the VST Forum page for others who might be interested. Ive sent MIDI out (note on and note off) for testing, but haven't implemented a MIDI arpeggiator (or MIDI delay, which is another effect you can do with note on/off).
You can also check out the VST3 SDK Forum:
Searching it, I think you might find similar questions about MIDI output.
Most Users Ever Online: 152
Currently Browsing this Page:
Guest Posters: 1
Newest Members:duo.dirtykidz, Paul, Reakenzo, jflo, dan_1, phlub, josh, bmarx, Tom Helvey, Ludovic
Moderators: W Pirkle: 555
Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 555, VariableCook: 3