How Online Sample Chopping Works: Pads, Playback, and the Web Audio Engine
Sample chopping is the process of taking a recorded audio file and cutting it into shorter segments, then assigning each segment to a pad so it can be triggered independently. The technique is at the core of how producers build beats from breaks and loops. An Akai MPC in 1988 did this by letting you record audio into RAM and drop slice points manually. The same workflow runs in your browser today using the Web Audio API, with no hardware sampler and no DAW required.
This tool slices the audio into up to 16 pads. Each pad stores a start sample position, an end sample position, a gain value, a playback rate, and a play mode. When you trigger a pad, the tool creates a new AudioBufferSourceNode, sets its buffer to the original decoded audio, and calls .start(0, startTimeInSeconds, durationInSeconds). According to the MDN Web Docs on AudioBufferSourceNode, source nodes are single-use objects: once played, a new node must be created for the next trigger. The audio is never physically cut. You are playing a windowed region of the same in-memory buffer, which keeps the operation fast and non-destructive.
The Three Slice Modes
Auto (transient detection) uses spectral flux onset detection, the same algorithm described in Bello et al. (2005), "A Tutorial on Onset Detection in Music Signals". The audio is mixed to mono, split into overlapping 1024-sample frames with a 512-sample hop, each frame is Hann-windowed and transformed by a radix-2 FFT, and spectral flux is computed as the sum of positive magnitude differences between consecutive frames. Peaks in that curve above a rolling threshold mark the onset positions. This gives you a placement at each actual hit in the material, rather than at arbitrary time positions.
Even split ignores the audio content entirely and divides the file into a user-selected number of equal-length slices. A 2-second loop at 16 slices gives you 125 ms per pad. This is the right choice when the source material was recorded to a click track and every beat should land at a uniform position. It is also useful for breaking a one-shot chord stab into pitch variants you can rearrange.
Manual mode lets you click anywhere on the waveform to drop a slice marker. Markers are stored as fractions of the total file duration, so they are resolution-independent. When you click "Slice to Pads," the tool converts those fractional positions to sample indices and builds the pad array from them. Manual mode is best for material with irregular phrasing where automatic detection places too many or too few markers, and where you want surgical control over exactly where each pad starts.
Pad Playback and the QWERTY Layout
The 16-pad grid maps to a QWERTY keyboard shortcut layout modeled on the Koala Sampler and similar MPC-style interfaces. The top row of pads corresponds to the number keys 1 through 4. The second row is Q, W, E, R. The third row is A, S, D, F. The bottom row is Z, X, C, V. This layout groups four pads per finger row, so your left hand covers all 16 positions without moving far from home.
Each pad displays a mini waveform drawn from the slice region. This lets you see the shape of the audio before triggering it. A sharp attack on the waveform means the pad contains a transient hit. A sustained shape means the pad holds a longer tone or phrase. The duration in milliseconds is shown at the bottom of each pad.
Pitch control on each pad uses AudioBufferSourceNode.playbackRate. Setting the rate to 2.0 doubles the playback speed and raises the pitch by one octave. Setting it to 0.5 halves the speed and lowers the pitch by one octave. The exact semitone shift for a given multiplier follows the formula: semitones = 12 * log2(rate). A rate of 1.059 corresponds to exactly one semitone up. This is the same trade-off used by every hardware sampler that predates polyphonic time-stretching: pitch and duration are coupled unless you add a separate time-stretch algorithm.
Polyphony: Playing Multiple Pads at Once
Each pad maintains its own independent voice pool. Triggering pad 3 while pads 1 and 7 are still playing does not stop them. The tool tracks all active AudioBufferSourceNode instances per pad in a reference map and creates a new node on every trigger. One-shot pads stack: hitting the same pad twice before the first voice finishes gives you two overlapping voices. Loop pads replace their previous voice on re-trigger, which is the correct behavior for sustained chords where re-triggering should restart the loop rather than pile up layers.
High polyphony in a browser sampler is limited only by your device's CPU and the Web Audio API's node budget, which is in the hundreds of simultaneous nodes in Chrome and Firefox. In practical use, a 16-pad drum chop sequence produces at most 16 concurrent voices at any given step, well within that limit. After exporting your slices, the Beat Slicer gives you the same transient detection workflow with ZIP export for loading into hardware samplers.
One-Shot vs. Loop Mode
In one-shot mode, the pad plays the slice region once and stops. This is the standard behavior for drum hits and short samples. In loop mode, the tool sets source.loop = true along with loopStart and loopEnd to the boundaries of the slice. The pad plays continuously, making it useful for sustaining a chord, a bassline, or an ambient texture while triggering other pads on top of it.
Per-Pad Effects: Filter, Bit-Crusher, and Reverb
Each pad has its own independent effects chain inserted between the playback source and the audio destination. The chain runs in this order: gain, then an optional BiquadFilterNode, then an optional WaveShaper for bit-crushing, then a parallel reverb send.
Filter. The low-pass and high-pass modes use a BiquadFilterNode with a Q of 1.0. The cutoff frequency is adjustable from 80 Hz to 18 kHz. A low-pass at 800 Hz on a drum hit gives you a dull, distant thump. A high-pass at 4 kHz strips the body and leaves only the snap and presence. Because the filter is applied at playback time rather than to the stored buffer, you can change the cutoff live without re-slicing.
Bit-crusher. The crusher uses a WaveShaper node whose transfer curve quantizes the signal to a fixed number of amplitude levels, simulating the effect of lower bit depth. At 16 bits the shaper is bypassed. At 8 bits the audio takes on the texture of an early 90s sampler. At 4 bits you get the aggressive digital grit heard on a Roland SP-303 or a Boss SP-202. The curve is computed with Math.round(x * step) / step, where step = 2^(bits-1), which matches the rounding behavior of integer PCM conversion.
Reverb. The reverb is a convolution reverb built from a synthetic impulse response: white noise attenuated by an exponential decay curve, generated procedurally in a 1.5-second stereo buffer at the audio context's sample rate. Convolution reverb sounds more natural than algorithmic reverb at this level of complexity because it simulates the way a physical room reflects sound across all frequencies simultaneously. The reverb mix slider blends the dry signal (direct output) with the wet signal (convolved output) from 0 to 100 percent.
Step Sequencer
The sequencer is a 16-step x 16-pad grid. Each cell activates the corresponding pad on that step of the pattern. Playback runs at 16th-note resolution relative to your BPM setting (40 to 240 BPM). At 120 BPM, each step is 125 ms and one full 16-step pattern is 2 seconds, exactly one bar of 4/4.
The scheduler uses the same lookahead pattern described in Chris Wilson's Web Audio API scheduling article (web.dev). A setTimeout fires every 100 ms. Each time it fires, it schedules any steps that fall within the next 150 ms window using precise Web Audio time coordinates (AudioContext.currentTime), not wall-clock setTimeout delays. This separates the visual UI update (which can drift with JavaScript's event loop) from the audio scheduling (which runs on the audio thread with sample-accurate timing). The result is that your beats stay on the grid even when the browser tab is under CPU load.
Per-pad sequencer rows are independent: you can program the kick pad with a four-on-the-floor pattern, the snare pad with a 2/4 backbeat, and the hi-hat pad with an eighth-note pattern, all simultaneously. Each active cell at each step fires through the full per-pad effects chain, so your sequenced hi-hat can have a high-pass filter and your kick can have reverb, and those settings carry through to sequenced triggers just as they do to manual pad hits.
Skip-Back Recording
Skip-back recording continuously buffers your microphone using the browser's MediaRecorder API. Chunks arrive every 500 ms and are kept in a ring that holds the last 30 seconds. When you click "Grab and Chop," the tool concatenates the chunks from the last N seconds (you choose N from 1 to 30), decodes the resulting blob through AudioContext.decodeAudioData, and runs the auto-slicer on the decoded buffer. The result is a freshly chopped pad kit built from whatever you just played or sang, with no need to have pressed record first.
This mirrors the retrospective sampling feature on hardware units like the Elektron Digitakt and Roland SP-404 MK2. The practical use case is catching a spontaneous melody, chord stab, or drum improvisation that you played before you thought to record it. The microphone captures the room audio, which includes any audio playing through speakers, so you can chop live instrument performances without needing a direct input.
The browser will ask for microphone permission when you enable skip-back. No audio is transmitted to any server. The chunks are stored only in memory and cleared when you disable skip-back or close the tab. The feature requires a browser that supports MediaRecorder (Chrome, Firefox, Edge, and Safari 14.1 or later).
Practical Workflows for Producers
Chopping a drum break: Upload a drum loop, select Auto mode with sensitivity at 1.5 and minimum slice at 80 ms, and click "Slice to Pads." The kick, snare, and hi-hat hits each land on their own pad. Use the QWERTY shortcuts to bang out a new pattern from the individual hits. Export the ZIP, import into Ableton Live's Drum Rack, and build a beat from the chopped pieces.
Vocal chops: Upload a vocal phrase and set sensitivity higher (2.5 to 3.0) so the slicer catches only syllable onsets rather than subtle pitch movement within a held vowel. Each word or syllable gets its own pad. Trigger them in a different order to build the vocal chop effect common in house, UK garage, and neo-soul production. Adjust playback rate on individual pads to shift the pitch of selected syllables before exporting.
Melodic sample flips: Upload a short chord or melody loop and use Even Split with 8 or 16 slices. The pitches across the slices create a natural ascending or descending melodic motif depending on how the original sample was recorded. Rearrange the pad order in your DAW to compose a new melody from the pieces. Use the Key and BPM Finder first to confirm the key of the source sample so you can pitch the pads into a specific scale using the playback rate control.
Sound design: Upload a field recording, ambient texture, or long one-shot and manually place markers at interesting moments. Each pad becomes an isolated texture element. Use the pitch control to transpose pads into harmonic relationships before exporting the kit. The Pitch Shifter can process individual exported slices further if you need finer pitch control than the playback rate multiplier allows.
WAV Export and Format Notes
Each slice is exported as 16-bit PCM WAV. WAV is uncompressed and accepted by every sampler, DAW, and drum machine without a conversion step. MP3 or OGG would introduce codec artifacts at the start and end of each very short slice, which become audible as pre-echo or ringing when pads are triggered at fast tempos. The ZIP is built with STORE compression (no deflate), because audio data does not compress with general-purpose algorithms. This means the ZIP is generated instantly regardless of how many pads you have.
Files are named pad_01.wav, pad_02.wav, and so on, preserving the chronological order of the pads. When you drag the ZIP contents into Ableton's Drum Rack, NI Maschine, or any sampler with a folder-import feature, the pads load in the correct sequence. After loading, use the Audio Trimmer to fine-tune the start and end of any individual slice before bringing it into your final session.
Privacy and Browser Compatibility
No audio is uploaded to any server. The file is decoded entirely in the browser using the Web Audio API's AudioContext.decodeAudioData method, which supports WAV, MP3, OGG Vorbis, FLAC, and AAC in all major browsers. The spectral flux analysis, pad construction, playback, and WAV export all run as JavaScript in the browser tab. Nothing leaves your device unless you choose to download the ZIP.
Files above roughly 100 MB may take a few seconds to decode depending on your device's CPU speed. The transient detection run (the FFT analysis loop) processes the audio synchronously in a short setTimeout to keep the UI from freezing during the calculation. For very long files, use the Audio Trimmer to isolate the section you want to chop before running it through this tool.