soundcloud

How to stream SoundCloud at a different speed or tempo?


From the SoundCloud API Guide, this is how to get the streaming URL of a sound:

import soundcloud
# create a client object with your app credentials
client = soundcloud.Client(client_id='YOUR_CLIENT_ID')

# fetch track to stream
track = client.get('/tracks/293')

# get the tracks streaming URL
stream_url = client.get(track.stream_url, allow_redirects=False)

# print the tracks stream URL
print stream_url.location

Is there any way to command the API to return a URL for the sound at a different speed or better yet, at a different tempo?


Solution

  • Thats not a feature from SoundClouds API. You need to somehow analyze your track to change the tempo / speed / bpm. For that you can use the EchoNest / Spotify APIs.

    Check this question:

    How to get BPM and tempo audio features in Python

    If you change to JavaScript you can use the browser built-in WebAudio / WebMIDI API on Chrome and/or FireFox.

    API description by Mozilla:

    https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

    Examples by Google:

    http://webaudiodemos.appspot.com/

    Hackday project based on Samplr + SoundCloud API using WebAudio + WebMIDI (Chrome only):

    http: // dope-dj-culture.com/ No longer a valid URL.