At the suggestion of @dave_dore and others, I finally got around to putting together some diagrams to illustrate how various parts of Cantabile fit together. They’re still a work in progress but they’re close (I think) and hopefully clarify some of Cantabile’s internal workings. As always, I’m open to suggestions and questions.
(In case you’re wondering these were drawn with draw.io - which I highly recommend for this sort of diagram)
- Shows relationship between the “Environment” and the set list, songs and racks.
- The environment consists of everything outside the loaded songs, racks and set lists and is loosely associated with the Options, but in particular the globally configured audio and MIDI ports.
- Shows the internal layout of a song or rack
- Not all parts are applicable to all cases. eg: racks don’t have a metronome and songs don’t have rack ports.
Thanks for these diagrams. I will be studying them. I checked out the diagram site, very cool.
Great diagrams! Interesting to see in the Song/Rack diagram that a song and a rack work pretty much identically as far as the routing is concerned.
Yep songs and racks are pretty much the same thing. In code, song and rack classes both derive from a common base class and the total difference between the two is only a couple hundred lines of code - mostly related to the port management on racks.
Question: On the diagram entitled Cantabile Environment I wondered how the Global rack connects to the various other components besides the Audio and MIDI ports? (SetList, Song, State …)
Really, it’s only indirectly through the MIDI assignments - that is, the MIDI assignments inside any rack have access to anything globally assignable. In the rack diagram you’ll see a comment “Assignments Control Many Different Objects” with arrows to some per-rack objects, but also there should be arrows to global settings.
Aside from that, the global rack really is it’s own standalone kinda thing (but may change over time)