Skip to main content

CLI and Python package to extract systems of staves from musical scores.

Project description

incipit — extract systems of staves from musical scores

This command-line tool (and Python package) allows for the easy extraction of systems of staves from musical scores. In particular, it makes it easy to extract the first system of any musical score that is in B&W format, and has a noiseless enough background

This tool was built to automatically generate incipits for large sets of scores, like those downloaded from IMSLP. It was specifically built to create an index of the 555 keyboard sonatas by Domenico Scarlatti, in a related project.

Installation

The package is available on PyPI as incipit and so is available the usual way, i.e.,

sudo pip install incipit

In addition to the Python package, this should also install a CLI binary that is runnable, called incipit.

Usage

Usage: incipit [OPTIONS] INPUT

  Extract the first (or any) system of staves from a black-and-white modern
  musical score, either available as an image file or PDF. For instance,

      $ incipit -o "555-incipit.png" ./input/pdf/555-gilbert.pdf

  will extract the first system of staves of the sheet music
  `555-gilbert.pdf' as the image `555-incipit.png`. And,

      $ incipit --output "1__{}.png" -# '0,-1' ./input/pdf/1-gilbert.pdf

  will extract the first and last systems of staves of `1-gilbert.pdf` and
  output these as the images `1__0.png' (first system) and `1__10.png' (last
  system).

Options:
  -a, --audit                   Visualize system detection across document
  -c, --count                   Output number of detected systems
  -p, --pages TEXT              List of pages to process (e.g., '0', '0,-1')
  -#, --systems TEXT            List of systems to extract (e.g., '0', '0,-1')
  -h, --height-threshold FLOAT  % of height threshold for system detection
  -w, --width-threshold FLOAT   % of width threshold for system detection
  -o, --output TEXT             Output file pattern
  -v, --verbose                 Print debug information
  --version                     Show the version and exit.
  --help                        Show this message and exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

incipit-2021.3.2.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

incipit-2021.3.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file incipit-2021.3.2.tar.gz.

File metadata

  • Download URL: incipit-2021.3.2.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.7 Darwin/19.6.0

File hashes

Hashes for incipit-2021.3.2.tar.gz
Algorithm Hash digest
SHA256 a3863b17aaa2d2188deb82f17ffb0fd5e451da5bac783567b9d982fd0117f29c
MD5 1aa36448912e25491a092bb0dcc6ad78
BLAKE2b-256 6a4d28d6585098d17f5d8549276fd538c9dfbef9b847d846de82939e04cff677

See more details on using hashes here.

File details

Details for the file incipit-2021.3.2-py3-none-any.whl.

File metadata

  • Download URL: incipit-2021.3.2-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.7 Darwin/19.6.0

File hashes

Hashes for incipit-2021.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 70c39c3ec6a267828900cd4eeb6fa29f21278611eddad7952ef11bc932c4a14b
MD5 75fca5aff6e1d9b9be1ff04dce650c83
BLAKE2b-256 dfdeb30bbc3faaaf383f077e47b1c34a322ad85d2a1480afd07ba5ea96821f01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page