Audio routing for playing live music in videogame worlds
Summary: Audio routing from Logic Pro DAW on a Mac to an Open Broadcaster Studio (OBS) livestream on a PC to perform live music in videogame worlds that are sometimes published on YouTube and Spotify as finished improvisational tracks.
Jotted down over the course of lots of trial-and-error to help me remember which thing does what in a tangled mess of real and digital cables while avoiding earsplitting audio feedback, and to help you, dear visitor, to do the same without excess cursing. (=todo: ¶ Make a diagram and add screenshots, you damned fool! ¶ Figure out how to bring in other human instrument players remotely with tools like Jack Trip, Sonobus, and Jamulus (or just meet them in game : )
Hardware
I have a Scarlett 18i16 audio interface connected to a Mac running Logic Pro, with audio routed to a PC called Interwebs Communotron 2023 with the following cable connections, hereforth represented by equals signs =
- Guitars = Tip, Ring, and Sleeve (TRS) line cable = Input 1 (on the Scarlett).
- SM58 mic = TRS = Input 2 (Nota bene: The SM58 is for music vocals. The livestream voice is via a Rode NT-1 connected via USB-C to the PC, described further below).
- Numa Compact X SE = TRS = Input 3+4, and USB cable connected to Mac to control DAW software instruments.
- Hydrasynth Explorer = TRS = Inputs 5+6, and USB cable connected to Mac.
- Ambient 0 = Y-split cable (3.5mm-to-two-TRS) = Inputs 7+8 + MIDI OUT to Scarlett’s MIDI IN so I can see names of chords being played in Logic (the USB cables from the Numa and Hydrasynth allow the same.)
- Speakers (audio monitors) = TRS cables = Outputs 1+2 (also heard through the headphone outputs of the Scarlett).
- PC Line In (blue hole) = 3.5mm female-to-male Ground Loop Isolator (to help prevent line noise) = Y-split = Outputs 3+4 to send the Logic-processed instruments to the PC.
- USB-A to S/PDIF optical cable I used a Cubilux USB A to TOSLINK optical audio cable aka unidirectional USB Type A to SPDIF digital aux cord = S/PDIF In on Scarlett (to let me listen to, or monitor, the videogame sounds from the PC.)
First of all, make sure the sample rate is set to 48 kHz in all hardware and software settings to avoid glitches and audio desync issues in the videogames and the computers’ audio.
Mac software settings
Focusrite Control settings
Settings
For monitoring game sounds from the PC via the S/PDIF IN:
- Focusrite Control 2 → Settings → Sample rate & clocking.
- Make sure 48kHz sample rate is set.
- Scroll to the bottom and make sure Optical S/PDIF is checked.
Mixer
- Mix A on the Mac has all Analogue and Playback faders up at normal levels and Playback 9-10 all the way down for some reason I forget, or maybe that was the default.
- Mix B on the Mac has all faders muted except for Playback 3-4 up at normal levels (see Logic Pro section below).
Routing
- Monitor groups > Main Output 1-2 Source set to Mix A to be monitored from headphones (or speakers, though watch out for feedback if using speakers and mics simultaneously)
- Analogue outputs > Output 3-4 Source set to Mix B
- Digital outputs > Loopback set to Playback 1-2
Logic Pro settings
First lets make sure we’re at 48kHz:
- Logic Pro → File → Project Settings → Audio
- Make sure sample rate is set to 48kHz
We’re setting up a dedicated output pair in Logic by changing the main stereo output away from the default Playback 1-2 with the following settings:
- Logic Pro → Settings → Audio → I/O Assignments
- Stereo Output: Output 3/4
By default, the Mac’s system sound (YouTube, Spotify, etc.) will still use Playback 1-2. By moving Logic’s Stereo Out to 3-4, We’ve separated its signal.
Mix B, which routes to PC/OBS (Outputs 3+4), now consists of:
- The direct analogue and digital inputs from the instruments (1, 2, 3, 4, 5+6, 7+8).
- The processed Logic output (via Playback 3-4).
Then, we update Mix B (which goes to PC Line In/Outputs 3+4) by adjusting it thus:
- Select Mix B in Focusrite Control.
- Mute Playback 1-2 faders. This is what carries the Spotify/YouTube audio.
- Raise Playback 3-4 faders. This is now only receiving the signal from Logic Pro.
- Keep instrument inputs (1, 2, 3, 4, 5+6, 7+8) up at the desired level.
This way, if we’re listening to music or other sounds on the Mac (which uses Playback 1-2), these will be excluded from Mix B that routes audio to the PC running the OBS livestream.
Mix A (Speakers/Outputs 1+2) can remain as is, with Playback 1-2 raised, so we hear everything as normal. We don’t have to change anything when switching between practicing and listening to music.
To make music played on Mac be heard on PC (for Just Chatting streams that are not published, for example), raise the Playback 1-2 fader on Focusrite Control Mix B.
Our Logic session (all tracks, effects, the whole processed mix) is now being sent digitally to the Scarlett’s Playback 3-4 channels, and the Mac’s general system audio (Spotify, YouTube, etc) is still automatically being sent to the Scarlett’s Playback 1-2 channels, because we didn’t change the Mac’s system sound settings.
PC software and sound settings
On the PC, there’s a Rode NT-1 mic plugged in via USB-C, and we get its audio united with the Line In input with the Scarlett/Mac/Logic instrument sounds (so others can hear me speak and play instruments in video game worlds) by using Voicemeeter Banana with the following settings:
Voicemeeter
- Stereo Input 1: Rode Mic with only B2 selected.
- Stereo Input 2: Line In Realtek Audio (the Line In from Mac) with only B2 selected.
- Virtual Input 1 (the left one): Only B2 selected.
- Hardware Out (click A1 on top-right): SPDIF Interface (USB SPDIF Adapter).
- Settings: Save settings as hypertexthero on docs folder, and have Load Voicemeeter and Load Settings On Startup set.
Sound settings
- Right-click the little speaker icon on the taskbar and go to Sound Settings.
- Sound Output for listening: SPDIF Interface (make sure it is set to default — you may need to disable Realtek audio adapter and set SPDIF Interface as the default in the old control panel (I know, Windows is nuts) at Start Menu → Control Panel → search for Sound → Playback tab). And you may need to restart Voicemeeter Banana or your whole PC after doing this (╯°□°)╯︵ ┻━┻
- Sound Input for speaking or recording: Voicemeeter Out B2 (which unites the Rode mic and the Line Input instruments from the Mac.)
OBS
- Settings → Audio
- Make sure sample rate is set to 48kHz
- Desktop Audio: Default (or SPDIF Interface)
- Mic/Aux: Mic (Rode)
- Mic/Aux 2: Instruments (Line In from Mac)
Disable the rest.
Videogames
With the above setup, we can now play live, and hopefully, good, music for others to hear in multiplayer online videogame worlds like Arc Raiders or Arma Reforger, by pressing the push-to-talk or hold-to-talk keys found in the control settings for the game we’re playing, and play our instruments.
In games like Elite with built-in VOIP voice chat upon connection our instruments will also be processed by the in-game voice filters, sounding like they come from within the digital “holodeck” world.
And we can also improvise alone, playing for the void of the Cosmos, in single-player worlds like Exanima.
Many instruments at once
A setup with everything connected (potentially with another ADAT “optical door” expansion like a Scarlett OctoPre for even more instruments) seems excessive, but means we can have a band of people playing in the same physical room while transmitting and recording each part to a track simultaneously.
This is a sort of dream-come-true here, an always on studio where “mistakes” can be captured, and we can pick up the instrument that feels most attractive in the moment.
Years ago I had a Hendrix poster with an illustration of a lot of wires coming out of his head that I gave to a colleague when I left Rome for NYC. With all the wires here, sometimes I feel mired in a knot of cables, buttons, keys, and keyboards, and long for the simplicity of a real acoustic instrument made of wood. But all this also helps me begin to understand more about the technical aspects of the creativity in Jimi’s and other electric sound maestros.
Troubleshooting
Can’t hear an instrument you are playing on the Mac in OBS running on the PC?
It’s likely an signal flow issue.
Check if:
- Input monitoring is enabled for the track in Logic (and it is armed for recording if playing multiple keyboards).
- The inputs set for the instrument track in Logic correspond to the ports the instruments are plugged into.
- The TRS cables are pushed all the way in.
Next Steps
- Gain staging in games, to make sure the instruments are loud enough and can be heard by others without being annoying. Videogame sound engines for voice chatting between players are usually optimized for the human voice and not the massive dynamic range of a musical instrument, and I need to figure out a way to test the volume of my instruments in the game without bugging my friends all the time.
- Make a diagram of all the above PRONTO!!
- Stream some videogames while playing music live for more testing.
· ˖ ✦ . ˳
Come with me in creative journeys through music and play by subscribing to my YouTube and Twitch channels. ❤︎ Did you enjoy this post? You can buy me a moment of time.
Possibly Related:
- Hypertexthero streaming guide
- Separate music and game audio in OBS
- Memory, sound design, discovery of music through intuition
- Sound Space
- Relisten
˳ · ˖
Prior entry: Computer Gaming World Museum
Next entry: text-wrap: balance
