INFO

credits, how-tos, and downloads
There's some interesting stuff happening under the hood of this site (ouch, think I broke my arm patting myself on the back), but I didn't figure it all out myself. Much of it involved some repurposing and extending of work other people had done and put out into the public domain.

So in that same spirit, I'll give credit and post my improvements here, for the world to enjoy ;)

arsenal audio downloads & info
songlist.php: read contents of folders to generate xml file for arsenal audio
getid3.php: get id3 tags from mp3 files, first tries id3v2, then v1
arsenal audio: the flash source file for our audio player
javascript functions: to allow host page to play songs

how it works

web page loads apAudio.swf. If there is data in the flash shared object (see below), it is used the determine which song to play.

apAudio loads songlist.php as an XML file to generate its song list

songlist.php looks through audio folders, reading id3 tags from any file with an .mp3 extension

back in apAudio, song list gets saved in an array. This array gets filtered by the active category, then sorted alphabetically if shuffle is off, randomly if on

first song in the list begins loading, then playing when it has buffered enough. If category or shuffle state is changed, array is refiltered and reordered, starting with next song (so current song is not interrupted)

if user selects a song to play from one of the music pages, category is changed to that of the selected song, array is refiltered, and current song pointer jumps to the selected song

if user navigates to another page, onUnload forces apAudio to save current song data to a flash shared object (sort of like PHP session variables or cookies)


read the back story
arsenal audio started life as a Hayden Porter Remixolgy column for sonify.org. Of course, I couldn't leave well enough alone, so I began adding... and adding. The Golden Mean gave me the idea to use XML for the song list for the player, and somewhere else on the web I picked up the idea of using PHP to read through my mp3 folders and dynamically generate the XML. Here's that file.

So then I needed PHP to be able to read mp3 id3 tags to generate the XML for the song list. A search on the web turned up a number of options that were way too involved, so I wrote my own id3 tag reader (well, just the v2 tags - the v1 tags are straightforward enough and available many places on the web). No warranties expressed or implied, but it works for me, and if you want to try it, you can download it.

Then I wanted a shuffle function... and categories... and it should play continuously as you navigate the site... well, all that got incorporated too. Here's the .fla source file. Finally, I wanted pages in the music section of the site to be able to load songs into the player, which required some javascript. Most of this was garnered from one web site or another; here are the relevant functions.



abstract (that busy thing to the left) downloads & info
abstract.php: read contents of folders to generate xml file
abstract: the flash source file

how it works

web page loads abstract.swf.

abstract loads abstract.php as an XML file to generate its image list

abstract.php looks through image folder, making an entry for files with .jpg extension

back in abstract, image list gets saved in an array, sorted either randomly or sequentially (this is specified in the XML file)

first image in the list loads, assigning itself a movement pattern at random

next image loads, and first image fades into second

images continue loading and transitioning

stop button stops movements and image loading (possible bug: may need to clicked more than once)


read the back story
abstract began, like so many things do, with a google search. I was looking for a little jazz (so to speak) for some of the music pages and thought some kind of slideshow with my abstract photos might work. I knew it was possible to do transitions in Internet Explorer but I wanted to work within web standards as much as possible so Flash seemed like the better option.

Lo and behold, Todd Dominey at Dominey Design had built a Flash slideshow and put it into the public domain (meanwhile he has improved upon it to the point where you don't need to mess with ActionScript and offered it for sale). Once again I couldn't leave well enough alone - just still images fading into one another seemed too... peaceful, I guess.

So I made it into a small window which behind which large images dance, all viewed through a red filter to blend better with the site's, er, aesthetic. Once again images are loaded dynamically with a PHP-generated XML page. Finally I added a button to stop the madness if you find it too distracting (one could argue it's like using blinking text).