AudioBox - Real Cloud Based Music

16 May 2010 | talking about Cloud Computing

When it comes to hardware and operating systems I am one of the biggest Apple fan boys out there. When it comes to software and control I am truly annoyed by Apple. As a side note I am an Apple share holder and I love what they do from a business stand point. Apple has held back music players for years. They released iTunes a long time ago and it blew all the music players out of the water. Back then compiled desktop based software was cool. Then they went full speed ahead with the Apple iTunes music store. This was amazing from a lets kill cds standpoint.

I have a library of music that I have gotten from all different sources; Amazon, iTunes, cd rips, and so on. I want to stuff all this music in one bloat free place and have it with me everywhere I go. If I am 100% an Apple user this place is iTunes, but I am not. I have an Android phone, a windows netbook, linux laptop, Apple desktop, Apple laptop. There is no easy way with iTunes to keep all these devices in sync when it comes to my music. Nor do I want my 13 Gig music stash living on all these devices. The service that was about to do all this was Lala.com until Apple purchased them and closed them down. Grooveshark.com has sort of done it but their way of doing things is a little odd and they use way to much flash.

Finally!!! AudioBox to the rescue!! AudioBox is a service that gives me a complete cloud-based music solution. I pay them a small fee and can upload all my music. I can play their music from any web browser. They have a mobile platform, and best of all they exposed an API that allows me to have complete control over my music collection. While I am sure the rumors that Apple is working on a cloud-based version of iTunes is true, I am 100% sure they are not going to give you complete control over your music nor are they going to make it very easy for me to use my music on non-apple devices.

Below is a little PHP script I wrote to mass up load my music to AudioBox. I am using AudioBox 100% from now on! I am sick of plugging my phone into my computer. I am sick of writing sync scripts to keep my mp3's up-to-date on all my devices.


<?php
/*
By: Spicer Matthews
Date: 5/16/2010
*/

$email = 'user@example.org';
$pass = '**********';
$dir = '/my/music/folder';
foreach(get_filenames($dir) AS $key => $row)
{
if(preg_match('/.mp3/', strtolower($row)))
exec("curl -F media=@'$row' -u $email:$pass https://audiobox.fm/api/tracks");
}

//
// Get all file names in directory. (thanks CI - http://codeigniter.com/user_guide/helpers/file_helper.html)
//
function get_filenames($source_dir, $include_path = TRUE, $_recursion = FALSE)
{
static $_filedata = array();

if ($fp = @opendir($source_dir))
{
if ($_recursion === FALSE)
{
$_filedata = array();
$source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
}

while (FALSE !== ($file = readdir($fp)))
{
if (@is_dir($source_dir.$file) && strncmp($file, '.', 1) !== 0)
{
get_filenames($source_dir.$file.DIRECTORY_SEPARATOR, $include_path, TRUE);
}
elseif (strncmp($file, '.', 1) !== 0)
{

$_filedata[] = ($include_path == TRUE) ? $source_dir.$file : $file;
}
}
return $_filedata;
}
}
?>

 

tags: music, the cloud

blog comments powered by Disqus