local soundeffectsutil = require "soundeffectsutil" --[[ function data() return { type = "GENERIC", refDist = 25.0, horn = "vehicle/blue_tiger_br250/horn.wav", params = { tracks = { -- Stand { clip = "vehicle/blue_tiger_br250/stand.wav", gainCurve = { nodes = { { .0, 1.0 }, { .03, 1.0 }, { .12, .4 }, { .15, .0 }, } }, pitchCurve = { nodes = { { .0, 1.0 }, { .15, 1.0 }, } } }, -- Ventil { clip = "vehicle/blue_tiger_br250/ventil.wav", gainCurve = { nodes = { { .0, .0 }, { .0120, .0 }, { .0121, .6 }, { .0600, .6 }, { .0601, .0 }, } }, pitchCurve = { nodes = { { .0, 1.0 }, { .0601, 1.4 }, } } }, -- Stufe 1 { clip = "vehicle/blue_tiger_br250/stufe1.wav", gainCurve = { nodes = { { .0, .0 }, { .012, .0 }, { .125, 0.8 }, { .300, 0.8 }, { .350, 0.4 }, { .400, .0 }, } }, pitchCurve = { nodes = { { .0, .6 }, { .015, .6 }, { .125, 1.0 }, { .300, 1.0 }, { .400, 1.2 }, } } }, -- Stufe 2 { clip = "vehicle/blue_tiger_br250/stufe2.wav", gainCurve = { nodes = { { .0, .0 }, { .30, .0 }, { .35, 1.0 }, { .50, 1.0 }, { .55, 1.2 }, { .70, 1.2 }, { 1.0, 1.0 }, } }, pitchCurve = { nodes = { { .0, .9 }, { .30, .9 }, { .35, 1.0 }, { .50, 1.0 }, { .55, 1.2 }, { .70, 1.2 }, { 1.0, 1.0 }, } } }, -- Lüfter { clip = "vehicle/blue_tiger_br250/luefter.wav", gainCurve = { nodes = { { .0, .0 }, { .40, .0 }, { .50, .6 }, { .70, .6 }, { 1.0, .5 }, } }, pitchCurve = { nodes = { { .0, .5 }, { .40, .5 }, { .50, 1.2 }, { .55, 1.3 }, { .70, 1.3 }, { 1.0, 1.2 }, } } }, -- Bremse { clip = "vehicle/blue_tiger_br250/bremse.wav", gainCurve = { nodes = { { .0, .0 }, { .006, .0 }, { .012, .7 }, { .125, .0 }, } }, pitchCurve = { nodes = { { .0, .9 }, { .125, 1.0 }, } } } }, } } end ]] function data() return { tracks = { { name = "vehicle/mav2002-bluetiger/stand.wav", refDist = 25.0 }, { name = "vehicle/mav2002-bluetiger/ventil.wav", refDist = 25.0 }, { name = "vehicle/mav2002-bluetiger/stufe1.wav", refDist = 25.0 }, { name = "vehicle/mav2002-bluetiger/stufe2.wav", refDist = 25.0 }, { name = "vehicle/mav2002-bluetiger/luefter.wav", refDist = 25.0 }, { name = "vehicle/train_diesel/_wheels_ringing.wav", refDist = 25.0 }, { name = "vehicle/mav2002-bluetiger/bremse.wav", refDist = 25.0 } }, events = { horn = { names = { "vehicle/mav2002-bluetiger/horn.wav" }, refDist = 16.0 }, }, updateFn = function (input) return { tracks = { { -- Stand gain = soundeffectsutil.sampleCurve({ { .0, 1.0 },{ .03, 1.0 },{ .12, .4 },{ .15, .0 },}, input.speed01), pitch = soundeffectsutil.sampleCurve({ { .0, 1.0 },{ .15, 1.0 }, }, input.speed01) }, { -- Ventil gain = soundeffectsutil.sampleCurve({ { .0, .0 },{ .0120, .0 },{ .0121, .6 },{ .0600, .6 },{ .0601, .0 },}, input.speed01), pitch = soundeffectsutil.sampleCurve({ { .0, 1.0 },{ .0601, 1.4 }, }, input.speed01) }, { -- Stufe 1 gain = soundeffectsutil.sampleCurve({ { .0, .0 },{ .012, .0 },{ .125, 0.8 },{ .300, 0.8 },{ .350, 0.4 },{ .400, .0 },}, input.speed01), pitch = soundeffectsutil.sampleCurve({ { .0, .6 }, { .015, .6 },{ .125, 1.0 },{ .300, 1.0 },{ .400, 1.2 }, }, input.speed01) }, { -- Stufe 2 gain = soundeffectsutil.sampleCurve({ { .0, .0 },{ .30, .0 },{ .35, 1.0 },{ .50, 1.0 },{ .55, 1.2 },{ .70, 1.2 },{ 1.0, 1.0 },}, input.speed01), pitch = soundeffectsutil.sampleCurve({ { .0, .9 },{ .30, .9 },{ .35, 1.0 },{ .50, 1.0 },{ .55, 1.2 },{ .70, 1.2 },{ 1.0, 1.0 }, }, input.speed01) }, { -- Luefter gain = soundeffectsutil.sampleCurve({ { .0, .0 },{ .40, .0 },{ .50, .6 },{ .70, .6 },{ 1.0, .5 },}, input.speed01), pitch = soundeffectsutil.sampleCurve({ { .0, .5 },{ .40, .5 },{ .50, 1.2 },{ .55, 1.3 },{ .70, 1.3 },{ 1.0, 1.2 }, }, input.speed01) }, soundeffectsutil.squeal(input.speed, input.sideForce, input.maxSideForce), -- Räder in der Kurve soundeffectsutil.brake(input.speed, input.brakeDecel, 0.5) -- Bremse }, events = { horn = { gain = 1.0, pitch = 1.0 } } } end } end