Skip to main content

External bindings for apres MIDI library

Project description

Apres bindings

Python bindings for the Apres MIDI library
PyPI - Downloads PyPI GitHub

Installation

Can be installed through pip

pip install apres

Usage Examples

Load a Song

from apres import MIDI
midi = MIDI("/path/to/file.mid")

Create a new MIDI

from apres import MIDI
midi = MIDI()

Creating a song

from apres import MIDI, NoteOnEvent, NoteOffEvent

# Create an empty MIDI file.
midi = MIDI()

# Press midi note 64 (Middle E) on the first track (0) at the first position (0 ticks)
midi.add_event(NoteOnEvent(channel=0, note=64, velocity=100), tick=0, track=0)

# Release midi note 64 (Middle E) on the first track (0) one beat later (120 ticks)
midi.add_event(NoteOffEvent(channel=0, note=64), wait=120, track=0)

# Save it to a file
midi.save("beep.mid")

Project details


Download files

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

Files for apres, version 0.3.10
Filename, size File type Python version Upload date Hashes
Filename, size apres-0.3.10.tar.gz (1.7 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page