0

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:

  1. Is it possible to get only a part of a track from Soundcloud without fetching the whole song?
  2. 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!

Community
  • 1
  • 1
tertek
  • 890
  • 1
  • 10
  • 20
  • is it possible to merge audio files? http://stackoverflow.com/questions/13305530/combining-audio-files-in-html – user669789 Jul 06 '16 at 00:30
  • @Sabarish I am not sure, but I thought it would be possible "by adding their channel data" http://stackoverflow.com/questions/13709391/merge-multiple-audio-buffer-sources OR using this kind of workaround https://codewala.net/2013/02/24/html5-set-multiple-audiovideo-files-dynamically-and-run-one-by-one/ – tertek Jul 06 '16 at 00:41
  • if, i understood correctly, its not merging the stream, but plays one after another like "auto play" in the play list. – user669789 Jul 06 '16 at 00:57

0 Answers0