Worklog for task "Create VoiceSynthesizer Temporal Scenario Visual Laboratory"

15 сент. 2026 г., 10:28:37

Brief progress: the current implementation needs to be rewritten from scratch

Actual testing showed that the current component cannot be considered a viable foundation for further sound experiments.

Main issues:

  • The audio architecture is fundamentally unsuitable for high-quality synthesis. Parameters are updated in chunks via Web Audio nodes during playback, whereas for controlled experimental synthesis, it is more logical to pre-calculate PCM/an array of sample values based on the entire timing logic and pass the ready buffer to the AudioContext for playback.
  • The current DSP itself is poorly structured: a sawtooth passes through three serially connected narrow bandpass-formant filters, which almost destroys the periodic part; meanwhile, the noise goes through a separate direct path.
  • The UI timeline and audio timeline effectively have different clocks. Loop, seek, pause/play, and real audio time do not form a single state machine.
  • Sound control via requestAnimationFrame (~60 Hz) is unsuitable for short acoustic events, bursts, and fast transitions; additional smoothing blurs the events even further.
  • The lifecycle of audio sources contains race conditions and inconsistent states: repeated Play works unreliably, Stop can lead to unexpected sound resumption, and old callbacks/source refs can outlive state changes.
  • There are far too many independent refs/states/hooks in the UI/UX responsible for parts of a single playback state. Instead, a single useReducer / finite state machine with explicit stopped/playing/paused states and deterministic transitions is needed.
  • The implementation report turned out to be significantly more optimistic than the actual behavior: the interface visually looks like a finished laboratory, but basic user scenarios like Play/Stop/Replay and the sound results themselves are unreliable.

Conclusion: piecemeal fixing of the current implementation is impractical. The component needs to be rewritten from scratch, keeping only the general idea of a visual laboratory: timeline, parameter tracks, keyframes, loop, and manual sound discovery. The new version should be built around a single state machine and the pre-calculation of the audio buffer from the scenario.

14.09.2026

An interactive multitrack editor for manual experimentation with synthesizer parameters over time, cyclic listening, and discovering interesting sounds.