-
Notifications
You must be signed in to change notification settings - Fork 85
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
Make it more modular! #7
Comments
Hi Simon—thanks for looking into this! You’re right, making it more modular will go a long way. It’s funny you mention the editor; some bones for it are in the code right now but I’ve not finished and committed the real deal yet. I’m just adding in a very clumsy simple editor ASAP and will likely replace it down the road with a stripped down version of CodeMirror or similar. (Right now adding CodeMirror wholesale just feels so bulky but I’m sure I’ll get over that in time.) I’ll probably have the basic editor live by tomorrow night. But I digress! I think you’re on the money. Once I get this basic editor in (and a few other small tricks) I’ll take a much closer look at how bits ought to be separated between the main |
I second that -- I actually tried to get this project into my app as a library with browserify, before I realized how fresh the code really is. :p Awesome stuff, @stewdio, truly. I'm working on a browser-based music composition app of my own, and this could play a big part. Thanks for sharing, and please, keep it coming! |
Ok. I’ve got that simple editor in and I’ve started to better separate the demo example code from Beep’s core. More modularization is in the roadmap. Just takes some time 😉 |
Just committed the latest tweaks. The separation of concerns is a bit cleaner now—including SVG stacks even. Check out the |
👍 |
Hey.
First off, amazing project. Very fun. :)
However, might I suggest taking a look at turning the project into a CommonJS module to make it easy to integrate with other projects? I was looking in to using Beep in a small thing I've been thinking about doing for a while.
Seems like it should be pretty simple to do by just something like this to every file:
It seems though like "main file":
beep.js
is hardcoded to expect an editor and stuff like that. Maybe that code should be moved toapp.js
so that Beep could be as "pure" as possible? IMObeep.js
could be thetrigger
/instrument
/voice
registry only, as well as act as a module that exposes the other modules to third party code.I'm thinking something like:
I wrote this straight here on GitHub and have only spent 15 minutes or so browsing the code so far. So this might (probably is) completely broken and misguided. However, it'd be very nice to have it be a clean module to make it super easy to integrate in other stuff! :)
Should you have no idea what I'm talking about: take a peek at Browserify. It's a very nice way of composing JavaScript modules!
The text was updated successfully, but these errors were encountered: