Dual Sequencers - How to Prioritize One Sequencer Output Over Another on the Same Step?
Dual sequencers, and on one step we have incoming C3 from one and C4 from the other. I want sequencer 2's note to be the one played every time. How to accomplish this?
You posted basically the same question here:
https://cycling74.com/forums/prioritize-one-of-two-note-streams-on-a-single-beat
The most experienced people from the forum answered you there and asked for more information. Probably should continue there.
— — —
You could probably detect if a note is coming in at sequencer 2 and filter out that note at sequencer 1 before it gets added to the noteout.
Otherwise it will be hard to accomplish this, since it will always be a matter of timing.
My try, for the sake of initiating the discussion, and learning something new, as so often on this forum :
In very simple situations, if notes 1 and 2 are sent together at (almost) the same time, like in the example below, even this very basic layout may suffice, because of the right to left priority rule :

You may also defer the first note with something like this :

Or, even :

Now, I'm pretty sure that more experienced contributors know situations where this doesn't work (in complex patches for instance). They simply don't want to misguide you ; that's the only reason why they are requesting your tentative patch.
(Edited)
Regarding message ordering there is this very important Tutorial:
https://docs.cycling74.com/max8/tutorials/basicchapter05?q=right%20to%20left
But I guess this won‘t work in this case, since there are two sequencers involed (probably live.step?), which have internal processes going on. I assume that messes up the timing.
But again, hard to tell without a patch.
Thank you Sebastien. How about if you have 3 bangs in a millisecond, how to turn it all into 1 bang? I looked at bang bang but that seems to just order the bangs.
You may try this :

(edited)
Or this:

Thanks. I need to clarify. Let's say you have a pulse every 4 counts, combined with a pulse every 2 counts combined with a pulse every 8 counts. You can see that 3 pulses coming in at the same time that would overlap in this scenario at the 8th count. Well, M4L is forwarding my sequencer 3 times in this scenario and I just want 1 pulse. So what I need is something that takes all pulses that arrive within a few milliseconds and makes 1 pulse out of it.
Ok. So, now, you should really send the patch you are referring to ;-)

So in this scenario, when the counter of 8 reaches 8, counter 2 and 4 will also send a bang. There will be 3 bangs and I want 1. If there were something that combines only the bangs arriving within a few milliseconds of each other it would do the job.

I want a drum to play on beat 8, one time, it plays 3 currently.
Something like this (NB counters go backwards in your patch) ?

Do you want different logic to apply on beat 4 than 8? (i.e. do you want two sounding beats or one sounding beat on beat 4 in your drawing)?
If only one, you could look at the [onebang] object, or just use a [gate] which opens for each beat and then closes after it gets a bang through.

Here is what I came up with. It seems to work on a cluster of notes to separate one out then that very bang resets the onebang after a millisecond, ready for the next single bang or cluster of bangs, filtering out clusters to one.
ah, now we have a patch.

so let´s give two very different answers, one theoretical, and one for problem solving.
1.)
when in max overdrive is turned on, the 3 bangs in these 3 connections from the metro object are guaranteed successive. successive in a way that absolulety nothing can happen between the execution of these 3 bangs. and that order now remains intact across all objects which follow.
if you connect a [print] to the [sel]s, you will see that this patch will always output "8, 4, 2, ..."
read the cycling article about order mentioned above, and then read it again in 3 months.
2.)
i would not do it using multiple counters.
why generate something twice, which is later never required?
you can create only the 1/8 beats and derive the slower ones from that.
to avoid doubles in parallel streams you had to filter them using a gate. a single stream only has to be routed onto the different outputs.
i am using [if] here to show the logic behind it. maybe someone wants to make him a more verbose and easier to read version.

if you do not like math, you can also use a [coll] to translate step number to where it should go and hook up what i call a "self gate".

(actually... [select 1 2 3] would do the same)
The [onebang] solution looks good, but is re-initiating it time-wise really secure ? I would rather propose something like this :

(pretty close to [buddy 3] btw)
But, as shown in your drawing, couldn't you consider that you just need to issue 1 bang every 7 bangs received ?

This may work, then :

@Roman : thanks for your "self gate" : very useful for messages different from bangs !
it is like route then, but you do not have to type 1-100 manually in the box :)
Sebastien, in my drawing looks like on beat 4 there is a near simultaneous bang, and these 3 trains of pulses are adjustable, meaning you won't really know all the combinations that result in near simultaneous bangs, so counting the bangs is out and I have to stay with my design of the one bang that resets itself. It is screening out all these cluster bangs and is much too fast in operation to miss beats.
If there are 3 really independent trains, then there isn't such a thing as "simultaneous bangs", in my opinion. But I guess you have now enough options to find a solution that suits your needs best.
if it were only for bangs, this is all it needs.

but I am sure next question would be :
"how do I let only this or that note from this or that sequencer through."
i am pretty sure you wanted to use thresh and not del.