diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-17 20:54:15 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-17 20:54:15 +0100 |
| commit | cfcd238044c7ce06dfdf1f9e08c3842bfa07979b (patch) | |
| tree | 12cd6da868c43af9c054bc44705326c1dae5f6de /tools/mq_editor/README.md | |
| parent | d151eb48b2c55d16a1d9caa6a7affb3e0793c3e7 (diff) | |
feat(mq_editor): Complete Phase 2 - JS synthesizer with STFT cache
Phase 2 - JS Synthesizer:
- Created mq_synth.js with replica oscillator bank
- Bezier curve evaluation (cubic De Casteljau algorithm)
- Replica synthesis: frequency spread, amplitude decay, phase jitter
- PCM buffer generation from extracted MQ partials
- Normalization to prevent clipping
- Key '1' plays synthesized audio, key '2' plays original
- Playback comparison with animated playhead
STFT Cache Optimization:
- Created STFTCache class in fft.js for pre-computed windowed FFT frames
- Clean interface: getFFT(t), getMagnitudeDB(t, freq), setHopSize()
- Pre-computes all frames on WAV load (eliminates redundant FFT calls)
- Dynamic cache update when hop size changes
- Shared across spectrogram, tooltip, and mini-spectrum viewer
- Significant performance improvement
Mini-Spectrum Viewer:
- Bottom-right overlay (200x100) matching spectral_editor style
- Real-time FFT display at playhead or mouse position
- 100-bar visualization with cyan-to-yellow gradient
- Updates during playback or mouse hover
Files:
- tools/mq_editor/mq_synth.js (new)
- tools/mq_editor/fft.js (STFTCache class added)
- tools/mq_editor/index.html (synthesis playback, cache integration)
- tools/mq_editor/viewer.js (cache-based rendering, spectrum viewer)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'tools/mq_editor/README.md')
| -rw-r--r-- | tools/mq_editor/README.md | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/mq_editor/README.md b/tools/mq_editor/README.md index 35e414c..1f43c19 100644 --- a/tools/mq_editor/README.md +++ b/tools/mq_editor/README.md @@ -41,8 +41,14 @@ open tools/mq_editor/index.html - [x] Mouse tooltip (time/frequency/dB intensity) - [x] Improved partial tracking (frequency-dependent threshold, candidate system) - [x] Original WAV playback with animated playhead - - [x] Keyboard shortcuts ('2' for playback) -- [ ] Phase 2: JS synthesizer (preview playback) + - [x] Keyboard shortcuts ('1' synthesized, '2' original) + - [x] Mini-spectrum viewer (bottom-right overlay) + - [x] STFT cache for optimized FFT access +- [x] Phase 2: JS synthesizer (preview playback) + - [x] Bezier curve evaluation (cubic) + - [x] Replica oscillator bank with frequency spread and jitter + - [x] PCM synthesis from extracted partials + - [x] Playback via Web Audio API - [ ] Phase 3: Editing UI (drag control points, replicas) - [ ] Phase 4: Export (.txt + C++ code generation) |
