Divooka Reference

Pattern

26 nodes

On this page 26

Arpeggiate

Function

Every chord - notes that start and end together - played one note after another across its own time, as Strudel's arp.

Signature
Arpeggiate(Pattern: Pattern, mode: Arpeggio Mode) -> Pattern
Pattern Arpeggiate(
    Pattern Pattern,
    ArpeggioMode mode = ArpeggioMode.Up)

Parameters

nametypedefaultdescription
PatternPattern—
modeArpeggio ModeUp

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Degrade

Function

Steps dropped at random with a probability, the same steps every time for the same seed, as degradeBy.

Signature
Degrade -> Pattern
    Pattern: Pattern
    probability: Number
    seed: Integer
Pattern Degrade(
    Pattern Pattern,
    double probability = 0.5,
    int seed = 0)

Parameters

nametypedefaultdescription
PatternPattern—
probabilityNumber0.5
seedInteger0

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Equals

Function

This node carries no documentation.

Overload 1 of 2

Signature
Equals(Pattern: Pattern, obj: Any) -> Truth
bool Equals(Pattern Pattern, object obj)

Parameters

nametypedefaultdescription
PatternPattern—
objAny—

Returns

resultTruth

Overload 2 of 2

Signature
Equals(Pattern: Pattern, other: Pattern) -> Truth
bool Equals(Pattern Pattern, Pattern other)

Parameters

nametypedefaultdescription
PatternPattern—
otherPattern—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Every

Function

Every Nth cycle - the first, then n later - Instead plays in its place, as every with a whole pattern for the function.

Signature
Every(Pattern: Pattern, n: Integer, instead: Pattern) -> Pattern
Pattern Every(Pattern Pattern, int n, Pattern instead)

Parameters

nametypedefaultdescription
PatternPattern—
nInteger—
insteadPattern—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Fast

Function

The pattern played Factor times in each cycle.

Signature
Fast(Pattern: Pattern, factor: Duration) -> Pattern
Pattern Fast(Pattern Pattern, Duration factor)

Parameters

nametypedefaultdescription
PatternPattern—
factorDuration—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Get Hash Code

Function

This node carries no documentation.

Signature
GetHashCode(Pattern: Pattern) -> Integer
int GetHashCode(Pattern Pattern)

Parameters

nametypedefaultdescription
PatternPattern—

Returns

resultInteger
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Iter

Function

Each cycle starts a further 1/N of the way into the pattern, as iter: four steps walk round one place a cycle.

Signature
Iter(Pattern: Pattern, n: Integer) -> Pattern
Pattern Iter(Pattern Pattern, int n)

Parameters

nametypedefaultdescription
PatternPattern—
nInteger—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Off

Function

The pattern with a copy of itself laid over it, Time cycles later and moved by Semitones, as off: an echo a fifth up, a canon.

Signature
Off -> Pattern
    Pattern: Pattern
    time: Duration
    semitones: Integer
Pattern Off(Pattern Pattern, Duration time, int semitones = 0)

Parameters

nametypedefaultdescription
PatternPattern—
timeDuration—
semitonesInteger0

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Palindrome

Function

Forwards one cycle and backwards the next, as palindrome.

Signature
Palindrome(Pattern: Pattern) -> Pattern
Pattern Palindrome(Pattern Pattern)

Parameters

nametypedefaultdescription
PatternPattern—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Ply

Function

Every step played Times times in its own time, as ply.

Signature
Ply(Pattern: Pattern, times: Integer) -> Pattern
Pattern Ply(Pattern Pattern, int times)

Parameters

nametypedefaultdescription
PatternPattern—
timesInteger—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Query

Function

The steps that start in [from, to), in cycles, in time order.

Signature
Query -> ImmutableArray<Pattern Event>
    Pattern: Pattern
    from: Duration
    to: Duration
ImmutableArray<PatternEvent> Query(
    Pattern Pattern,
    Duration from,
    Duration to)

Parameters

nametypedefaultdescription
PatternPattern—
fromDuration—
toDuration—

Returns

resultImmutableArray<Pattern Event>
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Reverse

Function

Each cycle played backwards, as TidalCycles' rev: a step that started a quarter of the way in ends a quarter of the way from the end.

Signature
Reverse(Pattern: Pattern) -> Pattern
Pattern Reverse(Pattern Pattern)

Parameters

nametypedefaultdescription
PatternPattern—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Scale

Function

The pattern's notes read as degrees of a scale from Tonic: 0 is the tonic, 1 the next degree, 7 the octave in a seven-note scale - Strudel's n("0 2 4").scale("C:major"), so a pattern of numbers becomes a tune in any key. Drums are left alone.

Signature
Scale -> Pattern
    Pattern: Pattern
    tonic: Integer
    mode: Scale Mode
Pattern Scale(Pattern Pattern, int tonic, ScaleMode mode)

Parameters

nametypedefaultdescription
PatternPattern—
tonicInteger—
modeScale Mode—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Shift

Function

The pattern moved later by some cycles - earlier for a negative amount - as ~>.

Signature
Shift(Pattern: Pattern, cycles: Duration) -> Pattern
Pattern Shift(Pattern Pattern, Duration cycles)

Parameters

nametypedefaultdescription
PatternPattern—
cyclesDuration—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Slow

Function

The pattern spread over Factor cycles.

Signature
Slow(Pattern: Pattern, factor: Duration) -> Pattern
Pattern Slow(Pattern Pattern, Duration factor)

Parameters

nametypedefaultdescription
PatternPattern—
factorDuration—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Swing

Function

Swing: in every 1/Subdivision of a cycle, a step in the second half is pushed later by Amount of the subdivision, as swingBy.

Signature
Swing -> Pattern
    Pattern: Pattern
    amount: Duration
    subdivision: Integer
Pattern Swing(
    Pattern Pattern,
    Duration amount,
    int subdivision = 4)

Parameters

nametypedefaultdescription
PatternPattern—
amountDuration—
subdivisionInteger4

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

To Music

Function

The first Cycles cycles as music, a cycle lasting Cycle Length - a whole note, one bar of 4/4, unless said otherwise. Drums are marked as percussion.

Signature
ToMusic -> Music
    Pattern: Pattern
    cycles: Integer
    cycleLength: Optional Duration
Music ToMusic(
    Pattern Pattern,
    int cycles = 1,
    Duration? cycleLength)

Parameters

nametypedefaultdescription
PatternPattern—
cyclesInteger1
cycleLengthOptional Duration—

Returns

resultMusic
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

To String

Function

The pattern as notation.

Signature
ToString(Pattern: Pattern) -> Text
string ToString(Pattern Pattern)

Parameters

nametypedefaultdescription
PatternPattern—

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Transpose

Function

Every note moved by some semitones; drums stay where they are.

Signature
Transpose(Pattern: Pattern, semitones: Integer) -> Pattern
Pattern Transpose(Pattern Pattern, int semitones)

Parameters

nametypedefaultdescription
PatternPattern—
semitonesInteger—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Alternate

Function

Patterns played one a cycle in turn.

Signature
Alternate(patterns: IEnumerable<Pattern>) -> Pattern
Pattern Alternate(IEnumerable<Pattern> patterns)

Parameters

nametypedefaultdescription
patternsIEnumerable<Pattern>—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Euclid

Function

A step spread over some steps by Euclid's algorithm, turned left by Rotation, as (3,8,2) in the notation.

Signature
Euclid -> Pattern
    step: Pattern
    hits: Integer
    steps: Integer
    rotation: Integer
Pattern Euclid(
    Pattern step,
    int hits,
    int steps,
    int rotation = 0)

Parameters

nametypedefaultdescription
stepPattern—
hitsInteger—
stepsInteger—
rotationInteger0

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Op Equality

Function

This node carries no documentation.

Signature
op_Equality(left: Pattern, right: Pattern) -> Truth
bool op_Equality(Pattern left, Pattern right)

Parameters

nametypedefaultdescription
leftPattern—
rightPattern—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Op Inequality

Function

This node carries no documentation.

Signature
op_Inequality(left: Pattern, right: Pattern) -> Truth
bool op_Inequality(Pattern left, Pattern right)

Parameters

nametypedefaultdescription
leftPattern—
rightPattern—

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Parse

Function

Reads a pattern written in mini-notation.

Signature
Parse(text: Text) -> Pattern
Pattern Parse(string text)

Parameters

nametypedefaultdescription
textText—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Sequence

Function

Patterns sharing each cycle in turn, one step each.

Signature
Sequence(patterns: IEnumerable<Pattern>) -> Pattern
Pattern Sequence(IEnumerable<Pattern> patterns)

Parameters

nametypedefaultdescription
patternsIEnumerable<Pattern>—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music

Stack

Function

Patterns played together.

Signature
Stack(patterns: IEnumerable<Pattern>) -> Pattern
Pattern Stack(IEnumerable<Pattern> patterns)

Parameters

nametypedefaultdescription
patternsIEnumerable<Pattern>—

Returns

resultPattern
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Pattern
Package
Music