Databending using Audacity

Thanks to some help on the Audacity forum I finally know out how to use Audacity to databend. Previously I’d been using mhWavEdit, which has its limitations and just doesn’t feel as familiar as Audacity. From talk on the various databending discussion boards I found that people would often use tools like Cool Edit/Adobe Audition for their bends. Being on Linux and restricting myself to things that run natively (i.e. not under Wine) presented a new challenge. Part of my task was to replicate the methods others have found but under Linux. My ongoing quest is to find things that only Linux can do, which I’m sure I’ll find when I eventually figure out how to pipe data through one program into another!

Here’s some of my current results using Audacity:

Gabe, Abbey, L and me (by hellocatfood)

Liverpool (by hellocatfood)

Just so you don’t have to go trawling through the posts on the Audacity forum here’s how it’s done. It’s worth noting that this was on using Audacity on Linux. Versions on other operating systems may be different. Before I show you this it’s probably better if you work with an uncompressed image format, such as .bmp or .tif. As jpgs are compressed data there’s always more chance of completely breaking a picture, rather than bending it. So, open up GIMP/your faviourite image editor and convert it to an uncompressed format. I’ll be using this picture I took at a Telepaphe gig awhile back

Next, download Audacity. You don’t need the lame plugin as we wont be exporting to mp3, though grab it if you plan to use it for that feature in the future. Once you have it open go to File > Import > Raw Data and choose your file. What you’ll now be presented is with options on how to import this raw data, which is where I would usually fall flat.

Import Raw Data

Import Raw Data

Under Encoding you’ll need to select either U-Law or A-Law (remember which one you choose). When you choose any other format you’ll be converting the data into that format. Whilst you want to achieve data modification this is bad because it’ll convert the header of the image file, thereby breaking the image. U/A-Law just imports the data. The other settings do have significance but I wont go into that here. When you’re ready press Import and you’ll see your image as data!

Image as sound

Image as sound

Press play if you dare, but I’d place money on the fact that it’ll probably sound like either white noise or Aphex Twin glitchy goodness. This is where the fun can begin. For this tutorial select everything from about five seconds into the audio. The reason for this is because, just like editing an image in a text editor, the header is at the beginning of the file. Unless you know the size of the header and exactly where it ends (which you can find out with a bit of research), you can usually guess that it’s about a few seconds into the audio. The best way to find it out is to try it out!

Anyway, highlight that section and then go to Effect > Echo

Apply the echo

Leave the default settings as they are and press OK

You’ll see that your audio has changed visually. It still wont sound any better but the magic happens when you export it back to an image file, which is the next step.

Once you’re happy with your modifications go to File > Export. Choose a new location for your image and type in the proposed new file name but don’t press save just yet. You’ll need to change the export settings to match the import settings.

screenshot_11_16_110037

Change the file format to Other Uncompressed Files and then click on the Options button.

Export settings

Export settings

Change the settings to match the ones above (or to A-Law if you imported as A-Law). With that now all set you can now press Save! If you entered a file extension when you were choosing a file name you’ll get a warning about the file extension being incorrect, but you can ignore it and press Yes. If you didn’t choose a file extension, when the file is finished exporting, add the appropriate extension to the file. In my case I’d be adding .bmp to the end.

Here’s the finished image:

Freaky!

Freaky!

There’s of course so many different filters available in Audacity, so try each of them out! If you’re feeling really adventurous try importing two or more different images and then exporting them as a single image.

17 Responses to “Databending using Audacity”

  1. KOOLSKULL says:

    hell yes man, this is rad!

  2. nospr says:

    Does this work with uncompressed Video?

  3. KOOLSKULL says:

    ooooh that sounds like an awesome experiment!

  4. Trystan says:

    I think I’m doing everything right, I’m changing the extensions to .bmp on the original and the finished project, I haven’t modified the header in the audio file, and it’s U law both times. What could I be doing wrong?

  5. hellocatfood says:

    A variety of things. If it doesn’t work with one image try it with another.

  6. El Huesudo II says:

    Wow! I followed your method, it’s pretty cool!

    I found an interesting thing you can do with databending: Load 2 BMP files of the same size as 2 RAW data mono channels, eliminate the header off one of them (having 2 files open at the same time helps identifying the header’s length), and export them as is. The results are quite surprising.

  7. bitsynthesis says:

    I use “Unsigned 8 bit” as my import and export setting for photoshop RAW and TIFF files. It works fine.

  8. hellocatfood says:

    I’m using GIMP on Ubuntu, so can’t test Photoshop RAW. I think I’ve tried loading TIFF’s with other settings to no avail. What settings do you use when you save the TIFF from Photoshop?

  9. bitsynthesis says:

    After a bit of testing it looks like you’re right about TIFFs, though I’m certain that I had them working in the past..

    Anyway, unsigned 8-bit works great with Photoshop RAW files, you just have to make note of the image size so you can tell Photoshop how to display it when re-importing.

    I tried using GIMP’s raw export setting, but it can’t even read its own raw files, let alone after they’ve been run through Audacity.

  10. hellocatfood says:

    I’ve actually found a similar way, but that can in turn convert any data into an image, all you need to do is remember or specify the image dimensions and a bit depth.

    I’ve never used the command line on Mac or Windows, but on Linux, with ImageMagick installed you just use

    convert -size 800×800 -depth 8 rgb:infile.bmp outfile.bmp

    Just change the values where necessary. Using this method it doesn’t matter if you mess up the headers

  11. bitsynthesis says:

    Oh, wonderful!

    I love ImageMagick.

    The commands should be the same on Mac since it uses a Bash terminal. Ruby scripts I’ve written for Rmagick (which wraps ImageMagick) work on both Mac and Ubuntu.

  12. [...] other artworks, Antonio Roberts’ site contains a number of interesting tutorials, including this one on databending images using Audacity, and another on manipulating vector [...]

  13. Andy says:

    How do I do this with Audacity mac, as there is no export file option, I can only export it as three pre-determined formats.

  14. hellocatfood says:

    I use Linux, so can’t help you on that one.

  15. bitsynthesis says:

    Hey Andy,

    I use Audacity 1.3.7 for Mac OS X 10.5.8 – There is an Export option in the File menu just as described in this post.

    What version of Audacity are you using?

  16. DougTheBUg says:

    This article was the KEY to me being able to use Audacity for databending. I had never had much success before it.

    Good to see some people are still into it. I thought it had largely died off.

Leave a Reply

  • Archives

    • 2010 (41)
    • 2009 (61)
    • 2008 (171)
    • 2007 (6)
    • 2005 (5)