Labels: databending
background
click to change it
persoblogs
* indicates blogs i designed
archives
i still haven't quite solved the mystery of PNG databending. most of the time, the results are crap, but every once in a while you get an awesome effect i call PNG smearing. i don't know how to do it consistently, but if i put in a couple hours, i can get a few good ones:
it's been a few weeks, so we're well overdue for some friday cat bending.
pasting together interleaved and non-interleaved raw files:
pasting together a glitched jpg with the original raw:
running different audio effects (distortion, reverse, inverse) on different channels:
pasting together interleaved and non-interleaved raw files:
pasting together a glitched jpg with the original raw:
running different audio effects (distortion, reverse, inverse) on different channels:
Labels: databending
some new twists on old techniques this week. for this first one, i copied the green channel of one photo and pasted it on top of another. of course, you could do this much more easily in photoshop, but then it wouldn't be "cat bending", so i did it in adobe audition:
the original image i was working with this week was fairly dark—dark enough that when i ran it through wordpad, it warped so much that it became just a bunch of diagonal lines. since brighter images warp less in wordpad, i decided to invert the image and then wordpad it. and again, i could've inverted it in photoshop, but did it in adobe audition instead just for the hell of it:
then i flipped that image horizontally and ran it through wordpad again:
then i saved it as a new file, flipped it horizontally again, and ran it through wordpad yet again:
then i repeated the process a few more times:
i did keep going even after this, but by that point it wasn't doing anything all that interesting anymore. ¶
the original image i was working with this week was fairly dark—dark enough that when i ran it through wordpad, it warped so much that it became just a bunch of diagonal lines. since brighter images warp less in wordpad, i decided to invert the image and then wordpad it. and again, i could've inverted it in photoshop, but did it in adobe audition instead just for the hell of it:
then i flipped that image horizontally and ran it through wordpad again:
then i saved it as a new file, flipped it horizontally again, and ran it through wordpad yet again:
then i repeated the process a few more times:
i did keep going even after this, but by that point it wasn't doing anything all that interesting anymore. ¶
Labels: databending
welcome to part 2 of my databending primer! sorry about the lengthy delay between part 1 of this primer and part 2. if you haven't already read part 1, you may want to do so, as part 2 depends on various terms and concepts that were introduced in part 1.
this part is about sonification, and about databending with audio software. i'll show you how to coax databent sounds out of your windows hard drive using a type of audio software called a wav editor. then, i'll give you some tips for using the wav editor to create databent images.
sonification, put simply, is the act of converting data into sound. wikipedia points to some well-known examples, such as the geiger counter and sonar. it's an extremely broad field; here i'll be focusing on sonification in a databending context, or using sonification techniques to create art.
my first exposure to databending came in 1995 or '96. i'd been using a tracker program called scream tracker to create music on my computer, but scream tracker used an obscure file format for its audio samples. i wanted to be able to record my own sounds and sequence them, so i switched to a program called impulse tracker. quickly i discovered that impulse tracker not only let me use wav files, but it let me open up any file on my hard drive as if it were a sound file, and then play and sequence the sounds. i was immediately hooked, and a couple years later i'd write & record an all-databending EP using impulse tracker: dissonance is bliss. obviously, i'm still databending today, though i've since moved on to other software.
techniques
if you have programming/software development skills, then the potential here is pretty limitless: you can sonify data in any way you can imagine. for the purposes of this primer, i'll be using off-the-shelf or freely available software.
one simple way to sonify data is to convert it to MIDI. MIDI (musical instrument digital interface) is a language that computers and synthesizers use to communicate with each other. if you're a musician who uses MIDI in your setup, you could use programs like GoMinimal!, Midifier, Midge, or GMC to generate an endless amount of "random" MIDI files. personally i've never had much use for MIDI, myself.
also, you can use programs like voice (and the java applet version) to "draw" sounds, somewhat similar to xenakis's UPIC system. and programs like metasynth and coagula can be used to do fun stuff like hiding pictures in your sounds to be viewable with a spectrograph. but these aren't exactly databending, at least not by my definition.
the unix and linux operating systems provide perhaps the easiest way to sonify data: piping data directly to the sound card.
if you're on windows, you can do something pretty similar using wav editing software, which is what i'll be focusing on for the rest of this post. i'll be using adobe audition for my screenshots, but these techniques should work with any windows wav editor (or at least every one i've tried). if you don't have a wav editor installed, goldwave has a good free demo, and i've heard good things about audacity, which is open source. [update: per the comments, this apparently doesn't work in audacity.]
opening files in a wav editor
a wav editor is an application for recording waveform audio. you can think of the waveform as being as being a digital representation of a sound wave. the wav format is at the center of windows audio—when you rip a cd to mp3, you're actually ripping it to wav first, and then encoding mp3s based on those wavs.
so how do you open a non-audio file using a wav editor? if you read part 1 of this primer then you may have already figured this part out. sonifying data in a wav editor is as easy as clicking "open"!
launch your wav editor. click the "open" button, or click the "file" menu and choose "open". the "open" dialog box will appear. as in part 1, the key here is the "files of type" setting at the bottom. in most applications, you want to set that to "RAW". (some applications will let you use "all files (*.*)"—including adobe audition, which is what i'm using for screenshots—but this won't work in many applications.)
you should now be able to select any file on your hard drive. if your wav editor has a "preview" feature ("auto play" in audition), you may even be able to listen to your files without actually opening them up. but let's open a file to see what happens. select a data file and click "open". a dialog box will appear with settings for you to choose (which settings are available will depend on what software you use). adobe audition actually has two dialog boxes:
here, you can just accept the defaults, or play around with them. the settings you choose will affect what your file sounds like. for example, increasing the sample rate will make your sound shorter (faster) and higher in pitch; decreasing the sample rate will make the sound longer and lower.
once you've made your selections, click OK, and your data file will be converted into a waveform. congratulations! you can now resave your file in WAV format and do whatever you want to it: sequence it, run effects on it, whatever!
what data sounds like, and what data sounds good
patience is a virtue when it comes to databending. the range of sounds you can find are virtually limitless, but actually finding them will take time—your hard drive may have millions of files on it, so it will take time to find the best-sounding ones.
the types of sounds you're most likely to find are slightly distorted "electronic" sounds. if you're old (or unfortunate) enough to be familiar with the sound a dial-up modem makes as it connects to the internet, then you'll find a lot of sounds like that. databent sounds could also be compared to 8-bit or chiptune sounds.
so what types of data sound good when sonified? obviously, this is subjective, but here are some tips.
compressed files generally just sound like static or white noise. this is because of how file compression works: all the relevant data is smooshed together as much as possible, so any patterns in the original data are lost. if you're looking for white noise (maybe as a background texture, or maybe you just want a fraction of a second to create hihat-like sounds with), they're great, but they're generally not of much use to me. examples of compressed files include ZIP, tarball, RAR, cabinet files (CAB), as well as compressed image formats such as JPG and PNG. also, most video file formats are compressed.
small files become really short sounds—percussive sounds or clicks. this is obvious if you think about it: a cd-quality sound file uses 44,100 samples per second for each channel (stereo sounds have two channels), so that's a lot of data just for one second of sound.
uncompressed image files including bitmaps (BMP, most TIF), photoshop and image-editor-native formats (PSD, RAW, etc) can be a source of all sorts of interesting sounds.
executable files (EXE, etc) sometimes sound good, or sometimes sound like compressed files—just a bunch of static.
one of my favorite files to listen to are soundfont files (SF2). these files are included with some sound cards to help replicate music and sound effects. each file is basically a bunch of audio samples one after the other—often in different pitches—so when you listen to them consecutively they sound like musique concrete. (for an example, all the background loops on the animals within animals track "this isn't newsworthy" are from a soundfont file, though some of them have been processed. also, all the "bent" ringtones on the bad taste ringtones page are from soundfont files.)
these are just some ideas; there are thousands of different file formats out there, created by all sorts of programs, and you may have something amazing on your hard drive that i've never heard of. as i said before, finding great sounds requires lots of patience.
for a taste of what kinds of sounds you can find when databending, download my aforementioned databending EP, dissonance is bliss, which is available for free download starting today. every sound in tracks 1-7 (aside from the vocal samples) was a file on my hard drive. you may also want to check out my true data 12", which i have for sale.
editing images in a wav editor environment
after a few years of making music out of databent sounds, i was ready to branch out, so i turned the idea on its head. instead of taking an image, converting it into sound, and making music out of it, why not process the sound, then turn it back into an image and see what happens? thus i began my first experiments with databending images, something i'm obviously still doing several years later. (though these days i do most of my bending in wordpad or with a hex editor.)
wav editors aren't the ideal image-bending environment for a number of reasons, but they do offer several unique advantages. first and foremost, they enable you to make dramatic changes using visual cues, in a way that would be difficult if not impossible in other environments.
for example, here is a typical TIF file (interleaved), as viewed in a WAV editor:
okay, that just looks like a big block of data, but if you zoom in closely at the beginning of the waveform, you can often see roughly where the header is, compared to the body of the file:
as usual, you generally want to avoid bending the header, but the body of the data is fair game (assuming you're working with bitmaps like BMP, TIF, or RAW).
here's an image in photoshop RAW format, non-interleaved with 0 headers. sometimes (but not always), you can see approximately where each channel begins and ends:
now we can do interesting things to the data, like running the "reverse" effect. this is the effect we'd use to play a sound backwards; it reverses the order of the specified data. if we reverse the data in the TIF file, we end up with an image that's upside-down:
(note that because i missed a few pixels here, the image is off-center. if i managed to reverse all the image data, the effect would be effectively the same as rotating the canvas 180 degrees in photoshop.)
if we reverse a non-interleaved file (photoshop RAW with 0 headers), we get a similar effect, only the red and blue channels will be swapped:
of course, you can do lots more than just reverse. most wav editors come with a number of built-in audio effects that you can run on your images, not to mention plug-ins you can install. here is the RAW file after running an EQ effect on it:
note the graininess. this is common when running audio effects on image data—a highly destructive form of editing. i'm not a big fan of the graininess, which is why i don't do this much any more (some old experiments are here and here). but maybe you are, or maybe you have the some cool effects that i don't. (i used to have a great one called acoustic mirror.)
what i much prefer doing is cutting and pasting. for one thing, cut-and-paste is one of the few audio effects that will work on volatile file formats like JPG, PSD, or PNG. (most audio effects will cause these files to break, and even cut-and-paste will break your files if you do it in the wrong place, or if the size of your bent file is even one byte over/under the original.) but also, it's a pretty cool effect. here's just a taste of what you can do with bitmap files and cut and paste:
those are all super-simple bends, using only cut and paste with only one source image. you can switch it up by using multiple source images, including other effects and rotation... whatever you can imagine.
tips for editing JPG/PNG/etc in a wav editor
as i mentioned earlier, editing your image files in a wav editor is highly destructive, and most methods will immediately break files saved in volatile formats like JPG, PNG, PSD, and so on. here are a few tips for safely editing those types of files:
never bend the header. the only time i've ever found it advisable to alter a file header is when bending the color table of a file that uses indexed color (namely, GIF and 8-bit BMP). so don't do it.
don't add or subtract bytes. many image formats specify their exact size in the header, and if the actual size of the file is off even slightly, they won't open. so you must be very careful that your file has the correct amount of data. i usually do this by only using cut and paste, and always being sure to paste (once, and only once) every time i cut something to the clipboard. another way is to pay close attention to exactly how long your selection is, and make sure you don't paste too much/too little data.
try tiny cuts. even minor changes can have major effects when working with these file formats, so try making changes of just a fraction of a second, or move things around but move them just a little bit.
files that don't open in one app may open in another. photoshop isn't very good at opening corrupted JPGs. the gimp is much more flexible, as is microsoft paint. if you don't seem to be having any luck, try opening your bent files in another app. also, the same file may render differently in different applications or on different hardware. so if you have two applications that will open bent JPGs, try using both—you may get different results.
your file may still break. even if you do everything right, you may end up cutting the wrong byte or pasting it into the wrong place, making it refuse to open. just be patient and never, ever bend your originals! always, always make a copy of your image, and bend only the copy.
editing PSD files in a wav editor
all the rules from the previous section apply to photoshop's native format—PSD. but in addition to the header, PSD (photoshop) files have a patch of must-not-bend data in between each channel. furthermore, the rule for not adding/subtracting byte applies to each channel of a PSD file. since it can be impossible to tell exactly where a channel begins or ends, you should expect these files to break frequently.
however, PSD files have features not found in most other formats, which offer some advantages. one advantage is support for layers. by editing a multi-layered PSD in a wav editor, you can glitch one layer without glitching the others. here, i've copied lily (our kitten) onto her own layer, and bent only the layer underneath:
another trick involving layers is to use duplicate layers. if you copy an image to a second layer, and then bend the file, you can effectively create two databent copies of the image, simultaneously. of course, this also gives you more opportunities to mess up and break the file.
(note that multi-layer PSD files also contain a composite layer at the end of the file, after all the other layers. this is basically a flattened version of the whole image, and is used for generating thumbnails and such. glitches made to individual layers will not be reflected in the composite layer and vice versa. if you break a layer, photoshop may still try to open the file based on this composite data. of course, each layer consists of three channels—assuming RGB color mode—so a two-layer RGB image will have a total of 9 channels, the last three being the composite layer.)
another advantage of PSD files is their extreme application sensitivity. remember how i said earlier that bent files sometimes render differently in different applications? well, bent PSD files render differently in different versions of photoshop. so here's exactly the same bent file as above, only opened in photoshop 7.0:
if that isn't weird enough, i've found that the same version of photoshop running on different hardware will render differently, and you'll even get different results from the same version running on the same hardware but on a different windows installation!
and the same file will render completely differently when opened with gimp. here's that same file again:
instead of the horizontal banding effect we see in photoshop, gimp treats bent PSD files much like a photoshop RAW file or non-interleaved TIF. (in my experience, different versions of gimp all render the same.) for this file, i made tiny cuts as mentioned above, which resulted in major changes in photoshop, but only subtle glitches in gimp.
why these applications render the same file differently is a mystery that hasn't been solved, but you can use this to become highly productive at databending. by installing multiple versions of photoshop as well as gimp, you can glitch a file once and get 3-4 databent images out of it. by glitching a multiple-layered PSD file and opening it in multiple applications, you can create 6, 9, or more databent images at once. add a second computer into the mix and you could do even more.
conclusion
so that wraps up part 2. we briefly discussed various types of sonification, and i showed you how to open your files in a wav editor and make music out of them. we then discussed databending image files using a wav editor, with some specific tips for editing PSD files.
the plan is for part 3 of the primer to be about reinterpretation—using photoshop to open non-image files, the same way we used a wav editor to open non-audio files, and stuff like that. of course, considering it took me 10 months to post part 2 after posting part 1, it may be a long while before part 3 goes up.
have fun databending, and be sure to post in the comments if you gain any additional insights into the ideas expressed here. ¶
this part is about sonification, and about databending with audio software. i'll show you how to coax databent sounds out of your windows hard drive using a type of audio software called a wav editor. then, i'll give you some tips for using the wav editor to create databent images.
sonification, put simply, is the act of converting data into sound. wikipedia points to some well-known examples, such as the geiger counter and sonar. it's an extremely broad field; here i'll be focusing on sonification in a databending context, or using sonification techniques to create art.
my first exposure to databending came in 1995 or '96. i'd been using a tracker program called scream tracker to create music on my computer, but scream tracker used an obscure file format for its audio samples. i wanted to be able to record my own sounds and sequence them, so i switched to a program called impulse tracker. quickly i discovered that impulse tracker not only let me use wav files, but it let me open up any file on my hard drive as if it were a sound file, and then play and sequence the sounds. i was immediately hooked, and a couple years later i'd write & record an all-databending EP using impulse tracker: dissonance is bliss. obviously, i'm still databending today, though i've since moved on to other software.
techniques
if you have programming/software development skills, then the potential here is pretty limitless: you can sonify data in any way you can imagine. for the purposes of this primer, i'll be using off-the-shelf or freely available software.
one simple way to sonify data is to convert it to MIDI. MIDI (musical instrument digital interface) is a language that computers and synthesizers use to communicate with each other. if you're a musician who uses MIDI in your setup, you could use programs like GoMinimal!, Midifier, Midge, or GMC to generate an endless amount of "random" MIDI files. personally i've never had much use for MIDI, myself.
also, you can use programs like voice (and the java applet version) to "draw" sounds, somewhat similar to xenakis's UPIC system. and programs like metasynth and coagula can be used to do fun stuff like hiding pictures in your sounds to be viewable with a spectrograph. but these aren't exactly databending, at least not by my definition.
the unix and linux operating systems provide perhaps the easiest way to sonify data: piping data directly to the sound card.
if you're on windows, you can do something pretty similar using wav editing software, which is what i'll be focusing on for the rest of this post. i'll be using adobe audition for my screenshots, but these techniques should work with any windows wav editor (or at least every one i've tried). if you don't have a wav editor installed, goldwave has a good free demo, and i've heard good things about audacity, which is open source. [update: per the comments, this apparently doesn't work in audacity.]
opening files in a wav editor
a wav editor is an application for recording waveform audio. you can think of the waveform as being as being a digital representation of a sound wave. the wav format is at the center of windows audio—when you rip a cd to mp3, you're actually ripping it to wav first, and then encoding mp3s based on those wavs.
so how do you open a non-audio file using a wav editor? if you read part 1 of this primer then you may have already figured this part out. sonifying data in a wav editor is as easy as clicking "open"!
launch your wav editor. click the "open" button, or click the "file" menu and choose "open". the "open" dialog box will appear. as in part 1, the key here is the "files of type" setting at the bottom. in most applications, you want to set that to "RAW". (some applications will let you use "all files (*.*)"—including adobe audition, which is what i'm using for screenshots—but this won't work in many applications.)
you should now be able to select any file on your hard drive. if your wav editor has a "preview" feature ("auto play" in audition), you may even be able to listen to your files without actually opening them up. but let's open a file to see what happens. select a data file and click "open". a dialog box will appear with settings for you to choose (which settings are available will depend on what software you use). adobe audition actually has two dialog boxes:
here, you can just accept the defaults, or play around with them. the settings you choose will affect what your file sounds like. for example, increasing the sample rate will make your sound shorter (faster) and higher in pitch; decreasing the sample rate will make the sound longer and lower.
once you've made your selections, click OK, and your data file will be converted into a waveform. congratulations! you can now resave your file in WAV format and do whatever you want to it: sequence it, run effects on it, whatever!
what data sounds like, and what data sounds good
patience is a virtue when it comes to databending. the range of sounds you can find are virtually limitless, but actually finding them will take time—your hard drive may have millions of files on it, so it will take time to find the best-sounding ones.
the types of sounds you're most likely to find are slightly distorted "electronic" sounds. if you're old (or unfortunate) enough to be familiar with the sound a dial-up modem makes as it connects to the internet, then you'll find a lot of sounds like that. databent sounds could also be compared to 8-bit or chiptune sounds.
so what types of data sound good when sonified? obviously, this is subjective, but here are some tips.
compressed files generally just sound like static or white noise. this is because of how file compression works: all the relevant data is smooshed together as much as possible, so any patterns in the original data are lost. if you're looking for white noise (maybe as a background texture, or maybe you just want a fraction of a second to create hihat-like sounds with), they're great, but they're generally not of much use to me. examples of compressed files include ZIP, tarball, RAR, cabinet files (CAB), as well as compressed image formats such as JPG and PNG. also, most video file formats are compressed.
small files become really short sounds—percussive sounds or clicks. this is obvious if you think about it: a cd-quality sound file uses 44,100 samples per second for each channel (stereo sounds have two channels), so that's a lot of data just for one second of sound.
uncompressed image files including bitmaps (BMP, most TIF), photoshop and image-editor-native formats (PSD, RAW, etc) can be a source of all sorts of interesting sounds.
executable files (EXE, etc) sometimes sound good, or sometimes sound like compressed files—just a bunch of static.
one of my favorite files to listen to are soundfont files (SF2). these files are included with some sound cards to help replicate music and sound effects. each file is basically a bunch of audio samples one after the other—often in different pitches—so when you listen to them consecutively they sound like musique concrete. (for an example, all the background loops on the animals within animals track "this isn't newsworthy" are from a soundfont file, though some of them have been processed. also, all the "bent" ringtones on the bad taste ringtones page are from soundfont files.)
these are just some ideas; there are thousands of different file formats out there, created by all sorts of programs, and you may have something amazing on your hard drive that i've never heard of. as i said before, finding great sounds requires lots of patience.
for a taste of what kinds of sounds you can find when databending, download my aforementioned databending EP, dissonance is bliss, which is available for free download starting today. every sound in tracks 1-7 (aside from the vocal samples) was a file on my hard drive. you may also want to check out my true data 12", which i have for sale.
editing images in a wav editor environment
after a few years of making music out of databent sounds, i was ready to branch out, so i turned the idea on its head. instead of taking an image, converting it into sound, and making music out of it, why not process the sound, then turn it back into an image and see what happens? thus i began my first experiments with databending images, something i'm obviously still doing several years later. (though these days i do most of my bending in wordpad or with a hex editor.)
wav editors aren't the ideal image-bending environment for a number of reasons, but they do offer several unique advantages. first and foremost, they enable you to make dramatic changes using visual cues, in a way that would be difficult if not impossible in other environments.
for example, here is a typical TIF file (interleaved), as viewed in a WAV editor:
okay, that just looks like a big block of data, but if you zoom in closely at the beginning of the waveform, you can often see roughly where the header is, compared to the body of the file:
as usual, you generally want to avoid bending the header, but the body of the data is fair game (assuming you're working with bitmaps like BMP, TIF, or RAW).
here's an image in photoshop RAW format, non-interleaved with 0 headers. sometimes (but not always), you can see approximately where each channel begins and ends:
now we can do interesting things to the data, like running the "reverse" effect. this is the effect we'd use to play a sound backwards; it reverses the order of the specified data. if we reverse the data in the TIF file, we end up with an image that's upside-down:
(note that because i missed a few pixels here, the image is off-center. if i managed to reverse all the image data, the effect would be effectively the same as rotating the canvas 180 degrees in photoshop.)
if we reverse a non-interleaved file (photoshop RAW with 0 headers), we get a similar effect, only the red and blue channels will be swapped:
of course, you can do lots more than just reverse. most wav editors come with a number of built-in audio effects that you can run on your images, not to mention plug-ins you can install. here is the RAW file after running an EQ effect on it:
note the graininess. this is common when running audio effects on image data—a highly destructive form of editing. i'm not a big fan of the graininess, which is why i don't do this much any more (some old experiments are here and here). but maybe you are, or maybe you have the some cool effects that i don't. (i used to have a great one called acoustic mirror.)
what i much prefer doing is cutting and pasting. for one thing, cut-and-paste is one of the few audio effects that will work on volatile file formats like JPG, PSD, or PNG. (most audio effects will cause these files to break, and even cut-and-paste will break your files if you do it in the wrong place, or if the size of your bent file is even one byte over/under the original.) but also, it's a pretty cool effect. here's just a taste of what you can do with bitmap files and cut and paste:
those are all super-simple bends, using only cut and paste with only one source image. you can switch it up by using multiple source images, including other effects and rotation... whatever you can imagine.
tips for editing JPG/PNG/etc in a wav editor
as i mentioned earlier, editing your image files in a wav editor is highly destructive, and most methods will immediately break files saved in volatile formats like JPG, PNG, PSD, and so on. here are a few tips for safely editing those types of files:
never bend the header. the only time i've ever found it advisable to alter a file header is when bending the color table of a file that uses indexed color (namely, GIF and 8-bit BMP). so don't do it.
don't add or subtract bytes. many image formats specify their exact size in the header, and if the actual size of the file is off even slightly, they won't open. so you must be very careful that your file has the correct amount of data. i usually do this by only using cut and paste, and always being sure to paste (once, and only once) every time i cut something to the clipboard. another way is to pay close attention to exactly how long your selection is, and make sure you don't paste too much/too little data.
try tiny cuts. even minor changes can have major effects when working with these file formats, so try making changes of just a fraction of a second, or move things around but move them just a little bit.
files that don't open in one app may open in another. photoshop isn't very good at opening corrupted JPGs. the gimp is much more flexible, as is microsoft paint. if you don't seem to be having any luck, try opening your bent files in another app. also, the same file may render differently in different applications or on different hardware. so if you have two applications that will open bent JPGs, try using both—you may get different results.
your file may still break. even if you do everything right, you may end up cutting the wrong byte or pasting it into the wrong place, making it refuse to open. just be patient and never, ever bend your originals! always, always make a copy of your image, and bend only the copy.
editing PSD files in a wav editor
all the rules from the previous section apply to photoshop's native format—PSD. but in addition to the header, PSD (photoshop) files have a patch of must-not-bend data in between each channel. furthermore, the rule for not adding/subtracting byte applies to each channel of a PSD file. since it can be impossible to tell exactly where a channel begins or ends, you should expect these files to break frequently.
however, PSD files have features not found in most other formats, which offer some advantages. one advantage is support for layers. by editing a multi-layered PSD in a wav editor, you can glitch one layer without glitching the others. here, i've copied lily (our kitten) onto her own layer, and bent only the layer underneath:
another trick involving layers is to use duplicate layers. if you copy an image to a second layer, and then bend the file, you can effectively create two databent copies of the image, simultaneously. of course, this also gives you more opportunities to mess up and break the file.
(note that multi-layer PSD files also contain a composite layer at the end of the file, after all the other layers. this is basically a flattened version of the whole image, and is used for generating thumbnails and such. glitches made to individual layers will not be reflected in the composite layer and vice versa. if you break a layer, photoshop may still try to open the file based on this composite data. of course, each layer consists of three channels—assuming RGB color mode—so a two-layer RGB image will have a total of 9 channels, the last three being the composite layer.)
another advantage of PSD files is their extreme application sensitivity. remember how i said earlier that bent files sometimes render differently in different applications? well, bent PSD files render differently in different versions of photoshop. so here's exactly the same bent file as above, only opened in photoshop 7.0:
if that isn't weird enough, i've found that the same version of photoshop running on different hardware will render differently, and you'll even get different results from the same version running on the same hardware but on a different windows installation!
and the same file will render completely differently when opened with gimp. here's that same file again:
instead of the horizontal banding effect we see in photoshop, gimp treats bent PSD files much like a photoshop RAW file or non-interleaved TIF. (in my experience, different versions of gimp all render the same.) for this file, i made tiny cuts as mentioned above, which resulted in major changes in photoshop, but only subtle glitches in gimp.
why these applications render the same file differently is a mystery that hasn't been solved, but you can use this to become highly productive at databending. by installing multiple versions of photoshop as well as gimp, you can glitch a file once and get 3-4 databent images out of it. by glitching a multiple-layered PSD file and opening it in multiple applications, you can create 6, 9, or more databent images at once. add a second computer into the mix and you could do even more.
conclusion
so that wraps up part 2. we briefly discussed various types of sonification, and i showed you how to open your files in a wav editor and make music out of them. we then discussed databending image files using a wav editor, with some specific tips for editing PSD files.
the plan is for part 3 of the primer to be about reinterpretation—using photoshop to open non-image files, the same way we used a wav editor to open non-audio files, and stuff like that. of course, considering it took me 10 months to post part 2 after posting part 1, it may be a long while before part 3 goes up.
have fun databending, and be sure to post in the comments if you gain any additional insights into the ideas expressed here. ¶
Labels: databending
there was no catbending last week because publishing problems caused the previous week's catbending to be delayed until monday, and two catbending posts in a week seemed like overbending. now we're back on schedule (fingers crossed):
photshop raw
wordpad effect, non-interleaved file reinterpreted as interleaved
wordpad effect, 8-bit bmp
wordpad effect, interleaved tif¶
photshop raw
wordpad effect, non-interleaved file reinterpreted as interleaved
wordpad effect, 8-bit bmp
wordpad effect, interleaved tif¶
Labels: databending
i tried to post this a few minutes after midnight friday morning, but was unable to publish. anyway, not much blogging here this week to speak of, but what the hell, here's some cat bending:
this week's images feature the wordpad effect as applied to 8-bit indexed-color BMP files (created using photoshop). ¶
this week's images feature the wordpad effect as applied to 8-bit indexed-color BMP files (created using photoshop). ¶
Labels: databending
this week's cat bending demonstrates the photoshop 6 truncation glitch, discovered by daniel temkin. more lilybending here. ¶
Labels: databending
it's been a while since i did any cat bending, and now i have a new cat, so here's some fun with the wordpad effect.¶
Labels: databending
here's my latest databent illustration. like the arsonist, this is a computer illustration that uses glitched JPEGs for the textures.
both works, as well as many other pieces, will be part of my upcoming gallery show at 111 arts gallery in muncie. opening reception for the show will be april 2.
both works, as well as many other pieces, will be part of my upcoming gallery show at 111 arts gallery in muncie. opening reception for the show will be april 2.
Labels: databending
i have a new t-shirt design up for voting at threadless:
this is a new style for me; i guess you could call it a databent illustration. but it's not an illustration that i made and then glitched; rather, it's an illustration created using bent JPEGs for the textures—the colors are really vibrant.
i think it came out quite well, but the threadless voters are fickle, so i'm curious to see how it'll score. i suspect it'll do better than my past submissions, but we won't really know until voting ends. (if it does poorly, i'll probably adapt it into a framed piece for a gallery showing i have in the works.)
so please check it out, and if you like it, register with threadless and vote! you can see the design in detail on flickr here. ¶
this is a new style for me; i guess you could call it a databent illustration. but it's not an illustration that i made and then glitched; rather, it's an illustration created using bent JPEGs for the textures—the colors are really vibrant.
i think it came out quite well, but the threadless voters are fickle, so i'm curious to see how it'll score. i suspect it'll do better than my past submissions, but we won't really know until voting ends. (if it does poorly, i'll probably adapt it into a framed piece for a gallery showing i have in the works.)
so please check it out, and if you like it, register with threadless and vote! you can see the design in detail on flickr here. ¶
Labels: databending
welcome to my databending and glitch art primer! in part 1, we're going to talk about one of my favorite glitch art effects—the wordpad effect. i'm starting off with this effect because it's so easy that any windows user should be able to do it (note: i haven't tried it in vista), but it's complex enough under-the-hood that it allows me to discuss several important principles of glitch art. but first, let's define a few terms.
databending is, in essence, the artistic misuse of digital information. the term is inspired by the similar art of circuit bending; you could say that databending is like circuit bending with no circuits. the term is used most frequently in the context of electronic music (primarily glitch music).
the most common types of databending are:
glitch art is visual art that involves or is caused by digital glitches or errors. (there's some debate over this, but for our discussions, we won't include art that simply "looks glitchy"; it has to involve real glitches.) not all glitch art is databent; sometimes it occurs naturally. hardware and software fail all the time, occasionally creating glitch art. but that depends on chance. let's talk about creating glitches on purpose—using databending techniques to create glitch art.
the wordpad effect:
the wordpad effect is a simple glitch effect i discovered a couple years back, with the help of my readers. here's how it works: you take a digital photo like this:
[note: all images in this primer are hosted on flickr. click the images to go to flickr, and to see larger versions.]
all you do is trick microsoft wordpad into opening the file (it's really easy). then, after the file is open, you click save. that's it! the file is now glitched:
pretty dramatic results, eh? is it really that simple? well, almost. if you're thinking there has to be a catch, you're right, but it's not a big one.
the catch is this: the wordpad effect generally only works on certain types of image files. specifically, it only tends to work on uncompressed bitmap files—the formats i use are BMP, TIF, and my favorite, photoshop RAW. if you try to use the wordpad effect on a compressed image file, such as a JPG or PNG file, the file will most likely break. this is because the wordpad effect is highly destructive—it often adds lots of glitches—and file compression tends to make files fragile—difficult to glitch without breaking. in compressed files, each bit is important, so even a tiny glitch in the wrong place can have a major effect. we'll use that to our advantage in part 3 when we glitch JPGs, but for now, let's avoid compressed files.
how to do it, step by step:
first, find an image file you want to glitch. make sure you know exactly how large it is, in pixels. my fiancée's camera takes pictures that are 2272x1704 pixels by default, so that's the size i'll be working with. your image is probably a different size. write down this info if you think you might forget it. i'm going to use this image:
make a copy of your image file. important: never, ever glitch your original images! always, always make a copy of the file and make sure you're glitching the copy and not the original. if you glitch your original and break it, your photo will be gone forever! so don't glitch your originals! ever! i cannot stress this enough.
make sure your image file is in one of these file formats: BMP, TIF, or photoshop RAW. if it's not, you can change the format using the "save as" command in pretty much any image editor:
open up microsoft wordpad. you can find it in the start menu under "applications". wordpad is a mini text editor that comes free with microsoft windows. its main function is to provide rich text formatting and to allow users who don't have microsoft word to open word files. if you have word, wordpad is pretty much useless... except for databending.
in wordpad, go to the file menu and click "open". at the bottom of the "open" dialog box is an option called "files of type". select "all documents (*.*)" for the file type. you may now choose your image file and open it.
(a common misconception of first-time databenders is thinking that they need to manually change the file extension of their files in order to open them in an "incorrect" application. generally, the way to do it [in windows] is to save the file normally, and then change the "files of type" setting in the target app to either "all documents" or "raw".)
wait for a moment while wordpad loads and formats the file. you have successfully convinced wordpad that your image file is a text file, and it will diligently try to reformat your file to fit the screen, changing straight quotes into "smart" or curly quotes, adding line breaks, and stuff like that. this formatting is what actually causes the glitches in your image, and the process may take a few seconds if the file is large. if the file is really big, it might even appear to hang, but just leave it alone and it should eventually finish (or on rare occasions, wordpad will crash and close, in which case you should try a different file).
after the file has fully loaded, go to the file menu and click "save".
go into the image editor of your choice and try to open your databent file. you may be prompted to enter the height and width for the image (which is why i told you to write it down earlier). my image looks like this:
you might get an error message—or several. click OK. eventually, you may find that your file won't open. it's possible that wordpad has broken the file—as i said, the wordpad effect is highly destructive, and sometimes it even breaks bitmaps. if so, try again using a different file format or a different image. on the other hand, it's also possible that your image editor is too sensitive about opening files with errors; try opening the file in microsoft paint, instead. if it won't open in paint, the file is probably fried.
the image above is a TIF file. let's try again with a BMP:
at this point, you may be looking at these two images (or your own, if following along at home) and thinking that they fall short compared to the example i showed earlier. that earlier example was full of bright, vibrant colors, while these are far more grey. what gives? the difference between that first example and these two is that the latter files are interleaved and the first example was not.
interleave vs non-interleave:
interleaving is a method of storing data in a non-contiguous manner. in this context it refers to the way that the file stores color information. your bitmap file most likely uses RGB color mode. this means that color values are stored as a combination of red, green, and blue. because the file is uncompressed, the file lists the color value for every pixel in the image. the interleaving refers to what order these pixel values are stored in.
if an image file is interleaved, the color values are stored in RGB order, one pixel at a time, like this: RGBRGBRGB... the bitmap data in the file (which comes after the header) will be basically just one long block of RGB values—for TIFs, they're stored from top-left down, and for BMPs, they're stored from bottom-right up. (BMPs are also stored in BGR order rather than RGB.) so, if you were to, say, insert two bytes of data near the beginning of the bitmap data, right before the R value, it would then "push" the other pixels over, and the R would become G, and so on. this way, you can easily create RGB color shifts in bitmaps, where reds become greens, greens become blues, and blues become reds. you may see a lot of these in your databent interleaved images.
on the other hand, if the file is not interleaved, the color information is saved as three color channels, one each for red, green, and blue. each channel is basically a grayscale image, and the bitmap data in the file stores the entire red channel, then the entire green channel, and finally the entire blue channel. when you run the wordpad effect on a non-interleaved file, each channel gets its own unique glitches, and the channels come out of alignment with each other, which can lead to some stunningly colorful bends.
so how do you create non-interleaved bitmaps? the BMP file format doesn't allow it; BMPs are always interleaved. in the TIF file format, interleave is optional, so you can choose whether your TIFs use interleaving (default is yes)... if your software supports it. a lot of image software doesn't support non-interleaved TIF files; i don't think any of the applications that come with windows do, nor does the popular (and free) GIMP editing suite. adobe photoshop does support non-interleaved TIFs:
so here is my image, as a non-interleaved TIF, run through wordpad:
then again, if you have adobe photoshop, you might be better off with the photoshop RAW format, which is possibly my favorite format for bending.
photoshop RAW format:
photoshop RAW format is a proprietary raw image format available in adobe photoshop. as far as i know, no other application can open these files, which have an .RAW file extension. so if you don't have photoshop, you can't use this format (though your image editor may have its own similar format; you never know).
what makes this format so great is its flexibility. not only can you choose whether or not to use interleaving, but setting the number of color channels is as easy as typing in a number. this allows you to work with grayscale files and CMYK color (though my experiments with CMYK have been underwhelming). and perhaps best of all, this format allows you to create files with zero headers that are impossible to break!
pretty much every file on your computer has a file header containing various data, such as what type of file it is, how large it is, and so on. most of the time, you need to carefully avoid bending the file header, because corrupting the header is the easiest way to break the file (with rare exceptions). photoshop RAW format allows us to avoid dealing with headers at all, simply by typing 0 into the header box. if you have a RAW file with no header, you can do just about anything you want to it—bend it in any way you can imagine—and it will still open.
i've now resaved my source image as a non-interleaved raw file with no headers. let's see what happens when i run it through wordpad and then try to reopen it in photoshop:
since we saved the file with no headers, photoshop has no way of knowing anything about this image. sometimes it is able to guess the size settings based on how large the file is, but most likely it will guess wrong. so when using this format, it's essential that you make a note of your image's exact pixel dimensions before bending it. in this case, as i said earlier, the image is 2272x1704 pixels, the file is not interleaved, and the number of color channels is 3 (for RGB). here's what the image looks like after running it through wordpad:
looks a lot like the non-interleaved TIF, doesn't it? the two formats are pretty similar, so aesthetically you won't notice a whole lot of difference between bent RAW files and bent TIF files that use the same settings. the biggest difference is that you can break TIF files by corrupting the header.
so that's the wordpad effect. you might note that the images in the tutorial are far more heavily glitched than the example at the top of the post. how heavy the glitching gets depends on your source image. sometimes, you'll even get images that don't bend at all! the pattern behind this is a mystery... let me know if you crack it.
note also that after you've run an image file through wordpad once, running it through a second time has no effect. that's because wordpad has already reformatted the file to its liking. if you want to use the effect on the same image multiple times, you'll need to alter the data somehow in between passes, for example by saving the image to a new file. another interesting variant is to flip the databent image horizontally, and then run the flipped image through wordpad—i call this reverse wordpad.
that's it for part 1 of this primer. if you're on windows, you should now know enough to apply the wordpad effect to all your images. if you're not on windows, the information should still come in handy for glitching bitmap files. and even if you're already a databender, hopefully you've learned something.
in part 2, i'll discuss sonification and making music out of the files on your hard drive. then in part 3, i'll come back to glitch art and talk about bending JPG files. ¶
databending is, in essence, the artistic misuse of digital information. the term is inspired by the similar art of circuit bending; you could say that databending is like circuit bending with no circuits. the term is used most frequently in the context of electronic music (primarily glitch music).
the most common types of databending are:
- reinterpretation—converting a file from one medium to another (say, converting an executable file into an image file) or from one file format to a dissimilar format)
- sonification—the reinterpretation of non-audio data into audio data—probably the most common form of databending
- forced errors—forcing an application or piece of hardware to fail in the hopes that it will behave unexpectedly or the data will corrupt
- incorrect editing—editing a file using software/hardware intended for a different form of data; say, editing non-text files in a text editor
glitch art is visual art that involves or is caused by digital glitches or errors. (there's some debate over this, but for our discussions, we won't include art that simply "looks glitchy"; it has to involve real glitches.) not all glitch art is databent; sometimes it occurs naturally. hardware and software fail all the time, occasionally creating glitch art. but that depends on chance. let's talk about creating glitches on purpose—using databending techniques to create glitch art.
the wordpad effect:
the wordpad effect is a simple glitch effect i discovered a couple years back, with the help of my readers. here's how it works: you take a digital photo like this:
[note: all images in this primer are hosted on flickr. click the images to go to flickr, and to see larger versions.]
all you do is trick microsoft wordpad into opening the file (it's really easy). then, after the file is open, you click save. that's it! the file is now glitched:
pretty dramatic results, eh? is it really that simple? well, almost. if you're thinking there has to be a catch, you're right, but it's not a big one.
the catch is this: the wordpad effect generally only works on certain types of image files. specifically, it only tends to work on uncompressed bitmap files—the formats i use are BMP, TIF, and my favorite, photoshop RAW. if you try to use the wordpad effect on a compressed image file, such as a JPG or PNG file, the file will most likely break. this is because the wordpad effect is highly destructive—it often adds lots of glitches—and file compression tends to make files fragile—difficult to glitch without breaking. in compressed files, each bit is important, so even a tiny glitch in the wrong place can have a major effect. we'll use that to our advantage in part 3 when we glitch JPGs, but for now, let's avoid compressed files.
how to do it, step by step:
first, find an image file you want to glitch. make sure you know exactly how large it is, in pixels. my fiancée's camera takes pictures that are 2272x1704 pixels by default, so that's the size i'll be working with. your image is probably a different size. write down this info if you think you might forget it. i'm going to use this image:
make a copy of your image file. important: never, ever glitch your original images! always, always make a copy of the file and make sure you're glitching the copy and not the original. if you glitch your original and break it, your photo will be gone forever! so don't glitch your originals! ever! i cannot stress this enough.
make sure your image file is in one of these file formats: BMP, TIF, or photoshop RAW. if it's not, you can change the format using the "save as" command in pretty much any image editor:
open up microsoft wordpad. you can find it in the start menu under "applications". wordpad is a mini text editor that comes free with microsoft windows. its main function is to provide rich text formatting and to allow users who don't have microsoft word to open word files. if you have word, wordpad is pretty much useless... except for databending.
in wordpad, go to the file menu and click "open". at the bottom of the "open" dialog box is an option called "files of type". select "all documents (*.*)" for the file type. you may now choose your image file and open it.
(a common misconception of first-time databenders is thinking that they need to manually change the file extension of their files in order to open them in an "incorrect" application. generally, the way to do it [in windows] is to save the file normally, and then change the "files of type" setting in the target app to either "all documents" or "raw".)
wait for a moment while wordpad loads and formats the file. you have successfully convinced wordpad that your image file is a text file, and it will diligently try to reformat your file to fit the screen, changing straight quotes into "smart" or curly quotes, adding line breaks, and stuff like that. this formatting is what actually causes the glitches in your image, and the process may take a few seconds if the file is large. if the file is really big, it might even appear to hang, but just leave it alone and it should eventually finish (or on rare occasions, wordpad will crash and close, in which case you should try a different file).
after the file has fully loaded, go to the file menu and click "save".
go into the image editor of your choice and try to open your databent file. you may be prompted to enter the height and width for the image (which is why i told you to write it down earlier). my image looks like this:
you might get an error message—or several. click OK. eventually, you may find that your file won't open. it's possible that wordpad has broken the file—as i said, the wordpad effect is highly destructive, and sometimes it even breaks bitmaps. if so, try again using a different file format or a different image. on the other hand, it's also possible that your image editor is too sensitive about opening files with errors; try opening the file in microsoft paint, instead. if it won't open in paint, the file is probably fried.
the image above is a TIF file. let's try again with a BMP:
at this point, you may be looking at these two images (or your own, if following along at home) and thinking that they fall short compared to the example i showed earlier. that earlier example was full of bright, vibrant colors, while these are far more grey. what gives? the difference between that first example and these two is that the latter files are interleaved and the first example was not.
interleave vs non-interleave:
interleaving is a method of storing data in a non-contiguous manner. in this context it refers to the way that the file stores color information. your bitmap file most likely uses RGB color mode. this means that color values are stored as a combination of red, green, and blue. because the file is uncompressed, the file lists the color value for every pixel in the image. the interleaving refers to what order these pixel values are stored in.
if an image file is interleaved, the color values are stored in RGB order, one pixel at a time, like this: RGBRGBRGB... the bitmap data in the file (which comes after the header) will be basically just one long block of RGB values—for TIFs, they're stored from top-left down, and for BMPs, they're stored from bottom-right up. (BMPs are also stored in BGR order rather than RGB.) so, if you were to, say, insert two bytes of data near the beginning of the bitmap data, right before the R value, it would then "push" the other pixels over, and the R would become G, and so on. this way, you can easily create RGB color shifts in bitmaps, where reds become greens, greens become blues, and blues become reds. you may see a lot of these in your databent interleaved images.
on the other hand, if the file is not interleaved, the color information is saved as three color channels, one each for red, green, and blue. each channel is basically a grayscale image, and the bitmap data in the file stores the entire red channel, then the entire green channel, and finally the entire blue channel. when you run the wordpad effect on a non-interleaved file, each channel gets its own unique glitches, and the channels come out of alignment with each other, which can lead to some stunningly colorful bends.
so how do you create non-interleaved bitmaps? the BMP file format doesn't allow it; BMPs are always interleaved. in the TIF file format, interleave is optional, so you can choose whether your TIFs use interleaving (default is yes)... if your software supports it. a lot of image software doesn't support non-interleaved TIF files; i don't think any of the applications that come with windows do, nor does the popular (and free) GIMP editing suite. adobe photoshop does support non-interleaved TIFs:
so here is my image, as a non-interleaved TIF, run through wordpad:
then again, if you have adobe photoshop, you might be better off with the photoshop RAW format, which is possibly my favorite format for bending.
photoshop RAW format:
photoshop RAW format is a proprietary raw image format available in adobe photoshop. as far as i know, no other application can open these files, which have an .RAW file extension. so if you don't have photoshop, you can't use this format (though your image editor may have its own similar format; you never know).
what makes this format so great is its flexibility. not only can you choose whether or not to use interleaving, but setting the number of color channels is as easy as typing in a number. this allows you to work with grayscale files and CMYK color (though my experiments with CMYK have been underwhelming). and perhaps best of all, this format allows you to create files with zero headers that are impossible to break!
pretty much every file on your computer has a file header containing various data, such as what type of file it is, how large it is, and so on. most of the time, you need to carefully avoid bending the file header, because corrupting the header is the easiest way to break the file (with rare exceptions). photoshop RAW format allows us to avoid dealing with headers at all, simply by typing 0 into the header box. if you have a RAW file with no header, you can do just about anything you want to it—bend it in any way you can imagine—and it will still open.
i've now resaved my source image as a non-interleaved raw file with no headers. let's see what happens when i run it through wordpad and then try to reopen it in photoshop:
since we saved the file with no headers, photoshop has no way of knowing anything about this image. sometimes it is able to guess the size settings based on how large the file is, but most likely it will guess wrong. so when using this format, it's essential that you make a note of your image's exact pixel dimensions before bending it. in this case, as i said earlier, the image is 2272x1704 pixels, the file is not interleaved, and the number of color channels is 3 (for RGB). here's what the image looks like after running it through wordpad:
looks a lot like the non-interleaved TIF, doesn't it? the two formats are pretty similar, so aesthetically you won't notice a whole lot of difference between bent RAW files and bent TIF files that use the same settings. the biggest difference is that you can break TIF files by corrupting the header.
so that's the wordpad effect. you might note that the images in the tutorial are far more heavily glitched than the example at the top of the post. how heavy the glitching gets depends on your source image. sometimes, you'll even get images that don't bend at all! the pattern behind this is a mystery... let me know if you crack it.
note also that after you've run an image file through wordpad once, running it through a second time has no effect. that's because wordpad has already reformatted the file to its liking. if you want to use the effect on the same image multiple times, you'll need to alter the data somehow in between passes, for example by saving the image to a new file. another interesting variant is to flip the databent image horizontally, and then run the flipped image through wordpad—i call this reverse wordpad.
that's it for part 1 of this primer. if you're on windows, you should now know enough to apply the wordpad effect to all your images. if you're not on windows, the information should still come in handy for glitching bitmap files. and even if you're already a databender, hopefully you've learned something.
in part 2, i'll discuss sonification and making music out of the files on your hard drive. then in part 3, i'll come back to glitch art and talk about bending JPG files. ¶
Labels: databending