|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object at.ofai.music.beatroot.Agent
public class Agent
Agent is the central class for beat tracking. Each Agent object has a tempo hypothesis, a history of tracked beats, and a score evaluating the continuity, regularity and salience of its beat track.
Field Summary | |
---|---|
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. |
protected static double |
correctionFactor
Controls the reactiveness/inertia balance, i.e. |
static boolean |
debug
Print debugging information |
protected static double |
decayFactor
For scoring Agents in a (non-existent) real-time version (otherwise not used). |
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. |
at.ofai.music.util.EventList |
events
The list of Events (onsets) accepted by this Agent as beats, plus interpolated beats. |
protected static double |
expiryTime
The time (in seconds) after which an Agent that has no Event matching its beat predictions will be destroyed. |
protected static int |
idCounter
The identity number of the next created Agent |
protected int |
idNumber
The Agent's unique identity number. |
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. |
protected static double |
innerMargin
The maximum time (in seconds) that a beat can deviate from the predicted beat time without a fork occurring (i.e. |
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 Summary | |
---|---|
Agent(Agent clone)
Copy constructor. |
|
Agent(double ibi)
Constructor: the work is performed by init() |
Method Summary | |
---|---|
protected void |
accept(at.ofai.music.util.Event e,
double err,
int beats)
Accept a new Event as a beat time, and update the state of the Agent accordingly. |
boolean |
considerAsBeat(at.ofai.music.util.Event e,
AgentList a)
The given Event is tested for a possible beat time. |
protected void |
fillBeats()
Interpolates missing beats in the Agent's beat track, starting from the beginning of the piece. |
protected void |
fillBeats(double start)
Interpolates missing beats in the Agent's beat track. |
protected void |
init(double ibi)
Initialise all the fields of this Agent. |
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(at.ofai.music.util.EventList allEvents)
Show detailed debugging output describing the beat tracking behaviour of this agent. |
void |
showTracking(at.ofai.music.util.EventList allEvents,
double level)
Show detailed debugging output describing the beat tracking behaviour of this agent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
protected static int idCounter
protected static double innerMargin
protected static double correctionFactor
protected static double expiryTime
protected static double decayFactor
public double preMargin
public double postMargin
protected int idNumber
public double tempoScore
public double phaseScore
public double topScoreTime
public int beatCount
public double beatInterval
public double initialBeatInterval
public double beatTime
public at.ofai.music.util.EventList events
Constructor Detail |
---|
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.Method Detail |
---|
protected void init(double ibi)
ibi
- The initial tempo hypothesis of the Agent.public void print()
public void print(int level)
level
- The level of detail in debuggingprotected void accept(at.ofai.music.util.Event e, double err, int beats)
e
- The Event which is accepted as being on the beat.err
- The difference between the predicted and actual beat times.beats
- The number of beats since the last beat that matched an Event.public boolean considerAsBeat(at.ofai.music.util.Event e, AgentList a)
e
- The Event to be testeda
- The list of all agents, which is updated if a new agent is created.
protected void fillBeats()
protected void fillBeats(double start)
start
- Ignore beats earlier than this start timepublic void showTracking(at.ofai.music.util.EventList allEvents)
allEvents
- An EventList of all onsetspublic void showTracking(at.ofai.music.util.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)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |