limited infinite notes
hi all,
my goal is to have infinite notes (AKA without note-offs) that do not retrig.
For instance I want note "40" to pass to my system, but only once.
If a second note "40" is sent, I do not want that note to be retriggered, it must be filtered out before it reached the note-out.
And yes, maybe I might want also note "52" to be triggered, but again, only once.
So If for whatever reason my system triggers again notes "40" or "52" they will be ignored.
Of course I do not know in advance which notes will be triggered, and how many of them.
But I want to be able to set a maximum of notes that can simultaneously play (let's say 2) AND if a third note is played (different from "40" and "52"), I want that note to be triggered BUT at the same time one of the first two notes that were playing needs to have a note-off. So in total I will always have my 2 notes, and not more than that.
Trivial, I thought. But it took me more time than I imagined to build something. And honestly I'm not very satisfied by the result. Too clunky, too many objects.
I attach the patch: what do you think?
How would you improve it?
Thanks!
hey!
the maximum number of notes is called "polyphony", you could check out the object "poly"
also, probably check out the repeatmode attribute of the makenote object, and the object ddg.mono
you might be able to do something simple with these few objects
hope this helps,
Florent
Thanks Florent,
as far as i know makenote does not have an option to trigger a note without a time-limit. It can be long, but cannot be infinite. That, I guess, is where makenote comes handy for most of the tasks .
As for poly, it does not really solve my issue. It retriggers note already being played, and also cannot deliver the other things I'm looking for. I do know those objects, and I'd be happy to be wrong, but as long as I know max objects none of them can do what i (not very proudly) built. *_*
But thanks anyway for the help! ;-)
sorry I thought I could help, quickly from the distance :)
your patch looks great
why do you use deferlow before your coll?
Thanks Florent ;-)
For my experience when in Overdrive with lots of things running it's a good habit to put deferlow before a coll if you want it to work properly. Thing is sometimes in small patches everything works flawlessly, but when you integrate them into more complex patches (like veery complex) they can trick on you with the priority queue and stuff.
This is also my case, actually.
I find that in real-case scenario I have some unpredictable results here and there.
Nothing really too serious, but I have time and I want to make it slicker and completely flawless.
That's why I asked this amazing community ;-)
I have an abstraction that allows only one of each note, so it's similar to what you're after. It uses a [table] to keep track of which notes are active - send a pitch to it and if that note's already stored don't output it. You could also just remove the note-off from the output of [makenote] to make a note's length infinite, and it's easy to make the note-off again if you need it.
As you said, though, what seems simple at first sometimes ends up taking more objects and time than you thought it would. ;-)
Hi Bill,
interesting, and how would you blacklist a value?
Would be nice to have a look! ;-)
You can build a list with the already played notes to filter repetitions and then use "poly 2"
This is the part that blacklists values...
But until opening my big mouth I didn't realise it tracks received values, not necessarily active ones. (It was made for live MIDI keyboard playing.) And it'd take a lot more to get it to meet your other requirements, and Pedro has already done a great job of that.
Except, AFAICT, the bit about how many infinite notes you might want. I thought 2 was just an example, and I don't think [poly] can be changed except with an argument, can it?
Another possibility is [bag]. By default it doesn't store duplicate, so it may do the job with "length" and "cut" messages.
A bit late to this party, but Borax could provide a(nother) way..
hey, it seems like you could use only zl objects and get rid of the coll. With zl stream, zl reg, and zl nth:
I am under the weather so I don't have time to double check everything but it seems like it's doing the job
This one, using [bag], seems to work, too. It makes notes available again after they've been stopped, but I don't know if that's what you want.
thanks a lot guys!
they all seem very good, and sleeker than mine!
will test them all today ;-)