Need pointers on adding feature to search pattern

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
audio-enthusiast
Posts: 8
Joined: Thu Apr 10, 2014 7:46 am
Operating System: Please select

Re: Need pointers on adding feature to search pattern

Post by audio-enthusiast » Fri Apr 11, 2014 11:10 am

steve wrote:The current version is 2.0.5 which is available here: http://audacityteam.org/download/
I'm running Ubuntu Precise, so latest version for me is 2.0.0 May be that's why the shortcut is missing.

@Robert, I tried that (hitting N under All), Nyquist Prompt didn't come up.

Robert J. H.
Posts: 1815
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Need pointers on adding feature to search pattern

Post by Robert J. H. » Fri Apr 11, 2014 7:43 pm

I think the version is too old for that.
I don't know if per chance an alpha version between 2.0.0 and 2.01 with this feature is available and compatible with your OS.

Gale Andrews
Quality Assurance
Posts: 25981
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Need pointers on adding feature to search pattern

Post by Gale Andrews » Fri Apr 11, 2014 9:48 pm

Robert J. H. wrote:I don't know if per chance an alpha version between 2.0.0 and 2.01 with this feature is available and compatible with your OS.
You could uninstall your package of Audacity 2.0.0 then install the "2.0.5+" Audacity version for Ubuntu 12.04 from https://launchpad.net/~audacity-team/+archive/daily . That build is actually the latest Audacity source code 2.0.6-alpha which is not "stable" . Note that you will get updates for it most days unless you remove it from your sources list.

You could instead compile Audacity. Then you can either build latest Audacity HEAD or build the 2.0.5 release tarball. See http://audacityteam.org/download/source for the tarball and http://wiki.audacityteam.org/wiki/Compi ... ers#simple for help with compiling.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

charlesmoretti
Posts: 2
Joined: Wed Apr 16, 2014 7:19 pm
Operating System: Please select

Re: Need pointers on adding feature to search pattern

Post by charlesmoretti » Wed Apr 16, 2014 7:44 pm

Hello

Has this worked for you? I need a similar tool to identify identical advertisements.

I am using audacity to record streaming audio from radio stations. My recordings are normally 10 hr long. In a usual 10hr recording there are about 50-100 advertisements replayed about 4-8 times in each 10hr span. I need a tool that will match identical advertisements in each 10hr recording. Any ideas???
Last edited by charlesmoretti on Fri Apr 24, 2015 4:33 pm, edited 3 times in total.
Reason: Merged contents to one post (vote already counted)

Earthlark
Posts: 5
Joined: Fri Jan 31, 2014 5:13 pm
Operating System: Please select

Re: Need pointers on adding feature to search pattern

Post by Earthlark » Tue Dec 09, 2014 6:45 pm

Any progress on this?

I sometimes have the need to analyze a track for a specific sound that re-occurs in isolation (no other background noises to interfere) throughout the track and put a marker at those spots. I can't seem to find any programs that do this--seems like something people would use fairly often when manipulating sound files, as well something "basic" that audio editing programs could do (if the sound is very close to exactly the same), but maybe it's more complex than I imagine. Or maybe I'm just not using the correct search terms. (Although I know some basics with audio editing stuff, I'm not terribly adept.)

Any recommendations for programs that can do something like this? Cheers!

steve
Site Admin
Posts: 49026
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Need pointers on adding feature to search pattern

Post by steve » Tue Dec 09, 2014 7:06 pm

Earthlark wrote:Any progress on this?
Did you see Robert's post near the start of this topic?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Earthlark
Posts: 5
Joined: Fri Jan 31, 2014 5:13 pm
Operating System: Please select

Re: Need pointers on adding feature to search pattern

Post by Earthlark » Fri Jan 09, 2015 1:59 am

Did you see Robert's post near the start of this topic?
Yeah, but I'm afraid I'm not knowledgeable enough to modify the code to make it work with a sample from my own audio. I tried a manipulating it a bit, but I can't seem to get it.

If anyone has time and could let me know what I need to do to get the right numbers from a sample and input them, I'd appreciate it. :)

(The reason I asked if there was any progress is because I saw that audio-enthusiast mentioned something about "coming up with something more sophisticated", so I thought perhaps a plug-in or something...)
Last edited by Earthlark on Fri Apr 24, 2015 4:33 pm, edited 2 times in total.
Reason: fixed quote tags

Earthlark
Posts: 5
Joined: Fri Jan 31, 2014 5:13 pm
Operating System: Please select

Re: Need pointers on adding feature to search pattern

Post by Earthlark » Fri Jan 09, 2015 3:38 am

Okay, I figured out part of why I couldn't figure things out: the code only seems to work with mono files and I was working with a stereo file.

A few questions:
  1. So the only two numbers I care about are the number of samples and the threshold, right? (The 36000 and 3600 aren't anything I'd want to change?)
  2. Also, is there an efficient way to do this with stereo tracks or had I just better change to mono to find reoccurring audio?
  3. Is there a way to change part of the code to insert bookmarks rather than deleting the non-sampled audio? (Otherwise it seems like the easiest way for me is to paste the analyzed track below the original to find the points of re-occurrence

Robert J. H.
Posts: 1815
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Need pointers on adding feature to search pattern

Post by Robert J. H. » Fri Jan 09, 2015 5:39 am

Earthlark wrote:Okay, I figured out part of why I couldn't figure things out: the code only seems to work with mono files and I was working with a stereo file.

A few questions:
  1. So the only two numbers I care about are the number of samples and the threshold, right? (The 36000 and 3600 aren't anything I'd want to change?)
  2. Also, is there an efficient way to do this with stereo tracks or had I just better change to mono to find reoccurring audio?
  3. Is there a way to change part of the code to insert bookmarks rather than deleting the non-sampled audio? (Otherwise it seems like the easiest way for me is to paste the analyzed track below the original to find the points of re-occurrence
I can help you the way through, I think.
Point 1:
1/36000 is just a scaling factor, we could as well have scaled the threshold to e.g. 12000 (instead of 0.3).
Other pattern durations need other scaling factors.
If we keep the current behaviour (the first x samples are the pattern), then the normalization can be done after the convolution by searching for the highest peak in those x processed samples and by multiplying the rest with 1/<this value>.
The reason is that we won't encounter any higher value since we have found the first perfect match already.
Thus, a threshold of almost 1 would only mark perfect matches.
However, this will probably only produce one match since even equal audio can be off by e.g. half a sample during recording.

3600 means that the whole audio to be analysed can't be longer than 1 hour--arbitrary set.

2. Stereo is rather an advantage than a drawback since we can throw out positives that are not common to both channels. However, time consumption increases naturally.

3. The found matches can be returned as Labels in a separate track.
This needs searching for the samples that are over the threshold and the highest ones in the neighbourhood of pattern-length.

It would be somewhat better to wait until the next release (due this month) in order to implement the code as a plugin.
The pattern could than be in another track or the first/last clip within the track itself.
A multiple choice would ask where to look for it.
Other controls would be pattern length (if not already known), the threshold and the kind of return (silenced audio or labelled occurrances).

Any other ideas?

Robert

Earthlark
Posts: 5
Joined: Fri Jan 31, 2014 5:13 pm
Operating System: Please select

Re: Need pointers on adding feature to search pattern

Post by Earthlark » Mon Jan 19, 2015 9:11 pm

Thanks for the explanation, Robert!

Makes sense to wait till the next release to create plug-in. I can't really think of anything else for the plug-in, but then, I'm not terribly knowledgeable with this sort of stuff. So hopefully those with more experience will make suggestions. Seems like a plug-in that could be quite beneficial to those needing operations such as this!

Post Reply