Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apres

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apres

External bindings for apres MIDI library

  • 0.3.21
  • PyPI
  • Socket score

Maintainers
1

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")

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc