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.
Original blog posts and videos from Viznut:
This website is a live editing bytebeats player, it has a collection of bytebeat music. Online JavaScript 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.
Playback modes are:
- Bytebeat — output is an unsigned 8bit integer from 0 to 255, values outside this are wrapped, and non-integers are floored.
- Signed Bytebeat — output is a signed 8bit integer from -127 to 128, values outside this are wrapped, and non-integers are floored.
- Floatbeat — output is -1.0 to 1.0. Allows higher quality audio since it is not limited to 255 values, unlike the previous ones.
- Funcbeat — the code is run only once and is not an expression, it expects the function to return. The returned function is ran with time in seconds, output is -1.0 to 1.0.
This player features a lot of random new things you probably won't see elsewhere. Yes it's hard to maintain so please report any problems you see on the issues page (opens in a new tab).
I've tried to sync it to Dollchan again but it'll probably fall out of date again so prepare for that.
Custom functions include:
- bitC: (X,Y,Z) => X&Y?Z:0
- br: (T,SIZE) => Bit reverses SIZE bits of T, discards the other bits
- sinf, cosf, tanf: (X) => sin, cos, tan but inputting t will output the same freqency as t by itself. AKA the function loops around every 256 "steps" instead of every 2pi steps
- regG: (T,regEx) => takes a string of T's bits, and tests against regEx for a match. Outputs a boolean.
Obviously using any of these makes your code incompatible with Dollchan and I only have these here for compatibility reasons and because they haven't broken yet. Doesn't mean they aren't deprecated. They are.
There's some extra sound modes too, and some minibaking functions, but those are deprecated too.
There were at some points a spectrogram and "triads" (3 channel output) but I didn't like how these were implemented at first and were since scrapped during resyncs with Dollchan.
I wouldn't be surprised if some unused remnants of these lie deep in the code, though.
The main thing this player adds is a sound input, alongside the output! This is usually a mic so that's how i have it called but it's really just an input.
You get this at the 4th Funcbet parameter (the third is the sample count), and as the `_micSample` variable. Both are in [left,right,mono] floatbeat format.
There's also the "Slider panel" on the right to adjust variables with sliders and the like.
This project is made by Chasyxx, and is a fork of StephanShi's player on Dollchan.
SthephanShi's project is a fork of 8-bit Generative Composer by Paul Hayes.