[Closed] [4.5.0] Music Issues Part Deux

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[4.5.0] Music Issues Part Deux

Postby SanyaWaffles » Sat Jan 02, 2021 1:49 am

I'm putting this here to not clog up Enjay's thread, which I have been told is a completely different issue.

So it seems despite us using zero-point phase loop points with sample-point accuracy for the LOOP_* metadata, there's still a noticeable pop at first. It tends to go away after a few loops, but the first time it's really noticeable if you're listening for it.

Here's a test file that we know for sure has loop points set at parts that have zero-point phase loop points. (Drag it into GZDoom, changemus M_SINT) and it'll exhibit a pop at the loop point.

https://www.dropbox.com/s/t0g604ra9mr9h ... T.ogg?dl=1

We've done the following steps:

1.) Use audacity to identify zero-point phase samples that we can use to loop points close to where the loop points are in Reaper. For some tracks this was difficult, but most of them should be fine - especially the ambient tracks which had a lot more zero-point samples to work with.
2.) It does it with any sort of music - ambient or more instrumental alike.
3.) We've tried various quality of the OGGs (and different formats, like FLAC) to no avail.
4.) It doesn't pop in Reaper or when me or Metal use other looping formats in other engines/tools. I get Reaper it wouldn't since it's generating the samples on the fly using all the plugins Metal is using, but it doesn't explain it for other formats that loop. Metal was able to use a Brawl modding tool to get it to loop fine. I know it's not an apples to apples, but using the exact same loop points being fed into GZDoom, the looping is a problem only with GZDoom. Perhaps there's something being done differently in how that music format works compared to OGG/FLAC looping in ZMusic/GZDoom.

Here's the thing that is interesting - it seems it goes away after the first few loops, at least from our testing. It's exhibiting this behavior on two different machines with, in my case, two different speakers. I highly doubt it's something to do with our machines alone.

I tried it with 4.3.3 and it the pop is still noticeable on the first thing, so I doubt it has to do with ZMusic being split off into it's own DLL.

It's either that, or we're still doing something wrong with the mastering of the tracks still. The problem is we keep revisiting this issue, and it never seems to be fixed no matter what we try. I'd like to figure out what is exactly going to fix this so I can perhaps write a tutorial, so I can spare others what we've been going through.

I do have other music I can try to do loops with, but it's kind of mixed loudly and I don't notice a pop due to how loud it is compared to Metal's soundtrack. I guess the loud mixing of Rod's music from DD1 covers up any pops it may exhibit.
User avatar
SanyaWaffles
Now I've awoken, and I'm taking back control.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.5.0] Music Issues Part Deux

Postby Graf Zahl » Sat Jan 02, 2021 2:12 am

I noticed something interesting with this sound: When playing this back in Audacity, it pops every single time the playback stops. I have checked lots of other Oggs, but none does it this predictably and reproducably as yours. When zooming into the waveform it looks extremely regular with one component regularly repeating throughout the entire file.

There must be some component in this sound that perfectly hates being interrupted in any way. I also know no tool to visualize the loop point in here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.5.0] Music Issues Part Deux

Postby Rachael » Sat Jan 02, 2021 2:21 am

@ Graf: I am not noticing the pops you mentioned, at least not as badly.

Though I am curious, what happens if you load the sound, hit "Ctrl-A" and go to "Effect->Normalize"? (Use the default settings) Do you still get the pops?

Also unfortunately I think Audacity doesn't support loop points, or if it does, at least not with whatever setup GZDoom is using.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.5.0] Music Issues Part Deux

Postby Graf Zahl » Sat Jan 02, 2021 2:47 am

When I normalize it it gets a bit louder, but no change otherwise - every time I pause and resume in Audacity it pops.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [4.5.0] Music Issues Part Deux

Postby SanyaWaffles » Sat Jan 02, 2021 3:55 am

That is bizarre. I've never ever seen anything like this in audio. I'll relay this to Metal Neon and let him know.

EDIT: We're testing it in Audacity, it pops there. Same with MPC-HC. It doesn't pop in VLC.

EDIT2: Hey, would reverb or it being a 24-bit file have anything to do with this? Like reverb applied via the DAW we're using and it's being exported as 24-bit. Would that make it pop like this?
User avatar
SanyaWaffles
Now I've awoken, and I'm taking back control.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.5.0] Music Issues Part Deux

Postby Rachael » Sat Jan 02, 2021 4:09 am

What's making it pop is the waveform's persistent tendency to stay away from the 0-mark. This could be caused by a lot of things - and it's the reason why I asked Graf what happened when he "normalized" it - I thought it was a simple DC-offsetting issue, which it wasn't.

I noticed when I hit it with a high pass filter the pops were still there but less obvious.

At any rate, the reason why it is popping is because the speaker is never at rest playing the sound. So when it suddenly "achieves" this rest state, it causes a sharp wave in the air which you would describe as that pop.

Unlike speakers, air always achieves an at-rest state after a disruption (i.e. sound waves) has passed, even if the speaker itself is frozen in a non-0 state. So when the speaker moves suddenly to its rest position (sound being paused), that creates the pop.

There are ways to mitigate this but it would involve artistically changing the sound, which is why I never suggested them. But removing a lot of the background noise (I know, this is synthesized so it's most definitely put there intentionally) will reduce a lot of popping effects.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.5.0] Music Issues Part Deux

Postby Enjay » Sat Jan 02, 2021 4:22 am

Just to confirm what others have observed - I get pops in Audacity, GoldWave, MPC-HC and MPC-BE whenever playback stops with this track.

I do not get pops with Foobar2000.

I don't have VLC installed.

Purely as a side-quest, I converted it to an MP3 (I know, I know) to play it in Windows Media Player and there were no pops, but the same MP3 still popped in MPC.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [4.5.0] Music Issues Part Deux

Postby Rachael » Sat Jan 02, 2021 4:30 am

Well what could easily fix this issue is if GZDoom had a crossfade looping feature. I have no idea how easy such a thing would be to implement, though. Crossfading would eliminate the pops entirely, but it still has risks of distorting the audio if the looping point is put on points with exactly the same wavelengths since they would overlap.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.5.0] Music Issues Part Deux

Postby SanyaWaffles » Sat Jan 02, 2021 4:49 am

That's actually something Metal suggested to me, the crossfading thing.

We've been trying to figure out how the audio is rendered. We removed reverb from the file and it didn't do anything.

I'm going to suggest we try changing the instruments next but right now our theory is Reaper is rendering it weird.
User avatar
SanyaWaffles
Now I've awoken, and I'm taking back control.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.5.0] Music Issues Part Deux

Postby SanyaWaffles » Sat Jan 02, 2021 5:07 am

So we did some investigation, considering we're going with an Aubrey Hodges inspired soundtrack, me and Metal have decided this is not an issue anymore. I just wanted to make sure this was absolutely not an issue with GZDoom that could have been overlooked, but looking at it now, it's a problem outside the engine and with how the music is.

We looked at Aubrey Hodges music as a comparison, it has a similar thing present on all versions (and I mean no disrespect to Mr. Hodges, I'm just saying that as a point of reference for the kind of music we're going for). The audio pops in his versions - the bandcamp releases and the old capture card rips used in PSX Doom TC, all exhibit this problem.

It's alas, a stylistic choice that we've decided to settle on.

That said, this has given me a lot of the ins and outs of how audio works, and I think I have enough under my belt to write a tutorial on this to help aid people in the future, and one thing is some music isn't going to be suitable for looping 'cleanly' without sacrificing the artistic vision.

Sorry we wasted time on this, but I wanted to be absolutely sure.

That said, we do think a crossfade option would be an excellent addition if possible.
User avatar
SanyaWaffles
Now I've awoken, and I'm taking back control.
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.5.0] Music Issues Part Deux

Postby Rachael » Sat Jan 02, 2021 5:56 am

Please make a thread for that so it's not completely forgotten about.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest