Solved What does each of the SoundConfig settings do?

Discussion in 'Mod Support' started by Agent_Y, Nov 13, 2020.

  1. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,075
    I'm trying to make a sound editor for my mod. Technically it works but I have no idea how to use it myself. There are a lot of settings in the soundConfig part, and while some are self-explanatory, I have no idea what most of them do and how to use them. Example:
    what_are_these.png
    I have not found a single thread about this kind of stuff and there's nothing on the wiki or documentation either. I would be grateful if someone could tell me everything about these settings: what each one is for exactly, what are the min and max values for them, and what are the units. I'm sorry if this is the wrong section but idk where to put it.
     
  2. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    In my opinion these parameters should be viewed as one big sort of equalizer, like those retro graphic equalizers. And your mod should make that even easier as by the standard method you need to 'ctrl+r' every time for each change to take effect. The more you play with it the more it becomes obvious what the parameters do. It also helps when you apply extreme changes initially to make it more clear what exactly changes, in order to achieve more refined results afterwards.

    You should have posted your question in Audio Feedback Thread. As I pretty much know how all the parameters work I don't want to make incorrect statements, but TDK is very friendly and communicative on the subject of audio discussion in said thread. :)
     
  3. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,075
    I have tried making ridiculously big changes but even then I couldn't tell what exactly the difference was. I'll look at that thread and see if I can find anything useful, thanks.
     
  4. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    Are you using quality headphones to check for changes ? For example, changing mainGain -9 to 9 should instantly reflect in louder volume overall. Also try to split the lowFreq in half and also the highFreq, then add 2 to eqLowGain and subtract 2 from eqHighGain, now you clearly should hear more 'bassy' sound...

    *sorry post edited :)
     
  5. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,075
    Sorry but this did not help at all, I NEED EXACT INFO AND NOT STUFF TO EXPERIMENT WITH, please say something actually helpful. I'm not making an equalizer for sound experts, I'm making a mod for normal people to use, I need to make it CLEAR for them what each setting is for instead of just giving them random sliders without any names or descriptions. And I found nothing useful on the audio feedback thread again. I hate it and I might as well cancel the mod if nobody helps.
     
  6. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    Hey take it easy Y-man, I know modding can be frustrating, just take a step back from it and let it sink. THE SOUND SYSTEM IS NOT EASY AND NOT FOR EVERYONE TO USE WITH AGILITY AND WITHOUT EFFORT. IT IS HARD.

    We modders are all waiting for a more accessible way to edit engine and other sounds but even devs are not at the level they desire.
    The parameters are self explanatory, they are very difficult to understand initially BUT MESSING AROUND WITH THEM HELPS for you to understand what they do.

    If this is what your after then what's the purpose of being a modder at all ? Don't you think the devs experiment ? Experimentation is a process of evolution.

    We don't have direct access to the embedded fmod system, it might be even sandboxed for all we know and its functions may be different from the fmod we can get for ourselves. In any case the .BANK are encrypted and may alter the nature of parameters that might possibly explain themselves in the regular fmod app. I don't know much about the app, I don't really use it (though I have it) as long as there is no purpose in relation to the game anyway for me.

    Now, lets assume that most of the params stand for 'db' (that is decibels), it doesn't really matter, what they represent is how loud they appear. Might as well call them apples.

    "soundConfig": {
    "sampleName": "I3_engine", you know this
    "intakeMuffling": 1, how much (db if you like) sound gets muffled by carb-airfilter-intake manifold

    "mainGain": -10, the main volume of the sound config
    "onLoadGain":1.0, how much engine gets louder on engine load
    "offLoadGain":0.84, how much engine gets less louder on engine off load

    "maxLoadMix": 0.8, how much engine load mixes in with mainGain
    "minLoadMix": 0, how much engine load mixes in with mainGain

    "eqLowGain": 0, gain (again db or whatever) of low freq equalization
    "eqLowFreq": 250, the actual low freq equalization
    "eqLowWidth": 0.1, how wide the low eq spreads across low freq range

    "eqHighGain": 0, same for high
    "eqHighFreq": 6000, same for high
    "eqHighWidth": 0.1, same for high

    "lowShelfGain":2, level (again db or whatever) of low shelf freq
    "lowShelfFreq":150, lowest freq to be heard

    "highShelfGain":10, same for high shelf
    "highShelfFreq":7500, same for high shelf

    "fundamentalFrequencyCylinderCount":3, how the freq of the fundies react in relation to nr of cylinders
    "eqFundamentalGain": -2, fundamentals are the opposite of overtones, this is sound physics theory, LEARN IT IF YOU WANT TO KNOW IT
    },
    "soundConfigExhaust": {
    "sampleName": "I3_exhaust", and so on and so fort...

    "mainGain": 5, ...
    "onLoadGain":1.0, ...
    "offLoadGain":0.75, ...

    "maxLoadMix": 0.8, ...
    "minLoadMix": 0, ...

    "eqLowGain": -3, ...
    "eqLowFreq": 450, ...
    "eqLowWidth": 0.1, ...

    "eqHighGain": -9, ....
    "eqHighFreq": 1800, ...
    "eqHighWidth": 0.1, ...

    "lowShelfGain":-1, ...
    "lowShelfFreq":100, ...

    "highShelfGain":1, ...
    "highShelfFreq":6000, ...

    "fundamentalFrequencyCylinderCount":3, ...
    "eqFundamentalGain": -2, ...
    },

    As I said before I might be a tad bit off, I don't want to make false explanations.
     
  7. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,075
    Thanks for the detailed explanation but even now I don't get it, I know nothing about how the sound system works. I thought it would all be easier but I guess I'll just leave it like it is now without any explanations so people can experiment instead. You should have said it first that it's not an easy thing, Jbeam is so much easier to understand than this. What I still don't get is why most of the settings don't seem to work for me at all unless set to ridiculously high values, and this is what gets me frustrated. Experimenting didn't help here, I spent so much time trying to figure it out. Main gain never worked for me but onload and offload did, I figured out what they do. Low and high shelf gain worked but I couldn't tell what they do, for the frequencies seems like I didn't do big enough changes to notice any difference - again it's hard to make changes if you have no idea how big they should be, it's all so frustrating. No other thing ever worked for me. Don't bother explaining anything more, just tell me what I could be doing wrong because I have no idea.
     
  8. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    Yes maybe I should have, it's very very difficult. I myself am an educated musical instrument maker (it's currently not my profession though) and I'm also an experienced piano tuner. I've had quite a few long winding discussions thru pm with other modders seeking for more clarification too. You need quite sharp ears and a lot of patience to sound editing, at least if you want decent results. Tuning a mid range quality piano takes me about 3 hours on average and leaves me exhausted. This goes for BeamNG sound editing too. I only allow myself a certain amount of time to work on sound and then you gotta stop and let it sink through. Also never initiate sound editing when you're tiresome, it takes a lot of energy and when tired you lose track of all progress.

    I don't think you did anything wrong, just let it sink through in time and pick it up later if desired. We only have a limited amount of vanilla samples to work with currently. Keep in mind that the nature of the sample is never going to change, whatever you tweak. Yet it is possible to create sound colors with the existing samples but it takes patience and experience (by practicing). The current amount of samples isn't enough for me to fulfill my desires so I started setting up 'ghost engines' using lua so I can have more vanilla samples to mix. This is a very tiring activity and not to recommend if inexperienced or unaffiliated with sound engineering. But there are easier things which you can easily achieve and I've seen (lol rather heard) other modders getting well creative with the possibilities of mixing samples. An easy example is taking any I6 and V6 sample and mix them like : I6 for engine and V6 for exhaust or the other way around. It might sound too obvious but that's where the equalizing comes in by for example stripping treble from one sample and adding base to another one. Or applying more on load sound from one sample and more off load sound from another. I6 and V6 are easy to mix because the are pitched exactly the same, mixing other samples will lead to vacuum cleaner sounds and headaches without additional lua to adjust rpm's.

    So to wrap it up, no miracles can be achieved by only using vanilla soundConfig but details can make hugh difference for immersion or the user's particular desires. What we, the gaming/sim community, need is more samples, better samples, better sound engineering software such as synthesis instead of samples etc.. And often we also should appreciate what's already there, just take a look at older car games/sims for instance. :D
     
  9. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,075
    Ok I have also some questions about some details. By "Gain" they usually mean "extra volume to the sample", right? And how about "equalization", what does it mean in this context? I have somewhat figured it all out but not quite, should be enough to polish and release it soon I think, unless I run into the same issues again
    Oh and for your info, my issues with certain values "not working" were most likely caused by the fact that I underestimated the influence of the exhaust sound config on the "average" engine volume, on cars with dual exhaust it actually affects the heard sound more than the real engine sound lol
     
    #9 Agent_Y, Nov 16, 2020
    Last edited: Nov 16, 2020
  10. NOCARGO

    NOCARGO
    Expand Collapse

    Joined:
    Apr 1, 2019
    Messages:
    1,514
    It's a bit tricky to take those terms like "gain' and "equalization" too literally. Because "gain" literally means something you gain from something there might be confusion. For instance, take a look at a guitar amplifier, it will often have two knobs called "Input Gain" and "Output Gain". If you turn either one or both of those knobs completely down there will be no more amplified sound. In other words, no sound coming from the amplifier anymore. So the term "gain" could easily be seen as power in db or just volume.

    For the case of "equalization", yes, an equalizer can be called and equalizer when you slide all the sliders dead center. In this case all the extremes are reduced to a flat and 'equal' division of the frequencies that are enhanced by it. On the other hand, if you put all the sliders completely opposite in relation to their neighbor sliders the sound doesn't sound 'equalized' at all. Originally equalizers are intended to equalize, being able to take extremes out of the original input sound, but this generally goes for music, not for engine sounds. :)
    If you don't use an equalizer as a mean to equalize the input source, better to consider it a 'mixer'. This is my opinion, anyone is free to disagree, It just seemed an effective way of clarifying the subject.

    Yep I can imagine that. The engine sound just being so feeble in relation to the exhaust sound or the other way around. Here's what you should try : if you hear a lot of exhaust sound, just put the camera in orbit and listen while you orbit slowly. Then you will hear appearing engine sound when passing the front side and exhaust when passing rear. And also yes for double exhaust, they have two exhaust sound nodes against one engine sound node :) .

    If you edit the soundconfigs and something doesn't sound obvious it's easy to just 'power off' the engine side or the exhaust side. Just add a random letter to the sample name and it will turn off immediately. Now you have either only the engine or exhaust sound to work with :)
     
    • Like Like x 2
  11. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    609
    Almost right my comment are italic and bold:

    "soundConfig": {
    "sampleName": "I3_engine" - what blend file to use (the blend is out of date tech but we continue to use it for backwards compatibility)
    "intakeMuffling": 1 - this is a ratio between unmuffled and muffled, 0 being unmuffled and 1 being muffled. The exhaust muffling is done in the exhaust.jbeam

    "mainGain": -10, the main volume of the sound config
    "onLoadGain":1.0, how much engine gets louder on engine load
    "offLoadGain":0.84, how much engine gets less louder on engine off load

    "maxLoadMix": 0.8, - this is audio mix of load/off load when the engine is working 100% on throttle (a 1.4 will have a lower value than a 2.0 so there is some sonic difference)
    "minLoadMix": 0, - as above but for off throttle

    "eqLowGain": 0, gain (again db or whatever) of low freq equalization - yes this is dB
    "eqLowFreq": 250, the actual low freq equalization
    "eqLowWidth": 0.1, how wide the low eq spreads across low freq range - or the 'q', as we call it.

    "eqHighGain": 0, same for high
    "eqHighFreq": 6000, same for high
    "eqHighWidth": 0.1, same for high

    "lowShelfGain":2, level (again db or whatever) of low shelf freq
    "lowShelfFreq":150, - this is the fundimental frequency of the eq, which starts to cut below this frequency - note, due to how EQ's curves are designed, this can affect frequencies higher than the specified one.

    "highShelfGain":10, same for low shelf
    "highShelfFreq":7500, this is the fundimental frequency of the eq, which starts to cut above this frequency - note, due to how EQ's curves are designed, this can affect frequencies higher than the specified one.

    "fundamentalFrequencyCylinderCount":3, how the freq of the fundies react in relation to nr of cylinders
    "eqFundamentalGain": -2, fundamentals are the opposite of overtones, this is sound physics theory, LEARN IT IF YOU WANT TO KNOW IT - this is dB
     
    #11 TDK, Nov 16, 2020
    Last edited: Nov 17, 2020
    • Like Like x 4
  12. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,075
    Thanks so much for this, I'll update the mod again to get all the units correct and fix some stuff I decribed wrong
     
    • Like Like x 1
  13. robben896

    robben896
    Expand Collapse

    Joined:
    Apr 30, 2021
    Messages:
    393
    How many sound configs can one have? Because i have 3 different recorded sources of the car : intake, engine bay, exhaust and i need 3 different configs for each so is that possible to do or does the game only allow 2 as in soundconfig and soundconfigexhaust?
     
  14. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,075
    There are only 2 defined in combusionEngine.lua and 1 in electricMotor.lua. So 2 are max. You can try to use the intake one for a turbo or something somehow.
     
  15. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    609
    As you say, one for the engine, one for the exhaust... things like forced induction sounds are separate to this.
     
  16. robben896

    robben896
    Expand Collapse

    Joined:
    Apr 30, 2021
    Messages:
    393
    The 3rd is noise from inside the engine room not forced induction. Is called engine ambience.
     
  17. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    609
    No, we don't have a 3rd one. It is basically a real time EQ filter effecting the engine and exhaust configs.
     
    • Like Like x 1
  18. robben896

    robben896
    Expand Collapse

    Joined:
    Apr 30, 2021
    Messages:
    393
    Ok thanks. When you say engine do you mean intake?
     
  19. TDK

    TDK
    Expand Collapse
    FLIT KILLS MOTHS
    BeamNG Team

    Joined:
    Dec 17, 2017
    Messages:
    609
    Well the engine includes the intake, so a mix of the air intake and the mechanicals.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice