-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
147 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,142 +1,177 @@ | ||
## Core | ||
## [Chance](chance/index.md) | ||
View source: [chance.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/chance.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| [PStochasticPattern](chance/pstochasticpattern.md) | PStochasticPattern is the superclass of all chance-based patterns. | | ||
| [PWhite](chance/pwhite.md) | White noise between `min` and `max`. | | ||
| [PBrown](chance/pbrown.md) | Brownian noise. | | ||
| [PCoin](chance/pcoin.md) | Coin toss, returning either 0 or 1 given some `probability`. | | ||
| [PRandomWalk](chance/prandomwalk.md) | Random walk around list. | | ||
| [PChoice](chance/pchoice.md) | Pick a random element from `values`, weighted by optional `weights`. | | ||
| [PSample](chance/psample.md) | Pick multiple random elements from `values`, weighted by optional `weights`, | | ||
| [PShuffle](chance/pshuffle.md) | Shuffled list. | | ||
| [PShuffleInput](chance/pshuffleinput.md) | Every `n` steps, take `n` values from `pattern` and reorder. | | ||
| [PSkip](chance/pskip.md) | Skip events with some probability, 1 - `play`. | | ||
| [PFlipFlop](chance/pflipflop.md) | flip a binary bit with some probability. | | ||
| [PSwitchOne](chance/pswitchone.md) | Capture `length` input values; loop, repeatedly switching two adjacent values. | | ||
| [PRandomExponential](chance/prandomexponential.md) | Random uniform on exponential curve between `min` and `max`, | | ||
| [PRandomImpulseSequence](chance/prandomimpulsesequence.md) | Random sequence of impulses with probability `probability`. | | ||
|
||
|
||
## [Core](core/index.md) | ||
View source: [core.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/core.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| Pattern | Abstract superclass of all pattern generators. | | ||
| PConstant | Returns a fixed value. | | ||
| PRef | Contains a reference to another pattern, which can be replaced dynamically. | | ||
| PFunc | Returns the value generated by a function. | | ||
| PArrayIndex | Request a specified index from an array. | | ||
| PDict | Construct a pattern from a dict of arrays, or an array of dicts. | | ||
| PDictKey | Request a specified key from a dictionary. | | ||
| PConcatenate | Concatenate the output of multiple sequences. | | ||
| PAbs | Absolute value of `input` | | ||
| PInt | Integer value of `input` | | ||
| PAdd | Add elements of two patterns (shorthand: patternA + patternB) | | ||
| PSub | Subtract elements of two patterns (shorthand: patternA - patternB) | | ||
| PMul | Multiply elements of two patterns (shorthand: patternA * patternB) | | ||
| PDiv | Divide elements of two patterns (shorthand: patternA / patternB) | | ||
| PFloorDiv | Integer division (shorthand: patternA // patternB) | | ||
| PMod | Modulo elements of two patterns (shorthand: patternA % patternB) | | ||
| PPow | One pattern to the power of another (shorthand: patternA ** patternB) | | ||
| PLShift | Binary left-shift (shorthand: patternA << patternB) | | ||
| PRShift | Binary right-shift (shorthand: patternA << patternB) | | ||
| PEqual | Return 1 if a == b, 0 otherwise (shorthand: patternA == patternB) | | ||
| PGreaterThanOrEqual | Return 1 if a != b, 0 otherwise (shorthand: patternA != patternB) | | ||
| PGreaterThan | Return 1 if a > b, 0 otherwise (shorthand: patternA > patternB) | | ||
| PGreaterThanOrEqual | Return 1 if a >= b, 0 otherwise (shorthand: patternA >= patternB) | | ||
| PLessThan | Return 1 if a < b, 0 otherwise (shorthand: patternA < patternB) | | ||
| PLessThanOrEqual | Return 1 if a <= b, 0 otherwise (shorthand: patternA <= patternB) | | ||
|
||
## Scalar | ||
View source: [scalar.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/scalar.py) | ||
| [Pattern](core/pattern.md) | Abstract superclass of all pattern generators. | | ||
| [PConstant](core/pconstant.md) | Returns a fixed value. | | ||
| [PRef](core/pref.md) | Contains a reference to another pattern, which can be replaced dynamically. | | ||
| [PFunc](core/pfunc.md) | Returns the value generated by a function. | | ||
| [PArrayIndex](core/parrayindex.md) | Request a specified index from an array. | | ||
| [PDict](core/pdict.md) | Construct a pattern from a dict of arrays, or an array of dicts. | | ||
| [PDictKey](core/pdictkey.md) | Request a specified key from a dictionary. | | ||
| [PConcatenate](core/pconcatenate.md) | Concatenate the output of multiple sequences. | | ||
| [PAbs](core/pabs.md) | Absolute value of `input` | | ||
| [PInt](core/pint.md) | Integer value of `input` | | ||
| [PAdd](core/padd.md) | Add elements of two patterns (shorthand: patternA + patternB) | | ||
| [PSub](core/psub.md) | Subtract elements of two patterns (shorthand: patternA - patternB) | | ||
| [PMul](core/pmul.md) | Multiply elements of two patterns (shorthand: patternA * patternB) | | ||
| [PDiv](core/pdiv.md) | Divide elements of two patterns (shorthand: patternA / patternB) | | ||
| [PFloorDiv](core/pfloordiv.md) | Integer division (shorthand: patternA // patternB) | | ||
| [PMod](core/pmod.md) | Modulo elements of two patterns (shorthand: patternA % patternB) | | ||
| [PPow](core/ppow.md) | One pattern to the power of another (shorthand: patternA ** patternB) | | ||
| [PLShift](core/plshift.md) | Binary left-shift (shorthand: patternA << patternB) | | ||
| [PRShift](core/prshift.md) | Binary right-shift (shorthand: patternA << patternB) | | ||
| [PEqual](core/pequal.md) | Return 1 if a == b, 0 otherwise (shorthand: patternA == patternB) | | ||
| [PNotEqual](core/pnotequal.md) | Return 1 if a != b, 0 otherwise (shorthand: patternA != patternB) | | ||
| [PGreaterThan](core/pgreaterthan.md) | Return 1 if a > b, 0 otherwise (shorthand: patternA > patternB) | | ||
| [PGreaterThanOrEqual](core/pgreaterthanorequal.md) | Return 1 if a >= b, 0 otherwise (shorthand: patternA >= patternB) | | ||
| [PLessThan](core/plessthan.md) | Return 1 if a < b, 0 otherwise (shorthand: patternA < patternB) | | ||
| [PLessThanOrEqual](core/plessthanorequal.md) | Return 1 if a <= b, 0 otherwise (shorthand: patternA <= patternB) | | ||
| [PAnd](core/pand.md) | Return True if a and b, False otherwise (shorthand: patternA & patternB) | | ||
|
||
|
||
## [Fade](fade/index.md) | ||
View source: [fade.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/fade.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PChanged | Outputs a 1 if the value of a pattern has changed. | | ||
| PDiff | Outputs the difference between the current and previous values of an input pattern | | ||
| PSkipIf | If `skip` is false, returns `input`; otherwise, returns None. | | ||
| PNormalise | Adaptively normalise `input` to [0..1] over a linear scale. | | ||
| PMap | Apply an arbitrary function to an input pattern. | | ||
| PMapEnumerated | Apply arbitrary function to input, passing a counter. | | ||
| PLinLin | Map `input` from linear range [a,b] to linear range [c,d]. | | ||
| PLinExp | Map `input` from linear range [a,b] to exponential range [c,d]. | | ||
| PRound | Round `input` to N decimal places. | | ||
| PScalar | Reduce tuples and lists into single scalar values, | | ||
| PWrap | Wrap input note values within <min>, <max>. | | ||
| PIndexOf | Find index of items from `pattern` in <list> | | ||
|
||
## Sequence | ||
View source: [sequence.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/sequence.py) | ||
| [PFadeNotewise](fade/pfadenotewise.md) | Fade a pattern in/out by introducing notes at a gradual rate. | | ||
| [PFadeNotewiseRandom](fade/pfadenotewiserandom.md) | Fade a pattern in/out by gradually introducing random notes. | | ||
|
||
|
||
## [Lsystem](lsystem/index.md) | ||
View source: [lsystem.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/lsystem.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PSeries | Arithmetic series, beginning at `start`, increment by `step` | | ||
| PRange | Similar to PSeries, but specify a max/step value. | | ||
| PGeom | Geometric series, beginning at `start`, multiplied by `step` | | ||
| PImpulse | Outputs a 1 every <period> events, otherwise 0. | | ||
| PLoop | Repeats a finite `pattern` for `n` repeats. | | ||
| PPingPong | Ping-pong input pattern back and forth N times. | | ||
| PCreep | Loop `length`-note segment, progressing `creep` notes after `repeats` repeats. | | ||
| PStutter | Play each note of `pattern` `count` times. | | ||
| PSubsequence | Returns a finite subsequence of an input pattern. | | ||
| PReverse | Reverses a finite sequence. | | ||
| PReset | Resets `pattern` whenever `trigger` is true | | ||
| PCounter | Increments a counter by 1 for each zero-crossing in `trigger`. | | ||
| PCollapse | Skip over any rests in `input` | | ||
| PNoRepeats | Skip over repeated values in `input` | | ||
| PPad | Pad `pattern` with rests until it reaches length `length`. | | ||
| PPadToMultiple | Pad `pattern` with rests until its length is divisible by `multiple`. | | ||
| PArpeggiator | Arpeggiator. | | ||
| PEuclidean | Generate Euclidean rhythms. | | ||
| PPermut | Generate every permutation of `count` input items. | | ||
| PPatternGeneratorAction | Each time its pattern is exhausted, request a new pattern by calling <fn>. | | ||
| PSequenceAction | Iterate over an array, perform a function, and repeat. | | ||
|
||
## Chance | ||
View source: [chance.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/chance.py) | ||
| [PLSystem](lsystem/plsystem.md) | integer sequence derived from Lindenmayer systems | | ||
|
||
|
||
## [Markov](markov/index.md) | ||
View source: [markov.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/markov.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PWhite | White noise between `min` and `max`. | | ||
| PBrown | Brownian noise. | | ||
| PCoin | Coin toss, returning either 0 or 1 given some `probability`. | | ||
| PWalk | Random walk around list. | | ||
| PChoice | Pick a random element from `values`, weighted by optional `weights`. | | ||
| PSample | Pick multiple random elements from `values`, weighted by optional `weights`, | | ||
| PShuffle | Shuffled list. | | ||
| PShuffleInput | Every `n` steps, take `n` values from `pattern` and reorder. | | ||
| PSkip | Skip events with some probability, 1 - <play>. | | ||
| PFlipFlop | flip a binary bit with some probability. | | ||
| PSwitchOne | Capture `length` input values; loop, repeatedly switching two adjacent values. | | ||
|
||
## Tonal | ||
View source: [tonal.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/tonal.py) | ||
| [PMarkov](markov/pmarkov.md) | First-order Markov chain generator. | | ||
| [MarkovLearner](markov/markovlearner.md) | Learn a Markovian sequence by sequentially registering new values | | ||
| [MarkovGrapher](markov/markovgrapher.md) | Helper class to graph the structure of a Markov object. | | ||
|
||
|
||
## [Midi](midi/index.md) | ||
View source: [midi.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/midi.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PDegree | Map scale index <degree> to MIDI notes in <scale>. | | ||
| PFilterByKey | Filter notes based on their presence in <key>. | | ||
| PNearestNoteInKey | Return the nearest note in <key>. | | ||
| PMidiNoteToFrequency | Map MIDI note to frequency value. | | ||
|
||
## Static | ||
View source: [static.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/static.py) | ||
|
||
## [Oscillator](oscillator/index.md) | ||
View source: [oscillator.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/oscillator.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PGlobals | Static global value identified by a string. | | ||
| PCurrentTime | Returns the position (in beats) of the current timeline. | | ||
| [PTri](oscillator/ptri.md) | Generates a triangle waveform of period `length`. | | ||
| [PSaw](oscillator/psaw.md) | Generates a sawtooth waveform. | | ||
|
||
## Fade | ||
View source: [fade.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/fade.py) | ||
|
||
## [Scalar](scalar/index.md) | ||
View source: [scalar.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/scalar.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PFadeNotewise | Fade a pattern in/out by introducing notes at a gradual rate. | | ||
| PFadeNotewiseRandom | Fade a pattern in/out by gradually introducing random notes. | | ||
| [PChanged](scalar/pchanged.md) | Outputs a 1 if the value of the input pattern has changed, | | ||
| [PDiff](scalar/pdiff.md) | Outputs the difference between the current and previous values of an input pattern | | ||
| [PSkipIf](scalar/pskipif.md) | If `skip` is false, returns `input`; otherwise, returns None. | | ||
| [PNormalise](scalar/pnormalise.md) | Adaptively normalise `input` to [0..1] over a linear scale. | | ||
| [PMap](scalar/pmap.md) | Apply an arbitrary function to an input pattern. | | ||
| [PMapEnumerated](scalar/pmapenumerated.md) | Apply arbitrary function to input, passing a counter. | | ||
| [PScaleLinLin](scalar/pscalelinlin.md) | Map `input` from linear range [a,b] to linear range [c,d]. | | ||
| [PScaleLinExp](scalar/pscalelinexp.md) | Map `input` from linear range [a,b] to exponential range [c,d]. | | ||
| [PRound](scalar/pround.md) | Round `input` to N decimal places. | | ||
| [PScalar](scalar/pscalar.md) | Reduce tuples and lists into single scalar values, | | ||
| [PWrap](scalar/pwrap.md) | Wrap input note values within <min>, <max>. | | ||
| [PIndexOf](scalar/pindexof.md) | Find index of items from `pattern` in <list> | | ||
|
||
|
||
## [Sequence](sequence/index.md) | ||
View source: [sequence.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/sequence.py) | ||
|
||
## Markov | ||
View source: [markov.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/markov.py) | ||
| Class | Function | | ||
|-|-| | ||
| [PSequence](sequence/psequence.md) | Sequence of values based on an array | | ||
| [PSeries](sequence/pseries.md) | Arithmetic series, beginning at `start`, increment by `step` | | ||
| [PRange](sequence/prange.md) | Similar to PSeries, but specify a max/step value. | | ||
| [PGeom](sequence/pgeom.md) | Geometric series, beginning at `start`, multiplied by `step` | | ||
| [PImpulse](sequence/pimpulse.md) | Outputs a 1 every <period> events, otherwise 0. | | ||
| [PLoop](sequence/ploop.md) | Repeats a finite `pattern` for `n` repeats. | | ||
| [PPingPong](sequence/ppingpong.md) | Ping-pong input pattern back and forth N times. | | ||
| [PCreep](sequence/pcreep.md) | Loop `length`-note segment, progressing `creep` notes after `repeats` repeats. | | ||
| [PStutter](sequence/pstutter.md) | Play each note of `pattern` `count` times. | | ||
| [PSubsequence](sequence/psubsequence.md) | Returns a finite subsequence of an input pattern. | | ||
| [PReverse](sequence/preverse.md) | Reverses a finite sequence. | | ||
| [PReset](sequence/preset.md) | Resets `pattern` whenever `trigger` is true | | ||
| [PCounter](sequence/pcounter.md) | Increments a counter by 1 for each zero-crossing in `trigger`. | | ||
| [PCollapse](sequence/pcollapse.md) | Skip over any rests in `input` | | ||
| [PNoRepeats](sequence/pnorepeats.md) | Skip over repeated values in `input` | | ||
| [PPad](sequence/ppad.md) | Pad `pattern` with rests until it reaches length `length`. | | ||
| [PPadToMultiple](sequence/ppadtomultiple.md) | Pad `pattern` with rests until its length is divisible by `multiple`. | | ||
| [PArpeggiator](sequence/parpeggiator.md) | Arpeggiator. | | ||
| [PEuclidean](sequence/peuclidean.md) | Generate Euclidean rhythms. | | ||
| [PPermut](sequence/ppermut.md) | Generate every permutation of `count` input items. | | ||
| [PPatternGeneratorAction](sequence/ppatterngeneratoraction.md) | Each time its pattern is exhausted, request a new pattern by calling <fn>. | | ||
| [PSequenceAction](sequence/psequenceaction.md) | Iterate over an array, perform a function, and repeat. | | ||
|
||
|
||
## [Static](static/index.md) | ||
View source: [static.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/static.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PMarkov | First-order Markov chain generator. | | ||
| [Globals](static/globals.md) | The Globals class encapsulates a namespace of global variables that can be accessed | | ||
| [PGlobals ](static/pglobals .md) | Static global value identified by a string. | | ||
| [PCurrentTime](static/pcurrenttime.md) | Returns the position (in beats) of the current timeline. | | ||
|
||
## Lsystem | ||
View source: [lsystem.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/lsystem.py) | ||
|
||
## [Tonal](tonal/index.md) | ||
View source: [tonal.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/tonal.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PLSystem | integer sequence derived from Lindenmayer systems | | ||
| [PDegree](tonal/pdegree.md) | Map scale index <degree> to MIDI notes in <scale>. | | ||
| [PFilterByKey](tonal/pfilterbykey.md) | Filter notes based on their presence in <key>. | | ||
| [PNearestNoteInKey](tonal/pnearestnoteinkey.md) | Return the nearest note in <key>. | | ||
| [PMidiNoteToFrequency](tonal/pmidinotetofrequency.md) | Map MIDI note to frequency value. | | ||
| [PMidiSemitonesToFrequencyRatio](tonal/pmidisemitonestofrequencyratio.md) | Map a MIDI offet in semitones to a frequency ratio. | | ||
|
||
## Warp | ||
|
||
## [Warp](warp/index.md) | ||
View source: [warp.py](https://github.com/ideoforms/isobar/tree/master/isobar/pattern/warp.py) | ||
|
||
| Class | Function | | ||
|-|-| | ||
| PWInterpolate | Requests a new target warp value from `pattern` every `length` beats | | ||
| PWSine | Sinosoidal warp, period `length` beats, amplitude +/-<amp>. | | ||
| PWRallantando | Exponential deceleration to <amp> times the current tempo over `length` beats. | | ||
| [PWarp](warp/pwarp.md) | Requests a new target warp value from `pattern` every `length` beats | | ||
| [PWSine](warp/pwsine.md) | Sinosoidal warp, period `length` beats, amplitude +/-<amp>. | | ||
| [PWRallantando](warp/pwrallantando.md) | Exponential deceleration to <amp> times the current tempo over `length` beats. | | ||
|
||
|