mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 21:48:27 +00:00
Change offset for "stateful random" streams
This would no longer match with Tidal (which uses 0.0001), but reduces the correlation among the the different random streams in the mini-notation's parsing of ? and |
This commit is contained in:
parent
0b00ad98e6
commit
f533e4a5d0
@ -28,7 +28,7 @@ const applyOptions = (parent) => (pat, i) => {
|
|||||||
case 'bjorklund':
|
case 'bjorklund':
|
||||||
return pat.euclid(operator.arguments_.pulse, operator.arguments_.step, operator.arguments_.rotation);
|
return pat.euclid(operator.arguments_.pulse, operator.arguments_.step, operator.arguments_.rotation);
|
||||||
case 'degradeBy':
|
case 'degradeBy':
|
||||||
return reify(pat)._degradeByWith(strudel.rand.early(0.0001 * _nextSeed()).segment(1), operator.arguments_.amount);
|
return reify(pat)._degradeByWith(strudel.rand.early(Math.PI * _nextSeed()).segment(1), operator.arguments_.amount);
|
||||||
// TODO: case 'fixed-step': "%"
|
// TODO: case 'fixed-step': "%"
|
||||||
}
|
}
|
||||||
console.warn(`operator "${operator.type_}" not implemented`);
|
console.warn(`operator "${operator.type_}" not implemented`);
|
||||||
@ -91,7 +91,7 @@ export function patternifyAST(ast) {
|
|||||||
return stack(...children);
|
return stack(...children);
|
||||||
}
|
}
|
||||||
if (alignment === 'r') {
|
if (alignment === 'r') {
|
||||||
return strudel.chooseInWith(strudel.rand.early(0.0001 * _nextSeed()).segment(1), children);
|
return strudel.chooseInWith(strudel.rand.early(Math.PI * _nextSeed()).segment(1), children);
|
||||||
}
|
}
|
||||||
const weightedChildren = ast.source_.some((child) => !!child.options_?.weight);
|
const weightedChildren = ast.source_.some((child) => !!child.options_?.weight);
|
||||||
if (!weightedChildren && alignment === 't') {
|
if (!weightedChildren && alignment === 't') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user