Amplitude Modulation a .Mp3 file

10 views (last 30 days)
Hi, I'm trying to amplitude modulate a .mp3 file which is already saved in the system. Now when I'm trying to multiply it with a high frequency carrier wave I'm getting an error regarding the frames. The audio signal is in a matrix of [1024*1] but the carrier is in a matrix of [1*1] Also I need to convert it into digital form and transmit it using Arduino
I'm using MATLAB 2013 and designing it on Simulink.
Any suggestions?
  1 Comment
Krishna Gaire
Krishna Gaire on 25 Jan 2018
Hi Aman, I am also trying to amplitude modulate a .mp3 file and would really appreciate if you could help me out. I have sound clips that are about 3-4 seconds in human audible range. I want to convert them into ultrasonic range so that when I transmit them they are not audible to humans. I read that I need to use amplitude modulation. I used the modulate function of matlab.
[y,Fs] = audioread('TakeASelfie.mp3');
x = modulate(y,30700, 62000, 'am');
soundsc(x,62000)
audiowrite('modulated.wav', x, 62000)
In the above example, I was trying to convert my audio clip to 30.7kHz. However, after I performed modulation, the length of the clip was decreased. How can I change the frequency of my sound clip without changing the length of it? Thank you.
I have asked the same question in the community as well. If you would like you could answer the question there.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 13 May 2015
wavread() already converts the file to digital form.
There is no problem multiplying a 1024 x 1 vector by a 1 x 1 scalar.

More Answers (0)

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!