mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-12 19:23:12 -05:00
change(tracker): midi controller value 64 maps to 64 in Sointu side
This commit is contained in:
parent
f2ef57a845
commit
cc8d737f8a
@ -243,7 +243,10 @@ func (m *MIDIModel) handleControlEvent(e ControlChange) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
newVal := (e.Value*(t.Max-t.Min)+63)/127 + t.Min
|
// +62 is chose so that the center position of a typical MIDI controller,
|
||||||
|
// which is 64, maps to 64 of a 0..128 range Sointu parameter. From there
|
||||||
|
// on, 65 maps to 66 and, importantly, 127 maps to 128.
|
||||||
|
newVal := (e.Value*(t.Max-t.Min)+62)/127 + t.Min
|
||||||
if m.d.Song.Patch[i].Units[u].Parameters[t.Param] == newVal {
|
if m.d.Song.Patch[i].Units[u].Parameters[t.Param] == newVal {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user