forked from ideoforms/isobar
-
Notifications
You must be signed in to change notification settings - Fork 0
danstowell/isobar
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
INTRODUCTION ------------------------------------------------------------------------------- Isobar is a Python library for expressing and constructing musical patterns, designed for use in algorithmic composition. It allows for concise construction, manipulation and transposition of sequences, supporting scalar operations on lazy patterns. USAGE ------------------------------------------------------------------------------- from isobar import * from isobar.io.midiout import * # create a repeating sequence with scalar transposition: # [ 48, 50, 57, 60 ] ... seqA = PSeq([ 0, 2, 7, 3 ]) + 48 # apply pattern-wise transposition # [ 48, 62, 57, 72 ] ... seqA = seqA + PSeq([ 0, 12 ]) # create a geometric chromatic series, repeated back and forth seqB = PSeries(0, 1, 12) + 72 seqB = PPingPong(seqB) # create an velocity series, with emphasis every 4th note, # plus a random walk to create gradual dynamic changes amp = PSeq([ 60, 40, 30, 40 ]) + PBrown(0, 1, -20, 20) # a Timeline schedules events at a given BPM, sent over a specified output timeline = Timeline(120) midiout = MidiOut() timeline.output(midiout) # assign each of our Patterns to particular properties timeline.sched({ 'note': seqA, 'dur': 1 }) timeline.sched({ 'note': seqB, 'dur': 0.25, 'amp': amp }) timeline.run() EXAMPLES ------------------------------------------------------------------------------- More examples are available in the 'examples' directory with this distribution. CLASSES ------------------------------------------------------------------------------- Current class list: Chord Key Note Scale Timeline Clock Pattern classes: CORE (pattern/core.py) Pattern - generic pattern superclass PConst - constant value PAdd - add two patterns together (shorthand: patternA + patternB) PSub - subtract pattern B from A (shorthand: patternA - patternB) PMul - divide pattern A by B (shorthand: patternA / patternB) PDiv - multiply pattern A by B (shorthand: patternA * patternB) SEQUENCE (pattern/sequence.py) PSeq - sequence of fixed values (repeated N times) PSeries - geometric series PLoop - repeat an input pattern N times PCreep - creep through an input pattern by N notes each step PStutter - repeat each input value N times PWrap - wrap values around a given range PPermut - all permutations of a finite input pattern PDegree - map values to a given Scale PImpulse - generates an impulse every N steps PReset - resets an input pattern when an impulse is received PSubsequence - extracts a subsequence at a given index and length PArp - generates arpeggios with a range of settings CHANCE (pattern/chance.py) PWhite - white noise (uncorrelated values within a given range, int or float) PBrown - brownian noise (random walk over a given range, int or float) PWalk - random walk over a given input list PChoice - random choice from a list PWChoice - weighted random choice from a list PShuffle - shuffle a finite input sequence PSkip - skip over input values with some probability PSelfIndex OPERATORS (pattern/operator.py) PDelay - outputs the next value of an input pattern after N ticks PDiff - difference between last two input values PAbs - absolute value of an input pattern L-SYSTEMS (pattern/lsystem.py) PLSys - integer sequence derived from Lindenmayer systems MARKOV (pattern/markov.py) PMarkov - markov chain patterns WARPING AND AUTOMATION [EXPERIMENTAL] (pattern/warp.py) PWarp - warp continuous values (abstract superclass) PWRamp - warp on a linear ramp PWSine - warp on a sine PAutomate - superclass for continuous value automation (in development) ------------------------------------------------------------------------------- BACKGROUND ------------------------------------------------------------------------------- Isobar was first designed for the generative sound installation Variable 4: http://www.variable4.org.uk/news/ Many of the concepts behind Pattern and its subclasses are inspired by the excellent pattern library of the SuperCollider synthesis language: http://supercollider.sf.net
About
Isobar, an algorithmic pattern library for Python
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%