GUIDOLib  1.6.8
A Music Score Rendering Engine
Functions | Variables
Guido Reduced Proportional Representation Adapter

A C++ interface to the GUIDOReducedProportional API. More...

Functions

virtual ~GUIDOReducedProportionalAdapter ()
 
RProportional * ar2RProportional (ARHandler arh)
 Creates a new reduced proportional representation from AR. More...
 
RProportional * midi2RProportional (const std::string &midiFileName)
 Creates a new reduced proportional representation from a midi file. More...
 
GuidoErrCode destroyRProportional (RProportional *pr)
 Destroys a reduced proportional representation and releases all the associated ressources. More...
 
GuidoErrCode setLimits (RProportional *pr, GuidoDate start, GuidoDate end, int lowpitch, int highpitch)
 Sets limits to a reduced proportional representation (start/end date, lower/higher pitch) More...
 
GuidoErrCode drawDurationLines (RProportional *pr, bool enabled)
 Enables or disable duration lines (enabled by default) More...
 
GuidoErrCode enableAutoVoicesColoration (RProportional *pr, bool enabled)
 Enables or not the automatic voices coloration (not enabled by default) If a color is manually set with GuidoRProportionalSetColorToVoice, automatic color will not be applied for this voice. More...
 
GuidoErrCode setRGBColorToVoice (RProportional *pr, int voiceNum, int r, int g, int b, int a)
 Sets a RGB color to a voice (first voice is number 1) (black by default) More...
 
GuidoErrCode setHtmlColorToVoice (RProportional *pr, int voiceNum, const char *color)
 Sets a html color to a voice (first voice is number 1) (black by default) More...
 
GuidoErrCode removeColorToVoice (RProportional *pr, int voiceNum)
 remove a color to a voice (first voice is number 1) (black by default) More...
 
GuidoErrCode enableMeasureBars (RProportional *pr, bool enabled)
 Enables or disable measure bars (false by default) More...
 
Time2GraphicMap getMap (RProportional *pr, int width, int height)
 Gets a reduced proportional representation map. More...
 
GuidoErrCode onDraw (RProportional *pr, int width, int height, VGDevice *dev)
 Draw the reduced proportional representation on a VGDevice. More...
 
std::string svgExport (RProportional *pr, int width, int height)
 svgExport Draw the reduced proportional representation on SVG device and return the xml string. More...
 

Variables

class_export GUIDOReducedProportionalAdapter
 

Detailed Description

A C++ interface to the GUIDOReducedProportional API.

A C++ class to manipulate reduced proportional representations.

Function Documentation

◆ ar2RProportional()

RProportional* ar2RProportional ( ARHandler  arh)

Creates a new reduced proportional representation from AR.

Parameters
arhan AR handler
Returns
a guido reduced proportional representation.

◆ destroyRProportional()

GuidoErrCode destroyRProportional ( RProportional *  pr)

Destroys a reduced proportional representation and releases all the associated ressources.

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
Returns
a Guido error code

◆ drawDurationLines()

GuidoErrCode drawDurationLines ( RProportional *  pr,
bool  enabled 
)

Enables or disable duration lines (enabled by default)

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional
enableda boolean value
Returns
a Guido error code

◆ enableAutoVoicesColoration()

GuidoErrCode enableAutoVoicesColoration ( RProportional *  pr,
bool  enabled 
)

Enables or not the automatic voices coloration (not enabled by default) If a color is manually set with GuidoRProportionalSetColorToVoice, automatic color will not be applied for this voice.

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional
enableda boolean corresponding to the color state
Returns
a Guido error code

◆ enableMeasureBars()

GuidoErrCode enableMeasureBars ( RProportional *  pr,
bool  enabled 
)

Enables or disable measure bars (false by default)

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
enableda boolean corresponding to the measure bars draw state
Returns
a Guido error code

◆ getMap()

Time2GraphicMap getMap ( RProportional *  pr,
int  width,
int  height 
)

Gets a reduced proportional representation map.

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
widththe width of the piano roll (-1 to set the default width : 1024)
heightthe height of the canvas (-1 to set the default height : 512)
Returns
a Guido error code (returns guidoErrBadParameter if keyboard width is higher than width param)

◆ midi2RProportional()

RProportional* midi2RProportional ( const std::string &  midiFileName)

Creates a new reduced proportional representation from a midi file.

Parameters
midiFileNamea midi file name
Returns
a guido reduced proportional representation.

◆ onDraw()

GuidoErrCode onDraw ( RProportional *  pr,
int  width,
int  height,
VGDevice dev 
)

Draw the reduced proportional representation on a VGDevice.

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
widththe drawing area width (-1 to set the default width : 1024)
heightthe drawing area height (-1 to set the default height : 512)
devthe graphic device
Returns
a Guido error code

◆ removeColorToVoice()

GuidoErrCode removeColorToVoice ( RProportional *  pr,
int  voiceNum 
)

remove a color to a voice (first voice is number 1) (black by default)

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
voiceNumthe voice number (first voice is number 1)
Returns
a Guido error code

◆ setHtmlColorToVoice()

GuidoErrCode setHtmlColorToVoice ( RProportional *  pr,
int  voiceNum,
const char *  color 
)

Sets a html color to a voice (first voice is number 1) (black by default)

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
voiceNumthe voice number (first voice is number 1)
colorthe html color (constants are defined in Colors.h)
Returns
a Guido error code

◆ setLimits()

GuidoErrCode setLimits ( RProportional *  pr,
GuidoDate  start,
GuidoDate  end,
int  lowpitch,
int  highpitch 
)

Sets limits to a reduced proportional representation (start/end date, lower/higher pitch)

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
startdate (GuidoDate) (0/0 to adjust automatically start date to the score's start date)
enddate (GuidoDate) (0/0 to adjust automatically end date to the score's end date)
lowpitchminimal pitch (midi notation) (-1 to adjust automatically min pitch to the score's minimal pitch)
highpitchmaximal pitch (midi notation) (-1 to adjust automatically max pitch to the score's maximal pitch) Remark : minimal range pitch accepted is 1 octave.
Returns
a Guido error code

◆ setRGBColorToVoice()

GuidoErrCode setRGBColorToVoice ( RProportional *  pr,
int  voiceNum,
int  r,
int  g,
int  b,
int  a 
)

Sets a RGB color to a voice (first voice is number 1) (black by default)

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
voiceNumthe voice number (first voice is number 1)
rthe red param of RGB color
gthe green param of RGB color
bthe blue param of RGB color
athe alpha param of RGB color
Returns
a Guido error code

◆ svgExport()

std::string svgExport ( RProportional *  pr,
int  width,
int  height 
)

svgExport Draw the reduced proportional representation on SVG device and return the xml string.

Parameters
pra reduced proportional representation previously created with GuidoAR2RProportional or GuidoMidi2RProportional
widththe width on which piano roll will be drawn (-1 to set the default width : 1024)
heightthe height on which piano roll will be drawn (-1 to set the default height : 512)
Returns
the xml code in svg.

◆ ~GUIDOReducedProportionalAdapter()

virtual ~GUIDOReducedProportionalAdapter ( )
virtual

Variable Documentation

◆ GUIDOReducedProportionalAdapter

class_export GUIDOReducedProportionalAdapter
Initial value:
GUIDOReducedProportionalAdapter
class_export GUIDOReducedProportionalAdapter
Definition: GUIDOReducedProportionalAdapter.h:30

Guido Project Copyright © 2019 Grame-CNCM