Changing intensities (dB) of a sound file at certain frequencies?
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
Is there a way to parse through a sound file (in .wav format) and adjust (increase/decrease) its intensity in decibels at certain frequencies? I have tried to do FFT to get the frequency domain, then adjusting the magnitude of the soundfile by multiplying with a constant value. Then use ifft to return to the time domain.
 [y1, Fs] = audioread('sound.wav');
 Y = fft(y1);
 % decrease intensity of lower frequencies
 Y(1:1000)= Y(1:1000) .* 0.25;
 y2 = ifft(Y);
 soundsc(y2, Fs);
This does not work and gives the error : "Error using soundsc (line 25) Audio data must be real and floating point."
Here is an example of what I want to do in Matlab (0:50 - 1:20): https://youtu.be/YantpouC4Mk?t=50
Any help is appreciated, thanks in advanced!
댓글 수: 1
  Adam
      
      
 2016년 6월 15일
				If you don't alter the negative frequencies equally with the positive ones you will end up with a complex result when you use iift to return to the time domain.
채택된 답변
  Star Strider
      
      
 2016년 6월 15일
        See my Answer to your duplicate Question on this topic: http://www.mathworks.com/matlabcentral/answers/290073-amplify-and-dampen-certain-frequencies
댓글 수: 0
추가 답변 (1개)
  Sachin Shrestha
      
 2016년 6월 15일
        Hi Sven,
Regarding your error, you could listen to the audio by simply changing the last line of the code from
soundsc(y2, Fs);
to
soundsc(real(y2), Fs);
You may proceed with your testings now.
Hope this will help. Good Luck!
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Audio Processing Algorithm Design에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



