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

example conversion to es6 and microbundle workflow #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

konsumer
Copy link

This is an example PR for converting 1 module to ES6/microbundle workflow, ready to be published on npm (after you make a @web-audio-components org.) It addresses #1 but I am happy to do this for all your components, if you are interested (I am making a thing that uses webaudio context, and this would make it easier for my users, too.)

@konsumer
Copy link
Author

konsumer commented Jul 16, 2021

One thing to note: interpolate-color also isn't published on npm, so this may need a bit of other work to get the whole thing published.

Another thing I might add is a plain CDN-only HTML file for example, so users can see how to easily use it without a bundler or anything else. I'd be happy to add this, if you like this direction. Additionally, adding the example to the github-page will give you a nice linkable demo where users can view the source, and see how it was made (CDN and no bundler makes this easier to read.)

@konsumer
Copy link
Author

konsumer commented Jul 16, 2021

I think also my linter auto-formatted index.js automatically when I saved (standardjs format.) If you don't like this style, I can use any linter-rules you prefer, or disable auto-lint-fixing in any other PRs.

@konsumer
Copy link
Author

I just found this which is a much larger & more complete move from components. Should I work on trying to get this moved over there?

@jsantell
Copy link
Member

Thanks for this! Broadly, this is an old project, but happy to see it's still useful; some thoughts:

  • +1 on ESM-ifying everything
  • the web-audio-components spec/schema isn't updated or in use, I wonder if AudioWorklets or (possibly inactive?) WAM would be a better wrapper for this. I haven't thought about this problem in a bit (though have recently wished these old components were modern and easy to use in ESM!), but wondering what the state of custom web audio nodes are in 2021. Ideally, we can target some standard interoperability without too much "custom" "Web Audio Component" specs. Also, we can use a more full-fledged package manager now, rather than "Component".
  • Web Audio API has changed a lot, not sure if some of these modules even still run..
  • I like the idea of synthesizing the Github org with an npm org; if you have the bandwidth for modernizing some of these components, let's talk and see what's needed!

I'll pull down these changes tonight and hope to get this merged soon, thanks for reaching out!

@jsantell
Copy link
Member

I just found this which is a much larger & more complete move from components. Should I work on trying to get this moved over there?

Component never attained any sort of popularity, and has been deprecated for years -- I think any future WAC's should be distributed via npm, and any current Component dependencies replaced with npm equivs, and while the name (and logo!) for WAC is based off of the defunct package manager, I don't think there's any reason to continue that relationship.

@konsumer
Copy link
Author

konsumer commented Jul 21, 2021

  • I agree on all the npm/esm stuff. Nice!
  • Maybe I can just drop the @web-audio-components npm stuff. As I was working through porting it, I found some other problems (a long chain of component-based deps) and it's currently not quite functional, anyway.
  • I ended up making this which addresses changes to Web Audio API & adds some pretty color-palette options, and a couple others kinda like it: bargraph and oscilloscope
  • If you'd like, maybe you could just join my crossaudio project, and make whatever stuff you'd like. It's still in early stages, but the idea is one simple function to define audio-synth in server-side or browser-side, and a CLI tool & react lib to wrap it. It's all in a monorepo for faster tooling, cross-deps, and publishing
  • Alternately, I can give you control of the @web-audio-components npm org, and you can publish stuff there, which I will probably use

I'm still working on crossaudio, so it's all in a kinda half-working state, but should have it put all together, soon.

@konsumer
Copy link
Author

I've got some demos if you want to see how I used ideas from this project to make spectrograph and others.

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.

2 participants