Bytebeat is a music synthesis technique that was discovered by Ville-Matias Heikkilä (viznut/pwp). Kragen Javier Sitaker has a good writeup on the subject. The way it works is that you generate a stream of 8-bit audio with the samples calculated by a function of sample index. This means that the song is defined by the function. In pure-form bytebeat, the function corresponds to a computer program that employs bit-wise and basic arithmetic operators, meaning that a small-sized formula would also have a small-sized implementation if realized in machine language or something like that. It may have been vital to Viznut's discovery that he experimented with a low 8 kHz sampling frequency. With high sampling frequencies, the flat spectral envelope arising from bit-wise operations and numerical wrapping makes the sound thin and harsh. I regretfully admit that initially I had doubts that the methodology would be able to produce anything else than glitch-y noise, but it turns out that some formulas produce songs suitable for a wider audience.

My bytebeat formulas are quite orthodox, but their construction is largely deterministic. There is still a lot of random trial and error both in fine-tuning of numerical values and in testing different structures for sub-formulas. As a principle I shy from direct summing of voices, avoid floating point stuff, and use a 8 kHz sampling frequency. It helps that I don't know the syntax of Javascript well enough to use anything but elementary operations. The most interesting ones of my songs are available as 44.1 kHz ogg downloads. For the rest, there's a link to a Javascript-based player. Prior to encoding this kind of material it is good to eliminate any constant DC bias and to normalize the audio in a way that clipping of Gibbs effect overshoots (from 8 kHz to 44.1 kHz upsampling) is eliminated. A gain value of -5 dB may be needed in worst case.

In general, mathematical equations cannot be copyrighted. Use these any way you like.

It would be interesting to try out bytebeat in balanced ternary, arguably the most beautiful number system. Also it would be good to try out the 44.1 kHz sampling fequency with some filtering to make the average spectral envelope more agreeable.


No 1


Play as Javascript, 8 kHz.

Quite a primitive piece. This could be used as the "melody" in some hardcore acid trance maybe. Has an arpeggiator and gating. Originally published at pouë BBS 2012-02-24.

No 2


Play as Javascript, 8 kHz (ogg, 1096 KiB).

A song with progression and a repeating pattern of chords. It has a bass drum, an arpeggiator derived from song No 1, and uses division to arrive at approximate note frequencies generated by a formula. Unfortunately, it gets a bit dissonant in the 4th quarter of the repeating pattern. Originally published at pouë BBS, 2012-02-24.

No 3


Play as Javascript, 8 kHz (ogg, 1363 KiB).

Quite similar in form to song No 2, but the progression is done using the bass drum. Has gating to make the ti-ti-ti-ti-ti-ti-ti. Has additional elements for fine-tuning of the sound.


Play as Javascript, 8 kHz.

A no-frills variant with a somewhat simpler arpeggiator.

Originally published at pouë BBS, 2012-02-25.

No 4


Play as Javascript, 8 kHz (ogg, 869 KiB).

Monotonic minimalistic trance. Features a poor man's "sinusoidal" bassline that has a nice development coming out of the formula, driving the whole song forward. On top of that there's a bass drum making the bassline duck, and then there's a bit of high-frequency spice. Originally published at pouë BBS, 2012-02-26.

One million alarm clocks


Play as Javascript, 8 kHz.

This would make a really nasty ringtone or an alarm clock buzz. Originally published at pouë BBS, 2012-02-27.

No 5


Play as Javascript, 8 kHz (ogg, 1035 KiB)

This uses a kind of "loop sampler" of a nice smack!-kinda sound to create both a bass and a bass drum sound. The loops don't repeat evenly, creating an interesting polyrhythm. There's also an additional high-pitched sound. Originally published at pouë BBS, 2012-02-28.




One thought on “Bytebeat”

  1. I don’t have permission to listen to the song. the /music endpoint returns permission denied

Leave a Reply

Your email address will not be published. Required fields are marked *