Bluepill and USBMIDI

Post here first, or if you can't find a relevant section!
Post Reply
neo_nmik
Posts: 20
Joined: Thu Feb 04, 2021 7:09 pm
Answers: 2

Bluepill and USBMIDI

Post by neo_nmik »

Hey guys!

Looking for some pointers regarding possibly implementing USBMIDI on a bluepill (F103), and later one of the new blackpill's (F401) when I get round to it.

Background: I've made a little 8 note wavetable poly synth, with envelopes, LFO and an arp, which is a lot of fun! Buttt, I'm yet to add in any MIDI, and I figure while I'm doing it, USBMIDI might be pretty useful (if I can). Obviously there already a lot going on here, so adding MIDI might be the straw that breaks the camels back, hence looking to the blackpill's (along with wanting to add a few more features. :twisted: ).

Back to the boards. I'm currently running a standard Bluepill, with the HID 2.2 Bootloader. Currently using VSCode with PlatformIO, and I'd assume I'm still using the STM Cores 1.9.0, but I know it updated loads of stuff the other day, so that might have changed (I'm not super clued up on how to figure it out on PlatformIO, I can just about use it to write/upload. :roll: ). When I move to the Blackpill, it's currently got the WeAct Bootloader, I've read I can use the DFU for uploading and forego the WeAct/HID, but I've only uploaded a blink to test it wasn't fake.

I've had a poke round, and I can't seem to see any concrete info on here or around google about doing this sort of thing, I'm guessing I might have to get my hands a little dirty if there's nothing around, but any help/pointers would be great!

Thanks,

Nick
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: Bluepill and USBMIDI

Post by mrburnette »

Old Site search should cover old stuff for BluePill, etc.

usb midi site:stm32duinoforum.com

For this site,

usb midi site:stm32duino.com

And... be bold and check github...

usb + midi + STM32 site:github.com
neo_nmik
Posts: 20
Joined: Thu Feb 04, 2021 7:09 pm
Answers: 2

Re: Bluepill and USBMIDI

Post by neo_nmik »

mrburnette wrote: Wed Oct 06, 2021 9:29 pm Old Site search should cover old stuff for BluePill, etc.

usb midi site:stm32duinoforum.com

For this site,

usb midi site:stm32duino.com

And... be bold and check github...

usb + midi + STM32 site:github.com
Oh thank you MrBrunette!

I think I saw something from one of those links before, and I’d lost it! (That serves me for random googling!)

I don’t know why, I had this assumption that USBMIDI/class compliance was a bit deeper than this.
User avatar
Bakisha
Posts: 140
Joined: Fri Dec 20, 2019 6:50 pm
Answers: 5
Contact:

Re: Bluepill and USBMIDI

Post by Bakisha »

As i recall from my experiments with audio and MIDI, on Roger's (and Steve's) core for bluepill (STM32F103C8/B) there is built-in USBComposite library that can act as USB MIDI device (but i'm not 100% sure is it compatible with HID bootloader).
ST core don't have MIDI class implemented, but maybe arduino midi library can work on blackpill with serial port set at 31250bps.
Or maybe use Hairless MIDI<->Serial Bridge?
If you just need notes (and durations) there are sketches for MIDI note player on arduino uno.
There is also playtune library for arduino, it has converter from MIDI files to bytestream that can be in placed internal flash.
lito.jrpowers
Posts: 3
Joined: Fri Mar 06, 2020 4:56 am

Re: Bluepill and USBMIDI

Post by lito.jrpowers »

Dunno if this will be of help:

https://github.com/TheKikGen/USBMidiKliK4x4
Post Reply

Return to “General discussion”