Digital pipe or flute

Hello, I'm trying to build a digital pipe, trying to follow the instructions of openpipe.cc & echanter.com, but slightly different.
I am using Arduino Uno R3 with cables with one end connected to a pin and the other connected directly to the digital pins. I follow the recommendation of the echanter.com page, but my intention is to connect the Arduino to the PC via USB, without MIDI cable, and execute the MIDI messages with a virtual synthesizer on the PC (Windows), with loopMIDI & Hairless.
When executing the code, it continuously sends me the MIDI message corresponding to the continuous note 66 on velocity 127; alternating with Note 0 off velocity 0.
It does not recognize the pulsation of any other combination of pins.

I have tried to modify the programs of openpipe.cc or echanter.com for my purpose, but I don’t understand them very well. Openpipe uses sensor MPR121.
Would it be better to me buyint sensor MPR121 & use the program of openpipe.cc?
Would you be so kind to guide me to correct my mistakes? Thank you.

Digital_Flute.ino (3.62 KB)

I would initially comment out the all the MIDI stuff (or write a very simple sketch) with some Serial code simply to check that all your inputs are reacting as you expect. When you are confident they are all working correctly then you can move on to the MIDI part.

Steve

So how did the advice I gave you in this thread work out? Did you try it?

Sorry, I'm a little silly. Right now I have a direct cable from the thumbtack to the pin, and the ground connection happens when I touch the thumbtack with my fingers. Your advice means that I have to wire the pins to ground in a different way?

Your advice means that I have to wire the pins to ground in a different way?

No it means you have to run a ground wire to your pipe.

Would it be better to me buyint sensor MPR121

Then that board would have to be at the tube, you can not run wires from it over any distance.

Using the Capacitive Touch Sensor Breakout MPR121 or something else would make your life easier with the capacitive touch but it can be done without it.

The other thing is that you may want to use a board that is able to do USB MIDI instead of using Hairless. That means you could build a USB MIDI device that would be seen as such by your computer, your synthesizer, your DAW etc...

If I were you I would get a Teensy, probably a Teensy LC, that is a board that is compatible with Arduino IDE and has touch pins that would be used instead of the MPR121. And it would be small and neat.

That said, probably any board that is compatible with USB MIDI library and with the Capacitive Sensing Library would do.

The other thing you may want to do is to look at how capacitance sensor work. It is really interesting.

Thanks to all, I'll try to follow your advices. When it works OK, I'll tell.

If I were you I would get a Teensy, probably a Teensy LC, that is a board that is compatible with Arduino IDE and has touch pins that would be used instead of the MPR121. And it would be small and neat.

Any connection to a MPR121 needs to be both short and rigid. You can not have the contacts on the end of a cable connected to the MPR121. I have told you this before but you seem to be resistant to advice.