[CLAM] Clam API Docs

Pau Arumi parumi at iua.upf.edu
Wed Sep 5 01:13:44 PDT 2007

En/na Ben Erridge ha escrit:
> Hello,
> I am trying to write a plugin for xmms which will display the 
> keyspacemonitor for the currently playing song. xmms provides the music 
> data in two ways
> 1.)  fequency array (gint16 freq_data[2][256])
> 2.) PCM data
>  From what I have found the keyspace needs a floatarraydatasource but I 
> haven't been able to find out exactly how to construct one from the data 
> I have.

Hi Ben,
I think that is a great idea!

Keyspace widget uses a (FloatArray)DataSource polymorphic object
to get its data while giving flexibility to connect the widget to
sources of different nature, like in NetworkEditor (streaming
data) and Music Annotator (offline data pool).

See in NetworkEditor/src/ProcessingBox.cxx 130: 
CLAM::VM::KeySpace * widget = new CLAM::VM::KeySpace(canvas);
*dynamic_cast<KeySpaceMonitor*>(processing) );

Here, "processing" parameter is a PortMonitor, an object which is
(inherits) both a Processing and a DataSource.
Of course, you also need to construct a network like this:
AudioSource -> TonalAnalysis -> KeySpaceMonitor
Like in this screenshot:

Another useful tool in Clam are NetworkPlayers, which are coupled
with an audio back-end such as JACK, PortAudio or LADSPA, and
connects the i/o buffers with the Network Sinks and Sources, and
finally, drives the Network execution. See for example:
As a first thought --though maybe I'm wrong-- it would make sense
to have a XmmsNetworkPlayer.
Another aspect to be worked out is how to integrate Qt4 widgets
to xmms.

> I'm hoping for some tips on the best way to approach this integration 
> from xmms data to data that the keyspace can use. Any help would be 
> greatly appreciated
> Also if there are API docs, I haven't been able to find them and inline 
> documentation on the source is mostly non existent.

Web -> Doc -> API documentation:

I suggest to move further discussion to the devel-list


> Thanks you in advance!
> Ben

More information about the clam-users mailing list