musiccreator
Class ChordDef

java.lang.Object
  extended by musiccreator.ChordDef

public class ChordDef
extends java.lang.Object

Implements the ChordDef class, which is a pattern upon which Chords are built. A ChordDef is a "keyless" chord - it defines the root of a chord relative to tonic and the intervals in that chord.


Constructor Summary
ChordDef()
          Creates a new instance of ChordDef; defaults to tonic
 
Method Summary
 void addNote(java.lang.Integer note)
          Add the specified note to the chord at the next index
 int get(int index)
          Get the note at the given index, an integer value between 0 and 11.
 boolean IsDiatonic()
           
 java.lang.String Name()
          Get the name of this chord
 void outputToConsole()
          Output ChordDef to console for debugging...
 void SetDiatonic(boolean d)
           
 void SetName(java.lang.String n)
           
 int size()
          Get the number of notes in the chord
 void trimToSize()
          Trims the memory space taken by the internal vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChordDef

public ChordDef()
Creates a new instance of ChordDef; defaults to tonic

Method Detail

Name

public java.lang.String Name()
Get the name of this chord

Returns:
Name of chord

SetName

public void SetName(java.lang.String n)
Parameters:
n - Name to give the chord

IsDiatonic

public boolean IsDiatonic()
Returns:
true if chord is diatonic, false if not

SetDiatonic

public void SetDiatonic(boolean d)
Parameters:
d - Sets whether chord is diatonic

outputToConsole

public void outputToConsole()
Output ChordDef to console for debugging...


size

public int size()
Get the number of notes in the chord

Returns:
number of notes in the chord

addNote

public void addNote(java.lang.Integer note)
Add the specified note to the chord at the next index

Parameters:
note -

trimToSize

public void trimToSize()
Trims the memory space taken by the internal vector.


get

public int get(int index)
Get the note at the given index, an integer value between 0 and 11.

Parameters:
index -
Returns:
the note at the given index