Hi giuliomoro !
Thank you very much for your reply!
Since then I tried a lot of things but nothing helped... I`m afraid there can be a bottleneck with midi inside libpd.
I made two PD files to demonstrate it:
https://drive.google.com/open?id=1RVUkDswRqMm36hlHOZtqq1x5F3pFINHb
This patch is for Bela. It runs four of my adsr envelopes and outputs them on Analog 1-4. Each envelope has nine parameters and they are controlled by midi cc messages, so there are 36 ctlin objects too.
The purpose of this patch is to generate Amplitude- Pitch and Filter Envelopes for my eurorack modules.
https://drive.google.com/open?id=1t2wmndr3N-tOGAtF0RNzuGYQloFcc0dv
This is a remote patch for the _main.pd . You can tweak all parameters with hsliders. It has also a random note generator and a parameter randomizer.
So, if I execute the main patch on Bela everything goes well, it uses ~63% of CPU.
I can trigger the Envelopes with the remote patch, everyhing is OK and works as expected!
Then when I start to send midi CC messages everything goes crazy...
- the CPU usage rises with each midi CC message
- the console starts saying: Underrun detected: 1 blocks dropped
- in the same time the singnals on Analog 1-4 starts to drop out
- by time it gets lot worse
- with four envelopes CPU goes up to 90%
- if I do the same with a five envelope patch the IDE disconnects.
It looks like midi CC channels are eating up the CPU and Bela goes glitchy... :-(
I tested it with a two envelope patch (Amplitude and Pitch), and it went very well! I used it with the Mutable Instuments Braids module and I was very happy with the results, it produced the best kick-drums I`ve ever heard! :-) So I think the idea is good!
But my goal is to run 6-7 envelopes, 1-2 CC-to-CVs and 8 gate outputs in the same time.
And it needs to deal with very-very dense midi input, because when I perform music I have about 400-800 midi events per second!
Now I dropped PD and started to learn C++.
What do you think? Is it possible to do it with PD or C++ ?
I think my needs are not too big, but what do you think? Can I make it with Bela?
Thank you in advance!
Cheers
Adam