Discussion:
[Lmuse-user] Fixed slow midi controls with large audio periods
termtech
2017-01-09 21:32:46 UTC
Permalink
Hi, I fixed a long standing annoyance:
The midi strip controls were much too slow with large audio periods.
For example with Jack buffer size of 1024 or 2048, the controls were
painfully slow.

That's because they waited for /each/ change to be affected by
the audio thread.

I have now decoupled them from the audio thread with a ring buffer.
They are very fast like the audio controls now.

ChangeLog:

- FIXED: Midi strip controls much too slow with large audio (Jack) period.

- Created and installed new template class 'LockFreeBuffer<T>' to
replace clumsy per-type / fixed capacity multiple implementations.
Works with ANY type, and capacity can be set per-instance.

[That should encourage much more easy drop-in usage of FIFOs in the
future, instead of the clumsy per-type multiple implementations.]

- Replaced 'waiting' calls of midi strip controls, with this new
LockFreeBuffer<T>. Midi controls are now fast and smooth,
like audio controls, even at high Jack periods.

- TODO: Fix midi controller graphs much too slow as well!

[That's going to take some heavy effort. Stay tuned...]

Meanwhile, try out the midi strip controls. Lemme know if any trouble.
Seems to test OK so far, no concurrency-related crashes after heavy use.

Tim.

Loading...