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

PartMusic Class Reference
[Core Musical Objects]

#include <PartMC.h>

Inheritance diagram for PartMusic:

MusicObject List of all members.

Public Member Functions

int getLen ()
QString getId ()
void startSlur (NoteMusic *, int id)
void stopSlur (NoteMusic *, int id)
QPtrList< SlurMC > getSlurs ()
 PartMusic (QString id, QString name)
void setVectorCommonNumerator (VectorCommonNumerator *)
 ~PartMusic ()
MeasureMusicmeasureFactory ()
void append (MeasureMusic *measure)
MeasureMusicgetMeasure (int nmeasure)
int getNbStaves ()
void finalize ()
void computeNoteInBeetweenSlurs ()
QString toString ()

Detailed Description

This class represent a part. A parts can have several staves.


Constructor & Destructor Documentation

PartMusic::PartMusic QString  i,
QString  n
 

In the constructor we set by default the number of staves to one.

PartMusic::~PartMusic  ) 
 

Destructor of part music


Member Function Documentation

void PartMusic::append MeasureMusic measure  ) 
 

This method append a measure at the end of the part. If the attributes in a staff are void, then we set the attributes of the following measure to those of the preceding measure. But as a default beahaviour those attribute are marked tacit (or implicit which is probalbly a better definition)

If the preceding measure has no time signature the behaviour is undetermined and probably leads to a crash.

Since the attributes we are giving to this mesure should not appear in the staff we mark them as tacit. Careful ! since we set the attribute the property is tacit we must do some copies of the clef and time signature

If there is no time in the current measure we copy it from the last measure ant set this attribute as tacit

If there is no key in the current measure we copy it from the last measure ant set this attribute as tacit

For each Staff if there is no clef in the current measure we copy it from the last measure ant set this attribute as tacit

If there is no divisions in the current measure we copy it from the last measure.

void PartMusic::computeNoteInBeetweenSlurs  ) 
 

This method is called after all the slur had been built. This compute all the note in between of a slur. And add this to the slur. This will help us to determine what are the possible note that can collide with the slur.

Actually we do note really ass the notes in beetween but all the note belonging to the measure of the slur this is already a good approximation of the note in beetween of the slur.

void PartMusic::finalize  ) 
 

This method performs the various actions that should be performed once all the measures (filled with notes) had been appended tho the part. Note : This operation could not be performed at the append time because the xml parsing cause the score to first append a void part.

QString PartMusic::getId  ) 
 

This will be used for retrieving a part once it has been declared

int PartMusic::getLen  ) 
 

Returns:
the number of measure in the part

MeasureMusic * PartMusic::getMeasure int  nmeasure  ) 
 

Parameters:
nmeasure the index of the measure to be returned
Returns:
the measure at the sepcified index

int PartMusic::getNbStaves  ) 
 

Returns:
the total number of staves at the beginning we assume this number is constant all over the score

QPtrList< SlurMC > PartMusic::getSlurs  ) 
 

Returns:
the slur list

void PartMusic::setVectorCommonNumerator VectorCommonNumerator vcn  ) 
 

set the vector common numerator surcutre that give the common division for all the measures.

Parameters:
vcn the vector common numerator

void PartMusic::startSlur NoteMusic n,
int  id
 

This start a slur, it is stored in the part until a slur with the same id is ended

void PartMusic::stopSlur NoteMusic n,
int  id
 

This end a slur. This work if it is possible to build the slur (i.e) a slur has been started

QString PartMusic::toString  ) 
 

Returns:
a string representation of the part (For debug)


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