Tag Archive for 'code'

Random date generator

Planning any sort of meeting? Don’t leave it to common sense to decide on the most appropriate time, use this random date generator instead!

Click to download

Click to download

Originally built for a.a.s, you can download a copy for yourself. Once loaded press Enter to stop on a date. The date is generated in the format dd/MM/yy/hh/mm/ss. You’ll need Processing and the Commodore 64 font (convert it using Processing), though you can use any font if you want.

Graffiti Analysis at Inside Out

For Inside Out Festival on 24th September I demoed Evan Roth’s Graffiti Analysis software. The hoardings outside Friction Arts’ building have just been dying to be tagged, so I felt this software would give the opportunity to do so, but in a very safe method.

You can see some still shots here on Flickr and even download the tags for your own viewing pleasure. For this there were a few tasks to overcome. The Graffiti Analysis capture and playback software has reached version 3, but only for Mac’s (at the moment). Version 2, which is available for Windows and Linux is still very capable. However, for Linux, the files created in the capture application don’t work with the playback application. They create their own .graf files and the playback application can only handle .gml files. d’oh! Luckily I was able to enlist the skills of the ever talented Andrew Thomas, who created a Processing script that converts between the two files (tested on version 1.1). You can download this and try it for yourself. It hasn’t failed me so far!

Click to download the sketch

Click to download the sketch

 

As I was using this rather tricky technique of capturing the light I had to strap a few lights to a glove to ensure enough light was emitted and captured. I highly recommend that you try this for yourself, with or without a real pen ;-)

Echobender

Myself and Mez recently finished a script called Echobender that automatically databends images.

Click to download

To use it you’ll need:

  • A computer with Linux installed. I don’t have a Windows or Mac PC so I can’t test it on those
  • Sox. On Ubuntu you can install it via sudo apt-get install sox
  • Convert, which is part of ImageMagick. On Ubuntu you can install it via sudo apt-get install imagemagick

Once you have those installed just execute ./echobender.sh from the terminal and then drop a .jpg or .bmp file into it. The output will be in a folder called “echo”.

If you look closely at the script you can see a way to convert any data into an image! I’ll leave that one up to you… Here’s the source code for all those interested:

#!/bin/sh -e
# Echobender
# By Antonio Roberts and Martin Meredith
# www.hellocatfood.com | www.sourceguru.net
# GNU/GPL

segons=`(date "+%Y%m%d%H%M%S")`
outfile="${segons}"

if [ ! -d ./echo ]; then
	mkdir ./echo
fi
clear
echo -e "\033[31m---------------------------------------------------- \033[0m"
echo -e "\033[33m Echobender \033[0m"
echo -e "\033[32m---------------------------------------------------- \033[0m"
echo -e "\033[35m---------------------------------------------------- \033[0m"
read -p "DROP A FILE HERE> " foo
echo -e "\033[32mLets bend $foo \033[0m"
echo -e "\033[35m---------------------------------------------------- \033[0m"
foo="$(echo $foo | sed -e "s/'//" | sed -e "s/'//")"
bn=$(basename $foo | sed -e 's/\.[a-zA-Z0-9]*$//')
imsize=$(identify -format "%wx%h" $foo)
cp $foo ./echo
convert ./echo/${bn}.* ./echo/${bn}.bmp
cp ./echo/${bn}.bmp ./echo/${bn}.raw
sox -r 482170 -e u-law ./echo/${bn}.raw ./echo/${bn}2.raw echo 0.8 0.9 5000 0.3 1800 0.25
convert -size $imsize -depth 8 rgb:./echo/${bn}2.raw ./echo/${bn}.$outfile.bmp
rm ./echo/${bn}.raw ./echo/${bn}2.raw ./echo/${bn}.bmp ./echo/${bn}.jpg
echo -e "\033[33mJob done. Check ./echo \033[0m"
echo -e "\033[31m---------------------------------------------------- \033[0m"

Thanks to Imbecil‘s MPegFucker script for much of the inspiration.