curl and oauth

Oauth is the authentication service used by companies like Google and Twitter to protect their API’s.

update 6/2014: For current working examples, see Internet sensors projects: https://reactivemusic.net/?p=5859

original post

notes

A wrapper around curl to support OAuth 2.0: https://github.com/fireteam/curlish

The Google oauth 2.0 tutorial for devices – note: there is a local example in Max teaching examples: google-oauth-readme.txt: https://developers.google.com/accounts/docs/OAuth2ForDevices

How Oauth works.

Web audio from the Soundcloud API

notes

(update) to get your client-id from Soundcloud: From your home page, select more | developers | my apps.

This looks like the easiest way to play streaming content from Soundcloud over the web, Maybe this example could be adjusted to run in Max.

http://stackoverflow.com/questions/13455956/setup-web-audio-api-source-node-from-soundcloud

Example API urls,

this one streams a track: (replace client id with real thing)

http://api.soundcloud.com/tracks/6981096/stream?client_id=CLIENT-ID

This one returns an XML file filled with tracks that can be played:

https://api.soundcloud.com/tracks?client_id=CLIENT-ID

See API reference:

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

(update) Use /resolve to get the user id and user info, given the name – like this:

http://api.soundcloud.com/resolve.json?url=http://soundcloud.com/tkzic&client_id=CLIENT-ID

Soundcloud comments as lyrics?

Soundcloud API idea:

Use the Soundcloud comment feature to display lyrics for a song. i.e.., post a comment with the lyrics at the beginning of each phrase.

Another idea would be to run the comments through a speech synthesizer while the music is playing – so you can hear comments superimposed over the music