Ben Erridge | 4 Sep 16:53 2007

Clam API Docs

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.

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.

Thanks you in advance!
Ben

_______________________________________________
CLAM mailing list
CLAM@...
http://www.iua.upf.es/mtg/clam
Pau Arumi | 5 Sep 10:13 2007

Re: Clam API Docs

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
abiewu | 11 Sep 11:48 2007
Picon

Can I get text output from the tonal analysis of CLAM Network Editor?

Dear Sir

 

I am AbieWu from Taiwan.

I used CLAM Network Editor and was interested in the Tonal Analysis example.

However, the outputs of this example were graphical monitors.

Can I get the text output to do further calculation from the output of tonal analysis?

 

Would you please teach me how to do it?

Thanks

 

Wu Yin Kai (Abie Wu)

Database and Software Engineering Lab.

Department of Electrical Engineering.

National Cheng Kung University.

Tainan,Taiwan

 

_______________________________________________
CLAM mailing list
CLAM@...
http://www.iua.upf.es/mtg/clam
Pau Arumi | 12 Sep 10:49 2007

Re: Can I get text output from the tonal analysis of CLAM Network Editor?

En/na abiewu ha escrit:

> I am AbieWu from Taiwan.
> I used CLAM Network Editor and was interested in the Tonal Analysis example.
> However, the outputs of this example were graphical monitors.
> Can I get the text output to do further calculation from the output of 
> tonal analysis?
> 
> Would you please teach me how to do it?
> 
> Thanks

Hi AbieWu,
you have two ways do this

1. Modify TonalAnalysis processing adding std::cout's then pipe the
output to another file. To do this, first create a network with
NetworkEditor. Its execution can be done either from NetworkEditor
itself or NetworkEditor/OfflinePlayer command line tool (convenient
for batch processing).

In CLAM/src/Processing/Analysis/Tonal/TonalAnalysis.cxx line 130
you can see how the chordCorrelation array (belonging to an
outport) is filled.

2. Directly use the the binary Annotator/ClamExtractorExample which
writes the data in xml format.

Best,
Pau
Ali-Akber Saifee | 28 Sep 08:26 2007
Picon

building on windows.

Hi there.
I'm looking at using CLAM for a project that my team is looking at. We're hoping to create a platform independent solution - but our primary expertise lies in Windows development, therefore we're hoping to create a working prototype on windows first.

So here lies my problem :
My dev environment contains:
- Windows SDK ( v6 )
- Visual Studio 2008
- DirectX 10 SDK.

Clam source 1.1.0

Using the above + the dependencies claimed by CLAM  - I set up the scons build environment and immediately ran into problems.

Problem 1 : scons configure fails on id3lib. looking into the config.log file, it shows a few linking errors. I hacked around and using updated id3lib binaries (recompiled using VS2008) I got that error to subside. Subsequently, I got as far as doing a scons - which ended up in compile time errors with CLAM src's - having mostly to do with 'default int' declarations etc. After hacking around with the CLAM src's I finally got it to build - only to realise that every time I tried to build an example I got more linking errors.
Problem 2: When I install the NetworkEditor using the installer (1.1.0) if I try to add any of the Audio I/O processings I get an error message similar to 'The processing type 'MonoAudioFileReader' is not supported'. When trying to use the same processing using the clam libs that I had built in 'Problem 1' I was getting similar errors (Processing not enumerated etc).

Right now, I'll try to check out a svn snapshot of 1.2 and see if that helps any, but if anyone else has had similar experiences - or resolved similar problems - I would love to hear. I'm trying to rapidly develop a prototype - and not being able to get into CLAM's entry point is quite frustrating :D

./Ali

_______________________________________________
CLAM mailing list
CLAM@...
http://www.iua.upf.es/mtg/clam
David García Garzón | 28 Sep 18:28 2007

Re: building on windows.

After having a lot of problems trying to have a reproducible VisualC 
environment, we dropped VC support in CLAM version 1.1, in favor of mingw. In 
fact, one of the reasons was that we were having problem with the static 
objects we use to intitialize processings factory. They should be working 
perfectly with wine. To my suprise you seem to have the same problem (not 
being able to create some processing types) with precompiled 1.1.0 version of 
the NetEditor available on the web which was already compiled with mingw.

We are currently moving to a new office. So we can not test the binaries to 
check what's happening. Just to be sure, try one of the latest svnsnapshots 
at: 
http://clam.iua.upf.edu/download/win/svnsnapshots/

I just tested the latest snapshot under wine (windows emulation under linux) 
and the creation of processing modules worked pretty well.

About the compilations errors you say, it is better that you copy and paste 
them so we can tell you something about them. If you did modifications to the 
source code to get it compiled we would be glad if you send them to the list. 

David.

El Friday 28 September 2007 08:26:58 Ali-Akber Saifee va escriure:
> Hi there.
> I'm looking at using CLAM for a project that my team is looking at. We're
> hoping to create a platform independent solution - but our primary
> expertise lies in Windows development, therefore we're hoping to create a
> working prototype on windows first.
>
> So here lies my problem :
> My dev environment contains:
> - Windows SDK ( v6 )
> - Visual Studio 2008
> - DirectX 10 SDK.
>
> Clam source 1.1.0
>
> Using the above + the dependencies claimed by CLAM  - I set up the scons
> build environment and immediately ran into problems.
>
> Problem 1 : scons configure fails on id3lib. looking into the
> config.logfile, it shows a few linking errors. I hacked around and
> using updated
> id3lib binaries (recompiled using VS2008) I got that error to subside.
> Subsequently, I got as far as doing a scons - which ended up in compile
> time errors with CLAM src's - having mostly to do with 'default int'
> declarations etc. After hacking around with the CLAM src's I finally got it
> to build - only to realise that every time I tried to build an example I
> got more linking errors.
> Problem 2: When I install the NetworkEditor using the installer (1.1.0) if
> I try to add any of the Audio I/O processings I get an error message
> similar to 'The processing type 'MonoAudioFileReader' is not supported'.
> When trying to use the same processing using the clam libs that I had built
> in 'Problem 1' I was getting similar errors (Processing not enumerated
> etc).
>
> Right now, I'll try to check out a svn snapshot of 1.2 and see if that
> helps any, but if anyone else has had similar experiences - or resolved
> similar problems - I would love to hear. I'm trying to rapidly develop a
> prototype - and not being able to get into CLAM's entry point is quite
> frustrating :D
>
> ./Ali

Gmane