Page 1 of 1

search track for file-based sound byte

Posted: Tue Aug 24, 2010 6:50 am
by Edgar
I have a large track (about 10 hours long). I know there are multiple instances of a specific "sound byte" in the track. I have a WAV file of the "sound byte". How can I search the track based on the file? I am almost certain there is code in the Audacity source which will do this but I cannot determine the interface!

Re: search track for file-based sound byte

Posted: Tue Aug 24, 2010 7:30 am
by steve
Do you mean that a "specific file" has been imported and exists at several locations, or do you mean a "similar sound-byte"?

If you mean a specific imported file, and if it was an uncompressed file, and if it was not copied into the data folder, then it will be listed in the AUP file.
In any other case I think you're out of luck.

Or are you referring to the "Audio Diff" proposal? http://wiki.audacityteam.org/wiki/Proposal_Audio_Diff

Re: search track for file-based sound byte

Posted: Tue Aug 24, 2010 3:30 pm
by Edgar
stevethefiddle wrote:Do you mean that a "specific file" has been imported and exists at several locations, or do you mean a "similar sound-byte"?

If you mean a specific imported file, and if it was an uncompressed file, and if it was not copied into the data folder, then it will be listed in the AUP file.
In any other case I think you're out of luck.

Or are you referring to the "Audio Diff" proposal? http://wiki.audacityteam.org/wiki/Proposal_Audio_Diff
I just read the linked proposal and it has some bearing.

What I am trying to accomplish:

I like to listen to KCEA (24/7 commercial-free big band music) online (kcea.org). I record it overnight or when I am gone from home. The resulting files are often 8 to 10 hours long. I want to break these up into smaller tracks and put them on CD to which I can listen in the car or at work plowing the north forty.

I know that about every once in a while they play a station ID sound byte, it is very distinctive but is all music (instrumental and vocal) so I cannot spot it at high speed as I can most speech.

I grabbed a very carefully selected copy of this and using "Export Selection" now have it as a WAV file. I want Audacity to sift through the long track and put a label at every occurrence of the station ID. I will Export Multiple the result and have small enough tracks to create CDs.

I had briefly run across this in the code:
AudacitySVNsrccommandsCompareAudioCommand.cpp
compare.png
compare.png (73.61 KiB) Viewed 2224 times
and thought it might be helpful but could find no obvious interface.

Re: search track for file-based sound byte

Posted: Tue Aug 24, 2010 6:15 pm
by kozikowski
You only need to find the first one and it should be once an hour or half-hour after that. I'm trying to remember... I think you need to station ID at least once an hour and you're allowed to slide it if it conflicts with the show.

If you have the accurate time that you started recording, then it should be possible to get close in a hurry.

If it's a college station and plays the whole broadcast day ad. lib., then that's harder. Even they change shows every so often -- generally on the hour.


I wounder if you could do something really out there like use the station ID as a profile for Noise Reduction. Apply it and look for the holes.
Koz

Re: search track for file-based sound byte

Posted: Tue Aug 24, 2010 6:46 pm
by steve
kozikowski wrote:I wounder if you could do something really out there like use the station ID as a profile for Noise Reduction. Apply it and look for the holes.
Koz
That works, (tested with a 3.5 second jingle) though the noise removal settings need to be severe and so cause a lot of damage to the audio, so after running Noise Removal, run Silence Finder, Export the label track, then Undo the label track and Noise Removal and import the label track back in. If the original track had any silences there will of course be additional labels, but silence finder could be run before and after Noise Removal, then you are just looking for new labels that were not in the first label track.

Re: search track for file-based sound byte

Posted: Tue Aug 24, 2010 10:05 pm
by Edgar
kozikowski wrote:You only need to find the first one and it should be once an hour or half-hour after that. I'm trying to remember... I think you need to station ID at least once an hour and you're allowed to slide it if it conflicts with the show.

If you have the accurate time that you started recording, then it should be possible to get close in a hurry.

If it's a college station and plays the whole broadcast day ad. lib., then that's harder. Even they change shows every so often -- generally on the hour.


I wounder if you could do something really out there like use the station ID as a profile for Noise Reduction. Apply it and look for the holes.
Koz
It is a high school station and has only a couple of "shows" each week, otherwise it seems to be a random shuffle playlist (they say that there are over 16,000 songs on the playlist and I feel that repeats are few and far between--except once in a blue moon the same track will play twice in one hour!). Station ID id also random sometimes seems to be a couple hours in between other times a few times per hour. To make the job more interesting, they play "remembers", these are vintage ('20s, '30s & '40s) advertisements but they only have 8 or 10 of them and they get old in a hurry--I would filter those out as well.

stevethefiddle wrote:
kozikowski wrote:I wounder if you could do something really out there like use the station ID as a profile for Noise Reduction. Apply it and look for the holes.
Koz
That works, (tested with a 3.5 second jingle) though the noise removal settings need to be severe and so cause a lot of damage to the audio, so after running Noise Removal, run Silence Finder, Export the label track, then Undo the label track and Noise Removal and import the label track back in. If the original track had any silences there will of course be additional labels, but silence finder could be run before and after Noise Removal, then you are just looking for new labels that were not in the first label track.
This seems to be a good possibility. I had a quick look at the code I pictured above and it seems to be made for the job but I do not see any way to activate the interface. I have done a bit of coding on the task today and I think it will be fairly (??? :> ) easy to write/borrow code to accomplish what I want. I just did not have a great desire to re-invent the solution.

Re: search track for file-based sound byte

Posted: Wed Aug 25, 2010 8:58 pm
by kozikowski
<<<except once in a blue moon the same track will play twice in one hour!>>>

You can get a lot of good jokes out of "Random."

Like where is it written that "Random" can't have the same song twice, one after the other? You go find it. I'll wait here.

That's not desirable, but it can be totally random in that it will never happen again in hundreds of years.

When people started to design visual noise systems -- Stochastic Generators, they found out in a hurry that they couldn't really be random -- pictures looked very bad when they did that. They had to generate customizing to eliminate clumping and bare spots. Sorry, no longer Random! Random has clumping.

People then started to get reputations on how non-random their stochastic generators were.

Are you ROFL'ing yet?

Koz

Re: search track for file-based sound byte

Posted: Wed Aug 25, 2010 9:34 pm
by Edgar
kozikowski wrote:<<<except once in a blue moon the same track will play twice in one hour!>>>

You can get a lot of good jokes out of "Random."

Like where is it written that "Random" can't have the same song twice, one after the other? You go find it. I'll wait here.

That's not desirable, but it can be totally random in that it will never happen again in hundreds of years.

When people started to design visual noise systems -- Stochastic Generators, they found out in a hurry that they couldn't really be random -- pictures looked very bad when they did that. They had to generate customizing to eliminate clumping and bare spots. Sorry, no longer Random! Random has clumping.

People then started to get reputations on how non-random their stochastic generators were.

Are you ROFL'ing yet?

Koz
I realize that this is valid random behavior but if I was writing the "randomizer" for a playlist I might consider adding a "recently played" filter. Maybe not rolling on the floor but at least grinning!

Re: search track for file-based sound byte

Posted: Wed Aug 25, 2010 9:35 pm
by steve
kozikowski wrote:People then started to get reputations on how non-random their stochastic generators were.
Ok so it's off topic, but the decimal places of Pi can look random, though they're not.

3.141 592 653 589 793 238 462 643 383 279 502 884 197 169 399 375 105 820 974 944 592 307 816 406 286 208 998 628 034 825 342 117 067 982 148 086 513 282 306 647 093 844 609 550 582 231 725 359 408 128 481 117 450 284 102 701 938 521 105 559 644 622 948 954 930 381 964 428 810 975 665 933 446 128 475 648 233 786 783 165 271 201 909 145 648 566 923 460 348 610 454 326 648 213 393 607 260 249 141 273 724 587 006 606 315 588 174 881 520 920 962 829 254 091 715 364 367 892 590 360 011 330 530 548 820 466 521 384 146 951 941 511 609 433 057 270 365 759 591 953 092 186 117 381 932 611 793 105 118 548 074 462 379 962 749 567 351 885 752 724 891 227 938 183 011 949 129 833 673 362 440 656 643 086 021 394 946 395 224 737 190 702 179 860 943 702 770 539 217 176 293 176 752 384 674 818 467 669 405 132 000 568 127 145 263 560 827 785 771 342 757 789 609 173 637 178 721 468 440 901 224 953 430 146 549 585 371 050 792 279 689 258 923 542 019 956 112 129 021 960 864 034 418 159 813 629 774 771 309 960 518 707 211 349 999 998 372 978 049 951 059 731 732 816 096 318 595 024 459 455 346 908 302 642 522 308 253 344 685 035 261 931 188 171 010 003 137 ...

Re: search track for file-based sound byte

Posted: Wed Aug 25, 2010 9:42 pm
by Edgar
I resolved the issue by adjusting the granularity of the Nyquist plug-in for SilenceMarker:

Code: Select all

;control sil-dur "Minimum duration of silence [seconds]" real "" .04 0.01 5.0
;control labelbeforedur "Label placement [seconds before silence ends]" real "" 0.01 0.0 1.0