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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for midi_point_set-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c5a304315b8999c0b71ea17c7c58a0f2e71f86b67a847b54cb158223a393612 |
|
MD5 | 09cf2aa12aa9b8fedcbb9bd2577748f3 |
|
BLAKE2b-256 | 08c67ce1de76b6c0d07123ff82d4e3fd7fd449d8dbdaad850fd04a1a83902907 |