1 of 18

Data extraction from piano-roll scans

Craig Stuart Sapp

craig@ccrma.stanford.edu

IAML 2018

Leipzig, Deutschland

24 Juli 2018

http://bit.ly/iaml2018-pianoroll

2 of 18

Data processing overview

Scan

Raw MIDI file

without

expression

Performance MIDI file

with

expression

Stanford Libraries

Digital Production

Group (DPG)

Me

Zhengshan “Kitty” Shi

3 of 18

Online test scans

http://pianoroll.sapp.org/full-rolls-set3b

4 of 18

Image analysis markup

5 of 18

Graphical hole markup syntax

  • Yellow horizontal line: start of note

  • Orange vertical line: bass side of note

  • Red vertical line: treble side of note

  • Red horizontal line: ending of a note hole

  • Green vertical line: treble tracker-bar position

  • Yellow horizontal dotted lines: note attacks

(or expression hole starts)

6 of 18

Tracker bar hole positions

Bass

expression

Treble

expression

Treble notes

Bass notes

1

2

3

4

5

6

7

8

9

10

1 Mezzo-forte off

2 Mezzo-forte on

3 Crescendo off

4 Crescendo on

5 Forzando off

6 Forzando on

7 Sustain off

8 Sustain on

9 Electric cutoff

  1. Rewind
  2. Highest note (G7)

11

7 of 18

Left-right drift of roll while scanning

~35 pixel spacing between hole rows

Scanning operator manually adjusted

Left/right position of roll while scanning

8 of 18

Operator shift marked in scan

9 of 18

Dynamic tracking for drift/shift

  • Edges of paper are tracked to monitor shifts and drifting of the paper.

  • Light blue color of holes mean they are in a region which is shifting left/right.

  • Coordinate system is adjusted to correct for shift.

  • Horizontal orange lines mark where the operator shifted the roll while scanning (more than 1/100th of an inch over 2/3rds of an inch).

  • Green/Blue vertical lines are the intended center of the tracker-bar holes (notice horizontal movment to match hole centers).

  • Dashed lines mean that no holes in paper for that tracker-bar position.

10 of 18

Automatic tear analysis

https://ccrma.stanford.edu/~craig/piano-roll-project/acceptance_test-20171219/redwelte-0245-waltz-op42-chopin-scharwenka/druid-mj502fy3866-analysis/index.html#trebletear004

11 of 18

Automatic identification of bad holes

12 of 18

Bad holes (2)

  • Bad holes not ignored when inside a note sustain.
  • Bad holes not allowed to start a note.

13 of 18

Analysis summary

https://docs.google.com/spreadsheets/d/16s-SUqWki41trQW_0UvyRTyfPO3Yz5dyzRabzM-CsG0/edit?usp=sharing

14 of 18

Github

https://github.com/pianoroll

Software and extracted MIDI data for Stanford Piano rolls

https://github.com/pianoroll/midiroll/tree/master/data/stanford/scandata

Example “raw” MIDI Files:

15 of 18

16 of 18

Resources for each roll scan

Expressionless rendering

(audio file)

Starting image

Detailed analysis page

Click roll icon to

view information

http://pianoroll.sapp.org/full-rolls-set3b/#jg699wz4435

17 of 18

Automatic analysis pages

https://ccrma.stanford.edu/~craig/piano-roll-project/redwelte-20180301/jg699wz4435/jg699wz4435-analysis

18 of 18

Automatically extracted roll properties

https://ccrma.stanford.edu/~craig/piano-roll-project/redwelte-20180301/jg699wz4435/jg699wz4435-analysis