feat(sointu, tracker, gioui): add a comment field to the instrument

This commit is contained in:
vsariola
2021-04-19 21:24:29 +03:00
parent 147e8a2513
commit 40d4d6576e
6 changed files with 183 additions and 129 deletions

View File

@ -3,6 +3,7 @@ package sointu
// Instrument includes a list of units consisting of the instrument, and the number of polyphonic voices for this instrument
type Instrument struct {
Name string `yaml:",omitempty"`
Comment string `yaml:",omitempty"`
NumVoices int
Units []Unit
}
@ -12,5 +13,5 @@ func (instr *Instrument) Copy() Instrument {
for i, u := range instr.Units {
units[i] = u.Copy()
}
return Instrument{Name: instr.Name, NumVoices: instr.NumVoices, Units: units}
return Instrument{Name: instr.Name, Comment: instr.Comment, NumVoices: instr.NumVoices, Units: units}
}