MIDIComponent.onValueChange(handler)
Handle MIDI signal events.
The handler gets two parameters, first the value of the signal and second an object with more information about the origin.
译:信号处理MIDI事件。
该处理程序获取两个参数,首先信号和第二个对象的值和来源的详细信息。
midi = new MIDIComponent
# Print the identifier of the control sending the change
midi.onValueChange (value, info) ->
print info.control
See the Get Started section for more examples.
译:有关更多示例,请参见开始部分。
Properties
The info parameter is an object with the following
译:信息参数是一个对象具有以下属性:
control— the identifier of the control (knob, slider, etc.) sending the signal.
译:控件 —— 标识符的控制旋钮,滑块等发送信号。channel— the channel the signal is send over.
译:通道 —— 通道信号的发送。source— the identifier of the device sending the signal.
译:来源 —— 发送信号设备的标识符。type(optional) —"note"if the signal is coming from a ``note, the value represents the velocity,0``` means the note is off.
译:类型 —— "注意"如果信号来自一个注释,该值表示的速度,0意味着要注意了。