strudel/api.md
2022-05-01 15:40:54 +02:00

4.1 KiB

Classes

Pattern

Class representing a pattern.

Functions

pure(value)Pattern

A discrete value that repeats once per cycle:

stack(...items)Pattern

The given items are played at the same time at the same length:

slowcat(...items)Pattern

Concatenation: combines a list of patterns, switching between them successively, one per cycle:

synonyms: [cat](#cat)

slowcatPrime(...items)Pattern

Concatenation: combines a list of patterns, switching between them successively, one per cycle. Unlike slowcat, this version will skip cycles.

fastcat(...items)Pattern

Concatenation: as with [slowcat](#slowcat), but squashes a cycle from each pattern into one cycle

Synonyms: [seq](#seq), [sequence](#sequence)

cat()

See [slowcat](#slowcat)

timeCat(...items)Pattern

Like [fastcat](#fastcat), but where each step has a temporal weight:

sequence()

See [fastcat](#fastcat)

seq()

See [fastcat](#fastcat)

pure(value) ⇒ Pattern

A discrete value that repeats once per cycle:

Kind: global function

Param Type Description
value any

The value to repeat

Example

pure('e4')

stack(...items) ⇒ Pattern

The given items are played at the same time at the same length:

Kind: global function

Param Type Description
...items any

The items to stack

Example

stack(g3, b3, [e4, d4])

slowcat(...items) ⇒ Pattern

Concatenation: combines a list of patterns, switching between them successively, one per cycle:

synonyms: [cat](#cat)

Kind: global function

Param Type Description
...items any

The items to concatenate

Example

slowcat(e5, b4, [d5, c5])

slowcatPrime(...items) ⇒ Pattern

Concatenation: combines a list of patterns, switching between them successively, one per cycle. Unlike slowcat, this version will skip cycles.

Kind: global function

Param Type Description
...items any

The items to concatenate

fastcat(...items) ⇒ Pattern

Concatenation: as with [slowcat](#slowcat), but squashes a cycle from each pattern into one cycle

Synonyms: [seq](#seq), [sequence](#sequence)

Kind: global function

Param Type Description
...items any

The items to concatenate

Example

fastcat(e5, b4, [d5, c5])
sequence(e5, b4, [d5, c5])
seq(e5, b4, [d5, c5])

cat()

See [slowcat](#slowcat)

Kind: global function

timeCat(...items) ⇒ Pattern

Like [fastcat](#fastcat), but where each step has a temporal weight:

Kind: global function

Param Type Description
...items Array

The items to concatenate

Example

timeCat([3,e3],[1, g3])

sequence()

See [fastcat](#fastcat)

Kind: global function

seq()

See [fastcat](#fastcat)

Kind: global function