0
$\begingroup$

I have a .wav file of a piano being played at 220 hertz. When I tone this up to 880 hertz, it begins to sound "stringy". However, if I were to use the piano plugin in fl studio and play it at 880 hertz, the piano would still sound normal.

My question is why a piano starts sounding stringy at higher frequencies(although I do know that a piano is in a way, a string instrument) as well as how to I can tone up a piano audio file so that it still sound like a piano(I am hoping to find a way to programmatically tone up a piano audio file as opposed to a program)

Link to file of a piano being played at 220 hertz(from fl studio): https://drive.google.com/file/d/1bUzBVXYrKS2Mzcg4VFEoBjIXqgGz1sFk/view?usp=sharing

Link to file of the above file being sped up to 880 hertz: https://drive.google.com/file/d/1H16aydDErdBrrkDtHScfgITqrmMdi1I7/view?usp=sharing

Link to file of a piano being played a 880 hertz(from fl studio): https://drive.google.com/file/d/1sEN4nvYS6QJeU0gtOruKvQGvDoZpzTx-/view?usp=sharing

$\endgroup$
0
$\begingroup$

The human ear, in collaboration with the brain, recognises what it is that is being perceived (as well as where it is coming from) within the first few ms of the sound waveform.

This "what is perceived" (is it a piano? is it an organ? is it a poggo-stick?) is called Timbre.

This modification of the attack phase is sometimes used deliberately.

Here, it is not the delay that is effecting the modification. Notice his hand on the volume knob when the guitar now starts sounding like a violin. It is clearer from 01:43 onwards in the "Without echo" part of the video. Here, he is killing the guitar's distorted "twang" as the string is excited and "brings it in" just a little after that so that you get more of the tone and less of the "twang". It then sounds like a violin. You might also notice on a piano, if you simply play the waveform after the attack, it sounds more like a decaying pipe-organ rather than a piano.

By "speeding up" the sound, you are distorting those crucial first few ms that the ear/brain are using to recognise the instrument. For example, the instrument now has a sharper attack than a piano. The reason it begins sounding "stringy" is another byproduct of the speeding up as the combination of sinusoids (and their relative phase) might now be tending towards a sawtooth wave that is typical of stringed instruments.

If you are looking to pitch shift but keep the duration of the sample the same, you need to be looking at techniques that attempt to preserve both the amplitude and phase spectrum of a sound.

Librosa implements this with pitch_shift() but other implementations are also available.

Hope this helps.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.