Skip to main content

Sequence MIDI messages using a Flask-style interface.

Project description

Sequence MIDI messages using a Flask-style interface. Very much a work-in-progress.

Installation

pip install lucier

Usage

from lucier import Sequencer, MidiController, utils

s = Sequencer()

@s.register([MidiController(0)])
async def low_melody(ctrl, tick):
    if utils.every_n_ticks(50, tick):
        await ctrl.play_note(60, 60, .5)

@s.register([MidiController(1)])
async def high_melody(ctrl, tick):
    if utils.every_n_ticks(50, tick, offset=25):
        await ctrl.play_note(72, 60, .5)

s.play()

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

lucier-0.0.2.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

lucier-0.0.2-py3-none-any.whl (4.8 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