What's new

Simulated non repeating Round Robbin issue

jfino

Member
Hi Everyone!

I'm a bit stuck on this, any help would be amazing!

I'm trying to set up a simulated non repeating Round Robbin.

I have an array with a non repeating pattern.

I then Allow each RR group based on the Array.

I have counter which I placed on the on note Call back.

I have three mic positions.

Issue:

Group 1, 10 and 20 should play at the same time.
Works fine if I press one note.
As soon I press multiple notes, some times they play together and some times not.

What can I do?

Thanks for your help!


Code:
on note
ignore_event($EVENT_ID)

    if ($Counter = 50){reset counter}
        $Counter:=0
    end if
    inc ($Counter)


disallow_group($ALL_GROUPS)

    allow_group( %RRNoRepeatPattern[$Counter]) {Mic 1}
    allow_group( %RRNoRepeatPattern[$Counter]+10) {Mic 2}
    allow_group( %RRNoRepeatPattern[$Counter]+20) {Mic 3}

$New_ID_1 := play_note($EVENT_NOTE,$EVENT_VELOCITY, 0, -1)
end on
 

Lindon

VST/AU Developer
Hi Everyone!

I'm a bit stuck on this, any help would be amazing!

I'm trying to set up a simulated non repeating Round Robbin.

I have an array with a non repeating pattern.

I then Allow each RR group based on the Array.

I have counter which I placed on the on note Call back.

I have three mic positions.

Issue:

Group 1, 10 and 20 should play at the same time.
Works fine if I press one note.
As soon I press multiple notes, some times they play together and some times not.

What can I do?

Thanks for your help!


Code:
on note
ignore_event($EVENT_ID)

    if ($Counter = 50){reset counter}
        $Counter:=0
    end if
    inc ($Counter)


disallow_group($ALL_GROUPS)

    allow_group( %RRNoRepeatPattern[$Counter]) {Mic 1}
    allow_group( %RRNoRepeatPattern[$Counter]+10) {Mic 2}
    allow_group( %RRNoRepeatPattern[$Counter]+20) {Mic 3}

$New_ID_1 := play_note($EVENT_NOTE,$EVENT_VELOCITY, 0, -1)
end on
Well Counter is only ever going to equal 0 the first time a note is pressed , after that its always at least = 1

using Allow and disallow group for lots of notes played together might be causing some problems - try using set_event_par_arr() and see if that fixes it.

But your array work looks a bit awkward - and we dont know enough about the array itself to help much, how big is %RRNoRepeatPattern ? What values have you pre-assigned ?
 
Last edited:
OP
jfino

jfino

Member
Thanks so much for your reply Lindon!

I will try what you suggested today.

Maybe I'm approaching it the wrong way.
Here is the code with the array and message readout

Code:
on init
    
    declare $Counter :=1
    declare $New_ID_1
    declare %RRNoRepeatPattern[51] :=(...
{Group 0 is empty}  0,  1,2,3,4,5,6,7,8,9,10,...
                                   1,4,6,8,10,2,3,5,7,9,...
                                   4,8,2,5,9,1,6,10,3,7,...
                                   2,9,6,3,7,10,1,5,8,4,...
                                   6,7,1,8,2,3,10,5,4,9  )
    
    message ("Counter " & $Counter & "     Group Allowed " & %RRNoRepeatPattern[$Counter] )
    
end on

on note
    ignore_event($EVENT_ID)
    
    if ($Counter = 50){reset counter}
        $Counter:=0
    end if
    inc ($Counter)
    
    
    disallow_group($ALL_GROUPS)
    
    allow_group( %RRNoRepeatPattern[$Counter]) {Mic 1}
    allow_group( %RRNoRepeatPattern[$Counter]+10) {Mic 2}
    allow_group( %RRNoRepeatPattern[$Counter]+20) {Mic 3}
    
    $New_ID_1 := play_note($EVENT_NOTE,$EVENT_VELOCITY, 0, -1)
    
    message ("Counter " & $Counter & "     Group Allowed " & %RRNoRepeatPattern[$Counter] )
end on
 
Top Bottom