MODULES
Byte Oscillator
Explaination and examples for the Byte Osc Module.
UPDATED FEB 19, 2026
How Does It Work?#
The Byte Oscillator generates sound by evaluating a small integer expression every sample (bytebeat style), then converting that integer into audio.
How It Works#
- The formula outputs an integer.
- The oscillator applies bit slicing (
Bits,Offs,Cnt) and output mapping (Sign,Unsign,Classic). - Optional post processing (
Smth,OS x2,Clip,DC) shapes the final output.
Formula Language#
Supported building blocks:
- Integers:
0,1,255, etc. - Variables:
t,p0,p1,p2,p3,sr,seed - Arithmetic:
+ - * / % - Bitwise:
& | ^ ~ << >> - Comparisons:
< <= > >= == != - Logic:
! && || - Ternary:
cond ? a : b - Parentheses:
( ... )
Variables#
t: time/index input (depends onTimemode and pitch)p0..p3: user parameters (P0..P3) with CV modulationsr: sample rateseed: deterministic pseudo-random value source (fast, changes every sample)rnd: deterministic pseudo-random value source held untiltchanges (stepped randomness)
Time + Pitch Behavior#
- Time = Count: classic bytebeat counter style (
Rate-driven), pitch scales time speed. - Time = Phase: phase-based mode with 1V/oct style pitch tracking.
Use Reset trigger to restart phase/counters/state for repeatable phrases.
Programming Tips#
- Keep formulas simple first, then add complexity.
- Use
P0..P3as macro controls instead of hardcoded constants. - If output is harsh/noisy, try:
- lower
Bits/ change output mode - increase
Smth - enable
DCand/orClip
- lower
- If patch sounds unstable across restarts, use
Resetfor deterministic re-sync points.
Cool expression to try#
(((t >> 4) | (t >> 7) | (t >> (p0 & 15))) ^ (t * (p1 | 1))) & 255(((t >> 12) & 3) == 0) ? (((t * 5) ^ (t >> 7)) & 255) : (((t * 3) + (t >> (p0 & 7))) & 255)(((t * ((p0 & 31) + 1)) ^ (t >> ((p1 & 7) + 1))) + (t >> ((p2 & 15) + 1))) & 255(((t * 9) & (t >> 4)) | ((t * 5) & (t >> 7)) | ((t * 3) & (t >> 10))) & 255((t & (1 << ((p0 & 11) + 8))) != 0) ? (((t * 7) ^ (t >> 3)) & 255) : (((t * 2) + (t >> 5)) & 255)(((t & 2047) < ((p0 & 2047) + 256)) ? (255) : (0)) ^ (((t >> 5) * 13) & 255)(((t >> ((p0 & 7) + 3)) & 1) != 0) ? ((((t * 11) ^ (t >> 5)) + (t >> 8)) & 255) : ((((t * 7) ^ (t >> 3)) + (seed & 31)) & 255)(((t * (p0 | 1)) & (t >> 6)) | ((t * (p1 | 1)) & (t >> 9)) | (t >> ((p2 & 7) + 4))) & 255(((t * 7) ^ (t >> 2) ^ (sr >> 8)) + ((t >> 6) | (t >> 9))) & 255(((t & 4096) != 0) && ((t & 1024) == 0)) ? (((t * 3) ^ (t >> 4)) & 255) : (((t >> 5) | (t >> 8)) & 255)(((t * (((p0 & 15) + 1) * ((p1 & 7) + 1))) ^ (t >> ((p2 & 7) + 1))) + (t >> 9)) & 255(((t >> ((t >> 11) & 7)) * ((p0 & 7) + 1)) ^ (t >> ((p1 & 7) + 1))) & 255(((seed & 1023) < ((p0 & 1023) + 64)) ? (((t * 9) ^ (t >> 4)) & 255) : (0))((((t >> 10) & 1) != 0) ? ((t * 5) & 255) : ((t * 3) & 255)) ^ ((((t >> 12) & 1) != 0) ? ((t >> 4) & 255) : ((t >> 5) & 255))(((t * 13) ^ (t >> 2) ^ (t >> 6) ^ (t >> ((p0 & 7) + 1))) + ((seed >> 5) & 31)) & 255(((t * 0x1F) ^ (t >> 3) ^ (t >> 7)) + ((t >> ((p0 & 15) + 1)) & 0xFF)) & 255(((t * ((p0 & 63) + 1)) ^ (t >> ((p1 & 7) + 1))) + ((t >> ((p2 & 7) + 3)) * ((p3 & 7) + 1))) & 255PREVIOUS
NEXT
PWM Osc Engine