( ⇒ In Musescore press Ctrl+Shift+P, then F1 to bring it up. )
Represents a complete score.
A new score can be created with:var a = new Score();
The new score is appended to MuseScore's list of scores.
The current score can be obtained with:var b = curScore;
Name | Type | Description |
---|---|---|
composer | string | name of the composer |
duration | integer | total score duration in seconds (read-only) |
fileName | string | the name of the file without the path, "Untitled" for unsaved scores (read-only). (MuseScore 2.0+ as of r5033 ) |
fileVersion | string | the version of the version information (MuseScore 1.2+) |
hasHarmonies | bool | true if a valid chordname is found |
hasLyrics | bool | true if a lyric element is found in the score |
keysig | integer | Key signature at the beginning: -7 (= 7 flats) to 7 (= 7 sharps) or undefined for custom signature |
measures | integer | Number of actual measures (read only) |
pageFormat | PageFormat Object | the format of pages in the score (currently disabled) |
pages | integer | Number of pages (read only) |
parts | integer | Number of parts (read only) |
path | string | the path of the score without the filename, an empty string if the file is not saved (read-only). (MuseScore 2.0+ as of r5033 ) |
poet | string | name of the poet/lyricist |
staves | integer | number of staves (read-only) |
subtitle | string | subtitle of the score |
title | string | title of the score |
timesig | TimeSig Object | the time signature of the score (MuseScore 1.1+) |
version | string | the version of MuseScore that the score was last saved with (MuseScore 1.2+) |
Append n measures to the score.
Append a new part to the score.
partname refers to an instrument name in the file instruments.xml.
The part will be initialized from the named instrument in this file.
If partname is empty, a default part will be appended.
Close score. (MuseScore 1.2+)
End undoable operations.
Load the score file located at path. Can be any format supported by MuseScore, the extension is used to find out the type of file.
Sets metatag tag to tag. (Version 2.0+)
Sets metatag tag to value. (Version 2.0+)
Part object at index i.
Write score into file path. The file extension type determines the type of file:
"mscz", "mscx", "xml", "mxl", "mid", "pdf","ps", "png", "svg", "ly", "wav", "flac", "ogg".
Not all types may be available.
For soundfile output (type being one of "wav", "flac", "ogg"), the soundfont to be used can be specified as an additional parameter. (Not available anymore in MuseScore 2.x as of r5011 ).
When saving into a PNG file, additional parameters can be specified.
Turns on or off the repetitions of ritornellos.
Set the style element with name key to the given value. Known to work for the given keys:
Starts undoable operations.