feat: midi note input for the tracker

This commit is contained in:
qm210
2024-10-21 22:00:50 +02:00
committed by Veikko Sariola
parent 216cde2365
commit 8dfadacafe
17 changed files with 299 additions and 63 deletions

View File

@ -475,12 +475,12 @@ func (m *Model) ExportFloat() Action { return Allow(func() { m.dialog = ExportFl
func (m *Model) ExportInt16() Action { return Allow(func() { m.dialog = ExportInt16Explorer }) }
func (m *Model) SelectMidiInput(item MIDIDevice) Action {
return Allow(func() {
if err := item.Open(); err != nil {
message := fmt.Sprintf("Could not open MIDI device: %s", item)
m.Alerts().Add(message, Error)
} else {
if err := item.Open(); err == nil {
message := fmt.Sprintf("Opened MIDI device: %s", item)
m.Alerts().Add(message, Info)
} else {
message := fmt.Sprintf("Could not open MIDI device: %s", item)
m.Alerts().Add(message, Error)
}
})
}