yea
usage
import { amen, pick, seq } from 'https://deno.land/x/yea@v0.1.1/mod.ts'
amen((index) => {
return {
sliceIndex: index,
length: seq([0.0, 1, 0.5, 1]),
loop: {
length: seq([1, 1 / 2, 1 / 3, 1 / 4]),
prob: 1,
},
swap: {
index: pick([
Math.floor(Math.random() * 16),
Math.abs(index + (Math.floor(Math.random() * 32) - 16)),
]),
prob: 0.4,
},
hop: {
index: Math.abs(index + (Math.floor(Math.random() * 32) - 16)),
prob: 0.3,
},
}
})