ritornello.core.playable
Class PlayableNote

java.lang.Object
  |
  +--ritornello.core.conceitual.Note
        |
        +--ritornello.core.playable.PlayableNote
All Implemented Interfaces:
PlayableElement

public class PlayableNote
extends Note
implements PlayableElement


Field Summary
static int MAX_OCTAVE
          The max octave number.
static int MIN_OCTAVE
          The min octave number.
 
Fields inherited from class ritornello.core.conceitual.Note
DOUBLE_FLAT, DOUBLE_SHARP, FLAT, NATURAL, SHARP
 
Constructor Summary
PlayableNote(PitchName pitchName, int accident, int octave)
          Constructor.
 
Method Summary
 boolean equals(PlayableNote note)
          Compares two notes, based on their pitch name, accident and octave.
 Lapse getLapse()
           
 int getOctave()
          Returns the note's octave.
 void setLapse(Lapse lapse)
           
 void setOctave(int octave)
          Sets the note's octave.
 
Methods inherited from class ritornello.core.conceitual.Note
equals, getAccident, getAccidentName, getChords, getName, getPitchName, getScales, main, setAccident, setPitchName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_OCTAVE

public static final int MAX_OCTAVE
The max octave number.

See Also:
Constant Field Values

MIN_OCTAVE

public static final int MIN_OCTAVE
The min octave number.

See Also:
Constant Field Values
Constructor Detail

PlayableNote

public PlayableNote(PitchName pitchName,
                    int accident,
                    int octave)
             throws ValidationException
Constructor. Sets pitch name, accident and octave.

Parameters:
pitchName - - A note pitch name (e.g. DO, RE, MI...).
accident - - A note accident (e.g. Natural(0), #(+1), b(-1), ##(+2), bb(-2)).
octave - - A note octave (e.g. a MIDDLE C has octave equals to 6).
Throws:
ValidationException
Method Detail

setLapse

public void setLapse(Lapse lapse)
Specified by:
setLapse in interface PlayableElement
Parameters:
lapse -

getLapse

public Lapse getLapse()
Specified by:
getLapse in interface PlayableElement
Returns:
Lapse

getOctave

public int getOctave()
Returns the note's octave.

Returns:
int

setOctave

public void setOctave(int octave)
               throws ValidationException
Sets the note's octave.

Parameters:
octave - - The note's octave.
Throws:
ValidationException

equals

public boolean equals(PlayableNote note)
Compares two notes, based on their pitch name, accident and octave.

Parameters:
note - - The note to compare.
Returns:
boolean