5 Sound Stories a toy for #ds106

I’ve been working on a version of Alan Levine’s Five Card Flickr for audio rather than images. Very much a work in progress. Only tested on a mac (FF, Safari & chrome) and Windows 7 (IE9), no support for iOS (limitation of how iOS plays audio and my lack of knowhow).

5 Sound Stories

I’d appreciate any tests or playing around if anyone has a spare 5 minutes.

5 Sound Stories is a way to create short soundscapes and save them along with some texts. It was inspired by Five Card Flickr and the suggestion of pascale colonna, @colonna69, in a tweet or two.

The idea is to load a set of sounds, either from a list of keywords or at random and create a soundscape. The result can be embedded here is an example:

 

FreeSound

I am using the Freesound API which allows you to browse, search, and retrieve information about Freesound users, packs, and the sounds themselves

Freesound is a collaborative database of Creative Commons Licensed sounds. Browse, download and share sounds.

Freesound is pretty easy to use, I had a bash a while back with flickrSounds so had an idea of how to use it. Unfortunately my JavaScript skills are pretty limited so the code is a horror story at the moment. I am using jQuery to handle the requests to free sound and produce the players and interface. I suspect that there is some really neat way of doing this with object orientated coding, but I’ve just got a bunch of functions and placeholders on the webpage.

Saving to a Database

The other piece of coding I had to do was to save the generated soundscapes and associated information in some way. I’ve just copied this from Five Card Flickr. Alan supplies the source code and this is really easy to copy and alter as it is very well commented indeed.  Since this is shared under the terms of the GNU General Public License I think that means I have to make the code of this available too. The JavaScript is easy enough to see (and wince at) in the browser, but it is part of my plan to finish this, clean up as much as possible and add some comments then share it.

Twitter Help

The web aplication still needs a lot of work, I’ve had some great feedback from Alan and Pascale Colonna (colonna69 on Twitter) over a few tweets.

Pascale came up with some ideas of how this could be used in primary school which I hope, with her permission, to add to the site and Alan has pushed me to refine the UI a bit.

Pascale also noted that this doesn’t play well on an iOS device. This is due to the lack of the ability to preload audio on iOS (I guess to save bandwidth) I think I’ve figured out a workaround but it is going to be a while before I get that together.

I’d love to get more help and suggestions either via twitter or in the comments here.

Learning by Doing and Riffing

This seems to fit my learning style, I’ve tried code academy , books, tutorials but none get me into the groove as much as trying something that is a bit to hard for me. Google is a great help, although for this sort of thing it always seems to end up on Stack Overflow. Working my way through a tutorial, I never run over time, miss what real people are saying to me. This is the power of learning #ds106 style, dive in and do.

wecodejam_econo

Of course one of the dangers of learning this way is a lack of rigour, no one is checking my work, there is a lot of sloppiness in my code, this is were dipping back into the likes of code academy helps. My Javascript is improving a little and my occasional visits to tutorials, learning sites etc is helped by having something to reflect on, hopefully, revisit and refactor.

The other real powerful thing about #ds106 is that participants are encouraged to borrow, copy, steal and riff off their fellow learners (with attribution). Here again I am riffing off @cogdog, Alan Levine.

This is not a MOOC,  and I am not going to label it with anything in particular but learning with pals is powerful.

I hope this will make a useful assignment or two for DS106 and I’ll be submitting soon.

A short excursion into code

A few posts/couple of weeks ago I installed the oEmbed HTML5 audio plugin here. This allows me to upload mp3s and other audio files, the plugin takes care of presenting the audio using the html5 audio tag with a flash fallback for browsers that do not support the type of audio: This plugin converts URLs to audio files (MP3, OGG, WAV) into HTML5 audio with Flash-based player backup
This seemed to do the trick. This morning I noticed that none of my audio was showing in FireFox. I right clicked on the space where I expected to see the player and saw the the Flash file was not loaded.

Looking at the source it seems that it is using a swf file belonging to google:
http://www.google.com/reader/ui/3523697345-audio-player.swf

and that is Error 400 Not found.

Using Cyberduck I had a look at the plugin’s code.  Part of this check to see if the file is an MP3 and the browser FireFox. firefox does not support playing of MP3 via the audio tag so the plugin uses the google Flash file, which is of course missing.
$embed = sprintf( '<embed type="application/x-shockwave-flash" flashvars="audioUrl=%1$s" src="http://www.google.com/reader/ui/3523697345-audio-player.swf" width="400" height="27" quality="best"></embed>', esc_attr($matches[0]) );
On my ‘real’ blog I usually embed audio using dewplayer so I decided to edit the plugin to use that.

I uploaded the dewplayer.swf file to the top level of my site and changed the code, I need to change the name of the var from audioUrl to mp3 and the url of the google swf to /dewplayer.swf.

If you are viewing any of my audio posts in fireFox you should hopefully be less puzzled.

Update: the plugin has been updated: WordPress › oEmbed HTML5 audio « WordPress Plugins

1.1

  • Google removed their MP3 Flash player from their website, so we include it in the plugin itself now (it’s still the same player)