Torque Valley: Driving, Drift and Crash Sandbox
README.md
engineVoices
Checks the voice table, voice selection and the synthesis, without playing audio:
- Voices: the eight voices in
car.voiceIdorder, each with its own id, a label and sane idle / redline / limiter values. An unknown voice raises. - Selection from car values:
nameOf/idOfare inverse, out-of-range ids fall back to the four, and every torqueCars engine'svoiceIdselects the voice its catalog entry names (skipped without torqueCars). - EngineVoice helpers:
attachadds the component (autoby default), attaching again updates the same component,setswitches the voice, an unknown voice raises anddetachremoves the component. - Following rpm:
firingHzper engine type (four-stroke, two-stroke kart, rotary, electric motor order) is linear in rpm. Every voice's three band references ascend and give a whole number of cycles per second (seamless loops). The bakedev_four_2_onloop peaks exactly on its firing frequency. - Following load: every on-load take is louder than its off-load take, in the specs and in rendered samples (v8 band 2). Rendering is deterministic.
- Tables: every clip the runtime plays resolves (48 loops, aux, shifts, pops, crashes, blow-off, skids),
loopNamespells the clip names, and the skid sound per surface follows driveSurfaces' order.
It leaves alone the per-frame mix of a live EngineVoice (band weights, smoothing, limiter stutter, pops, Doppler) and actual playback, which run only in play with an audio listener. It also does not re-bake any clips. Stand-in cars are spawned far below the play area and despawned after each test.
Run it in edit mode:
return asset.resolve("engineVoices", "testSuite"):run()