c11files.calgorythmic.lab
Class Piece

java.lang.Object
  extended by c11files.calgorythmic.lab.Piece

public class Piece
extends java.lang.Object

Piece models a piece of music as a set of Parts to be played simultaneously.

Version:
23nov2009
Author:
kvlinden

Constructor Summary
Piece(int tempo)
          Construct a new Piece with an empty list of parts.
 
Method Summary
 void addPart(Part part)
           
 void play(MidiPlayer midi)
          Play the parts of this piece simultaneously.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Piece

public Piece(int tempo)
      throws java.lang.Exception
Construct a new Piece with an empty list of parts.

Parameters:
tempo - the specified tempo
Throws:
java.lang.Exception
Method Detail

addPart

public void addPart(Part part)

play

public void play(MidiPlayer midi)
          throws java.lang.Exception
Play the parts of this piece simultaneously.

Parameters:
midi - the Midi object to do the playing
Throws:
java.lang.Exception