If it's not your code what would it be?
Teensy run many, many, many times faster than a Nano and so buttons need to be debounced more carefully.
Another possibility is not clearing the MIDI queue for incoming...
As someone reminded me recently the default behaviour of serial MIDI is to merge any output with any incoming messages, so each should be able to connect via Tx to Rx whether you do the MIDI isolation scheme or just...
Yes, merge must be done in software but 'thru' ports can just buffer the input signal. It's to allow a master controller daisy chain sound moduals.
I was responding to the idea you could drive the port without a...
I think you need to add some buffer (e.g. feed both sides of an AND gate or back-to-back NOT gates).
A merge out should be feasible but I don't do serial MIDI much and can't recall how easy it really is.
+1
It's a bit too much guesswork about your scale and octave system with code fragments (the rule is to post complete code) but I would expect it better to do the octave shift on a variable that is then used in a...
Then this should work... // initialize the bounce objects
Bounce digital = {
Bounce(DIGITAL_PINS, BOUNCE_TIME),
Bounce(DIGITAL_PINS, BOUNCE_TIME),
Bounce(DIGITAL_PINS, BOUNCE_TIME),
Bounce(DIGITAL_PINS,...
If you're actually using pins 14 and 15 you need to fix this too:
const int DIGITAL_PINS = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,21};
and D_PINS = 22
And if you're really using 0 - n pins in order...
I see now... DIGITAL_PINS is going to reference pin 18 as '16' is the position in the array and not the pin number inside the array.
Your pin and array index values start the same but they are not the same.
Just...
Somewhere in here perhaps ;)
I was disappointed when I couldn't figure out how to make this part of the code responsive to changes in the number of inputs. Since then someone posted how it's done in an unrelated...
Looks right to me. And LC is the obvious choice for MIDI out of the current line-up because it's the lowest cost.
MIDI is not very demanding of resources and human interactions with controls are glacial in timescale...
int velocity = map(piezo, thresholdMin, 1023, 80, 127);
You want peak not piezo here.
You're taking the last reading instead of the maximum reading... as it's likely below the threshold min and map doesn't deal...
int velocity = map(peak, thresholdMin, 1023, 1, 127);
Serial.println (velocity);
usbMIDI.sendNoteOn(note, velocity, channel);
Yeah, how can you be getting those values at all? If you are then the MIDI...
I've not been following the form closely of late... but I recall seeing something where the host wasn't packaging MIDI efficiently and a fix is in the works??? (looking to see if I've imagined this...)
rummage...