public class LEvent extends Object
Constructor and Description |
---|
LEvent(Interval interval,
double value) |
LEvent(Interval interval,
double value,
LEvent parentEvent) |
Modifier and Type | Method and Description |
---|---|
boolean |
containedBy(Interval queryInterval)
Returns true if the event's start is less than or equal to the query
interval's end, and the event's end is after the query interval starts.
|
boolean |
equals(Object obj) |
static LEvent |
evt(BigFraction duration,
double value) |
static LEvent |
evt(double duration,
double value) |
Interval |
getInterval()
Gets the interval of the event.
|
LEvent |
getParentEvent()
Gets the event that "spawned" this event, e.g.
|
double |
getValue()
Gets the value of the event.
|
static LEvent |
note(double duration,
MidiTools.Note note) |
static LEvent |
rest(BigFraction duration) |
static LEvent |
rest(double duration) |
static LEvent[] |
seq(LEvent... events)
Sequences events one after another.
|
String |
toString() |
public LEvent(Interval interval, double value)
public Interval getInterval()
public double getValue()
public LEvent getParentEvent()
public boolean containedBy(Interval queryInterval)
queryInterval
- public static LEvent note(double duration, MidiTools.Note note)
public static LEvent rest(double duration)
public static LEvent rest(BigFraction duration)
public static LEvent evt(double duration, double value)
public static LEvent evt(BigFraction duration, double value)
public static LEvent[] seq(LEvent... events)
events
- the original events, each with a time interval of 0 to
`duration`Processing Library loom by Cora Johnson-Roberson. (c) 2014-2016