Harp MIDI project

Pomdapix

New member
Hello ,

With my father we started the construction project of a MIDI harp.
Having already done an arduino project together we decided to tackle this one with the teensy but it appears to be tougher than we expected. '--

The goal is to be able to : on one hand amplify the sound by sending it to a amplifier, and on the other transform it to MIDI signal at the same time.

It would be a harp without half tones : each string makes one note only so we decided to install one piezo for each string and not have to bother with frequency detection.
Now, it's all well and good but we are stuck because we don't really know how to convert the analog signal to digital. ^^

Do you think it's possible to use only the teensy without any external Analog to Digital Converter ?
One problem we have is when I get the analog signal with readAnalog, I get only the upper part of the soundwave so I perhaps need to find another solution.(an other method for inputing the signal ?)

Here's the signal we get with readAnalog (I treated the signal a little so it would be readable)
soundwave.png

I tried to find the solution on my own because other people tried this before but I couldn't understand as I'm a full beginner :D (for example: https://forum.pjrc.com/threads/27212-Polyphonic-Audio-to-Midi-Conversion-using-Teensy-3-1)

Once I get a clean digital signal I will need to transform it to MIDI but I'm not there yet :D

Thanks a lot for your help ! :)

Samuel
 
Looks like you are putting ac into an analog pin? This could be bad and damage the device. All inputs should be within the voltage rails, so no negative voltages...

Normally you'd offset the signal to a mid-rail voltage.
 
As said it is important to protect the inputs from high voltages. If you search for "build piezo drum pads..." or so you should find info about diodes for example.

How are the piezos exactly mounted? Have you already checked if the separation of each piezo is good enough? Is the cross talk sufficiently low?
 
Hello,

Thanks for your answers :)

I looked for preventing negative input and one diode for each piezzo should do the trick.
For now we are testing with only one piezzo to know if the project is feasible or not.

For the code, would you advice me to use readAnalog or to find another way to get the input ? I was wondering if I could get the amplitude/range of the sinusoid instead of the value.

Thanks again !

Samuel
 
If the input from the piezo is mapped to a useful range it could be possible to read a few samples for a defined time window. Look at the samples to check how long the time window has to be to get the first peak and if it is possible to get some sort of level from it.

I am not sure if reading from many analog inputs can be sufficiently fast for this purpose or if you could miss the peaks on a channel.
 
I looked for preventing negative input and one diode for each piezzo should do the trick
It's better to protect for too high positive signals as well, so I would suggest adding 2 Schottky diodes like this:

tvp.png

You can also use a BAT54S.

Paul
 
Back
Top