Effacer les filtres
Effacer les filtres

May I ask how to get the value of amplitude from one wav. file?

7 vues (au cours des 30 derniers jours)
loong seow li
loong seow li le 29 Avr 2016
Commenté : loong seow li le 30 Avr 2016
May I ask how to get the value of amplitude from one wav. file? Because I want to do distortion wav. file..

Réponse acceptée

Image Analyst
Image Analyst le 29 Avr 2016
The amplitude is the value of the array at that element. If you want the max value over all elements, use max().
[y,Fs] = audioread('guitartune.wav'); % y can have + and - amplitudes.
amplitudes = abs(y); % abs(y) is the amplitudes in an all-positive sense
maxY = max(abs(y)); % maxY is the highest amplitude.
  7 commentaires
Image Analyst
Image Analyst le 30 Avr 2016
You can simply use multiplication and division to scale your vector or matrix to anything you want.
desiredMax = 0.1;
yScaled = y * desiredMax / maxY;
loong seow li
loong seow li le 30 Avr 2016
okok....thanks a lot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by