Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Real time audio processing

Subject: Real time audio processing

From: Diogo

Date: 5 Feb, 2013 19:36:06

Message: 1 of 5

Hi,

I have written a matlab code that does some signal modulation, and I want to have a

-->microphone capturing voice

    matlab processes the information

output of the processed sound---->

This is working fine with the functions recordblocking(recObj, 5); and play(recObj);

But I want this to be real time without interruptions, so I can be speaking into the microphone and hearing my modulated voice on my headphones for example...I tried to put a very small capturing time, like 0.1sec and make a loop in the code, but matlab lags for about 1 second every time it finishes recording, possibly because of the way it manages the temporary audio file I guess...

Is there a solution for this?

Much appreciated

Subject: Real time audio processing

From: Diogo

Date: 7 Feb, 2013 05:46:08

Message: 2 of 5

anyone?

Subject: Real time audio processing

From: ta98otani@gmail.com

Date: 7 Feb, 2013 12:07:37

Message: 3 of 5

Yes. You can use system object found in DSP system toolbox.
You can capture Realtime audio and play back in Realtime (as much as your CPU can take it)

Takuya

Subject: Real time audio processing

From: Diogo

Date: 9 Feb, 2013 01:00:10

Message: 4 of 5

ta98otani@gmail.com wrote in message <6c5eb5a7-48d3-4a7d-be4e-76d1f94b3da6@googlegroups.com>...
> Yes. You can use system object found in DSP system toolbox.
> You can capture Realtime audio and play back in Realtime (as much as your CPU can take it)
>
> Takuya

Great, I found "from audio device" tool, but how do I send the information to my code as "x" for example? my code is in a .m file(obviously) how do I insert my code in simulink so I can connect the circuit?

Thank,
Diogo

Subject: Real time audio processing

From: Nasser M. Abbasi

Date: 9 Feb, 2013 01:53:07

Message: 5 of 5

On 2/8/2013 7:00 PM, Diogo wrote:
> ta98otani@gmail.com wrote in message <6c5eb5a7-48d3-4a7d-be4e-76d1f94b3da6@googlegroups.com>...
>> Yes. You can use system object found in DSP system toolbox.
>> You can capture Realtime audio and play back in Realtime (as much as your CPU can take it)
>>
>> Takuya
>
> Great, I found "from audio device" tool, but how do I send the information to my code as "x"
>for example? my code is in a .m file(obviously) how do I insert my code in simulink so I
> can connect the circuit?
>

http://www.mathworks.com/videos/incorporating-matlab-algorithms-into-a-simulink-model-69028.html

"With a MATLAB Function block, you can write a MATLAB function for use in a Simulink model."
http://www.mathworks.com/help/simulink/slref/matlabfunction.html

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us