Please be advised that due to scheduled infrastructure maintenance, we anticipate downtimes for the Native Instruments websites and Native Access on February 28, 2024 starting at 06:00 CET. For more details, click here.

Modstrip value change on switch press

StephanS90
StephanS90 Member Posts: 3 Member

Hi There,

i have a problem on my modswitch script. I want a switch to switch 2 Modstrips, between 2 Modstrip states. But it only works in one way. The "else" statment did not work but why? the functions in there are only for showing and hiding other switches.

Thx for your help

on ui_control($ModSwitch)

if ($ModSwitch = 1)

    call show_fade

    $count := $STARTGRP
    while ($count < $STARTGRP3)

        set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,10 +$ModSwitch*7/50,$count,find_mod($count,"CC_VOLUME"),-1)
        set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000 ,$count,find_mod($count,"CC_VOLUME_FADE"),-1)

    inc($count)
   end while

else

    $count := $STARTGRP
    while ($count < $STARTGRP3)

    call hide_all

        set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,1000000,$count,find_mod($count,"CC_VOLUME"),-1)
        set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,10 +$ModSwitch*7/50 ,$count,find_mod($count,"CC_VOLUME_FADE"),-1)

    inc($count)
    wait(1000*1000)
    end while
end if
end on 

Answers

  • John Forester
    John Forester Member Posts: 5 Member

    may be see : on persistence_changed with a select function

  • StephanS90
    StephanS90 Member Posts: 3 Member

    Hi John thanx for your answer.

    What do you mean with a select function?

    cheeres Stephan

  • StephanS90
    StephanS90 Member Posts: 3 Member

    Any other ideas? I think i have an error somewhere in the code but i do not get it right.

    I would be grateful for help. Thx

Back To Top