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

Webaudio rewrite #138

Merged
merged 17 commits into from Jun 18, 2022
Merged

Webaudio rewrite #138

merged 17 commits into from Jun 18, 2022

Conversation

felixroos
Copy link
Collaborator

based on this experiment I rewrote the webaudio package, with a simpler yet already more powerful api.

Changes:

  • replaced wave with s (use waveform)
  • replace adsr with attack, decay, sustain, release, now patternified
  • replaced filter with cutoff / hcutoff / bandf
  • added support for resonance / hresonance / bandq
  • added support for pan, so jux(rev) now also works :)
  • now ignoring velocity, using gain param instead

I also migrated the existing 3 web audio api tunes to the new api

finally, I also added a little trick to the params: it is now possible to wrap a primitive pattern by calling the param method without arguments:

n("0 1 2 3".add(2)).s('sawtooth') === "0 1 2 3".add(2).n().s('sawtooth')

this allows writing patterns in a more flat manner if desired.

@felixroos felixroos merged commit ad05336 into main Jun 18, 2022
@felixroos felixroos deleted the webaudio-rewrite branch June 18, 2022 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant