Skip to content

Instantly share code, notes, and snippets.

@Kahnix
Last active October 23, 2020 03:01
Show Gist options
  • Save Kahnix/436b5715f2f45a4f181ab10bbb9950dd to your computer and use it in GitHub Desktop.
Save Kahnix/436b5715f2f45a4f181ab10bbb9950dd to your computer and use it in GitHub Desktop.
A short guide on how to make your first glitch art, including advanced databending techniques through the use of GIMP and Audacity.

Advanced Glitches

Programs I use:

GIMP - Because its free, available to anyone and has a very useful features for glitching

Audacity - Software I use for the actual glitching process, also free and cross platform

Process:


Saving the image as the right format


Step 1) Find an image you like, for this example I'll just use this png:campus

Step 2) Load your image of choice in your graphics editor. I use GIMP but you can use Photoshop. Once you do so, Save the image again by pressing 'export' under a different name but add .tiff to the end, you can leave the default settings as they are, making sure there is no compression option ticked.

export

save as:

save_as

make sure you have no compression (Important):

compression


Loading the file in Audacity


Once you've saved the file as a tiff, open it in audacity and click File > Import > Raw Data, This is where we will be loading our image from.

Audacity

Once you're there, navigate to your folder and open your .tiff image like so:

loading_image

once you do, you will be faced with a pop up, change the properties like the encoding to U-Law and the channel to 1 like so to ensure it displays properly:

image


The random (But sometimes fun) part, the glitch: Part 1


Becauue the nature of a glitch/databend is unpredictable prepare to break your file, create results you didn't want or flat out didn't expect. The general premise is that we edit the 'song' which is actually the image data represented using sound using effects.

Some important rules:

  • Only ever edit the middle of the file, this will take trial and error a lot of the time but the first few minutes of an image are generally data required for the image to open, its good to apply an effect somewhere to the middle to see where you are and work from there.
  • Export your work regularily, one change can break your image and its better to keep something that works than to lose progress
  • Don't use any effects that change the length of the image (song length). Changing the song length will usually make the file unreadable. This includes effects like:
    • Change tempo
    • Change Pitch

I will add an advanced heading where I will explain how to achieve crazier glitches through those without altering the length.


Glitching: Part 2


Once you have imported the song, you will see something like:

waveform

Tip: You can zoom out with ctrl+scroll wheel (CMD + scroll on mac) to see the whole file, makes it easier to see the whole file.

Example: Adding an 'echo' effect to a file

Now that we've loaded the file, lets select a chunk of it and add an echo effect to alter the image. Firstly, we will select the chunk somewhere near the middle to avoid making the file unopenable:

adding_echo_select

Once we do that, we can add the echo effect to our selection like so:

adding_echo_select

Feel free to mess with the numbers inside of the effect for different results, for this demonstration ill just use the defaults. You may also try other effects, I recommend phaser, wah wah and reverb. Don't be afraid to play around with the numbers.

Advanced: Changing tempo and pitch to mess with colours.

For this, you have to use the 'split cut' tool. This is a tool accessible with 'ctrl+alt+x' and what it essentially does is removes a chunk of the image without altering the length. The idea behind this is we make a 2nd track for the image, edit it then paste what we edited into the 1st track keeping the length the same.

To start, after opening your image press ctrl+a to select the entire track, ctrl+c to copy it and ctrl+v to paste it below. once you have something like this:

image

Select a chunk of the original (first) track and split cut it out with ctrl+alt+x, if done correctly you should have something like so:

image

After you're at this stage, you can use the guide lines 'marked in yellow' to select the same chunk you cut out on the bottom track, you can then add your tempo or pitch changes to the bottom track. I only recommend adding a 0.001% change as even that creates extreme results.

image

yellow guidelines which show where to select on the 2nd track.

after you make your change to the original track, cut it out normally with ctrl+x and select the blank gap in the first track, pasting it in with ctrl+v. You will see black lines which you have to click to 'merge'the track into one as shown below:

image

once you merge them and its one audio track, you can delete the duplicate track and you're done! hopefully nothing broke.

image

Final Image using tempo/pitch changing

image


Saving the file and importing it back to your editor


Once you've made the changes you like, go to File>Export>Export Audio, then change 'Save as type' to 'Other uncompressed files' and the 'Header' to Raw and Encoding to 'U-Law'. Then, manually name the file 'name you want .tiff' this will prompt you a few times make sure to press yes and your glitched image will be saved ready for opening.

encoding

and save it as so:

filetype

Once you're done, its time to import the file back into your graphics editor, you can do this by simply opening the .tiff file you saved.

And viola!

final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment