Page 1 of 1

Posted: 16 Dec 2018, 00:19
by x.iso
Here's what I'm trying to do. I have polyphonic patch that receives step index from step sequencer and normally I have Current voice = Current step comparison for sending trigger.
But now I'm thinking of polytrigger, which would add steps to current one (depending on max polytrigger value) or just activate random other triggers beside current step, all that would wrap around current number of steps in sequencer.

So that means I no longer can simply match one value to current voice and be done with it. Can't come up with efficient solution to that. I need a way to match more than one specific number to current voice and return 1 if any of the numbers match, 0 if none match. Maybe a script would do the job, but the numbers will change rapidly, don't know if it's suited for that. Also I'm not competent at coding.

Posted: 16 Dec 2018, 03:37
by 23fx23
by patch you could define an array with your wanted possible numbers. ie 3-7-8-11 ect, then use an equal math module and compare to input.
ie if input is 7 it will return you an array of 0,1,0,0,0 in ex case. then can use a sum array module out of that. if sum > 0 then that means it matched at least one of the requested numbers

Posted: 16 Dec 2018, 04:40
by x.iso
interesting, I've made a subpatch that checks each array's value match and outputs array of 1 and 0, then max value to filter if anything matched. turns out there's no need to do a subpatch?

Posted: 16 Dec 2018, 04:44
by x.iso
yes, just checked and that's exactly what I wanted. can't get it any simpler.
Thanks, 23fx23!

Posted: 16 Dec 2018, 07:26
by 23fx23
cool you're welcome. i could swear we had a 'find value in array' module wich could do it in one module but could not find it,. think it was a script so prob not more efficient.

Posted: 16 Dec 2018, 13:07
by oli_lab
maybe you can use "comma text get string index" with arrays ?

or wait till I make a " find index of value in array" ;-)

Posted: 16 Dec 2018, 18:47
by x.iso
find index of value in array
that's a bit different, but that would have it's own use.

I'm making a patch inspired by Intellijel Rainmaker. going to be an addon!
here's how it looked before solving this problem:
Image

Posted: 16 Dec 2018, 19:36
by oli_lab
check the addons and tell me if it's what you're looking for.

Posted: 18 Dec 2018, 17:59
by x.iso
oli_lab wrote:check the addons and tell me if it's what you're looking for.
I've checked and the only difference with equal module is that you can get amount of matches in one go. might be useful as well, just didn't think of use case yet.
for instance, if just 1 match it's a regular step trigger, if 2 matches, then make it accent step, if more then add fx or something. in that regard can be useful to cut down on 1 extra module per voice.

Posted: 19 Dec 2018, 15:07
by oli_lab
x.iso wrote:
oli_lab wrote:check the addons and tell me if it's what you're looking for.
I've checked and the only difference with equal module is that you can get amount of matches in one go. might be useful as well, just didn't think of use case yet.
for instance, if just 1 match it's a regular step trigger, if 2 matches, then make it accent step, if more then add fx or something. in that regard can be useful to cut down on 1 extra module per voice.
I think I didn't get what you were after in the first place !