Spectrogram - Piano sound length

5 views (last 30 days)
Cecilie Tefre
Cecilie Tefre on 7 Apr 2022
Answered: Bjorn Gustavsson on 8 Apr 2022
Approximately how long are the piano keys kept down in 2.wav when the sound is played? I am supposed to draw guides in the spectrogram to support the argument.
*The attached picture wav 2 is the figure I get from Matlab, but I'm not sure how to see how long the keys are kept down when the sound plays.
Anyone that can help?
  1 Comment
David Goodmanson
David Goodmanson on 8 Apr 2022
Edited: David Goodmanson on 8 Apr 2022
Hi Cecilie,
if you follow along this plot in time, you should see a part at the beginning and a part at the end where the colors are spread out vertically in a different way from what is going on for times in the middle.

Sign in to comment.

Answers (1)

Bjorn Gustavsson
Bjorn Gustavsson on 8 Apr 2022
Well there are one "music/instrument-based" problem with the question (that might be important or not): on pianos there are the pedals that allow the strings to ring-out even after you release the keys.
What you should do first is to zoom in on the nice cler harmonics that are easily visible at around 2-4 kHz. Do that and then listen to the sound again and think about what you look at, keeping the progress of time in mind. If you do that you will get at least a good grasp of how the spectrogram varies from when a key is hit and another key is hit (or the same keys are hit again and again, like between 8 and 10 s, and 12 and 14 s for example). Once you get that you should also be able to figure out what type of additional variations might be related to the keys being hit and held.
HTH

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!