Piecewise-exponential curves designed for musical expressiveness.
Project description
expenvelope
expenvelope is a python library for managing piecewise exponential curves, original intended as a tool for algorithmic music composition. Curves are simple to make, expressive, and useful for controlling dynamics, tempo, and other higher-level parameters.
The central Envelope
class bears some relation to SuperCollider's Env object, and is represented behind the scenes as a contiguous set of EnvelopeSegments
. There are a number of different class methods available for constructing envelopes, including:
Envelope.from_levels
Envelope.from_levels_and_durations
Envelope.from_points
Envelope.release
Envelope.ar
Envelope.asr
Envelope.adsr
Envelope.from_function
In addition to the central value_at
function, utilities have been included to append and insert new points, insert a new interpolated control point without changing the curve, integrate over intervals, find the maximum slope reached, and find the average value, among other things. Envelopes (and EnvelopeSegments) can be added, subtracted, multiplied and divided, with these operations yielding new Envelopes that are close approximations to the resulting function using piecewise exponential curves.
expenvelope is a key dependency of clockblocks, a package for for controlling the flow of musical time, and scamp, a Suite for Computer-Assisted Music in Python.
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 Distributions
Built Distribution
Hashes for expenvelope-0.7.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 310f8047fcdee07f8d913431047dca4c28e1de4635458be0fce145b536d4c1f4 |
|
MD5 | 78043787e178aca886cf12b8bc854c77 |
|
BLAKE2b-256 | ecfdaac2aa90758539bd20344c9fa9cfda183d78803305edbdafc1b0064aa42e |