public class Moonlander
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VERSION |
Constructor and Description |
---|
Moonlander(processing.core.PApplet parent,
moonlander.library.Controller controller)
Initializes library and tries to load syncdata.
|
Modifier and Type | Method and Description |
---|---|
void |
changeLogLevel(java.util.logging.Level logLevel) |
double |
getCurrentRow()
Returns current (fractional) row.
|
double |
getCurrentTime()
Returns current time in seconds.
|
int |
getIntValue(java.lang.String name)
Returns int value of a track.
|
Track |
getTrack(java.lang.String name) |
double |
getValue(java.lang.String name)
Returns value of a track.
|
static Moonlander |
initWithSoundtrack(processing.core.PApplet applet,
java.lang.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(java.lang.String host,
int port,
java.lang.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 java.lang.String |
version()
Returns the version of the library.
|
public static final java.lang.String VERSION
public Moonlander(processing.core.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(processing.core.PApplet applet, java.lang.String filename, int beatsPerMinute, int rowsPerBeat)
public void changeLogLevel(java.util.logging.Level logLevel)
public boolean start(java.lang.String host, int port, java.lang.String filePath)
public boolean start()
public void update()
public Track getTrack(java.lang.String name)
public double getValue(java.lang.String name)
name
- track's namepublic int getIntValue(java.lang.String name)
public double getCurrentTime()
public double getCurrentRow()
public static java.lang.String version()
Processing library Moonlander by Antti Hirvonen. (c) 2018