Skip to main content

A package that charts musical contours into a web-based interactive using music21 and D3.js.

Project description

ContourViz
--------

This package uses music21 to process musical notation and creates a web-based visual
representation of the melodic contour within the browser. It creates a stand-alone
website within the current working directory called 'results'. It then serves this
folder locally within the web browser, offering contour maps of either a single melody
or all of the notation files within the passed folder path.

To install:

>>> pip install contourviz

To use on the command line:

>>> # Navigate to an empty directory (or at least one without a folder called 'results')
>>> # Create a chart of multiple melodic contours
>>> chart-contours '/path/to/directory/full/of/xml/or/mxl/files'
>>>
>>> # Create a chart of a single melodic contour
>>> chart-single-contour '/path/to/file.xml'

For use within the Python interpreter:

>>> # Navigate to an empty directory (or at least one without a folder called 'results')
>>> testFile = '/path/to/file.xml'
>>> testPath = '/path/to/directory/full/of/xml/or/mxl/files'
>>>
>>> # Create a single contour line from a given file
>>> createDataFromFile(testFile)
>>>
>>> # Create a set of contour lines from all files in a given directory
>>> createDataFromDirectory(testPath)

In progress updates and known issues include the following:

* It currently only works with single line (monophonic) melodies.
* The frequency labels draw from a logarithmic reading of each note's frequency, not note names.
* When using the interpreter: after serving the file, the Python script does not return to the correct working directory. This may require exiting and reentering the interpreter or navigating the command line to repeat the process.

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

contourviz-0.2.4.tar.gz (128.1 kB view details)

Uploaded Source

File details

Details for the file contourviz-0.2.4.tar.gz.

File metadata

  • Download URL: contourviz-0.2.4.tar.gz
  • Upload date:
  • Size: 128.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for contourviz-0.2.4.tar.gz
Algorithm Hash digest
SHA256 dd826c0bb7d30c0fc2447824b52d3da51b4264fffe5f40d225984d8e6068e3f2
MD5 c43912469436abdcf7f447d738867d70
BLAKE2b-256 e1394c7423cf701e7e6ba4f536dee37c1626dcf4cb6b4b16940ac964355998b1

See more details on using hashes here.

Supported by

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