Skip to main content

Convert MIDI files to point set representation.

Project description

MIDI to Point Set Converter

This Python library converts MIDI files to point set representation, which encodes notes as pairs of integers encoding the pitch and time. The output can be used for machine learning tasks such as music generation.

Requirements

  • Python 3.7 or higher

Installation

pip install midi_point_set

Usage

CLI

# JSON output

python -m midi-point-set --input-midi K545-1.mid --output-json mozart.json

# Plot
# (requires matplotlib installed)
python -m midi-point-set --input-midi K545-1.mid --output-plot mozart.svg

Library

from midi_point_set import get_point_set

point_set = get_point_set("mozart.midi")
print(point_set[:5])

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

midi-point-set-0.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

midi_point_set-0.1.0-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

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