implement {Comp} threshold, ratio, attack, hold, release, makeup and mix methods

add new compressor subcommands to strip/bus command groups
This commit is contained in:
2026-02-04 05:22:47 +00:00
parent 2590a43c18
commit 86ff40952b
5 changed files with 780 additions and 0 deletions

View File

@@ -56,3 +56,13 @@ func toFixed(num float64, precision int) float64 {
output := math.Pow(10, float64(precision))
return float64(math.Round(num*output)) / output
}
// generic indexOf returns the index of elem in slice, or -1 if not found.
func indexOf[T comparable](slice []T, elem T) int {
for i, v := range slice {
if v == elem {
return i
}
}
return -1
}