**MOVE TO DEVELOPERS GUIDE - CAR SOUNDS** AND DELETE THIS TEXT!
Table of Contents |
---|
Things you'll need:
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "multi": { "comment": "multi represents the event type. The name variable below represents the name this event is identified with by the game. The other keys are event properties that affect playback of all children", "name": "engine", "volume": { "key": "engineRPM", "value": [[10,0,0],[1850,0.7,0.2],[6000,1,0],[9400,1.5,0.2]] "comment": "Here we scale the entire engine volume by RPM to create a ramping effect of a louder engine at higher RPM without having to mess with individual samples. Each bracket represents one key, where the first number is the RPM where it applies, the second number is the volume, and the third number is the shape (where 0 is linear, 1 and -1 are a curve).", }, "position": [0,0.3,1.0], "effect": "engine", "filter": "engine", "commentExtra": "effect and filter apply sound effects and direct filters respectively. They use a name to reference a filter or effect that is defined elsewhere in the file. Position is local to the car.", "events": [ { "multi": { "name": "power", "comment": "The name here is purely for our own knowledge since this event's parent plays back all children anyway. And so does this event! It applies a slightly curved throttle ramp between 10% and 70% throttle, applying to all children, which should be samples used for being on power similar to the old sound system.", "volume": { "key": "throttle", "comment": "The key is a reference to a variable the game will read that correlates to the first value of each key. A list of possible keys, and a visual example, will be provided later" "value": [[0.1,0,0],[0.7,1,0.3]] }, "events": [ { "loop": { "comment": "Instead of the event type multi, we're looking at the type loop. This type loads a sample and plays it back in a loop whenever the event is fired by its parent. We use the engineRPM key again to define when this particular sample fades in our out, and the same exact system for the sample's pitch. While the volume curve, ideally, is a curve, the pitch should be linearly proportional to RPM. The key used at 1.0 pitch should correspond to the natural RPM the sample was recorded with. This event supports advanced features such as loop points, allowing a sample to loop between specific points so that initial playback won't have to sound as harsh. This can also allow fake engine wobble effects coming on throttle, which adds a lot of immersion! The other loop events below make up part of an engine's Power sound effects. Note: Samples can be referenced relative to the vehicle's directory now. They no longer have to be in a MAS file in moddev.", "sample": "sounds\\idle_int.wav", "volume": { "key": "engineRPM", "value": [[10,0,0],[250,1,0.2],[2000,1,0],[2400,0,0.2]] }, "pitch": { "key": "engineRPM", "value": [[0,0,0],[1850,1,0],[3700,2,0]] } } }, { "loop": { "sample": "sounds\\1900_on_int.wav", "volume": { "key": "engineRPM", "value": [[2000,0,0],[2400,1,0.2],[2500,1,0],[3000,0,0.2]] }, "pitch": { "key": "engineRPM", "value": [[0,0,0],[1993,1,0],[3986,2,0]] } } }, { "loop": { "sample": "sounds\\3800_on_int.wav", "volume": { "key": "engineRPM", "value": [[2500,0,0],[3000,1,0.2],[3700,1,0],[4500,0,0.2]] }, "pitch": { "key": "engineRPM", "value": [[0,0,0],[3800,1,0],[7600,2,0]] } } } ] } }, { "multi": { "name": "coast", "comment": "This is essentially the Coast equivalent of the previous event group. Same thing, but for coast!", "volume": { "key": "throttle", "value": [[0.1,0.75,0],[0.7,0,0.3]] }, "events": [ { "loop": { "sample": "sounds\\idle_int.wav", "volume": { "key": "engineRPM", "value": [[10,0,0],[250,1,0.2],[2000,1,0],[2400,0,0.2]] }, "pitch": { "key": "engineRPM", "value": [[0,0,0],[1850,1,0],[3700,2,0]] } } }, { "loop": { "sample": "sounds\\3400_off_int.wav", "volume": { "key": "engineRPM", "value": [[2000,0,0],[2400,1,0.2],[3600,1,0],[4800,0,0.2]] }, "pitch": { "key": "engineRPM", "value": [[0,0,0],[3566,1,0],[7132,2,0]] } } }, { "loop": { "sample": "sounds\\5800_off_int.wav", "volume": { "key": "engineRPM", "value": [[3600,0,0],[4800,1,0.2],[5700,1,0],[6400,0,0.2]] }, "pitch": { "key": "engineRPM", "value": [[0,0,0],[6083,1,0],[12166,2,0]] } } } ] } } ] } } |
...