feat!: display the parameters as knobs in a grid

Also removed the negbandpass & neghighpass parameters
and replaced them with bandpass & highpass set to -1, to
fit the switches better to the GUI.

Closes #51, closes #173
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-26 10:38:38 +03:00
parent c3caa8de11
commit 666af9433e
116 changed files with 3663 additions and 2049 deletions

View File

@ -24,7 +24,7 @@ type (
clear(p Point)
set(p Point, value int)
add(rect Rect, delta int) (ok bool)
add(rect Rect, delta int, largestep bool) (ok bool)
marshal(rect Rect) (data []byte, ok bool)
unmarshalAtCursor(data []byte) (ok bool)
unmarshalRange(rect Rect, data []byte) (ok bool)
@ -135,9 +135,9 @@ func (v Table) Fill(value int) {
}
}
func (v Table) Add(delta int) {
func (v Table) Add(delta int, largeStep bool) {
defer v.change("Add", MinorChange)()
if !v.add(v.Range(), delta) {
if !v.add(v.Range(), delta, largeStep) {
v.cancel()
}
}
@ -227,7 +227,10 @@ func (m *Order) set(p Point, value int) {
m.d.Song.Score.Tracks[p.X].Order.Set(p.Y, value)
}
func (v *Order) add(rect Rect, delta int) (ok bool) {
func (v *Order) add(rect Rect, delta int, largeStep bool) (ok bool) {
if largeStep {
delta *= 8
}
for x := rect.TopLeft.X; x <= rect.BottomRight.X; x++ {
for y := rect.TopLeft.Y; y <= rect.BottomRight.Y; y++ {
if !v.add1(Point{x, y}, delta) {
@ -440,7 +443,10 @@ func (v *Notes) set(p Point, value int) {
v.SetValue(p, byte(value))
}
func (v *Notes) add(rect Rect, delta int) (ok bool) {
func (v *Notes) add(rect Rect, delta int, largeStep bool) (ok bool) {
if largeStep {
delta *= 12
}
for x := rect.BottomRight.X; x >= rect.TopLeft.X; x-- {
for y := rect.BottomRight.Y; y >= rect.TopLeft.Y; y-- {
if x < 0 || x >= len(v.d.Song.Score.Tracks) || y < 0 || y >= v.d.Song.Score.LengthInRows() {