Last active
August 29, 2015 14:17
-
-
Save jhorology/11c57f245de6cf4e7364 to your computer and use it in GitHub Desktop.
Bitwig Controller script for my Yamaha P-120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadAPI(1); | |
host.defineController("Yamaha", "P-120", "1.0", "E1F63546-558B-4744-825F-3D197386C344"); | |
host.defineMidiPorts(1, 1); | |
host.addDeviceNameBasedDiscoveryPair(["Scarlett 6i6 USB"], ["Scarlett 6i6 USB"]); | |
function init() { | |
// using only note on/off & dumper pedal | |
var midiIn = host.getMidiInPort(0), | |
noteInput = midiIn.createNoteInput("Yamaha P-120", "8?????", "9?????", "B?40??"); | |
noteInput.setShouldConsumeEvents(true); | |
// midiIn.setMidiCallback(onMidi); | |
// midiIn.setSysexCallback(onSysex); | |
// stop MIDI clock | |
sendSysex("F0 43 73 75 03 F7"); | |
} | |
function onMidi(sts, d1, d2) { | |
printMidi(sts, d1, d2); | |
} | |
function onSysex(data) { | |
} | |
function flush() { | |
} | |
function exit() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment