EP Composes a New Chiptune Each Time

[Captain Credible] is a chiptune music artist. He wanted to release an EP, but a regular old em-pee-three was too lame for him, so he made a tiny board with a coin cell, an ATtiny85, and a 3.5mm socket on it.

Rather than just writing some code to generate the tones for a pre-composed song, his “Dead Cats” EP generates the music itself. Using the arduino-tiny library, which adds the tone() function to the ATtiny, he has the chip pick its own time signature, key, subdivisions, and tempo. The melody and drum beat is randomly generated into an array. In addition to that, there are some code “one-liners” which insert unique sounds. After that the code just loops through the music.

If you don’t like the song, simply unplug the audio cable and plug it back in. The 3.5mm jack he chose has a built-in micro-switch, so the board is only powered up if someone is listening. If you’d like to see the circuit diagram, purchase the EP, or take a look at the code, all of that is available on his site.

A Pi Powered Recording Studio

In the mid-90s, you recorded your band’s demo on a Tascam cassette tape deck. These surprisingly cheap four-track portable studios were just low tech enough to lend an air of authenticity to a band that calls itself, ‘something like Pearl Jam, but with a piano’. These tape decks disappeared a decade later, just like your dreams of being a rock star, replaced with portable digital recording studios.

The Raspberry Pi exists, the Linux audio stack is in much better shape than it was ten years ago, and now it’s possible to build your own standalone recording studio. That’s exactly what [Daniel] is doing for our Raspberry Pi Zero contest, and somewhat predictably he’s calling it the piStudio.

Although the technology has moved from cassette tapes to CompactFlash cards to hard drives, the design of these four-track mini recording studios hasn’t really changed since their introduction in the 1980s. There are four channels, each with a fader, balance, EQ, and a line in and XLR jack. There are master controls, a few VU meters, and if the technology is digital, a pair of MIDI jacks. Since [Daniel] is using a Raspberry Pi for this project, he threw in an LCD for a great user interface.

As with all digital recorders, the money is in the analog to digital converters. [Daniel] is using a 24-bit, 216kHz, four-channel chip, Texas Instruments’ PCM4204. That’s more than enough to confuse the ears of an audiophile, although that much data will require a hard drive. Good thing there will be SATA.

Although you can buy an eight-channel solid state recorder for a few hundred dollars – and [Daniel] will assuredly put more than that into this project, it’s a great application of a ubiquitous Linux computer for a device that’s very, very useful.


Raspberry_Pi_LogoSmall

The Raspberry Pi Zero contest is presented by Hackaday and Adafruit. Prizes include Raspberry Pi Zeros from Adafruit and gift cards to The Hackaday Store!
See All the Entries || Enter Your Project Now!

Wifi Enabled Center Speaker

[Ronald] has been improving his audio set-up for a while now, his latest revision culminating in this WiFi enabled center channel speaker. It all started with feature creep as you can see in this direct quote, “Being an engineer, I couldn’t stop here, not now that I had a way of adding more features…”

He had purchased a new amplifier for his system, but was irritated that the loudness setting would re-enable itself every time he switched inputs. First he thought he might just have a little board that intercepted the signals from his remote and tacked on the loudness off signal. It occurred to him that it would be even cooler if he could control it from his computer or phone. So he opened the case on his new amp and discovered an i2c break-out. We can guess how it went after that.

In version 2.0 he kept most of his work from 1.0, but wanted to simplify the set-up and build it all into a center speaker unit since an amplifier and two speaker cabinets takes up too much room. He fit a similar set-up as before in the center speaker casing, but added a touch screen and a few other improvements.  Though, strangely, he ran into some problems upgrading to the Raspberry Pi 2.0 and had to revert.

The final result is very nice, though obviously not done. As the engineer’s mantra goes, “If it ain’t broke, it doesn’t have enough features yet.”

Aquire Awesome Audio for BeagleBone

[Henrik Langer] put his powerful audio acquisition and output board up on Hackaday.io, and we thought we’d point it out to you. It’s one of those projects that used to be pro audio just a few years back, but is doable (and affordable) DIY today: dual stereo inputs and four(!) stereo outputs, all sampled at 24 bits and up to 192 kHz. It’s configured as a BeagleBone cape, and comes with a customized Linux distribution for the ‘Bone.

What would you do with such a thing? It’s essentially a recording studio in your pocket, with a computer attached. The video (linked below the break) demonstrates using the device as a real-time stereo delay effect unit, but that’s only making use of one channel. Between effects, recording, and then all sorts of much-better-than-CD quality sound synthesis and playback possibilities, it’s an open-ended audio playground.

And all that from what is essentially a (very well-done) breakout board for a fancy DAC/ADC chip from Analog Devices: the AD1938. We’d love to have one of these on our desktop. Check out [Henrik]’s GitHub for the PCB and build instructions and BOM and everything else you’d need to get started. Very nice job!

Continue reading “Aquire Awesome Audio for BeagleBone”

Audio Streaming on the Cheap With an RPi Zero

The minuscule size of the Raspberry Pi Zero makes it perfect for hacks where size is a factor. For example, a small, standalone device for getting streaming audio into your speakers. The RPi Zero doesn’t have an audio output on board, so PolyVection paired it up with their PlainDAC to build a minimal audio streaming device.

Their build uses a few lines from the GPIO header to drive an I2S digital to analog converter. The DAC is a PCM5142 from Texas Instruments that provides high quality sound output, and contains a built in programmable DSP.

The hardware fits into a 3D printed case, coming in at 68 mm by 48 mm. There’s no WiFi inside, but this can be added with an external USB device for wireless streaming. The DAC used is supported by the Linux kernel, so a simple configuration is all that’s needed to pipe audio out.

Once you have a device like this assembled, you can install a server like Music Player Daemon to remotely control the device and cue up internet radio channels.

Swapping GPIO Pins on the Pi Zero for Audio

The new Raspberry Pi Zero is generating a lot of discussion, especially along the lines of “why didn’t they include…?” One specific complaint has been that audio is only available through the HDMI port. That’s not entirely true as pointed out by Lady Ada over at Adafruit.

Something to remember about the entire Pi family is the pins on the Broadcom processors are multipurpose. Does it increase the confusion or the capabilities? Take your pick. But the key benefit is that different pins can handle the same purpose. For audio the Greater Than Zero Pis (GTZPi) use PWM0_OUT and PWM1_OUT on the processor’s GPIO pins 40 and 45. On the GRZPis these feed a diode, resistor and capacitor network that ends at the audio output jack. They don’t appear on the GPIO connector so cannot be used on the Zero.

The multi-pin, multi-purpose capability of the Broadcom processor allows you to switch PWM0_OUT to GPIO 18 and PWM1_OUT to GPIO 13 or 19. Add the network from the Adafruit note, or check this schematic from the Raspberry Pi site – look at the lower right on the second page.

raspberry_pi_audiofilter

While you’re checking out the audio hack at Adafruit, read through the entirety of Introducing the Raspberry Pi Zero. Lady Ada provides a great description of the Zero and what is needed to start using it.

If you’re looking for Zero hacking ideas you might check the comments in our announcement about the Zero or article on the first hack we received. There is a lot of grist for the hacking mill in them.

Audio Effects on the Intel Edison

With the ability to run a full Linux operating system, the Intel Edison board has more than enough computing power for real-time digital audio processing. [Navin] used the Atom based module to build Effecter: a digital effects processor.

Effecter is written in C, and makes use of two libraries. The MRAA library from Intel provides an API for accessing the I/O ports on the Edison module. PortAudio is the library used for capturing and playing back audio samples.

F9GW4Y4IGQFYP23.MEDIUMTo allow for audio input and output, a sound card is needed. A cheap USB sound card takes care of this, since the Edison does not have built-in hardware for audio. The Edison itself is mounted on the Edison Arduino Breakout Board, and combined with a Grove shield from Seeed. Using the Grove system, a button, potentiometer, and LCD were added for control.

The code is available on Github, and is pretty easy to follow. PortAudio calls the audioCallback function in effecter.cc when it needs samples to play. This function takes samples from the input buffer, runs them through an effect’s function, and spits the resulting samples into the output buffer. All of the effect code can be found in the ‘effects’ folder.

You can check out a demo Effecter applying effects to a keyboard after the break. If you want to build your own, an Instructable gives all the steps.

Continue reading “Audio Effects on the Intel Edison”