I am very new to Soundcloud API and have problems getting started. So please help me to get this right. I am going to use the Javascript SDK with the aim of fetching parts of several tracks to put them together into one HTML5 audio object. For several reasons I do not want to load the whole length of the tracks.
My question can be divided into two sub-questions:
- Is it possible to get only a part of a track from Soundcloud without fetching the whole song?
- How can a fetched (part of a) track be saved as (or transformed into a) HTML5 audio element?
As I have understood, in this solution the whole track will be loaded while setPosition() and onPosition() are used to define the relevant part to be played.
I am looking for something like this:
//pseudo-code
var tracks_array = [{track-id, start_pos, end_pos}, ... , n];
get_tracks (tracks_array)
{
var audio = document.createElement("AUDIO");
audio = awesome_function(tracks_array[]); // for all n
}
Thanks for any help!