WASM Audio Engine Test

🎛️ Master Saturation

0.00

Adds harmonic distortion to the final audio output

⌨️ Keyboard Mapping

🥁
Kick Drum
Press A
A
🥁
Snare Drum
Press S
S
🔔
Hi-Hat
Press D
D
🥁
Tom Drum
Press F
F
💡 Click anywhere on the page to ensure keyboard focus, then press A, S, D, or F to trigger instruments

🥁 Kick Drum

50Hz
0.60
0.80s
0.70
0.80
0.30
0.60

Spectrum Analyzer

Inactive
Real-time frequency analysis of final audio output

16-Step Sequencer

WASM not loaded

Mixer

WASM not loaded

Spectrogram

Inactive
Time-frequency representation of audio output

Status:

WASM Stage: ❌ Not loaded

Kick Drum: ❌ Not loaded

Hi-Hat: ❌ Not loaded

Snare: ❌ Not loaded

Tom: ❌ Not loaded

Audio Context: ❌ No

Audio Playing: ❌ No

Engine API Demo:

  • Multi-instrument Stage: 4 oscillators with independent controls
  • Individual control: Trigger each instrument separately
  • Group control: Trigger all instruments simultaneously
  • Enable/disable: Toggle instruments on/off to mute/unmute individual instruments
  • Volume control: Adjust volume (0.0-1.0) for each instrument
  • Frequency control: Adjust frequency (50-2000Hz) for each instrument
  • Waveform control: Select waveform type (Sine, Square, Saw, Triangle, Ring Mod) for each instrument
  • Ring modulation: Modulator frequency control for Ring Mod waveform
  • ADSR envelope: Real-time Attack, Decay, Sustain, Release control per instrument
  • Release control: Manually trigger release phase for individual or all instruments
  • Kick Drum Instrument: Comprehensive 3-layer kick drum with sub-bass, punch, and click layers
  • Kick Presets: Built-in presets (Default, Punchy, Deep, Tight) for different kick styles
  • Kick Parameters: Frequency, punch, sub-bass, click, decay time, and pitch drop controls
  • Hi-Hat Instrument: Noise-based hi-hat with dual oscillators and envelope control
  • Hi-Hat Presets: 6 built-in presets (Closed Default, Open Default, Closed Tight, Open Bright, Closed Dark, Open Long)
  • Hi-Hat Parameters: Base frequency, resonance, brightness, decay time, attack time, volume, and open/closed mode
  • Snare Instrument: Comprehensive 3-layer snare drum with tonal, noise, and crack components
  • Snare Presets: Built-in presets (Default, Crispy, Deep, Tight, Fat) for different snare styles
  • Snare Parameters: Frequency, tonal amount, noise amount, crack amount, decay time, and pitch drop controls
  • Tom Instrument: Comprehensive tom drum with tonal and punch layers for realistic drum sounds
  • Tom Presets: Built-in presets (Default, High Tom, Mid Tom, Low Tom, Floor Tom) for different tom styles
  • Tom Parameters: Frequency, tonal amount, punch amount, decay time, and pitch drop controls
  • Audio mixing: Stage.tick() sums all instrument outputs with controls applied

Instructions:

  1. Click "Load Audio Engine" to initialize the WASM Stage with 4 oscillators, kick drum, hi-hat, snare, and tom
  2. Click "Start Audio" to begin audio processing
  3. 🎹 Keyboard Mapping: Use keyboard shortcuts for quick testing:
    • A → Trigger Kick Drum
    • S → Trigger Snare Drum
    • D → Trigger Hi-Hat
    • F → Trigger Cymbal
    • Toggle keyboard mapping on/off with the ON/OFF button
    • Visual feedback shows which keys are currently pressed
  4. Use individual instrument buttons to test single oscillators
  5. Adjust instrument controls for each oscillator:
    • Enable/Disable: Click ON/OFF button to mute/unmute individual instruments
    • Volume: Control relative volume of each instrument (0.0-1.0)
    • Frequency: Change the pitch of each instrument (50-2000Hz)
    • Waveform: Select tone quality (Sine, Square, Saw, Triangle, Ring Mod)
    • Modulator: Control modulator frequency for Ring Mod waveform (50-2000Hz)
  6. Adjust ADSR envelope controls to shape the sound envelope:
    • Attack: Time to reach full volume (0.001-2s)
    • Decay: Time to drop to sustain level (0.001-2s)
    • Sustain: Level held while triggered (0-1)
    • Release: Time to fade to silence (0.001-5s)
  7. Use "Release" buttons to manually trigger the release phase
  8. Use "Release All" to release all instruments simultaneously
  9. Use "Trigger All" to hear the mixed output of all instruments with all controls applied
  10. Test the comprehensive kick drum with its own dedicated section:
    • Presets: Try different kick styles (Default, Punchy, Deep, Tight)
    • Frequency: Adjust fundamental frequency (20-200Hz)
    • Punch: Control mid-range impact layer
    • Sub Bass: Control low-end presence
    • Click: Control high-frequency transient
    • Decay: Adjust overall decay time
    • Pitch Drop: Control frequency sweep effect
  11. Test the hi-hat instrument with its dedicated section:
    • Quick Triggers: Use preset buttons for instant testing (Closed, Open, Tight, Bright, Dark, Long)
    • Preset Selection: Choose from 6 different hi-hat styles in the dropdown
    • Base Frequency: Adjust the fundamental frequency (4000-16000Hz)
    • Brightness: Control high-frequency emphasis and transient sharpness
    • Resonance: Adjust metallic character and filter resonance
    • Decay Time: Control how long the hi-hat rings out
    • Attack Time: Adjust the initial transient speed
    • Open/Closed Toggle: Switch between open and closed hi-hat modes
  12. Test the snare drum instrument with its dedicated section:
    • Presets: Try different snare styles (Default, Crispy, Deep, Tight, Fat)
    • Frequency: Adjust fundamental frequency (100-600Hz)
    • Tonal Amount: Control the body and pitch component of the snare
    • Noise Amount: Control the main snare noise character
    • Crack Amount: Control high-frequency snap and crack
    • Decay Time: Adjust overall decay time (0.01-2s)
    • Pitch Drop: Control frequency sweep effect for realistic sound
  13. Test the tom drum instrument with its dedicated section:
    • Presets: Try different tom styles (Default, High Tom, Mid Tom, Low Tom, Floor Tom)
    • Frequency: Adjust fundamental frequency (60-400Hz)
    • Tonal Amount: Control the body and pitch component of the tom
    • Punch Amount: Control mid-range impact and attack character
    • Decay Time: Adjust overall decay time (0.05-3s)
    • Pitch Drop: Control frequency sweep effect for realistic tom sound