Add vibrato support + fix feedback loop + GUI improvements

Vibrato (LFO frequency modulation):
- New VibratoSpec in SoundSpec: rate (Hz), depth (cents), delay (s)
- ChannelRenderer applies vibrato to frequency each tick
- Supported on Pulse and Triangle channels
- GUI: vibrato controls (enable, rate, depth) in channel panel
- Enables bird chirps, sirens, wobbles

Feedback loop fixes:
- generate_batch now accepts full SoundSpec array (not just names)
  so each sound is unique
- render_sound returns reference examples from feedback DB
- Fixed GUI bug: clicking stars no longer erases feedback text
- Feedback text auto-saves on Enter / focus loss
- Replaced emoji buttons (✓/🗑) with text (Save/Del)
- Green saved indicator when feedback exists in DB

99 tests passing, 0 warnings
This commit is contained in:
Emil
2026-06-21 23:54:25 +03:00
parent 3e2376ac26
commit 58c47fe286
12 changed files with 243 additions and 68 deletions
+6
View File
@@ -41,6 +41,7 @@ fn test_render_spec_to_wav_and_verify() {
release: 0.1,
}),
filter: None,
vibrato: None,
volume: 0.6,
pan: 0.0,
}],
@@ -141,6 +142,7 @@ fn test_json_spec_roundtrip() {
}),
q: 0.707,
}),
vibrato: None,
volume: 0.7,
pan: 0.0,
}],
@@ -170,6 +172,7 @@ fn test_wav_file_format_correct() {
release: 0.0,
}),
filter: None,
vibrato: None,
volume: 0.5,
pan: 0.0,
}],
@@ -204,6 +207,7 @@ fn test_multi_channel_render() {
frequency: FrequencyAutomation::fixed(440.0),
envelope: Some(EnvelopeSpec::default()),
filter: None,
vibrato: None,
volume: 0.5,
pan: -0.5,
},
@@ -211,6 +215,7 @@ fn test_multi_channel_render() {
frequency: FrequencyAutomation::fixed(220.0),
envelope: Some(EnvelopeSpec::default()),
filter: None,
vibrato: None,
volume: 0.4,
pan: 0.5,
},
@@ -219,6 +224,7 @@ fn test_multi_channel_render() {
frequency: 5000.0,
envelope: Some(EnvelopeSpec::default()),
filter: None,
vibrato: None,
volume: 0.3,
pan: 0.0,
},