strudel icon indicating copy to clipboard operation
strudel copied to clipboard

pedal function

Open felixroos opened this issue 2 years ago • 10 comments

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

maybe also rename to hold..

felixroos avatar Dec 09 '22 21:12 felixroos

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

felixroos avatar Dec 09 '22 22:12 felixroos

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"

felixroos avatar Dec 10 '22 12:12 felixroos

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

  • extend offset (current 'pedal')
  • extend onset
  • extend both

Ideas for the first two:

  • fore/aft
  • head/tail

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

  • fill
  • ~~shape~~ already taken by waveshaping..

Or as it's related to struct

  • structFill
  • ...

Or we could also name the three variants together

  • fillOn
  • fillOff
  • fill

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

yaxu avatar Dec 11 '22 16:12 yaxu

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

felixroos avatar Dec 11 '22 18:12 felixroos

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?

yaxu avatar Dec 11 '22 18:12 yaxu

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.

felixroos avatar Dec 11 '22 18:12 felixroos

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

  • "a ~".pedal("1") -> "a"
  • "a ~".pedal("1") -> "a"
  • "a".pedal("1 ~") -> "a ~" ?
  • "a@3 ~".pedal("~ 1") -> "a".mask("~ 1") - e.g. a fragment with its first half missing?

yaxu avatar Dec 11 '22 18:12 yaxu

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

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

yaxu avatar Dec 11 '22 18:12 yaxu

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

  • quantize offsets to end "a ~ ~ ~".x("1 1") -> a ~ aka tailFill (pedal)
  • quantize offsets to start "~ a@2 ~".x("1 1") -> ~ a ~ ~ aka tailCut
  • quantize onsets to end "~ a@2 ~".x("1 1") -> ~ ~ a ~ aka headCut
  • quantize onsets to start "~ a ~ ~".x("1 1") -> a ~ aka headFill

maybe headCut and tailCut are a bit brutal...

felixroos avatar Dec 11 '22 18:12 felixroos

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

yaxu avatar Dec 11 '22 18:12 yaxu