BYTEBEAT, FLOATBEAT, RAMPCODE

live coding with no synths nor samples

by Gabriel Vinazza

I’ve found that a good way to start talking about bytebeat is from the concept of elegance. It is common hearing that a formula or an algorithm is “elegant”. What interests me the most about it is that, although it has an objective part defined, it somehow exceeds the scientific field, revealing an aesthetic dimension. Elegant means economic and accurate but, also, beautiful.

The code above is a classic bytebeat composition that has about four ‘patterns’ of length, and by that I mean that everything you hear when you run it is contained in that expression and can be interpreted almost in any pc, in any language. No synth or sample behind, just basic logical and math operators with only one variable: time.

Wikipedia says: “Elegance is beauty that shows unusual effectiveness and simplicity” and “in the case of mathematical problem solving, a deep understanding into the subject matter”. There are examples in different fields like mathematics, engineering, chemistry, etc. and some of the sources are the Standford Encyclopedia of Philosophy and this interesting article on Math Vault: https://mathvault.ca/math-glossary/#elegance

Since a signal can be expressed as a function of time, imagine the possibilities of this technique. In fact, any signal could be decomposed into a sum of sine waves. But not every bytebeat system has trigonometric functions available and it won’t be simple nor quick to improvise a Fourier transform live. Anyway, you don’t need much to ‘imitate’ some common instruments or create hybrids and experimental sounds.

 I have to be fair, it doesn’t look friendly at first if you’re not familiarized with expressions and you need some synth and DSP knowledge to achieve complex results but it is not so difficult as it seems. Also, it’s a matter of playing and learning like anything else. I do all my live coding with this and I’m always discovering new sounds and simpler ways for getting good results. Polyrhythms, FM, distortion, sequences, they’re just different combination of the same operations (after all, it is all about frequencies). Bytebeat is a huge experimentation territory and, also, a great method to understand synthesis deeply while having fun.

Although similar techniques were surely used in the past, the thing started growing when viznut studied some demoscene codes from 4mat and was captivated by their ingenious (don’t miss the incredible IBNIZ enviroment viznut made). My intention is that you get the general logic of this, and go deeper with the links if you’re interested but let me get just a bit technical now: when you say DSP is running at 8000 Hz, it means there’s already a counter that increases +8000 per second and for each state there is a sample, a number that gives a certain amplitude value (256 possible amplitudes in the case of 8 bit depth, the common bytebeat setup) and that’s pretty everything on how a computer processes sound. If you pass the actual value of that count through a modulo two (t % 2), you’ll get a square-wave. You can divide or multiply t to get different frequencies, add simple counters to make an arpeggio, modulate it, generate an envelope, sum more ‘voices’ if you want and… well, that’s it.

Take a look at this thing I’ve made in greggman’s page.

There is, anyway, a little trick in bytebeat. Any expression’s result that goes over the maximum amplitude value will be wrapped. It’s like you always have a second X % 256 expression. Of course, you’re not limited to 8000 Hz or 8 bit!

There are many variations of this bytebeat basics. For example, you can forget about the wrapping (that allows easier mixes and envelope controls) and put another function (for structural/sequencing and ‘master’ effects): expr 1 -> expr 2 -> DAC 

That’s what I do with Rampcode, my own system that runs with Pure Data. There is a tutorial file which contains a lot of techniques that I use to play live, from simple waveforms, envelopes, modulations to pseudorandomness, euclidean rhythms, granularsynthesis, ‘post’ effects and structural/sequencing manipulation. 

Thanks to Reo Matsumoto there is an Atom package available and I’ve uploaded enough documentation so I encourage you to try it and have your own experience.

Know that there are lots of possible combinations that you can still discover to enrich this new bytebeat world and please write to me anytime if you have a doubt or you want to share your discoveries, I would be glad.

My humble personal setup for Rampcode.

About the author

I am a professor in Philosophy and a musician. I program for creative purposes since I was a child, partly because of that I am a lover of 8 bits. I am a precursor of the live-coding scene in Argentina. Recently I received an honorable mention in the first art and technology contest of the National Fund for the Arts. I give talks and teach courses in philosophy, synthesis, creative code, etc. for all ages and levels, I present myself regularly with the alias GEDE.

Lg: @gabovinazza Fb: /gedeaudiovisual Email: gabriel.vinazza@gmail.com