Dekrispator
Dekrispator copied to clipboard
MIDI send
Hi,
I'am reusing your MIDI USB Host driver. (Good work)
Have you thought about implementing Midi Send ?
I like to use it for controlling the LEDs on the nanoKONTROL.
This might be useful for your project too.
Regards Sebastian
maybe you have a look at:
http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmios32%2FSTM32F4xx%2Fmios32_usb_midi.c
function:
static USBH_Status USBH_Handle(USB_OTG_CORE_HANDLE *pdev, void *phost)
would be nice to see the LEDs of the nanoKONTROL to display synth status info.
Thank you
Midi out is something that will probably get added but I don't know if mrbluexav is actively developing at the moment and by the looks of the midi in, midi out would require the same amount of code to deal with it.
For what you're suggesting though, that's more midi thru than midi out/send which might be a bit easier as you're just passing straight midi data from the in to the out port.
Hello everybody ! Thank you for "Dekrispatoring" ! Actually I've not much time for programming apart from holidays time... However I'm at the moment re-diving in the arcanes of USB MIDI and see if I could rewrite the driver on top of the new Cube HAL library from ST. I'm restarting from the demo project "wave player and recorder" as all the board configuration is done in it. It might be long... @sebseb7 I know Thorsten Klose's wonderful MIOS solution. It's the only working and open source (almost) USB host MIDI driver for STM32 I know. It's my first source of inspiration. But it's a heavy thing. There is also https://github.com/YuuichiAkagawa/USBH_MIDI/ for arduino (C++). About controlling Nanokontrol's LED that would be a very nice thing !! Do you have the doc for doing such a thing ??? ;-)) @Reggi3 you're right !
Best regards
@MrBlueXav I'll push some of my code into the repo in the next couple of days but I'm not sure it entirely needs a rewrite, just a bit of attention here and there. I've got things running quite nicely here and I've made a few adjustments to some things, You'll notice I've put some code in my repo for channel filtering already. I've added rotary encoder with relative value support to a couple of the functions, filter1/2 frequency in 1 to 15hz increments and tempo in 1 to 15bpm increments, they really help to unleash the full power of the synth on top of your great work!
@MrBlueXav stm32F4 code for usb midi device :) https://github.com/norbim1/preenFM2/blob/master/src/usb/usbd_midi_core.c
controlling the LED only works with the nanoKONTROL 2 and "LED Mode" has to be set to "external" using the KORG KONTROL EDITOR.
I made a demo that implements midi send with a nanoKONTROL 2 using your host driver as basis : https://github.com/sebseb7/stm32-midihost-demo
I can't test this as I don't have a nanokontrol, I'm using an arturia minilab.
strangely the host driver from this project works with the nanoKONTROL but not with the AKAI LPK25.
It does work when I first connect the nanoKONTROL and then connect the AKAI LPK25
it's because you've hardcoded the Itf_Desc and Ep_Desc index values. Take a look at mine or tomassch's fork to see the difference in how we handle the connected midi device: https://github.com/Reggi3/Dekrispator/blob/master/USB/MIDIstream_class/usbh_midi_core.c#L99
as you can see we're referencing it with a variable (interfaceToUse) at the moment that is set to 1, our code isn't perfect but it does work with anything I've plugged into it so far, what we really need is a little bit of code to iterate through all the possible Eps (5 or something I think) that we might meet.
https://github.com/MrBlueXav/Dekrispator_v2 Merry Christmas !