mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
feat(tracker): make shift + left/right take 1 octace / 12 semitone steps in oscillator transpose
Closes #37
This commit is contained in:
@ -296,7 +296,10 @@ func (t *Tracker) KeyEvent(w *app.Window, e key.Event) bool {
|
||||
case tracker.EditParameters:
|
||||
param, _ := t.Param(t.ParamIndex())
|
||||
if e.Modifiers.Contain(key.ModShift) {
|
||||
t.SetParam(param.Value - 16)
|
||||
p, err := t.Param(t.ParamIndex())
|
||||
if err == nil {
|
||||
t.SetParam(param.Value - p.LargeStep)
|
||||
}
|
||||
} else {
|
||||
t.SetParam(param.Value - 1)
|
||||
}
|
||||
@ -330,7 +333,10 @@ func (t *Tracker) KeyEvent(w *app.Window, e key.Event) bool {
|
||||
case tracker.EditParameters:
|
||||
param, _ := t.Param(t.ParamIndex())
|
||||
if e.Modifiers.Contain(key.ModShift) {
|
||||
t.SetParam(param.Value + 16)
|
||||
p, err := t.Param(t.ParamIndex())
|
||||
if err == nil {
|
||||
t.SetParam(param.Value + p.LargeStep)
|
||||
}
|
||||
} else {
|
||||
t.SetParam(param.Value + 1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user