HackSpace_-_October_2019

(Rick Simeone) #1
LENS

DOWN THE RABBIT HOLE
Deciding where to start with Mozzi was my
first challenge because it can do so many
things, and the sketches that come
preloaded with it sound amazing right out
of the box. There’s an eerie theremin
sketch, a sketch that varies tones based on
feedback from temperature and light
sensors, and even a sketch that will play
back short samples of recorded audio.
It was all very exciting to play with, but
my enthusiasm for writing my own Mozzi
sketch soon found itself tempered by two


things: 1) I’m a terrible coder, and 2) The
documentation for Mozzi leaves a lot to
be desired.
Nonetheless, I spent many hours sitting
cross-legged on the shag rug in my den,
tweaking existing sketches to see what
results I could get. At one point, I had a
sketch that varied the playback speed of a
sample with the turn of a potentiometer. At
another point, I had a sketch that modulated
a chorus of heavenly tones based on the
position of a joystick.


Then I started to get myself in over my
head when I decided it might be fun to build
a synthesizer that played back samples of
raccoon sounds to go with the skull I
harvested from the raccoon. In theory, this
should be easy with Mozzi because it comes
with a pair of Python scripts that are
supposed to do most of the heavy lifting for
the user. One script compresses audio
samples so they’re small enough to fit into an
Arduino’s meagre flash memory. The other
takes the samples and converts them into a
format that can be played back by Mozzi.

In practice, neither was easy to use. The
file conversion script kept spitting out an
error I didn’t understand, and it took me
several days and some insights from a friend
to figure out that “too many initializers”
means “your audio file is too big.” The
compression script took me on an even more
meandering path that first led me to try
installing a series of Python libraries that the
script needed. When those attempts were
unsuccessful, as they required a version of
Python that was incompatible with my

Left
A bit of protoboard joins
the Arduino and amplifier

Above
Pink LEDs, because why not?

Above
The cigar box brings character as
well as providing a secure enclosure

I spent many hours sitting cross-legged on


the shag rug in my den, tweaking existing


sketches to see what results I could get

Free download pdf