How to schedule? #213
-
Hello! Many thanks for maintaining this excellent library. It is clear, well documented and easy to use. I am trying to inject WebMidi in there. I have succeeded more or less, but wondered if I would get tighter MIDI events, by scheduling them in a similar way to the original code does with audio. I think the original code uses a scheduling list, which I believe WebMidi is capable of for notes. But I don't really understand how to do this when my relative reference is another timer, not
The code base I am working on his here Twotone The original author of this program has retired from this project and is unavailable, so I'm trying my best to understand how to add a Midi Out feature into a complicated system of callbacks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I'm not quite clear on what you are asking. One thing that is for sure is that WEBMIDI.js can connect to existing input and output ports but cannot create new ports. By the way, |
Beta Was this translation helpful? Give feedback.
-
You cannot reset This got me thinking though... perhaps this could be added to the library. It wouldn't be hard to implement what I wrote above into the lib so that |
Beta Was this translation helpful? Give feedback.
You cannot reset
performance.now()
. However, what you can do is save the offset between the moment you press "play" in your system andWebMidi.time
. Then, whenever you want to schedule a note, you just have to add this offset.This got me thinking though... perhaps this could be added to the library. It wouldn't be hard to implement what I wrote above into the lib so that
WebMidi.time
can be reset. I'll add that to my list of things to evaluate.