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
638 stars 109 forks source link

pedal function #292

Open felixroos opened 1 year ago

felixroos commented 1 year ago

https://strudel.tidalcycles.org/?PsM_BuH_L5A4

maybe also rename to hold..

felixroos commented 1 year ago

also good for strumming: https://strudel.tidalcycles.org/?QZtGq9xNCjgK

felixroos commented 1 year ago

todo fix:

sequence(pure(1),silence).pedal(pure(1)).queryArc(0.5,1) > Array [] "you could fix it by querying the pedals with the whole of the hap to be sure of finding everything being sure to throw any events away that don't intersect with the original query"

yaxu commented 1 year ago

It'd be good to find three related names for the different behaviours:

Ideas for the first two:

For the last one I was thinking maybe expand/grow, but the original haps could also be made smaller.. so maybe

Or as it's related to struct

Or we could also name the three variants together

These are really new alignment functions, so we can add them to the operators, making add.fill etc or whatever we call them.

felixroos commented 1 year ago

I like head / tail, maybe also fillRight / fillLeft which is more explicit

yaxu commented 1 year ago

I guess head implies losing the tail. fillRight / fillLeft is good although we've moved away from implying that time goes from left to right, which is quite nice..

Maybe just onset, offset and fill works?

Or more radically, on and off, renaming current off to offset?

felixroos commented 1 year ago

we've moved away from implying that time goes from left to right, which is quite nice..

makes sense, maybe headFill, tailFill ? Or prolong and prelong ?

Maybe just onset, offset and fill works?

To me, onset and offset sound too simple compared to what this is doing.

yaxu commented 1 year ago

Although actually I'm not sure how this should work. My guess:

yaxu commented 1 year ago

To me, onset and offset sound too simple compared to what this is doing.

I was thinking that .offset() applies a pattern of offsets?

felixroos commented 1 year ago

maybe it helps (or futher complicates) to include the versions of the function that use the other sides of the timespans:

maybe headCut and tailCut are a bit brutal...

yaxu commented 1 year ago

Heh, the right metaphor must be out there somewhere..