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);
widget->setDataSource(
*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:
http://iua-share.upf.es/wikis/clam/images/4/4c/NetEditQt4-PolarChromaPeaks.png
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:
CLAM/src/Flow/Networks/PANetworkPlayer.*xx
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:
http://clam.iua.upf.edu/doc/CLAM-devel-doxygen/
I suggest to move further discussion to the devel-list
Cheers!
Pau
Thanks you in advance!
Ben
_______________________________________________
CLAM mailing list
[email protected]
http://www.iua.upf.es/mtg/clam