How can i plot the frequency of audio file in same speed with audio speed?

조회 수: 2 (최근 30일)
KYUNG JIN JOO
KYUNG JIN JOO 2017년 7월 5일
답변: Gabriele Bunkheila 2017년 7월 5일
I am trying to plot the frequency of audio file continuously (By using drawnow). But when I started the audio file and plotting simultaneously, their finish times are not same. I can solve this by adjusting pause time for each audio files. But it's not desirable. How can I solve this?

답변 (1개)

Gabriele Bunkheila
Gabriele Bunkheila 2017년 7월 5일
Hello,
I am not sure I fully understood your question, but I work at MathWorks and I will try tackling this from one possible angle. The documentation page Real-Time Audio in MATLAB will tell you how to :
  • Continuously read from an audio file
  • Plot as you read (this example uses dsp.TimeScope, but you can use dsp.SpectrumAnalyzer instead to plot the frequency-domain spectrum). Using these scopes is generally more efficient than the basic plotting commands, it doesn't require any use of drawnow in the loop, and it gives you access to in-scope measurement utilities such as those found in common benchtop instruments
  • Listen in real-time as you read and plot, so everything is synchronous with the audible audio content
I hope this helps.

카테고리

Help CenterFile 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!