void notte (float pitch, float vel){ pitch = constrain (pitch, 0, 127); vel = constrain (vel, 0, 127); output.sendNoteOn (chan, int(pitch), int(vel)); // manda noteOn en canal 1 } void off (float pitch){ pitch = constrain (pitch, 0, 127); output.sendNoteOn (chan, int(pitch), 0); // manda noteOff en canal 1 } void cc (float controller, float value){ controller = constrain (controller, 0, 127); value = constrain (value, 0, 127); output.sendController (chan, int (controller), int (value)); // manda control change en canal 1 (0-127) (0-127) } void patch (float value){ value = constrain (value, 0, 127); // manda program change en canal 1 (0-127) output.sendProgramChange (int (value), 0); // (nótese que hay un bug en la librería) } void bend (float value){ value = constrain (value, 0, 16383); int [] data = new int [2]; data [0] = int (value/128); data [1] = int (value) % 128; output.sendPitchBend (chan, data[1], data[0]); // manda pitchbend en canal 1 (0-16383) [rwmidi fixed by Pablo Gindel] }