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”

Sound-Reactive Light Saber Flips Allegiance Via Vowel Sounds

Students [Berk Gokmen] and [Justin Green] developed an RP2040-based LED-illuminated lightsaber as a final project with a bit of a twist. It has two unusual sound-reactive modes: disco mode, and vowel detection mode.

Switching allegiances (or saber color, at least) is only a sound away.

Disco mode alters the color of the saber dynamically in response to incoming sounds. Color and brightness are altered in response to incoming frequencies picked up by the on-board microphone, making a dynamic light show that responds particularly well to music.

The second mode is vowel detection, and changes the lightsaber’s color depending on spoken sounds. The “ee” sound makes the saber red, and the “ah” sound turns it blue. This method requires a lot of processing and filtering, and in the end it works, but is quite dependent on individual speakers for calibration.

The sound functionality centers around FFTs (Fast Fourier Transforms) which are fundamental to processing signals like audio in a meaningful way, and is a method accessible to embedded devices like microcontrollers with ADCs.

The lightsaber is battery-powered and wireless, and there are loads of details about the finer points of the design (including challenges and tradeoffs) on the project page, and the source code is available on GitHub. A video demonstration and walkthrough is embedded below.

Continue reading “Sound-Reactive Light Saber Flips Allegiance Via Vowel Sounds”

CoreXY On The Pi Pico

There are enough off-the-shelf CoreXY mechanisms out there that for the cost of an AliExpress order it’s possible to quickly and cheaply make yourself a plotter. But [Koushani Das], [Mahathi Andavolu] and [Dengyu Tu] are completing their project for Cornell University’s ECE 5730 course, so of course they have designed one from the ground up. Happily for us it seems to be fairly easy to replicate, so you can build one too if it takes your fancy.

The write-up makes for an interesting dive into the nitty-gritty of design, for which we hope they managed to secure a decent grade. The hardware itself seems pretty straightforward as does the pair of stepper controllers and RP2040 they use to run the thing, and their explanation of the math behind the CoreXY coordinate system is genuinely interesting for those of us who’ve never taken the time to consider it.

All the good stuff can be found in a GitHub repository if you’d like to take this further, and meanwhile they’ve also put up a demo video which you can see below the break. We like this little plotter, and we hope others will take its design and run with it.

Want more CoreXY explanation? We’re happy to oblige.

Continue reading “CoreXY On The Pi Pico”

Several Raspberry Pi Picos connected to each other

Raspberry Pi Pico Parallel Mandelbrot Computation

The Mandelbrot set is — when visualized with some colors — an interesting shape with infinite detail. While the patterns are immediately obvious to the human eye, anyone who’s run one can tell you that they’re pretty computationally expensive to produce. Fortunately, as with many things in graphics, rendering the Mandelbrot set can be easily parallelized.

That’s what [rak277] and [ir93] demonstrate in their RP2040-based finals project. Computron, as they call it, is a network of Raspberry Pi Picos that work together to compute a visualization of the Mandelbrot set and show it on a VGA display. The Computron is made of two or more “math units” and one “projection unit”. The math units communicate over a shared I²C bus with the projection unit to first divide the workload and then compute their share of the work.

This project shows both the strengths and limitations of parallel computation. It makes use of multiple math units on a highly parallelizable workload, but as more math units are added there are diminishing performance gains due to the increased communications load on the network, which [rak277] and [ir93] suspect to be the current bottleneck in the Computron.

If you’re fresh out of Pi Picos, and don’t mind waiting awhile, you could always crank out a Mandelbrot set on your trusty Atari 800 in BASIC.

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”

Radiochat Is A Simple LoRa Interface Over WiFi

LoRa is often talked about as a potentially useful solution for emergency communication. The problem is, few of us are running around with LoRa hardware on a day-to-day basis. Student [William Barkoff] designed the Radiochat device as a simple tool that could pair with virtually anything over WiFi, and allow it to send and receive LoRa messages.

Radiochat is based on the Raspberry Pi Pico W, and uses the microcontroller’s wireless hardware to communicate with other devices. It provides a WiFi network that devices like laptops or smartphones can connect to. The Pico serves up a simple web page which accepts text input. Type in a message and hitting enter and the Pico will command a LoRa radio module over SPI to send that message out over the airwaves. It can then be picked up by another Radiochat module which displays the message on its own webpage.

It’s in an early state of development, and the demo video shows there are still some bugs to work out. Ultimately, though, it could be a cheap battery-powered device that lets smartphones and laptops chat over LoRa in remote areas. Indeed, [William’s] trips to New Mexico on model rocketry expeditions were a big inspiration for the project.

Continue reading “Radiochat Is A Simple LoRa Interface Over WiFi”