Monday 31 May 2021

There is nothing - The wrong in partnership with https://www.canal180.pt/

Very excited to announce that  my long form work 'There is nothing' will be showing in real life via The wrongs partnership ( https://thewrong.org/ ) with https://www.canal180.pt/ 

This is a sample from that work here - https://tube.tchncs.de/videos/watch/23019241-b83e-4a7b-847f-ffc6e8695735


 

Wednesday 26 May 2021

Moving from YouTube.

 


Just a quick post from me to apologize in advance if some of what you are looking for in this blog has temporarily disappeared. Due to recent changes in the terms and conditions for YouTube  users I felt I had no option ( and this change gave me  the final kick needed ) to remove all of  my content from YouTube to Peertube and Vimeo . I'm furiously scanning through and updating blogs with new links to new uploads to maintain the content within them in a consistent manner and this might take a while so If you spot a dead link please feel free to comment or contact me via mastodon as @glitchbyte@mastodon.online.

More information on youtubes change in terms and conditions here https://www.forbes.com/sites/johnkoetsier/2020/11/18/youtube-will-now-show-ads-on-all-videos-even-if-creators-dont-want-them/?sh=1c0cd6e64913

And a good overview of the situation in this video here https://tube.tchncs.de/videos/watch/06071f59-01be-448e-8b02-951e553f07b3

 


Monday 17 May 2021

Bash Script for sonification of images using sox in batch mode.


 

Image created using script below

 

Bash scripts are really quite useful, they enable me to build up a toolbox of effects and methods tailored to the way that I work and think, once I have one worked out I can usually see a few different ways to use it - this script comes out of earlier scripts and also builds on conversations with and work of people in Facebooks Gac group such as  Avery Chester, Dawnia Darkstone and the weekly online Glitchlab meetings run by Vedran Gligo and Dina Dina Karadžić ( here).

 

Oh those fancy audacity effects you can use on  images, but maybe you want to do more than one image at a time , maybe you want to split a video into stills and apply all those juicy echoes and flangers and maybe a little noise as well, well this script is for you. 

This script was made on linuxmint 19.3 and also linuxmint 20.1 , you might be able to adapt it for windows using git bash and chocolatey but I don't use windows so on that your on your own until I get round to working a guide out for that OS (gmic support seems a bit sketchy with windows as well which is why I've commented it out  but it works just fine in Linux) If you look at the previous post I wrote a guide for Windows 10 here - https://crash-stop.blogspot.com/2021/05/quick-and-dirty-guide-to-using-shell.html

Requirements for linux - sox and gmic ( if you want to also use gmic effects on your files from the script - I just use the displacement map ) so on Debian based distros sudo apt install sox gmic. You will also want to have imagemagick installed because it just makes things easier for transcoding to different image formats, what could be simpler than turning jpgs into ppm with this command 'mogrify -format ppm  *.jpg' ?).

Caveats and warnings - The script uses ppm as an example image format but you are free to use whatever you choose but be aware that the format you use needs to be a near raw / uncompressed format otherwise you will end up with unreadable files ( well unreadable using  a standard imageviewer but that's a different story ) . I should also state that this script works on the files in place ie the script works on the directory it is in so remember to back up source files elsewhere i generally have the jpgs I work from in the directory I'm working in and transcode in place to a different format ie ppm/tga/bmp etc.

To run the script copy from #!/bin/bash to done then paste that into a blank txt file save it with a name and .sh extension so something like soundburger.sh , you must then make that file executable in linux so either right click and select properties , permission and tick the box which says make this file executable or open a bash shell  in the folder you've saved the file to and type in

$ chmod u+x soundburger.sh

To run the script copy and paste it into the folder where you have your prepared images , open a bash shell in that folder ( or navigate to it in a shell using cd ) and type in ./soundburger.sh and watch your images change before your eyes.

 Just to explain what its doing ( think of the script as a loop which looks for files, acts on a single file at a  time, moving on to the next file until there are no more files to work on at which points the script exits) .

1) find . -type f -name '*.ppm' - look in the current folder for any file with extension  .ppm . Having found a file matching that move on to the next stage

2) | - pipe each file it finds to the next stage which reads the filename  and echos the filename on the commandline in the bash terminal where the script is being run from  ( handy to know which file you are at ) that filename is now passed to the rest of the script as  ${filename}  

3)  'head -n 3 ${filename} > head.ppm;' - take the first three lines of the file ( basically the header which tells an image viewer what kind of file it is and how to display it) and store that to add back onto the file after the program has glitched the rest of the file 

4) 'sed '1d'  ${filename} > swap.ppm' - strip the header from the file and save the rest of the file as a new file called swap.ppm

5) 'cp swap.ppm frame.raw' - as the file is now headerless and for all intents and purposes a raw file copy swap.ppm and rename it as frame.raw as we need a raw file for sox to read as we are fooling sox into thinking we are working with a raw audio file.

 6) 'sox -r 482170 -e u-law frame.raw frame2.raw phaser 0.8 0.74 3 0.7 0.5' - apply an audio effect to frame.raw ( the commented out parts after with the # can be added after where I have frame2.raw just delete and copy and paste as applicable ) and save the output as frame2.raw

7) finished with the audio effects its time to put the file back together , first we 'cp frame2.raw swap.ppm;' copy frame2.raw overwriting swap.ppm

8)  Then finally put the file back together and overwrite the initial file by doing ' cat head.ppm swap.ppm> ${filename};' cat is unix/linux speak for concatenate ie add one file to the top of the other creating a new file ( in this case we are overwriting the source file ${filename} ,obviously you could redirect the output at this stage to another folder as its only this final part which overwrites the original .

9) If using ffmpeg displacement  uncomment the 5 lines after the above, ffmpeg then uses a displacement map on the files for extra glitchiness ( script for windows 10 though it will work on linux as well with ffmpeg installed).

10) Clean up by removing all those temporary files with 

'rm head.ppm
rm swap.ppm
rm frame.raw
rm frame2.raw'

11) Check if there are any more files left ( remember this loops over all the files in the folder you are running it from ) to act on if not then 'done' and exit to command prompt

#!/bin/bash

find . -type f -name '*.ppm'|while read filename; do echo ${filename};

#get header
  head -n 3 ${filename} > head.ppm;

#strip header ( to avoid damaging it)
  sed '1d'  ${filename} > swap.ppm

#copy that to raw file so we can use sox
cp swap.ppm frame.raw
 
#apply effect you want by uncommenting or changing.
 #echo
#sox -r 482170 -e u-law frame.raw frame2.raw echos 0.8 0.7 700 0.25 900 0.3 norm;
#reverb
#sox -r 482170 -e u-law frame.raw frame2.raw gain -3 pad 2 8 reverb
#hilbert
#sox -r 482170 -e u-law frame.raw frame2.raw hilbert -n 5001
#try these and alter to taste ( obviously without the quotes)
sox -r 482170 -e u-law frame.raw frame2.raw phaser 0.8 0.74 3 0.7 0.5
    #"bass 5"
    #"echo 0.8 0.88 60 0.4"
    #"flanger 0 2 0 71 0.5 25 lin"
    #"hilbert -n 5001"
    #"loudness 6"
    #"norm 90"
    #"overdrive 17"
    #"phaser 0.8 0.74 3 0.7 0.5"
    #"phaser 0.8 0.74 3 0.4 0.5"
    #"pitch 2"
    #"riaa"
    #"sinc 20-4k"
    #"vol 10"

cp frame2.raw swap.ppm;

#uncomment three lines below if using gmic
#cat head.ppm swap.ppm> swap2.ppm;
#gmic ${filename} swap2.ppm -blend xor -o ${filename};
#rm swap2.ppm

#if using gmic comment out line below
cat head.ppm swap.ppm> ${filename};

rm head.ppm
rm swap.ppm
rm frame.raw
rm frame2.raw

done

On Windows 10 rather than using gmic for displacement maps we could use ffmpeg , as there are problems with installing gmic for use on the command line in Win 10, so with chocolatey installed ( see previous post if you haven't already to see how to run bash scripts on Windows 10)   go here https://community.chocolatey.org/packages/ffmpeg ) copy choco install ffmpeg , paste that into power shell running as adminstrator follow the prompts and install ffmpeg.  Place  this script in the folder where your pictures are, make it executable using git-bash terminal ( see previous post) then run it from the terminal ( remembering to alter the script to your taste and to reflect the images you are working on ) : 

 

#!/bin/bash 

find . -type f -name '*.ppm'|while read filename; do echo ${filename};

#get header
  head -n 3 ${filename} > head.ppm;

#strip header ( to avoid damaging it)
  sed '1d'  ${filename} > swap.ppm

#copy that to raw file so we can use sox
cp swap.ppm frame.raw
 
#apply effect you want by uncommenting or changing.
 #echo
sox -r 482170 -e u-law frame.raw frame2.raw echos 0.8 0.7 700 0.25 900 0.3 norm;
#reverb
#sox -r 482170 -e u-law frame.raw frame2.raw gain -3 pad 2 8 reverb
#hilbert
#sox -r 482170 -e u-law frame.raw frame2.raw hilbert -n 5001
#try these and alter to taste ( obviously without the quotes)
#sox -r 482170 -e u-law frame.raw frame2.raw phaser 0.8 0.74 3 0.7 0.5
    #"bass 5"
    #"echo 0.8 0.88 60 0.4"
    #"flanger 0 2 0 71 0.5 25 lin"
    #"hilbert -n 5001"
    #"loudness 6"
    #"norm 90"
    #"overdrive 17"
    #"phaser 0.8 0.74 3 0.7 0.5"
    #"phaser 0.8 0.74 3 0.4 0.5"
    #"pitch 2"
    #"riaa"
    #"sinc 20-4k"
    #"vol 10"

cp frame2.raw swap.ppm;

#uncomment the 5 lines below if using ffmpeg for displacement
cat head.ppm swap.ppm> swap2.ppm;
rm swap.ppm
ffmpeg -i ${filename} -i swap2.ppm -lavfi '[1]split[x][y],[0][x][y]displace' swap.ppm;
rm swap2.ppm
cp swap.ppm ${filename}

#if using ffmpeg for displacement comment out line below
#cat head.ppm swap.ppm> ${filename};

rm head.ppm
rm swap.ppm
rm frame.raw
rm frame2.raw

done




 

Quick and dirty guide to using shell scripts on Windows 10



PPM glitched using batch script and the sox flanger effect on Win 10

This guide comes out of the weekly Glitchlab sessions run by https://hacklab01.org/  and especially the work of Vedran Gligo , during the last session I realized that I needed to work out instructions for people using Windows 10 for some of the ideas I was presenting for working via bash scripts for manipulating images with an audio editor called sox. So Following Vedrans' instructions in that session to another participant I installed Windows 10 home on  a spare laptop, duplicated his steps  and wrote this guide ( with a few observations of my own and links to various programs mentioned - all done on Windows 10 home edition running the 20H2 update on a dual core Atom based Celeron N2840 ).

The bash script I used on Windows 10 to create the images above follows in the next blog post here - https://crash-stop.blogspot.com/2021/05/bash-script-for-sonification-images.html
 
1)Install notepad ++ as git bash asks to set a default editor in set up and notepad ++ is useful for making glitch art . get here - https://notepad-plus-plus.org/ 
 
2) Install git - bash ( for bash terminal as its better than windows powershell and includes some of of the basic linux/unix command line applications we will need - get git bash here - https://www.atlassian.com/git/tutorials/git-bash
 
 
*2023 Update - I had recommended installing sox via chocolatey but it seems that version of sox no longer works in the same way. The way I've found to install it for use via  git-bash  is to download the portable version from here ( choose sox-14.4.2-win32.zip) extract the contents then copy all the files to C:\Program Files\Git\usr\bin - you should now be able to access sox via git-bash
 
* Old instructions for sox 2021 
3) Install chocolatey , this is needed to install things like sox the command line audio editor we will use for sonification . To install chocolatey you will need to open win powershell as administrator ( quick guide here https://www.howtogeek.com/662611/9-ways-to-open-powershell-in-windows-10/ ) - so go to win icon in bottom left hand corner click on it and in search bar to the right type powershell it comes out top of list , right click and open as administrator then go here https://chocolatey.org/install and follow the install instructions carefully. ( you can copy and paste the commands from there into windows powershell) read prompts during installation carefully and answer Y when it asks. 
 
 
 
4) Having installed that keep powershell open and go here and install sox - https://community.chocolatey.org/packages/sox.portable ( the command to install is choco install sox.portable ) 
 
4a) Also maybe install imagemagickits handy for image manipulation via scripts but download the latest version from the imagemagick website as you dont have to mess about with paths etc to use it in gitbash https://imagemagick.org/script/download.php#windows
 
 5) How to run the script itself - for that we will use git bash but first use geany or notepad ++ to create a file called soundburger.sh (or whatever you want to call it) - make sure you add the .sh extension when you save it - that indicates to git bash its a shell script. Copy and paste in the script you want, I'm posting the one I'm working with in the next post  ( or write your own). Save that file , maybe in the folder where you are going to be working from ie where your pictures are. 
 
 6) Making the script executable - if you try to run the script without doing this it won’t work and will probably throw out an error message ‘saying permission denied’- open git bash in the folder where you saved the file ie go to that folder right click and then click on ‘git bash here’ that opens the git bash terminal then in that terminal type in chmod u+x whateveryoucalledyourscript.sh - it wont give any output unless there is a problem , unix/linux terminals are very precise and are case sensitive so pay attention to your typing. 
 
 7) now you can run the script by typing in the terminal ./whateveryoucalledyourscript.sh - sit back and watch your images being glitched ! 
 
Or you might just want to convert your images to a near raw format first , by near raw I mean uncompressed as these tend to survive glitch techniques quite well so jpg and png are basically out , I tend to work with ppm or tga or even bmp . We can use git-bash and imagemagick to do this outlined below.

7a) Get some pictures and change the format using  git-bash and imagemagick , open the folder where your pictures are, right click - open git bash here and type in this command  ( not including the start and end quote ) remembering that linux/unix command line is case sensitive so pay attention to your typing ' magick mogrify -format ppm *.JPG' - here I am telling imagemagick to change the format of all JPG (*.JPG) to ppm - if your jpegs are titled with lower case .jpg you would change the end part to *.jpg as imagemagick ( the magick at the beginning) wouldn't do anything because it literally won't see the lower case *.jpg if you have *.JPG cos that isn't what its looking for. Or you can use irfanview to batch convert and that might be easier.

8) look at your photos once you've glitched them, unlike Linux Windows 10 doesn't see or should I say give thumbnail views of file types it doesnt know like ppm , tga etc , to view the files you've just glitched u might want to think of an imageviewer like irfanview - find here https://www.irfanview.com/
 
I find its useful on Windows 10 to be able to see the file extensions of image files ( and most other files) so with an explorer window open ( explorer = the file manager in win 10 ) go to taskbar , file ,in the drop down window select options , this opens the folder options window click on view then uncheck hide extensions for known file types, it just makes it a hella lot easier to find files!

* I don't use windows generally I find linux just much simpler and faster so if you find errors in this guide please leave a comment or contact via mastodon @glitchbyte@mastodon.online

Monday 3 May 2021

What is it that we make ( Anti-cultural Positions)

Dreamgate - 2021
 

This should really be titled ' The impossibility of describing a giraffe to a fish ' as in this endeavor I will probably fail , but I will try . This article comes out of further discussions during the weekly Glitchlab discussions hosted by Hacklab01 and in particular around the question 'How do we describe what we do', which comes from a common frustration at attempting to communicate ideas and values to those within the traditional art establishment.

I'll start by mentioning this article from the Guardian https://www.theguardian.com/artanddesign/2021/may/03/crude-obscene-extraordinary-jean-dubuffets-war-against-good-taste-barbican , specifically this quote:

' For Dubuffet, giving a lecture called Anti-Cultural Positions in 1951, this idealisation of high art was lethal to real creation: “Our culture is an ill-fitting coat, or at least one that no longer fits us,” he said. “It’s like a dead tongue that has nothing in common with the language now spoken in the street. It drifts further and further away from our daily life. It is confined to lifeless coteries, like a mandarin culture. It has no more living roots.”'

Quite often trying to describe what I do and what it means I'm met by blank stares and the sound of overheating mental gears as the person I'm talking to tries to fit what I'm saying into the standard Art establishment cultural reference points that they have which are a product of both their education, class and career ( in that the Art establishment is a career and a way of seeing the world ) . 

I don't often have the same problem talking to those who live and work within the medium we now mostly have in common, using devices on an everyday basis is its own visual education separate to a standard arts education  and possibly now more important to an idea of what visual and artistic literacy means, though the old visual literacy is still apparent it is often repurposed ( see Vaporwave and its use of images from classical sculpture  ) or re-referenced as material . 

One of the defining features of this new visual literacy is that everything is a remix , everything we see is material. Talk of material is deceptive though , as we do not often work with physical material in the traditional art sense, anything material is often just a vessel for the content be it a screen or device , if the unix truism that everything is a file holds true then all materials are files , or sources. 

Therefore a lot of the language I use implies some level of computer literacy, what is important is that something  has shifted  in an understanding of what it means to work within a medium - what we make doesn't need a studio or  specific tools or training. This medium is non specialist, it requires only a device and a knowledge of how to use that device and a literacy shaped through the use of that device.

I can make a parallel to that process of gaining visual literacy through device use in learning how to draw , which is the underlying skill of all traditional visual art, it was how we gained the literacy we needed to make art in the previous paradigms terms.

Its easy to talk about things like process, the 'how', this much we have in common, if I strip away the artspeak and the layers of context beloved of the art establishment , we still take this thing , do this with it and end up with this , but what is the 'this' ? I'm still not certain that I make anything, I do things to my source files but the end thing doesn't exist within a physical space other than a series of zeros and ones on a storage device unavailable until I navigate to it and pull up a program that displays it, correctly or incorrectly . Another difference between traditional art and this is that objects can be altered in the  viewing given that different programs can have quirks or older definitions of what the file might be ( and that in turn can be leveraged to make new work)  a painting or a sculpture  is a slow time object that might age but essentially remains the same thing over time , it has a physicality that can be damaged or altered in real space but it is a thing. You could argue that placing a painting or sculpture within a new context ( re-contextualising) alters the object itself but I'd disagree , that just alters the way you read the object not the object itself.

Imaginary conversation with art establishment:

Them - 'So if you are making things which don't exist  what you are doing is conceptual art then , so it is just the old art establishment really, great now we know how to critique it and you have to explain it within the terms we set '.

Me - Aaaaaaaaaah no , neither is it Dada , Surrealism or any other ism art criticism has created, dissected and written scholarly tomes on. This is something new, a new way of seeing and you are going to have throw out all your preconceptions and learn to speak this new language.

Them - But what does it mean ? What are you trying to say?

Me - I could say that what I do is a democratizing dialog between user and environment, where user becomes creator and the created becomes re-used. Or I could say its an inquiry into the technology itself, its effects on us as users, but then we mold it as much as it mold us.  Its an arts practice which is as much about enabling others to create as a means to create for myself.

Them - Sooooo it is an 'arts practice' then oh great we have criteria to judge those on, thanks, lets do that. 

Everybody else (not in the arts establishment) - Look at this cool thing I found on my phone, lets share it , ooo if i take a photo of this and use this app I can do that , wow ! Whats 'arts practice?' Oi you, how did you do that cool thing with image/ video/sculpture/music ? 

Me - here's a guide , download that, do this, there you go 

Everybody else, everywhere ( five seconds later) - look at this cool thing I made from this guide I found online.

Arts establishment - WTF !!! 

Art now is immediate and made on devices, the world has moved on so should the arts establishment.


 


ikillerpulse ( requires tomato.py in working directory)

I've been working on this script for the last week or so. What does it do? It takes an input video/s,  converts to a format we can use f...