mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
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.
20 lines
522 B
Go
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}
|
|
}
|