A wrong-looking result from an online drum machine usually traces to one of four causes: leftover cells from the previous pattern, a tempo entered outside the strict 40 to 240 BPM range, an AudioContext left running across edits, or a throttled browser tab. The Online Drum Machine exposes every input that drives the sound — the kick, snare, and hi-hat cells, a strict 40 to 240 BPM field, and Play, Stop, and Clear pattern controls — so every wrong-looking output can be traced to one of those four places and repaired on the spot. Because the tool runs entirely in the browser with synthesized voices, there is no upload to retry and no server queue to clear; you only need to know which control is responsible for the symptom you see. The rest of this guide walks through the symptoms, the matching fix, and the small set of things the tool deliberately does not support.

What "Wrong" Usually Looks Like in a Drum Machine Result
Before diving into fixes, name the symptoms so the right repair matches the right problem. Most reader reports fall into one of five buckets: the rhythm plays but the wrong instruments fire on the wrong steps, the rhythm sounds faster or slower than the BPM number entered, the grid looks empty when it should not, the play indicator is stuck, or one of the three voices is silent while the others work. Each symptom maps to a specific cause inside the tool and a specific repair.
If kick and snare swap, or a hi-hat lands where a kick was, the pattern was probably hand-edited at speed without watching the moving step outline, or the cells were toggled while the previous loop was still playing and the ear mixed two passes together. If the rhythm speeds up or slows down after a tempo edit, the BPM field probably held a fraction, a sign, or a number outside the 40 to 240 range, which the input rejects with a recoverable message. If the grid is blank but you did not press Clear, every active cell may have been toggled off by clicking through the pattern; the 48 on and off booleans are still in memory, just none set to true. If the play indicator freezes, the AudioContext is likely suspended because the tab was throttled or the browser required a fresh user gesture. If only one voice is silent, the snare or hi-hat noise buffer for that step was probably muted by a single toggle on a row you did not intend to clear.
| Symptom | Likely cause | First fix to try |
|---|---|---|
| Wrong instrument on the wrong step | Cells toggled while a previous loop was still playing | Stop, clear, rebuild one row at a time |
| Rhythm faster or slower than the BPM shown | Tempo field holds a fraction, sign, or value outside 40 to 240 | Re-enter a whole number from 40 to 240 |
| Grid appears empty but you did not clear it | All 48 cells toggled to off while building | Use Clear pattern, then rebuild from the starting example |
| Play indicator frozen or stalled | Tab throttled, hidden, or AudioContext suspended | Stop, foreground the tab, then Play |
| Only one voice silent, others fine | One row of cells toggled off by accident | Rebuild that single row, then Play |
This symptom-to-cause pairing is the spine of the rest of the article: every later section maps to one of these buckets.
Clear the Grid and Reset to a Clean Baseline
When the wrong result has too many possible causes to pin down, the cleanest repair is to wipe the grid and start over from a known starting pattern. The Online Drum Machine has a Clear pattern control that turns off all 48 cells — three tracks of sixteen booleans each — without changing the BPM value. Use Clear whenever the pattern no longer matches what you remember editing, or when you want to test whether the tempo and the audio path still work before adding notes back in.
After Clear, the grid is silent. The tool still remembers the BPM, so you can press Play to confirm the AudioContext is alive and the scheduler is advancing the step outline. If the outline moves through all sixteen steps at the expected rate, the audio path is healthy and the bad result was inside the pattern, not the timing layer. From there, re-enable cells one row at a time, listen after each row, and the cause of the earlier wrong-looking result usually becomes obvious: a cell was off when it should have been on, or vice versa.
Clear is also the right move before switching genres or before a long session of small edits. A clean grid plus a single whole-number BPM between 40 and 240 is the documented baseline the scheduler expects. Anything that drifts away from that baseline tends to show up first as a wrong-looking result, and Clear is the fastest way back to a known state.
Rebuild the Pattern One Step at a Time
The repair path that maps to the actual controls on the page. Follow this ordered list any time the output does not match the input you typed.
- Press Clear pattern to turn all 48 cells off, leaving the BPM value untouched.
- Click the four kick cells on quarter-note positions 1, 5, 9, and 13 to rebuild a four-on-the-floor kick layer.
- Click the snare cells on beats two and four, which sit at steps 5 and 13 in the snare row.
- Click every other hi-hat cell — steps 1, 3, 5, 7, 9, 11, 13, and 15 — to rebuild closed hi-hat on the eighth notes.
- Press Play and watch the moving step outline; if a step fires the wrong instrument, click that cell again to remove it, or click the missing cell to add it.
- If the rebuild still sounds off, press Stop, wait one second, then press Play again to reseat the AudioContext before the next edit.
Each of these steps maps to a control that exists on the page. The grid is always four quarter-note beats divided into sixteen equal sixteenth-note steps, so the step numbers never move as you change tempo; only the playback speed changes. The starting pattern of kick on 1, 5, 9, and 13, snare on 5 and 13, and closed hi-hat on the odd steps is the example shipped on first open, so rebuilding to that shape is a quick way to confirm the tool is working before you customise further.
Fix Tempo and Timing Errors
Tempo problems are the second most common source of wrong results. The BPM control accepts only whole decimal values from 40 to 240; empty input, decimal fractions, signs, exponent notation, and values outside the range raise a recoverable error and the previous tempo is preserved. If the rhythm sounds too fast, the BPM field probably contains a number above 240, or a previous edit slipped a decimal point in. If the rhythm sounds too slow, the value may be below 40, or you may have read the field as one number while the page accepted another.
The contract for tempo follows the MusicXML sound element, where BPM means quarter notes per minute. The grid splits each quarter into four equal sixteenth-note steps, so each step lasts 60 ÷ BPM ÷ 4 seconds. As a single worked example, at 120 BPM the math is 60 ÷ 120 ÷ 4, which equals 0.5 ÷ 4, which equals 0.125 seconds per step, and the full sixteen-step bar is 16 times that, or 2 seconds. The full bar is exactly 16 × 60 ÷ BPM ÷ 4 = 240 ÷ BPM seconds. At the lower 40 BPM boundary, each step is 0.375 seconds and the bar is 6 seconds long. At the upper 240 BPM boundary, each step is 0.0625 seconds and the bar is 1 second. If the audible rhythm does not match the BPM you typed, walk the field through these anchor tempos to confirm the scheduler is responsive before customising further. For deeper math on scheduling windows and timing, see the BPM math and scheduling guide.
A second timing trap: editing the BPM field while playback is running stops the current loop and closes the AudioContext, so the next press of Play starts at step one at the new tempo. This is deliberate, not a glitch. It prevents already scheduled events at the old tempo from overlapping events at the new tempo. The visible behaviour is that the rhythm restarts cleanly after a tempo edit, which can look like a problem if you expected the rhythm to keep running through the change. The MusicXML sound element documents this BPM meaning.
Fix Audio Playback and Browser-Side Issues
Some wrong-looking results come from the browser side rather than the pattern. The Online Drum Machine creates the AudioContext only after you press Play, which respects browser rules that require a user gesture before audio starts. If the page has been open for a long time without a click, or the tab was hidden and throttled, the AudioContext can be suspended even though the play indicator shows movement. Press Stop, then Play, to release the old context and create a new one.
Heavy browser throttling, suspended tabs, device changes, and high system load can still affect what you hear even after a clean context. The look-ahead loop checks every 25 milliseconds and schedules events up to 100 milliseconds ahead on the AudioContext timeline, so short pauses in the main thread do not usually break timing. Long pauses can. If the play indicator stalls, the most reliable repair is to switch tabs back to the drum machine, press Stop, then press Play to restart the scheduler at step one.
Browser audio implementation, output hardware, sample rate, and the random noise generated per snare or hi-hat hit also colour the sound. The kick is an enveloped sine oscillator whose frequency drops rapidly while its gain decays. The snare is a freshly generated noise buffer shaped by a high-pass filter and a gain envelope. The hi-hat is a shorter, quieter noise burst with a higher cutoff. None of those voices are samples, so each snare or hi-hat hit is freshly generated and will not be bit-identical to the previous one. If one voice sounds wrong while the others sound right, the most likely cause is the toggle pattern on that row, not the synthesis. Press Clear, rebuild it step by step, and confirm whether the voice was actually muted in the grid or only seemed muted by ear.
Keep your device volume moderate before pressing Play, especially with headphones, because synthesized transients can sound louder on some output systems. A loud transient plus a stale AudioContext is the most common cause of a result that "looks" wrong in screenshots or waveforms even when the pattern itself is correct.
Know What This Tool Cannot Fix
Some wrong-looking results are not fixable inside the Online Drum Machine because the feature is out of scope. The tool does not support swing, triplets, velocity, accents, per-track volume, effects, recording, export, MIDI synchronization, arbitrary time signatures, or sample-accurate cross-device timing. If the wrong result is that the rhythm is too straight, the snare is too quiet, the hi-hat should swing, the loop should sound identical on two devices, or you want to render stems, the repair is to transfer the pattern idea to a dedicated music application.
This scope is deliberate. The tool is built for sketching sixteenth-note ideas, learning step sequencing, and testing a basic pulse. Trying to make it behave like a DAW will surface wrong-looking results that no fix can repair inside the tool. The 40 to 240 BPM guard, the strict whole-number acceptance, the 48-cell limit, and the lack of swing are usability choices, not bugs.
For everything inside that scope, the fixes above apply. For everything outside, the right answer is to use the Online Drum Machine as a sketchpad and move the finished idea to a tool that supports the missing feature. The result you sketched here is portable as a pattern concept even when the audio engine cannot stretch to the production need.