Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

NoteMusic Class Reference
[Core Musical Objects]

#include <NoteMC.h>

Inheritance diagram for NoteMusic:

EventMC MeasureInserter MusicObject PitchedNoteMusic RestMusic LyricNoteMusic List of all members.

Public Member Functions

 NoteMusic (int nstaff, QString t, int duration, bool dot)
virtual QString getSymbolName ()
void setDuration (int)
int getLDuration ()
int getUDuration ()
bool getTacitAlteration ()
void setTacitAlteration (bool)
int getVoice ()
void setVoice (int)
int getStaff ()
void setStaff (int)
int getAlter ()
void setAlter (int)
QString getDurationType ()
void setDirection (int)
int getDirection ()
bool dotted ()
NoteMusicgetChordedTo ()
void setChordedTo (NoteMusic *nm)
int isGrace ()
virtual int isPitched ()
void setGrace ()
void cancelGroupStemable ()
virtual int groupStemable ()
virtual int simpleStemable ()
void setIndexMS (void *)
void * getIndexMS ()
void setMeasureSectionIndex (int)
int getMeasureSectionIndex ()
virtual QString toString ()

Protected Attributes

QString ltype
bool dot
NoteMusicchordedTo
int grace
int measureSectionIndex
int duration
int voice
int direction
int staff
int alter
bool tacitAlteration
bool overrideGroupStemable
void * indexMS

Detailed Description

This class represent a note, a note should always be inserted in a measure, that is why it implements measure Inserter. From now we assume that a note is defined to be something being drawn inside the measure bar and belonging to a staff.


Constructor & Destructor Documentation

NoteMusic::NoteMusic int  n,
QString  t,
int  dur,
bool  d
 

This is the constructor where it is specified in which staff we are writing Careful ! In the musicXML standard the index of the staff begin with 1 and not 0 At the construction we set the voice to the value -1 (Undetermined)

Parameters:
st staff


Member Function Documentation

void NoteMusic::cancelGroupStemable  ) 
 

This method let you overwrite the return value of groupeStemable method. It is usefull not to let the program determine algorithmically the stems groups.

bool NoteMusic::dotted  ) 
 

Returns:
true if the note is dotted

int NoteMusic::getAlter  ) 
 

Returns:
the alteration of a note +2 id for a double sharp +1 is for a sharp -1 for a flat
  • 2 for a double flat

NoteMusic * NoteMusic::getChordedTo  ) 
 

Returns:
the note it is chorded to, 0 if the note is not chorded to any note

int NoteMusic::getDirection  ) 
 

Returns:
the direction of the stem

QString NoteMusic::getDurationType  ) 
 

Returns:
the duration type of the note

void * NoteMusic::getIndexMS  ) 
 

Returns:
a pointer to the MusicSymbol it is associated with 0 if no symbol had been associated with

int NoteMusic::getLDuration  ) 
 

Returns:
the note duration in Local (part) time measurement units

int NoteMusic::getMeasureSectionIndex  ) 
 

Returns:
The measure section Index of the note

int NoteMusic::getStaff  ) 
 

Returns:
the staff it belongs to

QString NoteMusic::getSymbolName  )  [virtual]
 

This method should always be overrided

Returns:
a string that will be used by a factory to build a symbol

Implements MeasureInserter.

Reimplemented in PitchedNoteMusic, and RestMusic.

bool NoteMusic::getTacitAlteration  ) 
 

Returns:
true if the alteration is tacit (implicit)

int NoteMusic::getUDuration  ) 
 

Returns:
the note duration in Universal (score) time measurement units

int NoteMusic::getVoice  ) 
 

Returns:
the voice number (-1 if undetermined)

int NoteMusic::groupStemable  )  [virtual]
 

Returns:
0 if not stemable in a group or if the overrideSteamable properrty had been set to true by colling cancelGroupStemable (Useful for tuplets) -1 otherwhise

Reimplemented in RestMusic.

int NoteMusic::isGrace  ) 
 

Returns:
non 0 if it is a grace note

int NoteMusic::isPitched  )  [virtual]
 

Returns:
0

Reimplemented in PitchedNoteMusic.

void NoteMusic::setAlter int  i  ) 
 

set the alteration +2 id for a double sharp +1 is for a sharp 0 if it is a neutral -1 for a flat

  • 2 for a double flat

void NoteMusic::setChordedTo NoteMusic nm  ) 
 

Sets the note is is chorded to

Parameters:
nm the note it is chorded to

void NoteMusic::setDirection int  d  ) 
 

set the direction of the stem

void NoteMusic::setDuration int  i  ) 
 

Sets the duration

void NoteMusic::setGrace  ) 
 

This set the note to be a grace note

void NoteMusic::setIndexMS void *  p  ) 
 

Set the pointer to the associater pointer to a MS

void NoteMusic::setMeasureSectionIndex int  msi  ) 
 

This sets the measure section index (This is only an accelerator index)

Parameters:
msi the measure section index

void NoteMusic::setStaff int  i  ) 
 

Use this méthode if it is a staffInserter *

Reimplemented from MeasureInserter.

void NoteMusic::setTacitAlteration bool  b  ) 
 

Set the alteration of the note as tacit (implicit)

Parameters:
b true if the alteration is tacit (implicit)

int NoteMusic::simpleStemable  )  [virtual]
 

Returns:
0 if not simply stemable -1 otherwhise

Reimplemented in RestMusic.

QString NoteMusic::toString  )  [virtual]
 

Returns:
the string the string representation of a note it is best to use this method that the print methode

Reimplemented in PitchedNoteMusic, LyricNoteMusic, and RestMusic.


Member Data Documentation

int NoteMusic::staff [protected]
 

We use the staff parameter to determine wether the measureinserter is also a staff inserter. i.e it has a property staff >0. We set this to -1 by default and give the Measure inserter a setter for this property. *

Reimplemented from MeasureInserter.


The documentation for this class was generated from the following files:
Generated on Tue Jun 1 21:13:35 2004 for Alternate Take by doxygen 1.3.6