[Rackspace] GP-Preset Roll-Selector (with GP-Script)

Topic closed because there is a new version available!

Please visit this thread:

and download the new version - it should work better!
Thanks for your understanding!

######################################################################

Hi everyone,
since there were quite some questions and discussionsabout how to switch presets with widgets, scriptig, variations… i thought i could try to builld yet another rackspace to achieve these tasks.
The rackspace looks like this:


In the wiring view i used some free plugins (a step sequencer and a synth):
https://www.fullbucket.de/music/sequencair.html
and

I also saved a bunch of GP-Presets, so you’ll have something to play with.
Unzip this packkage into you Documents\Gig Performer\Presets folder
Presets.zip (383.2 KB)

So this is how it works:
You can step through the list of available GP-Presets by either using the +1 or -1 buttons or by turning the knob on the left. When you press the “Select” button on the right, the preset in the highlighted (middle) field will be activated/loaded. The actually active preset name will be shown in the text field on top. That’s pretty it…
You can of course save more presets (i think up to 128) or delete some from the preset-folder - the script should “catch” the changes as soon as you press a button or turn the knob.
Since the knob is in sync with the active preset, it will also be able to store/recall the active preset in a rackspace variation.

Have fun with it:
GP-Preset-Roll-Selector.gig (328.1 KB)

And just for the curious ones, this is the script behind the curtain (maybe some things might be not very elegant or even redundant, but i got somehow lost at a certain point). Well it works… that’s what counts! :nerd_face:

const
centerIndex :integer = 2
indexRange : integer = 2

var
plugin1 : PluginBlock
txtField10, txtField11, txtField12, txtField13, txtField14 : widget
txtField1Active : widget
btnPlus1, btnMinus1, knbDial1, btnSelect1, btnOpen1 : widget
presetRoll1 : widget array = [txtField10, txtField11, txtField12, txtField13, txtField14]
presetListPlugin1 : string array
dontDial : boolean = false
actualListIndex:integer 


//####################### function to set the knob according to the actual preset index ################################
function setKnob()
var
knbValue : double 
presetListPlugin1 = GetGPPresetList(plugin1, 0)
    if actualListIndex >= Size(GetGPPresetList(plugin1, 0)) then
        knbValue = 1.0
    else
        knbValue = (actualListIndex+0.5)/Size(GetGPPresetList(plugin1, 0))
    end

    dontDial = true
    Sleep(50)
    SetWidgetValue(knbDial1, knbValue)
    dontDial = false
End


//####################### function to get the index-value of a given preset name ################################
function GetPresetListIndex (presetName : string, presetList : string array) returns integer
var
index : integer
presetListPlugin1 = GetGPPresetList(plugin1, 0)
    for index = 0; index < Size(presetList); index=index +1 Do
        if presetName == presetList[index] then result = index end
            Print(presetList[index])
    end
End


//####################### function to to update the preset-roll ################################
function UpdatePresetRoll (plugBlock : PluginBlock, roll: widget array, listStartIndex: integer, rollStartIndex : integer)
var
index : integer
indexName : string
presetList : string array = GetGPPresetList(plugBlock, 0)
    for index = 0; index<Size(roll); index=index +1 Do
        if listStartIndex - (indexRange-index) <0 or listStartIndex+index-1 >Size(presetList) then
            indexName =""
        else
            indexName = presetList[(listStartIndex-(indexRange-index))]
        end
        SetWidgetLabel(presetRoll1[index], indexName)
    end
End


//####################### function to to reactivate the las active preset ################################
function reActivatePreset()
    presetListPlugin1 = GetGPPresetList(plugin1, 0)
    actualListIndex = ScaleRange(GetWidgetValue(knbDial1), 0, Size(GetGPPresetList(plugin1, 0))-1)
    UpdatePresetRoll(plugin1, presetRoll1, actualListIndex, centerIndex)
    Sleep(50)
    SetWidgetLabel(txtField1Active, GetWidgetLabel(presetRoll1[centerIndex]))
    Sleep(50)
    LoadGPPreset(plugin1, GetWidgetLabel(txtField1Active))
End

// Called automatically after script is loaded
Initialization
    reActivatePreset()
End

// Called when you switch variations
On Variation(oldVariation : integer, newVariation : integer)
    reActivatePreset()
End



//Step one preset line UP
On WidgetValueChanged(bVal : double) from btnPlus1

    if bVal == 1.0 then
        presetListPlugin1 = GetGPPresetList(plugin1, 0)
        actualListIndex = GetPresetListIndex(GetWidgetLabel(presetRoll1[centerIndex]), presetListPlugin1)
        if actualListIndex+indexRange <= Size(GetGPPresetList(plugin1, 0)) then
            actualListIndex=actualListIndex+1
            UpdatePresetRoll(plugin1, presetRoll1, actualListIndex, centerIndex)
            setKnob()
        end
    end
End

//Step one preset line DOWN
On WidgetValueChanged(bVal : double) from btnMinus1

    if bVal == 1.0 then
        presetListPlugin1 = GetGPPresetList(plugin1, 0)
        actualListIndex = GetPresetListIndex(GetWidgetLabel(presetRoll1[centerIndex]), presetListPlugin1)
        if actualListIndex >=1  then
            actualListIndex=actualListIndex-1
            UpdatePresetRoll(plugin1, presetRoll1, actualListIndex, centerIndex)
            setKnob()
        end
    end
End

//##################### Activate the highlighted (middle) preset ##########################
On WidgetValueChanged(bVal : double) from btnSelect1
var
index:integer 
    if bVal == 1.0 then
        presetListPlugin1 = GetGPPresetList(plugin1, 0)
        SetWidgetLabel(txtField1Active, GetWidgetLabel(presetRoll1[centerIndex]))
        Sleep(50)
        LoadGPPreset(plugin1, GetWidgetLabel(txtField1Active))
    end
End

//use the knob to dial a preset
On WidgetValueChanged (kVal:double) from knbDial1
    actualListIndex = ScaleRange(kVal, 0, Size(GetGPPresetList(plugin1, 0))-1)

    if dontDial != true then
        UpdatePresetRoll(plugin1, presetRoll1, actualListIndex, centerIndex)
    end
End

//Watch the open/close events of the plugin -> renew the presets-list
On WidgetValueChanged (bVal:double) from btnOpen1
    presetListPlugin1 = GetGPPresetList(plugin1, 0)
End


9 Likes

Thanks, man. It even switches quite fast… you can try it by switching variations while keeping the step-sequencer running. But it all depends on the plugins you use… i first set the rackspace up with a diffrent synth from Full Bucket Music, which didn’t react to any GP-Presets, not loaded via script, nor loaded manually… maybe i used an old version… i don’t know.
I’m telling just in case, if something doesn’t work… try a diffrent plugin first.

2 Likes

Yeah, Just save gp-presets from within the opened plugin window… the path should be the right one by default (see also the initial posting).
No need to change anything in the script.
It should update the list of available presets with the first press of a button or turn of the knob.
Your can replace the plugin, but then you should be aware to either use the handle name like it was (plugin1), or you’d have to change the handle names in the script accordingly to what you choose.

2 Likes

afaik it’s the equivalent of a present bank, so i think a chunk is a group of 128 presets… but i also may be wrong.
EDIT: I was almost right… it’s 256 presets!

1 Like

Which one exactly?

Yeah, I decided to use a separate button for the final choice, since I mistrust the situation of “bombing” a poor plugin with too many preset changes in a too short time…

1 Like

I can’t actually tell… obviously, miracles happen from time to time. :sunglasses: :smile:

2 Likes

Yeah, unfortunately the label widget won’t keep it’s text when the gig file gets closed, even if it was saved before.
That’s why I had to use the knob widget’s value to jump to the corresponding preset list index. The presets are evenly distributed over the knob range, additionally they are arranged in alphabetical order… so every time the number of widgets is changed, the connection between widget value and preset index will most probably be messed up.
It would be different if one could store the presets name… but well…
Maybe with a text file? I think this could be a workaround.
Or you save all the presets you’ll need and after that you create variations and never change anything.
The open button was just mapped to the according plugin parameter.

Can this be used for more than just one plugin in the same rackspace?

That’s a crazy amount of plugins there. I think I will just use the first example for the instrument and open the gui for Infiltrator. I also use Filterverse,but it has preset mapping,so I will use a rotary knob for that. I use more plugins from Polyverse which soon will implement mapping of the presets to their older products. Thanks for helping out.

I’m on m1 max 64gb RAM. I think it would menage the amount of plugins but will try to do it easier way. It’s around 40°C where I’m at and my AC stopped working,therefore cannot realy fire up my macbook.

RAM usage isn’t affected by the plugin being bypassed or unwired— CPU is.

1 Like

Not wired though?

That’s crazy. I do improv so having set instances wouldn’t have workes for me. I think I will just stick with the rotary knob for the instrument .

Not sure ,if that would work for me. One instance of Triaz uses 60/70%CPU. I use plugins on each drum sound and then group them to a “bus”,with more plugins(limiters,compressor etc.)

Yeah. I’ve got many plugins in use. Many SSL compressors and limiters. The idea is to make fully polisged live improv music. Triaz is tge rackspace that uses most cpu. Rest is around 30%.

I use Dubler2. It’s a voice triggered midi controller. So when I beatbox I trigger drums(Triaz). When I hum I play any type of virtual 8nstrument. All that audio goes to an ipad and loops ( in LoopyPro). And then I can add all types of fx there to a looped audio. LoopyPro is very powerful. I’ve got chain of plugins on muster bus and stuff. It’s more of a psychadelic electronic downtempo/dub/edm kind of music ,that I make.

2 Likes

Yes. I’ve got audio 4c audio interface. 0 latency. It has dual usb ,which allows me to have audio goin from mac to ipad ,and ,if I want it, back to mac. I think that would create latency ,though. Never tried it that way.

This thread has been closed due to a new version of the rackspace!
Please follow the link in the initial posting for the follow up thread with the new version!
Thanks for your understanding!

1 Like