-
Notifications
You must be signed in to change notification settings - Fork 641
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
Can't load instruments from external sites. #9
Comments
That's a great point, and yes, I believe it can! A few people were running into this issue, so definitely a worthwhile change that shouldn't take long to make. I'll put this on the TODO list for the next update. |
Great, thanks! |
The latest release gives the option of XHR or SCRIPT tag. XHR allows for onProgress event to be fired, and the percentage of download left to be calculated (cross domain possible but only with CORS enabled server/browser combo). SCRIPT allows for file:// access and other cross-domain queries. |
w00t! |
Before I dig in further, did you test this in Firefox? (My player seems to have stopped working in FF after this change.) |
Thanks for reporting. It should work now! |
Thanks for the fix. Verified that this works. It seems that noteOff on HTML5 Audio Tag has the same bug that the WebAudio On Fri, Jan 25, 2013 at 6:34 PM, Michael Deal notifications@github.comwrote:
Mohit Muthanna [mohit (at) muthanna (uhuh) com] |
Currently noteOff for Audio Tag looks like this: root.noteOff = function (channel, note, delay) { }; At one point it looked more like this; root.noteOff = function (channel, note, delay) { (or something like that) but, that really didn't sound great without the linear ramp down... it sounds like you're saying there is an issue with the noteOn working again, after noteOff? |
It sounds like noteOff doesn't work when playing realtime. Here's what I mean: Go here: http://my.vexflow.com/playground.html And paste in the following VexTab:
Notice that Chrome correctly switches the note off, while firefox doesn't. If you set the instrument to Here's how I implement note/chord playing (it's CoffeeScript).
|
Right, so, what I was saying is the noteOff for HTML5 audio is currently an empty function, so that's why noteOff doesn't do anything. The reason for switching this off, was it was sounding pretty aweful without the linear ramping... I'll post some code for you in a few for you to hear what it sounds like. |
Ok, I've updated the made some slight tweaks and pushed the changes; Let me know what you think... might be better than nothing? |
Oops, sorry I missed the first part of your message (noteOff has empty implementation). Thanks for the tweaks. I'll patch in your changes and try. |
Instrument files are pretty big and better served via CDNs.
This is currently not possible because they are loaded via XMLHttpRequest which disallows cross-domain requests. Can this be changed to use the "script" tag?
Thanks!
The text was updated successfully, but these errors were encountered: