Transport Fever 2

Transport Fever 2

Renault ABJ (RENFE 9300/590 series)
GordonDry 4 May, 2023 @ 5:59am
What does the * soundeffectsutil.sampleCurve in the sound sets do?
I have never seen a syntax like this:
{ gain = soundeffectsutil.sampleCurve({ { .0, .0 }, { 0.03, 1.2 }, { 0.1, 1.4 }, { 0.2, 0.8 }, { 0.3, 0.6 }, { 0.4, 0.2 }, { 1.0, 0.0 }, }, input.speed01) * soundeffectsutil.sampleCurve({ { .0, .1 }, { 0.5, 1.5 }, { 1.0, 2.7 }, }, input.power01), pitch = soundeffectsutil.sampleCurve({ { .0, 1 }, { 1, 1 }, }, input.power01) },
What does the 2nd entry starting with
* soundeffectsutil.sampleCurve
do?
< >
Showing 1-5 of 5 comments
jorgenb96  [developer] 4 May, 2023 @ 6:19am 
Its a bit hard to explain, but for each .waw sound file you will see at the top of the soundset file, you can set them a preset curve(included on soundutil, for example for electric engine sounds) or you can set them manually. So if you set them manually you need three values(gain/power/pitch) that needs a curve given by the list of { speed, value}. That's used for example when you add a sound that only plays at high speeds or similar.
GordonDry 4 May, 2023 @ 6:46am 
I know the basics.

What is the 2nd entry starting with
* soundeffectsutil.sampleCurve
for?

I don't see it anywhere else, in no soundset from any mod.
jorgenb96  [developer] 4 May, 2023 @ 6:53am 
Its a value you can add for the power, that you can understand as the base level volume for that soundfile
jorgenb96  [developer] 4 May, 2023 @ 6:56am 
In this case is used to have a higer volumen at top speed that the volumen that has the soundfile
That why the last pair of values is { 1.0(Speed), 2.7(power) }
GordonDry 4 May, 2023 @ 7:23am 
Where did you get the syntax from?
I did not find any tutorial or wiki that explicitly tells me that I can use a 2nd array inside the same parameter starting with an *
< >
Showing 1-5 of 5 comments
Per page: 1530 50