Building A Loop Station With An RP2040

Loop stations are neat things, able to replay one or more loops of audio over and over again while you perform over the top of them. Musicians like [Marc Rebillet], [Reinhardt Buhr], and [Dub FX] have made careers out of this style of performance. [Yaqi Gao], [Xiaoyu Liang] and [Alina Wang] decided to build a loop station of their own, using the popular RP2040 chip.

At its simplest, a loop station must take in audio, record it, and then play it back. Generally, it can do this with several tracks and mix them together, while also mixing in the incoming audio as well. The group achieved this by inputting a guitar signal to the chip via an amplifier and the onboard analog-to-digital converter. The audio can be recorded as desired, and then played back via an external digital-to-analog converter. Live audio from the guitar is also passed through to allow performing over the recorded sound. The group also used an external half-megabyte FRAM chip to allow storing additional audio sample data, which can be trucked out over serial and saved.

It’s not the cleanest loop station in the world, with a relatively low sample rate causing some artifacts. Regardless, it definitely works, and taught the group plenty about working with digital audio in the process. For that reason alone, we’d call it a success.

Continue reading “Building A Loop Station With An RP2040”

There Are Stradi-various Ways To Make A Violin, And This Is One

We’ve always said that if we had enough money, we’d have a large room that housed every musical instrument we’ve ever been even mildly interested in. While that dream may never come to pass, it would be far more likely to happen if many of the instruments could be 3D-printed, like this electric violin.

We really like this compact design, which mimics a headless guitar with the tuning pegs down by the bridge. [Carmensr] started with a model on Thingiverse, which uses violin strings wound around electric guitar tuners instead of wooden friction pegs. To further the guitar comparison, the three-piece neck contains a truss rod of sorts.

So how does it work, though? The magic is in the special bridge, which contains a piezo element. The bridge picks up the strings’ vibrations and sends them to a little pre-amplifier, which creates a signal that can then be used by a program like Audacity or connected directly to a speaker. Be sure to give it a listen in the video after the break.

Of course, there’s no reason not to design and print acoustic violins. It would be fun to experiment with different filaments for different sounds.

Continue reading “There Are Stradi-various Ways To Make A Violin, And This Is One”

High-Resolution MIDI Controller

For an older standard, MIDI has remarkable staying power in the music industry. It remains the de facto digital interface between computers and instruments thanks to its open nature, but its age does show a little bit. Sending control change (CC) messages, for example, was originally designed to fit within seven bits, which doesn’t give particularly fine resolution compared to more capable modern computers. To work around that, a fourteen-bit message is possible, doubling the resolution, and this MIDI interface uses this larger amount of data to send these high-resolution CC messages.

The 14-bit messages are actually fairly well documented but are a bit obscure, with very limited hardware support. To that end, [Gero] set about building this control interface to solve that problem. It’s made up of only eight knobs, each of which is mapped one-to-one to a parameter on the computer, allowing the interface to feel more like an analog device where the knob corresponds directly to a change in an aspect of the sound. The platform is built around a Teensy 4.0 and some multiplexers to handle all of the knobs, with the open source software available for anyone to use to modify their actions. [Gero] was aiming for high fidelity for all aspects of this controller, not just the improved digital resolution, and made a number of other improvements to it as well like re-greasing the potentiometer knobs and a custom 3D printed enclosure.

All of the software is available for use, as well as the files to print the case. [Gero] is also working on a PCB to make the construction of the device a little more streamlined, but for now, it requires a bit of soldering off-the-shelf parts together. The MIDI standard is open as well, which allows for a lot of innovation in the creation of musical instruments from unique hardware. This project builds a MIDI synthesizer with parts from a Sega Genesis.

Impressively Responsive Air Drums Built Using The Raspberry Pi Pico

Drum kits are excellent fun and a terrific way to learn a sense of rhythm. They’re also huge and unwieldy. In contrast, air drums can be altogether more compact, if lacking the same impact as the real thing. In any case, students [Ang], [Devin] and [Kaiyuan] decided to build a set of air drums themselves for their ECE 4760 microcontroller class at Cornell.

As per the current crop of ECE4760 projects, the build relies on the Raspberry Pi Pico microcontroller as the brains of the operation. The Pico is charged with reading the output of MPU6050 inertial measurement units mounted to a pair of drum sticks. The kick pedal itself simply uses a button instead.

Where the project gets really interesting, though, is in the sound synthesis. The build doesn’t simply play different pre-recorded samples for different drums. Instead, it uses the Karplus-Strong Drum Synthesis function combined with a wavetable to generate different sounds.

In the demo video, we get to hear the air drums in action, complete with a Stylophone playing melody. Unlike some toy versions that trigger seemingly at random with no rhythm, these air drums are remarkably responsive and sound great. They could be a great performance instrument if designed for the purpose.

We’ve seen similar builds before, too.

Continue reading “Impressively Responsive Air Drums Built Using The Raspberry Pi Pico”

A red circuit board with four wires running from an IMU to a Pi Pico W. This is all attached to a clear plastic baton.

An Electronic Orchestra Baton

The conductor of an orchestra may look unassuming on the street, but once they step onto their podium, they are all powerful. If you’ve ever wanted to go mad with power in the comfort of your own home, try this electronic orchestra baton by [Larry Lu] and [Kathryn Zhang].

The wireless baton “peripheral” part of the system uses a Pico W and an IMU to detect the speed of conducting a 4/4 measure. That information is then transmitted to the “central” Pico W access point which plays a .wav at the speed corresponding to the conductor’s specified beats per minute (BPM). Setting the baton down will pause the visualizer and audio playback.

The “central” Pico W uses direct memory access (DMA) and SPI communication to control the audio output and VGA visualization. Since most .wav files have a sample rate of 44.1 kHz, this gave the students a reference to increase or decrease the DMA audio channel timer to control the playback.

Want some more musical hacks? Checkout this auto-glockenspiel or how the original iPod was hacked.

Continue reading “An Electronic Orchestra Baton”

Raspberry Pi Pico Becomes Emotionally-Aware Music Visualizer

Back in the late 1990s and early 2000s, the nascent world of digital music was incredibly exciting. We all cultivated huge MP3 collections and spent hours staring at the best visualizers Winamp and Windows Media Player had to offer. [Rafael] and [Eric] decided to bring back those glory days with their music visualizer that runs on the Raspberry Pi Pico.

The design is quite interesting, going beyond the usual simplistic display of waveforms and spectrograms. Instead, the Pi Pico uses a Fast Fourier Transform analysis to determine the frequencies of the music, ideally then to determine the key, and thus the mood, of the tune.  Then, the visualizer uses different colors to represent those moods, such as green for happy music in a major key, or deeper blues for a sad piece in a minor key. The output of the visualizer is via Bruce Land’s 8-bit color VGA library, which allows the Pi Pico to drive a monitor directly.

Whether the visualizer really gets the music is up for debate.  The visuals simply don’t look sad and depressing enough when listening to Hallelujah, but maybe that’s just the lack of Jeff Buckley’s vocals in the instrumental. Furthermore, getting an FFT analysis to pull out reliable musical information from an audio recording is finicky to say the least. In any case, the blocky and colorful animations are nice to watch nonetheless. They’d make an excellent basis for visuals at your next underground chiptune show, that much is for certain. Video after the break.

Continue reading “Raspberry Pi Pico Becomes Emotionally-Aware Music Visualizer”

Audio Synthesizer Hooked Up With ChatGPT Interface

ChatGPT is being asked to handle all kinds of weird tasks, from determining whether written text was created by an AI, to answering homework questions, and much more. It’s good at some of these tasks, and absolutely incapable of others. [Filipe dos Santos Branco] and [Edward Gu] had an out of the box idea, though. What if ChatGPT could do something musical?

They built a system that, at the press of a button, would query ChatGPT for a 10-note melody in a given musical key. Once the note sequence is generated by the large language model, it’s played out by a PWM-based synthesizer running on a Raspberry Pi Pico.

Ultimately, ChatGPT is no musical genius. It’s simply picking a bunch of notes from a list that are known to work together melodically; that’s the whole point of musical keys. It would have been wild if it generated some riffs on the level of Stairway to Heaven or Spontaneous Devotion, but that might be asking for too much.

Here’s the question, though. If you trained a large language model, but got it to digest sheet music instead of written texts… could it learn to write music in various genres and styles? If someone isn’t working on that already, there’s surely an entire PhD you could get out of that idea alone. We should talk!

In any case, it’s one of the more creative projects from the ever-popular ECE 4760 class at Cornell. We’ve featured a bunch of projects from the class over the years, and noted how the course now runs on the RP2040. Continue reading “Audio Synthesizer Hooked Up With ChatGPT Interface”