Compare commits

...

8 Commits

Author SHA1 Message Date
Alex McLean e9188f07e0 Merge branch 'main' into initial-random-value 2025-10-27 17:24:07 +01:00
froos 0fef7b4b1f Merge branch 'main' into initial-random-value 2025-10-20 20:40:54 +02:00
Felix Roos 987fb5903c Merge branch 'main' into initial-random-value 2025-07-06 23:48:00 +02:00
alex 998b37038e snapshot 2025-02-23 11:02:56 +00:00
alex 92c4cff606 format 2025-02-23 10:57:45 +00:00
alex 252416b056 return 0.5 for random value at cycle 0, rather than 0 2025-02-23 10:55:37 +00:00
alex 51d9c8c214 add missing import 2025-02-22 17:22:23 +00:00
alex b62ff5e115 allow wchooseCycles probabilities to be patterned 2025-02-22 17:19:21 +00:00
3 changed files with 587 additions and 588 deletions
+2 -1
View File
@@ -201,7 +201,8 @@ const timeToIntSeed = (x) => xorwise(Math.trunc(_frac(x / 300) * 536870912));
const intSeedToRand = (x) => (x % 536870912) / 536870912;
const timeToRand = (x) => Math.abs(intSeedToRand(timeToIntSeed(x)));
// Set first random value to be 0.5, otherwise it would be 0. https://github.com/tidalcycles/strudel/issues/1293
const timeToRand = (x) => (x === 0 ? 0.5 : Math.abs(intSeedToRand(timeToIntSeed(x))));
const timeToRandsPrime = (seed, n) => {
const result = [];
+16 -16
View File
@@ -1053,10 +1053,10 @@ exports[`runs examples > example "begin" example index 0 1`] = `
exports[`runs examples > example "berlin" example index 0 1`] = `
[
"[ 0/1 → 1/16 | note:D3 ]",
"[ 1/16 → 1/8 | note:E3 ]",
"[ 1/8 → 3/16 | note:F3 ]",
"[ 3/16 → 1/4 | note:G3 ]",
"[ 0/1 → 1/16 | note:A3 ]",
"[ 1/16 → 1/8 | note:Bb3 ]",
"[ 1/8 → 3/16 | note:C4 ]",
"[ 3/16 → 1/4 | note:D4 ]",
"[ 1/4 → 5/16 | note:A3 ]",
"[ 5/16 → 3/8 | note:C4 ]",
"[ 3/8 → 7/16 | note:D4 ]",
@@ -7150,18 +7150,18 @@ exports[`runs examples > example "penv" example index 0 1`] = `
exports[`runs examples > example "perlin" example index 0 1`] = `
[
"[ 0/1 → 1/8 | s:hh cutoff:500 ]",
"[ 0/1 → 1/4 | s:bd cutoff:500 ]",
"[ 1/8 → 1/4 | s:hh cutoff:562.5486401770559 ]",
"[ 1/4 → 3/8 | s:hh cutoff:903.3554895067937 ]",
"[ 1/4 → 1/2 | s:bd cutoff:903.3554895067937 ]",
"[ 3/8 → 1/2 | s:hh cutoff:1572.364329119182 ]",
"[ 1/2 → 5/8 | s:hh cutoff:2448.2831191271544 ]",
"[ 1/2 → 3/4 | s:bd cutoff:2448.2831191271544 ]",
"[ 5/8 → 3/4 | s:hh cutoff:3324.2019091351267 ]",
"[ 3/4 → 7/8 | s:hh cutoff:3993.210748747515 ]",
"[ 3/4 → 1/1 | s:bd cutoff:3993.210748747515 ]",
"[ 7/8 → 1/1 | s:hh cutoff:4334.017598077253 ]",
"[ 0/1 → 1/8 | s:hh cutoff:4250 ]",
"[ 0/1 → 1/4 | s:bd cutoff:4250 ]",
"[ 1/8 → 1/4 | s:hh cutoff:4252.352717325493 ]",
"[ 1/4 → 3/8 | s:hh cutoff:4265.171895756794 ]",
"[ 1/4 → 1/2 | s:bd cutoff:4265.171895756794 ]",
"[ 3/8 → 1/2 | s:hh cutoff:4290.3361308769945 ]",
"[ 1/2 → 5/8 | s:hh cutoff:4323.283119127154 ]",
"[ 1/2 → 3/4 | s:bd cutoff:4323.283119127154 ]",
"[ 5/8 → 3/4 | s:hh cutoff:4356.230107377314 ]",
"[ 3/4 → 7/8 | s:hh cutoff:4381.394342497515 ]",
"[ 3/4 → 1/1 | s:bd cutoff:4381.394342497515 ]",
"[ 7/8 → 1/1 | s:hh cutoff:4394.213520928815 ]",
"[ 1/1 → 9/8 | s:hh cutoff:4396.566238254309 ]",
"[ 1/1 → 5/4 | s:bd cutoff:4396.566238254309 ]",
"[ 9/8 → 5/4 | s:hh cutoff:4449.536839055554 ]",
File diff suppressed because it is too large Load Diff