Skip to content

Procedural Analog Drum Synthesis Overhaul - #141

Open
Pitrat-wav wants to merge 1 commit into
mainfrom
drum-synthesis-overhaul-5515558491695036899
Open

Procedural Analog Drum Synthesis Overhaul#141
Pitrat-wav wants to merge 1 commit into
mainfrom
drum-synthesis-overhaul-5515558491695036899

Conversation

@Pitrat-wav

Copy link
Copy Markdown
Owner

This PR overhauls the drum synthesis engine to align with the provided "Analog Drum Synthesis in Web Audio API" research. Key highlights include:

  1. TR-808 Kick: Implemented a bridged-T network emulation with a sine oscillator, aggressive pitch sweep, and a two-stage VCA envelope to capture authentic diode damping.
  2. TR-909 Kick: Features a triangle wave body with soft-clipping, dedicated noise/pulse click layers, and a deep pitch envelope.
  3. Snare Models: TR-808 uses parallel membrane modes (~238Hz/476Hz) and high-passed white noise. TR-909 utilizes triangle oscillators and an authentic 15-bit LFSR (Linear Feedback Shift Register) noise generator for digital texture.
  4. Hi-Hats & Cymbals: Faithfully recreated the 6-oscillator Schmitt trigger matrix with exact hardware frequencies and parallel bandpass filtering.
  5. DSP Utilities: Centralized noise generation (cached buffers) and cents-based pitch drift formulas.
  6. Performance & Stability: Added early-exit logic for zero-velocity triggers, explicit node disposal to prevent memory leaks, and bulk parameter synchronization between the store and audio engine.

The changes were verified to pass TypeScript checks and visual/rhythmic verification via Playwright.


PR created automatically by Jules for task 5515558491695036899 started by @Pitrat-wav

- Implemented procedural TR-808 and TR-909 synthesis models.
- Centralized DSP utilities in `DrumUtils.ts` (White Noise, LFSR, cents-based Pitch Drift).
- Added two-stage amplitude envelopes for authentic 808 Kick damping.
- Implemented 15-bit LFSR noise for TR-909 snappy components.
- Enhanced DrumMachine synchronization and added early velocity exits for performance.
- Verified with build and visual verification scripts.

Co-authored-by: Pitrat-wav <255843145+Pitrat-wav@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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