public class guidoscorebase
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
long |
fARHandler |
long |
fGRHandler |
static int |
kEventsBB |
static int |
kMeasureBB |
static int |
kNoBB |
static int |
kPageBB |
static int |
kStavesBB |
static int |
kSystemsBB |
static int |
kSystemsSliceBB |
Constructor and Description |
---|
guidoscorebase() |
guidoscorebase(long ar) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
AbstractExport(int pagenum)
Exports a graphic representation to a abstract representation format.
|
int |
AR2GR()
Converts an AR representation into a GR representation
On output,
fGRHandler contains a handler to the Guido GR
representation. |
int |
AR2GR(guidolayout layout)
Converts an AR representation into a GR representation
Makes use of the Guido Engine settings given as argument.
|
int |
AR2MIDIFile(java.lang.String filename,
guido2midiparams params)
Exports an AR representation to a MIDI file
|
byte[] |
BinaryExport(int pagenum)
Exports a graphic representation to internal binary format.
|
void |
close()
close a score
The close method must be called to notify the Guido Engine that the
associated ressources can be released.
|
int |
CloseParser()
Close the parser.
|
int |
CloseStream()
Close the stream.
|
int |
CountVoices()
Give the score count of voices.
|
void |
DrawBoundingBoxes(int bbMap)
Control bounding boxes drawing.
|
int |
File2AR(java.lang.String file)
Parse a file and create the corresponding Abstract Representation.
|
int |
FindEventPage(guidodate date) |
int |
FindPageAt(guidodate date)
Find a page at a given date.
|
void |
FreeAR()
Tells the engine to release the AR representation handler.
|
void |
FreeGR()
Tells the engine to release the GR representation handler.
|
long |
getARHandler()
Get the reference to an Abstract Representation.
|
int |
GetDrawBoundingBoxes()
Gives the drawn bounding boxes set.
|
int |
GetDuration(guidodate date)
Give the score duration.
|
int |
GetMap(int page,
float width,
float height,
int selector,
mapcollector f)
Retrieves the graphic to time RAW mapping
|
int |
GetPageCount()
Give the score pages count.
|
int |
GetPageDate(int pagenum,
guidodate date)
Give a page date.
|
void |
GetPageFormat(int pagenum,
guidopageformat pf)
Retrieve the format of a given page.
|
int |
GetPageMap(int page,
float width,
float height,
guidoscoremapbase map)
Gives the adjusted page mapping
|
int |
GetRAWStaffMap(int page,
float width,
float height,
int staff,
guidoscoremapbase map)
Retrieves the graphic to time RAW mapping of a defined staff
|
int |
GetRAWSystemMap(int page,
float width,
float height,
guidoscoremapbase map)
Retrieves the graphic to time RAW mapping of the systems
|
int |
GetRAWVoiceMap(int page,
float width,
float height,
int voice,
guidoscoremapbase map)
Retrieves the graphic to time RAW mapping of a defined voice
|
int |
GetStaffMap(int page,
float width,
float height,
int staff,
guidoscoremapbase map)
Gives the adjusted staff mapping
|
java.lang.String |
GetStream()
Get the content of the guidoStream.
|
int |
GetSystemCount(int page)
Give the system count of a page.
|
int |
GetSystemMap(int page,
float width,
float height,
guidoscoremapbase map)
Gives the adjusted system mapping
|
int |
GetTimeMap(timemapcollector f)
Retrieves the wrapped to unwrapped time mapping
|
int |
GetVoiceMap(int page,
float width,
float height,
int voice,
guidoscoremapbase map)
Gives the adjusted voice mapping
|
java.lang.String |
GR2SVG(int page,
boolean embedFont,
java.lang.String font,
int mappingMode)
Exports one page of score to SVG.
|
java.lang.String |
GR2SVG(int page,
int w,
int h,
boolean embedFont)
Exports one page of score to SVG.
|
protected static void |
Init()
Internal jni initialization method.
|
int |
MarkVoice(int voicenum,
guidodate date,
guidodate duration,
int red,
int green,
int blue)
Force the color of all notes of a voice in a given time interval.
|
void |
OpenParser()
Open a new Parser.
|
void |
OpenStream()
Open a new stream.
|
int |
ParseFile(java.lang.String filename)
Deprecated.
replaced by
File2AR(String) |
parserError |
ParserGetErrorCode()
Get a parser error if an error occurs after use File2AR, String2AR or
Stream2AR.
|
int |
ParseString(java.lang.String gmn)
Deprecated.
replaced by
String2AR(String) |
int |
ResetStream()
Reset the content of the stream.
|
int |
ResizePageToMusic()
Resize the page sizes to the music size.
|
int |
Stream2AR()
Parse the gmnCode in the stream (@see OpenStream()) and create the
corresponding Abstract Representation.
|
int |
String2AR(java.lang.String gmnCode)
Parse the gmnCode and create the corresponding Abstract Representation.
|
java.lang.String |
SVGExport(int pagenum,
java.lang.String fontFile)
Deprecated.
replaced by
GR2SVG(int, boolean, String, int) |
java.lang.String |
SVGExportWithFontSpec(int pagenum,
java.lang.String fontFile,
java.lang.String fontSpec)
Deprecated.
replaced by
GR2SVG(int, boolean, String, int) |
int |
UpdateGR()
Updates a GR representation
Should be called for example after changing the default page format.
|
int |
UpdateGR(guidolayout layout)
Updates a GR representation
Makes use of the Guido Engine settings given as argument.
|
int |
WriteStream(java.lang.String gmnCode)
Write a string in the stream.
|
public static final int kNoBB
public static final int kPageBB
public static final int kSystemsBB
public static final int kSystemsSliceBB
public static final int kStavesBB
public static final int kMeasureBB
public static final int kEventsBB
public final long fARHandler
public final long fGRHandler
public guidoscorebase()
public guidoscorebase(long ar)
public long getARHandler()
@Deprecated public final int ParseFile(java.lang.String filename)
File2AR(String)
fARHandler
contains a handler to the Guido AR
representation.filename
- the file name@Deprecated public final int ParseString(java.lang.String gmn)
String2AR(String)
fARHandler
contains a handler to the Guido AR
representation.gmn
- a string containing GMN codepublic final int AR2GR()
fGRHandler
contains a handler to the Guido GR
representation.public final int AR2GR(guidolayout layout)
fGRHandler
contains a handler to the Guido GR representation.layout
- layout settingsguidolayout
public final int AR2MIDIFile(java.lang.String filename, guido2midiparams params)
filename
- the MIDI file nameparams
- MIDI export settingsguido2midiparams
public final java.lang.String AbstractExport(int pagenum)
pagenum
- the page to be exportedpublic final byte[] BinaryExport(int pagenum)
pagenum
- the page to be exportedpublic final java.lang.String GR2SVG(int page, boolean embedFont, java.lang.String font, int mappingMode)
page
- the page number.embedFont
- a boolean value. When true, the default svg guido font is embedded to the SVG.font
- font path of the guido svg font file (ignored when embedFont is true)mappingMode
- the mapping mode (see GuidoMapping).public final java.lang.String GR2SVG(int page, int w, int h, boolean embedFont)
page
- the page number.w
- the drawing area widthh
- the drawing area heightembedFont
- a boolean value. When true, the default svg guido font is embedded to the SVG.@Deprecated public final java.lang.String SVGExport(int pagenum, java.lang.String fontFile)
GR2SVG(int, boolean, String, int)
pagenum
- the page to be exportedfontFile
- an optional Guido SVG font file (could be empty when there is
no SVG font)@Deprecated public final java.lang.String SVGExportWithFontSpec(int pagenum, java.lang.String fontFile, java.lang.String fontSpec)
GR2SVG(int, boolean, String, int)
pagenum
- the page to be exportedfontFile
- an optional Guido SVG font file (could be empty when there is
no SVG font)fontSpec
- an optional Guido SVG font spec, meaning a SVG file read into
the string...will be big (could be empty when there is no SVG
font)public final int UpdateGR()
public final int UpdateGR(guidolayout layout)
layout
- layout settingsguidolayout
public final int ResizePageToMusic()
public final void FreeAR()
public final void FreeGR()
public final void GetPageFormat(int pagenum, guidopageformat pf)
pagenum
- a page number, starting from 1pf
- on output, the corresponding page formatpublic final int MarkVoice(int voicenum, guidodate date, guidodate duration, int red, int green, int blue)
voicenum
- index of the voice to mark, starting from 1date
- the date where the color-marking must begin (whole note = 1)duration
- the duration that must be covered by the color marking.red
- the red component of the marking color, from 0 to 255.green
- green color component.blue
- blue color component.public final int GetPageCount()
public final int GetSystemCount(int page)
page
- a page numberpublic final int CountVoices()
public final int GetDuration(guidodate date)
date
- on output, the score duration.guidodate
public final int GetPageDate(int pagenum, guidodate date)
pagenum
- a guido page number (starting from 1)date
- on output, the page date when the page number is found.guidodate
public final int FindEventPage(guidodate date)
public final int FindPageAt(guidodate date)
date
- a guido dateguidodate
public final int GetMap(int page, float width, float height, int selector, mapcollector f)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).selector
- a filter to focus on specific elements.f
- a mapcollector object that will be called for each selected
element.mapcollector
public final int GetRAWStaffMap(int page, float width, float height, int staff, guidoscoremapbase map)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).staff
- the staff index (starting from 1).map
- on output, contains the staff map.mapcollector
public final int GetRAWVoiceMap(int page, float width, float height, int voice, guidoscoremapbase map)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).voice
- the voice index (starting from 1).map
- on output, contains the staff map.mapcollector
public final int GetRAWSystemMap(int page, float width, float height, guidoscoremapbase map)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).map
- on output, contains the staff map.mapcollector
public final int GetTimeMap(timemapcollector f)
f
- a TimeMapCollector object that will be called for each time
segment.timemapcollector
public final int GetPageMap(int page, float width, float height, guidoscoremapbase map)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).map
- on output, contains the page map.mapcollector
public final int GetStaffMap(int page, float width, float height, int staff, guidoscoremapbase map)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).staff
- the staff index (starting from 1).map
- on output, contains the staff map.mapcollector
public final int GetVoiceMap(int page, float width, float height, int voice, guidoscoremapbase map)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).voice
- the voice index (starting from 1).map
- on output, contains the staff map.mapcollector
public final int GetSystemMap(int page, float width, float height, guidoscoremapbase map)
page
- a page index, starting from 1.width
- an area width (typically the current drawing zone width).height
- an area height (typically the current drawing zone height).map
- on output, contains the staff map.mapcollector
public void close()
public final void DrawBoundingBoxes(int bbMap)
bbMap
- a bits field indicating the set of bounding boxes to draw
(default to none).public final int GetDrawBoundingBoxes()
public final void OpenParser()
public final int CloseParser()
public final java.lang.String GetStream()
public final int File2AR(java.lang.String file)
file
- the name of the file to be parsed.public final int String2AR(java.lang.String gmnCode)
gmnCode
- the code to be parsed.public final int Stream2AR()
public final parserError ParserGetErrorCode()
public final void OpenStream()
CloseStream()
.public final int CloseStream()
public final int WriteStream(java.lang.String gmnCode)
gmnCode
- a partial gmn codepublic final int ResetStream()
protected static void Init()