Results 1 to 10 of 10

Thread: Class and Class Sounds Questions - Config.cpp

  1. #1

    Class and Class Sounds Questions - Config.cpp

    Hello guys,

    I've started work on a eurofighter typhoon sound mod, this is my first mod and first time doing config scripting.

    I have the sound mod working fine, but I'm struggling to find a proper explanation of the following. The main issue with the sound mod is the sound of the jet as it comes towards you at full speed, it sounds really bad, low speed passes sound amazing.

    1. WHAT does each definition actually apply to? EngineLowOut / ForsageOut / WindNoiseOut etc, I've tried listening to examples from AV8 etc to see what they entail but a proper explanation would be great.

    2. soundGetOut[] = {"ca\sounds\Air\AV8\ext\ext-jetair-cabine-open1", db-25, 1, 40};

    I know the DB-25 is the volume of that sound over other sounds in the Arma 2 world, but what do the trailing values 1 and 40 mean?

    Again more values for the Sound configs:


    frequency = "(0.1+(1.2*(speed factor[1, 150])))";

    volume = "camPos*(speed factor[1, 150])";

    I'm guessing this maths function changes the pitch of the played sound files based on certain variables like plane speed etc?

    Any help you can give will be appreciated!

    Regards,

    Rob
    Current Rig

    Asus P6T ** i7 920 d0 @ 3.8Ghz
    6GB Corsair XMS3 ** Crossfire Asus 4890s @ 950/4400
    Tagan 800W Piperock ** 100GB Vertex 2 SSD


  2. #2
    1. In or Out is typically depending on the parameter camPos (or 1-camPos), and basically sets if the sound is supposed to be heard internally or externally (1st person or 3rd person). EngineLow and EngineHigh are typically dependent on rpm and/or thrust values. Forsage is often where the cone[] parameter is used, and as far as I know there can only be one cone[]. It lets you define a sound that is heard better at some angles than others, typically a jet blast behind a jet engine. I don't know what the word forsage means though.

    2. db-25 can also be expressed as a pure numerical (typically quite small). Unknown to me if the engine handles them differently. But yes, this controls volume/priority. 1 is the frequency, where 2 would play the sound a twice the speed. 40 is how far the sound reaches.

    Correct. See simple expressions for what you are allowed to do. Nothing beats interpolate in terms of flexibility. Simple sawtooth ramps are done using (parameter factor[min,max]) or (parameter factor[max,min]), and if you need triangle ramps you can use (parameter factor[min,max]) min (parameter factor[max,min]). Some factors allows great spans (such as speed), some allows more than you'd think, some allowes just what you think [0,1], and some even seems to be boolean [0 or 1, but nothing in between].

    Only list of parameters I know of is for ambient parameters. We only have current configs to work from regarding other parameters unfortunately. And everything is not available to every class type. I.e. surfacetypes used for vehicles, like asphalt, grass etc, are not available for planes.

    There is a lot more to it, but I hope it gets you started. Search for sound modding 101 thread as well, has some useful information.
    Regards
    Carl Gustaffa - left this game due becoming Steam Exclusive

  3. #3
    First Sergeant rexehuk's Avatar
    Join Date
    Nov 27 2009
    Location
    London
    Posts
    865
    Author of the Thread
    Brilliant post Carl, really appreciate it.

    The eurofighter goes 1300 speed at max speed... would it be right that I have to use some sort of mathematical function to stop the THRUST value changing the pitch to a level where it becomes some sort of whistle? Or can IF statements be included in the definition if vehicle speed > 600 then Frequency = 0.7 etc etc?

    Thanks again,

    Rob
    Last edited by rexehuk; Oct 28 2010 at 21:04.

  4. #4
    No if allowed. Not even division, trigonometric functions, power, and square roots. Create ramps using factor or interpolate. If you need a ramp that goes both up AND down, you combine two ramps using min (or more rarely, max).

    Examples that may not be very useful to you as is:
    EngineIdleOut:
    frequency="1";
    volume="0.5*camPos*engineOn*(rpm factor[0.10,0.80])*(thrust factor[0.50,0.00])";

    Using rpm makes sure that engineStart sounds are heard. By using thrust factor with a negative ramp forces the sound to decrease as you increase thrust, as you would expect on an idle sound.

    EngineLowOut:
    frequency="1";
    volume="camPos*engineOn*(rpm interpolate[0.90, 2.00, 0.0, 0.60]) * ((thrust interpolate[2.00,0.0,1.00,0.1]) max ((speed interpolate [0,50,1,0]) max 0.01))";

    Probably a fairly complex example, shows interpolate in action, on values that goes beyond 1.00.

    EngineHighOut:
    frequency="0.9 + 0.15*thrust";
    volume="camPos*engineOn*((thrust factor[0.00, 1.00]) max (speed factor[1,50]) + 0.1)";

    Limited effect on frequency, probably too much even. That + 0.1 is a bit magic, as it (should) prevent the sound from ever stop playing (as long as engine is on). Once you have high volume sources, you want to have sounds always play (even if unrealistic). Otherwise, due to how volumes (apparently) work, you can end up with the sound that is playing at max volume, constantly switching volumes depending on this now low sound being played or not. If you suddenly turn off one sound with a high volume/priority, the other one with similar characteristics will get to play that much louder. It's a very awkward way of thinking of volumes.

    ForsageOut:
    frequency="0.95 + 0.10*thrust";
    volume="camPos*engineOn*((thrust factor[0.25, 1.0]) + 0.1)";
    cone[]={1.140000,3.920000,0.6500000,0.150000};

    Pretty much the same as EngineHighOut. But the sounds are a bit different with this one having a bit more character of a high power fine setting (turboprop) used for takeoffs, whereas EngineHighOut is more character of high power coarse, more like a cruise climb. Sources should be different enough to not cause flanging when mixed together, can be achieved by adding low amounts of reverbiation to one of them, eq'ing etc.

    You don't want to cause too much variation in frequency, at least not for (most) planes. It's the trick of choice when you can only have one sound, but it's generally better to use recordings of different power settings (or rpm/prop settings) and blend these using ramps.

    And of course, you don't want to miss out on:
    GyroIn:
    frequency="1";
    volume="(1-camPos)*0.1";



    Showing that last one because if modding existing sounds, you want to update their existing classes. But you're free to add whatever you like.

    I'm using this system for C130J turboprop and AN-2 Big Radial vanilla planes. The clue about those speed parameters is that I want to have a ground idle sounds that differs from sounds at approach power or "power off/idling cruise". It's not perfect though, I seem unable to do it. For a jet fighter, I probably wouldn't bother too much with that though, and stick with vanilla low, high, and forsage.

    Way bigger answer than intended. For your thrust issues, try expanding the ramp limits. See how I sometimes use thrust factor[....2.0]. Maybe you need to use 3 or 5 or something (to slow down the reaction change), but if it's the magnitude (only) that is the problem, you simply need to limit the magnitude of the output. I.e. 0.9+0.1*(thrust factor[.....]). Or both. That's the beauty of interpolate (vs factor), in that everything is controlled using parameters.

    You can use Excel to visualize these ramps. Since interpolate is just an expansion on factor, you can generalize it using this simple Excel formula:
    =(MAX(MIN(1-(($A10-B$2)*(1/(B$2-B$3))+1);1);0))*(B$5-B$4)+B$4
    where A column contains the input (i.e. thrust 0-1) and the B's is xFrom, xTo, resFrom, and resTo respectively. Duplicate column to make another one, and i.e. multiply or min them together and plot the result.

    Not as good as flightsims implementation, but sure has come a long way since OFP

    Oh, btw. Extreme speeds may also cause extreme doppler effect applied for external listeners. Not anything we can do to influence that. Instead of using realistic speeds, maybe consider using comparable speeds. In the past there has been addons I denied using for being "too realistic" - not that I'm not into realism, but hardware have to appear comparable. I.e. an M1 with realistic armor values is unusable since it doesn't have any (vanilla) enemies.
    Last edited by CarlGustaffa; Oct 29 2010 at 06:41.

  5. #5
    First Sergeant rexehuk's Avatar
    Join Date
    Nov 27 2009
    Location
    London
    Posts
    865
    Author of the Thread
    Cheers again Carl, I completed the sound mod last last night... but now I see this gyro configuration I may give it a go and see if I can make it better.

    Below is the final product hehe.


  6. #6
    Looking good. Some ideas if you don't mind:
    1) During startup (a small brief moment) and after landing, she seems to be in "screaming engine" mode, when she should be idling. (Inside).
    2) Try to find something different for the latch sound. I've never done one in real life, but I found that sound (MV22/C130) a bit hard to "swallow". Shouldn't be too hard to find or make some pneumatic and/or electric sound (I wouldn't know which) combined with a locking/opening sound. If you know it sounds like this, then disregard.
    3) Try to blend/crossfade idle with shutdown. Sounded a bit off when you shut her down.
    4) Couldn't hear gear/flap (? Sorry don't know the plane, I'm into GA ) sound (servos[]). Trading off realism you can achieve workable (most people won't notice or care) results combining the two. For the C130J, I have flap sound (due short), gear down sound (longer) and gear up sound (longest) that actually sounds like they are three different sounds, but they all come from the same servos[] definition. Need some delay on the sound though.

    And don't you just wish we could access ALL parameters regardless of class? Windshield rain, ground rolls, touchdown sounds etc... Oh dear... BIS, are you reading this? Hehe...

  7. #7
    First Sergeant rexehuk's Avatar
    Join Date
    Nov 27 2009
    Location
    London
    Posts
    865
    Author of the Thread
    I've got sounds for gear up.. gear down.. flaps... but don't know if any such thing is configurable?

    If there is a config such as GearUPIn and GearUpOut then let me know :P

    You must teach me

    Btw the screaming engine mode is due to the ENGINE sound inside the cockpit, it's basically a -25DB of the afterburner.. hence why it sounds like it's roaring when it's not. The IDLE sound is synthed by me and I'm fairly happy with it, I might apply that to the cockpit sound and have it a bit louder in there than it currently is.

    The IDLE/Shutdown crossfade should be easy.. I was going to put a 1-2 second sample of the IDLE into the shutdown sequence but was in a rush to get this to a finished state after reworking it for 5 hours.

    As for the limitations.. I was very shocked to see the config was so god dam limited! I mean you unpack the AV8B and there is 30 sounds.. yet only 7-8 are used, I mean what's the point? I personally want a different sound for each RPM boundary, definable sounds for X speed etc to simulate sound barriers and all of the internals. I guess that is the kind of thing you expect then you're playing things like DCS A10-C and blackshark

    Also... I was going to do the sounds for getting in/out of the cockpit... but couldn't find any that fitted the eurofighter... I want something closely matched to it .
    Last edited by rexehuk; Oct 30 2010 at 01:01.

  8. #8
    No, sorry, I don't think it exist. I simply used soundServo and mixed the sounds. I'm assuming the lenght of animation determines how much sound is played.

    Lol, I didn't know that about the AV8B, 30? Checked them out. Doesn't sound like sounds that would mix very well over too many ramps, more like variation sets we could choose from. But it doesn't hurt trying. Just a matter of putting in enough (thrust factor[a,b]) min (thrust factor[b,a]) in there (I'm guessing). I use 4 sounds myself vs the normal 3, not to get more ramps, but to separate ground idle from approach idle, hence the weird blends with speed factor.

    Yeah, I don't know how the cockpit sounds should be. Doesn't matter. Under consideration was what I was going for, instead of simply accepting default

  9. #9
    First Sergeant rexehuk's Avatar
    Join Date
    Nov 27 2009
    Location
    London
    Posts
    865
    Author of the Thread
    Took your advice...

    - Added in GetIn/GetOut sounds that I sourced after many hours!
    - Cockpit Close noise integrated into start up sequence
    - New internal sounds (No more lame afterburner during idle)
    - Higher cockpit volume for idle/afterburner
    - Smoother shutdown sequence externally

    Thanks for the help Carl

  10. #10
    Np. I consider myself a beginner (dealing with configs, I'm fairly confident with sounds), learning this stuff myself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •