1 of 117

Polyrhythm Project encoding notes

Craig Stuart Sapp

University of British Columbia

August 2020

2 of 117

Github repository

3 of 117

Data formats

4 of 117

Initial data entry

Sibelius

.sib file

.pdf file

.xml file

(uncompressed MusicXML file, Change .musicxml extension to .xml)

.krn file

musicxml2hum

or drag-and-drop into VHV

  • Three output files: .sib, .pdf, and .xml.
  • First stored in Google Drive, then copied into Github repository.

5 of 117

Location of data files

.sib files

from Sibelius

.pdf files

made in Sibelius

.xml files

exported from Sibelius

.krn files

Converted from MusicXML files

6 of 117

Sibelius (.sib) file

0f 53 49 42 45 4c 49 55 53 00 00 40 00 01 00 47 36 d3 00 00 00 30 00 00 00

; S I B E L I U S @ G 6 0

02 00 00 00 01 00 00 00 2a 00 00 00 00 00 00 00 00 0f 53 49 42 45 4c 49 55

; * S I B E L I U

53 00 00 40 00 01 00 00 00 00 00 00 00 3a 00 00 00 00 c0 7d 65 9e c0 c8 ef

; S @ : } e

2a 4f 4f 8d df 07 fc 2f 6b 0e 1c 91 e0 46 ca c0 4e 9d e2 74 0b 9c 63 83 62

; * O O / k F N t c b

18 77 62 37 6a 32 7c 15 ee 68 4b 50 2b 63 d4 2e 11 81 05 d3 9f 22 cf 0d 56

; w b 7 j 2 | h K P + c . " V

33 e7 fb 1a a4 00 00 00 00 bd 90 bc dd 19 21 b7 09 ca 5c ae 52 9d b7 87 07

; 3 ! \ R

7 of 117

PDF output from Sibelius

Original score:

  • N.B.: slur start/end, stem directions, staccato, dynamics (on both staves?), weird cross-staff notes.

8 of 117

MuscXML output from Sibelius

<note color="#000000" default-x="137" default-y="-20">

<pitch>

<step>D</step>

<alter>-1</alter>

<octave>6</octave>

</pitch>

<duration>384</duration>

<instrument id="P1-I1" />

<voice>1</voice>

<type>quarter</type>

<dot />

<stem>down</stem>

<staff>1</staff>

<notations>

<slur color="#000000" type="start" orientation="over" />

</notations>

</note>

9 of 117

Humdrum conversion from MusicXML

!!!COM: Sergey [Sergeyevich] Prokofiev

!!!OTL: [R573_Pro-w36p38m293-295]

**kern **kern

*part1 *part1

*staff2 *staff1

*I"Piano *

*I'Pno. *

*clefG2 *clefG2

*k[b-e-a-d-g-] *k[b-e-a-d-g-]

*D-: *D-:

*M3/4 *M3/4

=1 =1

! !LO:TX:t=[quarter]=180

! !LO:TX:b:t=[p]

! !LO:TX:b:t=[p]

4dd- (4.ddd-

4a-' .

. 4.fff-X

4gn .

=2 =2

  • N.B.: slur start, editorial dynamics

10 of 117

Humdrum in VHV

11 of 117

Corrected Humdrum in VHV

12 of 117

MEI conversion in VHV (alt-m)

13 of 117

SVG output from Verovio (alt-g)

<g id="note-L18F2" class="note">

<g class="notehead">

<use xlink:href="#E0A4" x="3655" y="2025" height="720px" width="720px" />

</g>

<g id="dots-0000000511310801" class="dots">

<ellipse cx="3971" cy="2025" rx="36" ry="36" />

</g>

<g id="stem-0000000597701532" class="stem">

<rect x="3863" y="1575" height="428" width="18" />

</g>

<g id="accid-0000000683761684" class="accid" />

</g>

14 of 117

Verovio

Humdrum

Viewer

15 of 117

Getting started with Humdrum encoding

16 of 117

Interactive examples

17 of 117

Loading data

from Github

18 of 117

Editing Github Humdrum files

  1. Go to kern page on github repository

19 of 117

Editing Github Humdrum files

2. Click on a particular file to edit

3. Click on “Raw” button

20 of 117

Editing Github Humdrum files

4. Select the entire file (control-A, command-A or click-drag from start to finish

5. Copy the selection (control-C or command-C)

21 of 117

Editing Github Humdrum files

6. Paste in Verovio Humdrum Viewer

22 of 117

Editing Github Humdrum files

7. Note that pink notation means a rhythm or structure error in the data (so do not copy back to github if this happens).

23 of 117

Easy download into VHV

24 of 117

View Sibelius PDF files

alt-p (option-p)

25 of 117

Repertory navigation buttons

Previous file

in repertory

Next file

in repertory

Return to repertory index

26 of 117

Saving edits back onto Github

27 of 117

Saving updated Humdrum files to github

  1. Copy text from editor on left side of VHV

(click in text area and type control-A then control-C (or command-A then command-C).

28 of 117

Saving updated Humdrm files to github

2. Return to the Github page for the example.

3. Click on the pencil (edit) icon at the top right of the text.

29 of 117

Saving updated Humdrum files to github

4. Click in text editor and do control-A to select the previous contents

5. Then type control-V to replace with the copied text from VHV.

30 of 117

Saving updated Humdrm files to github

6. At the bottom of the file editor is a save button (called “Commit changes”).

7. First type in an explanation for why the file is being changed

8. Then click on the green “Commit changes” button

9. Copy & paste into Google proofreading spreadsheet

31 of 117

Ties

32 of 117

Hanging ties

MusicXML export does not include “hanging ties”:

Reimporting the MusicXML back into Sibelius:

33 of 117

Hanging ties editing in VHV

Chord hanging ties need to be

Implemented in humdrum-to-MEI converter,

But here is an example with a single note:

34 of 117

Tie symbols in Humdrum

[ = tie starts on note

] = tie ends on note

_ = tie both starts and stops on note (a medial tied note)

35 of 117

Hanging tie examples

36 of 117

Hanging slurs

MusicXML export does not include “hanging slurs”: slurs that start before or or end after the musical excerpt.

Typically a hanging slur at the start of the music will “start” on the first note in the MusicXML export (but the graphical offset in Sibelius is lost, so the visual position has changed).

Hanging slurs are not yet implemented in the Humdrum-to-MEI converter for display in verovio, so they are currently invisible in VHV (but slurcheck can be used to identify them)

An opening parenthesis indicates a slur start, and

a closing parenthesis indicates a slur end.

37 of 117

Hanging ties on chords

Currently there is a bug and hanging ties on chords, so hanging ties to the left are not shown on chord notes:

38 of 117

Tuplets

39 of 117

Tuplet styling

40 of 117

Tuplet styling (grouping)

41 of 117

Tuplet styling (grouping 2)

42 of 117

Trills

43 of 117

Courtesy accidentals for trills

!!!LO:TR:acc=# Add sharp for trill auxilliary note

!!!LO:TR:acc=- Add flat for trill aux. note

!!!LO:TR:acc=n Add natural for trill aux. note

44 of 117

Trill extention lines

  • Wavy lines after trills can be added by duplicating the T or t markers:

45 of 117

Trill extention lines for tied notes

  • To continue a trill wavy line to the next note (usually tied), triple the t: TTT or ttt. Notice that the TTT notes do not have to be tied to the starting note of the trill.

46 of 117

Transposition

47 of 117

Transposition

48 of 117

Transposition a single spine

!!!filter: transpose -t P8 -s 5

49 of 117

Adding written tranposition

*ITrd-7c-12

50 of 117

Compile filter with alt-c (option-c)

51 of 117

Add written transposition

  • Click on line below where transposition will be added (unless there is already a transposition line)

  • Type alt-shift-i to insert a blank interpretation line

  • In column (spine) 5, add the text:

*ITrd-7c-12

Which means to display the written part an octave below the sounding part.

52 of 117

Dynamics

53 of 117

Adding spines (for dynamics)

  • Extra spines can be added with the “extract” filter, which also can extract parts from a full score

  • Example: to extract the first spine (column) from Humdrum data, add this line anywhere in the file:

!!!filter: extract -s 1

54 of 117

Compile filter

  • The filter is applied to the data before generating notation, so you still see the original data in the text editor.

  • Type alt-c (or option-c in MacOS) to “compile” the filter. This will return the output of the filtering to the text editor. Note that the “!!!filter:” line is changed to “!!!Xfilter:” to indicate that the filter has been processed.

55 of 117

Extracting ranges of spines

  • To extract spines 1 and 2: !!!filter: extract -s 1,2 (no spaces around comma, or put in quotes: “1, 2”)
  • To extract spines 2 through 4: !!!filter: extract -s 2-4
  • To extract from 2 through the end: !!!filter: extract -s 2-$
  • To extract non-contiguous spines: !!!filter: extract -s 1,4

56 of 117

Add blank spines when extracting

  • Use spine “0” to add a blank spine when extracting
  • To interleave a blank spine after every original spine: !!!filter: extract -s 1,0,2,0,3,0,4,0
  • You will not see the new spines until compiling the filter with “alt-c” or “option-c”

57 of 117

Easier way to add dynamics spines

58 of 117

Viewing blank spines

  • Compile the filter with “alt-c” or “option-c” to view the newly added spines.
  • To create dynamics, change the exclusive interpretation (spien header) from **blank to **dynam
  • Then add dynamics in the new spine.

59 of 117

Editorial dynamics

  • To indicate a dynamic mark is editorial, add a local interpretation line above the dynamic, and then add a layout parameter.
  • To do this, move cursor to line with dynamic, then type alt-shift-L (or option-shift-L). This add line 21 to the example on the right:

60 of 117

Editorial dynamics (2)

  • Now that the local comment line has been added, place a layout parameter above the dynamic on this line:

!LO:DY:ed=brack

61 of 117

Integrating dynamics and text

  • To place text before or after a dynamics marking, use this layout parameter format:

!LO:DY:t=text before %s text afterwards

%s in t string will be replaced with the dynamics mark that follows in the data.

62 of 117

Hairpin Crescendos and Decrescendos

63 of 117

Hairpins to ends of measures

  • Double the [[ or ]] markers to attach hairpin endings to the end of notes rather than the starts of notes. This allow hairpings to go to the ends of measures:

64 of 117

Cresc. and decresc. text

  • Cresc. and decresc are usually encoded as incomplete hairpins.

65 of 117

Alternates to cresc. and decresc.

  • The “cresc.” and “decresc.” text for incomplete hairpins can be changed as in the following example:

66 of 117

Integrating partial hairpins and text

  • Similar to dynamics, partial hairpins can be mixed with text.

67 of 117

Hairpins to the end of a measure

  • Hairpin (wedges, lines) dynamics usually start and end at the time represent by the line in the music they are on. A problem occurs at the end of a meausre, since the hairpin cannot be attached to the measure itself. Instead, double the ending of the hairping to have it end at the end of the curret note’s duration

68 of 117

Lyrics

69 of 117

Line extensions for ends of words

  • Add an underscore after the end of a words to add a melismatic underline after the word:

  • However there is a problem displaying word extensions on the last syllable of a word that needs to be fixed.

70 of 117

Ending a terminator

  • Typically a line extender will terminate automatically, but the & character can be used to terminate manually.

71 of 117

Beams

72 of 117

Beams

  • Beams start with “L”, and end with “J”. There are also flags “K”, and “k” but these currently do not control the notation. Typically each subbeam is encoded, with 16th notes starting with LL and ending with JJ. But “lazy beaming” is allowed, using just a single L and J pair to indicate the primary beam. If the L and J markers in a measure are not equal in number (red measure), then beaming for that measure will not be done.

73 of 117

Staff and

System text

74 of 117

Staff and system text

  • System text is done in a local comment, while staff text is done in a global coment:

75 of 117

Staff and system text (2)

  • Notice that when extracting parts, system texts are included in all parts, while staff text is specific to one staff:

76 of 117

Rehearsal markings

77 of 117

Rehearsal marks

  • Here is an example of a rehearsal mark. It must be a global layout parameter immediately before the barline to which it should be displayed above:
  • Currently the rehearsal marks are a bit too small, and boxes cannot be added around them.

78 of 117

Cross-Staff notes

79 of 117

Cross Staff notes

  • Add a “<” mark immediately after a note/accidental to move it to the staff below (but it is treated for analysis on the data staff.
  • !!!RDF**kern: > = above

80 of 117

Group Markers

81 of 117

Rhythm grouping

  • Add a line with *grp:A and *grp:B to mark separate polyrhythmic streams

82 of 117

Viewing groups by color

83 of 117

Composite analyses

84 of 117

Labeling layers/voices differently on staff

85 of 117

Displaying composite rhythm

composite -G means to do composite rhythm analysis without splitting into groups.

86 of 117

Displaying composite rhythm by group

The composite filter will split composite rhythm into groups automatically (if there are grp labels in the data).

87 of 117

Both composite rhythm displays

composite | composite -G

will show the split composite rhythm and the combined composite rhythm analyses at the same time.

88 of 117

Marking coincidence notes

-M option will mark coincidences between the different rhythm groups.

89 of 117

Displaying coincidence rhythm

-c option will add a coincidence line that indicates when there are note attacks in both rhythm groups.

90 of 117

Showing only rhythm analyses

composite | composite -GMc | colorgroups | extract -k 1-4

91 of 117

Stem directions

92 of 117

Explicit stem directions

  • Normally stem directions are automatically assigned. To force a stem up, add slash to the note, and for a stem down, add a backslash. Note that the assignment of stem directions is given by voices in the last measure:

93 of 117

Graphical editing

  • You can change stem directions graphically by clicking on the notes and typing:

  • a ⇒ the stem goes up (above)
  • b ⇒ the stem goes down (below)
  • c ⇒ remove the stem direction (clear: it will be assigned automatically)

94 of 117

Beam directions

  • Beam directions will be controlled by the first note’s stem direction. If you want to control the beam direction directly, click on the beam in the notation and type:

  • a ⇒ the beam goes up (above)
  • b ⇒ the beam goes down (below)
  • c ⇒ remove the beam direction (clear: it will be assigned automatically)

This will add above/below markers (lines 12 & 13), and

Then a < after an L at the start of the beam will cause

The beam to do below the notes, and > for above.

95 of 117

Fingered harmonics

96 of 117

Fingered harmonics

  • Fingered harmonics have three notes: the sounding note, the stopped notes and the note where the finger touches lightly to generate on a harmonic that produces the sounding note. The non-sounding notes are represented as rests in a chord with the sounding note.

97 of 117

Fingered harmonics

98 of 117

Stem direction problems

99 of 117

Layers

  • Some Sibelius/MusicXML files have music encoded in the wrong layer. The first layer should be music that is displayed highest on the staff, and the second layer should have music displayed lower on the staff (and third or more layers in the middle of the two usually). If this is reversed, then the stem directions will collide with music from the other layer/voice. Also note the alt-l (small L) keyboard command, which colors first layer black, second layer green, third layer purple. This can help detect layer problems.

100 of 117

Switching layers

  • Use the flipper tool to move notes between the first and second layer. Add *flip to start of music to flip, and *Xflip to end of music to flip (or no need to add *Xflip if to end of music):

Then compile the filter with alt-c:

Then remove Xfilter and *flip text

101 of 117

Instrument codes

102 of 117

Staff labels and abbreviations

  • There are two ways to indicate the instrument in Humdrum data. The primary one that gets converted from MusicXML (from Sibelius) is the staff label. This is encode by a token starting with *I”. There is also a second form for staff labels that occur after the first stem: staff abbreviations, starting with *I’.

103 of 117

Instrument codes

  • Computers have difficulty reading the staff names and abbreviations, since they are arbitrary text and can be in various langauges, or have qualifications such as transposition and instrument number. For analysis a separate system of describing the insturments are needed. These are done with two interpretations, one for the instrumental code, starting with *I, and the other is the “insturmental class” that starts with *IC. Here is an example for the flute and oboe score:

*ICww ⇒ instrument is a woodwind.

*Ioboe ⇒ instrument is an oboe

*Iflt ⇒ instrument is a

(standard) flute

104 of 117

Instrument class

  • Here is a list of instrument classes from the webpage

https://www.humdrum.org/instrument-codes/index.html

105 of 117

Instrument codes

  • Here is a list of common instrument codes from the webpage:

https://www.humdrum.org/instrument-codes/index.html

Instrument codes start with an asterisk (*) followed by the capital letter I, then lower-case instrumental code. (you can add additional instruments that you encounter to this list):

Woodwinds

*Ipicco ⇒ piccolo

*Iflt ⇒ flute

*Iflt_a ⇒ alto flute

*Iflt_b ⇒ bass flute

*Ioboe ⇒ oboe

*Iclars ⇒ Clarinet

*Icangl ⇒ English horn

*IoboeD ⇒ oboe d’amore

*Iclars ⇒ soprano clarinet

*Iclarp ⇒ piccolo clarinet

*Iclara ⇒ alto clarinet

*Iclarb ⇒ bass clarinet

*Ifagot ⇒ bassoon

*Ifag_c ⇒ contrabassoon

*IsaxS ⇒ soprano sax

Brass

*Itromp ⇒ trumpet

*Itromt ⇒ trombone

*Itromb ⇒ bass trombone

*Ipicco ⇒ French horn

*Icor ⇒ Horn

*Ituba ⇒ tuba

Keyboard (or precussion)

*Ipiano ⇒ piano

*Ixylo ⇒ xylophone

*Ivibra ⇒ vibraphone

*Iglock ⇒ glockenspiel

*Imarim ⇒ marimba

*Iclest ⇒ celeste

*Iorgan ⇒ organ

*Iaccor ⇒ accordion

Percussion

*Icasts ⇒ castanets

*Ichimes ⇒ chimes

*Igong ⇒ gong

*Ipiatt ⇒ cymbals

*Isdrum ⇒ snare drum

*Ibdrum ⇒ bass drum

*Itimpa ⇒ timpani

Strings

*Ivioln ⇒ violin

*Iviola ⇒ viola

*Icello ⇒ violoncello

*Icbass ⇒ contrabass

*Iguitr ⇒ guitar

106 of 117

Grouping

107 of 117

Grouping codes

  • *grp:A == In the rhythm group of the (start of the) lowest staff in the score (red color)
  • *grp:B == In to the second rhythm group (blue color)
  • *grp:C == New file that has not had groupings assigned (green color)

108 of 117

Colorgroups filter

  • Type 5 alt-n to jump directly to the filter toolbar
  • Type “colorgroups” into the filter box, then press the enter key, or click on the filter icon.
  • Do not click on the “+” button (to compile the filter)

109 of 117

Percussion

110 of 117

Percussion encoding

111 of 117

SIC

112 of 117

Marking sic

113 of 117

Vertical grouping

114 of 117

Force vertical position of separate text/dynamics:

115 of 117

Ornamental Tremolo

116 of 117

Cross-staff beams with tremolos

117 of 117