1. Please do not install macOS 10.15 Catalina yet, as Native Instruments software and hardware products are not supported under macOS 10.15 yet. For more info, please go HERE!
    Dismiss Notice

Solved While loops and ui table

Discussion in 'Scripting Workshop' started by CK_S, Sep 11, 2019.

  1. CK_S

    CK_S NI Product Owner

    I had this script recently working as it expected but for one group only.Today i tried to make it affect a particular number of groups using while loops.
    The way i used works ok for me in other ui controls, but in this case i'ts not correct.

    For now it affects only the first group of the loop and for the other affects only the first step of the table

    First I tried to use a while loop and have all the commands inside but it didnt work neither.

    on note
    { part_1 TABLE  }
    case 0
    case 1
    case 2
    case 3
    end select
    case 0
    $CUR_GROUP :=1
    while( $CUR_GROUP<=50)
      set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,(%tablepart_1[0] * 10000),$CUR_GROUP,find_mod($CUR_GROUP,"CV_CUTOFF_part_1"),-1)
      while ($NOTE_HELD = 1)
      set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY,(%tablepart_1[$TABLE_STEPS_COUNT] * 10000),$CUR_GROUP,find_mod($CUR_GROUP,"CV_CUTOFF_part_1"),-1)
    if ($UIWaitTime # 0)
    end if
            if($TABLE_STEPS_COUNT >= $TABLE_STEPS)
                $TABLE_STEPS_COUNT := 0
            end if
    end while
    inc( $CUR_GROUP)
       end while
    case 1 ...etc.
    end select 
    end on
  2. CK_S

    CK_S NI Product Owner

    Wrong structure - solved
    Last edited: Sep 13, 2019