Soundcloud API in Max

In this patch, Max uses the Soundcloud API to find available tracks for a user and then stream or download one of the tracks.

Features:
  • Resolve the user-id for a given Soundcloud user name – in this case “dannyzic”
  • Process the JSON response to get a track list
  • Request the first track as either a download or streaming file
  • Play the track in Max using [jit.qt.movie]

The Soundcloud API reference provides examples using curl.

http://developers.soundcloud.com/docs/api/reference

download

https://github.com/tkzic/internet-sensors

folder: soundcloud

files

main Max patch
  • soundcloud2.maxpat
abstractions and other files
  • sc-process-user-data.js
  • sc-process-track-data.js

authorization

  • The Soundcloud client-id is embedded in the Max patch. To get a client ID you will first need a Soundcloud account. Then register an app at: http://soundcloud.com/you/apps

instructions

  • Open the Max patch: soundcloud2
  • Unlock the patch and enter your client-id in the yellow [message] object in the upper right corner. Lock and save the patch.
  • Click the green button to resolve the Username: ‘dannyzic’
  • Click the blue button retrieve ‘tracks’ for this user
  • Click the yellow button to begin streaming the first available track
  • Optional: click the red button to download the track.

Soundcloud short-codes

This code comes from clicking the Share button on the SoundCloud clip, then using the “WordPress Code”

If you find old-style SoundCloud post on a 3rd party site, you may need to get the ’embed’ code and then add it to your post, using the html editor