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

@ -144,10 +144,10 @@ func NewBytecode(patch sointu.Patch, featureSet FeatureSet, bpm int) (*Bytecode,
if unit.Parameters["highpass"] == 1 {
flags += 0x10
}
if unit.Parameters["negbandpass"] == 1 {
if unit.Parameters["bandpass"] == -1 {
flags += 0x08
}
if unit.Parameters["neghighpass"] == 1 {
if unit.Parameters["highpass"] == -1 {
flags += 0x04
}
b.op(opcode + p["stereo"])

View File

@ -182,13 +182,13 @@ su_op_filter_skipbandpass:
fadd dword [{{.WRK}}+4]
su_op_filter_skiphighpass:
{{- end}}
{{- if .SupportsParamValue "filter" "negbandpass" 1}}
{{- if .SupportsParamValue "filter" "bandpass" -1}}
test al, byte 0x08
jz short su_op_filter_skipnegbandpass
fsub dword [{{.WRK}}+8]
su_op_filter_skipnegbandpass:
{{- end}}
{{- if .SupportsParamValue "filter" "neghighpass" 1}}
{{- if .SupportsParamValue "filter" "highpass" -1}}
test al, byte 0x04
jz short su_op_filter_skipneghighpass
fsub dword [{{.WRK}}+4]

View File

@ -186,12 +186,12 @@
(local.set $retval (f32.add (local.get $retval) (local.get $high)))
))
{{- end}}
{{- if .SupportsParamValue "filter" "negbandpass" 1}}
{{- if .SupportsParamValue "filter" "bandpass" -1}}
(if (i32.and (local.get $flags) (i32.const 0x08)) (then
(local.set $retval (f32.sub (local.get $retval) (local.get $band)))
))
{{- end}}
{{- if .SupportsParamValue "filter" "neghighpass" 1}}
{{- if .SupportsParamValue "filter" "highpass" -1}}
(if (i32.and (local.get $flags) (i32.const 0x04)) (then
(local.set $retval (f32.sub (local.get $retval) (local.get $high)))
))

View File

@ -97,7 +97,7 @@ var defaultUnits = map[string]sointu.Unit{
"clip": {Type: "clip", Parameters: map[string]int{"stereo": 0}},
"hold": {Type: "hold", Parameters: map[string]int{"stereo": 0, "holdfreq": 64}},
"distort": {Type: "distort", Parameters: map[string]int{"stereo": 0, "drive": 64}},
"filter": {Type: "filter", Parameters: map[string]int{"stereo": 0, "frequency": 64, "resonance": 64, "lowpass": 1, "bandpass": 0, "highpass": 0, "negbandpass": 0, "neghighpass": 0}},
"filter": {Type: "filter", Parameters: map[string]int{"stereo": 0, "frequency": 64, "resonance": 64, "lowpass": 1, "bandpass": 0, "highpass": 0}},
"out": {Type: "out", Parameters: map[string]int{"stereo": 1, "gain": 64}},
"outaux": {Type: "outaux", Parameters: map[string]int{"stereo": 1, "outgain": 64, "auxgain": 64}},
"aux": {Type: "aux", Parameters: map[string]int{"stereo": 1, "gain": 64, "channel": 2}},