Ever since I started studying embedded systems, I've always had a special interest in sound manipulation and generation. It's an area where I can find a very close connection to my background as a musician while also exploring a more technical side that I've been developing.
After experimenting with several projects and musical instruments using Arduino, ESP32 and the Pi Pico, I realized that at a certain point, whenever I wanted to work with more sophisticated sound synthesis and playback, I would always end up needing a computer in addition to the microcontroller.
That's when I got a Raspberry Pi 400. With it, this limitation practically disappeared, as I now have a full Linux computer capable of running the tools needed for audio generation while integrating different musical projects and applications into a single platform. And, on top of that, it has an integrated keyboard that I can actually play. But what if the Raspberry Pi itself could become a musical instrument as soon as it powered on?
After developing an audio engine using FluidSynth, a virtual environment and Python, I was able to organize all the necessary commands. I used the evdev library to read keyboard inputs and configured everything to run directly from .bash_profile.
The result is a small autobootable system in which the Raspberry Pi boots straight into a musical application, turning the computer into a sort of virtual instrument keyboard/controller.
I also developed the audio interface using the Raspberry Pi's GPIO through the I2S bus, configuring the system to recognize the audio device and running the tests directly with aplay. This way, the Raspberry Pi handles both the musical application and the audio output itself, without relying on a USB sound card or an external computer.
The project doesn't depend on a browser, physical MIDI connections or JACK. Audio is sent directly through ALSA to the I2S device, following this architecture:

The project stack combines Raspberry Pi OS Lite, Python, FluidSynth, MIDI, I2S and GPIO, using the Raspberry Pi's own keyboard as the input interface.
This project is actually just the first seed of something bigger. I can now generate and play sounds, receive MIDI commands and use the keyboard itself as an interface, but there's still plenty of room to grow. Building on this foundation, I plan to incorporate new instruments, physical controls, sensors and other interaction possibilities, gradually turning this prototype into a more complete musical platform.
This is just the beginning of the MusicBox RPI development.
