Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Playrec for a real-time audio processing #2

Open
susnak opened this issue May 8, 2014 · 1 comment
Open

Using Playrec for a real-time audio processing #2

susnak opened this issue May 8, 2014 · 1 comment

Comments

@susnak
Copy link

susnak commented May 8, 2014

Hi everyone,
I just wanted to announce that I have made an abstraction layer on top or playrec for doing real-time audio processing in Matlab/Octave. The code is available in our toolbox
http://ltfat.sourceforge.net/

It is really simple to use. The following example takes an input from a microphone and routes it trough the loop to the speakers allowing setting gain in a range of -20 to 20 dB.

block('playrec');
p = blockpanel({'GdB','Gain',-20,20,0,21});
while p.flag
gain = blockpanelget(p,'GdB');
f = blockread();
% You can do anything to f here
blockplay(f*10^(gain/20));
end
blockdone(p);

I tried to make it as versatile as possible. For anyone interested, here are some links:
http://ltfat.sourceforge.net/doc/blockproc_central.php
http://ltfat.sourceforge.net/doc/blockproc/block.php

I would appreciate any feedback.
Thanks
Zdenek

@johnbodhi
Copy link

Is there any way to perform an FFT on f, extract the phase from one frequency bin, and then display the phase versus time in real-time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants