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

@ -171,6 +171,14 @@ func (m *Model) SetInstrumentName(name string) {
m.song.Patch[m.instrIndex].Name = name
}
func (m *Model) SetInstrumentComment(comment string) {
if m.Instrument().Comment == comment {
return
}
m.saveUndo("SetInstrumentComment", 10)
m.song.Patch[m.instrIndex].Comment = comment
}
func (m *Model) SetBPM(value int) {
if value < 1 {
value = 1