GUIDOLib  1.7.7
A Music Score Rendering Engine
Functions
Building abstract and graphic representations

Functions

GuidoErrCode init (GuidoInitDesc *desc)
 Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the Guido Factory. More...
 
GuidoErrCode init ()
 Initialise the Guido Engine with a internal SVGSystem and SVGDevice. This system and device have embind font metrics. They are used to calculate score in environnement without font metrics like javascript. More...
 
void shutdown ()
 Guido Engine shutdown. More...
 
GuidoErrCode ar2gmn (ARHandler ar, std::ostream &to)
 Print a Guido abstract representation to a stream formatted as gmn code. More...
 
GRHandler ar2gr (ARHandler ar)
 Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument. Default settings are applied. More...
 
GRHandler ar2gr (ARHandler ar, const GuidoLayoutSettings &settings)
 Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument. More...
 
GuidoErrCode updateGR (GRHandler gr)
 Applies new layout settings to an existing Guido graphic representation. Default settings are applied. More...
 
GuidoErrCode updateGR (GRHandler gr, const GuidoLayoutSettings &settings)
 Applies new layout settings to an existing Guido graphic representation. More...
 
void freeAR (ARHandler ar)
 Releases a Guido abstract representation. This method must be called after freeGR. More...
 
void freeGR (GRHandler gr)
 Releases a Guido graphic representation. Don't release the ARHandler refenrece in the GRHandler before release the GR. More...
 
std::string getErrorString (GuidoErrCode errCode)
 Gives a textual description of a Guido error code. More...
 
GuidoLayoutSettings getDefaultLayoutSettings ()
 Gives the default values of the layout settings. More...
 
GuidoErrCode showElement (GRHandler gr, int elt, bool status)
 

Detailed Description

Function Documentation

◆ ar2gmn()

GuidoErrCode ar2gmn ( ARHandler  ar,
std::ostream &  to 
)

Print a Guido abstract representation to a stream formatted as gmn code.

Parameters
arthe handler to the abstract representation.
tothe output stream.

◆ ar2gr() [1/2]

GRHandler ar2gr ( ARHandler  ar)

Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument. Default settings are applied.

Note
You can safely free the AR after the transformation.
Parameters
arthe handler to the abstract representation.
Returns
a Guido opaque handle to a graphic music representation. It's the caller responsability to free the handle using freeGR.

◆ ar2gr() [2/2]

GRHandler ar2gr ( ARHandler  ar,
const GuidoLayoutSettings settings 
)

Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument.

Note
You can safely free the AR after the transformation.
Parameters
arthe handler to the abstract representation.
settingsa pointer to the settings for the graphic layout.
Returns
a Guido opaque handle to a graphic music representation. It's the caller responsability to free the handle using freeGR.

◆ freeAR()

void freeAR ( ARHandler  ar)

Releases a Guido abstract representation. This method must be called after freeGR.

Parameters
arthe handler to the abstract representation.

◆ freeGR()

void freeGR ( GRHandler  gr)

Releases a Guido graphic representation. Don't release the ARHandler refenrece in the GRHandler before release the GR.

Parameters
grthe handler to the graphic representation.

◆ getDefaultLayoutSettings()

GuidoLayoutSettings getDefaultLayoutSettings ( )

Gives the default values of the layout settings.

Returns
the settings fill with default values.

◆ getErrorString()

std::string getErrorString ( GuidoErrCode  errCode)

Gives a textual description of a Guido error code.

Parameters
errCodea Guido error code.
Returns
a string describing the error.

◆ init() [1/2]

GuidoErrCode init ( )

Initialise the Guido Engine with a internal SVGSystem and SVGDevice. This system and device have embind font metrics. They are used to calculate score in environnement without font metrics like javascript.

◆ init() [2/2]

GuidoErrCode init ( GuidoInitDesc desc)

Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the Guido Factory.

Parameters
descthe graphic environment description.
Returns
a Guido error code.

WARNING: the caller must ensure desc maintains a constant reference on a valid VGDevice, because Guido keeps it internally (to calculate fonts, etc.)

◆ showElement()

GuidoErrCode showElement ( GRHandler  gr,
int  elt,
bool  status 
)

Show or hide notation elements.

Parameters
grthe handler to the graphic representation.
eltthe target element
statusa boolean value to show (true) or hide (false) the target element
Returns
a Guido error code.

◆ shutdown()

void shutdown ( )

Guido Engine shutdown.

Actually release the font allocated by the engine. Anyway, the fonts are release when the client application exit but the function provides control over the time of the release.

◆ updateGR() [1/2]

GuidoErrCode updateGR ( GRHandler  gr)

Applies new layout settings to an existing Guido graphic representation. Default settings are applied.

Parameters
grthe handler to the graphic representation.
Returns
a Guido error code.

◆ updateGR() [2/2]

GuidoErrCode updateGR ( GRHandler  gr,
const GuidoLayoutSettings settings 
)

Applies new layout settings to an existing Guido graphic representation.

Parameters
grthe handler to the graphic representation.
settingsthe settings for the graphic layout.
Returns
a Guido error code.

Guido Project Copyright © 2019 Grame-CNCM