Posts with «dsp» label

Stomping On Microcontrollers: Arduino Mega Guitar Effects Pedal

Effects pedals: for some an object of overwhelming addiction, but for many, an opportunity to hack. Anyone who plays guitar (or buys presents for someone who does) knows of the infinite choice of pedals available. There are so many pedals because nailing the tone you hear in your head is an addictive quest, an itch that must be scratched. Rising to meet this challenge are a generation of programmable pedals that can tweak effects in clever ways.

With this in mind, [ElectroSmash] are back at it with another open source offering: the pedalSHIELD MEGA. Aimed at musicians and hackers who want to learn more about audio, DSP and programming, this is an open-hardware/open-software shield for the Arduino MEGA which transforms it into an effects pedal.

The hardware consists of an analog input stage which amplifies and filters the incoming signal before passing it to the Arduino, as well as an output stage which does the DAC-ing from the Arduino’s PWM outputs, and some more filtering/amplifying. Two 8-bit PWM outputs are used simultaneously to make pseudo 16-bit resolution — a technique you can read more about in their handy forum guide.

The list of effects currently implemented covers all the basics you’d expect, and provides a good starting point for writing custom effects. Perhaps a library for some of the commonly used config/operations would be useful? Naturally, there are some computational constraints when using an Arduino for DSP, though it’s up to you whether this is a frustrating fact, or an opportunity to write some nicely optimised code.

[ElectroSmash] don’t just do pedals either: here’s their open source guitar amp.

Morse Decoder’s Lean and Sexy Search Algorithm

Often the Morse Code centered projects that we feature are to help you practice transmitting messages. This one takes a tack and builds an automatic decoder. We think [Nicola Cimmino's] project is well worth featuring simply based on his explanation of the Digital Signal Processing used on the signal coming in from the microphone. Well done. But he’s really just getting warmed up.

What makes this really stand out is a brilliant algorithm that allows conversion from Morse to ASCII using a lookup table of only 64 bytes. This provides enough room for A-Z and 0-9 without chance of collision but could be expanded to allow for more characters. Below is a concise description of how the algorithm works but make sure you take the time to read [Nicola's] project description in its entirety.

The algorithm can be decribed as follows. Have an index inside the lookup string inizialied to zero. Have an initial dash jump size of 64. At every received element (dot or dash) halve the initial dash jump and then increase by 1 the index inside the lookup string if a dot was received and by dash jump size if a dash was received. Repeat until a letter separator is reached, at that point the index inside the lookup string will point to the ASCII corresponding to the decoded morse.

Have you heard of this technique before? If so, tell us about it in the comments below. Before you jump all over this one, realize that Magic Morse uses a different technique.


Filed under: Microcontrollers, radio hacks

Guitar foot controller uses DSP for audio effects

This a screenshot taken from [Pierre's] demonstration of an electric guitar effects pedal combined with DSP and Pure Data. He pulls this off by connecting the guitar directly to the computer, then feeds the computer’s audio output to the guitar amp.

The foot controls include a pedal and eight buttons, all monitored by an Arduino. Pure Data, a visual programming language, interprets the input coming from the Arduino over USB and alters the incoming audio using digital signal processing. [Pierre] manages the audio connection using the JACK Audio Connection Kit software package.

In the video after the break he’s using a laptop for most of the work, but he has also managed to pull this off with a Raspberry Pi. There’s no audio input on the RPi board, but he’s been using a USB sound card anyway. The other USB port connects the Arduino and he’s in business.

[Thanks Walter]


Filed under: musical hacks
Hack a Day 30 Nov 15:58