2017-11-21 01:32 PM
Hi,
i'm working on a STM32F4-Discovery and i would like to know if it is possible to make a midi device with this board. I read a lot of project about this but it is hard to find a working project.
I already success to configure my board and it is recognize as a MIDI device (Audio Class) but i can't send MIDI messages. I use CubeMX and SW4STM32 to develop and i would like to use HAL library only.
Do you have an idea to build a good message that will be recognize as a midi message?
Thank you very much for your help,
Regards
Quentin
2017-11-22 03:12 AM
Since you are fortunate to own an STM32F4-Discovery board, I would suggest starting with
https://github.com/MrBlueXav/Dekrispator_v2
, and then modify it to fit your own needs.My
https://community.st.com/0D50X00009bMM4jSAG
is also available as well, but it is built around an STM32F767ZI Nucleo board. I would imagine that most of the code can easily be ported over to theSTM32F4-Discovery board. Since you want the board to act as a Midi Device, download the
Nucleo Synth Device
Version 0.8.0 Project. The Host and Slave versions are for users who want to plug in a midi keyboard directly to the board.
2017-11-22 04:44 AM
Hi pappas.chris,
thank you for your help, your project looks like very interesting! I'll try to adapt your code to my STM32F411
Yes you understood i want the board to act as a MIDI device for the computer.
I will come back if i have a question, THANKS!
Regards
2017-11-23 08:11 AM
Hi pappas.chris,
i worked on your project it is awesome! But i didn't success to send a midi message to my computer yet... My board is recognized as a MIDI device but the messages not.
Could you explain me how to do that easily? Maybe it is just a fonction to call?
Thanks,
Regards
2017-11-23 02:07 PM
I will try to look around the MIDI_DataTx routine.
How can I check if the message is received properly?
Thanks for your help.
2017-11-23 02:18 PM
In the usbd_midi_if.c file, there is a routine called MIDI_DataTx that is supposed to send msgs. I tried to get it to work here, but I am getting the same results as you, nothing received in 'Midi Monitor' app on the PC.
Can you send a msg from your PC to the board ? Does the board receive msgs properly?
2017-11-24 11:08 AM
The fastest way to check if the message is received properly is to set a breakpoint in the MIDI_DataRx routine and read the variables for each packet.
I use Keil uVision 5 IDE, so unfortunately I do not know how (or if it is even possible) to set a breakpoint and read variables in SW4STM.