Convert Audio File to Waveform

17 ビュー (過去 30 日間)
Austin Anthis
Austin Anthis 2021 年 3 月 1 日
コメント済み: Austin Anthis 2021 年 3 月 6 日
I am trying to make a demonstration where I pass audio through a non-linear filter and hear the effect that the non-linearity has on the sound quality. I also want to see how feedback affects the output. In the attached Simulink model, I do something similar but with a simple sine wave as the input and a scope to visualize the output. I downloaded the Signal Processing Toolbox and the DSP System Toolbox and can now import my audio using the "From Multimedia File" block and then hear it using the "Audio Device Writer" block. However, since the output of the "From Multimedia File" block is a vector of audio data, rather than a waveform like the one coming out of the signal generator, I cannot pass it into a feedback loop with standard transfer functions. I know that there are audio filters available but I want to use my own filter and I think the easiest way to do that would be to somehow get the vector of audio data into the form of the output of a signal generator. Is there any way of doing this?
  3 件のコメント
Mathieu NOE
Mathieu NOE 2021 年 3 月 2 日
hello
yes you can use the audio device write block
other wise you can export the simulink data using "to workspace" and then use the matlab audiowrite function
Austin Anthis
Austin Anthis 2021 年 3 月 6 日
The audio write device block is to slow to listen to the music live. The workspace option can work but I would prefer a solution where I can adjust the feedback system live and listen to it in real time.

サインインしてコメントする。

回答 (1 件)

Shadaab Siddiqie
Shadaab Siddiqie 2021 年 3 月 4 日
From my understanding you want to convert audio file to waveform. Please refer audiowrite function. Also plot audio file waveform might help you to understand more about the topic.
  1 件のコメント
Austin Anthis
Austin Anthis 2021 年 3 月 6 日
Audiowrite converts a vector of data into an audio file bit can only do it once the entire vector has been processed through the feedback loop at the end of the simulation. Is there any function that can do it in real time? I.E. continuously take data and convert it into audio as the loop runs?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by