UHF
Well-known member
Hello, sorry if any of this is vague. I can't immediately post all the code to demonstrate this as there is a lot that would need cutting down - I'm just looking for ideas of what the problem(s) may be.
I'm moving my synth code from 3.6 (working fine) to 4.1 and plowing through the problems. The increase in processor speed meant thant the multiplexer code needed 50us delays before each analogRead(..). I'm getting problems with the USB MIDI (MIDI from the client USB on the Teensy), Serial and USB Host MIDI are fine. MUX reading is fine without usbMIDI. My loop() looks like this:
I'm using Serial + Audio + MIDI. When usbMIDI is included, I get random digital noise on USB Audio and the sound cuts every 8s for about a second, then continues. Everything is slow to respond. Commenting out the checkMux() stops this problem, but the digital noise persists.
What do you think? Could this be problems with interrupts? Many thanks for your time.
My connections to the Teensy 4.1 are like this (AB_... are connections to the Audio Board):
I'm moving my synth code from 3.6 (working fine) to 4.1 and plowing through the problems. The increase in processor speed meant thant the multiplexer code needed 50us delays before each analogRead(..). I'm getting problems with the USB MIDI (MIDI from the client USB on the Teensy), Serial and USB Host MIDI are fine. MUX reading is fine without usbMIDI. My loop() looks like this:
Code:
void loop() {
myusb.Task(); //USB HOST MIDI Class Compliant
midi1.read(midiChannel); //USB HOST MIDI Class Compliant
// usbMIDI.read(midiChannel); //USB Client MIDI
MIDI.read(midiChannel); //Serial1 MIDI 5 Pin DIN
checkMux(); //routine to check two 4067 MUXs with analogRead()
checkSwitches(); //routine to check several switches with digitalReadFast()
checkEncoder(); //Uses Teensy Encoder lib
}
I'm using Serial + Audio + MIDI. When usbMIDI is included, I get random digital noise on USB Audio and the sound cuts every 8s for about a second, then continues. Everything is slow to respond. Commenting out the checkMux() stops this problem, but the digital noise persists.
What do you think? Could this be problems with interrupts? Many thanks for your time.
My connections to the Teensy 4.1 are like this (AB_... are connections to the Audio Board):
Last edited: