dguitar.codecs.guitarPro
Class GPNote

java.lang.Object
  extended bydguitar.codecs.guitarPro.GPNote

public class GPNote
extends java.lang.Object

This class describes how is represented a complete note. Contrarily to the GPMusicalNote class, this one carries the information contained about one note in Guitar Pro: it can have effects, can be accentuated...

Author:
Matthieu Wipliez

Field Summary
private  GPDynamic _dynamic
          The note dynamic.
private  int _fretNumber
          The number of the fret.
private  boolean _isDeadNote
          Whether the note is a dead note (displayed X).
private  boolean _isGhostNote
          Whether the note is a ghost note.
private  boolean _isTieNote
          Whether the note is a tied note.
private  int _nTuplet
          The n-tuplet this note may take part in.
 GPDuration duration
          Note duration possibly linked to this note.
 GPEffectsOnNote effects
          Effects possibly linked to this note.
 GPFingering fingeringLeftHand
          Fingering of the left hand possibly linked to this note.
 GPFingering fingeringRightHand
          Fingering of the right hand possibly linked to this note.
 boolean isAccentuated
          Whether the note is accentuated.
 boolean isDotted
          Whether the note is a dotted note.
 
Constructor Summary
GPNote()
          Creates a new Note.
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the given object is equal to this GPNote.
 GPDynamic getDynamic()
          Returns this note's dynamic.
 int getFretNumber()
          Returns this note's fret number.
 int getNTuplet()
          Returns this note's n-tuplet.
 int getNumberOfFret()
          Deprecated.  
 boolean isDeadNote()
          Returns true if this note is dead.
 boolean isGhostNote()
          Returns true if this note is a ghost note.
 boolean isTieNote()
          Returns true if this note is a tie note.
 void setDeadNote(boolean isDeadNote)
          Sets this note to dead or not according to isDeadNote.
 void setDynamic(GPDynamic dynamic)
          Sets this note's dynamic.
 void setFretNumber(int fretNumber)
          Sets this note's fret number.
 void setGhostNote(boolean isGhostNote)
          Sets this note as a ghost note or not according to isGhostNote.
 void setNTuplet(int tuplet)
          Sets this note's n-tuplet.
 void setTieNote(boolean isTieNote)
          Sets this note as a tie note or not according to isGhostNote.
 java.lang.String toString()
          Returns a string representation of the Note.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

duration

public GPDuration duration
Note duration possibly linked to this note.


effects

public GPEffectsOnNote effects
Effects possibly linked to this note.


fingeringLeftHand

public GPFingering fingeringLeftHand
Fingering of the left hand possibly linked to this note.


fingeringRightHand

public GPFingering fingeringRightHand
Fingering of the right hand possibly linked to this note.


isAccentuated

public boolean isAccentuated
Whether the note is accentuated.


isDotted

public boolean isDotted
Whether the note is a dotted note.


_dynamic

private GPDynamic _dynamic
The note dynamic.


_fretNumber

private int _fretNumber
The number of the fret.


_isDeadNote

private boolean _isDeadNote
Whether the note is a dead note (displayed X).


_isGhostNote

private boolean _isGhostNote
Whether the note is a ghost note.


_isTieNote

private boolean _isTieNote
Whether the note is a tied note.


_nTuplet

private int _nTuplet
The n-tuplet this note may take part in.

Constructor Detail

GPNote

public GPNote()
Creates a new Note.

Method Detail

equals

public boolean equals(java.lang.Object o)
Returns true if the given object is equal to this GPNote.

See Also:
Object.equals(java.lang.Object)

getDynamic

public GPDynamic getDynamic()
Returns this note's dynamic.

Returns:
this note's dynamic.

getFretNumber

public int getFretNumber()
Returns this note's fret number.

Returns:
this note's fret number.

getNTuplet

public int getNTuplet()
Returns this note's n-tuplet.

Returns:
this note's n-tuplet.

getNumberOfFret

public int getNumberOfFret()
Deprecated.  

Returns this note's fret number.

Returns:
this note's fret number.

isDeadNote

public boolean isDeadNote()
Returns true if this note is dead.

Returns:
true if this note is dead.

isGhostNote

public boolean isGhostNote()
Returns true if this note is a ghost note.

Returns:
true if this note is a ghost note.

isTieNote

public boolean isTieNote()
Returns true if this note is a tie note.

Returns:
true if this note is a tie note.

setDeadNote

public void setDeadNote(boolean isDeadNote)
Sets this note to dead or not according to isDeadNote.

Parameters:
isDeadNote - whether this note is dead or not.

setDynamic

public void setDynamic(GPDynamic dynamic)
Sets this note's dynamic.

Parameters:
dynamic - the dynamic to set.

setFretNumber

public void setFretNumber(int fretNumber)
Sets this note's fret number.

Parameters:
fretNumber - the fret number to set.

setGhostNote

public void setGhostNote(boolean isGhostNote)
Sets this note as a ghost note or not according to isGhostNote.

Parameters:
isGhostNote - whether this note is a ghost note or not.

setNTuplet

public void setNTuplet(int tuplet)
Sets this note's n-tuplet.

Parameters:
tuplet - the n-tuplet to set.

setTieNote

public void setTieNote(boolean isTieNote)
Sets this note as a tie note or not according to isGhostNote.

Parameters:
isTieNote - whether this note is a tie note or not.

toString

public java.lang.String toString()
Returns a string representation of the Note.