Skip to content

Add expanded Distortion, Tape Saturation, Soft Clipper and Bit Crusher windows - #95

Merged
chrislaupama merged 3 commits into
mainfrom
device-windows-9
Nov 15, 2026
Merged

chrislaupama merged 3 commits into
mainfrom
device-windows-9

Conversation

@chrislaupama

@chrislaupama chrislaupama commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

  • Distortion, Tape Saturation and Soft Clipper open a 960 pt window: the static transfer on a 48 dB square (sine peak out against sine peak in, from the core's distortion_transfer, tape_transfer and clipper_transfer), the gain it adds (or, for the Soft Clipper, what it clips off) lit against the dashed unity line, a dB ladder, axis and legend. Beside it, two cycles of a full-scale sine (dashed) and what the device makes of them. The caption reads the transfer at 0 dBFS (or the clipping). A vertical drag on the wave moves Drive (Input on the Soft Clipper), as on the card.
  • Bit Crusher's window draws one crushed cycle across the display with its caption "Rate 24.0 kHz and 256 levels"; dragging the picture sets Downsample and Bit Depth. Its card ends under the display with the meters beside.
  • One control card per device: Drive, Bias | Mode | Tone | Gain, Mix, Output; Drive, Compression | Mode | Warmth, Noise | Mix, Output; Input, Ceiling | Shape, Softness | Gain Match, Mix, Output; Bit Depth | Dither, Downsample, Jitter | Mix.
  • Tests: wave_windows_show_the_transfer_and_every_control, bitcrusher_window_reads_rate_and_levels, crush_caption_reads_rate_and_levels, plus the transfer and clipper law tests; all four added to the window bench.
  • The ladder and axis labels sit against the square, as on the other windows.
  • README, docs/devices.md and CHANGELOG updated.

Screenshots

Before After

Benchmark

bench_dynamics_windows (release, Linux cloud container), per build:

Device Card Window (first cut) Window (this PR)
Distortion 165.8 µs 781.7 µs 272.3 µs
Tape Saturation 159.2 µs 796.7 µs 262.3 µs
Soft Clipper 132.4 µs 1008.6 µs 295.3 µs
Bit Crusher 213.3 µs 339.4 µs 329.9 µs

The transfer is sampled at 49 input levels, each measured at the sine's two crests plus 8 points between, which brought the waveshaper windows to under 2x their card.

@chrislaupama
chrislaupama marked this pull request as ready for review November 15, 2026 23:49
@chrislaupama
chrislaupama merged commit 8c3498b into main Nov 15, 2026
13 checks passed
@chrislaupama
chrislaupama deleted the device-windows-9 branch November 15, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant