1 of 86

Craig Sapp (Stanford University/CCARH/PHI)

Jacek Iwaszko (The Fryderyk Chopin Institute)

Marcin Konik (The Fryderyk Chopin Institute)

IAML

Kraków, 18 lipca 2019 r

http://bit.ly/iaml-2019

Verovio Humdrum Viewer

2 of 86

Agenda

  • VHV interface
  • Data entry for Chopin Early Editions
  • Editing in VHV
  • Online repertories
  • Humdrum Notation Plugin
  • Example websites implementations
  • NIFC digitization projects

3 of 86

VHV interface

  • Major components
  • Documentation
  • Intro to Humdrum data

4 of 86

Verovio Humdrum Viewer

http://verovio.humdrum.org

5 of 86

VHV interface

Play button

Page navigator

Application

Menus

Digital music

(text editor)

Rendered graphical

music

Moveable dividing line

http://verovio.humdrum.org

6 of 86

Primary VHV components

http://www.verovio.org

http://humlib.humdrum.org

C++ library & toolkits converting MEI data into SVG images.

C++ parser and analysis tools for Humdrum data.

Compiled into javascript

with emscripten for use in web browsers.

7 of 86

In-browser notation rendering

Ace text editor

Verovio toolkit

Humlib

(filtering & conversion to MEI)

graphic

notation

SVG

MEI

Humdrum

8 of 86

VHV documentation

http://doc.verovio.humdrum.org

9 of 86

Humdrum data

4C

4c

4cc

=3

T

4 = quarter note

C = C below middle C

cc = C above middle C

= = barline

T = trill (major second)

10 of 86

Start of data (“exclusive interpretations)

End of data (“spine terminators”) star-dash (not underscore)

**kern = “core” of music

**text = lyric text

11 of 86

Start of data (“exclusive interpretations)

End of data (“spine terminators”) star-dash (not underscore)

**kern = “core” of music

**text = lyric text

“Tandem interpretations”

*clefF4 = bass clef

*clefG2 = treble clef

*M2/4 = 2/4 time signature

Data modifiers

12 of 86

Data rows indicate simultaneities in score

13 of 86

Data columns indicate parts (or streams of other data) in score

14 of 86

15 of 86

http://bit.ly/twinkle-humdrum

16 of 86

Data Entry

  • OMR (Sharpeye)
  • MusicXML
  • Drag & Drop into VHV

17 of 86

SharpEye

(MRO)

Optical music recognition

SharpEye2 by VISIV (http://www.visiv.co.uk)

Input: 8 bit monochrome TIFF file w/ LZW compression

Output: MRO (SharpEye format), NIFF, MIDI, musicXML

Historical edition

high resolution scan

(TIFF)

Monochrome

(TIFF)

Modern score

vector graphics

(PDF)

Monochrome

(TIFF)

SharpEye

(MRO)

18 of 86

OMR of historical editions

Scan

of music

Recognized

music

19 of 86

Scan

of music

Recognized

music

OMR of modern editions

20 of 86

Old vs. new print recognition with OMR

Historical score

Modern score

  • Paper color/quality
  • Older printing styles
  • 13 rhythm errors
  • Mostly voicing problems, lacking pedalling, ottavas
  • 42 rhythm errors
  • Often notehead, beam, flag, stem & dot mistakes
  • High contrast
  • Uniform sizes and shapes

21 of 86

Data-entry paths into VHV

Optical Music Recognition

(SharpEye)

MusicXML

Conversion to Humdrum

(Verovio Humdrum Viewer)

Correction of MusicXML file

(MuseScore)

MusicXML

MusicXML

Conversion to Humdrum

(Verovio Humdrum Viewer)

22 of 86

Data-entry paths into VHV

Optical Music Recognition

(SharpEye)

MusicXML

Conversion to Humdrum

(Verovio Humdrum Viewer)

Correction of MusicXML file

(MuseScore)

MusicXML

MusicXML

Conversion to Humdrum

(Verovio Humdrum Viewer)

Conversion to Humdrum

(Verovio Humdrum Viewer)

Generation of

MusicXML file

(MuseScore)

MusicXML

From manuscript

sources

23 of 86

Drag-and-Drop MusicXML files

  • Saving from MuseScore to a MusicXML file, then dragging file onto VHV wegpage.

24 of 86

Loading MusicXML files into VHV

initial processing

  1. Loading XML file into Verovio Humdrum Viewer (usually drag-and-drop)
  2. Saving raw Humdrum output into *.krn file ( + )
  3. Initial processing:
    1. Reordering notes in chords (top note first)
    2. Removing all remainings of slurs

chord -d = !!!filter: chord -d

Alt

s

25 of 86

Command-line Humdrum tools

complex tuplets

**kern

4C

8.CL

32C

32CJ

12CL

12C

12CJ

4C

*-

**kern

17cL

17c

17c

17c

17c

17c

17c

17c

17c

17c

17c

17c

17c

17c

17c

17c

17cJ

*-

file1.krn

file2.krn

partjoin

combines humdrum files of similar structure

~ $ partjoin file2.krn file1.krn

**kern **kern

4C 17cL

. 17c

. 17c

. 17c

. 17c

8.CL .

. 17c

. 17c

. 17c

32C .

32CJ .

. 17c

12CL .

. 17c

12C .

. 17c

. 17c

12CJ .

. 17c

4C .

. 17c

. 17c

. 17c

. 17cJ

*- *-

26 of 86

Filters and Humdrum tools

final validation

Mark unopened or unclosed slurs

!!!filter: slurcheck

27 of 86

Editing Music in VHV

  • Copy & Paste
  • Manual entry
  • Graphical editing
  • Data filtering

28 of 86

Copy and Paste

bit.ly/twinkle-humdrum

http://verovio.humdrum.org

Copy column B

And paste into

VHV text editor

29 of 86

Manual addition of staccatos

' = staccato in **kern data

30 of 86

Graphical addition of staccatos

  • Click on a note (in notation)
  • Type an apostophe (')
  • Press right arrow to move to next note
  • Type an apostrophe for second staccato
  • Click on a note
  • Type 2'
  • This will add two staccatos: on the current note and next melodic note.

Shortcut:

N.B.: Type command-z or control-z to undo changes

31 of 86

Contextual edit menu

  • Clicking on a graphical element cause a new menu item to be displayed.

  • Staccatos can be added by selecting:

Note > Articulations > Toggle staccato

  • Very slow method, but useful for beginners.

32 of 86

Adding lyrics

  • Add **text spine by selecting in menu:

Edit > Text > Add lyric verse to top staff

  • Replace dots (.) in **text spine with lyric syllables.

  • Note dashes both before/after connected syllables.

33 of 86

What is the pink background?

  • Pink means there is an error in data (so data not rendered).

  • Either Humdrum syntax is invalid,

  • or there is a rhythmic alignment error between parts.

  • Hover over the red error icon to left of text to see error message.

34 of 86

Add another part

Edit > System > Add staff

below system

  • Then add clef, key sig.

  • Then replace rests with notes.

  • Observe that the notation will be pink while durations of parts do not add up.

35 of 86

Metric analysis

Metric levels:

Analysis>Rhythm>Composite

metric levels

  • Example online analysis: display metric levels above the system:

36 of 86

Filters vs. Menu

  • Menu entries showing green text on right are implemented with filters.

37 of 86

Metric-level analysis using filter

!!!filter: metlev -ce cdata

Adding the line:

will cause the metric analysis to be displayed in notation (but not in text)

Options:

-c = composite rhythm

(all parts)

-a = append data (display

above top staff)

-e cdata = display data above

staff (chord-like data)

38 of 86

Filters vs. Menu (2)

!!!filter: extract -s 1,3,2,3

Means reorder and copy spines from original sequence 1,3, 2, 3.

This copies the **text spine to the bottom staff.

Filtering allows more control than menu items.

Eventually maybe a form will be available for filters to set parameters and run from GUI.

39 of 86

Displaying MEI conversion

File > Display MEI data

Keyboard shortcut: alt-m

Clicking on note will bring

MEI element into view

40 of 86

Online scores

  • Loading scores
  • Navigating pages
  • Navigating works/movements
  • Github repositories

41 of 86

Online scores

42 of 86

List of Mozart piano sonatas

  • Click on “Allegro” to load that movement

  • Or press “esc” key to exit from worklist without loading a score.

43 of 86

List of Mozart piano sonatas

Work/

movement

navigator

Page

navigator

left/right

arrow keys

are shortcuts

shift+

left/right

arrow keys

are shortcuts

Shift-up

returns to

worklist

44 of 86

View source scan

View > Show source scan

Keyboard shortcut: alt-p

45 of 86

Where score data comes from

46 of 86

Humdrum Notation Plugin

  • Embedding digital scores in webpage
  • Loading digital scores from URL
  • Applying filters in HNP

47 of 86

Humdrum Notation Plugin

  • After editing music in VHV, what to do with it?

  • Humdrum files typically used off-line for computational analysis.

  • Humdrum Notation Plugin allows you to easily display music notation on your own website

48 of 86

Embedding data directly into webpage

49 of 86

Source code for webpage

<html>

<head>

<title>An example</title>

<script src="https://verovio-script.humdrum.org/scripts/verovio-toolkit.js"></script>

<script src="https://plugin.humdrum.org/scripts/humdrum-notation-plugin.js"></script>

<script>var vrvToolkit = new verovio.toolkit()</script>

</head>

<body>

<p>A musical example:</p>

<script>displayHumdrum({source: "example"})</script>

<script type="text/x-humdrum" id="example">

**kern

*clefG2

*M4/4

=1

1c;

==

*-

</script>

</body>

</html>

embedded Humdrum

data

Find Humdrum data script labeled “example” and create notation (inserted at location of Humdrum script element).

Humdrum Notation Plugin script

50 of 86

Try it online

51 of 86

Web worker version of plugin

Alternate plugin setup using verovio in a web worker interface (useful for larger-scale use).

52 of 86

Loading data from URL

53 of 86

Source code for webpage

<html>

<head>

<title>An example</title>

<script src="https://verovio-script.humdrum.org/scripts/verovio-toolkit.js"></script>

<script src="https://plugin.humdrum.org/scripts/humdrum-notation-plugin.js"></script>

<script>var vrvToolkit = new verovio.toolkit()</script>

</head>

<body>

<p>Another musical example:</p>

<script>

displayHumdrum({

source: "example2",

scale: 25,

url: "https://raw.githubusercontent.com/craigsapp/mozart-piano-sonatas/master/kern/sonata06-3b.krn"

});

</script>

<script type="text/x-humdrum" id="example2"></script>

</body>

</html>

Find Humdrum data script labeled “example” and create notation (inserted at location of Humdrum script element). Data loaded from “url” parameter.

“scale” is a verovio parameter.

54 of 86

Try it online

55 of 86

URI shortcuts for Github data

<html>

<head>

<title>An example</title>

<script src="https://verovio-script.humdrum.org/scripts/verovio-toolkit.js"></script>

<script src="https://plugin.humdrum.org/scripts/humdrum-notation-plugin.js"></script>

<script>var vrvToolkit = new verovio.toolkit()</script>

</head>

<body>

<p>Another musical example:</p>

<script>

displayHumdrum({

source: "example2",

scale: 25,

uri: "github://craigsapp/mozart-piano-sonatas/kern/sonata06-3b.krn"

});

</script>

<script type="text/x-humdrum" id="example2"></script>

</body>

</html>

56 of 86

Try it online

57 of 86

Passing filter parameters

<script>

displayHumdrum({

source: "example3",

scale: 25,

uri: "github://craigsapp/bach-370-chorales/kern/chor001.krn",

filter: "extract -k4 | transpose -kc | msearch -q gfedc"

});

</script>

58 of 86

Try it online

59 of 86

Bach Chorale Website

  • Example use of Humdrum Notation Plugin
  • Front-end for Bach Chorales available on VHV
  • Has interactive HNP code generator for displaying chorale music on your on webpage.
  • View source-code on Github

60 of 86

Example use of Humdrum Notation Plugin

61 of 86

On-demand notation rendering

Chorale #2

displays

after

clicking

on its title:

notation generated on demand

62 of 86

Chorale typesetting page

  • Dynamic typesetting page implemented with JavaScript and utilizing Humlib filters & verovio options.

  • Notation rendered with verovio using Humdrum Nontation Plugin as a front-end.

  • Source code for page:

63 of 86

Create musical examples for your own webpages

  • Copy & paste text in black box for dynamically generated notation.

  • Or download SVG image for static notation.

Notice filter to extract parts

64 of 86

Try it online

65 of 86

Humdrum data file for website

  • Same data as Bach Chorales on VHV (http://doc.verovio.humdrum.org/repertory/bach-chorales)
  • Single file for all 370 chorales for efficient downloading
  • File size: 884 KB (88 KB compressed)

66 of 86

Tasso in Music Project

  • Digital Humdrum scores hosted on Github
  • Website hosted on Github (Jekyll)
  • Notation generated dynamically with verovio

67 of 86

Tasso in Music Project

  • c. 800 musical settings of Tasso poetry by various composers in 16th & 17th centuries.

  • Useful for word-painting analyses.

  • Should be mostly finished by next year.

  • Music notation typeset dynamically (PDF and in webpages) from Humdrum data using verovio.

68 of 86

Tasso digital scores

69 of 86

Work pages

Notation toolbar

Notation rendered dynamically with verovio

70 of 86

Notation toolbar

Search help

Search musical text (lyrics)

Search notes (pitch, interval rhythm)

Display single part only (C=canto, T=tenore, B=basso)

Play MP3 rendering of musical data

Expand/contract music to entire piece or first system only

Show/hide text (lyrics)

Show original clef/mensuration

Webpage source code:

71 of 86

Notation toolbar actions: Humlib filters and Verovio options

!!!filter: extract -I **text

(appended to Humdrum data before sending to verovio to render)

vrvOptions.appXPathQuery = ["./rdg[contains(@label, 'original-clef')]"];

!!!filter: extract -k voice-number

vrvOptions.pageHeight = 60000; (expand)

vrvOptions.pageHeight = 1000; (contract)

vrvOptions.adjustPageHeight = 1;

vrvOptions.humType = 1; (and javascript)

!!!filter: msearch -q pitch-search

!!!filter: msearch -t text-search

72 of 86

Josquin Research Project

73 of 86

Josquin Research Project

http://josquin.stanford.edu

74 of 86

Work pages

PDFs & MP3 playback

Incipit

Vocal ranges

Data downloads

Online analyses

Music searching

75 of 86

Dissonance analysis

Analysis > Renaissance dissonance labels > Color dissonant notes by metric position

76 of 86

Other Resources

  • VHV bug reports/feature requests
  • Humdrum Users Group
  • Humdrum tools
  • Humdrum documentation

77 of 86

VHV Github issues page

  • Report bugs related to VHV

  • Feature requests for VHV

  • If in doubt post problems here when using VHV, and I will sort out issues to humlib or verovio if more appropriate.

78 of 86

**HUG

Humdrum Users Group

  • Google Group (mailing list)

  • Ask questions related to Humdrum

  • News related to Humdrum

79 of 86

Humdrum Tools repository

  • Command-line tools for processing and analyzing Humdrum data.

  • Meta repository consisting of two other repositories:
    • The Humdrum Toolkit (implemented in AWK)
    • Humdrum Extras (implemented in C++)
    • Does not include humlib which will eventually replace parser in humextra.

  • .

80 of 86

Humdrum documentation website

  • Documentation about Humdrum data (beyond **kern).

  • Documentation about command-line tools for Humdrum data processing.

81 of 86

NIFC Digital Edition Projects

82 of 86

The Fryderyk Chopin Institute (Warsaw, Poland)

The activities of the Fryderyk Chopin Institute, which was established in 2001 on the basis of an act of the Polish Parliament, cover the following areas:

  • research and popularization of knowledge about Chopin’s life and work,
  • publications,
  • organization of concerts, conferences, courses,
  • cooperation with institutions and organizations dealing in the protection of the Chopin heritage,
  • gathering of Chopin-related archive materials and museum objects,

83 of 86

Research and digitization projects (EU funds)

Chopin Heritage in Open Access

  • 2018 – 2020
  • More than 38 000 digitized objects
  • All Chopin works encoded in Humdrum format
  • System for comparing different editions of same work
  • Downloadable scores

Heritage of Polish Music in Open Access

  • 2019-2021
  • Focused on Polish music, 16. – 19. cent.
  • More than 12 600 digitized objects (manuscripts and prints
  • Ca. 6 000 scores encoded in Humdrum format
  • Downloadable scores for performers and scholars
  • Tools for computer assisted analysis

84 of 86

Demo website for Chopin Early Editions

85 of 86

86 of 86