feat: keeping instruments and tracks linked & splitting them

Also includes a refactoring of the List: all methods that accepted
or returned a [from, to] range now return a Range, which is
non-inclusive i.e. [start,end).

Also the assignUnitIds was slightly refactored & a new function
called assignUnitIdsForPatch was added, to assign all unit IDs for
an patch at once.

Closes #157, #163.
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-20 11:30:52 +03:00
parent 025f8832d9
commit 216cde2365
14 changed files with 675 additions and 284 deletions

View File

@ -73,7 +73,12 @@ func init() {
model, player := tracker.NewModelPlayer(cmd.MainSynther, NullMIDIContext{}, recoveryFile)
t := gioui.NewTracker(model)
tracker.Bool{BoolData: (*tracker.InstrEnlarged)(model)}.Set(true)
model.InstrEnlarged().Bool().Set(true)
// since the VST is usually working without any regard for the tracks
// until recording, disable the Instrument-Track linking by default
// because it might just confuse the user why instrument cannot be
// swapped/added etc.
model.LinkInstrTrack().Bool().Set(false)
go t.Main()
context := VSTIProcessContext{host: h}
buf := make(sointu.AudioBuffer, 1024)