mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
feat: midi note input for the tracker
This commit is contained in:
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user