org.log4jfugue
Class Music

java.lang.Object
  extended by org.log4jfugue.Music

public class Music
extends java.lang.Object

This is the central repository of knowledge about the system. It contains the accumulators of located search string counts, which are used by both the message receiver and the sound builder classes

Author:
btarbox

Field Summary
protected  java.lang.Integer buildIndex
           
protected  int[][] counts
           
static int MAX_MIDI_VOICES
           
 
Constructor Summary
Music()
           
 
Method Summary
 InstrumentVoice getInstrumentVoice(int voiceNumber)
          Get a full instrument definition given the instrument number
 int getPlayCount(int voiceNumber)
          get the count for a particular instrument out of the right accumulator
 void incrementInstrumentCount(java.lang.String instrumentName)
          Used by the Message Receiver, this is the way to increment the count of an instrument when its associated search string is found
 void setProperties(java.util.Properties messages)
          Used by Spring DI this accepts the set of properties that define the search strings and associated instruments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_MIDI_VOICES

public static final int MAX_MIDI_VOICES
See Also:
Constant Field Values

counts

protected int[][] counts

buildIndex

protected java.lang.Integer buildIndex
Constructor Detail

Music

public Music()
Method Detail

setProperties

public void setProperties(java.util.Properties messages)
Used by Spring DI this accepts the set of properties that define the search strings and associated instruments

Parameters:
messages -

getInstrumentVoice

public InstrumentVoice getInstrumentVoice(int voiceNumber)
Get a full instrument definition given the instrument number

Parameters:
voiceNumber -
Returns:

incrementInstrumentCount

public void incrementInstrumentCount(java.lang.String instrumentName)
Used by the Message Receiver, this is the way to increment the count of an instrument when its associated search string is found

Parameters:
instrumentName -

getPlayCount

public int getPlayCount(int voiceNumber)
get the count for a particular instrument out of the right accumulator

Parameters:
voiceNumber -
Returns: