The difference between bitcrushers and sample rate reducers

bit

If you look around a few electronic music forums, you’ll see a lot of confusion over the difference between a bitcrusher – a filter that reduces the bit depth of an audio signal – and a sample rate reducer – a filter that does exactly what its name implies. With the popularization of 8-bit and retro synth music, this difference is obviously of grave import of concern to saints and kings alike. [Michael] is more than happy to walk us through the difference with real-time sample and bit rate adjustment with his audio hacker board.

The audio hacker board is an Arduino shield with a 12-bit DAC and a 12-bit ADC. With two 1/8″ jacks and a pair of pots, [Michael] was easily able to whip up a sketch that is able to adjust the sample rate and bit depth of an audio signal in real-time.

Contrary to nearly everyone’s opinion of what ‘8-bit’ music is, it’s actually the sample rate that makes music sound like a cassette deck jury rigged into a Nintendo Entertainment System. Reducing the bitrate just makes any audio source sound louder and worse.

Check out the excellent demo video of the effect of bitcrushers and sample rate reducers below.

[Read more...]

Giving toys an electronic voice

sound

Whether it’s a Furby or Buzz Lightyear’s button that plays, ‘To infinity and beyond’, most digital audio applications inside toys are actually simple affairs. There’s no Arduino and wave shield, and there’s certainly no Raspi streaming audio from the Internet. No, the audio inside most toys are one or two chip devices capable of storing about a minute or so of audio. [makapuf] built an electronic board game for his kids, and in the process decided to add some digital audio. The result is very similar to what you would find in an actual engineered product, and is simple enough to be replicated by just about anyone.

[makapuf]‘s game is based on Game of the Goose, only brought into the modern world with electronic talking dice. An ATtiny2313 was chosen for the microcontroller and an AT45D 4 Megabit Flash module provided the storage for 8 bit/8khz audio.

The electronic portion of the game has a few functions. The first is calling out numbers, which is done by playing recordings of [makapuf] reading, ‘one’, ‘two’, ‘three’, … ‘twelve’, ‘thir-‘, ‘teen’ and so on. This data is pumped out over a pin on the ATtiny through a small amplifier and into a speaker. After that, the code is a simple matter of keeping track of where the players are on the board, keeping score, and generating randomish numbers.

It’s an exceptional exercise in engineering, making a quite complicated game with a bare minimum of parts. [makapuf] estimated he spent under $4 in parts, so if you’re looking to add digital audio to a project on the cheap, we can’t imagine doing better.

You can see a video of [makapuf]‘s project after the break.

[Read more...]

The most evil gift ever

[form], a new user on the Hack a Day forums, was thinking, “what Christmas present i can send a friend, that would be really annoying?” We think he really hit it out of the park with this one. It’s a modified computer speaker that will play “explicit” audio until the power button is pressed 200 times and the light sensor is covered. When this present is unwrapped, the room will fill with sounds not suitable for children, the elderly, or those with heart conditions.

The build is based around an old powered computer speaker. Six Li-ion batteries from an old laptop provide the power, and a very simple circuit pulls sound off an SD card with the help of an ATtiny45.

The schematic for the build looks easy enough, and like a good builder, [form] included the source and HEX files. Sadly (or thankfully), there is no video of the gag gift in action; probably a good thing, because this seems like a great way to lose a friend.

Halloween Hacks: Scaring small children with Huffman coding

The team over at NerdKits decided they needed to do something for Halloween. Only on Halloween is scaring small children is an admirable goal, so they demoed a way to play creepy sounds after a door has been opened.

To trigger the sound, a magnetic reed switch from an alarm system is attached to a front door. This triggers the microcontroller and with a bit of delay, some creepy audio can be played on a pair of speakers. The team decided to store all the audio data on the flash memory of their ATmega328p, but that wouldn’t allow for a very long scream. To extend the length of the wails of the damned, the NerdKits team decided to use Huffman coded audio.

Because Huffman coding relies on the most common value being assigned the shortest code, the team used a bit of Python and C magic to figure out the optimal encoding for their audio file. After the evil laugh was sufficiently compressed, the microcontroller was programmed to decode the audio and send it to a pair of speakers. The team made all the software for their project available here for your perusal.

Although this project could be thrown together in an hour with an Arduino and an MP3 shield, the NerdKits team wants to get kids to learn how things work, also an admirable goal. [Humberto] from NerdKits put a video up explaining the theory of the project. Check it out after the break.

[Read more...]

RFID record player

Like most of us at Hack a Day, [Bertrand Fan] has a huge collection of digital music that was all obtained through legal channels. Missing the physical process of choosing and playing an album, [Bertrand] built an RFID record player to get rid of the paradox of choice that arises when thousands of albums are at your fingertips.

The records are repurposed Christmas ornaments with RFID disk tags pasted under the label. These records are read by a RedBee RFID reader and sent to a Popcorn Hour media server, but we’re guessing this could be easily adapted to any HTPC.

The only limitation we see is the fact that the RFID chip is hard coded to individual songs. We think it would be easier to have the RFID chip store an album’s CDDB discid, but feel free to leave a comment and say how you would catalog thousands of albums on RFID tags.

We’re a little tired of skipping though our music collection like a portable CD player from 1990, so we’re pretty impressed that [Bertrand] came up with something that would get us to sit down and listen to our Terabytes of FLAC-encoded music. Check out the video after the jump for a demo of the RFID record player.

[Read more...]

Digital Audio on the Parallax Propeller

[Beth] had the idea for transmitting digital audio over S/PDIF on a Propeller a few years ago, but only just got around to a writeup. For that, we thank her.

The writeup has a marvelous walkthrough of the S/PDIF protocol and the problems associated with with generating the signal. S/PDIF is a relatively resource-intensive protocol – the signal is clocked at 64x the audio sample rate. That signal is doubled for biphase mark code, keeping everything in sync. [Beth] says the microcontroller would neet at least 24 MIPS of processing power just to generate the S/PDIF signal – processing audio would be another task altogether. Because of the processing power needed, and the weird clock rates needed, [Beth] decided to go with the Propeller. The implementation uses only one core of the Propeller, leaving another seven cores available for sound synthesis or even a visualization over VGA.

[Beth] admits this could be done with just about any microcontroller (although it would need to be clocked at a multiple of 4.096 MHz for a 32kHz audio stream), but we really appreciate the work that went into bit-banging this signal.

Video of [Nick] at Gadget Gangster playing around with digital audio on a Propeller after the break.

[Read more...]

Fun with Barbie karaoke machines


[Peter Edwards] at Casper Electronics built a modular synth and integrated it with the Barbie karaoke machines we saw at Notacon last April. The complete unit consists of 25 modules which are wired together using banana cables. He’s using this homebrew step sequencer to control the bent karaoke machines which then feed into the rest of the synthesizer. If you’d like to bend your own barbie karaoke machine, [Peter] was kind enough to post schematics and instructions for his bends.