Added random array generator and force eval using Shift+Ctrl+Enter

This commit is contained in:
2023-09-08 17:18:30 +03:00
parent d2161eb5bc
commit 61096a5510
5 changed files with 40 additions and 8 deletions

View File

@ -98,7 +98,7 @@ mod([1,.5,.25].beat()) :: snd('sine')
- <ic>random(index: number)</ic>: pick a random element in the given list.
- <ic>rand(index: number)</ic>: shorter alias for the same method.
- <ic>pick()</ic>: pick a random element in the list.
- <ic>gen(min,max,length)</ic>: generate a list of random numbers between _min_ and _max_ with a given _length_.
${makeExample(
"Sipping some gasoline at the robot bar",
@ -114,6 +114,14 @@ mod([.5, 1].random() / 2) :: snd(
true
)}
${makeExample(
"Generate a list of random numbers",
`
mod(0.5) && sound('arp').freq([].gen(300,600,10).div(3)).out()
`,
true
)}
- <ic>degrade(amount: number)</ic>: removes _n_% of the list elements. Lists can be degraded as long as one element remains. The amount of degradation is given as a percentage.
${makeExample(