is it possible to control a hidden ui_slider with another ui_slider?

2»

Comments

  • treynterrio
    treynterrio Member Posts: 64 Member

    how can I delete the value status on the bottom? Because nobody should see this when I sell this instrument at the end.

  • treynterrio
    treynterrio Member Posts: 64 Member

    I'm using these values now

    declare ui_slider $HIDDEN(0,198750)

    declare ui_slider $SLIDER1(0, 795000)

    the hidden slider goes now from 12db to 18db and goes down to 16.9db.

    I'm using a knob Image for this slider and its already done at ≈10 o clock. the slider starts at 7 o clock 0% and ends at 5 o clock 100%

    on ui_control ($SLIDER1)
        set_engine_par($ENGINE_PAR_VOLUME, $SLIDER1,2, -1, 0)
        set_engine_par($ENGINE_PAR_VOLUME, $SLIDER1,3, -1, 0)
        set_engine_par($ENGINE_PAR_VOLUME, $SLIDER1,4, -1, 0)
        set_engine_par($ENGINE_PAR_VOLUME, $SLIDER1,5, -1, 0)
        set_engine_par($ENGINE_PAR_VOLUME, abs($SLIDER1-1000000),0,-1,0)
        $HIDDEN:= $SLIDER1
        if ($HIDDEN<165000)
           $value := $HIDDEN
         else
           $value := 165000-($HIDDEN-165000)
         end if
         set_engine_par($ENGINE_PAR_GN_GAIN,629961+$value,-1,2,$NI_MAIN_BUS)
            ~valueHelper := int_to_real($SLIDER1) / 4.0
            $HIDDEN := real_to_int(~valueHelper)
            message("SLIDER1: " & $SLIDER1 & " Hidden Slider: " & $HIDDEN)
    end on
    

    this my code now but I don't get it where the problem is I'm working on this project for almost a year now and this is the last piece a the script that I need.

  • noY_T
    noY_T Member Posts: 37 Member

    I think I will need a detailed description of what you are trying to do here.

  • treynterrio
    treynterrio Member Posts: 64 Member
    edited September 2023

    I try to use this code that you've send me a couple days ago on the hidden slider.

    on init
     declare ui_knob $volume(0,165000*2,1)
     declare $value
    end on
    
    on ui_control($volume)
     if ($volume<165000)
       $value := $volume
     else
       $value := 165000-($volume-165000)
     end if
     set_engine_par($ENGINE_PAR_VOLUME,629961+$value,0,-1,-1)
    end on
    

    Because nothing worked for me but this could work great I think.

    The Hidden Slider should control the Gainer on Instrument Main FX ,-1,2,$NI_MAIN_BUS from 0db to 12db and at 50% from 12db back to 0 db.

    and Slider1 should control hidden slider and the Gain of Group 1 and one of the Groups (2-5) that is selected.

    (group1) from 6 db to -init and (one of the groups 2-5) from -init to 6.

    This is a mix slider that I want to use for blending in layers the problem is that both groups are at the same volume (-12db) at 50% its to quiet that's why I need this hidden knob that pushes the Volume with the Gainer while it goes up and goes down when the layer goes up again.

    The code I've send today works almost perfect only the hidden knob needs to work perfect but I don't get it.

    Like I said the the hidden slider goes from 12db to 18db and goes down to 16.9db and this happens in from 0 - 30% when when I turn the dial up.

  • EvilDragon
    EvilDragon Moderator Posts: 1,028 mod
    edited September 2023

    I think you're way overcomplicating this with hidden sliders and whatnot. You only need one slider to do the group mixing. This was answered in another thread already, so closing this one.

This discussion has been closed.
Back To Top