Entries tagged with "audio"

Wednesday 27 August 2008

The Bee and the Express

Arduino projects: a noisemaker and an analog-to-MIDI interface

Express: back panel test mount I’m finally back to working on some electronic projects. First up, the Express, an analog-to-MIDI converter built around a Bare Bones Board, an inexpensive Arduino clone.

I’ve been making up some patches for my Evolver synth to use it as an effect on guitar or bass, and thought it’d be nice to have some sort of pedal to control it, along the lines of a wah or volume pedal. The desktop model of the Evolver lacks a pedal input, hence the Express (for “expression”, both of the musical and genetic kind - evolution, geddit?). Currently, it reads one analog pin and spits out continuous controller data. Nothing particularly spectacular there, but it did fit wonderfully into the sturdy steel case from a computer keyboard A/B switchbox. There’s room for lots more inputs, and eventually I figure it’ll sport an additional analog in and some footswitch inputs which will send things like note on/off messages.

I’m still new to making enclosures, and to working metal in particular - instead of grinding out a hole that was slightly too narrow, I used a drill, which grabbed hold of the edges and warped the heck out of the front panel. Panic set in for a moment, but I managed to bash the thing back into shape using a busted old hard drive(!) as an anvil.

Word to the wise: there are two incompatible standards for the wiring of expression pedals:

1/4” - tip to wiper / ring to +5V / sleeve to ground: Clavia, CME, Electrix, Emu, Kurzweil, Oberheim, Roland/Boss
1/4” - ring to wiper / tip to +5V / sleeve to ground: Kawai, Korg, Yamaha

The former arrangement allows you to use a standard normalling jack to connect the tip to ground by default, so the input doesn’t float if nothing’s plugged in. I’m using a Boss pedal now, but my other pedal is a Yamaha, so if I want to use it as a second input, I’ll have to wire up something to cross those connections.

Arduino (and Tarquin) Being easily distractible by possibilities - giant trackball! LED matrix! stepper motor-controlled time-lapse photography! - I’m desperately trying to focus on a couple of projects at a time. Arduino project number two at present is using it for ultra-cheap and dirty sound generation, with piezo disc speakers plugged directly into the digital outputs. A little hacked-together code, and voilĂ :

The Bee (MP3, 640k)

I call it the Bee, though “Mosquito” might have been more appropriate. Modulating the pulse width creates some nice motion, but there’s a lot more to do, like getting R/C filters to tame some of the harshness - it really is annoying after a while. Oh yes, and putting a switch on it to shut it up between tests. And, of course, buttons and knobs to play it with… maybe even some sort of acoustic treatment, like a resonating soundbox or a spring reverb.

Add a comment

Wednesday 24 October 2007

Fractal music

Wanted: self-similar audio waveform generation

I’ve been listening to a podcast from last year featuring Will Wright and Brian Eno, talking about generative art, and it gave me an interesting idea.

There have been a lot of attempts at so-called “fractal music” (here’s a bunch of links to several such projects), but all the ones I’ve heard just take a chunk of data from, say, the Mandelbrot set, and map it to one musical scale or another. It’s hard to really hear any self-similarity happening.

Which seems a lost opportunity. Think about it: sound waveforms themselves have fractal properties, because phenomena like vibration, resonance and oscillation happen on all physical scales. Speed up a thumping rhythm far enough and eventually it turns into a tone. And any waveform can theoretically be expressed as a mix of sine waves of different pitches. Fractal generation software lets you zoom in and out to see different fractals in near-infinite detail. What if we could do the same by speeding up or slowing down a piece of audio?

A big challenge, of course, would the problem of resolution. Whether you’re working with analog or digital audio, as you slow it down you’ll eventually start to lose detail in the high frequencies, until it all goes muddy. It’s akin to blowing up a photograph, until all you can see is the grain, or a bunch of great big pixels - or conversely, shrinking it until you run out of photograph. You could always pack in more data to describe a chunk of sound, but you’d end up with a gigantic file, and you’d always hit a wall somewhere. For best results the sound from our hypothetical audio-fractal would have to be computed on the fly.

Not a new idea, but as far as I know no one’s done it yet. There’s an entry for something called “All-Music-Set Player” at Halfbakery (a “communal database of original, fictitious inventions") which is pretty close to the mark. I’m not interested in generating all music, just creating interesting sounds to explore.

Controls: speed, perhaps other parameters like density or default shape. It’d be interesting to work in some sort of “scrub” control too.

Issues: what language to write such a thing in? How do you describe the waveform? (some sort of generative grammar that sums wavelets?) How do you set up such a generator so that you can calculate a value for a sample at an arbitrary point on the time axis? Is it even possible? The fact that I can’t find any examples of fractal audio generators makes me wonder if the obstacle is simply one of processing power…

(The podcast that sparked all this, by the way, is from a seminar series put on by the Long Now Foundation: Ogg | MP3 | text summary I’m afraid of Spore. I think it might eat me.)

5 comments

Wednesday 7 March 2007

Mbox2 addendum

I thought I’d peek at my server statistics for Forgery League, and see how people found their way to the site. One person apparently Googled “mbox high pitched buzz”, so I figure it’s a good time to mention:

I figured out what was causing the quiet whining noise on the Mbox’s monitor outputs. It was happening every time there was audio, which gave the impression that it was the data stream coming in through its own USB port. However, it turns out it was actually the video output. I’d attached a monitor to my PowerBook (an “Aluminum” series G4 with DVI video connection), and when I disconnected it, away went the screech.

Strange: the signal to the Mbox is digital, so you’d think it wouldn’t be susceptible to interference. Does the monitor signal introduce so much noise that it can travel down a USB cable and get picked up by the analog circuitry in the Mbox?

Sadly, this means having to use Logic on one small laptop screen some of the time, but I’m certainly glad I don’t have to get another outboard audio interface.

I haven’t yet tested whether it only appears on the monitor outs, or whether it gets recorded too, and whether it helps to use a different/better USB cable. I’ll do some more playing around when I get a chance. Stay tuned.

Add a comment
Page 1 of 1 pages