public class Agent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
beatCount
The number of beats found by this Agent, including interpolated beats.
|
double |
beatInterval
The current tempo hypothesis of the Agent, expressed as the beat period in seconds.
|
double |
beatTime
The time of the most recent beat accepted by this Agent.
|
static double |
CONF_FACTOR
The slope of the penalty function for onsets which do not coincide precisely with predicted beat times.
|
static boolean |
debug
Print debugging information
|
static double |
DEFAULT_CORRECTION_FACTOR
The reactiveness/inertia balance, i.e.
|
static double |
DEFAULT_EXPIRY_TIME
The default value of expiryTime, which is the time (in seconds) after which an Agent that
has no Event matching its beat predictions will be destroyed.
|
EventList |
events
The list of Events (onsets) accepted by this Agent as beats, plus interpolated beats.
|
double |
initialBeatInterval
The initial tempo hypothesis of the Agent, expressed as the beat period in seconds.
|
static double |
INNER_MARGIN
The default value of innerMargin, which is the maximum time (in seconds) that a
beat can deviate from the predicted beat time without a fork occurring.
|
static double |
MAX_CHANGE
The maximum allowed deviation from the initial tempo, expressed as a fraction of the initial beat period.
|
double |
phaseScore
Sum of salience values of the Events which have been interpreted
as beats by this Agent, weighted by their nearness to the predicted beat times.
|
static double |
POST_MARGIN_FACTOR
The maximum amount by which a beat can be later than the predicted beat time,
expressed as a fraction of the beat period.
|
double |
postMargin
The size of the outer half-window after the predicted beat time.
|
static double |
PRE_MARGIN_FACTOR
The maximum amount by which a beat can be earlier than the predicted beat time,
expressed as a fraction of the beat period.
|
double |
preMargin
The size of the outer half-window before the predicted beat time.
|
double |
tempoScore
To be used in real-time version??
|
double |
topScoreTime
How long has this agent been the best? For real-time version; otherwise not used.
|
Constructor and Description |
---|
Agent(Agent clone)
Copy constructor.
|
Agent(double ibi)
Constructor: the work is performed by init()
|
Modifier and Type | Method and Description |
---|---|
boolean |
considerAsBeat(Event e,
AgentList a)
The given Event is tested for a possible beat time.
|
void |
fillBeats(double start)
Interpolates missing beats in the Agent's beat track.
|
void |
print()
Output debugging information about this Agent, at the default (highest) level of detail.
|
void |
print(int level)
Output debugging information about this Agent.
|
void |
showTracking(EventList allEvents)
Show detailed debugging output describing the beat tracking behaviour of this agent.
|
void |
showTracking(EventList allEvents,
double level)
Show detailed debugging output describing the beat tracking behaviour of this agent.
|
public static boolean debug
public static double POST_MARGIN_FACTOR
public static double PRE_MARGIN_FACTOR
public static final double INNER_MARGIN
public static double MAX_CHANGE
public static double CONF_FACTOR
public static final double DEFAULT_CORRECTION_FACTOR
public static final double DEFAULT_EXPIRY_TIME
public double preMargin
public double postMargin
public double tempoScore
public double phaseScore
public double topScoreTime
public int beatCount
public double beatInterval
public double initialBeatInterval
public double beatTime
public EventList events
public Agent(double ibi)
ibi
- The beat period (inter-beat interval) of the Agent's tempo hypothesis.public Agent(Agent clone)
clone
- The Agent to duplicate.public void print()
public void print(int level)
level
- The level of detail in debuggingpublic boolean considerAsBeat(Event e, AgentList a)
e
- The Event to be testeda
- The list of all agents, which is updated if a new agent is created.public void fillBeats(double start)
start
- Ignore beats earlier than this start timepublic void showTracking(EventList allEvents)
allEvents
- An EventList of all onsetspublic void showTracking(EventList allEvents, double level)
allEvents
- An EventList of all onsetslevel
- The metrical level of beat tracking relative to the notated beat (used to count beats)