Skip to content

Using Playrec for a real-time audio processing #2

@susnak

Description

@susnak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions