Feat: lots of things, preparing for live gig
This commit is contained in:
@@ -175,6 +175,20 @@ Classic Forth is deterministic. Cagire has built-in randomness:
|
||||
|
||||
These words take a quotation and execute it probabilistically.
|
||||
|
||||
## Periodic Execution
|
||||
|
||||
Execute a quotation on specific iterations:
|
||||
|
||||
```forth
|
||||
{ "snare" s . } 4 every ;; every 4th pattern iteration
|
||||
{ "hat" s . } 3 8 bjork ;; Euclidean: 3 hits across 8 step runs
|
||||
{ "hat" s . } 5 8 pbjork ;; Euclidean: 5 hits across 8 pattern iterations
|
||||
```
|
||||
|
||||
`every` checks the pattern iteration count. On iteration 0, 4, 8, 12... the quotation runs. On all other iterations it is skipped.
|
||||
|
||||
`bjork` and `pbjork` use Bjorklund's algorithm to distribute k hits as evenly as possible across n positions. `bjork` counts by step runs, `pbjork` counts by pattern iterations. Classic Euclidean rhythms: tresillo (3,8), cinquillo (5,8), son clave (5,16).
|
||||
|
||||
## Cycling
|
||||
|
||||
Cagire has built-in support for cycling through values. Push values onto the stack, then select one based on pattern state:
|
||||
|
||||
Reference in New Issue
Block a user