Stepping through parameter values

Hello - hoping someone can advise on the best way forward with this. I am using a plugin called Octavox from Eventide, which is a harmoniser. The plugin creates up to 8 harmonies (voices), and each one can be set to a musical interval up to 2 octaves above or below the original pitch. The way you do this on the plugin interface is to mouse click an up or down arrow, each click of the mouse increasing (or decreasing) the interval diatonically depending on the chosen key.
I would like to set this up in GP with a widget button to click up and a wider button to click down (that I can then map to two switches on a MIDI footswitch), but assigning a GP button to the plugin control has the effect of toggling the pitch between its maximum and minimum values. The pitch of the first voice is represented in the GP parameter list as 25 - but ‘pitch’ is all it offers, not pitch up or pitch down. A slider assigned to parameter 25 is able to select all available pitch values, but I can’t see how to ‘nudge’ a slider up and down with buttons as I guess that could be one way to do this?
Variations are theoretically possible but not practical as one voice would require 48 variations etc.

Any suggestions would be welcome :slight_smile:


If the plugin offers this parameter only as a continuous value, but you want to “step” through the value-range by using a fixed intervall, then i guess you’d have to use GP-Script.
I would connect a balance knob (+/- look) or a fader widget to the regarding parameter and then use two button widgets to control this knob/fader widget with GP-Script.
I guess one had to scale the widget range to the available parameter range and then calculate a useable stepwidth which a press of the buttons would add or subtract from the actual knob-widget’s value.

Are you planning to have up/down for all 8 voices, or only 1 of them?

potentially up to all 8, but in the build I have using this in MainStage I was using 4 voices

@schamass thanks - yes this could be the approach (if I knew how to script that is!!)
I have written down all the parameter values and they do appear to be increasing linearly by increments of 1/28th (albeit rounded to 6 or sometimes 7 decimal places)
Would you suggest I move this to the scripting forum area and request help there?

Will move this for you… no problem. I also think, that would be the better place for it.

Regarding the proposed approach and your wish to controll all 8 voices, it would mean that you’d have 8 knobs with two buttons for each… makes 16 buttons! How many switches does your pedal actually have? :thinking:

Thanks for moving the post - much appreciated - hopefully this is a relatively simple script.
Agreed that’s a lot of buttons! I would likely use 4 voices maximum so 8 buttons - my MIDI foot switch has 10 so all good there :+1:

1 Like

You can try this.
Octavox Pitch Incrementer.gig (217.4 KB)


@rank13 this is completely excellent - thank you so much!

Is there an easy way to add the following?

  1. A ‘reset’ button that sets all intervals to unison, and switches off all active voices - wondering if the easiest way to go here is to recall a preset that is set this way
  2. If the starting point is all voices at unison and ‘off’, then turn on the relevant voice as soon as you press either ‘Up’ or ‘Down’ for that voice

Really good to see a script like this from a learning pov - but I have a long way to go :slight_smile:

1 Like

OK so I had a go at answering my own questions - slow going but learning all the time…
I have added to the original script in a couple of places and would welcome any suggestions on how to improve this as it’s no doubt inefficient or just plain wrong :rofl: although it does the trick. The ‘Reset intervals and voice enables’ section from line 32 looks like it could use some basic looping - but not sure of syntax etc so any suggestions welcome :slight_smile:
Octavox Pitch Incrementer MW2.gig (279.9 KB)

You’ve done well with this :+1: Looping for your Reset is possible, particularly as you already have all of the widgets in an array.

// Reset intervals and voice enables
On WidgetValueChanged(newValue : double) from reset
    var i : integer
    If newValue == 1.0 Then
        For i = 0; i < Size(INTERVAL); i = i + 1 Do
            SetWidgetValue(INTERVAL[i], 0.5)
            SetWidgetValue(VOICE_ENABLES[i], 0.0)
1 Like

That’s awesome thanks. Great to have a simple example illustrating the syntax - much appreciated :slight_smile: