Page 1 of 1

Bluepill and USBMIDI

Posted: Wed Oct 06, 2021 8:21 pm
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

Re: Bluepill and USBMIDI

Posted: Wed Oct 06, 2021 9:29 pm
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

Re: Bluepill and USBMIDI

Posted: Wed Oct 06, 2021 10:13 pm
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.

Re: Bluepill and USBMIDI

Posted: Thu Oct 07, 2021 12:36 pm
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.

Re: Bluepill and USBMIDI

Posted: Sat Oct 09, 2021 12:22 pm
by lito.jrpowers
Dunno if this will be of help:

https://github.com/TheKikGen/USBMidiKliK4x4