Play Unity's sounds through an ASIO driver, each sound on its own output channel, and send their positions over OSC. With REAPER (through its ReaRoute ASIO driver) and Spat Revolution, this spatialises a Unity scene on any speaker layout.
Unity sends each sound to REAPER on its own channel, and its position to Spat Revolution. Spat Revolution calculates the spatialisation, then either plays the result on the audio interface itself (A), or sends it back to REAPER, which plays it (B):
graph LR
A[Unity] -- ASIO channels 1, 2, 3... --> B[REAPER]
B -- Spat Send plugin --> C{Spat Revolution}
A -- OSC: positions --> C
C -- A: audio interface --> D[Speakers / headphones]
C -- B: Spat Return plugin --> B
B -- B: audio interface --> D
See How it works for the two workflows.
- ASIO Audio Source: replaces Unity's Audio Source, and plays a WAV, AIFF, MP3 or FLAC file on one ASIO output channel (or a multichannel file on consecutive channels), with fades, a smooth (crossfaded) loop, mute / solo, and a waveform in the Inspector.
- Sample-accurate sync: Play All, Pause All, Stop All and Restart All start every source on the same sample.
- Mixing: the ASIO Audio Mixer window, an in-game overlay (also in builds), dB faders and meters, and mix snapshots.
- Timeline: ASIO Audio tracks to lay out cues, and REAPER Command markers.
- Works without ASIO: on a computer without the show's driver, the sources play through Unity's audio, so a project can be worked on anywhere.
- Setup tools: Show Setup creates what a scene needs in one click, the Setup Check window shows each link of the chain from the driver to Spat Revolution (with fixes and links to the docs), and Test Channels beeps each source in turn to check its routing.
- Spat OSC plugin: the Spat Controller sends the positions (and optionally orientations) and names of every source and room to Spat Revolution.
- REAPER OSC plugin: the REAPER Controller follows Unity's transport (and Unity can follow REAPER's), plays regions, runs actions and Lua scripts on Unity events, and creates REAPER's tracks (ReaRoute input, Spat Revolution Send plugin) from the scene's sources.
- OSC remote: control playback, volumes and snapshots from another application (TouchOSC, REAPER, Max...).
Windows only (ASIO). Tested with Unity 6.3 LTS.
- In Unity, open Window > Package Manager.
- Click + > Add package from git URL...
- Paste
https://github.com/liris-xr/AsioAudioUnity.gitand click Add.
A demo scene can be imported from the package's Samples tab in the Package Manager.
Follow the tutorials, in order:
- Installation
- Set up REAPER
- Set up Spat Revolution
- First play in Unity
- ASIO sources in your scene
- Send positions to Spat Revolution
- Control REAPER from Unity
- Control Unity over OSC
The documentation home has the tutorials, the reference of every component and setting, and troubleshooting. The changes of each version are in the changelog.