-
Hello, I am having some trouble with the setPitchBend command. It throws an error "Uncaught TypeError: MidiOut2.channels[1].setPitchBend is not a function ". If I replace setPitchBend with something else it works as expected, so it appears to be specific for this command. this is the code that gives the error: PitchSlider.oninput = function() { If I replace it with: PitchSlider.oninput = function() { Then there is no error and a MIDI note is sent upon adjusting the slider. So I can't figure out what I'm doing wrong. Any help would be much appreciated, thanks in advance! Chiel |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
TLDR: Full explanation: |
Beta Was this translation helpful? Give feedback.
-
That solved it, thank you very much for your quick response and for your fantastic work with webmidi.js!! I got my original code from the example in your docs (https://webmidijs.org/docs/getting-started/basics#set-pitch-bend-value) so you might want to update that info. And if I might make another suggestion regarding documentation: it took me a few hours to figure out how to send a control change. It turned out to be as easy as can be (.sendControlChange([cc number], [value])), but I had some difficulties finding out from the documentation. As I expect this should be a very common usecase for webmidi.js, it would be great if you could include it in the 'basics' section with a short code example. Thanks again! Cheers, Chiel |
Beta Was this translation helpful? Give feedback.
-
Done.
Done. Thanks for taking the time to report these issues and suggestions. 🙂 |
Beta Was this translation helpful? Give feedback.
That solved it, thank you very much for your quick response and for your fantastic work with webmidi.js!!
I got my original code from the example in your docs (https://webmidijs.org/docs/getting-started/basics#set-pitch-bend-value) so you might want to update that info.
And if I might make another suggestion regarding documentation: it took me a few hours to figure out how to send a control change. It turned out to be as easy as can be (.sendControlChange([cc number], [value])), but I had some difficulties finding out from the documentation. As I expect this should be a very common usecase for webmidi.js, it would be great if you could include it in the 'basics' section with a short code …