M4L poly~ CPU overload
I am getting over 300% CPU usage in Live when using a simple MIDI processing patch inside a 32 voice poly~.
What's puzzling is that the device runs perfectly when in preview mode but causes CPU overload in the normal device mode inside Live.
I would assume both preview mode and the device mode will consume a similar amount of resources.
Also please note that I have multicore settings disabled for the poly~ object so this factor should have no effect whatsoever.
I process no audio with the patch, just midi.
Any tips?
When I replace [poly~] with [poly] and manually create multiple instances of the same midi processing logic, the CPU usage goes down dramatically to around 7% per device in the same test scenario.
That being said, processing midi in M4L is still insanely expensive for what it does. Just awful performance all around.
If you could share an example, people might be able to comment further.
Keep in mind that "simple" operations can potentially yield a huge number of events. For example a MIDI delay line with feedback is able to generate thousands of MIDI events through feedback and can easily overwhelm a machine.
Ditto what Joshua said about example patch.
If you're doing only MIDI processing with poly~, out of curiosity is this MPE enabled? If so, that would have implications for poly~'s voice assignment preferences as well as functional voice count the device can handle.
Also, if you have up or downstream devices that do MPE I could see (speculatively) having too many voices as being problematic. (You haven't specified if this is a MIDI, Audio, or Instrument type device... ).
Asking because I've developed several MPE tools and there is a definitely correlation between simultaneous note-ons with high CPU usage --- but still far far below what you're reporting.