Stability for USB hardware/software and sample processing #54
MichaelPNolan
started this conversation in
General
Replies: 1 comment 1 reply
-
Good to know that it works. UsbMidi_Loop was intended to be executed by core0 to get a bit quicker timings. MIDI_VIA_USB_ENABLED can be set in config.h. It was used to turn off/on the usb midi processing. Crazy setup xD |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I hope people don't mind but since lately doesn't seem to be anyone else here I'm documenting my implementation of this project. I'm learning a lot and I have slightly different hardware. I hope this becomes a useful discussion topic - otherwise its just show and tell.
For noise reduction - isolation for the DAC (in this case its 5v powered) https://datasheetspdf.com/datasheet/B0505S-1W.html this makes it silent as expected. Doesn't seem to interfere with any data communication voltage even though technically the earth is no longer common.
I created a USB midi controller using an Arduino Micro because it has a Mega32u4 controller which apparently makes it USB device capable as well as just directly being programmable without any need to reconfigure.
I didn't connect the GND pin next to my 3.3v supply - even though it seemed to be linked on another GND pin to common ground ... that matters a lot for the communications work reliably. Kind of Arduino 101 but ... well it wasted an amazing amount of time while all other devices were working fine. Marcel mentioned something was probably floating to make connectivity issues - that was it.
I have set it to only call the midi initializer linking part of the USB host code infrequently (100 or 1000 times through loop) if it has a USB device already connected. Interrogating the USB for status takes up too much time and glitches audio processing. Initially I solved it by switching to 22khz sample rate but now I can get back to a higher quality. I've also reduced the frequency of calls process controllers to every 24th loop (from 8 in the original code).
Now I can up the sampling rate to 44khz for the DAC/Synth without having break up or break down of wave/note creation audio.
https://twitter.com/sangye/status/1415241614608326658/photo/1
Beta Was this translation helpful? Give feedback.
All reactions