Skip to content

[unmaintained] Library to use the SoundCloud API in Processing.

License

Notifications You must be signed in to change notification settings

nok/soundcloud-processing

Repository files navigation

SoundCloud for Processing

Library to use the SoundCloud API in Processing.

Table of Contents

Download

Installation

Unzip and put the extracted SoundCloud folder into the libraries folder of your Processing sketches. Reference and examples are included in the SoundCloud folder. For more help read the tutorial by Daniel Shiffman.

Dependencies

Tested

System:

  • OSX (Mac OS X 10.7 and higher - tested with Mac OS X 10.10 Yosemite)
  • Windows (not tested yet, but x86 and x64 should work) (Windows 7 and 8)

Processing version:

  • 2.2.1

Usage

I recommend to use the library with Minim (GitHub). It uses JavaSound to provide an easy-to-use audio library while still providing flexibility for more advanced users.

import de.voidplus.soundcloud.*;
import ddf.minim.*;

SoundCloud soundcloud;
Minim minim;
AudioPlayer player;

void setup(){
  
  // http://soundcloud.com/you/apps for APP_CLIENT_ID and APP_CLIENT_SECRET
  soundcloud = new SoundCloud("APP_CLIENT_ID", "APP_CLIENT_SECRET");
  
  // If you need any permissions:
  // soundcloud.login("LOGIN_NAME", "LOGIN_PASS");
  
  // show user details
  User me = soundcloud.get("me");
  println(me);
  
  // play the first track of search
  ArrayList<Track> result = soundcloud.findTrack("Chromatics");
  if(result!=null){
    println("Tracks: "+result.size());

    minim = new Minim(this);  
    player = minim.loadFile(result.get(0).getStreamUrl());
    player.play();
  }
  
  minim = new Minim(this);
}

void draw(){}

void stop(){
  player.close();
  minim.stop();
}

Questions?

Don't be shy and feel free to contact me on Twitter: @darius_morawiec

License

MIT License by SoundCloud. The library is Open Source Software released under the MIT License.

About

[unmaintained] Library to use the SoundCloud API in Processing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published