GUIDOLib
1.7.7
A Music Score Rendering Engine
|
A C++ class over the GUIDO factory C API. More...
Functions | |
virtual | ~GUIDOFactoryAdapter () |
~GUIDOFactoryAdapter delete the class and close the internal factory More... | |
GuidoErrCode | openMusic () |
Creates and opens a new music score. More... | |
ARHandler | closeMusic () |
Closes the current music score. More... | |
GuidoErrCode | openVoice () |
Creates and opens a new voice. More... | |
GuidoErrCode | closeVoice () |
Closes the current voice. More... | |
GuidoErrCode | openChord () |
Creates and open a new chord. More... | |
GuidoErrCode | closeChord () |
Closes the current chord. More... | |
GuidoErrCode | insertCommata () |
Begins a new chord note commata. More... | |
GuidoErrCode | openEvent (const std::string &inEventName) |
Creates and opens a new event (note or rest). More... | |
GuidoErrCode | closeEvent () |
Closes the current event. More... | |
GuidoErrCode | addSharp () |
Adds a sharp to the current event. More... | |
GuidoErrCode | addFlat () |
Add a flat to the current event. More... | |
GuidoErrCode | setEventDots (int dots) |
Sets the number of dots the current event. More... | |
GuidoErrCode | setEventAccidentals (int accident) |
Sets the accidentals of the current event. More... | |
GuidoErrCode | setOctave (int octave) |
Sets the register (octave) of the current event. More... | |
GuidoErrCode | setDuration (int numerator, int denominator) |
Sets the duration of the current event. More... | |
GuidoErrCode | openTag (const std::string &name, long tagID) |
Add a tag to the current voice. More... | |
GuidoErrCode | openRangeTag (const std::string &name, long tagID) |
Add a tag to the current voice. More... | |
GuidoErrCode | endTag () |
Indicates the end of a range tag. More... | |
GuidoErrCode | closeTag () |
Closes the current tag. More... | |
GuidoErrCode | addTagParameterString (const std::string &val) |
Adds a new string parameter to the current tag. More... | |
GuidoErrCode | addTagParameterInt (int val) |
Adds a new integer parameter to the current tag. More... | |
GuidoErrCode | addTagParameterFloat (double val) |
Adds a new floating-point parameter to the current tag. More... | |
GuidoErrCode | setParameterName (const std::string &name) |
Defines the name (when applicable) of the last added tag-parameter. More... | |
GuidoErrCode | setParameterUnit (const std::string &unit) |
Defines the unit of the last added tag-parameter. More... | |
Variables | |
class_export | GUIDOFactoryAdapter |
A C++ class over the GUIDO factory C API.
The GUIDO Factory API provides a set of functions to create a GUIDO abstract representation from scratch.
GuidoErrCode addFlat | ( | ) |
Add a flat to the current event.
The current event must be a note.
GuidoErrCode addSharp | ( | ) |
Adds a sharp to the current event.
The current event must be a note.
GuidoErrCode addTagParameterFloat | ( | double | val | ) |
Adds a new floating-point parameter to the current tag.
val | the parameter value |
GuidoErrCode addTagParameterInt | ( | int | val | ) |
Adds a new integer parameter to the current tag.
val | the parameter value |
GuidoErrCode addTagParameterString | ( | const std::string & | val | ) |
Adds a new string parameter to the current tag.
val | the string parameter value |
GuidoErrCode closeChord | ( | ) |
Closes the current chord.
The function modifies the factory state if a chord is currently opened: the current factory chord is set to null. It fails if no chord is opened. The chord is added to the current voice.
GuidoErrCode closeEvent | ( | ) |
Closes the current event.
The function modifies the factory state if an event is currently opened: the current factory event is set to null. It fails if no event is opened. The event is added to the current voice.
ARHandler closeMusic | ( | ) |
Closes the current music score.
The function modifies the factory state if a music score is currently opened: the current factory score is set to null. It fails if no music score is opened. You must not have pending events nor pending voice at this point.
The logicical music layout (conversion from abstract to abstract representation) is part of the function operations. Next, the caller is expected to call GuidoFactoryMakeGR()
with the returned value in order to proceed with the graphical score layout.
GuidoFactoryMakeGR()
GuidoErrCode closeTag | ( | ) |
Closes the current tag.
The function is applied to the current tag. Must be called after parameter and before the range.
With the following examples:
tag<1,2> c d : call the function before parsing c
GuidoErrCode closeVoice | ( | ) |
Closes the current voice.
The function modifies the factory state if a voice is currently opened: the current factory voice is set to null. It fails if no voice is opened. You must not have pending events at this point. The voice is first converted to its normal form and next added to the current score.
GuidoErrCode endTag | ( | ) |
Indicates the end of a range tag.
The function is applied to the current tag. It must be called when the end of a tag's range has been reached.
GuidoErrCode insertCommata | ( | ) |
Begins a new chord note commata.
Called to tell the factory that a new chord-voice is beginning. This is important for the ranges that need to be added (dispdur and shareStem)
GuidoErrCode openChord | ( | ) |
Creates and open a new chord.
The function modifies the factory state: the new chord becomes the current factory chord. It fails if a chord is already opened. A chord has to be closed using GuidoFactoryCloseChord()
GuidoErrCode openEvent | ( | const std::string & | inEventName | ) |
Creates and opens a new event (note or rest).
The function modifies the factory state: the new event becomes the current factory event. It fails if an event is already opened. An event has to be closed using GuidoFactoryCloseEvent()
GuidoErrCode openMusic | ( | ) |
Creates and opens a new music score.
The function modifies the factory state: the new score becomes the current factory score. It fails if a music score is already opened. A music score has to be closed using GuidoFactoryCloseMusic()
GuidoErrCode openRangeTag | ( | const std::string & | name, |
long | tagID | ||
) |
Add a tag to the current voice.
name | the tag name |
tagID | is the number that the parser generates for advanced GUIDO |
GuidoErrCode openTag | ( | const std::string & | name, |
long | tagID | ||
) |
Add a tag to the current voice.
name | the tag name |
tagID | is the number that the parser generates for advanced GUIDO |
GuidoErrCode openVoice | ( | ) |
Creates and opens a new voice.
The function modifies the factory state: the new voice becomes the current factory voice. It fails if a voice is already opened. A voice has to be closed using GuidoFactoryCloseVoice()
Voices are similar to sequence is GMN.
GuidoErrCode setDuration | ( | int | numerator, |
int | denominator | ||
) |
Sets the duration of the current event.
Durations are expressed as fractional value of a whole note: for example, a quarter note duration is 1/4. The duration becomes the current duration ie next notes will carry this duration until otherwise specified.
numerator | the rational duration numerator |
denominator | the rational duration denominator |
GuidoErrCode setEventAccidentals | ( | int | accident | ) |
Sets the accidentals of the current event.
accident | positive values are used for sharp and negative values for flats |
GuidoErrCode setEventDots | ( | int | dots | ) |
Sets the number of dots the current event.
dots | the number of dots to be carried by the current event. |
GuidoErrCode setOctave | ( | int | octave | ) |
Sets the register (octave) of the current event.
The current event must be a note. The register becomes the current register ie next notes will carry this register until otherwise specified.
octave | is an integer value indicating the octave of the note where a1 is A 440Hz. All octaves start with the pitch class c. |
GuidoErrCode setParameterName | ( | const std::string & | name | ) |
Defines the name (when applicable) of the last added tag-parameter.
name | the tag parameter name |
GuidoErrCode setParameterUnit | ( | const std::string & | unit | ) |
Defines the unit of the last added tag-parameter.
unit | a string defining the unit. The following units are supported:
|
|
virtual |
~GUIDOFactoryAdapter delete the class and close the internal factory
class_export GUIDOFactoryAdapter |