jazz.core
Class ChordPitch
java.lang.Object
|
+--jazz.core.Pitch
|
+--jazz.core.ChordPitch
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- public class ChordPitch
- extends Pitch
- implements java.io.Serializable
- See Also:
- Serialized Form
|
Method Summary |
java.lang.Object |
clone()
|
int |
getDissonance()
Get the dissonance (between 0 and MAX_DISSONANCE) |
void |
setDissonance(int dissonance)
Set the dissonance (between 0 and MAX_DISSONANCE) |
void |
setPitchNumber(int pitchNumber)
Set the pitch number, ensuring we are in the base octave (0) |
Pitch |
toPitch()
Convert the chordpitch to (a copy of) the pitch |
void |
transpose(int halfSteps)
|
| Methods inherited from class jazz.core.Pitch |
getOctave, getPitchClass, getPitchLetters, getPitchName, getPitchNumber, interval, main, nameToNumber, nameToNumber, numberToName, pitchCompare, pitchNumberToClass, pitchNumberToOctave, setOctave, setPitchName, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MAX_DISSONANCE
public static int MAX_DISSONANCE
dissonance
protected int dissonance
ChordPitch
public ChordPitch()
- Constructors
ChordPitch
public ChordPitch(Pitch p,
int dissonance)
ChordPitch
public ChordPitch(int pitchNumber,
int dissonance)
ChordPitch
public ChordPitch(java.lang.String pitchName,
int dissonance)
toPitch
public Pitch toPitch()
- Convert the chordpitch to (a copy of) the pitch
getDissonance
public int getDissonance()
- Get the dissonance (between 0 and MAX_DISSONANCE)
setDissonance
public void setDissonance(int dissonance)
- Set the dissonance (between 0 and MAX_DISSONANCE)
setPitchNumber
public void setPitchNumber(int pitchNumber)
- Set the pitch number, ensuring we are in the base octave (0)
- Overrides:
setPitchNumber in class Pitch
transpose
public void transpose(int halfSteps)
- Overrides:
transpose in class Pitch
clone
public java.lang.Object clone()
- Overrides:
clone in class Pitch