Reading view

There are new articles available, click to refresh the page.

Raspberry Pi Pico MIDI Gesture Controller

Extracting an arresting array of sounds from a guitar became a mission for keen coder Gary. In the latest issue of The MagPi, he tells Rosie Hattersley how he built a Raspberry Pi-based expression pedal.

The MIDI Gesture Controller is a sort of musical expression pedal that rotates and rolls around a ball joint, providing six degrees of freedom

Guitarist and keen coder Gary Rigg says he always thought floor-based controllers — particularly expression pedals — should have a more prominent role. They are usually operated by pressing your foot down for a subtle or more obvious wah-wah or delay effect, but only in a single direction, also known as one degree of freedom (DOF). 

You use your foot to “control the pitch of the pedal, and the pitch determines the parameter value.” Gary reasoned that adding degrees of freedom such as yaw (rotation around an axis) and roll to an expression pedal could extend its pitch parameters. He began pondering what new sounds could be achieved by redesigning how the humble foot pedal was operated. The result is the MIDI Gesture Controller, a Raspberry Pi Pico-based expression pedal that can control three parameters, “which ought to lead to more control while playing live.”

The Gesture Controller can be plugged into a PC as a MIDI control device and works with synthesisers and samplers

New musical direction

Gary hit upon a ball and socket setup, since these move through three or more planes of motion in multiple directions. He soon settled on a desk-based rotating puck design, realising that since the expression pedal did not necessarily need to be foot-operated, it could have several additional uses: “it works as well as a hand controller as a foot controller, so could be used for DJs or in a studio.” Camera controllers, stage lighting, and other non-musical applications also came to mind. Gary points out that MIDI is simply a protocol and could be swapped for something else, such as an HID controlling gameplay, for example. Sensor values are sent down a serial line, so the Gesture Controller could theoretically be used in “any situation needing a multi-axis controller.”

Give it a try

Gary uses Python regularly for his job as a software developer for websites and mobile devices. In “paid work land” he’s used Raspberry Pi for IoT projects to control lights and smart devices, in fire alarm panels, and alongside NFC cards and in MQTT Edge devices. As a hobbyist, Gary has created Raspberry Pi-based retro games consoles, set up sensors, and designed a Ghostbusters PKE Meter, so he is fairly confident with prototyping and seeing diverse projects through to completion.

Prototyping the MIDI Gesture Controller with Raspberry Pi Pico, which runs CircuitPython code

He made use of Adafruit’s MIDI library, and says programming in CircuitPython using Thonny IDE on Raspberry Pi Pico made a lot of sense: “an incredible bit of kit as a low-cost microcontroller, and being in Python-land feels like home.” He also found it to be the best value for money, and the most reliable board for his project. Other components — including the 6DOF AHRS IMU sensor, arcade joystick ball, 3D printer, and neoprene rubber for grip — were bought from The Pi Hut and other stores. The wiring setup was straightforward enough, with the IMU (inertial measurement unit) and yaw reset button connected to Raspberry Pi Pico.

Despite Gary’s years of experience as a computer scientist and software engineer, the MIDI Gesture Controller project took him several weeks to complete and provided plenty of challenges. Getting a smooth motion on the ball joint was particularly difficult. Having designed the casing in CAD software, Gary says he must have 3D-printed nearly 20 variants to get it right. Another challenge involved getting actual pitch, yaw, and roll values from the IMU. “It took a bit of effort, as did calibrating the ranges and limits of minimums and maximums.”

Gary’s YouTube video amply demonstrates the extra sound possibilities his Gesture Controller can generate

Having first contemplated a multi-DOF expression pedal a few years ago, the MIDI Gesture Controller is now up and running, and Gary continues to tweak and improve it, planning to add a few extra features. He always likes to have a project on the go, is unafraid to try things, and is a big advocate for experimenting with designs in Tinkercad. A few years ago, he launched a Raspberry Pi-based Wi-Fi blocker that caught the press’ attention. The Kickstarter campaign wasn’t successful, but it was a fun project, and he still owns the trademark for a Wi-Fi ‘notspot’.

The MagPi #149 out NOW!

You can grab the new issue right now from Tesco, Sainsbury’s, Asda, WHSmith, and other newsagents, including the Raspberry Pi Store in Cambridge. It’s also available at our online store, which ships around the world. You can also get it via our app on Android or iOS.

You can also subscribe to the print version of The MagPi. Not only do we deliver it globally, but people who sign up to the six- or twelve-month print subscription get a FREE Raspberry Pi Pico W!

The post Raspberry Pi Pico MIDI Gesture Controller appeared first on Raspberry Pi.

HackerBox 0110 Explores MIDI and Synth Technology with Raspberry Pi Pico 2

HackerBox 0110 offers a hands-on kit for synthesizer technology, showcasing the capabilities of the Raspberry Pi Pico 2. Equipped with the RP2350 microcontroller, the kit enables exploration of MIDI technology, sound synthesis, and digital audio applications, providing tools for both learning and experimentation. The Raspberry Pi Pico 2 was launched last year, offering significant hardware […]

Turning a desk mat into a MIDI drum kit

Playing drums is a lot of fun, but drum sets are very big and very loud. They also aren’t cheap. Those factors keep them from being an option for many people who would otherwise be interested. Conventional electronic drum sets are much quieter and a bit more compact, but they still take up a fair amount of space and come with hefty price tags. That’s why Cybercraftics designed this DIY drum set mat that solves all of those problems.

This is an electronic drum set in the form of a flexible desk mat. It is affordable to build and can be tucked away in a closet or cupboard when not in use. It doesn’t have the same layout as a real drum set, but it can still help new drummers learn fundamentals like paradiddles. Those require a lot of practice to ingrain the motions into muscle memory and this mat makes it possible to run through the rudiments just about anywhere without loud noises disturbing anyone.

Cybercraftics designed this drum mat to work like a standard MIDI (Musical Instrument Digital Interface) input device, but with piezoelectric sensors instead of buttons. Those produce a signal when struck. They are analog signals and there are seven sensors, so this project uses an Arduino Leonardo board that has enough analog input pins. The Leonardo also has a Microchip ATmega32U4 microcontroller, which means it is configurable as a USB HID — handy for interfacing with whatever MIDI software you may want to use.

On the physical side, this is just two desk mats cut and glued together, which circular pieces covering the piezoelectric sensors. A small 3D-printed enclosure protects the Arduino.

If you’ve ever wanted to get into drumming, this may the opportunity you’ve been waiting for.

The post Turning a desk mat into a MIDI drum kit appeared first on Arduino Blog.

❌