1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Controlling Multiple Insert Effects in 1 Tab

Discussion in 'Scripting Workshop' started by Declan Satterthwaite, Apr 10, 2014.

  1. Declan Satterthwaite

    Declan Satterthwaite New Member

    Messages:
    4
    Hi Again,
    how is it possible to control three insert effects within 1 tab. I have written the script below which allows me to control certain reverb controls however, once I put the extra script in to control 'Distortion' and 'Delay' there were "parse Error's" all over the script.
    I have seen that it is maybe somehow possible to use a 'while loop' in a previous thread but iI am unsure of how and where to use this command. I also don't understand how it is written. Below is the script so far:

    Code:
    on init
        message ("")
        make_perfview
        set_ui_height_px (500)
    set_skin_offset (600)
     
    {Knob Declaration's}
    {Reverb}
    declare ui_knob $Size (1,1000000,1)
    declare ui_knob $Colour (0,1000000,1)
    declare ui_knob $DampingRev (0,1000000,1)
    declare ui_knob $Dry (0,1000000,1)
    declare ui_knob $Wet (0,1000000,1)
    
    {REVERB}
        {Reverb Parameters}
     
        declare !reverbcontrols[7]
        !reverbcontrols[1] := $Size
        !reverbcontrols[2] := $Colour
        !reverbcontrols[3] := $DampingRev
        !reverbcontrols[5] := $Dry
        !reverbcontrols[6] := $Wet
     
        {Move Control's}
        move_control_px ($Size, 12,393)
        move_control_px ($Colour, 105,393)
        move_control_px($DampingRev, 60,455)
    
        move_control_px($Dry, 12,300)
        move_control_px($Wet, 105,300)
        {Text}
    
        set_text($Size,"Size")
        set_text($Colour,"Colour")
        set_text($DampingRev,"Damping")
        set_text($Dry,"Dry")
        set_text($Wet,"Wet")
    
     
    {Setting Knob Label's}
        set_knob_label($Size,get_engine_par_disp($ENGINE_PAR_RV_SIZE, -1,0,1))
        set_knob_label($Colour,get_engine_par_disp($ENGINE_PAR_RV_COLOUR, -1,0,1))
        set_knob_label($DampingRev,get_engine_par_disp($ENGINE_PAR_RV_DAMPING, -1,0,1))
    
        set_knob_label($Dry,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL, -1,0,1))
        set_knob_label($Wet,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, -1,0,1))
     
        {Reverb Param's}
        set_engine_par($ENGINE_PAR_RV_SIZE,$Size, -1,0,1)
        set_engine_par($ENGINE_PAR_RV_COLOUR,$Colour, -1,0,1)
        set_engine_par($ENGINE_PAR_RV_DAMPING,$DampingRev, -1,0,1)
        set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,$Dry, -1,0,1)
        set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,$Wet, -1,0,1)
     
    end on
    {Ui_Control's}
    on ui_control ($Size)
        set_engine_par($ENGINE_PAR_RV_SIZE,$Size, -1,0,1)
        set_knob_label($Size,get_engine_par_disp($ENGINE_PAR_RV_SIZE, -1,0,1))
    
    end on
    on ui_control ($Colour)
    
        set_engine_par($ENGINE_PAR_RV_COLOUR,$Colour, -1,0,1)
        set_knob_label($Colour,get_engine_par_disp($ENGINE_PAR_RV_COLOUR, -1,0,1))
    
    end on
    on ui_control ($DampingRev)
        set_engine_par($ENGINE_PAR_RV_DAMPING,$DampingRev, -1,0,1)
        set_knob_label($DampingRev,get_engine_par_disp($ENGINE_PAR_RV_DAMPING, -1,0,1))
    end on
    
    on ui_control ($Dry)
        set_engine_par($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL,$Dry, -1,0,1)
        set_knob_label($Dry,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_DRY_LEVEL, -1,0,1))
    end on
    on ui_control ($Wet)
        set_engine_par($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN,$Wet, -1,0,1)
        set_knob_label($Wet,get_engine_par_disp($ENGINE_PAR_SEND_EFFECT_OUTPUT_GAIN, 1,0,1))
    end on
    
    Can you help me with this problem?
    Thanks alot
     
  2. Claudiosky90

    Claudiosky90 New Member

    Messages:
    16
    i'm not sure but i know that you can control the effect just one bye one slots, and manually.
     
  3. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    I see no reason why it wouldn't work - unless you were really not careful enough about slot IDs and stuff like that.

    By the way, I would definitely limit the dry and wet control ranges in your script... you don't want them going to +24 dB as that would clip the hell out of the audio output. Declare them as (0,397000) so they go from -oo to 0 dB.

    Also you have an error in the last line of $Wet ui_control callback, it should be -1,0,1, not 1,0,-1. :)

    !reverbcontrols[] array is useless, you can remove it. Also, use set_knob_unit() to add markings to knobs ($KNOB_UNIT_DB for dry/wet, $KNOB_UNIT_PERCENT for the rest.
     
  4. GeorgeWare

    GeorgeWare NI Product Owner

    Messages:
    65
    How can I add Pre Dly and Stereo to this script?
    BTW EvilDragon you are one SMOOTH GUY thanks for all your help!
     
  5. GeorgeWare

    GeorgeWare NI Product Owner

    Messages:
    65
    >How can I add Pre Dly and Stereo to this script?
    I got it...Now I'm trying to add a Reverb (preset) type drop down menu