GUIDO Engine Javascript
The GUIDO Engine services are available as a Web Assembly Javascript libray.
The Javascript library API is similar to the C/C++ API:
- data structures like GuidoLayoutSettings,
GuidoDate, GuidoPageFormat, ParserError, GuidoVersion or LimitParams carry the the same name on Javascript side, including for the structures fields.
- constants like GuidoErrCode or GuidoElementSelector carry the the same name on Javascript side
- C++ classes that proviide the interface to the library service are also similar in name and in methods names. These classes are enumerated below, with the corresponding methods.
This short Javascript documentation is intended as a quick reference. For more details, you should refer to the
C/C++ API.
Data structure used by GUIDOScoreMap module
GUIDOScoreMap module use a collection of JSON objects corresponding to the objects of C/C++ API to exchange data.
You can find the description of all the JSON objects in the
GUIDO mappings page of Guido webservice.
Functions:
init
shutdown
ar2gr
ar2grSettings
updateGR
updateGRSettings
showElement
freeAR
freeGR
getErrorString
getDefaultLayoutSettings
countVoices
getPageCount
getSystemCount
duration
findEventPage
findPageAt
getPageDate
gr2SVG
gr2SVGColored
abstractExport
binaryExport
javascriptExport
setDrawBoundingBoxes
getDrawBoundingBoxes
getPageFormat
setDefaultPageFormat
getDefaultPageFormat
unit2CM
cm2Unit
unit2Inches
inches2Unit
resizePageToMusic
getVersion
getVersionStr
checkVersionNums
getLineSpace
markVoice
openParser
closeParser
file2AR
string2AR
getStream
stream2AR
parserGetErrorCode
openStream
closeStream
writeStream
resetStream
getParsingTime
getAR2GRTime
getOnDrawTime
Functions:
getPageMap
getStaffMap
getVoiceMap
getSystemMap
getTime
getPoint
getTimeMap
getPianoRollMap
Functions:
ar2PianoRoll
destroyPianoRoll
setLimits
enableKeyboard
getKeyboardWidth
enableAutoVoicesColoration
setRGBColorToVoice
setHtmlColorToVoice
removeColorToVoice
enableMeasureBars
setPitchLinesDisplayMode
svgExport
javascriptExport
Functions:
ar2RProportional
destroyRProportional
drawDurationLines
enableAutoVoicesColoration
setRGBColorToVoice
setHtmlColorToVoice
removeColorToVoice
enableMeasureBars
setLimits
svgExport
javascriptExport
Functions:
openMusic
closeMusic
openVoice
closeVoice
openChord
closeChord
insertCommata
openEvent
closeEvent
addSharp
addFlat
setEventDots
setEventAccidentals
setOctave
setDuration
openTag
openRangeTag
endTag
closeTag
addTagParameterString
addTagParameterInt
addTagParameterFloat
setParameterName
setParameterUnit
GuidoParser Opaque pointer
NodeAR Opaque pointer
NodeGR Opaque pointer
GuidoStream Opaque pointer
PianoRoll Opaque pointer
GuidoEngine class
A
GuidoEngine class is provided as a high level interface to the modules above. It includes also an asynchronous wasm module initialisation method.