icecheetah: A Cat Person holds a large glowing lightbulb (Default)
icecheetah ([personal profile] icecheetah) wrote2021-02-14 10:50 pm
Entry tags:

Databending Tutorial: Editing Images in Audacity

Now it's time to go over the first hurdle: Opening an image file in a program that's supposed to handle Audio and ONLY Audio.

Since .bmps are easier to not break and most of the stuff you can do in Audacity doesn't really differ between .bmps and .tiffs, just work with the .bmp copy for now.

In Audacity go:
File>Import>Raw Data

And navigate to your .bmp file. Once you select it, you will get the following options:



The most important part here is the Encoding. For (almost) guaranteed success, select U-law or A-law Encoding, and you MUST REMEMBER WHICH YOU CHOSE. For ease, I always select U-law. In my experiments I'd never noticed it affecting the end result. Others may work, but those are what I learned to use.

Byte Order, or Endieness, has never had an effect for me, but I've seen tutorials that insist you select "No Endianess". You can select it to be safe, I just leave it alone myself. As for channels, I always set the channels to "1 channel(mono)" for ease of editing. Leave the rest of the settings at their defaults.

Click "Okay" and your image should now be a sound track!



Assuming you have imported a .bmp, there will be a little segment at the very beginning that you MUST NOT TOUCH. Try zooming in and looking for it. It should be quite distinct. And not take up that much space.




This is the HEADER, a little bit of data at the beginning of a file that tells the program what it's supposed to do with the rest of it. Such as what size to display it as. Which is why we are not supposed to touch it. By importing it as RAW DATA, we essentially told Audacity that we were importing something that doesn't have a header and so the header was rendered as sound data like everything else in the file. Tutorials I've taken before have stated that you should leave the first second of the "track" alone, but I've found that usually the header is a lot smaller than that.

In my experience, .tiff files also have a FOOTER, a segment at the end of the file that absolutely must not be changed. And that's not the only reason .tiffs are more fiddly than .bmps.

So... what now?

Mess around!

Select parts of the "audio" and apply effects to them. Use the generate menu to replace segments of the image with different effects. Copy bits of the file and paste them elsewhere! With .bmps you can really go wild; as long as the "track" you create is not shorter than it was freshly imported, it should all work (.tiffs always break for me if I change the length at all). You could even shove an entire song into the file and the .bmp won't care.

Heck. If the image itself is small enough, you could replace everything that isn't the header with a song and see what you get. I did this once. And I discovered that if you edit the resulting image to be a low quality .jpeg, change that back to .bmp, it will make a staticy sound, but if you use the sharpen tool on that image and export that version to audacity... you get the song back. Not perfectly, but back.

Could potentially be useful in restoring low quality recordings.

Reverb, Reverse and Echo tend to be cool.

On the other hand for some reason the Vocoder effect always breaks the file for me. And I haven't been able to fix images broken by the Vocoder.

And how do you see what you've done?
You export the image.

File>Export Audio

Select the folder where you will place Audacity Bent Images
Save as Type: Other Uncompressed Files
Header: RAW (header-less) (so you don't overwrite your image's header with an audio header)
And select the Encoding you used for importing the image.
You can actually leave the filename alone, or change it to the same as with the original file (so .bmp)

now click save.

Once that's done, open the folder you saved to.
And you should see a preview! if not, that doesn't necessarily mean you won't be able to open it (but if the following doesn't work, see the "Repairing" tutorial that's coming later).

At this point, I right click and open the image in PAINT. Sometimes I find that more advanced image editors refuse to open the file, even if I saved it as a .bmp. But PAINT will. And it will do so fast. And if you like what you see, save it in whatever format you want. Now all your programs should be fine with it because PAINT fixed whatever issues other programs had with the file.

Congratulations! You have databent using Audacity!
Previous:Set Up and Organisation Next:Textbending Images.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting