I wanted to clear up the muddy waters about CV and MIDI and ended up writing way more than I thought I would, but I think it covers the necessary differences between CV/Gate and MIDI in the context of vvvv and drum machines.
CV
CV has CV values and gates. To make a note, you need the CV to define the pitch of the note and the gate to tell when it is playing.
So CV is an analogue signal between 0 and 10V typically, in programming you can compare it to a float. whereas gate is a binary signal - on or off also typically 0 or 10V.
Both CV and gate are continuous signals that are always on in the sense that you always know if a note is playing or not. this also means that on set of CV and gate can only play one note at a time. Polyphony is more complicated, though with a drum machine, you can have a gate output for each drum sound.
MIDI
Midi is different in that everything is messages.
in one message, you have note value and velocity, this tells the receiving device to begin playing the corresponding note.
To stop the note from playing, you need to send a note off message, which is technically the same as a note on message, only with velocity set to 0.
This also mean that there is a risk of “hanging” notes which are notes that receive note on, but somehow note off got lost.
Controllers works the same way.
Besides note numbers, there are also channels, 16 of them, each capable of 127 notes and 127 controllers.
This construction is in order to not overload the serial bus that MIDI essentially is. in music, timing is really important, so it is vital to have quick response, but at the same time there are many different musical events that all need good timing. many events at the same time is rare
Be aware that midi is a serial protocol that in the original specs are running 31,250b/s.
Envelopes
Since both midi and CV+Gate only provide a note and a velocity, the drum machine/synth typically use an envelope to control how the sound behaves over time.
The typical envelope parameters are:
ADSR
- Attack - how fast the sound opens.
- Decay - How fast it returns to the sustain level
- Sustain - The level it settles on, while the note is held
- Release - how long it takes for the sound to ring out after you release the note.
To make fast transient sounds, you need a fast attack of relatively few milliseconds to make slow swelling sounds, you need slow attack to gradually introduce the sound, that typically goes well with a slow release.
ADSR is typically parameters that are set on the device itself. Sometimes only some of the parameters are exposed.
Drum machines and MIDI
Different drum machines behaves differently.
But most commonly, they respond to channel 10 (9 if you count from 0 like vvvv).
They only respond to note on messages, as that is all that is needed to trigger a drum sound and that is what they send, which mean that depending on the model, you don’t know how long a note is held.
quite often the duration of the note can be adjusted on the drum machine with an envelope.
Detecting note length
To answer you question, you have the note length baked into the duration that the note is on.
I have a meeting soon.
If remember, I can add details on how gamma handles notes and controllers and clock and tempo
You can also just type MIDI into the help browser.
For reference, the midi specs are here https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf
Sune