Is there a way to limit the number of instances of a poly~ object that can be active at one time?
I don’t know of a very immediate way, but you can use the mutemap message to know which voices are on, and [zl sum] to check if they’re below the threshold. then you take your actions according to that…
This number is just the number of voices, isn’t it? Message voices 5 limits the number of instances to 5. Or by "active", do you mean "busy"?
I mean, what if I create a sample synth that uses long samples from a pedal depressed grand piano pitch adjusted with gizmo. I design it with a poly object, I get it to mute the unused notes so that it doesn’t completely demolish the cpu and it plays OK. Then someone does a glissando all the way up the keyboard and all the notes are decaying at the same time.
Maybe the best thing to do is keep track of the number of busy instances with the busymap, and dynamically adjust the latency when the number gets over some limit. Any ideas how to do that?
C74 RSS Feed | © Copyright Cycling '74