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

TSound Class Reference

Represents the MusicXML sound element. More...

#include <TSound.h>

Inheritance diagram for TSound:

TMusicData visitable smartable List of all members.

Public Types

enum  { yes = -2, undefined = -1 }

Public Member Functions

virtual void accept (TScoreVisitor &visitor)
void setTempo (long tempo)
 Tempo is expressed in quarter notes per minute.

void setDynamics (long dyn)
 Dynamics (or MIDI velocity) are expressed as a percentage of the default forte value (90 for MIDI).

void setDacapo (YesNo::type yn)
 Dacapo indicates to go back to the beginning of the movement.

void setSegno (long segno)
 a segno mark. The value can be used to distinguish multiple jumps.

void setDalsegno (long ds)
 dalsegno is used for backward jump to a segno sign. The value can be used to distinguish multiple jumps.

void setCoda (long coda)
 a coda mark. The value can be used to distinguish multiple jumps.

void setTocoda (long tc)
 tocoda is used for forward jump to a coda sign. The value can be used to distinguish multiple jumps.

void setDivisions (long div)
 to be used with segno or coda attributes to avoid computation of divisions.

void setForwardRepeat (YesNo::type yn)
 Forward-repeat is used when a forward repeat sign is implied, and usually follows a bar line.

void setFine (long fine)
 The fine attribute follows the final note or rest in a movement with a da capo direction. It may take the special yes value.

void setPizzicato (YesNo::type pizz)
 Pizzicato in a sound element effects all following notes. true indicates pizzicato, false indicates arco.

void setMidiChannel (long chan)
 MIDI channel indication allow for detailed control of MIDI assignment.

void setMidiIntrument (long instr)
 MIDI instrument indication allow for detailed control of MIDI assignment.

long add (const SMidiInstrument &instr)
long getTempo () const
long getDynamics () const
YesNo::type getDacapo () const
long getSegno () const
long getDalsegno () const
long getCoda () const
long getTocoda () const
long getDivisions () const
YesNo::type getForwardRepeat () const
long getFine () const
YesNo::type getPizzicato () const
long getMidiChannel () const
long getMidiIntrument () const
vvector< SMidiInstrument > & instrumentList ()

Protected Member Functions

void init ()

Friends

EXP friend SMARTP< TSoundnewSound ()

Detailed Description

The sound element contains general playback parameters, based on MuseData's C0 sound suggestions. They can stand alone within a part/measure, or be a component element within a direction.
Segno and dalsegno are used for backwards jumps to a segno sign; coda and tocoda are used for forward jumps to a coda sign. If there are multiple jumps, the value of these parameters can be used to name and distinguish them. If segno or coda is used, the divisions attribute can also be used to indicate the number of divisions per quarter note. Otherwise sound and MIDI generating programs may have to recompute this.
A dalsegno or dacapo attribute indicates that the jump should occur the first time through; a tocoda attribute indicates that the jump should occur the second time through.
The fine attribute follows the final note or rest in a movement with a da capo direction. If numeric, the value represents the actual duration of the final note or rest, which can be ambiguous in written notation and different among parts and voices. The value may also be "yes" to indicate no change to the final duration.
The MusicXML sound element is defined in direction.dtd. All its attributes are implied.


Generated on Tue Mar 23 09:50:22 2004 for LibMusicXML by doxygen 1.3.3