Demo


Hardware

The FX Center uses two Raspberry Pi Zeros. The first records audio with a USB microphone, calculates the frequency response (FFT), and displays the response on an RGB Matrix display. I used the Adafruit RGB Matrix Bonnet to drive the display.

The second Raspberry Pi Zero plugs into a custom PCB that includes the NFC reader, I2S audio amplifiers, and a GPIO expander. Details for this PCB can be found on my Raspberry Pi NFC/Audio Skirt Hackaday project page. The three knobs are 16-position BCD (Binary Coded Decimal) rotary switches. Each switch signal pin is connected to a Raspberry Pi GPIO.


3D Prints

The character blocks are made from PETG, and were printed using a Prusa Mini. There is a cavity in the middle of the block holding a couple of disk magnets and an NFC tag sticker. The prints were paused midway, and the tag and magnets were glued down. Models for the blocks can be found on my GitHub repository. The light blue character alignment holders were also 3D printed and glued to the front panel.


Enclosure

The enclosure is made entirely from wood. The frame is build from a single 1x4" picked up at my local Home Depot. The center panel is made from a cedar plywood panel (also from Home Depot). I routed a channel all around the inside of the frame for the panel to slide into. The large panel cutout for the display was cut using a Jigsaw while the rest of the holes were made with a cordless drill and hole saw blades. The cover over the display was cut from a sheet of 1/8" acryllic.


Software

Audio Visualizer

The audio visualizer Pi code is written in C++. The program is run as a daemon at Raspberry Pi boot. The display and microphone are put to sleep initially and wake up only when an NFC tag is detected (the two Pis are connected via a GPIO signal). After a 10 minute timeout the audio visualizer goes back to sleep. For audio recording, the program uses the PortAudio library. The FFT is calculated using the Kiss-FFT library. The FFT calculation is then converted to a logarithmic scale and drawn on the display using the LED-matrix library from Henner Zeller.

NFC/Audio

The NFC/Audio Pi application code is written mostly in Python, which is also run as a daemon at boot time. The only exception is the interface to the NFC reader, which is written in C using the libnfc library. The C application to poll for NFC tags and return the tag's UID is continuously called by the main Python application. 

The I2S audio output was configured using a script from Adafruit. The audio and sound effects are played and applied using Linux's sox library, where the appropriate shell commands are called from the Python application.