I ran into an issue using ToggleTunerVisible() when CC7 value is 0. This toggles the tuner, but I
cannot get the tuner screen to disappear by raising the CC7 value above 0 with my foot controller.
This does work with the mouse however, if I click on the volume pedal widget and drag down so CC7 value is 0, the tuner display appears, if I then then move the mouse up to increase the CC7 value above 0 the tuner will disappear.
I am wondering why CC7 value coming from my foot controller cannot be seen by my Rackspace script once the tuner mode is engaged, but the value from the widget controlled by the mouse does work to toggle the tuner off? Would it help if I put this scripting into the gig script editor instead of the Rackspace Script editor? I do see midi in data coming from the foot pedal while the tuner is engaged, it seems the
Rackspace script cannot see it though.
VOLUME, WAH : Widget
VOLUME_ENABLE, WAH_ENABLE : Widget
ExpressionPreviousTime : Double = 0.0
WahDetectionTime : Integer = 800 // Change this to the number of milliseconds that the wah is at position 0 (heel down) before it's bypassed.
MinThreshold : Double = 0.0 // Change this to whatever the mimimum wah pedal value should be before the wah is switched off (value between 0.0 and 1.0)
MaxThreshold : Double = 0.1 // Change this to whatever the maximum volume pedal value should be before the wah is switched off (value between 0.0 and 1.0)
TunerOn : Boolean = False
// Called when a widget value has changed
On WidgetValueChanged(newValue : double) from VOLUME
if newValue < MaxThreshold then
if TunerOn == False then
ToggleTunerVisible() //Turn on Tuner
TunerOn = True
if TunerOn == True then
ToggleTunerVisible() //Turn off tuner
TunerOn = False
On WidgetValueChanged(w : Widget, index: integer, newValue : double) from WAH
if GetWidgetValue(WAH_ENABLE) == 0.0 and newValue > MinThreshold then
if newValue <= MinThreshold then
ExpressionPreviousTime = ClockTime()
if !GetTimersRunning() then SetTimersRunning(true) end
On TimerTick(ms : double)
if GetWidgetValue(WAH) <= MinThreshold then
if ClockTime() - ExpressionPreviousTime >= WahDetectionTime then
You can think of the tuner as living in another “local” rackspace and so when you switch to it, other rackspaces become inactive. This was a deliberate design decision - the idea being that when you’re tuning, you do not want output to be heard!
Hmmm — This code needs a VOLUME widget in the Global Rackspace and each time this widget is changed (not only when it is set to 0!) it toggles OFF the tuner.
Are you sure you are happy with that?
If you are happy with that it is that something else somewhere else (e.g. a local rackspace GPScript) does what you want and that you probably “won” a race condition which could change anytime in the future.
Since the “local” rackspace is in “offline” status per @dhj once the tuner is engaged, I don’t see any other way to accomplish my goal.
It is fine that there needs to be a volume widget in the global rackspace I can always hide it if needed…
Any movement on the volume pedal should toggle off the tuner, this is also acceptable. The main thing is that the tuner is toggled “on” when it is heel down for more than 1 second, and that I accomplished with the other code in the local rack space using @rank13 's script.
You are right, from your experience and the explanation from @dhj, we now know that the local rackspace is disabled when the tuner is activated. So no race condition. But than your global rackspace GPScript is supposed to switch the tuner OFF for any change of the VOLUME which works here as your pedal was set to zero. Right, it does what you want