ColBrix Speed
Available on Google Play as of now.
var c4 = 0, cs4 = 1, d4 = 2, ds4 = 3, e4 = 4, f4 = 5 ... as5 = 22, b5 = 23; var melody = [ e5, ds5, e5, ds5, e5, b4, d5, c5, a4,a4,a4, c4, e4, a4, b4,b4,b4, e4, a4, b4, c5,c5,c5, ...]; function playSong() { var intervals = 24; // supports 2 octaves for(var i = 0; i < melody.length; i++) { var note = melody[i]; var lumin = 100 - 100/intervals*note; // http://stackoverflow.com/a/6425113 setTimeout( (function(lumin) { return function() { changeBackground(lumin); } })(lumin), i*250); } } function changeBackground(lum) { document.body.style.backgroundColor="hsl(0,0%,"+lum+"%)"; }
![]() |
The fork is just there to indicate the size of the photos |
$PATH
)cd
into this directory and create an executable script with the content from belowgenerated
contains the files you might want to upload to your online photo service #!/bin/bash g=generated t=$g/tmp mkdir -p $t ### STEP 1 - cloning/rotating the file to 'portrait' ### into the temporary subdirectory(0.jpg, 1.jpg, etc.) i=0 IFS=$'\n' for file in `find . -type f -iname "*.jp*g"` do echo "rotating file $file into $t/$i.jpg" convert "$file" -rotate '90>' $t/$i.jpg let i=i+1 done ### STEP 2 - take 4 JPG files at a time ### and compile them into new 2x2-images i=0 nroffiles=`ls $t/*.jpg | wc -w` let nrofiterations=nroffiles/4 while [ $i -lt $nrofiterations ] do ## helper variables to access file names let f=i*4 let a=f+0 let b=f+1 let c=f+2 let d=f+3 echo "creating a$i.jpg ($a.jpg $b.jpg $c.jpg $d.jpg)" ## compile the 4 separate images into a 2x2-grid. ## please change the parameter 768x1024 if you ## don't have a 3:4 aspect ratio montage $t/$a.jpg $t/$b.jpg $t/$c.jpg $t/$d.jpg -tile 2x2 -geometry 768x1024 $g/a$i.jpg let i=i+1 done ### remove the tmp directory rm -rf $t