|
|
The note event contains a pitch, velocity, and the midi channel. As well as some visual information like a vector of ornaments, the enharmonic shift (which of course contains measurable harmonical information in theory, but for midi music - as well as generally in the well tempered world - it is a visual information only) and a Tuplet object, used to specify the properties of tuplets.
Remember always to make use of the AddElement operation, when adding a new note n to a part p, where sonG is the globally defined song instance:
#include |
Bows and Ornaments can be added to and removed from a note. So far the following ornaments exist:
NS_STACCATO - staccato NS_LEGATO - legato NS_ACCDOWN - accent pointing down NS_ACCUP - accent pointing up NS_ACCENT1 - different accents NS_ACCENT2 - ... NS_ACCENT3 NS_ACCENT4 NS_ACCENT5 NS_ACCENT6 NS_ACCENT7 NS_ACCENT8 NS_ACCENT9 NS_ACCENT10 NS_ACCENT11 NS_TRILLER - triller NS_TRILL1 - triller NS_TRILL2 - triller NS_INF - ... NS_BOWUP - a bow up NS_BOWDOWN - a bow down |
Note ()
| Note |
Default constructor
Note (const Note&)
| Note |
Constructor used by copy()
Note (int pitch, int vel, long len, Position pos, int enh, int tup=0, int c=-1)
| Note |
Constructor to define a new note
Note (char* pitch, int vel, long len, Position pos, int enh, int tup=0, int c=-1)
| Note |
Constructor to define a new note
~Note ()
| ~Note |
This destructor gets rid of the ornament vector
int pitch ()
| pitch |
[const]
Returns the pitch
int vel ()
| vel |
[const]
Returns the velocity
int enh ()
| enh |
[const]
Returns the enharmonic shift
int chan ()
| chan |
[const]
Returns the channel. -1 invokes the default (part defined) channel
Vector * ornament ()
| ornament |
[const]
Returns the ornament-vector
int stem ()
| stem |
[const]
The stem can be STEM_UP, STEM_DOWN or STEM_AUTO
bool nogroup ()
| nogroup |
[const]
Returns true if this is not to be displayed as part of a group of notes
long display (int res = 1)
| display |
[const]
The display is the value (in ticks) to displayed in the score presentation. In most cases this equals the the duration. Only in case of tuplets, the width has to be shortened (the total width of three eighths triplets is the same as the duration of a regular quarter)
Tuplet * tuplet ()
| tuplet |
[const]
Returns the tuplet of this note (may be 0 !)
int tupletBase ()
| tupletBase |
[const]
The base of a tuplet (3 for triplets, 7 for septlets, etc)
int tupletDuration ()
| tupletDuration |
[const]
The total tuplet duration
void tuplet (int base, int duration)
| tuplet |
Tuplet with base and duration
void setPitch (int f)
| setPitch |
Sets the pitch
void setVel (int v)
| setVel |
Sets the velocity
void setEnh (int e)
| setEnh |
Sets the enharmonic shift
void setChan (int c)
| setChan |
Sets the MIDI channel
void setStem (int)
| setStem |
Sets the stem (STEM_UP, STEM_DOWN or STEM_AUTO)
void setNogroup (bool)
| setNogroup |
Lets this note not to be displayed as a part of a group of notes
void setTuplet (Tuplet * tp)
| setTuplet |
Lets this note be displayed as a tuplet (base 3 = triplet)
void add (Ornament*)
| add |
Adds an ornament to the ornament vector
void remove (Ornament*)
| remove |
Removes an ornament from the ornament vector. The ornament is not deleted here, deletion is done in AddOrnament's destructor
Reimplemented from Element.
Expression * setExpression (int)
| setExpression |
Returns an ornament of the ornament vector, and creates it, if necessary
Bow * setBow (int,int,int)
| setBow |
Returns an ornament of the ornament vector, and creates it, if necessary
Lyrics * lyrics ()
| lyrics |
Returns the note's lyrics. No new lyrics are created if they don't exist yet.
RiemannFunction * function ()
| function |
Returns the note's riemann function. No new function is created if it doesn't exist yet.
Vector * removeExp ()
| removeExp |
Extracts the expresseions from the note into a vector and returns this vector
Vector * removeBow ()
| removeBow |
Extracts the bow(s) from the note into a vector and returns this vector
char * cPitch ()
| cPitch |
Returns the pitch in a nice character presentation
ostream & print (int,ostream&)
|
[const virtual]
Implementation of the print method
Reimplemented from Event.
void flush (const char*)
| flush |
[const virtual]
Implementation of the flush method
Reimplemented from Event.
Element * copy ()
| copy |
[const virtual]
Implementation of the copy method
Reimplemented from Event.
Element * load (char*,ifstream*&,Element*)
| load |
[static]
Implementation of the load method
Generated by: wuerthne on al on Sun Jan 6 22:32:42 2002, using kdoc 2.0a53. |