[Donion] [1.1.70] Audio imbalances, EVERYWHERE

This subforum contains all the issues which we already resolved.
Moleculor
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Apr 28, 2017 8:07 pm
Contact:

[Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by Moleculor »

I've always been... perturbed? by the slight audio imbalances in Factorio, but ignored them.

But they grate. Oh, how they grate on my ears!

And the recent acknowledgement of a wildly bad example of the audio imbalance has me feeling encouraged that there might be hope for fixing the other audio imbalance issues, and so I present... a slightly clumsy video of me demonstrating several instances of audio imbalance through the use of Audacity.

(I've cut out a few of my most awkward struggles with Audacity and PowerToys's "Find My Mouse", if you notice any cuts in the video. I almost cut out the section demonstrating wind noise, as I felt it went on slightly too long, but ended up not cutting it just for the sake of consistency. Sorry if it drags on a bit.)

Audio imbalances include, but are (probably) not limited to:
  • Building operation audio being shifted right-from-center
    • demonstrated by me "standing" (all demonstrations take place in Sandbox mode) so that a radar is slightly to the LEFT of center (as demonstrated by an on-screen ruler showing approximately 762 pixels remain between a radar and the left edge of the screen, and 857 pixels exist between the radar and the right edge of the screen), and then recording the audio in Audacity and demonstrating a several-decibel difference in the left and right audio channels, with more decibels being on the RIGHT as if the audio is coming from my right, despite the radar being to my LEFT.
      • In full disclosure, I struggled to get the radar truly centered, hence the slight off-set favoring the left.
  • Building pick-up (from inventory) being shifted severely right-from-center
    • This being a sound I associate with UI or player actions, I'd expect it to be centered? The gap is, I believe, a sizeable 4db difference.
  • Building placement being shifted right-from-center
    • This is despite me placing the building in what appears to be slightly-left-of-center. While I don't show measuring it on screen, you can verify that it's the same 746/863 pixel split as the radar on your own if you care to.
  • A slight right-shift of building deconstruction (picking up from the world)
    • Again, placed slightly-left-of-center, but a slight shift of the sound to sound like it's coming from the right.
  • Wind audio favoring the right channel
  • Volume Settings Dialog Confirmation Beep being shifted LEFT (not right)
    • Good news, though! The 'click' from other buttons seems relatively centered!
This almost certainly isn't an exhaustive list of all the audio imbalances in the game, but I suspect tracking them all down would be a bigger job that I might have time for.

(And now I'm realizing that maybe all these were also fixed by fixing the Flamethrower Turret? But on the off chance that they weren't...😅)
Attachments
factorio-current.log
(5.65 KiB) Downloaded 83 times
Donion
Factorio Staff
Factorio Staff
Posts: 317
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [1.1.70] Audio imbalances, EVERYWHERE

Post by Donion »

That's what I get for fixing bugs ...

Jokes aside, at a glance, none of these would be caused by the same bug as the flamethrower turret's stream so documenting and reporting it wasn't a waste of time and it's appreciated.
I'll look into it.
Donion
Factorio Staff
Factorio Staff
Posts: 317
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by Donion »

So I took a look at all the situations you mentioned and the panning setting/calculation is correct (the radar's panning is calculated correctly, and the rest is just centered) so I will run the specific sound files by our sound designer and see from there.

I'm not sure if I'm starting to hear things or your recording/upload is slightly off, but when I replicate the radar scenario, on my setup I can't hear the slight shift to the right the same way I can hear it in your video. So just as a sanity check, the channels are balanced in your speakers/headphones windows settings, right? I double checked mine.
Moleculor
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Apr 28, 2017 8:07 pm
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by Moleculor »

I can do that, and even better. Everything I reported/recorded above was on my ASUS Xonar DG.

If I switch away from my Xonar DG and plug my headphones into my on-board audio (Realtek ALC1150, I believe? On this motherboard), it asks me what device I just plugged in. If I tell it Headphones, then set the output to 7.1 Surround (because modern soundcards these days know how to do HRTF mixing from 7.1 to Headphones for that "it's like you have 7.1 Surround Sound when you don't" effect), I get the same buggy result I demonstrated above in Factorio.

If I change my audio settings to only do "Stereo/2 Speaker" sound (on either soundcard), the bug is masked by the two audio channels mixing (i.e. Audio meant only for the right channel is added to the left channel, so you can hear it in the left ear, and vice versa.)

This may be what's happening in your setup.

(For clarity sake: I do not want my audio channels mixing like I'm listening to speakers strapped to my head. Switching to Stereo/2 Speakers as a workaround is non-viable. Every game that generates positional audio with modern or even semi-modern techniques (HRTF and the like) depend on the two audio channels not mixing, so using Stereo/2 Speaker to mask the bug in Factorio would wreck the audio environment of dozens if not hundreds of other games.)

Quick test: Generate a tone in Audacity and have it only play in the left channel. Listen to it on your setup, but only with your right ear. If you hear even a single iota of the tone in your right ear, your audio setup is outputting as if it's hooked up to speakers, rather than headphones, and mixing the left and right channels. This would mask the bug on your end. (See below for a walkthrough.)

Here is a series of images showing the relevant settings on all my audio stuff for the Xonar DG. I hope you'll trust I have similar settings for my Realtek card as well? It also contains two images taken within Audacity where I've generated a sound at a single volume and exported it in two files, one for my left ear, and one for my right. I played those files in Media Player Classic (making sure to disable Auto Volume Control) and recorded their output through Audacity. In both cases the output volume is precisely the same on the input meter while Audacity is recording it, meaning the output balance of my soundcard is verifiably correct.

Generating one-channel sound:
Open Audacity.
Tracks > Add New > Mono Track
Generate > Tone > Sine, 240, 0.3, 5s (preview and adjust for taste)
Tracks > Add New > Mono Track
In the top track click the little tiny pulldown to the left of the upper left X that should probably say "Audio Track". A menu should appear with "Make Stereo Track" as an option. Click that.
Press play. You can use that last menu to swap the channels, too.
Donion
Factorio Staff
Factorio Staff
Posts: 317
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by Donion »

I did a quick test by making a stereo sound file with a tone in only one of the channels, just like you described and it's behaving as expected. There is no mixing of channels, if there's only a right channel I can only hear it in the right ear and vice versa.
I use regular stereo headphones on a on-board soundcard (Realtek ALC1220).
cbhj1
Fast Inserter
Fast Inserter
Posts: 170
Joined: Tue Apr 25, 2017 2:53 pm
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by cbhj1 »

This thread made me curious, so I opened the radar.ogg file in audacity, the motor whirring is right heavy. Makes me wonder why the sound effects are stereo to begin with which carries positional info. If they are just attenuated based on distance, you get cases like this where the audio and image don't jive positionally.
Moleculor
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Apr 28, 2017 8:07 pm
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by Moleculor »

I'm quite shocked to hear
PUN INTENDED
that the audio is all recorded in stereo, as I remember trying to track down a positional audio bug (I think in a Minecraft mod) where it turned out that positional audio just flat out did not work unless the audio was mono. Which makes sense, considering.

I tested
radar.ogg
world_base_wind.ogg
wind.ogg

and all three have a right bias.

radar.ogg has a right bias of 0.55 dB RMS (root mean square)
world_base_wind.ogg has a right bias of 0.91 dB RMS
wind.ogg has a right bias of 0.60 dB RMS

I also tested
gui-green-confirm.ogg (the one sound I mentioned above that sounds left rather than right justified) and... well...
Image

You can SEE the discrepancy in the audio balance. You can visibly see it.

It's a left bias of 5.90 dB RMS, by the way.

The left bias on that audio file is so bad that I can hear it "to my left" on the crappy built-in speakers I have on a separate laptop. Not even headphones.

And in case you think that 0.55 dB is imperceptible, it's not. I mean, obviously, because I can hear the difference, but here's a link that briefly mentions the Just Noticeable Difference in sounds, and how it's frequently
PUN INTENDED
smaller than 1 dB.

When it comes to noise, the Just Noticeable Difference can be as low as 0.15 dB.

Each of the biases tested above are well above that threshold. And that's just testing a few sounds. I suspect a right-bias exists in most of them.
Donion
Factorio Staff
Factorio Staff
Posts: 317
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by Donion »

We went over the sound files mentioned here. The biggest offenders, gui-green-confirm and gui-inventory-slot-button will be adjusted, the rest will be left as is. I'm not saying there isn't noticeable imbalance but it's small enough.
cbhj1
Fast Inserter
Fast Inserter
Posts: 170
Joined: Tue Apr 25, 2017 2:53 pm
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by cbhj1 »

did a bit of testing with the radar, the heavy right channel whir never pans left of center, just fades out on the right side without moving to the left with the radar
Donion
Factorio Staff
Factorio Staff
Posts: 317
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [Donion] [1.1.70] Audio imbalances, EVERYWHERE

Post by Donion »

radar, deconstruct-large, gui-green-confirm and gui-inventory-slot-button are rebalanced for the next release.
Post Reply

Return to “Resolved Problems and Bugs”