sointu/tracker/note_id.go
5684185+vsariola@users.noreply.github.com cd700ed954 feat!: implement vsti, along with various refactorings and api changes for it
The RPC and sync library mechanisms were removed for now; they never really worked and contained several obvious bugs. Need to consider if syncs are useful at all during the compose time, or just used during intro.
2023-05-13 17:56:13 +03:00

20 lines
522 B
Go

package tracker
// Describes a note triggered either a track or an instrument
// If Go had union or Either types, this would be it, but in absence
// those, this uses a boolean to define if the instrument is defined or the track
type NoteID struct {
IsInstr bool
Instr int
Track int
Note byte
}
func NoteIDInstr(instr int, note byte) NoteID {
return NoteID{IsInstr: true, Instr: instr, Note: note}
}
func NoteIDTrack(track int, note byte) NoteID {
return NoteID{IsInstr: false, Track: track, Note: note}
}