auditory.described
Class Orchestra

java.lang.Object
  extended by auditory.described.Orchestra
All Implemented Interfaces:
MetronomeListener

public class Orchestra
extends java.lang.Object
implements MetronomeListener

An encapsulation of an orchestra

See Also:
"The Design and Implementation of Multimedia Software © 2011"

Constructor Summary
Orchestra(Score score)
          Explicit Value Constructor
Orchestra(Score score, Metronome metronome)
          Explicit Value Constructor
 
Method Summary
 void handleTick(int millis)
          Handle a Metronome tick (required by MetronomeListener) This method tells the Score to render itself.
 void start()
          Start this Orchestra
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Orchestra

public Orchestra(Score score)
          throws javax.sound.midi.MidiUnavailableException
Explicit Value Constructor

Parameters:
score - The Score to play
Throws:
javax.sound.midi.MidiUnavailableException

Orchestra

public Orchestra(Score score,
                 Metronome metronome)
          throws javax.sound.midi.MidiUnavailableException
Explicit Value Constructor

Parameters:
score - The Score to play
metronome - The Metronome to use
Throws:
javax.sound.midi.MidiUnavailableException
Method Detail

handleTick

public void handleTick(int millis)
Handle a Metronome tick (required by MetronomeListener) This method tells the Score to render itself. In addition, if there are no other objects listening to the Metronome, this method stops the Metronome

Specified by:
handleTick in interface MetronomeListener
Parameters:
millis - The number of milliseconds since the Metronome started

start

public void start()
Start this Orchestra



Design and Implementation of Multimedia Software, Jones and Bartlett Publishers