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

@ -199,6 +199,10 @@ func (t *Tracker) KeyEvent(e key.Event, gtx C) {
t.ExportFloat().Do()
case "ExportInt16":
t.ExportInt16().Do()
case "SplitTrack":
t.SplitTrack().Do()
case "SplitInstrument":
t.SplitInstrument().Do()
// Booleans
case "PanicToggle":
t.Panic().Bool().Toggle()
@ -212,6 +216,8 @@ func (t *Tracker) KeyEvent(e key.Event, gtx C) {
t.Playing().Bool().Toggle()
case "InstrEnlargedToggle":
t.InstrEnlarged().Bool().Toggle()
case "LinkInstrTrackToggle":
t.LinkInstrTrack().Bool().Toggle()
case "CommentExpandedToggle":
t.CommentExpanded().Bool().Toggle()
case "FollowToggle":