[Clam-devel] Re: Turnaround

Pawel Bartkiewicz tuuresairon at gmail.com
Tue Aug 5 05:23:50 PDT 2008


Ok, it took me some time to understand, but here's a patch. I'm not
committing it, because it's not complete yet. It replaces the realtime
analysis with a VectorView displaying the time code. I had to change
AudioFileMemoryLoader a bit.

BTW, I had to update scons 0.97 to 0.98.5 (masked as unstable in
Gentoo) because one of the recent commits added the following error in
sconstools/qt4.py when building Turnaround:
"SConsEnvironment instance has no attribute 'AddMethod'"


On 02/08/2008, David García Garzón <dgarcia at iua.upf.edu> wrote:
> Pawel, I did some changes on the PoolDataArraysource in order to easy your
> task, so update your repository before going on.
>
> El Saturday 02 August 2008 00:06:23 David García Garzón va escriure:
>> 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:
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Turnaround-offline_timecode.patch
Type: text/x-diff
Size: 30322 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080805/41a1a925/attachment-0003.patch>


More information about the clam-devel mailing list