Hi Leo, neat site!
I am having a hard time finding tutorials/demos online that show how to integrate Vexflow and MIDI.js.
Can you share your code for integrating the two or point me to any articles or other online resources that would be helpful?
Hello Leo, this seems great , thanx a lot!!
--
--
You received this message because you are subscribed to the Google
Groups "vexflow" group.
To post to this group, send email to vex...@googlegroups.com
To unsubscribe from this group, send email to
vexflow+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "vexflow" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vexflow/FgqJtMO3tGU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vexflow+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Leo, I'm also working on a site that allows the user to select their tempo - see http://scottonwriting.net/BachMachine/Compose.aspx?InstrumentId=0&bpm=90&Measures=264535362142 as an example - and I've found that the tempo doesn't align with reality when playing the score through MIDI.js (unless I'm misunderstanding something, which may be true, as I'm not a musician in the least).
For instance, on your site if I go to http://musicpaste.com/musicapp/edit_score/ and choose a tempo of 80 bpm that means each quarter note should be played for 0.75 seconds, correct? (60/80 = 0.75) That means the first 14 notes should take 10.5 seconds to play. But if I time the first 14 notes it takes under 8 seconds to play.
Is this a misunderstanding on my part of how tempo and time works, or is this a shortcoming of our code or how MIDI.js works or how accurate the JavaScript clock is or something else?
--
--
You received this message because you are subscribed to the Google
Groups "vexflow" group.
To post to this group, send email to vex...@googlegroups.com
To unsubscribe from this group, send email to
vexflow+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/vexflow?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "vexflow" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vexflow/FgqJtMO3tGU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vexflow+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Mon, Aug 25, 2014 at 6:23 PM, Scott Mitchell <scott.k....@gmail.com> wrote:
Leo, I'm also working on a site that allows the user to select their tempo - see http://scottonwriting.net/BachMachine/Compose.aspx?InstrumentId=0&bpm=90&Measures=264535362142 as an example - and I've found that the tempo doesn't align with reality when playing the score through MIDI.js (unless I'm misunderstanding something, which may be true, as I'm not a musician in the least).
It'll be amazingly useful for the community!Also, I see you do the MIDI and then transform to vexflow. Do you have something to transform vextab to midi and/or the other way?
For instance, on your site if I go to http://musicpaste.com/musicapp/edit_score/ and choose a tempo of 80 bpm that means each quarter note should be played for 0.75 seconds, correct? (60/80 = 0.75) That means the first 14 notes should take 10.5 seconds to play. But if I time the first 14 notes it takes under 8 seconds to play.
In my browser (chromium and firefox) works fine enough.Notice that the sound engines and the tempo calculations that MIDI.js does are completely dependent on the javascript engine and not on the library (that does it's best job). Tempo with MIDI.js is not perfect, just "good enough" in most cases.
It'll be amazingly useful for the community!Also, I see you do the MIDI and then transform to vexflow. Do you have something to transform vextab to midi and/or the other way?Leo, I don't think I understand your question. I don't generate MIDI and then the score off of that, rather I do each separately. In short, the set of all possible measures is stored in a big JavaScript array. The querystring parameters are examined to determine which measures to use and then it gets those measures and translates those into VexFlow commands to "draw" the score on screen.The MIDI playback in the browser is done via MIDI.js by using that same big array of all possible measures.You can download and save a MIDI file. That is done server-side with a C# MIDI library.
For instance, on your site if I go to http://musicpaste.com/musicapp/edit_score/ and choose a tempo of 80 bpm that means each quarter note should be played for 0.75 seconds, correct? (60/80 = 0.75) That means the first 14 notes should take 10.5 seconds to play. But if I time the first 14 notes it takes under 8 seconds to play.
In my browser (chromium and firefox) works fine enough.Notice that the sound engines and the tempo calculations that MIDI.js does are completely dependent on the javascript engine and not on the library (that does it's best job). Tempo with MIDI.js is not perfect, just "good enough" in most cases.
When you listen to the first 14 notes is it taking 10.5 seconds? I seem to always have it play faster than it should, and I use Chrome primarily, but I've noticed the same in other browsers, as well.