I am a midi newbie and would be very grateful for your help with understanding how Midi handles volume variables.
I am building a digital accordion MIDI controller, and have the following requirements for volume control.
1) A bellows air pressure sensor shall be able to control the entire range of expression from nothing (when the bellows are not moving) to pianissimo when the bellows are moved very gently, to fortissimo (max air pressure in the sensor).
2) Ability to attenuate individual channels, to facilitate balance adjustment between left hand side and right hand side (RHS and LHS are on different channels).
3) Master control knob to be able to tweak master volume directly from the midi controller, rather than the separate processor unit.
4) I do not have the key stroke velocity implemented, so the velocity for each note in note-On-Off message shall be a constant.
I feel like I am drowning in the jacuzzi of MIDI commands, but after reading the documentation, I came up with the following:
1) Assign expression (cc11) to the bellows sensor, allowing values from 0 to 127 depending on the sensor reading;
2) Assign volume (cc7) to a rotary encoder that attenuates either LHS channel or RHS channel, depending on the knob rotation direction. Set Volume as 127 for both channels to begin with, and reduce it for one of the channels by the amount read from the encoder.
3) I am aware that there is a MIDI Master Volume Universal SysEx message that sets volume for all channels, but I cannot find how this variable is used in conjunction with the others (cc7 and cc11). Is this the equivalent of turning the gain knob on the midi processor? Or is the processor volume control completely separate from the MIDI Master Volume Universal SysEx message on the controller?
4) As the velocity is constant, shall I just use default 127 for note On, and 0 for note Off?
The potential problem seems to be in how cc7 and cc11 interact with each other:
Per the Midi documentation, the following formula is used to determine the gain:
Gain in dB = (40 * log10(cc7/127)) + (40 * log10(cc11/127))
Reading the formula, it appears to me that even if I have expression set at 0 (no bellows movement), the controller will still play the notes, because volume is >0. Is my understanding correct? In this case I guess I'm back to the drawing board with assigning midi commands to various volume controls.
Thank you very much.