Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"wet" / "applyBy" function #1100

Open
felixroos opened this issue May 15, 2024 · 0 comments
Open

"wet" / "applyBy" function #1100

felixroos opened this issue May 15, 2024 · 0 comments
Labels
function new pattern function

Comments

@felixroos
Copy link
Collaborator

felixroos commented May 15, 2024

mixes in a modified version of the pattern in dry/wet fashion

let wetfade = (d) => (d < 0.5 ? 1 : 1 - (d - 0.5) / 0.5);

let wet = register('wet', (wetAmount, fn, pat) => pat.layer(
  x=>x.gain(wetfade(wetAmount)),
  x=>x.gain(wetfade(1-wetAmount)).apply(fn),
))

s("hh*8").wet("<0 .25 .5 .75 1>", set(speed(.5)))

https://strudel.cc/?jxkluxieHw21

could be further optimized by returning silence in one branch for wetAmount 0 and 1

edit: maybe applyBy would also be a good name

@felixroos felixroos added the function new pattern function label May 15, 2024
@felixroos felixroos changed the title "wet" function "wet" / "applyBy" function May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
function new pattern function
Projects
None yet
Development

No branches or pull requests

1 participant