Costumize Unison script

Discussion in 'Kontakt' started by Doctor Doubledrop, Sep 5, 2014.

  1. Doctor Doubledrop

    Doctor Doubledrop Noisemaker

    Joined:
    Dec 22, 2013
    Messages:
    51
    Likes Received:
    3
    Hi! I've make costums knobs for Unison (Voices-Detune-Spread) and I want to create the labels for the values.. but I don't know what's the Engine for those parameters.. anyone can tell me those?
    get_engine_par($ENGINE_PAR_??????)

    Thanks in advance!
     
  2.  
  3. Alraun

    Alraun Member

    Joined:
    Sep 17, 2012
    Messages:
    414
    Likes Received:
    13
    Hi Dr. Doubledrop, here's an example of an Unison X script:

    https://www.firedrive.com/file/06FA2E02E1979A44

    .............................................................................................................................................................................................................................................
    Edit: here's another version of the raw script. It's actually almost the same, but this one is more tidy - and therefore easier to read and modify.
    .............................................................................................................................................................................................................................................


    on init
    set_script_title("Unison X")
    make_perfview
    set_ui_height(8)
    message("")
    {-----------------------------UNISON X - DECLARATIONS-----------------------------------}

    {UNISON X - LABELS}

    declare ui_label $lb_UnisonX(1,1)
    declare ui_label $lb_Spread(1,1)
    declare ui_label $lb_Detune(1,1)
    declare ui_label $lb_Voices(1,1)
    set_text($lb_UnisonX,"U N I S O N X")
    set_text($lb_Spread,"S p r e a d")
    set_text($lb_Detune,"D e t u n e")
    set_text($lb_Voices,"V o i c e s")
    set_control_par(get_ui_id($lb_UnisonX),$CONTROL_PAR_FONT_TYPE,18)
    set_control_par(get_ui_id($lb_Spread),$CONTROL_PAR_FONT_TYPE,24)
    set_control_par(get_ui_id($lb_Detune),$CONTROL_PAR_FONT_TYPE,24)
    set_control_par(get_ui_id($lb_Voices),$CONTROL_PAR_FONT_TYPE,24)
    hide_part($lb_UnisonX,$HIDE_PART_BG)
    hide_part($lb_Spread,$HIDE_PART_BG)
    hide_part($lb_Detune,$HIDE_PART_BG)
    hide_part($lb_Voices,$HIDE_PART_BG)
    move_control_px($lb_UnisonX,220,170)
    move_control_px($lb_Spread,333,205)
    move_control_px($lb_Detune,220,205)
    move_control_px($lb_Voices,333,170)
    make_persistent($lb_UnisonX)
    make_persistent($lb_Spread)
    make_persistent($lb_Detune)
    make_persistent($lb_Voices)

    {UNISON X - CONTROLS}

    declare ui_value_edit $Spread(0, 100, 1)
    declare ui_value_edit $Detune(0, 50000, 100000)
    declare ui_value_edit $Voices(1, 8, 1)
    set_control_par_str(get_ui_id($Spread),$CONTROL_PAR_TEXT,"Val. Edit")
    set_control_par_str(get_ui_id($Detune),$CONTROL_PAR_TEXT,"Val. Edit")
    set_control_par_str(get_ui_id($Voices),$CONTROL_PAR_TEXT,"Val. Edit")
    set_control_par_str(get_ui_id($Spread),$CONTROL_PAR_PICTURE,"blackbox")
    set_control_par_str(get_ui_id($Detune),$CONTROL_PAR_PICTURE,"blackbox")
    set_control_par_str(get_ui_id($Voices),$CONTROL_PAR_PICTURE,"blackbox")
    $Spread := 100
    $Detune := 0
    $Voices := 1

    set_control_help($Spread,"Spread: Sets the amount of stereo spread among the voices")
    set_control_help($Detune,"Detune: Sets the amount of detuning among the voices.")
    set_control_help($Voices,"Voices: Sets the number of voices played for each MIDI note.")

    {UNISON X - DECLARE VOICE}

    declare $voice_1
    declare $voice_2
    declare $voice_3
    declare $voice_4
    declare $voice_5
    declare $voice_6
    declare $voice_7
    declare $voice_8

    end on

    {-----------------------------UNISON X - CALLBACKS-----------------------------------------}

    on note
    ignore_event($EVENT_ID)
    $voice_1 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    if ($Voices>1)
    change_pan($voice_1,$Spread,0)
    change_vol($voice_1,-500*$Voices,1)
    $voice_2 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    change_tune($voice_2,$Detune,0)
    change_pan($voice_2,-$Spread,0)
    change_vol($voice_2,-500*$Voices,1)
    end if
    if ($Voices>2)
    $voice_3 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    change_tune($voice_3,-$Detune/8*4,0)
    change_vol($voice_3,-500*$Voices,1)
    change_pan($voice_3,$Spread,0)
    end if
    if ($Voices>3)
    $voice_4 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    change_tune($voice_4,$Detune/8*4,0)
    change_pan($voice_4,-$Spread,0)
    change_vol($voice_4,-500*$Voices,1)
    end if
    if ($Voices>4)
    $voice_5 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    change_tune($voice_5,-$Detune/8*6,0)
    change_vol($voice_5,-500*$Voices,0)
    change_pan($voice_5,$Spread,1)
    end if
    if ($Voices>5)
    $voice_6 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    change_tune($voice_6,$Detune/8*6,0)
    change_pan($voice_6,-$Spread,0)
    change_vol($voice_6,-500*$Voices,1)
    end if
    if ($Voices>6)
    $voice_7 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    change_tune($voice_7,-$Detune/8*2,0)
    change_vol($voice_7,-500*$Voices,1)
    change_pan($voice_7,$Spread,0)
    end if
    if ($Voices>7)
    $voice_8 := play_note($EVENT_NOTE,$EVENT_VELOCITY,0,-1)
    change_tune($voice_8,$Detune/8*2,0)
    change_pan($voice_8,-$Spread,0)
    change_vol($voice_8,-500*$Voices,1)
    end if
    end on
    -------------------------------------------------------------------------------------

    May you do well! So long!
     
  4. Doctor Doubledrop

    Doctor Doubledrop Noisemaker

    Joined:
    Dec 22, 2013
    Messages:
    51
    Likes Received:
    3
    Hi Alraun! thanks as always! I've check your script and I see the edit one in the post.. nice sripts! however my goal is have 2 different label for each parameters.. for example for the voices one make a label for the knob and a label for the value..
     
Loading...
Similar Threads - Costumize Unison script Forum Date
Unison Bass Dragon Selling / Buying May 7, 2024
Is Unison Audio a scam? Software Reviews and Tutorials Oct 15, 2022
Unison's MIDI Wizard and Drum Monkey - The ALGORITHM ? Software Jul 6, 2022
See Unison Audio and other MIDI Pack scammers get flamed (funny) humor Sep 7, 2021
VSTi Guitar w. Unison tuning & Convincing Slide Software Oct 12, 2020
Loading...