Skip to main content

External bindings for apres MIDI library

Project description

Apres bindings

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

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.

Source Distribution

apres-0.3.21.tar.gz (1.0 MB view details)

Uploaded Source

File details

Details for the file apres-0.3.21.tar.gz.

File metadata

  • Download URL: apres-0.3.21.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for apres-0.3.21.tar.gz
Algorithm Hash digest
SHA256 1a8f5a44f4ae19dd5f1692245c7080393e58e137c3034aadedb2f4fd5a08f384
MD5 6275522c50b2040f693eae942bf1e385
BLAKE2b-256 c3831dbfcec0ad833a731721a11897eeb2f69f76135f7a68d158effa7f4e5fed

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