public class Loom extends Object
Loom
holds all of the Pattern
s associated with the
user's sketch, and provides facilities to play or record the output of
patterns at the desired rate. By default, it uses a RealTimeScheduler
with a period of 1000 milliseconds.Modifier and Type | Field and Description |
---|---|
MidiBusWrapper |
midiBusWrapper |
processing.core.PApplet |
myParent |
OscP5Wrapper |
oscP5Wrapper |
PatternCollection |
patterns |
static String |
VERSION |
static String |
WELCOME_MESSAGE |
Constructor and Description |
---|
Loom(processing.core.PApplet theParent)
a Constructor, usually called in the setup() method in your sketch to
initialize and start the library.
|
Loom(processing.core.PApplet theParent,
int bpm) |
Loom(processing.core.PApplet theParent,
Scheduler scheduler) |
Loom(processing.core.PApplet theParent,
Scheduler theScheduler,
long periodMillis)
Constructor for a new Loom with a particular type of scheduling
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
draw() |
double |
getBPM() |
Interval |
getCurrentInterval() |
BigFraction |
getMinimumResolution() |
BigFraction |
getNow() |
processing.core.PApplet |
getParent() |
long |
getPeriod() |
void |
midiMessage(MidiMessage theMidiMessage) |
void |
pause() |
void |
play() |
void |
rawMidi(byte[] raw) |
void |
record()
Records both OSC and MIDI events, to files in the sketch's data folder
with the prefixes "osc" and "midi" respectively.
|
void |
record(File oscFile,
File midiFile) |
void |
record(String oscFilename,
String midiFilename) |
void |
recordMidi(String midiFilename) |
void |
recordOsc(String oscFilename)
Record OSC events to the specified filename in the data folder of the
sketch.
|
void |
setBPM(double bpm) |
void |
setMidiBus(themidibus.MidiBus midiBus) |
void |
setOscP5(oscP5.OscP5 oscP5) |
void |
setPeriod(long millis) |
void |
stop() |
static String |
version()
return the version of the library.
|
public processing.core.PApplet myParent
public PatternCollection patterns
public OscP5Wrapper oscP5Wrapper
public MidiBusWrapper midiBusWrapper
public static final String VERSION
public static final String WELCOME_MESSAGE
public Loom(processing.core.PApplet theParent)
theParent
- public Loom(processing.core.PApplet theParent, Scheduler scheduler)
public Loom(processing.core.PApplet theParent, int bpm)
public Loom(processing.core.PApplet theParent, Scheduler theScheduler, long periodMillis)
theParent
- parent Processing sketchtheScheduler
- real-time or non-real-time schedulerperiodMillis
- the cycle period in millisecondspublic static String version()
public BigFraction getNow()
public Interval getCurrentInterval()
public void play()
public void pause()
public void stop()
public void record() throws IOException
IOException
public void recordOsc(String oscFilename)
oscFilename
- the binary OSC score filenamepublic void recordMidi(String midiFilename)
public void record(File oscFile, File midiFile) throws IOException
IOException
public void setOscP5(oscP5.OscP5 oscP5)
public void setMidiBus(themidibus.MidiBus midiBus)
public void draw()
public double getBPM()
public void setBPM(double bpm)
public long getPeriod()
public void setPeriod(long millis)
public BigFraction getMinimumResolution()
public void midiMessage(MidiMessage theMidiMessage)
public void rawMidi(byte[] raw)
public processing.core.PApplet getParent()
public void dispose()
Processing Library loom by Cora Johnson-Roberson. (c) 2014-2016