SlideShare a Scribd company logo
Optical Music Recognition
              with Python
                Andrew Hankinson
Optical Music Recogntion
              is
Optical Character Recognition
     for Music Notation


                                2
Building “Google Books”
   for music notation



                          3
Our Task:
  Tell a computer how to
understand music notation



                            4
Our Task:
 Teach a computer how to
understand music notation



                            5
time
pitch




               6
time
pitch




         clefs     durations   articulations
        barlines                               key signature
                    dynamics (“loudness”)
                                      implicit knowledge
                                                               6
6
6
Neume Notation
  Liturgical Use
 ~1100 to 1600 CE
                    7
Gamera
 Python/C++ Framework for
document image analysis and
     shape recognition

      (not just for music...)

                                8
Tasks...
❖ Binarisation:   Colour -> Black & White
❖ Staff   Removal: Removing connected components
❖ Shapeidentification: Automatically classifying
 shapes
❖ Correction:   Fixing machine errors
❖ Exporting:    Encoding recognized music notation
 in XML

                                                     9
Demo



       10
11
Recap
❖ “Clean   up” images -- binarization, etc.
❖ Remove     staff lines
❖ Connected    component analysis
❖ Classify   shapes
❖ Recombine     with staff lines for pitch finding
❖ Save image + musical data to a musical
 representation format (e.g., the Music Encoding
 Initiative XML schema)
                                                    12
Thank you.
    github.com/DDMAL
github.com/ahankinson


                        13

More Related Content

PDF
Python master class 3
PPT
Lisp and scheme i
DOCX
imageprocessing-abstract
PDF
Python for Image Understanding: Deep Learning with Convolutional Neural Nets
PDF
Mp26 : Connecting Startups with Talents
PDF
Mp26 : A Quick Introduction to NetworkX
PDF
Mp26 : Tachyon, sloppiness is bliss
PDF
Mp26 : How do you Solve a Problem like Santa Claus?
Python master class 3
Lisp and scheme i
imageprocessing-abstract
Python for Image Understanding: Deep Learning with Convolutional Neural Nets
Mp26 : Connecting Startups with Talents
Mp26 : A Quick Introduction to NetworkX
Mp26 : Tachyon, sloppiness is bliss
Mp26 : How do you Solve a Problem like Santa Claus?

More from Montreal Python (6)

PDF
Mp25: Audio Fingerprinting and metadata correction with Python
PDF
Mp25: Mobile dev with QT and Python for the Notorious N9
PDF
Mp25 Message Switching for Actor Based Designs
PDF
Mp24: Python in gaming industry
PDF
Mp24: Fabulous Mobile Development with and without Python
PDF
Mp24: The Bachelor, a facebook game
Mp25: Audio Fingerprinting and metadata correction with Python
Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25 Message Switching for Actor Based Designs
Mp24: Python in gaming industry
Mp24: Fabulous Mobile Development with and without Python
Mp24: The Bachelor, a facebook game
Ad

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Advanced methodologies resolving dimensionality complications for autism neur...
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Spectroscopy.pptx food analysis technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Electronic commerce courselecture one. Pdf
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
A comparative analysis of optical character recognition models for extracting...
Dropbox Q2 2025 Financial Results & Investor Presentation
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Network Security Unit 5.pdf for BCA BBA.
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Building Integrated photovoltaic BIPV_UPV.pdf
Programs and apps: productivity, graphics, security and other tools
MIND Revenue Release Quarter 2 2025 Press Release
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Ad

Mp25: Optical Music Recognition with Python

  • 1. Optical Music Recognition with Python Andrew Hankinson
  • 2. Optical Music Recogntion is Optical Character Recognition for Music Notation 2
  • 3. Building “Google Books” for music notation 3
  • 4. Our Task: Tell a computer how to understand music notation 4
  • 5. Our Task: Teach a computer how to understand music notation 5
  • 7. time pitch clefs durations articulations barlines key signature dynamics (“loudness”) implicit knowledge 6
  • 8. 6
  • 9. 6
  • 10. Neume Notation Liturgical Use ~1100 to 1600 CE 7
  • 11. Gamera Python/C++ Framework for document image analysis and shape recognition (not just for music...) 8
  • 12. Tasks... ❖ Binarisation: Colour -> Black & White ❖ Staff Removal: Removing connected components ❖ Shapeidentification: Automatically classifying shapes ❖ Correction: Fixing machine errors ❖ Exporting: Encoding recognized music notation in XML 9
  • 13. Demo 10
  • 14. 11
  • 15. Recap ❖ “Clean up” images -- binarization, etc. ❖ Remove staff lines ❖ Connected component analysis ❖ Classify shapes ❖ Recombine with staff lines for pitch finding ❖ Save image + musical data to a musical representation format (e.g., the Music Encoding Initiative XML schema) 12
  • 16. Thank you. github.com/DDMAL github.com/ahankinson 13