Hi,
I'm trying to create a very simple script which controls transport with System realtime start(0xFA) and stop(0xFC) messages. For some reason looks like Bitwig filters out these messages automatically. Any ideas how to get it work? the script below
loadAPI(18);
// Remove this if you want to be able to use deprecated methods without causing script to stop.
// This is useful during development.
host.setShouldFailOnDeprecatedUse(true);
host.defineController("Roland", "AIRA T-8 Compact", "0.1", "ddb04b53-2031-419a-ac14-a695fec5f53e", "rrauanmaa");
host.defineMidiPorts(1, 0);
if (host.platformIsWindows())
{
// TODO: Set the correct names of the ports for auto detection on Windows platform here
// and uncomment this when port names are correct.
// host.addDeviceNameBasedDiscoveryPair(["Input Port 0"], ["Output Port 0", "Output Port -1"]);
}
else if (host.platformIsMac())
{
// TODO: Set the correct names of the ports for auto detection on Mac OSX platform here
// and uncomment this when port names are correct.
// host.addDeviceNameBasedDiscoveryPair(["Input Port 0"], ["Output Port 0", "Output Port -1"]);
}
else if (host.platformIsLinux())
{
// TODO: Set the correct names of the ports for auto detection on Linux platform here
// and uncomment this when port names are correct.
// host.addDeviceNameBasedDiscoveryPair(["Input Port 0"], ["Output Port 0", "Output Port -1"]);
}
function init() {
transport = host.createTransport();
host.getMidiInPort(0).setMidiCallback(onMidi0);
host.getMidiInPort(0).setSysexCallback(onSysex0);
// TODO: Perform further initialization here.
println("AIRA T-8 Compact initialized!");
}
// Called when a short MIDI message is received on MIDI input port 0.
function onMidi0(status, data1, data2) {
// TODO: Implement your MIDI input handling code here.
switch (status) {
case 0xFC:
transport.stop();
break;
case 0xFA:
transport.play();
break;
}
}
function flush() {
// TODO: Flush any output to your controller here.
}
function exit() {
}
I'm trying to create a very simple script which controls transport with System realtime start(0xFA) and stop(0xFC) messages. For some reason looks like Bitwig filters out these messages automatically. Any ideas how to get it work? the script below
loadAPI(18);
// Remove this if you want to be able to use deprecated methods without causing script to stop.
// This is useful during development.
host.setShouldFailOnDeprecatedUse(true);
host.defineController("Roland", "AIRA T-8 Compact", "0.1", "ddb04b53-2031-419a-ac14-a695fec5f53e", "rrauanmaa");
host.defineMidiPorts(1, 0);
if (host.platformIsWindows())
{
// TODO: Set the correct names of the ports for auto detection on Windows platform here
// and uncomment this when port names are correct.
// host.addDeviceNameBasedDiscoveryPair(["Input Port 0"], ["Output Port 0", "Output Port -1"]);
}
else if (host.platformIsMac())
{
// TODO: Set the correct names of the ports for auto detection on Mac OSX platform here
// and uncomment this when port names are correct.
// host.addDeviceNameBasedDiscoveryPair(["Input Port 0"], ["Output Port 0", "Output Port -1"]);
}
else if (host.platformIsLinux())
{
// TODO: Set the correct names of the ports for auto detection on Linux platform here
// and uncomment this when port names are correct.
// host.addDeviceNameBasedDiscoveryPair(["Input Port 0"], ["Output Port 0", "Output Port -1"]);
}
function init() {
transport = host.createTransport();
host.getMidiInPort(0).setMidiCallback(onMidi0);
host.getMidiInPort(0).setSysexCallback(onSysex0);
// TODO: Perform further initialization here.
println("AIRA T-8 Compact initialized!");
}
// Called when a short MIDI message is received on MIDI input port 0.
function onMidi0(status, data1, data2) {
// TODO: Implement your MIDI input handling code here.
switch (status) {
case 0xFC:
transport.stop();
break;
case 0xFA:
transport.play();
break;
}
}
function flush() {
// TODO: Flush any output to your controller here.
}
function exit() {
}
Statistics: Posted by rrauanmaa — Thu Mar 07, 2024 1:07 pm — Replies 0 — Views 14