CI / quality (push) Successful in 1m18s
Daikoku Futo PA becomes the hub (Tokyo Xtreme Racer structure): park, pick a
mode, drive out the exit gate to start the run, pull back into the PA to end it.
Modes:
- CRUISE free roam, banks session + lifetime kilometres
- DUEL gap-based battle: hold 350 studs for 3s to win
- TIME ATTACK solo flying lap, 4 sector splits, saved personal best
New shared modules:
- Circuit.luau one source of truth for loop geometry. progressOf(pos) gives
lap distance, which drives lap detection, sectors and duel gaps
alike, so the map and gameplay can never drift apart.
- Modes.luau mode definitions + duel/time-attack tuning constants
Server-authoritative throughout: ModeManager samples the car real position on
Heartbeat and the client never reports distance, lap time or gap. Teleport and
respawn jumps are rejected from distance accumulation.
ProfileTemplate v3 adds DistanceStuds, BestLapTime, BestSectors, DuelsWon and
DuelsLost; ProfileStore Reconcile migrates existing saves.
Rename: repo, wally package, local dir and stale NAS asset paths all move off
the old fnf-sim name. NAS folder was already 0-tokyo-wangan-racing, so those
doc paths were broken before this.
105 lines
4.6 KiB
Markdown
105 lines
4.6 KiB
Markdown
## Status: loops are BUILT ✅ — awaiting Studio upload
|
||
|
||
Real 13B loops extracted from the owner's own footage. **v2**: rev + turbo
|
||
whistle now come from the action-cam library
|
||
(`/mnt/user/data/b-action-cam-footage/clipchamp/`, 99 GB scanned — same car),
|
||
which captured the turbo + exhaust together far better than the first source.
|
||
|
||
- `assets/audio/rx7_idle_loop.ogg` — 15.9 s steady idle (~99 Hz fundamental,
|
||
from the 2026-07-10 session; seam jump 0.001)
|
||
- `assets/audio/rx7_rev_loop.ogg` — 7.9 s whistle-rich highway pull (~124 Hz,
|
||
from 20260510-Return..., window 985-993 s: 0.0 Hz pitch drift across 8 s,
|
||
turbo whistle ~1.7 kHz riding +33 dB over the band; seam jump 0.001)
|
||
- `assets/audio/rx7_whistle_loop.ogg` — the SAME pull high-passed at 1.2 kHz:
|
||
isolated turbo whistle, layered in-game on top of the rev loop and faded
|
||
in/up with "boost" (throttle held at speed) for the authentic spool sound
|
||
- Masters (`.wav` + `.ogg`) mirrored to the NAS:
|
||
`.../001-1993 Mazda RX-7/sound/`
|
||
|
||
**Remaining (owner, in Studio): upload the three `.ogg` files** (Asset Manager →
|
||
Import, or Creator Dashboard → Audio), wait for moderation, then paste the three
|
||
asset IDs into `CAR_SOUNDS.rx7_fc` in `src/client/SoundController.luau`.
|
||
|
||
More source material exists in the other clipchamp sessions — the extraction is
|
||
repeatable (method below).
|
||
|
||
---
|
||
|
||
# Pipeline reference (how the loops were made / how to redo them)
|
||
|
||
The RX-7 must sound like a rotary. The pipeline: the owner's own recordings →
|
||
processed into two seamless loops on this workstation → uploaded in Studio →
|
||
IDs pasted into `SoundController.CAR_SOUNDS`.
|
||
|
||
## What the game needs (two loops)
|
||
|
||
| Loop | Content | Length |
|
||
|---|---|---|
|
||
| **Idle** | Engine idling, steady. The rotary lope/brap at rest. | 5–10 s |
|
||
| **Rev** | Held at steady mid-high RPM (~4–6k), NOT a sweep. | 5–10 s |
|
||
|
||
Steady-state matters: the game pitch-shifts and crossfades these, so a loop
|
||
recorded during rising RPM will "wander" audibly. A long recording containing
|
||
steady sections is fine — the good seconds get cut out in processing.
|
||
|
||
## Step 1 — Record (or use existing video)
|
||
|
||
Any source works: phone video, GoPro footage, a Zoom H5 recording. Existing
|
||
videos of the car are fine — audio gets extracted. Best results:
|
||
- Record OUTSIDE the car, mic a few feet from the exhaust.
|
||
- Get ≥10 s of steady idle and ≥5 s of held revs.
|
||
- Avoid wind over the mic and people talking.
|
||
|
||
Drop the files on the NAS next to the reference photos:
|
||
```
|
||
unraid-1:/mnt/user/data/yy-roblox-games/0-tokyo-wangan-racing/001-1993 Mazda RX-7/sound/
|
||
```
|
||
|
||
## Step 2 — Process into seamless loops (this workstation)
|
||
|
||
Hermes does this — the box already has ffmpeg + numpy/scipy (`avsync-research`
|
||
venv). Ask and it happens; for reference the recipe is:
|
||
|
||
1. Extract audio: `ffmpeg -i clip.mp4 -vn -ac 1 -ar 48000 raw.wav`
|
||
2. Find a steady window (visually via spectrogram, or scripted RMS/pitch scan).
|
||
3. Cut the loop at zero-crossings and apply a short equal-power crossfade from
|
||
the tail onto the head so the seam is inaudible:
|
||
loop-body + (last ~150 ms faded out, overlaid on first ~150 ms faded in).
|
||
4. Normalize to about -3 dBFS peak, export `.ogg` (smaller upload, Roblox-native):
|
||
`ffmpeg -i loop.wav -c:a libvorbis -q:a 6 rx7_idle_loop.ogg`
|
||
5. Verify: play the file on repeat (`ffplay -loop 0`) — no click, no wander.
|
||
|
||
Outputs: `rx7_idle_loop.ogg` + `rx7_rev_loop.ogg`, copied back to the NAS
|
||
`sound/` folder and kept in `assets/audio/` locally (small enough to commit).
|
||
|
||
## Step 3 — Upload in Studio (owner)
|
||
|
||
1. Studio → **View → Asset Manager → Import** (or the Creator Dashboard →
|
||
Development Items → Audio) → upload both `.ogg` files.
|
||
2. Audio uploads require an ID/phone-verified account; private audio uploaded
|
||
to YOUR account is playable in YOUR experiences — exactly our case.
|
||
3. Copy each asset ID after moderation clears (usually minutes).
|
||
|
||
## Step 4 — Wire in
|
||
|
||
In `src/client/SoundController.luau`, uncomment and fill:
|
||
```lua
|
||
local CAR_SOUNDS: { [string]: EngineSounds } = {
|
||
rx7_fc = {
|
||
Idle = "rbxassetid://<idle id>",
|
||
Rev = "rbxassetid://<rev id>",
|
||
},
|
||
}
|
||
```
|
||
Rebuild, playtest, adjust `IDLE_PITCH_*` / `REV_PITCH_*` / `CROSSFADE_*` to
|
||
taste. Done — the RX-7 braps.
|
||
|
||
## Why not a toolbox rotary?
|
||
|
||
Searched; candidates exist (e.g. "13B ROTARY ENGINE SOUND", id 118059219867199)
|
||
but can't be auditioned outside Roblox (asset downloads require auth), most are
|
||
short unloopable rips, and rights are murky. The owner HAS the real car — its
|
||
actual engine is strictly better than any stranger's rip. Toolbox is the
|
||
fallback only if recording proves impractical: audition in Studio before
|
||
committing to one.
|