A "bytebeat" synthesizer, translates simple code expressions into 8-bit generative stereo audio in real-time.
Truly cool doesn't begin to touch the tip of the compliments BITWIZ deserves
BitWiz is a bytebeat synthesizer. It translates simple code expressions into 8-bit generative stereo audio in real-time.
Explore the algorithmic music of simple bitwise arithmetic operations!
BitWiz comes bundled with lots of examples, and you can easily add your own codes to the built-in library. You can also share your codes by e-mail or twitter, or open them in another application.
Press a button to record your music in real-time, then export through iTunes file sharing or AudioShare.
Use the XY-pad or an external MIDI-control to tweak variables in the expression in real-time, so you can play BitWiz as a musical instrument! It can also include the microphone input for crazy distortion effects!
The entered code expression is used to calculate each audio frame. Don’t understand how to write valid code? Just swipe with two fingers and let BitWiz randomly generate the code for you!
Even though you can just play around with the bundled demo codes and change some numbers here and there, which is entertaining enough, you might be interested in knowing the deeper details to understand how and why a code sounds like it does.
The basics are that the code, which consists of one or more mathematical expressions, is evaluated once per audio frame. The audio frame rate can be any integer division of 44100Hz.
For each audio frame, the variable
t counts up by one. So this variable holds the ‘‘audio frame counter’’ and is the main input for the mathematical expressions. Other inputs are
c for channel counter (for stereo output),
i for microphone input, and
y for XY-pad input.
Multiple expressions can be separated by comma, and the resulting value of the last one is used. This result is wrapped to 8 bits and output as audio.
The wrapping means that a result of 0-255 will pass through unchanged, while 256 will wrap back to 0, 260 will wrap to 4, 514 will wrap to 2, etc.
This gives that the most simple code:
t will produce a single value rising from 0 to 255 and then start over again at 0. The result will be a sawtooth wave at samplerate/256, which for the default samplerate of 7350Hz gives a bass note at 28.7109375 Hz.
t & 128 will produce a square wave at the same frequency. Doubling the value of t like this:
t * 2
means that it will wrap around twice as fast, and produce a sawtooth wave one octave up. In the same sense, halfing the value will make it twice as slow:
t / 2
producing a sawtooth wave at half the frequency, one octave down.
Then, by manipulating the value of
t and combining it through binary operators and integer constants, and using other variables, all kinds of complex stuff can happen, including recursive chaos!
For example, this chaotic formula produces minimal rhythmic variations for a very long time:
Actually, at 7350Hz, since
t is 32-bits, this is how long it will take to listen to the whole piece: 2³²/7350/60/60 = 162.32 hours, almost a week!
All the basic math operators (
+ - / *) are included, but also the more important bitwise operators (
& ^ |) and also boolean comparison (
== != <= >= < >). If you don’t know about bitwise ops, take a look here.
z can be set and used. Some of them are pre-defined (see help screen in the BitWiz app).
Microbe Modular has made a hardware module inspired by BitWiz Audio Synth! More info and samples here!
Long-press the play/stop button to start/stop recording. New recordings show up in the library (# button), where you can Audio Copy or open them in other apps. You can also access the recordings through iTunes file sharing if you want to use them on your computer.
If the current code uses the variable
c, it will be evaluated twice: once for the left channel with c=0, and once for the right channel with c=1.
Because the earlier expressions can set variables which are then used in the last expression:
a = t>>5, t ^ a + t * a
For example, say that you want the variable
a to equal
y is 1, but equal
y is 0:
a = 10*y + b*(1-y)
Also, BitWiz has comparision operators, so if we instead want to test if
y is greater than 123:
z = y>123, a = 10*z + b*(1-z)
Yes! All variables except the pre-defined ones are kept for the next evaluation of the code. Here’s an example that creates our own time counter instead of using the pre-defined
t is not set externally by BitWiz, only incremented by one from whatever value it currently has. So you could make it loop at a specific framecount by using
Maybe yes, maybe no. Drop me an e-mail and I’ll try to get back with an answer!
I first saw it on viznut blog: Algorithmic symphonies from one line of code