As you may know I’ve been rebuilding Cantabile’s audio engine. Now that the work on the engine itself is pretty much done, I thought I’d start a new topic for the next phase of work.
New execution model with automatic graph node clustering
New thread pool implementation for more efficient spreading of load across multiple cores and better awareness of low-power e-cores.
New approach to MIDI handling (everything is now “pull” rather than “push”)
New real-time heap implementation
Simplified and improved internal transport position handling
Improved VST 3 plugin hosting - especially around parameter handling
Updates to the underlying C++ template classes
All internal string handling switched from utf-16 to utf-8
Lots of decoupling objects for easier unit testing
Some functionality that doesn’t belong in the engine moved out
Reworked logging framework
Comprehensive set of unit tests (over 1,500 tests in all)
Lots of code clean up and other miscellaneous refactoring
This next phase will be mostly integration testing. The first of these tests yesterday was a simple confidence test that the engine could start/run/shutdown.
Today:
integrated the engine logging services with the test bench
actually got it to produce sounds (metronome ticks) - watch video.
Sunday side project: updating the test bench to generate D2 node graph diagrams. They look good but highlighted some unpredictability with the node clustering algorithm which I’m going to have to revisit.
I feel the like integration tests weren’t really adding much - basically everything either just worked, or showed obvious bugs that would have shown up eventually anyway.
So I’ve decided to jump straight to phase III - which is updating Cantabile to the new engine. There’s three main layers to this:
Environment - the engine, audio driver, audio and midi port management and other lower level services. This is smallish area, but where the most technically significant changes will be.
Application - the main application level objects.- This is where songs, racks, bindings, plugin objects, media players etc… all live. This should be more mechanical work - just rearranging objects - but there’s lots of it.
User Interface - I bet you can’t guess what this is. This shouldn’t need much work.
Anyway, started on the Environment today and its going ok. It’s a bigger job than I hoped but I’m also deleting a lot of now redundant code thanks for the new engine’s simpler coding model.
Best of all… I’m mostly done with the C++ side of things now.