use_midi_defaults channel: 1
live_loop :midi_bytebeat do
  note, vel = sync "/midi:midi_input:1:note_on"
  freq = midi_to_hz(note) * 2

with_fx :bitcrusher, bits: 8 do synth :beep, note: note, release: 0.2 # Or generate bytebeat via synthdef end end

(Not pure bytebeat, but shows patching logic.)

out = (t * (freq >> 4)) ^ (modwheel * 1024) & (255 << (7-vel))

Yes, it’s harsh. That’s the point.


The & (AND) operator masks bits, creating distinct harmonic resonances.

If velocity is low (e.g., 15), the output is quiet and sparse (fewer bits set to 1). If velocity is high (127), the output is loud and harmonically rich. However, because of how binary works, specific velocities will create specific harmonic "fingerprint" masks.