Package guidoengine
Class guido
- java.lang.Object
-
- guidoengine.guido
-
public final class guido extends java.lang.ObjectThe main Guido Engine class. Provides basic information about the engine (version, units) Defines error codes.
-
-
Field Summary
Fields Modifier and Type Field Description static intguidoErrActionFailedstatic intguidoErrBadParameterstatic intguidoErrFileAccessstatic intguidoErrInvalidHandlestatic intguidoErrMemorystatic intguidoErrNoMusicFontstatic intguidoErrNoTextFontstatic intguidoErrNotInitializedstatic intguidoErrParsestatic intguidoErrUserCancelstatic intguidoNoErrstatic intkEventsBBstatic intkMeasureBBstatic intkNoBBstatic intkPageBBstatic intkStavesBBstatic intkSystemsBBstatic intkSystemsSliceBB
-
Constructor Summary
Constructors Constructor Description guido()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intCheckVersionNums(int major, int minor, int sub)Checks a required library version number.static floatCM2Unit(float val)Converts centimeters into internal Guido units.static java.lang.StringGetErrorString(int errCode)Gives a textual description of a Guido error code.static java.lang.StringGetJNIVersion()Gives the JNI library version number Version number format is MAJOR.MINOR.SUBstatic floatGetLineSpace()Gives the distance between two staff lines.static intGetParseErrorLine()Deprecated.replaced byguidoscorebase.ParserGetErrorCode()static java.lang.StringGetVersion()Gives the Guido engine version number Version number format is MAJOR.MINOR.SUBstatic floatInches2Unit(float val)Converts inches into internal Guido units.static intInit(java.lang.String guidoFont, java.lang.String textFont)Initialises the Guido Engine.static java.lang.Stringmusicxml2guidoversion()Gives the MusicXML to guido converter versionstatic java.lang.Stringmusicxmlversion()Gives the libMusicXML library version when availablestatic voidshutdown()Guido shut down.static floatUnit2CM(float val)Converts internal Guido units into centimeters.static floatUnit2Inches(float val)Converts internal Guido units into inches.static booleanxml2gmn()Check the libMusicXML library availabilitystatic java.lang.Stringxml2gmn(java.lang.String filename)Converts a MusicXML file to a GMN string
-
-
-
Field Detail
-
kNoBB
public static final int kNoBB
- See Also:
- Constant Field Values
-
kPageBB
public static final int kPageBB
- See Also:
- Constant Field Values
-
kSystemsBB
public static final int kSystemsBB
- See Also:
- Constant Field Values
-
kSystemsSliceBB
public static final int kSystemsSliceBB
- See Also:
- Constant Field Values
-
kStavesBB
public static final int kStavesBB
- See Also:
- Constant Field Values
-
kMeasureBB
public static final int kMeasureBB
- See Also:
- Constant Field Values
-
kEventsBB
public static final int kEventsBB
- See Also:
- Constant Field Values
-
guidoNoErr
public static final int guidoNoErr
- See Also:
- Constant Field Values
-
guidoErrParse
public static final int guidoErrParse
- See Also:
- Constant Field Values
-
guidoErrMemory
public static final int guidoErrMemory
- See Also:
- Constant Field Values
-
guidoErrFileAccess
public static final int guidoErrFileAccess
- See Also:
- Constant Field Values
-
guidoErrUserCancel
public static final int guidoErrUserCancel
- See Also:
- Constant Field Values
-
guidoErrNoMusicFont
public static final int guidoErrNoMusicFont
- See Also:
- Constant Field Values
-
guidoErrNoTextFont
public static final int guidoErrNoTextFont
- See Also:
- Constant Field Values
-
guidoErrBadParameter
public static final int guidoErrBadParameter
- See Also:
- Constant Field Values
-
guidoErrInvalidHandle
public static final int guidoErrInvalidHandle
- See Also:
- Constant Field Values
-
guidoErrNotInitialized
public static final int guidoErrNotInitialized
- See Also:
- Constant Field Values
-
guidoErrActionFailed
public static final int guidoErrActionFailed
- See Also:
- Constant Field Values
-
-
Method Detail
-
Init
public static final int Init(java.lang.String guidoFont, java.lang.String textFont)Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the Guido Factory- Parameters:
guidoFont- a music font name (only "Guido2" supported).textFont- a text font name.- Returns:
- a Guido error code.
-
shutdown
public static final void shutdown()
Guido shut down. Actually release the font allocated by the engine.
-
xml2gmn
public static final boolean xml2gmn()
Check the libMusicXML library availability- Returns:
- true when available
-
musicxmlversion
public static final java.lang.String musicxmlversion()
Gives the libMusicXML library version when available- Returns:
- a version string (empty when the library is not available)
-
musicxml2guidoversion
public static final java.lang.String musicxml2guidoversion()
Gives the MusicXML to guido converter version- Returns:
- a version string (empty when the library is not available)
-
xml2gmn
public static final java.lang.String xml2gmn(java.lang.String filename)
Converts a MusicXML file to a GMN string- Parameters:
filename- the file name- Returns:
- a string
-
GetErrorString
public static final java.lang.String GetErrorString(int errCode)
Gives a textual description of a Guido error code.- Parameters:
errCode- a Guido error code.- Returns:
- a string describing the error.
-
GetParseErrorLine
@Deprecated public static final int GetParseErrorLine()
Deprecated.replaced byguidoscorebase.ParserGetErrorCode()Gives the line of a Guido script where the last parse error has occured.- Returns:
- a line number.
-
Unit2CM
public static final float Unit2CM(float val)
Converts internal Guido units into centimeters.- Parameters:
val- the value to be converted- Returns:
- the converted value
-
CM2Unit
public static final float CM2Unit(float val)
Converts centimeters into internal Guido units.- Parameters:
val- the value to be converted- Returns:
- the converted value
-
Unit2Inches
public static final float Unit2Inches(float val)
Converts internal Guido units into inches.- Parameters:
val- the value to be converted- Returns:
- the converted value
-
Inches2Unit
public static final float Inches2Unit(float val)
Converts inches into internal Guido units.- Parameters:
val- the value to be converted- Returns:
- the converted value
-
GetVersion
public static final java.lang.String GetVersion()
Gives the Guido engine version number Version number format is MAJOR.MINOR.SUB- Returns:
- the Guido engine version number as a string
-
GetJNIVersion
public static final java.lang.String GetJNIVersion()
Gives the JNI library version number Version number format is MAJOR.MINOR.SUB- Returns:
- the JNI library version number as a string
-
CheckVersionNums
public static final int CheckVersionNums(int major, int minor, int sub)Checks a required library version number.- Parameters:
major- the major revision number.minor- the minor revision number.sub- the sub revision number.- Returns:
- noErr if the library version number is greater or equal to the version number passed as argument.
-
GetLineSpace
public static final float GetLineSpace()
Gives the distance between two staff lines. This value is constant (= 50). It does not depend on the context, it will probably never change in future versions of the library.- Returns:
- the distance between two lines of staff, in Guido internal units.
-
-