From what we can understand, [ompuco] has built a 2D audio output on top of the Unity game engine, enabling him to output X and Y values from his stereo soundcard straight to an oscilloscope in XY mode. His code simply scans through all the vertexes in the scene and outputs the right voltages into the left and right audio streams. He’s using this to create some pretty incredible animations. Check out the video “additives” below for an example. (See if you can figure out what’s being “added”.)
As much as we like addressable LEDs for their obedience, why do we always have to control everything? At least participants of the MusicMaker Hacklab, which was part of the Artefact Festival in February this year, have learned, that sometimes we should just sit down with our electronics and listen.
With the end of the Artefact Festival approaching, they still had this leftover color-changing LED from an otherwise scavenged toy reverb microphone. When powered by a 9 V battery, the LED would start a tiny light show, flashing, fading and mixing the very best out of its three primary colors. Acoustically, however, it spent most of its time in silent dignity.
As you may know, this kind of LED contains a tiny integrated circuit. This IC pulse-width-modulates the current through the light-emitting junctions in preprogrammed patterns, thus creating the colorful light effects.
To give the LED a voice, the participants added a 1 kΩ series resistor to the LED’s “anode”, which effectively translates variations in the current passing through the LED into measurable variations of voltage. This signal could then be fed into a small speaker or a mixing console. The LED expressed its gratitude for the life-changing modification by chanting its very own disco song.
This particular IC seems to operate at a switching frequency of about 1.1 kHz and the resulting square wave signal noticeably dominates the mix. However, not everything we hear there may be explained solely by the PWM. There are those rhythmic “thump” noises, shifts in pitch and amplitude of the sound and more to analyze and learn from. Not wanting to spoil your fun of making sense of the beeps and cracks (feel free to spoil as much as you want in the comments!), we just say enjoy the video and thanks to the people of the STUK Belgium for sharing their findings.
Bela is a cape for the BeagleBone Black that’s aimed at artists and musicians. Actually, the cape is much less than half of the story — the rest is in some clever software and a real-time Linux distribution. But we’re getting ahead of ourselves. Let’s talk hardware first.
First off, the cape has stereo input and output as well as two amplified speaker outs. It can do all of your audio stuff. It also has two banks of analogue inputs and outputs, each capable of handling eight signals. In our opinion, this is where the Bela is cool. In particular, the analog outputs are not Arduino-style “analog outputs” where it’s actually a digital output on which you can do PWM to fake an analog signal. These are eight 16-bit outputs from an AD5668 DAC which means that you can use the voltages directly, without filtering.
Then there’s the real trick. All of these input and output peripherals are hooked up to the BeagleBone’s Programmable Realtime Units (PRUs) — a hardware subsystem that’s independent of the CPU but can work along with it. The PRU is interfaced with the real-time Linux core to give you sub-microsecond response in your application. This is a big deal because a lot of other audio-processing systems have latencies that get into the tens of milliseconds or worse, where it starts to be perceptible as a slight lag by humans.
The downside of this custom analog and audio I/O is that it’s not yet supported by kernel drivers, and you’ll need to use their “Heavy Audio Tools” which compiles Pd programs into C code, which can then drive the PRUs. Of course, you can write directly for the PRUs yourself as well. If you just want to play MP3s, get something you have a bunch of simpler, better options. If you need to do responsive real-time audio installations, Bela is a way to go.
The project is open-source, but we had to do a bunch of digging to find what we were looking for. The hardware is in zip files here, and you’ll find the software here. The demo projects look/sound pretty cool and their Kickstarter is long over-funded, so we’re interested to see what folks make with these.
In the open hardware world, we like to share 3D design files so that our friends and (global) neighbors can use and improve them. But we’ve all printed things from time to time that we’d like to keep secret. At least this is the premise behind this article in Science which proposes a novel method of 3D-printer-based industrial espionage: by recording the sound of the stepper motors and re-creating the toolpath.
Unfortunately, the article is behind a paywall so we’re short on the details, but everyone who’s played the Imperial March on their steppers has probably got the basic outline in their mind. Detecting the audio peak corresponding to a step pulse should be fairly easy. Disentangling the motions of two axes would be a bit harder, but presumably can be done based on different room-acoustic filtering of the two motors. Direction is the biggest question mark for us, but a stepper probably has a slightly audible glitch when reversing. Keeping track of these reversals could do the trick.
What do you think? Anyone know how they did it? Does someone with access to the full article want to write us up a summary in the comments?
[Thanks LVfire via Ars Technica]
[Edit: We were sent a copy of the full article (thanks [PersonUnknown]!) and it doesn’t explain any technical details at all. Save yourself the effort, and have fun speculating, because reading the article won’t help.]
There’s a reason that the bog-standard serial port will never die. It’s just so robust and simple. When you need a console that will absolutely work with minimal software and hardware, UART is the way to go. Because of this, UART hacks abound. Here’s a new one to us, and a challenge to our readers.
[Tiziano Bacocco] decided to use UART signals as a type of PWM to create audio. That’s right, he’s plugging the serial TX line straight into a speaker. This gives you eight possible PWM output voltage levels. The trick is using some Python code (using the awesome pyserial module) to down-quantize the audio data to fit these eight possible values and then push them out at the correct sampling rate.
ffmpeg is used to pre-process the files.
It’s just a little past Halloween, but Adafruit’s talking dog collar, modeled after the movie Up, is still a nice fusion between crafting and hacking.
One reason that Adafruit is so popular is that every time they sell us something, they give us some of the worlds best tutorials and libraries for free. For this project they’re using their Bluetooth LE board and their Audio FX board with a few more mundane vitamins to construct the collar. We’re sure the enterprising hacker could find alternatives if they so choose.
The collar is made of leather and 3D printed props. They went with alkaline batteries rather than lithium, to keep their doggy companion a little safer. All the electronics are hidden under the various props and the wiring is routed behind the belt. To control the app, the different sound bytes are mapped to buttons on their Bluetooth-to-serial phone app.
It’s a good starter tutorial, and the concept applied differently would definitely be good for at least one good prank on a coworker or friend.
[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.