What's new

PGS question - Controlling the "Unisono - Portamento" script

SonicZest

Member
In slot 1 is my GUI and in slot 2 is the default "Unisono - Portamento" script.

I would like a knob in slot 1 to control the Time knob (under the Portamento section) from slot 2's script.

What do I need to add to both scrips to make this work?

I've tried to follow the logic from this post, but with no success.

Thanks!
 
declare a PGS key in slot 1, and add an on pgs_changed section to the Unisono script to update Time when your PGS key is changed.
 
Thanks. The slot 1 button now moves the slot 2 button and vice versa.

However, when I move the slot 2 button I hear the effect. When I move the slot 1 button nothing happens. Is there something else I need to do to make sure they're both connected?
 
Here's what I've come up with for Slot 1. What do I need to change in the 'Unisono - Portamento' script in Slot 2?






on init
declare ui_knob $porta_combi_knob (0, 127, 1)
make_persistent($porta_combi_knob)
pgs_create_key(TME, 1)
end on

on ui_control ($porta_combi_knob)
pgs_set_key_val(TME, 0, $porta_combi_knob)
end on

on pgs_changed
if (pgs_key_exists(TME) and pgs_get_key_val(TME, 0) # $porta_combi_knob)
$porta_combi_knob := pgs_get_key_val(TME, 0)
end if
end on
 
You need to repeat whatever is in the on on ui_control (Time) in the Unisono script in the on pgs_changed area... so that when the PGS is received not only does it move the knob, but it does whatever that knob does as well.
 
Top Bottom