Add documentation for ?n in mini-notation
This commit is contained in:
parent
142160d79a
commit
591c3fe08f
1 changed files with 5 additions and 1 deletions
|
|
@ -170,10 +170,14 @@ Using "!" we can repeat without speeding up:
|
|||
|
||||
## Randomness
|
||||
|
||||
Events with a "?" placed after them will have a 50% chance of playing:
|
||||
Events with a "?" placed after them will have a 50% chance of being removed from the pattern:
|
||||
|
||||
<MiniRepl client:idle tune={`note("[g3,b3,e4]*8?")`} punchcard />
|
||||
|
||||
Adding a number between 0 and 1 after the "?" will affect the likelihood of the event being removed. For example, events with "?0.1" placed after them will have a 10% chance of being removed:
|
||||
|
||||
<MiniRepl client:idle tune={`note("[g3,b3,e4]*8?0.1")`} punchcard />
|
||||
|
||||
Events separated by a "|" will be chosen from at random:
|
||||
|
||||
<MiniRepl client:idle tune={`note("[g3,b3,e4] | [a3,c3,e4] | [b3,d3,f#4]")`} punchcard />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue