mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-20 23:23:23 -05:00
feat(tracker): ability to bind MIDI controllers to parameters
Closes #152
This commit is contained in:
parent
6e8acc8f9b
commit
f2ef57a845
@ -32,7 +32,7 @@ func (t *Keyboard[T]) Press(key T, ev tracker.NoteEvent) {
|
||||
ev.Source = t // set the source to this keyboard
|
||||
ev.On = true
|
||||
ev.Timestamp = t.now()
|
||||
if tracker.TrySend(t.broker.ToPlayer, any(ev)) {
|
||||
if tracker.TrySend(t.broker.ToPlayer, any(&ev)) {
|
||||
t.pressed[key] = ev
|
||||
}
|
||||
}
|
||||
@ -42,7 +42,7 @@ func (t *Keyboard[T]) Release(key T) {
|
||||
if ev, ok := t.pressed[key]; ok {
|
||||
ev.Timestamp = t.now()
|
||||
ev.On = false // the pressed contains the event we need to send to release the note
|
||||
tracker.TrySend(t.broker.ToPlayer, any(ev))
|
||||
tracker.TrySend(t.broker.ToPlayer, any(&ev))
|
||||
delete(t.pressed, key)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user