How to plot the power envelope of a .wav file

I need the codings done in matlab editor. What i basically need to do is, input a piano recording (.wav format) and obtain the power envelope of it, so I can clearly differentiate the onsets and offsets of notes. once this is done, i want to separate these onsets into different windows and perform FFT. My main issue is to get the power envelope. can anyone help me with the codings? Thanx in advance.

4 commentaires

Walter Roberson
Walter Roberson le 13 Juin 2013
What equation do you have for calculating the power envelope ?
Jolini
Jolini le 13 Juin 2013
Modifié(e) : Walter Roberson le 13 Juin 2013
Found this extract from a pdf. But I'm not sure how to implement it.
"
Suppose we know the onset instant, tn, of every note where
n= 1, 2, N, and N is the number of notes. NAE is defined as:
NAE(t) = [{1/(tn-t)}integration of p(t).
The limits are tn - t.
[tn < t < t(n+1)]
When t = tn, NAE(tn) = p(tn). From Figure 3(d), NAE(t) has only
one increase and decrease for each note. So onsets can be
determined simply by checking the local minima.
Since {tn ; n = 1, 2, N } is the set of onsets to be
determined, NAE(t) can not be calculated directly. However, this
doesnt mean we cannot decide where an onset is. Let n=0 and
tn=0, if we calculate NAE(t) in a range of t with a limit open to the
right. If the following relation:
NAE( t T ) > NAE(t) < NAE(t + T ) (13)
is met, we can set n = n+1 and tn = t + T, and move on to the next
detection also in a range of t with a limit open to the right. In this
way, we remove the threshold problem.
"
I hope this helps in understanding what I want.
But here it says that the onset instant is known. However i want to implement it when it is not known.
Walter Roberson
Walter Roberson le 13 Juin 2013
Notice "So onsets can be determined simply by checking the local minima", and notice "However, this doesn't mean we cannot decide where an onset is". The sentences after that talk about how to deduce onsets when they are not previously known.
Jolini
Jolini le 14 Juin 2013
Oh ok... So any idea on how i can implement this on matlab??

Connectez-vous pour commenter.

Réponses (0)

Question posée :

le 13 Juin 2013

Community Treasure Hunt

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

Start Hunting!

Translated by