Hello my friends,
I am attempting to develop a script that sends a string to the LCDs on my Behringer X Touch.
These threads/articles gave me a lot of good information to get started:
Still, I need a little help reaching the finish line.
Here is my script:
var
MCUPrefix : string = "F0000066141200"
MCU : MidiOutBlock
// Construct a complete sysex message
function MakeMCULabelSysexMessage(LCDLabel : string) returns String
var
LCD : string = StringToHexString(LCDLabel)
result = MCUPrefix + LCD + "F7"
end
function SendToMCU(LCDLabel : string)
var
SysEx : SysexMessage = MakeMCULabelSysexMessage(LCDLabel)
SendSysexExternal(MCU : midioutblock, SysEx : sysexmessage)
End
Initialization
SendToMCU("12345601234560123456012345601234560123456012345601234560")
End
Also, I wrote out the script for the “Mastermind GT MMGT Input” for practice. If anyone would like to use it for a starting point for a similar project, here it is:
var
RJMPrefix : string = "F000015B001D00"
midiDeviceName : string = "Mastermind GT MMGT Input"
// Construct a complete sysex message
function MakeRJMLabelSysexMessage(pageNumber : integer, buttonNumber : integer, color : integer, buttonLabel : string) returns String
var
pp : string = IntToHexString(pageNumber)
bb : string = IntToHexString(buttonNumber)
cc : string = IntToHexString(color)
text : string = StringToHexString(buttonLabel)
result = RJMPrefix + pp + bb + cc + text + "F7"
end
function RJMSendTitle(title : string)
var
sysexString : String = MakeRJMLabelSysexMessage(0x7f, 0, 0, title)
SendSysexNowToMidiOutDevice(midiDeviceName, sysexString)
end
// Set the label text and color of the specified button
function SendToRJM(buttonNumber : integer, color : integer, buttonLabel : string)
var
sysexString : String = MakeRJMLabelSysexMessage(0, buttonNumber, color, buttonLabel)
SendSysexNowToMidiOutDevice(midiDeviceName, sysexString)
end
Initialization
RJMSendTitle("Reelin' Gig")
SendToRJM(0,5,"Tap")
SendToRJM(3,1,"Panic")
End
//iterate though song parts and create sysex messages
//and send out sysex messages
Function SendSongPartsToPedal()
var count : integer = GetSongPartCount()
i : integer
partname : string
myMidiMessage : MidiMessage
sysexString : String
firstPartButtonIndex : integer = 4
maxParts : integer = 6
buttonColor : integer
for i = 0; i < maxParts; i = i + 1 do
if i < count
then
partname = GetSongPartName(i)
else
partname = " "
end
//now send the part name
SendToRJM(i + firstPartButtonIndex, buttonColor, partname)
end
end
// called when you switch to another song
On Song(oldSongIndex : integer, newSongIndex : integer)
var
songname : String = GetSongName(newSongIndex)
RJMSendTitle(songname) // Update the song name in center large panel
SendSongPartsToPedal() // Send the song parts to individual buttons
End
Lastly, for any Touch users that are looking to gain greater control over their unit, I found this Midi Implementation online and it’s been invaluable. Enjoy!
Xctl Protocol for X-Touch V1.0.pdf (442.4 KB)
As always, thanks for your help!
Sam