Hmmm, not sure if you can expect a “fix” - essentially, Cantabile is working as designed. Loopback ports are an advanced feature - it is for good reasons that they need to be explicitly enabled, so I guess @brad expects people to know what they are doing. So when you feed an input port to its own loopback, it will create a massive load of MIDI events going round in circles at maximum speed - that will definitely completely overwhelm Cantabile’s engine.
It’s a bit like “oh, there is a loud noise when I hold my microphone in front of the speaker - can this be fixed?”
Sure, @brad could probably create a function that could detect a feedback cycle in MIDI routes, but that would probably come at a performance cost. I wouldn’t really want that…
I imagine (though not checked) you could cause the same issue by looping around midi inputs and outputs without the loopback.
I find it’s often easy to second-guess a developer (ex-developer, tech leader here), and to make incorrect assumptions around simplicity and impact of a fix. You might be right, but we could also both be wrong about the whole thing.
If you mean physically connecting MIDI inputs and outputs: there is at least the limited data rate of “classic” MIDI interfaces as a mitigating factor; still, creating a physical MIDI loop is also not advised - have experienced it completely lock down a synth setup (but easily resolved by pulling a cable ).
This is a known issue, logged here in a Trello list labelled “Unlikely” - which is a hint to how likely I am to fix it.
The problem is that detecting infinite loops here is really hard when you consider that any number of filters might be added to the MIDI stream as it passes through Cantabile. ie: if the events are changing each cycle it makes it really hard to determine if there is an event feedback type situation going on. There are heuristics that I could use to hint that something like this is going on, but I don’t like non-deterministic behaviour such as that.
No problem @brad, that what we had assumed. I guess the fix is for me not to be clumsy in future
I did wonder if an dedicated circular buffer with a bloom filter would be efficient (how big, how many buffers?), but then I’m going to stop because this is turning into a smug report