I\'m new to Javascript and the Soundcloud SDK so if my current solution is way off base please let me know how it can be improved.
I\'m building a custom Soundcloud
You can implement the onfinish method when creating the track object, now you can replace the console output with a function.
SC.stream("http://api.soundcloud.com/tracks/" + trackId, {onfinish: function(){ console.log('track finished'); }}, function(sound){ currentTrack = sound; });