|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object at.ofai.music.beatroot.AgentList
public class AgentList
Class for maintaining the set of all Agents involved in beat tracking a piece of music. Implements a simple linked list terminated by an AgentList with a null Agent (ag).
Field Summary | |
---|---|
Agent |
ag
A beat tracking Agent |
static int |
count
The length of the list (number of beat tracking Agents) |
static boolean |
debug
Flag for printing debugging output. |
static double |
DEFAULT_BI
For the purpose of removing duplicate agents, the default JND of IBI |
static double |
DEFAULT_BT
For the purpose of removing duplicate agents, the default JND of phase |
AgentList |
next
The remainder of the linked list |
static double |
thresholdBI
For the purpose of removing duplicate agents, the JND of IBI. |
static double |
thresholdBT
For the purpose of removing duplicate agents, the JND of phase. |
static boolean |
useAverageSalience
Flag for choice between sum and average beat salience values for Agent scores. |
Constructor Summary | |
---|---|
AgentList()
Default constructor |
|
AgentList(Agent a,
AgentList al)
Constructor for an AgentList: the Agent a is prepended to the list al. |
Method Summary | |
---|---|
void |
add(Agent a)
Inserts newAgent into the list in ascending order of beatInterval |
void |
add(Agent newAgent,
boolean sort)
Appends newAgent to list (sort==false), or inserts newAgent into the list in ascending order of beatInterval |
void |
beatTrack(at.ofai.music.util.EventList el)
Perform beat tracking on a list of events (onsets). |
void |
beatTrack(at.ofai.music.util.EventList el,
double stop)
Perform beat tracking on a list of events (onsets). |
Agent |
bestAgent()
Finds the Agent with the highest score in the list. |
void |
print()
Deep print of AgentList for debugging |
void |
remove(AgentList ptr)
Removes the current item from the list. |
protected void |
removeDuplicates()
Removes Agents from the list which are duplicates of other Agents. |
void |
sort()
Sorts the AgentList by increasing beatInterval, using a bubble sort since it is assumed that the list is almost sorted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean useAverageSalience
public static boolean debug
public static final double DEFAULT_BI
public static final double DEFAULT_BT
public Agent ag
public AgentList next
public static int count
public static double thresholdBI
public static double thresholdBT
Constructor Detail |
---|
public AgentList()
public AgentList(Agent a, AgentList al)
a
- The Agent at the head of the listal
- The tail of the listMethod Detail |
---|
public void print()
public void add(Agent a)
public void add(Agent newAgent, boolean sort)
newAgent
- The agent to be added to the listsort
- Flag indicating whether the list is sorted or notpublic void sort()
public void remove(AgentList ptr)
ptr
- Points to the Agent which is removed from the listprotected void removeDuplicates()
public void beatTrack(at.ofai.music.util.EventList el)
el
- The list of onsets (or events or peaks) to beat trackpublic void beatTrack(at.ofai.music.util.EventList el, double stop)
el
- The list of onsets (or events or peaks) to beat track.stop
- Do not find beats after stop
seconds.public Agent bestAgent()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |