feat(sointu): display compressor invgain and threshold in dB

This commit is contained in:
5684185+vsariola@users.noreply.github.com 2024-10-15 23:27:58 +03:00
parent 27b6bc57d2
commit 7b213bd8b0
2 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased] ## [Unreleased]
### Added ### Added
- Compressor displays threshold and invgain in dB
- Dragging mouse to select rectangles in the tables - Dragging mouse to select rectangles in the tables
- The standalone tracker can open a MIDI port for receiving MIDI notes - The standalone tracker can open a MIDI port for receiving MIDI notes
([#166][i166]) ([#166][i166])

View File

@ -123,8 +123,12 @@ var UnitTypes = map[string]([]UnitParameter){
{Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false}, {Name: "stereo", MinValue: 0, MaxValue: 1, CanSet: true, CanModulate: false},
{Name: "attack", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: compressorTimeDispFunc}, {Name: "attack", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: compressorTimeDispFunc},
{Name: "release", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: compressorTimeDispFunc}, {Name: "release", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: compressorTimeDispFunc},
{Name: "invgain", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, {Name: "invgain", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) {
{Name: "threshold", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true}, return strconv.FormatFloat(20*math.Log10(128/float64(v)), 'f', 2, 64), "dB"
}},
{Name: "threshold", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) {
return strconv.FormatFloat(20*math.Log10(float64(v)/128), 'f', 2, 64), "dB"
}},
{Name: "ratio", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(1 - float64(v)/128), "" }}}, {Name: "ratio", MinValue: 0, MaxValue: 128, CanSet: true, CanModulate: true, DisplayFunc: func(v int) (string, string) { return formatFloat(1 - float64(v)/128), "" }}},
"speed": []UnitParameter{}, "speed": []UnitParameter{},
"out": []UnitParameter{ "out": []UnitParameter{