time position

295 views
Skip to first unread message

Matan Markovics

unread,
Jun 11, 2012, 4:01:54 PM6/11/12
to echoprint
Hi everyone,

Firstly just wanted to say that I'm came across this tool and it's
amazing.

I have several songs and a recording. Beside of finding the actual
song the recording is taken from, I'm trying to get the position in
the song of the recording
for example I stared recording a song 45 seconds into it, so I want
the tool to tell that position.
I tried to understand the time stamps mechanism but I just couldn't.
In the json file that are multiple pairs with the same time stamps, so
I probably missing something.

Can someone help me with that?

Thanks,
Matan



li

unread,
Jul 2, 2012, 9:56:45 AM7/2/12
to echo...@googlegroups.com
As far as I understand, the algorithm of echoprint is fairly similar to the shazam algorithm published in 2003 by Whang.
As written in the code at each detected onset (the time values) corresponds 6 hashes (so you may have for each time index 6 pairs (time, hash) and you can change the value if you like). The six values correspond somehow to the 6 peaks with the highest magnitude in the spectrum of the signal at the given time index.
 best,
lise

Andrew Nesbit

unread,
Jul 2, 2012, 12:26:00 PM7/2/12
to echo...@googlegroups.com
Hi Matan,

An Echoprint fingerprint is a string of numbers, grouped into (hash, time) pairs and formatted as follows:

fp = 'hash_{1,1} time_{1,1} hash_{1,2}  time_{1,2} ... hash_{1,N_1} time_{1,N_1}
      hash{2,1} time_{2,1} hash_{2,2} time_{2,2} ... hash_{2,N_2} time_{2,N_2}
      ...
      hash{8,1} time_{8,1} hash_{8,2} time_{8,2} ... hash_{8,N_8} time_{8,N_8}'

The audio is split into 8 subbands and the analysis is performed in each subband independently of the other subbands. The (hash, time) codes are listed in a time-ordered sequence for the first subband, then come the (hash, time) pairs for the second subband, etc, all the way up to the eighth subband. The first number inside the curly braces is the subband, the second number is the index of that (hash, time) pair within that subband, so that the jth subband contains N_j (hash, time) pairs. Multiply a time code by 23.2 to get the real time, in milliseconds, corresponding to that time code.

At the end of each subband you will indeed find several identical (hash, time) pairs (six per subband). Have a look at this thread in case you are interested in a detailed discussion: http://github.com/echonest/echoprint-codegen/pull/38 This will be fixed in a future revision but it is a minor artefact of the way the codegen implementation works and has negligible impact on performance, so it's not worth worrying about too much.

Best,

Andrew

Luciano Salemme

unread,
Jul 9, 2012, 12:21:35 PM7/9/12
to echo...@googlegroups.com


Hi Andrew,

     i follow your instruction "Multiply a time code by 23.2 to get the real time, in milliseconds, corresponding to that time code" in the echoprint_codegen at line 236 of Fingerprint.cxx, i added this line

     fprintf(stdout, "quantized_time---->%f", (time_for_onset_ms_quantized*23.2)/1000);

     and the output is the real time of elaborated track of all subbands...
     Now i have two questions:
 
     1 - It is possible to get the reverse match server side? So on server during query is possible reveal "time_for_onset_ms_quantized" varible and return some middle time of all match?
     2  - Why 23.2??? (optional answer :D)

Andrew Nesbit

unread,
Jul 9, 2012, 12:50:40 PM7/9/12
to echo...@googlegroups.com
Hi Luciano,

On Mon, Jul 9, 2012 at 5:21 PM, Luciano Salemme <luciano...@gmail.com> wrote:
Hi Andrew,

     i follow your instruction "Multiply a time code by 23.2 to get the real time, in milliseconds, corresponding to that time code" in the echoprint_codegen at line 236 of Fingerprint.cxx, i added this line

     fprintf(stdout, "quantized_time---->%f", (time_for_onset_ms_quantized*23.2)/1000);

     and the output is the real time of elaborated track of all subbands...

OK, that looks fine.
 
     Now i have two questions:
 
     1 - It is possible to get the reverse match server side? So on server during query is possible reveal "time_for_onset_ms_quantized" varible and return some middle time of all match?

I am not sure that I understand the question. Do you want to retrieve the time indices corresponding to a matched segment?
 
     2  - Why 23.2??? (optional answer :D)

23.2 ms corresponds to 256 points at 11025 Hz sampling frequency, which is the rate the fingerprinter works at.

Best,

Andrew


Luciano Salemme

unread,
Jul 10, 2012, 2:27:41 AM7/10/12
to echo...@googlegroups.com
Hi Andrew, thanks a lot for the answers!! Yes I want to retrieve the time indices corresponding to a matched segment server side and then i return it back to the iphone

regards.

Kenneth Barry

unread,
Nov 19, 2016, 4:59:54 AM11/19/16
to echoprint, luciano...@gmail.com
Luciano, I am wondering if you were able to get this going. I am also looking to use echoprint to retrieve the position in the track, and not just the metadata for the track.
Reply all
Reply to author
Forward
0 new messages