Note Volume

Discussion in 'Scripting Workshop' started by Paul Joyner, Mar 31, 2019.

  1. Paul Joyner

    Paul Joyner NI Product Owner

    Messages:
    44
    Good afternoon

    I'm creating a script to control individual note volume for a drum set and wondered if anyone could shed some light on parameters...

    Below is an extract from the script and where highlighted (in red) is there a recommended formula for the note level(s) such as -inf to 0dB?

    declare $ID
    declare ui_slider $vol_slider_1 (-45000,130)
    make_persistent ($vol_slider_1)
    move_control($vol_slider_1,1,2)

    $ID :=get_ui_id($vol_slider_1)
    set_control_par_str($ID, $CONTROL_PAR_PICTURE,"pv_urban_knob_orange")

    Any help/guidance always appreciated
     
  2. Lovechld2000

    Lovechld2000 NI Product Owner

    Messages:
    234
    most parameters like volume have an internal range of 0 to 1000000. Your settings in red look strange to me. to get 0db i think might be a value of 397222 if i remember correctly. so perhaps have your slider go from (0,1000000) for volume. Setting the slider's default to 397222 should make it go to 0 when you right click it. There are examples in the KSP manual. You should check it out.

    If you message out your volume slider while looking at the internal control, you can see what values from 0 to 1000000 match what is at -3 , or -10 or whatever in db on the internal control. Set up to message out your vol slider like this
    Code:
    on ui_control ($vol_slider_1)
      message($vol_slider_1)
    end on