Skip to content

Instantly share code, notes, and snippets.

@actionless
Last active February 13, 2021 01:23
Show Gist options
  • Save actionless/8442c138c907faea094311f334c4ee42 to your computer and use it in GitHub Desktop.
Save actionless/8442c138c907faea094311f334c4ee42 to your computer and use it in GitHub Desktop.
Akai Rhythm Wolf controller script for Bitwig 1.x
loadAPI(1);
host.defineController("Akai", "Rhythm Wolf", "1.0",
"FF7FA0F5-9B53-4854-828A-666666666666");
host.defineMidiPorts(1, 1);
host.addDeviceNameBasedDiscoveryPair(["Rhythm Wolf MIDI 1"], ["Rhythm Wolf MIDI 1"]);
function init() {
var generic = host.getMidiInPort(0).createNoteInput("Rhythm Wolf Pads");
generic.setShouldConsumeEvents(false);
var midi = host.getMidiOutPort(0);
// possible commands:
//midi.sendMidi(123, 0x00, 0x00); // all notes off
//midi.sendMidi(121, 0x00, 0x00); // reset all controllers
//midi.sendMidi(0xFF, 0x00, 0x00); //reset
//midi.sendMidi(0xFA, 0x00, 0x00); //start
//midi.sendMidi(0xF2, 0x00, 0x00); //SPP
//midi.sendMidi(0xFB, 0x00, 0x00); //continue
//midi.sendMidi(0xFC, 0x00, 0x00); //stop
//midi.sendMidi(0xF8, 0x00, 0x00); //tick
//host.showPopupNotification('Mr Wolf initialized');
var transport = host.createTransport();
midi.setShouldSendMidiBeatClock(true);
transport.addIsPlayingObserver(function(on) {
if (!on) {
midi.sendMidi(123, 0x00, 0x00); // all notes off
midi.sendMidi(0xF2, 0x00, 0x00); //SPP
}
});
}
function exit() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment