Patterns
19 nodes
On this page 19
Alternate Patterns
FunctionPatterns played one a cycle in turn: verse, verse, chorus.
Alternate(patterns: Pattern Array) -> Pattern
Pattern Alternate(Pattern[] patterns)
Parameters
| name | type | default | description |
|---|---|---|---|
| patterns | Pattern Array | — | The patterns, in order. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Arpeggiate
FunctionEvery chord played as an arpeggio across its own time.
Arpeggiate(pattern: Pattern, mode: Arpeggio Mode) -> Pattern
Pattern Arpeggiate(
Pattern pattern,
ArpeggioMode mode = ArpeggioMode.Up)Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern, with chords written as [c, e, g]. |
| mode | Arpeggio Mode | Up | Which way the notes run. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Degrade
FunctionSteps dropped at random, the same ones every time for the same seed: a hi-hat line that breathes.
Degrade -> Pattern
pattern: Pattern
probability: Number
seed: IntegerPattern Degrade(
Pattern pattern,
double probability = 0.5,
int seed = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| probability | Number | 0.5 | The chance each step is dropped, 0 to 1. |
| seed | Integer | 0 | Which random choices. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Euclid
FunctionA pattern spread over some steps by Euclid's algorithm, the rhythm of much of the world's music: 3 over 8 is the tresillo.
Euclid -> Pattern
pattern: Pattern
hits: Integer
steps: Integer
rotation: IntegerPattern Euclid(
Pattern pattern,
int hits = 3,
int steps = 8,
int rotation = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | What plays on each hit. |
| hits | Integer | 3 | How many hits. |
| steps | Integer | 8 | Over how many steps. |
| rotation | Integer | 0 | Steps it is turned left by. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Every
FunctionEvery nth cycle - the first, then every n after - another pattern plays instead: a fill at the end of a phrase, a variation every fourth bar.
Every(pattern: Pattern, n: Integer, instead: Pattern) -> Pattern
Pattern Every(Pattern pattern, int n = 4, Pattern instead)
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | What usually plays. |
| n | Integer | 4 | How often the other plays. |
| instead | Pattern | — | What plays every nth cycle. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Fast
FunctionA pattern played faster: 2 fits it twice into each cycle.
Fast(pattern: Pattern, factor: Text) -> Pattern
Pattern Fast(Pattern pattern, string factor = "2")
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| factor | Text | 2 | How many times faster, as a number or fraction. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Iterate Pattern
FunctionEach cycle starts a step further into the pattern, so it walks round on itself.
Iter(pattern: Pattern, divisions: Integer) -> Pattern
Pattern Iter(Pattern pattern, int divisions = 4)
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| divisions | Integer | 4 | How many places it walks through before it comes back. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Off
FunctionA pattern with a copy of itself laid over it, a little later and moved in pitch: an echo, a canon, a harmony a step behind.
Off(pattern: Pattern, time: Text, semitones: Integer) -> Pattern
Pattern Off(
Pattern pattern,
string time = "1/8",
int semitones = 7)Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| time | Text | 1/8 | How much later the copy plays, as a fraction of a cycle. |
| semitones | Integer | 7 | How far the copy is moved; drums stay. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Palindrome
FunctionA pattern forwards one cycle and backwards the next.
Palindrome(pattern: Pattern) -> Pattern
Pattern Palindrome(Pattern pattern)
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Pattern
FunctionReads a pattern: steps share a cycle; [ ] groups, , stacks, < > alternates by cycle, * and / change speed, ! repeats, @ and _ lengthen, (3,8) spreads by Euclid, ? drops at random, | chooses at random, .. runs a range, { } steps layers in polymeter; ~ rests. Steps are notes (c4, eb, f#3), MIDI keys, or drums (bd sd hh oh cp rim lt mt ht cr rd cb).
Parse(text: Text) -> Pattern
Pattern Parse(string text = "bd [~ bd] sd ~, hh*8")
Parameters
| name | type | default | description |
|---|---|---|---|
| text | Text | bd [~ bd] sd ~, hh*8 | The pattern. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Ply
FunctionEvery step played several times in its own time: a quarter note becomes two eighths.
Ply(pattern: Pattern, times: Integer) -> Pattern
Pattern Ply(Pattern pattern, int times = 2)
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| times | Integer | 2 | How many times each step plays. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Reverse Pattern
FunctionEach cycle of a pattern played backwards.
Reverse(pattern: Pattern) -> Pattern
Pattern Reverse(Pattern pattern)
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Scale Pattern
FunctionA pattern of numbers read as degrees of a scale: "0 2 4 7" in C major is C E G C, and the same numbers in D Dorian are another tune.
Scale -> Pattern
pattern: Pattern
tonic: Text
mode: Scale ModePattern Scale(
Pattern pattern,
string tonic = "C4",
ScaleMode mode = ScaleMode.Major)Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern of degrees, 0 the tonic. |
| tonic | Text | C4 | The note degree 0 is, such as C4. |
| mode | Scale Mode | Major | The scale. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Shift Pattern
FunctionA pattern moved later in time by a fraction of a cycle; a negative amount moves it earlier.
Shift(pattern: Pattern, cycles: Text) -> Pattern
Pattern Shift(Pattern pattern, string cycles = "1/4")
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| cycles | Text | 1/4 | How far, as a number or fraction of a cycle, such as 1/4. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Slow
FunctionA pattern played slower: 2 spreads it over two cycles.
Slow(pattern: Pattern, factor: Text) -> Pattern
Pattern Slow(Pattern pattern, string factor = "2")
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| factor | Text | 2 | How many times slower. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Stack Patterns
FunctionPatterns played together: drums, bass and chords as one groove.
Stack(patterns: Pattern Array) -> Pattern
Pattern Stack(Pattern[] patterns)
Parameters
| name | type | default | description |
|---|---|---|---|
| patterns | Pattern Array | — | The layers. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Swing
FunctionSwing: in each beat-sized slice of the cycle, the off-beat is pushed late.
Swing -> Pattern
pattern: Pattern
amount: Text
subdivision: IntegerPattern Swing(
Pattern pattern,
string amount = "1/6",
int subdivision = 4)Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| amount | Text | 1/6 | How late, as a fraction of a slice: 1/6 puts the off-beat on the last triplet. |
| subdivision | Integer | 4 | Slices a cycle: 4 swings the eighths of a bar of 4/4. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Pattern To Music
FunctionSome cycles of a pattern as music, for the Euterpea nodes, Render Music and Play Part.
ToMusic -> Music
pattern: Pattern
cycles: Integer
cycleLength: TextMusic ToMusic(
Pattern pattern,
int cycles = 4,
string cycleLength = "1")Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| cycles | Integer | 4 | How many cycles. |
| cycleLength | Text | 1 | How long a cycle lasts, in whole notes: 1 is a bar of 4/4. |
Returns
| Music | Music |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music
Transpose Pattern
FunctionEvery note of a pattern moved by some semitones; drums stay.
Transpose(pattern: Pattern, semitones: Integer) -> Pattern
Pattern Transpose(Pattern pattern, int semitones = 12)
Parameters
| name | type | default | description |
|---|---|---|---|
| pattern | Pattern | — | The pattern. |
| semitones | Integer | 12 | How far; 12 is an octave. |
Returns
| Pattern | Pattern |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Patterns
- Package
- Music