About bytebeat
Bytebeat music was invented in September 2011.
Classic simple bytebeats are generally a piece of rhythmic and somewhat melodic music with no score, no instruments, and no real oscillators. It's simply an expression that defines a waveform as a function of time, processed (usually) 8000 times per second, resulting in an audible waveform with a 256-step resolution from silence (0) to full amplitude (256). If you put that expression into a program with a loop that increments time variable (t), you can generate the headerless unsigned 8 bit mono 8kHz audio stream on output, like in this application. Since these directly output a waveform, they have great performance in compiled languages and can often be ran on even the weakest embedded devices.
Initially, expressions were typically written in C or were C-compatible, written in JavaScript. But bytebeat music has evolved over the years, and modern songs with complex JavaScript code are now popular. You'll find examples in the library on this site.
Read an article by Kragen about the earliest history of bytebeat.
Original blog posts and videos from Viznut: article#1, article#2, video#1, video#2, video#3.
About the Dollchan Player
This is a highly optimized, live-editing algorithmic music generator and player featuring a collection of bytebeat songs.
This project has been under development by StephanShi since 2018 (official announcement in January 2019), and is a heavily modified fork of 8-bit Generative Composer by Paul Hayes.
Please refer to the README for full information regarding functionality, installation, configuration, as well as the changelog.
đš Supported Playback modes
- Bytebeat: Outputs value as an unsigned 8-bit integer (uint8) (0 to 255). Values outside this range wrap around, decimals are floored.
- Signed Bytebeat: Outputs as a signed 8-bit integer (int8) (-127 to 128). Required for classic demoscene music ports (e.g., *Longline Theory*).
- Floatbeat: Uses floating-point values (float) from -1.0 to 1.0. This mode provides clean sound without 8-bit distortion or noise on quiet songs.
- Funcbeat: Statement-based tracking. Runs a wrapper function once at startup and expects it to return a function evaluated in seconds.
- Stereo sound: Return a two-element array
[left, right]to separate channels. For example,[t*(t>>10&42), t*(t>>11&42)]
â Visualizer Scope modes
- Points: Renders raw calculated values as separate coordinate dots on the grid.
- Waveform: Connects points with lines, keeping the wave clean and legible at high zoom.
- Diagram: Draws vertical lines where brightness changes based on the signal amplitude.
- Combined: Overlays the Waveform line on top of the Diagram background.
- FFT (Fast Fourier Transform): Renders a real-time frequency spectrum map. Uses a logarithmic grid marked in Hertz (10 Hz to 24 kHz) and Decibels (-20 dB to -120 dB).
đ Visualizer Scope features
- Interactive Timeline Cursor: Renders a moving playback cursor that you can color-customize. At high zoom levels, it moves faster and stops being displayed.
- Stereo Channel Splitting: Renders left and right audio channels using distinct colors, with multiple color preset configurations available.
- Visual Error Tracking: Audio overflows, out of bounds, and invalid calculations (NaN) automatically colors in warning red.
- Playback Toggling: Click directly on the scope timeline to pause or to resume the playback.
đī¸ Playback & Control Panel
- Time counter: Click the
tbutton to switch to measuring in seconds. Click the counter number field to pause. Type a number and pressEnterto jump to that specific time. - Lag indicator: Shows a slowdown coefficient if heavy or unoptimized code overloads the audio worker. Use this value to monitor lag and to fix audio crackling.
- Stop and reset: Click the âšī¸ button to stop playback and to reset the time to 0.
- Reset: Click the âŽī¸ button to set time back to 0 without stopping playback.
- Pause: Click the â¸ī¸ button to pause playback.
- Playback speed: Click the fast-forward ⊠or fast-reverse âĒ buttons multiple times to speed up or slow down playback (2x, 4x, ... up to 64x).
- Zoom controls: Use the
+and-buttons to scale the visual scope. Zooming in helps you see the wave details, while zooming out gives a broader view of the pattern. - Zoom indicator: Click the
1/xbutton to reset the zoom to 1. - Visual mode: Switch between different view types like
Waveform(classic wave line),Diagram(2D pixel pattern), orFFT(frequency spectrum) to see your code's visual footprint. - Playback mode: Switch between different playback types like
Bytebeat,Signed Bytebeat,FloatbeatorFuncbeat. - Sample rate: Select standard frequencies from lo-fi 4000 Hz to 48000 Hz. Type your own numbers into the sample rate selector input to set custom frequencies.
- Sample rate divisor: Located next to the sample rate selector. If your song is too heavy or you are on a weak mobile device, increase this value. It skips calculation steps to reduce CPU load (note: this causes sound stepping and visual distortion).
- Copy link: Click the chain/link đ button to copy the unique URL of your song. It saves your code, sample rate, and playback mode so you can easily share your creation with others.
- Record audio: Click the record button âēī¸ to capture the output directly from the playback. It renders the audio into a downloadable
.oggfile. - Clean view: Use the expand
âļbutton to hide the code editor and settings, leaving only the visual scope and basic playback controls on the screen. Available on mobile devices or small screens. - Byte counter: Tracks your code size in real-time. This helps you fit into classic bytebeat limits like 256 bytes or 1 KB.
â Other online bytebeat players
- by Bemmu and Rarefluid — this is one of the first players.
- by Paul Hayes — also is one of the first. Dollchan Player is a very deeply modified fork of it.
- by Greggman — a source of inspiration for creating Dollchan Player, but in turn, Greggman took the songs library from here.
- by SArpnt — a fork of Dollchan Player, but in turn Dollchan took many technologies and ideas from SArpnt.