# Audio Middleware Sound Designer Workflow

## Source Of Truth

This guide completes `TODOS.phase-72.72.28.1.15` and is bound by
`V2/ue/Content/V2/Audio/AudioMiddlewareSoundDesignerWorkflow_V2_Contract.json`.

The V2 launch audio runtime remains MetaSounds plus AudioModulation. Wwise,
FMOD, and custom middleware authoring are optional handoff paths for partner
studios and advanced production builds. Every middleware deliverable must
preserve the native fallback path and the maya-audio built-in system so the
default cook remains functional without external middleware.

This document covers the MetaSounds plus AudioModulation launch runtime, Wwise
FMOD custom provider handoff, gameplay event ids and provider event names,
generated middleware projects, hot reload development sessions, per-platform
soundbanks, dependency sidecars, content cook build pipeline, and runtime
fallback QA signoff.

Topic tags: `MetaSounds plus AudioModulation launch runtime`,
`native fallback path`, `maya-audio built-in system`,
`Wwise FMOD custom provider handoff`,
`gameplay event ids and provider event names`, `generated middleware projects`,
`hot reload development sessions`, `per-platform soundbanks`,
`dependency sidecars`, `content cook build pipeline`,
`runtime fallback QA signoff`.

Primary source docs:

- `audio-middleware-backend.md`
- `audio-cooking.md`
- `music-authoring-interface.md`
- `music-system-composer-integration-guide.md`

Contract dependencies:

- `AudioMiddlewareBackend_V2_Contract.json`
- `WwiseSDKIntegration_V2_Contract.json`
- `FMODStudioIntegration_V2_Contract.json`
- `AudioMiddlewareAbstractionLayer_V2_Contract.json`
- `AudioMiddlewareSpatialSourceManager_V2_Contract.json`
- `AudioMiddlewareListenerManager_V2_Contract.json`
- `AudioMiddlewareEnvironmentZoneManager_V2_Contract.json`
- `AudioMiddlewareOcclusionRaycastManager_V2_Contract.json`
- `AudioMiddlewareSoundbankStreamingManager_V2_Contract.json`
- `AudioMiddlewareProfilingIntegration_V2_Contract.json`
- `AudioMiddlewareGameplayEventTriggerManager_V2_Contract.json`
- `AudioMiddlewareProjectGenerationManager_V2_Contract.json`
- `AudioMiddlewareHotReloadManager_V2_Contract.json`
- `AudioMiddlewareFallbackManager_V2_Contract.json`
- `AudioMiddlewareBuildPipelineIntegration_V2_Contract.json`

## Middleware System Map

Gameplay code talks to `FV2AudioMiddlewareAbstractionLayer`, not directly to a
vendor runtime. The launch route remains custom/native audio, while optional
provider rows mirror the same gameplay events into Wwise and FMOD:

- `Audio.Gameplay.Weapon.Fire`
- `Audio.Gameplay.Player.Footstep`
- `Wwise.Event.Weapon.Fire`
- `FMOD.Event.Player.Footstep`
- `CustomAudio.Event.Weapon.Fire`

The production path is:

1. Generate middleware project structure from
   `AudioMiddlewareProjectGenerationManager_V2_Contract.json`.
2. Author events, parameters, switches, states, and banks in Wwise, FMOD, or the
   custom provider project.
3. Validate gameplay event routes through
   `AudioMiddlewareGameplayEventTriggerManager_V2_Contract.json`.
4. Validate 3D source, listener, environment-zone, and occlusion metadata before
   mix review.
5. Cook per-platform soundbanks through
   `AudioMiddlewareBuildPipelineIntegration_V2_Contract.json`.
6. Keep `AudioMiddlewareFallbackManager_V2_Contract.json` valid so unavailable
   middleware routes to `maya-audio.built-in`.

## Sound Designer Deliverables

Each middleware handoff must include these deliverables:

- stable gameplay event ids for weapon fire and player footstep coverage;
- provider event names for Wwise, FMOD, and custom middleware routes;
- bank ids `Audio.Wwise.Bank.CoreGameplay`, `Audio.FMOD.Bank.CoreGameplay`, and
  `Audio.CustomAudio.Bank.CoreGameplay`;
- generated project files for Wwise and FMOD event/bank structures;
- per-platform soundbanks for `Win64`, `PS5`, and `XSX`;
- dependency sidecars ending in `.v2audiobankdeps.json`;
- surface switch, weapon intensity RTPC, and custom parameter coverage;
- spatial source, camera listener, acoustic zone, reverb, occlusion, and
  obstruction metadata;
- profiling labels for CPU usage, voice count, and memory usage;
- native fallback confirmation for every optional middleware route.

Reference generated bank paths:

- `Content/Wwise/GeneratedSoundBanks/Win64/CoreGameplay.bnk`
- `Content/FMOD/Banks/PS5/CoreGameplay.bank`
- `Content/CustomAudio/Banks/XSX/CoreGameplay.bank`

Reference cooked output:

- `Saved/Cooked/XSX/V2/Audio/Middleware/CustomAudio/CoreGameplay.bank`

## Authoring Workflow

1. Start from generated middleware projects. Use the project generation manager
   before hand-authoring banks so gameplay event names, bank ids, work units,
   and parameters match runtime contracts.
2. Author event payloads against gameplay events. Weapon fire owns
   `Audio.Control.Weapon.FireIntensity`; footsteps own
   `Audio.Control.Player.MovementSpeed` and surface switch data.
3. Keep provider event names stable once gameplay code references them. Rename
   work units or folders only when the generated project contract and all bank
   specs change in the same review.
4. Use hot reload only in development sessions. A changed `CoreGameplay`
   soundbank should resolve
   `Audio.MiddlewareHotReload.Accepted.ReloadChangedSoundbank` and reload
   without restarting the game.
5. Validate runtime routes through the abstraction layer before any provider SDK
   review. The same authored event must still play through the custom/native
   route when Wwise or FMOD are absent.
6. Record profiling evidence after spatial/listener/environment routing works.
   CPU, voice, and memory counters should publish to the engine profiler before
   final mix signoff.

## Content Cook And Build Pipeline

Per-platform middleware bank cooking happens during content cook. The build
pipeline integration accepts a platform cook only when content cook is running,
generated middleware projects are available, native fallback is allowed, and the
provider/platform/bank tuple exists.

Required cook behavior:

- `Audio.MiddlewareBuildPipeline.Accepted.CookPlatformSoundbank`
- deterministic cook commands for Wwise, FMOD, and custom providers;
- per-platform soundbanks for `Win64`, `PS5`, and `XSX`;
- dependency sidecars such as
  `Saved/Cooked/Win64/V2/Audio/Middleware/Wwise/CoreGameplay.v2audiobankdeps.json`;
- rejection of missing content cook through
  `Audio.MiddlewareBuildPipeline.Rejected.ContentCookNotRunning`;
- rejection of missing generated middleware projects through
  `Audio.MiddlewareBuildPipeline.Rejected.GeneratedProjectMissing`.

The general native audio cook remains documented in
`V2/docs/asset-pipeline/audio-cooking.md`. Middleware bank cooking extends that
content-cook flow but does not replace the native MetaSounds plus
AudioModulation path.

## Runtime Fallback And QA Signoff

Middleware must be treated as optional at runtime. If Wwise, FMOD, or custom
middleware is unavailable, `Audio.MiddlewareFallback.Accepted.MayaAudioBuiltIn`
routes gameplay events to the maya-audio built-in system. QA signoff must verify
that unavailable middleware does not block weapon fire, footsteps, spatial
positioning, listener updates, environment sends, occlusion reporting, or core
gameplay banks.

Signoff evidence must include:

- a successful Wwise cook for `Win64`;
- a successful FMOD cook for `PS5`;
- a successful custom provider cook for `XSX`;
- a missing-content-cook rejection;
- a missing-generated-project rejection;
- a hot-reload development session for `CoreGameplay`;
- a fallback route to `maya-audio.built-in`;
- runtime snapshot fields for build pipeline registration, per-platform cook
  readiness, dependency sidecar readiness, and last cooked output path.

## Validation Commands

Run the guide checker and adjacent middleware gates:

```bash
python3 V2/ue/Tools/check-v2-audio-middleware-sound-designer-workflow.py
python3 V2/ue/Tools/check-v2-audio-middleware-build-pipeline-integration.py
python3 V2/ue/Tools/check-v2-audio-middleware-fallback-manager.py
python3 V2/ue/Tools/check-v2-audio-middleware-project-generation-manager.py
python3 V2/ue/Tools/check-v2-audio-middleware-gameplay-event-trigger-manager.py
python3 V2/ue/Tools/check-v2-audio-middleware-hot-reload-manager.py
python3 V2/ue/Tools/check-v2-audio-middleware-soundbank-streaming-manager.py
python3 V2/ue/Tools/check-v2-audio-module.py
python3 V2/ue/Tools/check-v2-ci-workflow.py
python3 V2/ue/Tools/check-v2-buildgraph.py
python3 V2/tools/validate-v2-docs.py
python3 -m json.tool V2/ue/Content/V2/Audio/AudioMiddlewareSoundDesignerWorkflow_V2_Contract.json
```
