At this point I have a script that does what I need it to do, but I’ll definitely incorporate some of these ideas.
I’ve gone off on a bit of a tangent, looking at the best way to use the Ramp functions.
It appears that I need to put SetTimersRunning after (not before) the first instance of EnableGenerator in order for the Ramp generator to work.
If instead, I use TriggerOneShotRamp (which is described as “experimental” in the documentation I have seen) - there is no need to SetGeneratorsRunning at any point in the code, or include SetGeneratorOneShot, Set GeneratorLength, or SetGeneratorCoarseness in any initialisation as its all included in TriggerOneShotRamp - so it simplifies the code.
So if I got a vote, I would definitely promote TriggerOneShotRamp to permanent feature of GP Script - for the specific code I have been experimenting with, it looks like a simpler solution.
But I’m thinking it might take more cycles to execute?
Is there any way to know how many cycles a given line of code will use? I’m just thinking of a callback such as…
On ControlChangeEvent (C : ControlChangeMessage) matching 1,11,64 from MidiIn
TriggerOneShotRamp(RMP, 3000, 1000)
End
Where the the Callback is likely to be called several hundred times in a very short time period, it might start to take up a lot of CPU and hinder other processes. Is there a way to measure this? Or any published info on the number of cycles any given function is likely to take? So far it doesn’t appear to cause any issues, but I’m still wondering whether the better approach would be to just resend the Sysex message to the keyboard once every 3 seconds or so regardless of whether any CCs have overwritten the LCD screen.
I still have a lot of difficulty understanding/using many of the features that GigPerformer offers, but as I have an Arturia Keylab 88 Essential, it seemed like it would be an excellent resource to know how to use this script.
The problem is that I don’t know anything about scripting and I also don’t know how to edit (if necessary) or what I have to do to make it work.
So I copied the code that was available here and, in the “window” tab, I selected “show song script editor” (in fact I tried all 4 existing options) I pasted the code in the window that opened and pressed the “compile” button.
Then I got an error message:
Gipsy Kings (Song) - - Syntax Error in “Main”: Line 66, Col 9: Unexpected or unrecognized token: “song”
Mismatched input “song” expeting identifier
I have no idea what could be wrong or how to get the script to work. Would you help me?
I followed your instructions, entered your code on the “rackspace Scriptt Editor”, pressed the compile button and got the message “compilation successful”. However, my keylab display didn’t change and doesnt show any info but the usual info. I change rackspaces but nothig happens. What am I missing?
The code is for the Keylab (MkII) series. The Keylab essentials may differ. I remember that already from Keylab MkI to MkI where some minor changes where I had to figure out how to get the first time up and running. Maybe have a look in to the Arturia forum? Or @Couack can help, as he states tested with the essential
Hi @ music4u - since the newest version of GP, this script has not worked. I haven’t had the time to re-do it yet. If I do - I will re-post my findings here.
This is the script I am using. Updated from the script from @TicoRicoRay
Updated to show songs in setlist, and added Callback since Variations weren’t catching mouse clicks to rack space changes.
//Global Rackspace must have a MIDI OUT Plugin with the handle KeyLab88MIDIOut
var KeyLab88MIDIOut : MidiOutBlock
//Send Keylab LCD Sysex Message
Function KeylabLCD(line1 : String, line2 : String)
var
KEYLAB_LCD_PRE : String = "F0 00 20 6B 7F 42 04 00 60 01 "
KEYLAB_LCD_SEP : String = "00 02 "
KEYLAB_LCD_END : String ="00 F7"
msg : SysexMessage =
KEYLAB_LCD_PRE
+ StringToHexString(CopySubstring(line1,0,16))
+ KEYLAB_LCD_SEP
+ StringToHexString(CopySubstring(line2,0,16))
+ KEYLAB_LCD_END
SendSysexExternal(KeyLab88MIDIOut, msg)
End
//Update LCD
Function UpdateLCD()
If InSetlistMode() Then
KeylabLCD(GetCurrentSongName(), GetCurrentSongPartName())
Else
KeylabLCD(GetRackspaceNameAtIndex(GetCurrentRackspaceIndex()), GetVariationName(GetCurrentVariation()))
End
End
//Callbacks
On Variation(old : Integer, new : Integer)
UpdateLCD()
End
On Rackspace(old : Integer, new : Integer)
UpdateLCD()
End