Matlab MIDI note value input not working, but control values are working
4 ビュー (過去 30 日間)
古いコメントを表示
I have a question about MIDI in matlab: I have a hard time getting the note values of a midi keyboard into matlab. I need them in real-time. Getting control information from sliders and such works, but I can't get the key note value recognition to work. I've searched around for this also, but no success.
PS There is no problem with my midi keyboard!
0 件のコメント
回答 (2 件)
Arnav Mendiratta
2017 年 3 月 3 日
As the following link mentions, you should start MATLAB after you have connected your MIDI device:
Verify that MATLAB is able to identify the connected MIDI controller when you execute "midiid" in MATLAB Command Window. When you call "midiid" MATLAB waits for a Control Change message from your MIDI Device. When you use a control on your MIDI Board, MATLAB recieves a Control Change message and it returns a control number corresponding to the MIDI controller number that you interacted with on your MIDI hardware. The following link describes how MATLAB defines control numbers:
Note that 'midiid' and associated MIDI functions are for use with MIDI control surfaces and only respond to MIDI Control Change messages. The keyboard sends other kinds of messages (Note On, etc). Please refer to the MIDI implementation of your device's Manual to verify what knobs, sliders, pedals etc. can send Control Changes messages which would be recognized by 'midiid'.
Also, the keyboard may have to be in a particular mode for the controls to work. MIDI Monitor is probably the best way to figure out what the keyboard is sending. If it is sending Control Change messages, 'midiid' should be able to see them.
There are other failure modes. For example, two programs cannot share a MIDI device. If another program (e.g., MIDI Monitor) is still connected to the keyboard, MATLAB will not be able to find it.
There is also a File Excange submission you could look into. As the author mentions, this only works on Windows XP and later:
Here are some other tools from the community that are available for you to try:
0 件のコメント
Charlie DeVane
2018 年 12 月 13 日
The R2018a release of Audio System Toolbox added these capabilities to MATLAB.
Search the documentation for "MIDI Device Interface".
hope this helps,
Charlie
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!