MPadView is used in MKtlGUIs to automatically generate representations of pads and piano keys as commonly used in MIDI devices. You may never need to use MPadView explicitly.
It flexibly supports a variety of behaviors these noteOn, noteOff and touch elements may have, discussed here for clarity, and to possibly add more arcane combinations when encountered.
These types of MIDI elements include:
tag: | description: | noteOn: | noteOff: | touch: | comment |
\noteOnTrig | trigger pad | 127 | - | - | |
\noteOnVel | trig pad w/ vel. | 1-127 | - | - | |
\noteOnOff | piano key w/ on vel. | 1-127 | 0 | - | default |
\noteOnOffBut | button on/off | 127 | 0 | - | |
\noteOnOffVel | pad/key w/ off vel. | 1-127 | 1-127 | - | rare |
\noteOnOffTouch | pad/key w/ polytouch | 1-127 | 0 | 0-127 | semi-rare |
\noteOnOffVelTouch | pad/key w/ off vel and touch | 1-127 | 1-127 | 1-127 | very rare |
parent | |
bounds |
make a new instance of an MPadView |
a dictionary of modes, see top example
names of the available behavior modes
get and set behavior mode of the mpadview. modeName is one of MPadView.modeKeys
.
get and set mpadview's background color
get and set color for activities on view
get and set current value (and optionally do its action): Clicking on gui sets it to y position within view. Usually used as noteOn velocity.
get and set current upValue (and optionally do its action): releasing mouseClick on gui sets it to y position within view. Usually used for velocity decay; also for noteOff velocity.
get and set current moveValue (and optionally do its action): moving the held mouse on gui sets it to y position within view. Usually used for polytouch value.
get and set booleans whether to use value, upValue, moveValue. This supports different behavior modes.
get and set actions to do when value, upValue, moveValue changes
evaluate action, upAction moveAction.
get and set boolean whether pad is pressed.
get and set time for automatic upAction after activation. default inf means it waits for release of mouseclick, short times (e.g. 0.1) allow trigger pad-like behavior.
get and set view label to show
shift label by vertical offset
get and set font to use for label