Bytebeat is a unique form of sound synthesis that generates music from minimalistic programs, often written in the form of concise mathematical expressions. These formulas calculate a single byte at a time, which directly translates to a sound wave.  Bytebeat formulas produce waveforms in a way that's quite different from traditional sound synthesis methods.
Time Variable (t):  In bytebeat, the core variable is t, which represents time. It's typically an integer that increments by 1 for each sample. This increment usually happens at a constant sampling rate (e.g., 8000 Hz), meaning t increases 8000 times per second.
Formula:  The formula takes t as input and applies a series of mathematical and bitwise operations to produce an 8-bit (one byte) number. This number represents the amplitude of the sound wave at that specific point in t. These operations include addition, subtraction, multiplication, division, bitwise AND, OR, XOR, NOT, and bit shifts.
Waveform Generation:  As t increments, the formula recalculates, producing a new byte value for each increment.  These byte values correspond to the amplitude of the sound wave at each sample point.  Because the formula can include periodic functions (like sine or cosine) or create its periodicity through operations like modulo or bit shifts, it can generate repeating patterns, which are the essence of a waveform.
Examples with corresponding formula:

lambda t: (t * 5 & t >> 7) | (t * 3 & t >> 10)

lambda t: (t * 9 & t >> 4 | t * 5 & t >> 7 | t * 3 & t >> 10)

lambda t: t * ((t >> 12 | t >> 8) & 63 & t >> 4)

Increasing the sample rate, in the context of ByteBeat, not only increases the sound quality but , because of the drastic increase in pitch, reveals new forms previously hidden below the subaudible spectrum.

Example 1 with sample rate increased 12x (from 8kHz to 96kHz)

Formula: (t >> 7 | t | t >> 6) * 10 + 4 * (t & t >> 13 | t >> 6)

Formula: (t >> 6 | t >> 9 | t >> 12 | t >> 15) + (t >> 3 & t >> 10)

Hybrid formulas can be composed so that different spectral layers modulate at different rates, creating more complex temporal evolution.

Compound Formula 1: 

((t * ((t >> 12 | t >> 8) & 63 & t >> 4)) & 255) if t // 48000 % 2 == 0 else (t | t % 255 | t % 64) ^ t

Compound Formula 2: 

(((t * ((t >> (12 + (t >> 16) % 3)) | t >> (8 + (t >> 18) % 3)) & 63 & t >> (4 + (t >> 20) % 3)) & 255) * (1 - (t % 48000 / 48000)) 
           + ((t | t % (255 - (t >> 22) % 5) | t % (64 + (t >> 24) % 5)) ^ t) * (t % 48000 / 48000) 
           + (((t >> (14 + (t >> 26) % 4)) ^ (t >> (18 + (t >> 28) % 4))) & 127) * (t % 96000 / 96000))
In conventional ByteBeat, the t variable is increased linearly.  However, it's possible to dynamically reset the position of t, creating loops and non-linear jumps.
Using my Python software, AlloPy, I created a rhythmic pattern from the hierarchical structure of this Rhythm Tree graph:
((8, (13, 7, 5, 3)), (3, (1, 1, (3, (1, 1, 1, 1)))), (5, (34, (8, (5, 2, 8)))), (21, (55, 53, 51, 49, 47, 43)), (13, (37, 31, 27, 23, 19, 17, 13)))

Temporal "Remix" of Compound Formula 2, durations from the prime form of RT1

Temporal "Remix" of Compound Formula 2, durations from RT1, rotation 1

Applying the time-mapping to a new ByteBeat formula...

Formula: 

((t * (t >> 8 & t >> 10) & 42) * (1 - (t % 10000 / 10000)) + (t * (t >> 7 | t >> 9) & 35) * (t % 10000 / 10000))
durations from RT1, rotation 3

Formula:  (t*t//255)|(t*t//t>>4)
durations from RT1, rotation 2

And another...

Formula: 

((t * (t >> 8 & t >> 10) & 42) * (1 - (t % 10000 / 10000)) + (t * (t >> 7 | t >> 9) & 35) * (t % 10000 / 10000))

durations from RT1, rotation 8

One advantage to using Rhythm Trees is that their durations are arbitrary, i.e., the values in the RT graph represent proportions of a whole (which always sums to one).  This means that multiple independent paths through time can be synchronized no matter their respective or resultant complexity.
Here, we traverse through the same formula with two different time-sequences.  Because trees, no matter their proportions, will always sum to one, the two independent parts can be synchronized to the sample level.

Formula: lambda t: ((t * ((t >> 12 | t >> 8) & 63 & t >> 4)) & 255) if t // 48000 % 2 == 0 else (t | t % 255 | t % 64) ^ t
two independent paths through the same formula, panned left and right

The same formula, now traversed with three independent paths, panned left, right, and center

Quartet on the formula:

lambda t: (((t * ((t >> (12 + (t >> 16) % 3)) | t >> (8 + (t >> 18) % 3)) & 63 & t >> (4 + (t >> 20) % 3)) & 255) * (1 - (t % 48000 / 48000)) + ((t | t % (255 - (t >> 22) % 5) | t % (64 + (t >> 24) % 5)) ^ t) * (t % 48000 / 48000) + (((t >> (14 + (t >> 26) % 4)) ^ (t >> (18 + (t >> 28) % 4))) & 127) * (t % 96000 / 96000))

Back to Top