Package guidoengine

Class guido


  • public final class guido
    extends java.lang.Object
    The main Guido Engine class. Provides basic information about the engine (version, units) Defines error codes.
    • Constructor Detail

      • guido

        public guido()
    • 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.
        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.