adamrenklint / qwak

Definition and parser for qwak, a simple and expressive minimal text syntax for programming step-based web audio event sequences
https://www.npmjs.com/package/qwak
Other
10 stars 2 forks source link

Probability-based patterns and arrangements #11

Closed adamrenklint closed 8 years ago

adamrenklint commented 8 years ago

Would be really cool to be able to arrange patterns into songs based on probability. Maybe the result is precompiled by qwak, trngl would recompile it on every loop fold. Or maybe this is a task for trngl itself, although it would mean substantial changes to qwak, as the sequence timed solid.

// 30% chance to play "a", 70% chance to play "s"
/1=q w [\30a \70s] k

// jump points with probability: 70% chance to jump to beginning, 30% chance to repeat second part
// pseudo syntax is shit, but the idea is cool
/2=\$1A S D F \$2F D S G\70>1\30>2

// arrange song
???
screen shot 2015-12-17 at 11 15 26