-
Notifications
You must be signed in to change notification settings - Fork 210
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
creating note from abc notation #44
Comments
Currently there's no support for abc notation. If you mean convert a note from, for example "c" to "C5", it should be easy to implement using What do you need this for? |
I'm trying to computationally parse an abc string it into an object, manipulate it (ie change tones, pitch and etc) using tonal and convert it back into a string. |
I've wrote the You can install it using npm. Hope it helps. |
Thanks for the reply! How can I use that module in the browser? |
You can use a tool that can convert from node modules to browser modules. I think the easiest one is browserify: http://browserify.org/ The other option is to use a tool like budo: https://github.com/mattdesl/budo. It's easier to get started, but after you will need to use browserify or something similar. Hope it helps. |
Thanks! I have Tonal running in the browser but now I'm not able to call functions from it in the console. Any tips? |
If you are using the including the file from the But abc-notation module is not included in the bundled file. So, to use it, you need to create a file like index.js with something like:
and then use browserify to create a browser compatible version (and load that file with a |
Thanks. As I mentioned I have it bundled using browserify and running in the browser. I just asking if its possible to call functions in the console. If so how? Thanks again! |
Yes, I don't know if I get you 😆 You can open a console using the browser's developer tools, and write |
It doesnt work for me. When I tried to call:
and I get this error:
|
If you use the tonal.min.js dist file, it works out of the box. If you are transpiling your own sources, you must export the tonal facade inside your code: Hope it helps! |
That works! Thanks for answering these general JS questions! Can I also ask how you recommend structuring the other vars and functions (that aren't in a class) to access in the same way? I tried using a closure but that didn't work. |
Are there any functions for creating a note from abc notation?
The text was updated successfully, but these errors were encountered: