Showing a little about CLAM as a prototyping tool at the Audio Club of FIUBA
Posted by hordia on August 17th, 2009
Last week, at the recent ‘audio club’ of my university, I was showing how to work with the CLAM framework as a tool to prototype realtime audio signal processing applications in a simple and fast way.
We started with an example network to show some about the NetworkEditor capabilities: karaoke.clamnetwork

After that, we continue with a simple ‘diodo distortion’ plugin:
We specified and generated the source code base in this way:

We wrote this code:
bool Do()
{
bool result = Do( mEntrada.GetAudio(), mSalida.GetAudio() );
mEntrada.Consume();
mSalida.Produce();
return result;
}
bool Do(const Audio& in, Audio& out)
{
int size = in.GetSize();
const DataArray& inb = in.GetBuffer();
DataArray& outb = out.GetBuffer();
for (int i=0;i<size ;i++)
{
if ( fabs(inb[i])>0.8 )
outb[i] = inb[i]<0.? -0.8:0.8;
else
outb[i] = inb[i];
}
return true;
}
</size>
And built this net to try it:

The source code of the plugin ready to be compiled is here: pluginDistorsiónDiodo_ClubAudioFiuba.tar.gz
As extra, I leave here pluginDistorsiónDiodoConControlDeClipping_ClubAudioFiuba.tar.gz the same diode distortion, but with a clipping control to set the threshold when playing.
They liked these kind of prototyping features a lot, so probably we’re going to keep using it at the club.





