
to change the amplitude of a .wav file
    조회 수: 14 (최근 30일)
  
       이전 댓글 표시
    
I am new to Matlab and im trying to change the amplitude of a .wav file. i have exported the data and Fs. i just dont know how to now increase/decreas the aplitude of the wav.
the code below shows what i have done,
thanks for any advice given.
plot(data);
soundsc(data,fs);
댓글 수: 0
채택된 답변
  Image Analyst
      
      
 2022년 12월 14일
        Try multiplying by a scaling factor:
amplificationFactor = 1.1; % Ten percent gain.
data = data * amplificationFactor;
plot(data);
sound(data, fs);
You might be interested in my File Exchange entry that allows you to plot the waveforms of all the files in a folder:
https://www.mathworks.com/matlabcentral/fileexchange/72431-plot-audio-file-waveforms?s_tid=srchtitle

댓글 수: 2
  Image Analyst
      
      
 2022년 12월 15일
				You probably need to square the signal to get power then use the formula here:
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

