This forum is in permanent archive mode. Our new active community can be found here.

Programming Challenge - save an episode of GeekNights

So, I fucked up. (And, relevant to the show, didn't pass the buck). ;^)

The new version of Audition CC fucked up the clock timing in the mixer (thanks to a WASAPI issue). This introduced regular silent gaps in the show audio from tonight. Extremely regular. 70ish audio samples (I didn't count, but they look perfectly regular) spaced evenly.

It makes the show sound like shit.

Now, I was able to fix it going forward after hitting some Adobe support and getting ASIO working again instead. But, tonight's show, as I said, sounds like shit.

I do have the Marantz backup, but

1. It's mono
2. Scott is clipping badly (I never re-leveled it since I used it in the car on the way to the shore)

So, it sounds JUST AS MUCH like shit.




Thus, my challenge to you. Write me a script that can remove (just delete) these periodic sets of zero samples from the wav files.

image

image

image

image


Sample:
https://drive.google.com/a/frontrowcrew.com/file/d/0B9Tov5UjNvVtYTB5YlBBekZwU0E/view?usp=sharing


If you do this, I'll pay you some cash money and everlasting fame. Hell, you can even be on GeekNights if you want. Replace me as the host for a night, on account of my fuckup. ;^)


If no one does it, I'll take a crack at it this weekend, but I won't have time until then. It's a bit too granular to use an existing Audition filter for, especially considering the periodic nature of the interference.

«1

Comments

  • I thought you already had a script or something that cut out long pauses and whatnot when you explained how you edit the show a few years ago?
  • I thought you already had a script or something that cut out long pauses and whatnot when you explained how you edit the show a few years ago?

    Totally different problem. Also, we haven't used that since, like, 2009.

    That reduces silences (defined as under n amplitude for x milliseconds) by 50%.

    The same filter can't work on the raw sample level. Even Audition's built-in ones can't process increments smaller than 10ms.

    Also, this issue is periodic. n zero samples every x samples need to be removed. Other "silences" aren't a problem, and trying to remove them based solely on when something was silent irrespective of the period would throw things all out of sync.

  • It appears even simpler, due to the fact that there is a non-zero noise floor.

    Any sequence of exactly 71 zero samples must be deleted.
  • It's not exactly 71 zeros, though. Looking at raw bytes, it's mostly zeros, with the occasional 1,0,0 and 255,255,255.
  • RymRym
    edited June 2015
    okeefe said:

    It's not exactly 71 zeros, though. Looking at raw bytes, it's mostly zeros, with the occasional 1,0,0 and 255,255,255.

    Just noticed that myself poking around with wave in python.

    It's exactly 71 sequential frames that are zero or within that narrow range from what I can see. "Regular" old silence doesn't ever seem to go that many frames without many significant outliers.

    Visualized (the points are the actual data, per Audition). Soom all the way in, and you see the tiny variations:

    image


    "Real" silences never look like that.

    Post edited by Rym on
  • I just downloaded a trial copy of Matlab w/ the signal processing toolbox, and shot a note out to their users group asking for some sample scripts for chopping out samples from .wavs. If they send me anything decent, I'll try to take a look at it later this week when I have more time, and I'll hopefully be able to tweak whatever scripts so they fit the specific problem here. No promises.
  • Rad!

    I might have a for-real copy of Matlab at work (for an unrelated project) that I can use. I'll have to see tomorrow.

    I wrote a shit script in Python that was pretty inaccurate and only applied to a small sample, but it proved that if those silences are cut, the audio is OK.
  • edited June 2015
    Why the heck were you using WASAPI? You have the same interface that I do. What did the new CC do to fuck up so badly?
    Post edited by Victor Frost on
  • Yeah, I can remove the 71-sample chunks, but it still sounds poppy over the speech.

    https://www.dropbox.com/s/naob7q4v1cqhfr9/fixed.wav?dl=0
  • okeefe said:

    Yeah, I can remove the 71-sample chunks, but it still sounds poppy over the speech.

    https://www.dropbox.com/s/naob7q4v1cqhfr9/fixed.wav?dl=0

    That's a lot better. The popping that remains (you can only see it in spectral visually) is a lot easier to deal with than the missing samples.

    image

    The top is your fixed file. It sounds a lot better, but you can see the pops.

    I can use regular audio filters to pull the pops out (bottom), and it's eminently listenable.


  • Why the heck were you using WASAPI? You have the same interface that I do. What did the new CC do to fuck up so badly?

    It switched to WASAPI after the upgrade and I didn't notice... Waveforms were writing, and you wouldn't even notice the issue unless you zoomed way in. ;^)

  • The actual episode files:
    https://drive.google.com/file/d/0B9Tov5UjNvVtOEVSbUFnNm9LTUU/view?usp=sharing

    Playing with Okeefe's fixed file, I can remove the pops pretty well with a couple of passes of a bunch of different filters.
  • Roboscott sounds awesome.
  • Sounds like you got burned a little by the updates you were praising a couple weeks back.
  • It won't let me download the sample, but I'm assuming there are too many consecutive zero samples to just take them out with a low-pass?
  • Pegu said:

    Sounds like you got burned a little by the updates you were praising a couple weeks back.

    (y)
  • Ikatono said:

    It won't let me download the sample, but I'm assuming there are too many consecutive zero samples to just take them out with a low-pass?

    Low-pass works on frequency, not amplitude. It also doesn't delete samples: it removes frequencies.
  • Pegu said:

    Sounds like you got burned a little by the updates you were praising a couple weeks back.

    (y)
    image

  • Rym said:

    Ikatono said:

    It won't let me download the sample, but I'm assuming there are too many consecutive zero samples to just take them out with a low-pass?

    Low-pass works on frequency, not amplitude. It also doesn't delete samples: it removes frequencies.
    The sudden transition from a real data point to a zero requires a high frequency, so a lowpass filter will pull the zeros towards the surrounding real data. I know it works well on single zeros (that's how upsampling works) but I'm assuming groups of 71 are probably too many. I've never really worked with signals where the short time fourier matters.
  • Yeah, that's the problem. You can see in the zoomed in view:
    image

    You get that typical high frequency burst at either edge. But then there's the long segment of essentially missing samples in the middle, hovering near zero. Because it's so long, it's not (insofar as I can imagine) able to be reconstructed easily, and it wreaks all manner of havoc with most of the tools I have at my disposal.
  • edited June 2015
    Probably won't fixt your issues. Buy you might try puting a banging donk on it. Just sayin.
    Post edited by Josh Bytes on
  • Rym said:

    Why the heck were you using WASAPI? You have the same interface that I do. What did the new CC do to fuck up so badly?

    It switched to WASAPI after the upgrade and I didn't notice... Waveforms were writing, and you wouldn't even notice the issue unless you zoomed way in. ;^)
    Fucking aye, that sucks.

    Probably won't fixt your issues. Buy you might try puting a banging donk on it. Just sayin.

    Thank you for reminding me that this exists.
  • Stage two. From Okeefe's removal of the 71 consecutive near-null samples, I'm now working on removing the popping and crackling artifacts that remain.

    image
  • Here you can see the results more clearly. The top is the fixed files from Okeefe with the samples deleted. The bottom is after I ran a fairly complex filter process.

    The pops and crackles show up pretty plainly as the uniform vertical lines in the spectral display.

    image
  • I think the audio ended up being too fast because of the deleted samples. The end file should be the same length as the original. It didn't sound like the pitch was raised though.
  • I could have slowed it down, but that introduces more artifacts.

    The pitch wasn't raised because no frequencies were changed. The file was uniformly shortened. It acted like a rough version of a speed shift effect.

    Interpolation rarely works well. Better to just cut them out and be done with it.
  • You mentioned that a potential reward for fixing this is getting to be on Geeknights. I would like to nominate Tresi for his great effort here, and let him be on for the episode where you need a 3rd person to objectively view each of your assholes to judge the resulting cleanliness of your wiping technique.

    Nobody responded to my Matlab user group request. Jerks. I'm still curious to see if I could do this, and how it would sound, but I don't have time to build the whole structure. Plus, somebody did it already!
  • Great job Tresi! Hip hip hooray!
Sign In or Register to comment.