Class Source
Source precisely describes the source of a ScorePartwise.
Within a given input file (or uri), perhaps composed of several sheet images, the relevant sheets are listed, each with the systems processed for the ScorePartwise instance at hand.
A sheet with no system processed (for example because it is made of text only), could explicitly appear but with an empty sequence of system numbers (this is recommended), or the sheet could not appear at all in this source structure.
In the following example, the ScorePartwise spans the first 3 sheets of the input file, with sheet #2 being "empty", and only the first system in sheet #3. Another ScorePartwise instance, typically representing a following movement, could start with the same sheet #3, but from system 2.
In MusicXML, such Source data is encoded using the miscellaneous element.
Using file:
<miscellaneous>
<miscellaneous-field name="source-file">D:\soft\scores\morphology\recordare\MozartTrio.png</miscellaneous-field>
<miscellaneous-field name="source-offset">4</miscellaneous-field>
<miscellaneous-field name="source-sheet-1">1 2</miscellaneous-field>
<miscellaneous-field name="source-sheet-2"></miscellaneous-field>
<miscellaneous-field name="source-sheet-3">1</miscellaneous-field>
</miscellaneous>
Using uri:
<miscellaneous>
<miscellaneous-field name="source-uri">file:///MozartTrio.png</miscellaneous-field>
<miscellaneous-field name="source-offset">4</miscellaneous-field>
<miscellaneous-field name="source-sheet-1">1 2</miscellaneous-field>
<miscellaneous-field name="source-sheet-2"></miscellaneous-field>
<miscellaneous-field name="source-sheet-3">1</miscellaneous-field>
</miscellaneous>
- Author:
- Hervé Bitteur
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDescribes which systems were processed in this sheet. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Sourcedecode(ScorePartwise scorePartwise) voidencode(ScorePartwise scorePartwise) getFile()intgetUri()voidvoidsetOffset(int offset) voidtoString()
-
Constructor Details
-
Source
public Source()
-
-
Method Details
-
decode
-
encode
-
getFile
- Returns:
- the file
-
getOffset
public int getOffset()- Returns:
- the offset
-
getSheets
- Returns:
- the sheetSystems
-
getUri
- Returns:
- the uri
-
setFile
- Parameters:
file- the file to set
-
setOffset
public void setOffset(int offset) - Parameters:
offset- the offset to set
-
setUri
- Parameters:
uri- the uri to set
-
toString
-