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
642 stars 111 forks source link

Cps hack #1001

Open eefano opened 6 months ago

eefano commented 6 months ago

Little hack, you can change the global inner clock with the cps() control function. Very dangerous but very satisfying. You can bring the cps to 0 and stop the playback, also. Negative numbers work in theory (the pianoroll goes in reverse) but no correct audio is produced.

Practical example:

https://youtu.be/No1dQWJKQNU

felixroos commented 6 months ago

I don't think this is a hack.. this partly fixes https://github.com/tidalcycles/strudel/issues/51

You could also use this like s("bd hh").cps(saw.slow(4).range(.1,1)) which looks less hacky. To make this complete, I'd say 2 things are missing:

When https://github.com/tidalcycles/strudel/pull/1004 is merged, this one probably needs to be updated to use this.setCps..

yaxu commented 6 months ago

Yes tidal has this functionality too.

Based on my experience with tidal, there could be problems when the cps changes part way through a frame. This can result in events getting doubled up or missed.