[Clam-devel] Turnaround

David García Garzón dgarcia at iua.upf.edu
Fri Aug 1 15:06:23 PDT 2008


Back to the list.

We'll take it step by step.

First clearance:
- Do not use toStdString to get file names. Use toLocal8Bit().constData() in 
order to support current locale. toStdString uses Latin1 despite the current 
one. :-(
- Remove the nameProject parameter unless you are using it for anything. If 
you want to provide a song as parameter, rename it and don't forget to use 
the fromLocal8Bit.

Then the actual forward steps. As you have the widgets that make more noise 
than any other thing if you want the analysis, let's forget about the 
analysis and lets concetrate first on the widgets.

The first phase is having a FloatArrayDataSource that allows to travel on an 
extracted pool of dummy data.

First lets create and fill the dummy data on loading the file.
* Create an array of floats of nFrames*12 slots. By now let's take the hop 
size from a constant and the lenght from the audio size.
* Fill the array with a 12 bits binary time code 0, 1, 10, 11, 100, ... loop

Then we should create a view for such data.
* Substitute the KeySpace with a VectorView, changing the port to PCP which is 
simpler to debug than ChordCorrelation port (12 bins vs. a varying number of 
chords depending on the configuration).
* Copy annotator's PoolFloatArrayDataSource.

Instead of relying on the pools and schemas we want to provide the dummy 
parameters by hand, so:
* Comment out the setDataSource and the UpdateData notice that they use the 
Schema (structure) and the DataPool (actual data) to fill some members.
* Provide a setDataSource with nBins, binGap, firstBinOffset and binLabels as 
parameters  so you can do direct mapping. (those bins are bins in a frame, 
pitches, so binGap=firstBinOffset=0 and binLabels are G,G#,A,A#,B...
* Provide an UpdateData with a sampling rate, a frame division, and the array 
of data that you will copy into _data
* Create a PFADS on the Turnarround
* Set the PFADS as the VectorView data source
* Connect the progress control to a Turnaround slot that calls 
PFADS::updateTime with the appropiate parameter.
* Try to use a Tonnetz instead of a VectorView to check the labels

At this point we'll have the widgets visualizing offline dummy data, so you 
can remove the TonalAnalysis and monitors from the real-time network. Then 
start building an offline network that fills the offline structures, our 
widgets know how to display.



El Friday 01 August 2008 21:17:33 Pawel Bartkiewicz va escriure:
> Yes, I was reading mail and working on Turnaround from Monday, but I
> still can't make the offline analysis working, so I haven't sent any
> new patches.
>
> I forgot to commit that old patch, sorry. I've just done it but I had
> to revert and clean up the new code because it wasn't working.
>
> I'm afraid I'll have to write some hack or simply copy the code from
> Annotator's ChordExtractor, because I'm stuck and otherwise I may not
> finish the project on time.
>
> On 01/08/2008, David García Garzón <dgarcia at iua.upf.edu> wrote:





More information about the clam-devel mailing list