Pangoscript: two sliders in one rotary knob

Discussion in 'PangoScript, Universe and Midi Templates' started by RamonCC, May 24, 2016.

  1. RamonCC

    RamonCC Member

    Hi,

    I would like to share a little pangoscript code with you.
    There is not a lot of documentation about pangoscript, so I tried with trial and error.
    Maybe I can save some of you some time.
    If it is to simple for you, please ignore.-@

    I looked at this video: https://www.youtube.com/watch?v=7bhUniQIblk&list=PLYN8RZ0FldXF-i2zF_zoNkCZYgdxCpv8k&index=4
    and I wanted to implement this on my APC40 but I do not have spare sliders.
    I do not use (so far) the RED\BLUE\Green Rotary dials, so I use one of these.

    The updown and updown_shift sliders are very similair to eachother so I wanted to combine them into one knob, for easy transitions

    When the knob is at 12 o clock, both sliders are at zero.
    When turned to the left, updown slider is at 100%, when turned right updown_shift slider is at 100%
    I substract 0.5 so that it is easy to get the knob at exactly 12 o clock

    as Always, when the solution is found, the code is very easy.
    Make sure the previous assignments of the knob is removed.

    //Midi to Pangoscript:
    Sliders.UpDown.Value = (extvalue(-1,1)*-1)-0.05
    Sliders.UpDown_Shift.Value = (extvalue(-1,1))-0.05
     

Share This Page