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

I need help for simple round robin

Discussion in 'KONTAKT' started by eminsur, Sep 27, 2019.

  1. eminsur

    eminsur New Member

    Messages:
    1
    Hi,
    I have 10 groups in my script. I control these groups from two different menus. I have a problem: I need to use binary round robin in a menu. I have to use a triple round robin on the other menu. I need a very simple scrip. My script is below and thank you very much for your help.

    Code:
    on init
    
      declare ui_menu $group1
        add_menu_item($group1, "White", 1)
        add_menu_item($group1, "Black", 2)
    
      declare ui_menu $group2
        add_menu_item($group2, "Mate", 1)
        add_menu_item($group2, "Unmate", 2)
    
    make_persistent($group1)
    make_persistent($group2)
    
    end on
    
    on note
     
        select ($group1)
            case 1
            disallow_group(6)
            disallow_group(7)
            disallow_group(8)
            allow_group(0)
            allow_group(1)
            allow_group(9)
    
            case 2
            disallow_group(0)
            disallow_group(1)
            disallow_group(9)
            allow_group(6)
            allow_group(7)
            allow_group(8)
            end select     
    
    
        select ($group2)
            case 1
            disallow_group(4)
            disallow_group(5)
            allow_group(2)
            allow_group(3)
            case 2
            disallow_group(2)
            disallow_group(3)
            allow_group(4)
            allow_group(5)
        end select   
    end on
    
     
  2. mbietenholz

    mbietenholz NI Product Owner

    Messages:
    123
    I'm not quite sure what you want to achieve here: From what I can tell, your script doesn't do anything round robin (R-R), it just allows to select either groups 6,7,8 (white) or 0,1,9 (black) with one switch and 4,5 (mate) or 2,3 (unmate) with the other.

    If these groups were set up within Kontakt to be R-R they would presumably work that way, although I think within one Kontakt-instrument you cannot have both a 2-position and a 3-position R-R chains going simultaneously unless you script it yourself.

    If you want to script it yourself, the script has to do this separately for each chain: 1) increment a counter, rolling over when you reach the number of R-R positions, then 2) play (allow) the group in this chain corresponding to the counter value. You would have to fold the group-select logic for the black/white, mate-unmate switches together with that for the round robin chains to get both to work.