tidalcycles / strudel

Web-based environment for live coding algorithmic patterns, incorporating a faithful port of TidalCycles to JavaScript
https://strudel.cc/
GNU Affero General Public License v3.0
633 stars 108 forks source link

implement mainline tidal functions #31

Open felixroos opened 2 years ago

felixroos commented 2 years ago

There are many functions from tidal that have not landed yet.

Basics

Needs longer term work/thought

Low priority or won't implement

Concatenation

https://tidalcycles.org/docs/patternlib/tour/concatenation

Accumulation

Alteration

conditions

Time

Harmony & Melody

Think these are just implemented differently in strudel?

Transitions

these need block-based eval

Sampling

Randomness

Composition

bpow commented 2 years ago

randcat was implemented in 7fbd4527e

yaxu commented 2 years ago

I think 'inhabit' is

function inhabit(lookup, pat) {
    return pat.fmap(v => v in lookup ? lookup[v] : pure(silence))._squeezeJoin()
}
s(inhabit({a: "bd sd", b: "cp cp cp"}, "a b")).webdirt()

(I plan to do this while looking at #179)

tedthetrumpet commented 1 year ago

I know I asked about this already in another place and there is an answer of sorts, but: just to note that the Tidal function run is missing as well.

tedthetrumpet commented 1 year ago

slice is missing, and not listed as missing.

yaxu commented 1 year ago

Added hurry and press/pressBy in https://github.com/tidalcycles/strudel/pull/397

yaxu commented 1 year ago

@tedthetrumpet looks like run, slice and splice are implemented now

tedthetrumpet commented 1 year ago

Great, thanks!

jarmitage commented 10 months ago

smooth -> #561 ?

https://tidalcycles.org/docs/reference/oscillators/#smooth

geikha commented 9 months ago

note that rolled, rolledBy and rolledWith are missing

yaxu commented 7 months ago

Pruned list ready for 1.0

felixroos commented 7 months ago

pickF now here https://github.com/tidalcycles/strudel/pull/924 @yaxu just noticed after merging that pickF is listed under "Needs longer term work/thought"...

yaxu commented 2 weeks ago

Here is scramble:

const _rearrangeWith = (ipat, n, pat) => {
  const pats = [...Array(n).keys()].map((i) => pat.zoom(Fraction(i).div(n), Fraction(i+1).div(n)));
  return ipat.fmap(i => pats[i].repeatCycles(n)._fast(n)).innerJoin();
}

const scramble = register('scramble', (n,pat) => {
  return _rearrangeWith(_irand(n)._segment(n), n, pat);
})

shuffle also needed..