// this depends on the Bitwig verion one has installed - as we do nothing special // we ue the lowest API version number, hence most downward compablity loadAPI(1); // specify the MIDI controller template - names are reflected in the UI of Bitwig // // the fancy number is a GUID or UUID, which can be created by several websites and // really must be unique for each Controller Script Template - so if you want to create // a derived version of your own, browse out to the web and get yourself a new & fresh UUID ;-) host.defineController( "iOS", "Touchscaper MPE", "1.0", "fa1c1eb0-b541-11ea-8b6e-0800200c9a66" ); // create 1 MIDI input and 0 MIDI output ports host.defineMidiPorts(1, 0); function init() { // pipe all MIDI messages through- the questionmakrs are "joker filter" (aka wildcards) which means // they describe the 3 bytes of a normal MIDI messages in Hex value notation noteInput = host.getMidiInPort(0).createNoteInput("", "??????"); // using MIDI channel 1 as the Master Channel (see Touchscaper Docs - it send notes on channel 2 - 9 by v 1.5) // 1st parameter : true - does the magic that midi channel messages like CC74 are "routed" onto the "note event expression" timbre lane (instead of a regular MIDI CC lane) // 2nd parameter : 0 - MIDI channel 1 is the master channel and MIDI channel 2 - 15 are used for notes // 3rd parameter : 48 - pitch bend range is 48 semitones noteInput.setUseExpressiveMidi(true, 0, 48); } function exit() {}