musiccreator
Class BeatArray

java.lang.Object
  extended by musiccreator.BeatArray

public class BeatArray
extends java.lang.Object

A BeatArray represents the entire rhythm of a song (minus the first and last measures, which will always be whole notes), and is used as raw material by the SongFactory builder class.


Constructor Summary
BeatArray(int numMeasures, TimeSignature ts)
          Creates a new instance of BeatArray
 
Method Summary
 void Generate()
          Randomly generates a beat array; overwrites existing beat array
 Beat get(int index)
           
 void outputToConsole()
          Writes the contents of the beat array to the console for debugging purposes.
 int Size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeatArray

public BeatArray(int numMeasures,
                 TimeSignature ts)
Creates a new instance of BeatArray

Parameters:
numMeasures - number of desired measures
ts - Time signature of desired measures
Method Detail

Generate

public void Generate()
Randomly generates a beat array; overwrites existing beat array


outputToConsole

public void outputToConsole()
Writes the contents of the beat array to the console for debugging purposes.


Size

public int Size()
Returns:
Number of total beats in beat array

get

public Beat get(int index)