Score Guideline for Notator:
Filter:
Reference (extension) | Notator

Score Guideline for Notator
ExtensionExtension

How to write musicXML File in SuperCollider

1. Overview

A score should be written in bar notation as an array.

NOTE: Bar notation here means a notation in which each part appears within each bar (parts per bar). The opposite concept is part notation, where each bar appears within each part (bars per part).

The first element should be information about the composer, title and copyright. The elements from the second to the last are musical notation events, and each event contains the musical information for each bar.

The parts of a bar should be constructed as elements within an event. It contains all parts of the bar with keys like \p1, \p2, etc:. Each part should be an event that contains its notation information in the bar. The value of the event key is an array containing the notation information of its part in the bar:

WARNING: The first bar should contain all the parts of the whole score even though one or more particular parts do not appear in the first bar.

It also contains the "bar number" with the key \bar. This is only used to indicate the bar number when entering musical events in a particular bar, as a comment is often used to indicate the bar number. You can ignore the \bar if you do not need it.

Each part consists of a staff label, an attribute and one or more voices (The term voice here is very similar to the term voice used in traditional western classical poplyphonic music. If one has a very narrow view of the concept of voice, there may be a difference, as the voice here can include chords.).

Each can be defined with its own key and contains the following information

componentskeydata type

for its value

details
staff label\lblsymbol
  • the name of a staff

    (or staves, if more than one staff is registered)

attributes\atrevent
  • the number of staves
  • clef

    (or clefs if more than one staff is registered)

  • time signaure
  • key signature and optional transposition information

voices\v1

\v2

...

array
  • tempo
  • dynamic markings
  • note or chord with pitch, duration and articulation

    as well as tie and slur status

  • rest with duration
NOTE: Three ways to construct the musical information of a voice:  
  1. Array-in-Array notation:

    each musical information as an element in an array

  2. Symbol-in-Array notation:

    each musical information as a symbol or string in an array

  3. String notation:

    all the musical information in a voice as a string

The last option is recommended for transcribing an existing piece.

The other options are more complicated, but are useful for

algorithmic composition.

The staff label, number of staves and optional transposition information should be defined in the first bar. Attributes such as time signature, key signature, clef can be changed in any bar, if necessary, as follows:

NOTE: Accessing particular element Array indices can be used to access a particular element or a range of elements:

2. Adding title, composer and copyright

To add the title, composer and copyright of a piece, use an event with key and value pairs: for the title, use the key \title, for the composer, use the key \composer, and for the copyrights, use the key \rights, as follows:

3. Adding one or more bars

One or more bars can be added by adding an event as an array element, as follows:

NOTE: A score example and code example are not provided in the correct form because more components are required to import a musicXML file into music software programs such as MuseScore, Dorico Finale and Logic Pro.

4. Adding the first bar part elements

4.1. Adding one or more parts

One or more parts can be added by adding an event to any event in an array element, as follows:

WARNING: All parts that appear at one point in the piece must be included in the first bar. Except for the first bars, the parts that do not contain any information may be omitted in any bar.
NOTE: A score example and code example are not provided in the correct form because more components are required to import a musicXML file into music software programs such as MuseScore, Dorico Finale and Logic Pro.

4.2. Adding one or more staves with a staff label per part

To add a staff label, the name of the label should be defined with the key \lbl in a part of the first bar. To add one or more staves to a part, the number of staves should be defined with the key \staves in the \atr event in a part of the first bar, as follows (the label and the number of staves defined in the first bar are fixed until the end):

NOTE:
NOTE: A score example and code example are not provided in the correct form because more components are required to import a musicXML file into music software programs such as MuseScore, Dorico Finale and Logic Pro.

4.3. Adding optional transposition attribute for transposing instrument per part

To add optional transposition to a part label, the following properties should be defined as an array element of an event with the key \trans in a part of the first bar:

Integerdiatonic transposition
Integerchromatic transposition
Integeroctave transposition

For example, the clarinet part should be defined, as follows:

NOTE: A score example and code example are not provided in the correct form because more components are required to import a musicXML file into music software programs such as MuseScore, Dorico Finale and Logic Pro.

5. Adding one or more clefs per part

The clef or clefs in a part can be changed in any bar, and should be defined in an array with the key \clef in the \atr event in a part in a bar. To define a clef, an array with two elements should be used. The first element defines the clef symbol and the second element defines its position on the staff (counting upwards).

To define multiple clefs on multiple staves, a staff array can be used within its parent array:

NOTE: A score example and code example are not provided in the correct form because more components are required to import a musicXML file into music software programs such as MuseScore, Dorico Finale and Logic Pro.

6. Adding time signature per part

The time signature in a part can be changed in any bar, and should be defined with the key \time in the \atr event in a part in a bar. To define a normal time signature, an array with two elements should be used. The first element defines the upper number (top number) of the time signature, and the second element defines the lower number (bottom number) of the time signature. To define senza-misura, the symbol \x can be used instead of an array:

NOTE: A score example and code example are not provided in the correct form because more components are required to import a musicXML file into music software programs such as MuseScore, Dorico Finale and Logic Pro.

7. Adding key signature per part

The time signature in a part can be changed in any bar, and should be defined with the key \key in the \atr event in a part in a bar.

A mixed use of atonal and polytonal examples are as follows:

NOTE: A score example and code example are not provided in the correct form because more components are required to import a musicXML file into music software programs such as MuseScore, Dorico Finale and Logic Pro.

8. Adding a tempo indication

To add a metronome number defined by the number of beat unit per minute, insert an array into a voice as follows:

the first element\t
the second elementbeat unit
double-dotted maxima:\Dm\D_
dotted maxima\dm\d_
maxima\m\_
double-dotted longa\Dl\D0
dotted longa\dl\d0
longa\l\00
double-dotted breve\Db\D9
dotted breve\db\d9
breve\b\99
double-dotted semibreve\Dw\D8
dotted semibreve\dw\d8
semibreve\w\88
double-dotted minim\Dh\D7
dotted minim\dh\d7
minim\h\77
double-dotted crotchet\Dq\D6
dotted crotchet\dq\d6
crotchet\q\66
double-dotted quaver\De\D5
dotted quaver\de\d5
quaver\e\55
double-dotted semiquaver\Dx\D4
dotted semiquaver\dx\d4
semiquaver\x\44
double-dotted demisemiquaver\Dt\D3
dotted demisemiquaver\dt\d3
demisemiquaver\t\33
double-dotted hemidemisemiquaver\Di\D2
dotted hemidemisemiquaver\di\d2
hemidemisemiquaver\i\22

the third elementbpm (beat per minute)
Example:
Three different styles of code to get the same musicXML file:
Array-in-Array notation
Symbol-in-Array notation
String notation
The results of the evaluation of each of the codes above:
The

rendered

score

in

Dorico 4:

9. Adding a dynamic marking that is not attached to a note or chord

To add a dynamic marking, insert a one-element array into a voice: the element could be one of the following:
symbolscorresponding dynamic marking
ffff
fff
ff

f
mf
mp
p
pp
ppp
pppp
Example:
Three different styles of code to get the same musicXML file:
Array-in-Array notation
Symbol-in-Array notation
String notation
The results of the evaluation of each of the codes above:
The

rendered

score

in

Dorico 4:

10. Adding Rests

The crotchet rest (or quarter rest) in the example in section 8. Adding a tempo indication and the same in the example in section 9. Adding a dynamic marking that is not attached to a note or chord are automatically inserted by Dorico. MuseScore and Finale insert a whole rest for the same place. To add rest symbols intentionally, the correct notation for each of the three ways to construct the musical information of a voice should be used as follows:
  1. Array-in-Array notation:

  2. Symbol-in-Array notation:

  3. String notation:

\r in Array-in-Array notation and r in the other notations stand alone without a rhythmic value if the previous rhythmic value is used. If the first rest stands alone, the default value of crotchet is used, as shown in 8. Adding a tempo indication for Array-in-Array notation (also below), and as shown below for the other two notations:

Array-in-Array notationSymbol-in-Array notation,

String notation

triple-dotted maxima

(MuseScore 4.1.1 crashes

when this value is used for a rest.)

double-dotted maxima

(MuseScore 4.1.1 crashes

when this value is used for a rest.)

dotted maxima

(MuseScore 4.1.1 crashes

when this value is used for a rest.)

maxima

(MuseScore 4.1.1 crashes

when this value is used for a rest.)

triple-dotted longa
double-dotted longa
dotted longa
longa

triple-dotted breve
double-dotted breve
dotted breve
breve
triple-dotted semibreve
double-dotted semibreve
dotted semibreve
semibreve
triple-dotted minim
double-dotted minim
dotted minim
minim
triple-dotted crotchet
double-dotted crotchet
dotted crotchet
crotchet
triple-dotted quaver
double-dotted quaver
dotted quaver
quaver
triple-dotted semiquaver
double-dotted semiquaver
dotted semiquaver
semiquaver
triple-dotted demisemiquaver
double-dotted demisemiquaver
dotted demisemiquaver
demisemiquaver
triple-dotted hemidemisemiquaver
double-dotted hemidemisemiquaver
dotted hemidemisemiquaver
hemidemisemiquaver
triple-dotted quasihemidemisemiquaver
double-dotted quasihemidemisemiquaver
dotted quasihemidemisemiquaver
quasihemidemisemiquaver

semihemidemisemiquaver

Example:
Three different styles of code to get the same musicXML file:
Array-in-Array notation
Symbol-in-Array notation
String notation
The results of the evaluation of each of the codes above:
The rendered score in Dorico 4 Pro:

The rendered score in MuseScore 4 (with an error message):

11. Adding notes, including note-attached dynamics, articulation, tie and slur

A pitch or chord can be added using MIDI pitch number or scientific pitch notation, and this pitch (or pitches) should be placed as an array. Currently, 12-tone equal temperament, 24-tone equal temperament and 48-tone equal temperament are supported by music engraving software such as Dorico 4 Pro, MuseScore 4, Finale 27 and so on, so Notator class supports eighth-tone pitches. Refer to an example of the Eighth-tone Scale example in Notator help document.

Related help documents of the SPN class and PitchClassSet class included in Notator Quark.

To add notes or chords, use the correct notation for each of the three ways to construct the musical information of a voice, as follows:

  1. Array-in-Array notation:

  2. Symbol-in-Array notation:

  3. String notation:

To add additional duration, dynamics, articulation, tie and slur, the correct notation for each of the three ways to construct the musical information of a voice should be used as follows (The same rules as above for rest symbol durations and dynamic markers should be applied to note durations and note-attached dynamic markers.):

  1. Array-in-Array notation:

  2. Symbol-in-Array notation:

  3. String notation:

11.1. Notes and chords

Example:

Three different styles of code to get the same musicXML file:

Array-in-Array notation
Symbol-in-Array notation
String notation
The results of the evaluation of the codes above:
The rendered score in Dorico 4 Pro:

The rendered score in MuseScore 4:

11.2. Multiple instruments

Example:

The results of the above code block evaluation:

The rendered score in Dorico 4 Pro:

The rendered score in MuseScore 4:

11.3. Articulations, ties, slurs, pitch repetition and previous entry repetition

The list of currently supported articulations is as follows:

Array-in-Array notationSymbol-in-Array notation,

String notation

accent
strong-accent
staccato
staccatissimo
tenuto
detached-legato
The list of currently supported ties is as follows:
Array-in-Array notationSymbol-in-Array notation,

String notation

tie start
tie stop
laissez vibrer
tie stop with laissez vibrer
The list of currently supported slurs is as follows:
Array-in-Array notationSymbol-in-Array notation,

String notation

slur start
slur stop
The list of the currently supported abbreviations for the repetitive pitches and the repetition of entries is as follows:
Array-in-Array notationSymbol-in-Array notation,

String notation

repetitive pitche (a note) or pitches (a chord)
The repetition of the previous entry
Three different styles of code to get the same musicXML file:
Array-in-Array notation
Symbol-in-Array notation
String notation
The results of the evaluation of the codes above:
The rendered score in Dorico 4 Pro: