I want to start coding the Script for this controller because I found no one.
Does someone knows which other controller script could I take as example to start with?
Thanks
I will upload the last versions here so everyone can use it
Code: Select all
var CC =
{
CYCLE : 0x2E,
REW : 0x2B,
FF : 0x2C,
STOP : 0x2A,
PLAY : 0x29,
REC : 0x2D,
PREV_TRACK : 0x3A,
NEXT_TRACK : 0x3B,
SET : 0x3C,
PREV_MARKER : 0x3D,
NEXT_MARKER : 0x3E,
SLIDER1 : 0x00,
SLIDER8 : 0x07,
KNOB1 : 0x10,
KNOB8 : 0x17,
S1 : 32,
S8 : 0x27,
M1 : 48,
M8 : 0x37,
R1 : 64,
R8 : 0x47
};Code: Select all
...script setup ( loadApi and stuff)...
var SILENT = false;
function init()
{
host.getMidiInPort(0).setMidiCallback(onMidi);
host.getMidiInPort(0).setSysexCallback(onSysex);
}
function onMidi(status, data1, data2){
log('MIDI:'+status + ' - '+data1+" - "+data2);
}
function onSysex(data){log('SYSEX: '+data)};
function log(msg){
SILENT || println(msg);
}
thanks a lot! I'll check todaybrunomolteni wrote: Tue Nov 20, 2018 3:45 pm well one thing you can do is have a callback set on midi, and just log its values... a code example of how I did it:
The SILENT variable can be changed to true once you are done with the script so you dont have to manually comment or delete every printlnCode: Select all
...script setup ( loadApi and stuff)... var SILENT = false; function init() { host.getMidiInPort(0).setMidiCallback(onMidi); host.getMidiInPort(0).setSysexCallback(onSysex); } function onMidi(status, data1, data2){ log('MIDI:'+status + ' - '+data1+" - "+data2); } function onSysex(data){log('SYSEX: '+data)}; function log(msg){ SILENT || println(msg); }
Sorry for my late reply...brunomolteni wrote: Tue Nov 20, 2018 3:45 pm well one thing you can do is have a callback set on midi, and just log its values... a code example of how I did it:
The SILENT variable can be changed to true once you are done with the script so you dont have to manually comment or delete every printlnCode: Select all
...script setup ( loadApi and stuff)... var SILENT = false; function init() { host.getMidiInPort(0).setMidiCallback(onMidi); host.getMidiInPort(0).setSysexCallback(onSysex); } function onMidi(status, data1, data2){ log('MIDI:'+status + ' - '+data1+" - "+data2); } function onSysex(data){log('SYSEX: '+data)}; function log(msg){ SILENT || println(msg); }


Code: Select all
function onSysex(data){log('SYSEX: '+data)};Submit: News, Plugins, Hosts & Apps | Advertise @ KVR | Developer Account | About KVR / Contact Us | Privacy Statement
© KVR Audio, Inc. 2000-2026