A revamped synth engine for a toy keyboard, with instrument presets and Midi out.

A friend gifted me a cheap toy musical keyboard. The sound quality was atrocious, and it could only play one note at a time. So I removed its circuitry while keeping its enclosure, speaker, and keybed, and with some tinkering and a Raspberry Pi Pico I turned it into something usable.

I made a video showing the makeover. The soundtrack is entirely played on the Picophonica, recorded one instrument at a time.

I integrated a software synthesizer into the Pico. It’s pico_synth_ex by Ryo Ishigaki – ISGK Instruments. The new engine boasts two oscillators, featuring descending sawtooth and square waveforms, a customizable filter with resonance control, cutoff modulation, a Decay-Sustain amp envelope, and an LFO for added modulation possibilities.
I managed to rewire a secondary keypad with fourteen keys, using it to recall the presets and change instrument parameters.
The existing, rather pointless 3.5mm microphone input found a new purpose as an audio output, while a USB-C port exposed through a simple adapter enables Midi-out functionality.

Source code

You can find the source code of the project here:

Picophonica is an original project.

Featured on

Jukephone — Music jukebox

I found a big button corded telephone and decided to paint it red and turn it into a jukebox.

A Raspberry Pi Pico is used to read the keypresses, process the input, send the Mp3 player instructions via UART, and provide feedback through the LED and buzzer.
The output pins of the Mp3 player are connected to the speaker inside the handset. There’s also a 3.5″ mini-jack port, to use headphones. The switch below the handset is used as a power switch.
The whole Jukephone is powered by a lithium battery rechargeable via USB.
I loaded the MicroSD card with 999 Mp3 files, organized so that there’s one hundred per genre (except the first one). Specific tracks can be invoked by typing their number on the keypad.

Other available functions are:

  • Previous / Next track
  • Adjust volume
  • Pause / Resume
  • Play a random track (with no repeats)
  • Change equalizer settings (5 presets available)
  • Repeat single track on / off
  • Restart current track

Schematic and BOM

  • Landline telephone (I’m afraid rotary dials are not covered here)
  • Raspberry Pi Pico
  • DFPlayer mini (or MP3-TF-16P clone) – MH2024K-24K, MH2024K-16SS and many more chips are supported
  • MicroSD card. 8GB or more is recommended.
  • TP4056 battery charger module
  • 18650 or equivalent lithium battery
  • 1000uF electrolytic capacitor
  • 2x 1KΩ resistor
  • 3.5″ audio socket

The specific telephone I used had a keypad matrix with 17 keys, an LED, a buzzer, and another key not on the matrix. You should be able to adapt the code to your hardware.

Among the telephone components you should be able to use the keypad matrix, handset speaker, handset switch, buzzer, LED, as well as most of the wiring and connectors.

Source code

You can find the source code of the project here:

Jukebox is an original project.

Featured on

VRRVRR – visual/haptic metronome

VRRVRR is a visual and haptic metronome, an aid for musicians.

Unlike traditional metronomes, it keeps the tempo by vibrating and blinking its LEDs.

It allows you to type or tap a desired tempo, and store it into one of the four available preset slots.

You can enable accents and beat subdivisions.

VRRVRR is made with easily available electronic components. It’s build around an inexpensive and very common keypad matrix, and at its heart there is a Raspberry Pi Pico.

Everything is powered by a lithium battery rechargeable via USB, and there’s a little LED indicator that tells you when it’s time to recharge it.

You can find the source code and the BOM at .

Featured on

Dodepan – lo-fi chromatic percussive instrument

Dodepan is a chromatic percussive instrument – like a lo-fi electronic version of a marimba or handpan.

It’s played by tapping on its twelve (dodeka in Greek) capacitive metal pads. The lowest note it can produce is C2 (Midi number 36), the highest D8 (Midi number 110), so its chromatic range is 75 notes. One of its two knobs controls the current key (or root note), which ranges from C3 to B4. The other knob is used to select one of the sixteen scales available.
It’s polyphonic, up to six concurrent voices (but more can be enabled in the settings).
Each one of the twelve pads is assigned to a note based on the current scale and key, following a zigzag layout and repeating notes at higher octaves when needed.

To make the instrument more expressive, an MPU-6050 IMU (Inertial Measurement Unit) is used to convert the intensity of a tap into velocity data, so that hard taps play louder and soft taps play quieter. In addition to the accelerometer, the IMU also provides gyroscope data, which Dodepan uses to perform pitch bending, a trick I borrowed from a previous toy synth I made, the TS-DET1.

The central unit of the circuit is a Raspberry Pi Pico. It aggregates and parses knob values and tap data from the MPR121 capacitive touch module, and displays taps, key and scale info via LEDs (through a 74HC4067 demultiplexer). Very importantly, the Pico outputs sound via pulse-width modulation. An analog circuit further processes the signal, acting as a digital-to-analog converter with volume control and noise suppression, before taking the sound to a PAM8403 amplifier that drives the built-in speaker.
There’s also a headphone jack socket of the switched type, so when it’s in use, the speaker is disabled.

When connected via USB to a computer or a Midi-compliant host instrument, Dodepan will show up as a Midi device, sending note events (note on with velocity, and note off) and pitch wheel modulation data.

The original note samples are a combination of synthesized marimba and balafon samples, and were created in MusE Sequencer using DeicsOnze, an emulator of the Yamaha YM2414, the FM sound chip powering the Yamaha DX11 and TX81Z synthesizers.
They have been resampled to 22050Hz and their resolution lowered to 8bit (using dithering), before converting them to header files using wav2c.

Everything is powered by a 3.7V li-ion battery, recharged by a TP4056 module via USB-C. An HT7333-A LDO is in place to make sure that the circuit never gets more than 3.3V, with the exception of the amplifier, which is fed straight unregulated voltage with no sweetener.


Built-in scales

Sixteen scales are available:

  • Major (ionian)
  • Natural minor (aeolian)
  • Harmonic minor
  • Dorian
  • Lydian
  • Mixolydian
  • Locrian
  • Phrygian
  • Phrygian dominant
  • Pentatonic major (Diatonic)
  • Pentatonic minor
  • Pentatonic blues
  • Arabian
  • Oriental
  • Japanese
  • Chromatic

It’s easy to change the existing ones or add more.

A note about sound quality

The memory limitations of the Raspberry Pi Pico require the samples to be reduced to 8bit, which makes them noisy – there’s no way around that. An LC filter, formed by the inductor and the 220nF cap, helps to partly reduce the hiss introduced by downsampling and dithering of the audio sources. Further improvement comes from the very large cap, also required to stabilize the PAM8403D (which will stutter without it).

Alternative builds

A minimal build requires only the Pico, the MPR121, the speaker and an amplifier or buffer. Here are some pictures of some simplified Dodepans I made, which lack the IMU and the potentiometer. To change key and scale they use buttons instead.

Source code

The source code and BOM can be found here:

Featured on

Autoplaying video previews for the web

If a picture is worth a thousand words, and a video is made of several pictures in a sequence, then a video is worth several thousand words.
A great way to show a preview of online content is by using video thumbnails – an ambiguous term that can both refer to a static image, usually depicting one frame of the video (also known as poster image), or, more interestingly, a video preview that’s a smaller and shorter version of the referenced content.

If you arrived to this page through the homepage of my website, you might have noticed that every post on it features an animated thumbnail. It was a natural choice since most of my work on display is some form of animated media, or at least accompanied by video assets.
For a long time my thumbnails have been simple animated GIFs – one of those ancient formats that managed to maintain popularity for longer than expected – but there now is a good selection of modern, more efficient formats to display motion content on the web.

Continue reading Autoplaying video previews for the web


Portable USB Midi synth with onboard speaker and audio out


See it in action: YouTube video

Portami is a portable, battery-powered polyphonic synth built around a SAMD21 microcontroller. It’s designed to be a companion to small Midi keyboards.

The software is a fork of Marcel Licence’s excellent code.

My implementation focuses on USB Midi communication (Midi-in through the onboard USB-C port) and features a push button to cycle between wave types (sine, saw, square, pulse, triangle, and noise). An RGB led inside the button changes color according to the current wave type.

It should work out-of-the-box with basic keyboard controllers, like the AKAI LPK25 in the picture. Knobs can be mapped to change synth parameters like modulation speed or pitch bend range. I tested it with an AKAI MPK Mini Play, and a keyboard mapping for this specific controller is provided. There also is a debugging tool (SAMD21synthDebugger) that can be used to find the address of knobs and sliders of more controllers.

Other than the onboard speaker driven by an LM386 amplifier, Portami has a 3.5″ mini-jack port to plug a pair of headphones. The audio socket has a switching mechanism, disconnecting the speaker when in use.

The whole setup is powered by a 3.7V, 1100mAh li-ion battery, recharged and protected by a TP4056 USB-C charger module. A regulator boosts voltage to 5V, providing power to the Midi keyboard (you might want to check current requirements for your specific setup, or power the keyboard externally).

The word portami in Italian means “take me” (to a location). As in “portami con te” (take me with you).

Source code available at

Voice changer toy

Lo-fi sampler based on the ISD1820 IC and module.

Voice recorder with pitch/speed modulation.
Press one button to start recording the module’s onboard microphone. The other button plays back the sample.
Turn the potentiometer to increase or decrease pitch and speed. You can sound like a chipmunk or a monster in a cave!
Recordings can be about 10″ long. Powered by a rechargeable lithium-ion 550mAh battery.

Internationalized ESP8266 Weather Station

A device that acts as a weather station, displaying real-time weather and astronomy data, forecasts and room temperature.

The original design and code of this project has to be credited to ThingPulse.
I reworked an existing fork of that code, the German version by Mario Ammerschuber.
Mario’s optimizations included, among other things, a captive portal Wifi manager, which is great to avoid hardcoding a Wifi name and password and therefore making the device more portable.

My code has been tested on two different development boards (A NodeMCU and a D1 mini)

My contribution is focused on internationalization: I created the Italian version, and speakers of a different language can easily localize all the displayed text by editing a single list of strings.
I also set up the weather station to use a push-button instead of touchscreen controls, and added a DS18B20 Temperature sensor to display internal temperature alongside the weather data pulled live from OpenWeatherMap.

If you want to build one, you can find the source code and more development notes here:

Grimmboy – Arduino-controlled kids’ audio player

My toddler niece is too young to read but always in for a good story. So I created for her a portable audio player of children stories.
It’s got a cool retro vibe for the enclosure and it’s very easy to operate: you just choose one of the many ‘tapes’ from its drawer and place it on top of the player to start playing that audiobook track.

It’s multilingual! I managed to find audio recordings of the same story in multiple languages, so for most stories there are four different tapes, one for each language. I believe this could be a good language learning device.

This project was inspired by the open source project Tonuino, from which I also borrowed the idea of using NFC tags to trigger an Arduino-controlled mp3 player. My player has fewer functions but is much easier to set up, is battery-powered, and uses a custom data format for the tags so they can be configured using a smartphone.

Inside the enclosure, the Grimmboy circuit uses an mp3 player chip controlled by an Arduino Nano that’s also connected to an RFID reader.
Each tape has an NFC tag hidden inside, while all the audio tracks are stored on a microSD card.
On the top side of Grimmboy there’s a pause/unpause button, an LED that blinks when no track is playing, and a volume knob.

The lithium-ion battery is recharged using a common USB-C smartphone charger, and is protected by a circuit that prevents overcharging and overdischarging.
Even though the mp3 player supports stereo playback, for energy saving reasons I chose to make it mono and include only one speaker.

The cassette tapes contain a minuscule radio chip (Ntag213, aka MiFare Ultralight C), writable using a common tag editing app for Android. However, since I created over a hundred cards I automated the job and coded a batch-writing tool (whose source code is available, see link below).
Each tag is sandwiched between two printed pieces of paper and then laminated into a microcassette-card. Side A has the story title, cover artwork, and a language flag; on side B I wrote the running time and the tag ID (which I kept note of so that if a tag gets lost I can recreate it).

One function I did not implement is automatic poweroff. It would require a power latching circuit or a more modern microcontroller but I’ll leave that to a future version.

Source code

If you want to build your own Grimmboy you can find the source code and more development notes here:

Featured on

▶ Things that Move

– So, what do you do for a living?
– I move things.
– Like what? Do you move furniture? Walk animals, drive cars? Do you juggle balls, rotate stars, fly paper planes?
– Yes.

A collection of my latest CGI experiments, with examples of physics simulation, material design, motion tracking and match-lighting. They’re all personal projects, as I did not include commissions or commercial work.
The music track was in part performed on a new digital/analog hybrid synthesizer I’m putting together.

TS-TAP4 – tactile Arduino drum machine with looper

As a bass player sometimes I want a backing drum track for music practice, so I built myself this little drum sequencer, a unique touch-sensitive drum machine.
I just need to tap a rhythm on its touch sensors and it will start looping my sequence right away.

This project is based on an Arduino Nano/Arduino Uno. The sound samples are unsigned 8 bit 8000 Hz WAV files that have been converted to header files in order to be compiled with the rest of the code.
The touch interface works via capacitive sensing, there’s an Arduino library just for that. One of the drawbacks of using capacitive touch sensors with a battery-powered circuit is that grounding is unreliable. For this reason I surrounded the device with two rails of conductive copper tape, so that holding the device will naturally provide some grounding through the user’s hands.

An LM386 power amplifier in a gain=200 configuration is used to drive the 8Ω speaker.
The whole circuit is powered by a single rechargeable 18650 cell connected to a TP4056 charger module with USB input, which delivers a steady output at 5V.
I fitted everything inside a wooden trinket box I bought specifically for this purpose, as it looked like a drum to begin with. And I love when wood and electronics get together.

Download the source code for this project:

TS-DET1 – micro:bit keypad synth with detuning

It feels rewarding to use a device by leveraging its unique traits, and the BBC micro:bit has two features that are rarely found onboard other microcontrollers: a LED matrix and gyro sensor.
So, I decided to design a circuit that detects and displays tilting, and uses it to alter the pitch of the notes being played.
The result is a quirky musical toy, surprisingly expressive and with a personality of its own.

The input part of the instrument is a 5×5 matrix of tactile push buttons, each one paired with a diode to prevent ghosting (ghosting as in false input. Diodes won’t solve unrequited love issues.)
Some of the pins used as key inputs are shared with the LED matrix, requiring to continuously switch the display off and back on, which results in a noticeable flicker.
I connected the audio signal output of the micro:bit to a quad op-amp to drive two small speakers. If you’re building your own TS-DET1, you could use a single 8Ω speaker and a power op-amp, like the LM386.

I did some research and I decided to add a passive low pass filter before the amplification stage. It’s a way to soften the harshness of the pure square waves, but I also did it because I know that children are more sensitive to high frequencies than adults, and do not like beeps that are too high-pitched.

Comparison of two recordings, one with and one without the low pass filter

The whole circuit is powered by two AAA batteries and is fitted into a plastic case for playing cards.

The prototype in these pictures is now in the small hands of its new owner, and I do not plan to create new iterations. However, if I were to do it again, I would try to skip micropython and micro:bit’s music module, trying to use C instead to set my own timers to control the PWM and produce the different notes.
Also, the two unused tilt axes could be used to control volume and octave shift.

Download the source code for this project:

LED dice – LED runner with LDR and sound

LED runners are circuits where LEDs turn on one at a time in a sequence.
I made one with a twist, turning it into an electronic dice: you press the button to roll and release it to get a number.
There’s also a speaker that emits a ticking sound and a light dependent resistor to control the speed of the run. It’s very slow in a dark room, and extremely fast in the sunlight.

The signal originates from a 555 timer, whose output triggers a CD4017 decade counter (and the speaker, in parallel).
As an enclosure I used a wooden domino box, and the little animal figures you see in the pictures are erasers, just for decoration.
Rather than from one to six, the possible outcomes of my circuit range from zero to five. If you are building this and want a 6th LED, just connect it to the counter’s Q5 pin, and leave Q6 connected to RESET.
The LEDs can share a single 470k resistor since they’re lit only one at a time.

For a future version of this project I would use a capacitor to ease out the roll after the push button is released.

Lost in the Woulds

I don’t play video games anymore, but I’ve always been fascinated by their hybrid nature, crossing artistic expression and a constant push for technical evolution.
When I was a kid and the Commodore 64 was popular, game making had just become accessible to everyone.
Now that the video game industry is larger than all the other entertainment industries combined, games contain universes, and spending time making a small game might feel pointless. However, these days ‘indie’ game development is thriving, its community is very active, and the resources required do make a game by yourself are freely available online.
I can make things move on a screen, tell the computer what to do, make it beep.
And I had a story to tell. A journey that’s emotional, profound, dramatic, and darkly mysterious.

Continue reading Lost in the Woulds


I worked on the UX/UI and brand identity for Picbag, a visual organization app at prototype stage.

Picbag lets users collect inspiration, intelligently tag and sort photos and image snippets, and create moodboards they can share.

Continue reading Picbag

Taormina Jazz Festival

Every summer since 2010 my family and I, together with the cultural association Taormina Jazz, have been organizing the Taormina Jazz Festival.

Of the artists presented, some play traditional jazz, while others dedicated their musical research to more experimental forms.
We’ve had David Kikoski, Ed Howard and Nasheet Waits,
Kurt Elling, Charlie Hunter and Derrek Phillips, Kenny Werner, The Bad Plus, and many others.

I curated part of PR and the brand identity of the festival and produced several posters, program booklets and promotional videos.

Material design illustrations

I designed a large set of illustrations for the CIPD Profession Map.

This project was the perfect opportunity to represent the many diversities of inclusive workplaces, while challenging common stereotypes regarding gender, ethnicity, age, physical abilities.

We went beyond the avoidance of preconceptions to appeal to a global audience – it was a conscious use of illustration as an unbiased brand language to speak for the professional values promoted by the campaign.

The people I was asked to draw are not just neutral models. They are active characters, interacting with each other, often displaying a hierarchy or relationship of power.

Procedural Circular Animations

I always found generative art mesmerizing, so I experimented with a few JavaScript rendering libraries to create something of my own.

Click on the images to launch the real-time animations

The first one is created with the impressive rendering library PIXI.js. The other three are drawn with Two.js, which defaults to a SVG output.

Earboard – Web App

Earboard is an ear trainer for musicians whose purpose is to generate note intervals to play along with. Its layout is modeled on the fretboards and standard tuning of stringed instruments like guitar and bass.

See it in action here: Earboard

It’s a responsive JavaScript web app. Source code