auditory.described
Class Chord

java.lang.Object
  extended by auditory.described.AbstractContent
      extended by auditory.described.Chord
All Implemented Interfaces:
Content

public class Chord
extends AbstractContent

A Chord is a collection of Note objects that are rendered simultaneously

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

Field Summary
 
Fields inherited from class auditory.described.AbstractContent
audible, dotted, playing, type
 
Constructor Summary
Chord()
          Default Constructor
Chord(int type, boolean dotted)
          Explicit Value Constructor
 
Method Summary
 void addNote(Note note)
          Add a Note to this Chord
protected  void startPlaying(javax.sound.midi.MidiChannel channel)
          Start playing this Chord on the given MidiChannel
protected  void stopPlaying(javax.sound.midi.MidiChannel channel)
          Start playing this Chord on the given MidiChannel
 
Methods inherited from class auditory.described.AbstractContent
getType, isDotted, render, setAudible, setDotted, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chord

public Chord()
Default Constructor


Chord

public Chord(int type,
             boolean dotted)
Explicit Value Constructor

Parameters:
type - 1 for whole notes, 2 for half notes, etc...
dotted - Whether the note is dotted
Method Detail

addNote

public void addNote(Note note)
Add a Note to this Chord

Parameters:
note - The Note to add

startPlaying

protected void startPlaying(javax.sound.midi.MidiChannel channel)
Start playing this Chord on the given MidiChannel

Specified by:
startPlaying in class AbstractContent
Parameters:
channel - The MIDI channel to use

stopPlaying

protected void stopPlaying(javax.sound.midi.MidiChannel channel)
Start playing this Chord on the given MidiChannel

Specified by:
stopPlaying in class AbstractContent
Parameters:
channel - The MIDI channel to use


Design and Implementation of Multimedia Software, Jones and Bartlett Publishers