Hi
I have made two small changes to your original program:
- changed MIDI_TX to print debug statements rather than just raw data
- changed the conditional on that "else if" for 0102
I think I have changed serial speed as well.
I don't have photosensors, so I have tested by switching A0 and A1 between 5V and 0V.
With both A0 and A1 high at program start, I see these three notes being switched on (I believe):
In MIDI_TX: status: 128 pitch:40 velocity:127
In MIDI_TX: status: 128 pitch:41 velocity:127
In MIDI_TX: status: 128 pitch:60 velocity:127
When I take one of the input pins to 0V, it looks like its note is being stopped and also the third note (60?).
In MIDI_TX: status: 144 pitch:41 velocity:127
In MIDI_TX: status: 144 pitch:60 velocity:127
Anyway, please try it with your actual sensors to see what happens.
Regards
Ray
harp_test_2.ino (2.45 KB)