MIDI: How to intentionally delay notes?


i have sketch midi notes trigger pulses analog pins.  i need able delay of triggers few microseconds.  i've been trying cause delay between when midi note received , analogwrite occurs.
here's part of sketch:

if (note == 43) {
  analogwrite(11, triggerlevel);
  delaymicroseconds(delaytime);
  analogwrite(11, low);

(where delaytime= 1000)

i've tried adding both delaymicroseconds() , delay() so:

if (note == 43) {
  delay(delaytime2);
  analogwrite(11, triggerlevel);
  delaymicroseconds(delaytime);
  analogwrite(11, low);

but doesn't seem work, no matter how increase delaytime2.  i'm pretty new arduino.  what need desired result?

yes should work. how measuring fact think dosn't work.


Arduino Forum > Using Arduino > Audio > MIDI: How to intentionally delay notes?


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62