mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
feat(tracker): add support for a MIDI controller to the standalone tracker
Closes #132.
This commit is contained in:
committed by
5684185+vsariola@users.noreply.github.com
parent
9779beee99
commit
577265b250
@ -1,6 +1,7 @@
|
||||
package tracker
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/vsariola/sointu"
|
||||
@ -444,6 +445,14 @@ func (m *Model) Cancel() Action { return Allow(func() { m.dialog = NoDialog
|
||||
func (m *Model) Export() Action { return Allow(func() { m.dialog = Export }) }
|
||||
func (m *Model) ExportFloat() Action { return Allow(func() { m.dialog = ExportFloatExplorer }) }
|
||||
func (m *Model) ExportInt16() Action { return Allow(func() { m.dialog = ExportInt16Explorer }) }
|
||||
func (m *Model) SelectMidiInput(item MIDIDevicer) Action {
|
||||
return Allow(func() {
|
||||
if !m.MIDI.OpenInputDevice(item) {
|
||||
message := fmt.Sprintf("Could not open MIDI device %s\n", item)
|
||||
m.Alerts().Add(message, Error)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (m *Model) completeAction(checkSave bool) {
|
||||
if checkSave && m.d.ChangedSinceSave {
|
||||
|
Reference in New Issue
Block a user