@helix3/helix-cli 0.1.22-helix3.423 → 0.1.23-helix3.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/vehicle/audio.d.ts +14 -0
- package/dist/vehicle/audio.js +63 -19
- package/dist/vehicle/audio.js.map +1 -1
- package/dist/vehicle/audioImport.d.ts +179 -0
- package/dist/vehicle/audioImport.js +547 -0
- package/dist/vehicle/audioImport.js.map +1 -0
- package/dist/vehicle/audioProvenance.d.ts +38 -0
- package/dist/vehicle/audioProvenance.js +301 -0
- package/dist/vehicle/audioProvenance.js.map +1 -0
- package/dist/vehicle/audioSlots.d.ts +27 -0
- package/dist/vehicle/audioSlots.js +43 -0
- package/dist/vehicle/audioSlots.js.map +1 -0
- package/dist/vehicle/audioSpectral.d.ts +9 -0
- package/dist/vehicle/audioSpectral.js +37 -0
- package/dist/vehicle/audioSpectral.js.map +1 -1
- package/dist/vehicle/publish.d.ts +9 -0
- package/dist/vehicle/publish.js +20 -0
- package/dist/vehicle/publish.js.map +1 -1
- package/dist/vehicle/testutil/sourcedAudio.d.ts +13 -0
- package/dist/vehicle/testutil/sourcedAudio.js +90 -0
- package/dist/vehicle/testutil/sourcedAudio.js.map +1 -0
- package/docs/vehicle-audio-import.md +256 -0
- package/package.json +2 -1
- package/plugins/beamng-vehicle/README.md +3 -1
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_abs.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_audio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_engine.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_expression.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_jbeam.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_materials.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/beamng_stock_events.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/fmod_studio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/fsb5.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_ac.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_beamng.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/sim_audio_fixtures.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/test_beamng_engine.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/__pycache__/test_sim_audio.cpython-312.pyc +0 -0
- package/plugins/beamng-vehicle/bin/beamng_audio.py +33 -9
- package/plugins/beamng-vehicle/bin/beamng_stock_events.py +171 -0
- package/plugins/beamng-vehicle/bin/fmod_studio.py +482 -0
- package/plugins/beamng-vehicle/bin/fsb5.py +304 -0
- package/plugins/beamng-vehicle/bin/sim_audio.py +250 -0
- package/plugins/beamng-vehicle/bin/sim_audio_ac.py +378 -0
- package/plugins/beamng-vehicle/bin/sim_audio_beamng.py +731 -0
- package/plugins/beamng-vehicle/bin/sim_audio_fixtures.py +269 -0
- package/plugins/beamng-vehicle/bin/sim_audio_import.py +121 -0
- package/plugins/beamng-vehicle/bin/test_sim_audio.py +215 -0
package/README.md
CHANGED
|
@@ -53,7 +53,8 @@ The token is stored in `~/.helix/credentials.json` (mode `600`). It's sent as
|
|
|
53
53
|
| `helix continuum publish-glb <mesh.glb> --title <t> [--package-type asset\|character] [--offer marketplace\|world --price-lix <n> --content-rating <rating>]` | Seal a Package first; optional offer makes it ownable. See [Package-first GLB publication](#package-first-glb-publication). |
|
|
54
54
|
| `helix continuum make-item --package-id <id> --package-version <v> --manifest-cid <cid> --content-rating <rating> [--offer marketplace\|world --price-lix <n>]` | Project one exact sealed Package Version into an Item, with an optional first offer. |
|
|
55
55
|
| `helix continuum publish-owned-item <item-id> --package-id <id> --package-version <v> --manifest-cid <cid> --content-rating <rating> --accept-rating-attestation` | Publish an existing personal Item from its unchanged public sealed Package pin. Offers are separate. |
|
|
56
|
-
| `helix vehicle audio-
|
|
56
|
+
| `helix vehicle audio-import <mod dir\|mod .zip\|AC car dir\|.bank> --out <dir> [--sim beamng\|ac\|auto] [--vehicle <id>] [--config <file.pc>] [--map <slot-map.json>] [--beamng-root <dir>] [--cylinders N] [--json]` | Takes a car's sounds from the sim mod that carries them, never synthesised: a BeamNG mod's own ladders and every sound its parts name (stock FMOD events resolved in the install's banks with `--beamng-root`, which also supplies what the game itself plays for unnamed slots), or an Assetto Corsa car's FMOD bank. Writes `audio/*.wav` (16-bit PCM, malformed headers repaired) and `audio.json` (the package `audio` block, all 31 slots, `provenance` on every slot, bank sample and blend). `--map` merges slots from several sources. Exit `1` when a slot stays empty. See [docs/vehicle-audio-import.md](docs/vehicle-audio-import.md). |
|
|
57
|
+
| `helix vehicle audio-check <dir\|package.json\|audio.json\|item-id> [--reference <clip>]... [--json]` | Proves every sound the runtime will select resolves, is PCM WAV and is audible (pre-publish on local files, or read-back on a published item), and that no two roles share one recording (shift up = shift down, an exhaust rung = an engine rung) and the rev limiter is a short crack the runtime can retrigger. Prints each slot's provenance and FAILS synthesised or generated audio (`AUDIO_SYNTHESISED`), a car without a recorded engine ladder (`AUDIO_ENGINE_UNSOURCED`), a missing or empty slot (`AUDIO_SLOT_UNSOURCED`, except `absent: "not-fitted"` / `"combined-with-engine"`), recordings without provenance (`AUDIO_PROVENANCE_MISSING`) and a not-fitted claim the physics contradicts (`AUDIO_SLOT_FITMENT_MISMATCH`); `vehicle publish` refuses the same. `--reference <clip>` (repeatable; `slot=clip` for a slot) compares the idle voice's centroid and firing roughness with a real-car recording. |
|
|
57
58
|
| `helix vehicle addon check <dir> [--json]` | Add-on fit gate for local source and host compatibility, including the web customizer's meshless guard (`ADDON_CUSTOMIZER_REFUSES`: a part with no `model.glb` must be a verified tune-only/sound-only definition). |
|
|
58
59
|
| `helix vehicle addon check --item <addOnId>... / --host <vehicleId>... [--json]` | Published mode (public reads, no sign-in): reads each add-on Item's exact Package pin and runs exactly what the web customizer runs; `--host` checks every add-on on the car's rail. Exit `1` = the customizer would refuse a part, with its message. |
|
|
59
60
|
| `helix item list-slots [--json]` | Print the Character-Creator vocabulary a wearable declares: the cosmetic slot tags, and the genders. |
|
package/dist/index.js
CHANGED
|
@@ -907,7 +907,9 @@ vehicleCommand
|
|
|
907
907
|
const { statSync } = await Promise.resolve().then(() => __importStar(require('node:fs')));
|
|
908
908
|
const isDir = statSync(path).isDirectory();
|
|
909
909
|
const { readVehicleDir } = await Promise.resolve().then(() => __importStar(require('./vehicle/publish')));
|
|
910
|
-
const
|
|
910
|
+
const raw = isDir ? readVehicleDir(path).pkg : (0, validate_1.readJsonFile)(path);
|
|
911
|
+
// A bare `audio` block (what `vehicle audio-import` writes as audio.json) is checked as { audio }.
|
|
912
|
+
const pkg = !isDir && raw && typeof raw === 'object' && !('audio' in raw) && Array.isArray(raw.slots) ? { audio: raw } : raw;
|
|
911
913
|
report = await audio.checkAudioLocal(pkg, isDir ? path : (0, node_path_1.resolve)(path, '..'), undefined, undefined, options);
|
|
912
914
|
}
|
|
913
915
|
printVehicleJsonOr(opts.json, report, () => console.log(audio.formatAudioReport(report)));
|
|
@@ -919,6 +921,51 @@ vehicleCommand
|
|
|
919
921
|
process.exitCode = 2;
|
|
920
922
|
}
|
|
921
923
|
});
|
|
924
|
+
vehicleCommand
|
|
925
|
+
.command('audio-import')
|
|
926
|
+
.description('Take a car\'s sounds from the sim mod that carries them — never synthesised. Reads a BeamNG mod (folder or .zip: its own engine/exhaust '
|
|
927
|
+
+ 'sfxBlend2D ladders, every sound its selected parts name — starter, shutdown, afterfire, turbo whine and blow-off, gearbox whine, shift levers, '
|
|
928
|
+
+ 'door latches, horn and soundscape, beam sounds — and the recordings it ships), an Assetto Corsa / ACC car (folder or its sfx .bank: the FMOD '
|
|
929
|
+
+ 'engine event becomes the rpm ladder, row 0 off-throttle and row 1 on-throttle, exterior preferred; horn, doors, gears, turbo, backfire, limiter, '
|
|
930
|
+
+ 'skid, wheel and transmission events become slots) or a bare FMOD .bank. With --beamng-root the BeamNG install\'s stock FMOD banks resolve every '
|
|
931
|
+
+ 'stock event a mod names, and fill what the car does not name with what the game itself plays (tyres, impacts, doors, shift, suspension). '
|
|
932
|
+
+ 'Writes <out>/audio/*.wav (16-bit PCM; malformed WAV headers repaired, sample bytes untouched) and <out>/audio.json — the package `audio` block '
|
|
933
|
+
+ '(bank + all 31 slots) with provenance { kind, sim, mod, modUrl?, sourceFile, sourceSha256, event?, extractor } on every slot, bank sample and blend '
|
|
934
|
+
+ '— plus <out>/audio-import.json. A slot no source provides stays EMPTY with the reason (for a stock event: exactly which). --map merges several '
|
|
935
|
+
+ 'sources (one mod\'s ladder, another mod\'s horn, an AC car\'s doors). Exit 1 when a slot or the engine ladder is left without a recording')
|
|
936
|
+
.argument('<source>', 'a BeamNG mod folder or .zip, an Assetto Corsa car folder (content/cars/<car>), or an FMOD .bank')
|
|
937
|
+
.requiredOption('--out <dir>', 'output folder (audio/ + audio.json + audio-import.json)')
|
|
938
|
+
.option('--sim <sim>', 'beamng | ac | auto', 'auto')
|
|
939
|
+
.option('--vehicle <id>', 'the BeamNG vehicle folder (vehicles/<id>) when the mod has several')
|
|
940
|
+
.option('--config <file.pc>', 'the BeamNG configuration whose selected parts name the sounds (default: the vehicle\'s default .pc)')
|
|
941
|
+
.option('--map <slot-map.json>', 'merge sources per slot: { sources: { id: { path, sim: beamng|ac|beamng-base|recording, vehicle?, config?, modUrl? } }, slots: { <slot>: { source?, sample?|field?|event?|file?, blend? (ladders), trim?: { startS, endS }, concat?: [pick, ...], notFitted?|absent: "not-fitted" + reason } }, ladder: { source, blend?, exhaustBlend?, rpm: { sample: rpm }, prefer, nativeRungs }, cylinders, strokes, crankLayout, bankId, modUrl } (docs/vehicle-audio-import.md)')
|
|
942
|
+
.option('--beamng-root <dir>', 'the BeamNG.drive install (its content/art_sound.zip FMOD banks and content/vehicles/common.zip); default $HELIX_BEAMNG_ROOT')
|
|
943
|
+
.option('--cylinders <n>', 'the RECORDED engine\'s cylinder count (the ladder pitch model); required for an Assetto Corsa car', (v) => Number(v))
|
|
944
|
+
.option('--prefer <side>', 'exterior | interior engine recordings (Assetto Corsa engine_ext / engine_int)', 'exterior')
|
|
945
|
+
.option('--ac-native-rungs', 'keep only FMOD engine samples the bank places at their recorded pitch (no auto-pitch re-rate)')
|
|
946
|
+
.option('--mod-url <url>', 'where the mod was downloaded from (recorded in provenance.modUrl)')
|
|
947
|
+
.option('--json', 'print the machine-readable result')
|
|
948
|
+
.action(async (source, opts) => {
|
|
949
|
+
try {
|
|
950
|
+
const { importVehicleAudio, formatAudioImport } = await Promise.resolve().then(() => __importStar(require('./vehicle/audioImport')));
|
|
951
|
+
if (opts.sim && !['auto', 'beamng', 'ac'].includes(opts.sim))
|
|
952
|
+
throw new Error(`--sim ${opts.sim}: expected beamng, ac or auto`);
|
|
953
|
+
if (opts.cylinders !== undefined && !(Number.isInteger(opts.cylinders) && opts.cylinders > 0 && opts.cylinders <= 16))
|
|
954
|
+
throw new Error('--cylinders must be a whole number 1-16');
|
|
955
|
+
const result = importVehicleAudio({
|
|
956
|
+
source, out: opts.out, sim: (opts.sim ?? 'auto'), vehicle: opts.vehicle, config: opts.config, map: opts.map,
|
|
957
|
+
beamngRoot: opts.beamngRoot ?? process.env.HELIX_BEAMNG_ROOT, cylinders: opts.cylinders, prefer: opts.prefer === 'interior' ? 'interior' : 'exterior',
|
|
958
|
+
acNativeRungs: opts.acNativeRungs, modUrl: opts.modUrl, vgmstream: process.env.HELIX_VGMSTREAM,
|
|
959
|
+
});
|
|
960
|
+
printVehicleJsonOr(opts.json, result, () => console.log(formatAudioImport(result)));
|
|
961
|
+
if (!result.ok)
|
|
962
|
+
process.exitCode = 1;
|
|
963
|
+
}
|
|
964
|
+
catch (error) {
|
|
965
|
+
process.stderr.write(`✖ ${error instanceof Error ? error.message : String(error)}\n`);
|
|
966
|
+
process.exitCode = 2;
|
|
967
|
+
}
|
|
968
|
+
});
|
|
922
969
|
const vehicleAddOnCommand = vehicleCommand
|
|
923
970
|
.command('addon')
|
|
924
971
|
.description('Check vehicle add-ons (wheels, kits, exhausts, tune parts)');
|