public class Moonlander extends Object
Constructor and Description |
---|
Moonlander(PApplet parent,
moonlander.library.Controller controller)
Initializes library and tries to load syncdata.
|
Modifier and Type | Method and Description |
---|---|
void |
changeLogLevel(Level logLevel) |
double |
getCurrentRow()
Returns current (fractional) row.
|
double |
getCurrentTime()
Returns current time in seconds.
|
int |
getIntValue(String name)
Returns int value of a track.
|
Track |
getTrack(String name) |
double |
getValue(String name)
Returns value of a track.
|
static Moonlander |
initWithSoundtrack(PApplet applet,
String filename,
int beatsPerMinute,
int rowsPerBeat)
Shortcut to initializing Rocket connection
with given soundtrack file (uses MinimController).
|
boolean |
start()
Shortcut for starting Moonlander with sane defaults.
|
boolean |
start(String host,
int port,
String filePath)
Fires up the connection to Rocket, or in case of
connection failure, loads data from given XML syncfile.
|
void |
update()
Handle communication and controller updates.
|
static String |
version()
Returns the version of the library.
|
public static final String VERSION
public Moonlander(PApplet parent, moonlander.library.Controller controller)
host
- port
- filePath
- path to Rocket's XML-filedebug
- if true, output debug data to stdoutpublic static Moonlander initWithSoundtrack(PApplet applet, String filename, int beatsPerMinute, int rowsPerBeat)
public void changeLogLevel(Level logLevel)
public boolean start(String host, int port, String filePath)
public boolean start()
public void update()
public double getValue(String name)
name
- track's namepublic int getIntValue(String name)
public double getCurrentTime()
public double getCurrentRow()
public static String version()
Processing library Moonlander by Antti Hirvonen. (c) 2014