low-latency Rocksmith OBS streaming with software effects

Cover image

This is my bells-and-whistles setup for low-latency streaming and software effects with Ubisoft's Rocksmith 2014 Remastered for Windows.

Rocksmith 2014 is a music / rhythm game. It uses a real guitar or bass as controller and guides players through learning and playing different songs.

Changelog

As of now, this document hasn't reached its final form. I will remove this section once it does.

  • 22-05-2020: mention that both Reaper versions (32 and 64 bit) are required when running OBS 64 bit. 32 bit Reaper is needed so that the 32 bit only rs-asio hosted in (the 32 bit only) Rocksmith sees the ReaRoute channels
  • 21-05-2020: add an image with short explanation for the Reaper - Voicemeeter interaction
  • 17-05-2020: clarify that Rocksmith won't work with Voicemeeter unless the same device as the guitar input is configured in Voicemeeter A1 output
  • 17-05-2020: fix GitHub download link and add OBS Explorer pic
  • 16-05-2020: reformulate several statements for clarity
  • 16-05-2020: first article draft

Default Rocksmith

The expected way to play the game is with a guitar connected directly via the Rocksmith USB Guitar Adapter cable, marketing name - "RealTone cable" - to the computer. This acts as an instrument-to-usb audio adapter, so an analog to digital converter not unlike the "input" stages of USB or PCI audio interfaces. This guide renders the cable obsolete on PC, not on Playstation and Xbox though.

Rocksmith default connection

The cable is available even for use by other programs and this is what it appears like in the Windows Sound Control Panel - mmsys.cpl:

Rocksmith USB Guitar Adapter cable device

Rocksmith 2014 reads digital audio information from the USB cable through WASAPI. See this excellent article for some information about the technology.

In theory, WASAPI audio is comparable to ASIO in terms of latency, at least when running in exclusive mode (so no other sound source besides Rocksmith, in this case, allowed). ASIO has been an industry standard for a bit longer and it's better supported by audio interface vendors. Competent ASIO devices and drivers can manage playing multiple streams (I'm saying non exclusively here) at lower latencies than WASAPI exclusive mode.

This is my audio section of Rocksmith.ini for the Rocksmith USB cable:

[Audio]
EnableMicrophone=0
ExclusiveMode=1
LatencyBuffer=1
ForceDefaultPlaybackDevice=
ForceWDM=0
ForceDirectXSink=0
DumpAudioLog=1
MaxOutputBufferSize=192
RealToneCableOnly=1
Win32UltraLowLatencyMode=0

I'm getting crackling with fewer than 192 samples in the output buffer. Enabling Win32UltraLowLatencyMode just artifacts non-stop on my machine. Such settings are specific to each hardware configuration and it's worthwhile to test and discover the optimal combination of parameters that that's both error-free and features minimal buffer sizes (read: "latency, latency, latency").

The way to go past using the RealTone cable is with RS ASIO. RS ASIO brings the whole setup a step closer to the standard "bedroom guitarist" setup.

RS ASIO

RS ASIO supplies a special avrt.dll file which replaces Rocksmith's audio input logic with an ASIO codepath. This patch is almost useless with an audio interface that lacks a vendor-supplied ASIO driver. This because on such audio hardware ASIO4ALL emulates the ASIO functionality through WASAPI, and since Rocksmith runs by default through WASAPI, only the mixing / multiplexing part of ASIO4ALL would have any contribution.

But let's assume you already have an audio interface. I'm personally using a first edition Native Instruments Komplete Audio 6, but any entry to mid-range USB audio interface is good enough - and a must have for a bedroom guitarist.

Rocksmith RS ASIO interface

What's really nice about RS ASIO is how it resamples the audio itself, allowing for relatively low latency multiplexing between 1 or 2 inputs and an independent output. The input(s) and output can even reside on different hardware devices.

Download the latest release from the GitHub page and drop the files into the Rocksmith directory, under Steam/steamapps/common/Rocksmith2014. The files should end up there, just next to Rocksmith2014.exe.

Just launch the game and have a look at the generated RS_ASIO-log.txt file, which should enumerate the devices in the system. With this information, proceed to write your own RS_ASIO.ini file. Keep reading for now, a sample RS_ASIO-log.txt for my system will follow shortly.

Here's my RS_ASIO.ini:

[Config]
EnableWasapi=0
EnableAsio=1

[Asio]
; available buffer size modes:
;    driver - respect buffer size setting set in the driver
;    host   - use a buffer size as close as possible as that requested by the host application
;    custom - use the buffer size specified in CustomBufferSize field
BufferSizeMode=custom
CustomBufferSize=96

[Asio.Output]
Driver=Komplete Audio 6
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

[Asio.Input.0]
Driver=Komplete Audio 6
Channel=1
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

[Asio.Input.1]
Driver=
Channel=1
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

And just the relevant [Audio] section of Rocksmith.ini, to go with RS ASIO:

[Audio]
EnableMicrophone=0
ExclusiveMode=1
LatencyBuffer=2
ForceDefaultPlaybackDevice=
ForceWDM=0
ForceDirectXSink=0
DumpAudioLog=1
MaxOutputBufferSize=96
RealToneCableOnly=1
Win32UltraLowLatencyMode=1

Note that you'll need to find the smallest buffer sizes and latencies that work without artifacts on your system. Also note that the audio interface names will most probably be different.

Audio Interfaces

Any serious bedroom musician needs an audio interface after some point.

If in doubt with the choice, just head to the RS ASIO recommended list and pick one that suits you. Do not think of those as interfaces "for Rocksmith", they're just generally decent interfaces that work fine with ASIO workflows and that have been vetted by other users to also cover the scenarios described here.

Here's what RS_ASIO-log.txt might end up containing upon running a freshly unpacked RS ASIO:

0.000 [INFO]   - Wrapper DLL loaded (v0.4.2)
0.000 [INFO]  PatchOriginalCode
0.000 [INFO]  Patching CoCreateInstance
0.056 [INFO]  Patch_CallAbsoluteAddress - num locations: 5
0.056 [INFO]  Patching call at 01C5AA85
0.056 [INFO]  Patching call at 01F03B6E
0.056 [INFO]  Patching call at 01F5C681
0.056 [INFO]  Patching call at 01FAEF75
0.056 [INFO]  Patching call at 01FAF40D
0.056 [INFO]  Patching PortAudio MarshalStreamComPointers
0.162 [INFO]  Patch_CallRelativeAddress - num locations: 1
0.162 [INFO]  Patching call at 01F03059
0.162 [INFO]  Patching PortAudio UnmarshalStreamComPointers
0.273 [INFO]  Patch_CallRelativeAddress - num locations: 1
0.273 [INFO]  Patching call at 01F0310E
0.274 [INFO]  Patched_CoCreateInstance called: IID_IMMDeviceEnumerator
0.274 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eRender - role: eMultimedia
0.274 [INFO]  RSAggregatorDeviceEnum::UpdateAvailableDevices
0.274 [INFO]  AsioHelpers::FindDrivers
0.274 [INFO]    ASIO4ALL v2
0.275 [INFO]    Komplete Audio 6
0.275 [INFO]    ReaRoute ASIO
0.275 [INFO]    Voicemeeter AUX Virtual ASIO
0.275 [INFO]    Voicemeeter Insert Virtual ASIO
0.275 [INFO]    Voicemeeter Potato Insert Virtual ASIO
0.275 [INFO]    Voicemeeter VAIO3 Virtual ASIO
0.275 [INFO]    Voicemeeter Virtual ASIO
0.275 [INFO]  DebugDeviceEnum::UpdateAvailableDevices - 0 render devices, 0 capture devices
0.275 [INFO]    hr: 80070490
0.275 [INFO]    *ppEndpoint: 00000000
0.275 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eCapture - role: eMultimedia
0.275 [INFO]    hr: 80070490
0.275 [INFO]    *ppEndpoint: 00000000
0.275 [INFO]  DebugDeviceEnum::EnumAudioEndpoints - dataFlow: eAll - dwStateMask: 1
0.275 [INFO]    hr: 0
0.275 [INFO]    *ppDevices: 13FF6068
3.563 [INFO]  Patched_CoCreateInstance called: IID_IMMDeviceEnumerator
3.563 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eRender - role: eMultimedia
3.563 [INFO]  RSAggregatorDeviceEnum::UpdateAvailableDevices
3.563 [INFO]  AsioHelpers::FindDrivers
3.563 [INFO]    ASIO4ALL v2
3.563 [INFO]    Komplete Audio 6
3.563 [INFO]    ReaRoute ASIO
3.563 [INFO]    Voicemeeter AUX Virtual ASIO
3.563 [INFO]    Voicemeeter Insert Virtual ASIO
3.563 [INFO]    Voicemeeter Potato Insert Virtual ASIO
3.563 [INFO]    Voicemeeter VAIO3 Virtual ASIO
3.563 [INFO]    Voicemeeter Virtual ASIO
3.563 [INFO]  DebugDeviceEnum::UpdateAvailableDevices - 0 render devices, 0 capture devices
3.563 [INFO]    hr: 80070490
3.563 [INFO]    *ppEndpoint: 00000000
3.563 [INFO]  DebugDeviceEnum::GetDefaultAudioEndpoint - dataFlow: eCapture - role: eMultimedia
3.563 [INFO]    hr: 80070490
3.563 [INFO]    *ppEndpoint: 00000000
3.563 [INFO]  DebugDeviceEnum::EnumAudioEndpoints - dataFlow: eAll - dwStateMask: 1
3.563 [INFO]    hr: 0
3.563 [INFO]    *ppDevices: 13FF66A8
3.571 [INFO]  DebugDeviceEnum::RegisterEndpointNotificationCallback

I chose my soundcard's ASIO driver, the one called Komplete Audio 6 under the AsioHelpers::FindDrivers call from the above listing. Since I have a condenser microphone plugged into the interface's first input, numbered "0", and since I plugged the analog guitar cable into the second, numbered "1", my RS_ASIO.ini from the section above uses Channel=1 for Asio.Input.0 and nothing (empty Driver) for Asio.Input.1. RS ASIO provides up to 2 possible inputs, for split-screen multiplayer purposes.

DAW - Reaper

The end goal here is to be able to stream Rocksmith, for example on Twitch, while also using a microphone, camera and effects such as tone correction and pitch adjustment.

By tone correction I'm specifically thinking of improving in-game note detection, since it's not always spot-on unless the audio signal is super clear and with good tonal characteristics. Learning to properly mute the guitar between notes is an often overlooked skill.

Any piece of DAW software, or, for that matter, VST host software should do for the purpose of this guide. The recommended go-to option is Reaper.

Reaper is nice for several reasons:

  • any serious guitarist needs a DAW after some point
  • very cheap for the purpose (totally worth the $60 price)
  • very good licensing practices from the parent company
  • lots of community resources, especially in the guitar community
  • slightly more involved than Audacity (a must-have, as well)

I'm going to show a way of setting up Rocksmith with Reaper. From now on the assumption is that the guitar is always connected with an instrument cable, and not the Rocksmith RealTone cable, to an ASIO capable audio interface.

First thing is making sure the guitar does sound with Reaper. Use the 32 bit version simply because Rocksmith itself is 32 bit and also choose to install the ReaRoute ASIO driver with the application (it's an advanced option). I have both 32 and 64 bit versions installed and they both work fine with RS ASIO.

Reaper install ReaRoute ASIO

Then run Reaper itself and select your audio interface as ASIO device. Mileage will vary with regards to which inputs and outputs are which, probably the first elements in the lists are a safe bet, but it depends on the interface itself and on the connections:

ASIO input interface

After setting up the audio interface (through ASIO), just double click on the left side (1) until a track appears and arm it for recording (2) while selecting the guitar input channel (3):

Reaper DI

This step is essential in order to be able to keep going with this setup. To check that everything works just make some sound with the guitar - you should be able to both monitor it from Reaper and see the track VU meter acting.

Just a quality of life feature, I renamed the input channels in Reaper so that they intuitively reflect my hardware situation:

Reaper channels

RS ASIO w/ ReaRoute

Remember to always recalibrate Rocksmith from its audio options menu when making any signal chain changes.

ReaRoute acts like a series of virtual audio cables for as long as Reaper runs with it activated. The analogy with "cables" comes from the fact that instrument effects are connected analogically through cables with eachother. The virtual cables are used to connect virtual effects. The plan is to:

  1. connect guitar with an instrument cable to the audio interface
  2. audio interface plugged into computer USB
  3. use "ASIO in" from the audio interface in Reaper
  4. Reaper hosting 2 tracks, one with effects and one for monitoring
  5. the effects track hosting a series of DSP effects (maybe of VST type)
  6. Rocksmith with RS ASIO, reading input from ReaRoute
  7. writing output to ReaRoute
  8. the monitoring Reaper track just sending the signal to the master output
  9. use "ASIO out" to the audio interface in Reaper as master output destination
  10. monitor (hear) the sound

Reaper RS ASIO

Add two tracks in Reaper, name them input and output and set them up as follows:

  1. First track.

    • input in mono from the guitar audio interface channel:

      input, from guitar

    • output however (I just left the default in stereo, basically both channels are the same signal, doubled), the Reaper terminology is "route" into Rocksmith through the Reaper virtual ASIO device, on the first available ReaRoute channel pair:

      input routing

  2. Second track.

    • input in stereo from Rocksmith through those same available ReaRoute channels from before. ReaRoute channels are bidirectional, that's why this works and actually gets the sound coming from Rocksmith, and not the sound originating from the first track:

      output, from Rocksmith

    • output in stereo towards the master track that sends for monitoring into the headphones, also output in stereo towards the next pair of ReaRoute channels, because we're sneaky (this will help with recording or video streamin through OBS Studio):

      output, to destinations

To fully realize this setup, go into the Rocksmith directory and edit RS_ASIO.ini to use the first stereo pair or ReaRoute as outputs and either of the first 2 channels as input (since the first Reaper track was set up above to output as stereo, despite it only doubling the mono signal from the guitar):

[Config]
EnableWasapi=0
EnableAsio=1

[Asio]
; available buffer size modes:
;    driver - respect buffer size setting set in the driver
;    host   - use a buffer size as close as possible as that requested by the host application
;    custom - use the buffer size specified in CustomBufferSize field
BufferSizeMode=driver
CustomBufferSize=

[Asio.Output]
Driver=ReaRoute ASIO
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

[Asio.Input.0]
Driver=ReaRoute ASIO
Channel=0
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

[Asio.Input.1]
Driver=
Channel=1
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

The game should work now and you should be able to see activity on those two tracks' VU meters while playing (Rocksmith mutes itself upon alt-tabbing):

Rocksmith Reaper gameplay

Better Note Detection

If you feel that Rocksmith sometimes fails to detect your correctly played notes, just play better. Actually, add DSP compression on the input track:

Reaper compressor

The compressor makes guitar input noisier, which fools Rocksmith into thinking it detected the correct note. Set the compression ratio to some value at around 1.2 and search with the "threshold" parameter, while strumming the guitar, for a noise level threshold that gives visible compression of around -6 dB on the effect's VU meter (block number 6 in the picture). The more the compression, the more you might have to make up the lost volume through either boosting the "wet" compressor output or the track's level itself.

Try to not overdo it, and always verify each parameter change with the in-game note detection. An exaggerated amount of compression will lead to Rocksmith accepting the wrong notes. Some compression might be beneficial and even improve the guitar tone in the mix.

Drop Pedal

Pitch shifting is useful for proportionally tuning the whole fretboard up or down a certain amount of semitones. Rocksmith itself does it when playing "emulated bass" with a guitar.

Aegean Music are offering an awesome freeware pitch shifting VST plugin called Pitchproof. Get it and also check their other stuff out, as the quality of this effect indicates they know what they're doing. Download it from the website and place it - it's a .dll file - somewhere Reaper knows to look for VST effects. I dropped it at c:\Program Files\VstPlugins\pitchproof-x64.dll.

I know about that directory by going in Reaper to Options > Preferences... > Plug-ins > VST > VST plug-in path. No need to restart Reaper after obtaining new VSTs, just press Re-scan on that preferences page.

Here's a snippet of what it works like for tuning everything 2 semitones down. This transforms my standard E tuning into standard D. Here I pick the 3rd string, G, and the VST effect produces an F:

2 semitone detune

Streaming with OBS

The greatest benefit of this ASIO setup is the significantly lower latency, compared to non-exclusive WASAPI audio, which is the only Rocksmith mode which allows capturing desktop audio in OBS.

Reaper RS ASIO obs-asio

OBS Studio can consume sound from ASIO sources with the help of the obs-asio plugin. I have built and tested an obs-asio version with the BASSASIO library which appears to play really well with Rocksmith and the ReaRoute virtual ASIO devices.

Grab this version, v2.0.2-bassasio, from my repository and extract it where OBS Studio is installed. This is where the 3 relevant files from the archive should end up, for the 64 bit version:

obs-asio files

Earlier on we were sneaky and set up the output track in Reaper to send both to the master track and to ReaRoute 3 / ReaRoute 4. Add the obs-asio source in OBS and configure it to consume audio, always at 48 KHz, from those channels. The numbering base for the ReaRoute channels is 1 in Reaper but 0 in OBS with obs-asio:

OBS with obs-asio from ReaRoute

I'm using the 64 bit OBS Studio version, and it shouldn't have problems reading from ReaRoute channels, provided you have both 32 bit and 64 bit Reaper versions installed.

64 bit OBS Studio with obs-asio will only be able to read from ReaRoute if 64 bit ReaRoute is available (aka Reaper x64 is installed). The 32 bit only Rocksmith can only read from 32 bit ReaRoute - so also install 32 bit Reaper.

If the ReaRoute channels are not visible, try to have the whole audio chain - Rocksmith (no choice here, as it's only available in 32 bit), Reaper and OBS Studio in 32 bit.

Voicemeeter

I believe that Reaper cannot read audio from one ASIO device and output it to a different ASIO or non-ASIO device. Also, there might be no ReaRoute equivalent with other DAWs.

To work around such conditions there's a different solution constructed around Voicemeeter Potato. This software creates 3 virtual ASIO devices and can bridge them through various technologies with different hardware devices, simultaneously. The licensing scheme is extremely generous (it's donationware) and it achieves low enough latency. It's even able to mix the audio interface, on the instrument side, with USB or wireless headsets, which might be convenient for streaming standing up.

The setup requires Potato specifically, because I chose to not use ReaRoute at all and all of the 3 virtual devices from Voicemeeter Potato are necessary at the same time. The smaller VB Audio products, Voicemeeter Banana and Voicemeeter only create 2 and, respectively, 1 virtual ASIO device. They're also bundled with Potato.

All 3 VB-Audio cables from the Voicemeeter package -

  1. Virtual IO
  2. Virtual AUX IO and
  3. Virtual VAIO3

need to be configured for latency through their respective control panels:

VB audio cable

I chose 48 samples as that's 1 millisecond at Rocksmith's 48 KHz resolution.

This is the new processing chain, this time with Voicemeeter:

  1. Guitar into the audio interface input.
  2. Inside Potato, HARDWARE INPUT 1 with Kernel Streaming (KS) from the audio interface input, sent into Potato's B1, which is the device Virtual IO.
  3. Reaper (or any VST host) with ASIO, configured to use Voicemeeter Virtual ASIO (the driver for the Virtual IO device of the 3 devices I was enumerating just before this list).
  4. A single armed audio track in Reaper, configured to use Virtual IO's channel corresponding to the guitar. VST effects, etc on that track.
  5. Back into Potato, VIRTUAL INPUT 1 (where Reaper processed sounds arrive) sent into Potato's B2, which is the device Virtual AUX IO.
  6. Rocksmith running with RS ASIO, using Voicemeeter AUX Virtual ASIO as output device and the guitar channel from the same device as input. That one is actually the B2 from the previous point. Voicemeeter devices support bidirectional data transfers, that's why this is possible without conflict.
  7. Back into Potato, VIRTUAL INPUT 2 (feeding the audio from Rocksmith) sent into Potato's:

    • A1, which is its first physical output and should be connected via ASIO to the audio interface, for monitoring Rocksmith's audio in headphones
    • B3, which is the device Virtual VAIO3
  8. Inside OBS Studio, obs-asio should be added as an ASIO source, reading the first 2 channels from Voicemeeter VAOI3 Virtual ASIO, the B3 from before.

Voicemeeter Potato

Enlarge the picture to better understand how the list correlates with Voicemeeter Potato configuration.

An essential setting for Voicemeeter is matching first hardware output's sample rate - A1's - to exactly 48 KHz of resolution, otherwise Rocksmith won't like the audio format and complain about not finding an audio device.

The hardware input into Voicemeeter seems to work best if it's on the same device as the first hardware output, A, which also acts as the clock source. I've noticed that otherwise Rocksmith might not get audio input and output at all.

For Reaper:

  • use ASIO input (top right corner of the screen) with driver Voicemeeter Virtual ASIO
  • only have 1 armed track with all effects on it, reading from the correct Voicemeeter mono input channel and sending (it does it by default, no further config needed) into the master, which will result in signal on the first virtual input - Voicemeeter VAIO - inside Voicemeeter Potato.

Reaper for Voicemeeter

The OBS Studio image looks pretty much like before, just with different channels and with the third Voicemeeter device set up as input:

OBS with obs-asio from Voicemeeter

This is the RS_ASIO.ini for the setup:

[Config]
EnableWasapi=0
EnableAsio=1

[Asio]
; available buffer size modes:
;    driver - respect buffer size setting set in the driver
;    host   - use a buffer size as close as possible as that requested by the host application
;    custom - use the buffer size specified in CustomBufferSize field
BufferSizeMode=custom
CustomBufferSize=96

[Asio.Output]
Driver=Voicemeeter AUX Virtual ASIO
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

[Asio.Input.0]
Driver=Voicemeeter AUX Virtual ASIO
Channel=1
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

[Asio.Input.1]
Driver=
Channel=1
EnableSoftwareEndpointVolumeControl=1
EnableSoftwareMasterVolumeControl=1
SoftwareMasterVolumePercent=100

Latency with this method is slightly higher than with the Reaper method from before, but, as mentioned, it allows mixing and matching inputs and outputs offered by different hardware.

Skip Intro

There's a doctored cache.psarc file published by Steam user ("SleepingE") that gets rid of the uselessly long and annoying Rocksmith into. Replace cache.psarc from the game folder.

Custom Songs

They can be obtained from Customsforge and can be easily organized in a directory structure under Rocksmith2014/dlc. I have only created another level, Rocksmith2014/dlc/custom_dlc in there, but an arbitrary directory structure will work.

The Customsforge forums explain the mechanism - it's a modified .dll file that injects the custom DLC functionality into the game.

GuitarPro Tabs

RocksmithToTab is a tool that scans all dlc and generates Guitar Pro files from it. The project uses the fantastic Rocksmith Toolkit library which offers an API for interacting with the game.

OBS Overlays

RockSniffer is a small REST server that uses the Rocksmith Toolkit library to read stats about the current song and publish them in real time on a web endpoint. It comes with html pages which can be included as browser sources inside OBS Studio to display current song statistics and completion information.