IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
finding if two files are continuous (gap detection)?
atod
post Jul 28 2013, 17:12
Post #1





Group: Members
Posts: 7
Joined: 9-February 11
Member No.: 88044



Hi Folks,

I'm trying to determine if two audio files have a gap between them. For instance if the end of track 0, transitions into the beginning of track 1 with no gap.

I suspect there is some audio processing here and thought the sox list would be a good place to start. For instance, the last sample of track 0 could have perhaps close amplitude level as first sample of track 1. Other considerations would be frequency analysis. I'm hoping there is some tool or low level library that could accomplish this automatically.

Anyone have any suggestions or could point me in the right direction?

Thanks
Go to the top of the page
+Quote Post
saratoga
post Jul 28 2013, 17:15
Post #2





Group: Members
Posts: 4857
Joined: 2-September 02
Member No.: 3264



Are these lossy or lossless files ?
Go to the top of the page
+Quote Post
atod
post Jul 28 2013, 17:34
Post #3





Group: Members
Posts: 7
Joined: 9-February 11
Member No.: 88044



QUOTE (saratoga @ Jul 28 2013, 18:15) *
Are these lossy or lossless files ?


Lossless. FLAC files converted to WAV.

Why? Would lossy require more heuristics?
Go to the top of the page
+Quote Post
atod
post Jul 28 2013, 17:46
Post #4





Group: Members
Posts: 7
Joined: 9-February 11
Member No.: 88044



QUOTE (atod @ Jul 28 2013, 18:34) *
QUOTE (saratoga @ Jul 28 2013, 18:15) *
Are these lossy or lossless files ?


Lossless. FLAC files converted to WAV.

Why? Would lossy require more heuristics?


At the moment, I'm inspecting the two files with http://www.sonicvisualiser.org, which displays a spectogram of the audio. I'm thinking a good match could be made here using three factors for the last samples of track 0 and first few samples of track 1. Using silence gap, change in RMS amplitude for the samples and spectrum match for the samples. Obviously some hueristic would need to be applied. I'm hoping to avoid reinventing the wheel here.

There are some other tools that appear to look at frequency domain, which I'm still investigating:
http://dream.cs.bath.ac.uk/software/sndan/mqan.html
http://dream.cs.bath.ac.uk/software/sndan/pvan.html

Suggestions are appreciated.

Thanks
Go to the top of the page
+Quote Post
saratoga
post Jul 28 2013, 17:52
Post #5





Group: Members
Posts: 4857
Joined: 2-September 02
Member No.: 3264



Measuring time is easiest in the time domain. If they are lossless this is easiest. Just take the RMS power of the signal in the last fraction of a second and pick a threshold.
Go to the top of the page
+Quote Post
atod
post Aug 2 2013, 21:10
Post #6





Group: Members
Posts: 7
Joined: 9-February 11
Member No.: 88044



QUOTE (saratoga @ Jul 28 2013, 18:52) *
Measuring time is easiest in the time domain. If they are lossless this is easiest. Just take the RMS power of the signal in the last fraction of a second and pick a threshold.



I have been playing with the Sound Visualiser (open source) to see if there is any relationship between the last few seconds of track 0 to the first few seconds of track 1 which may suggest that the two tracks are contiguous. For instance, the second half of The Beadatles Abbey Road album has contiguous "gapless" tracks. I'm hoping to detect such tracks with audio analysis and additional information from the original CD (each audio file represents a track from a CD, unfortunately may not include a TOC with gap info). This may have some similar goals as a spectrogram is involved.

So far ideas are to use knowledge that each audio file represented a real track on the CD and the following:

o Use RMS volume between samples, variance should be minimal
o Spectrum analysis between samples
+ Peak Bins between samples
o Use Melodic analysis between samples
+ dB for certain percentage of frequencies line up between samples
+ Phase?

Here are some screenshots which displays Track 10 and 11 joined together. These two tracks play from a CD contiguously without gap from 2:26:26 position (cursor is there in screenshots). Thoughts on this are appreciated.

http://imageshack.us/a/img708/7442/rfg9.png
http://imageshack.us/a/img209/4337/ard.jpg
http://imageshack.us/a/img96/8233/if3i.jpg
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th July 2014 - 11:31