hmsm
Tools for image based MIDI generation from historical music storage media
Science Score: 52.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
✓Institutional organization owner
Organization digital-organology has institutional domain (organology.uni-leipzig.de) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.0%) to scientific vocabulary
Keywords
Repository
Tools for image based MIDI generation from historical music storage media
Basic Info
- Host: GitHub
- Owner: digital-organology
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://organology.uni-leipzig.de/
- Size: 8.61 MB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
HMSM-Tools
This python package contains tool for the digitization and analysis of Historical Musical Storage Media. This python package is the software implementation for the digitization part of the BMBF funded research project DISKOS at the Research Center Digital Organology at Leipzig University.
Installation
To install from PyPI use:
pip install hmsm
To install the development version directly from Github you can use pip like so:
{bash}
pip install git+https://github.com/digital-organology/hmsm.git
For additional installation information see INSTALL.md.
Usage
Piano Roll Digitization
We support digitization for a number of formats of piano rolls out of the box, for an overview see FORMATS.md. If you miss support for a format of interest for you, we provide tooling to help you create configuration information for that format. For additional information on this, see CONFIG.md.
The program generally expects roll scans to be taken against a black or white background.
If not specified using the --background parameter the color will be extrapolated from the provided image.
The roll scan is also expected to be somewhat straight, with a slight curvature beeing compensated for automatically.
To process a roll, use the provided roll2midi utility, like so:
{bash}
roll2midi -c animatic -t 60 hupfeld_animatic_roll.tif out.mid
This will:
-c animaticuse theanimaticprofile bundled with the application. You may also pass the path to a json file containing a custom configuration or even a raw json string here.-t 60set the roll speed to 60. The unit is feet-per-minute times 10, which is the unit annotated on (most) rolls. This means the roll will effectively be processed as if it were played back at 6 feet per minute.hupfeld_animatic_roll.tifread the roll scan from this fileout.midwrite the generated midi file here
For more inforamtion on the command line interface for roll digitization pass the -h or --help parameter:
roll2midi --help
Cardboard Disc Digitization
We currently support Image-to-Midi transformation for Ariston brand cardboard discs with 24 tracks. We expect our process to work for all types of discs that encode information in the same general way.
We use images that are overexposed and have the start position of the disc aligned to 0 degrees like this one.
You may need to preproces your image using you favorite image processing software.
Be sure to pass the rotation of the start position of the disc using the --offset parameter.
To digitize the example image included in this repository call the included command line utility, like so:
{bash}
disc2midi -c ariston -m cluster assets/5070081_22.JPG out.mid
Midi to Disc Transformation
Included in this package is functionality to create images of cardboard discs from midi files. We currently include a profile for the Ariston 24 type of disc, though it should be relatively trivial to add support other types of discs. You can test this with any midi file of your choosing, any notes that are not contained in the given format will be dropped automatically.
{bash}
midi2disc -t ariston_24 -s 4000 -n "Title can have<br>multiple lines" input.mid output.png
Though this is not a core feature of our application we used midis generated from original discs to verify that the results are close to the original media.
Disc to Roll Image Transformer
We also include a utility to transform circular media into a rectangular representation (similar to piano rolls). This can be useful if you prefer to use an existing digitization solution for piano rolls for the image to midi transformation process. It should generally work with all circular media types as long as there is sufficient contrast between background and medium for the algorithm to detect the edge of the medium correctly. To transform the included color photography of the same disc as used above run:
{bash}
disc2roll --offset 92 assets/5070081_11.JPG roll.JPG
License
We provide this software under the GNU-GPL (Version 3-or-later, at your discretion).
The photographs included in this repository (located unter assets/) are taken from our research platform MusiXplora and are generally provided under a CC BY-SA 4.0 License unless otherwise specified.
Owner
- Name: Digital Organology
- Login: digital-organology
- Kind: organization
- Location: Leipzig, Germany
- Website: organology.uni-leipzig.de
- Repositories: 1
- Profile: https://github.com/digital-organology
Research Center Digital Organology at the Museum of Musical Instruments at Leipzig University
Citation (CITATION.cff)
cff-version: 1.2.0 title: HMSM-Tools message: >- If you use this software, please cite it using the metadata from this file. authors: - given-names: David family-names: Fuhry - given-names: Dominik family-names: Ukolov orcid: "https://orcid.org/0000-0002-7904-3892" - given-names: Franziska family-names: Bühl - given-names: Heike family-names: Fricke url: 'https://github.com/digital-organology/hmsm' license: GPL-3.0-or-later date-released: 2023-05-25
GitHub Events
Total
- Push event: 2
Last Year
- Push event: 2
Packages
- Total packages: 1
-
Total downloads:
- pypi 25 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: hmsm
Tools for image based digitization of historical music storage media
- Documentation: https://hmsm.readthedocs.io/
- License: GPL-3.0-or-later
-
Latest release: 0.9.1
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- matplotlib *
- mido *
- numpy *
- opencv-python *
- scikit-image *
- scikit-learn *
- scikit-spatial *
- scipy *