Skip to content

A collection of patterns for generating streams/sequences based on SuperCollider patterns.

Notifications You must be signed in to change notification settings

scazan/pattern-streams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pattern-streams

A collection of patterns for generating streams/sequences inspired by SuperCollider patterns.

An example with nested patterns

// I'm omitting the repetitions on these but they could be passed as the second argument
const sequence = Pseq([Prand([1,2,3]), Pseq([90,91,92, Prand([11,12,13])]), 20]);

let intervalId = setInterval(() => console.log(sequence.next()), 1000);
// to stop: clearInterval(intervalId);

Using the markov chain pattern

// the signature of Pmarkov
// Pmarkov(seed: any[], order: number, initialState: any[])

// example
const sequence = Pmarkov([1,2,3,2,4,1,2], 2, [1,2]);

let intervalId = setInterval(() => console.log(sequence.next()), 1000);
// to stop: clearInterval(intervalId);

About

A collection of patterns for generating streams/sequences based on SuperCollider patterns.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published