ByteBeats on the ‘b

Had a couple of folks asking about bytebeats, bitcode, or whatever they are called which got me thinking about them.

Like most of my code, I have more hardware work to do before I can really concentrate on the software, so I have managed to only spend enough time to get a couple of POCs done.

I used some of mckenic’s code to build this sound… Whether that’s what he was looking for or not I can only guess:

Then I looked through some of clone45’s code for is upcoming Equation Composer module, and again, I was able to get something working, but I have no idea how close it is to what he’s actually doing:

So anyway, If you want to add some of your own, I’ve created a little bit of a framework:

This is in Oscillator.cpp. You can easily add more algorithms if you want, simply by adding case statements.

The configuration parameters are:

samplerate – defines the sample rate at which the oscillators run
pinout – an audio (AC coupled) output for the signal.
algorithm – used to select an algorithm
param1 – defines an analog input to drive algorithm parameter
param2 – defines an analog input to drive algorithm parameter
param3 – defines an analog input to drive algorithm parameter
offset – provides a number of sample offset if you want to run two oscs in stereo without them being completely in sync.

To configure and run one of these oscs from a sketch of your own, the code looks like:

Or, if you’re running the no-code firmware, this is what the JSON configuration looks like:

For those interested, let me know what you think. If you have any good ones that you’d like to share, please do, and if you want them in the library, I’ll be happy to add.

Submit a Comment

Your email address will not be published. Required fields are marked *