Verifying DSP Studio

From wiki.jriver.com
Revision as of 19:43, 22 February 2018 by Mattkhan (talk | contribs)
Jump to navigation Jump to search

This Page is a Work in Progress

Overview

DSP Studio has a lot of options which interact with each other and it can be easy to make small mistakes that negatively impact sound quality. The ability to measure the output from Media Centre is therefore an extremely useful thing to be able to do. This page describes how to do this using freely available tools.

Platform Limitations

The ability to route external audio input through JRiver is only implemented on Windows.

Linux and MacOS users will need JRiver to play the test signal instead. This is described in [insert section here]

ASIO vs WDM

Windows users can choose between two input methods:

ASIO is typically preferred if the hardware supports it, this usually means you are using a pro audio interface.

Examples will be given using both methods.

Setup

Common Steps

Room EQ Wizard (REW)

Install REW from https://www.roomeqwizard.com/beta.html (note that the beta version is the generally recommended version to use)

Windows: WDM Setup

Media Centre

Ensure the feature is activated and working as per the instructions in WDM_Driver

Creating a MC -> REW Audio Path

The target signal chain is

Loopback Signal Chain

HifiCable

Install HifiCable from https://www.vb-audio.com/Cable/ (scroll to the bottom to find the HifiCable & ASIO Bridge package)

Open each audio device in the Windows Mixer in turn and ensure that each one is set to 2 channel, 24bit, 48000Hz operation

There are three devices to be configured

  • Hi-Fi Cable Playback

HifiCable Playback

  • Hi-Fi Cable Recording

HifiCable Recording

  • MC WDM Playback

MC Playback

Configure REW

Launch REW and open the preferences screen. Set the following options on the Soundcard tab

  • Drivers: Java
  • Sample Rate: 48kHz
  • Output Device: Default Device
  • Input Device: Hi-Fi Cable Output (VB-Audio Hi-Fi Cable)

Rew preferences.png

Configure MC

Launch MC and open the options screen, select the Audio page and choose the IPC zone. Set the following options;

  • Audio Device: Hi-Fi Cable Input (VB-Audio Hi-Fi Cable) [WASAPI]
  • Bitdepth: 24bit

NB: The bitdepth option is accessed via the "Device Settings..." option

Mc options.png

Open DSP Studio, deselect all blocks including output format.

Mc dsp passthrough.png

Verify the Signal Chain
  • Play a test signal
    • Launch REW
    • Open the Preferences screen
    • Go to the Soundcard tab
    • Select "Use Main Speaker test signal to check/set levels"
    • Click "Check Levels"
    • Click "Next >"
    • Confirm the output meter shows some signal is playing normally (NB: the input meters may also rise)

Rew output test.png

  • Verify MC is receiving and playing that signal
    • Open MC
    • Open DSP Studio
    • Go to the Analyser page
    • Check the analyser displays a wobbling straight line (i.e. is seeing and playing the test pink noise signal)

Mc output test.png

  • Verify REW is receiving the output from MC
    • Return to the REW Preferences/Soundcard tab
    • Check the input meters have risen to meet the input signal
    • Click "Finish" to stop the signal

Rew input test.png

  • Verify the end to end signal chain results in a passthrough, i.e. has flat frequency response
    • Close the REW Preferences screen
    • Click the "Measure" button
    • Set the following options
      • No Timing Reference
      • Start Freq: 2
      • End Pref: 24000
      • Level: -12.0
      • Length: 256k
      • Sweeps: 1
      • Output: Default Output/Both
    • Click "Start Measuring"
      • you should now see the measurement sweep complete normally and display a flat frequency response from 2-24kHz in the resulting SPL screen

Rew measure test.png

Linux: ALSA Loopback Setup

This configuration has been tested on Debian Wheezy though it is expected to work on any system with ALSA installed.

Installing the snd-aloop device

ALSA provides a loopback device using the snd-aloop module.

First load the module, verify it has created 2 loopback devices and make a note of the device capabilities.

$ sudo modprobe snd-aloop $ aplay -d

        • List of PLAYBACK Hardware Devices ****

card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]

 Subdevices: 1/1
 Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]

 Subdevices: 1/1
 Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]

 Subdevices: 1/1
 Subdevice #0: subdevice #0

card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]

 Subdevices: 1/1
 Subdevice #0: subdevice #0

card 1: Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]

 Subdevices: 0/1
 Subdevice #0: subdevice #0

card 1: Generic [HD-Audio Generic], device 1: ALC887-VD Digital [ALC887-VD Digital]

 Subdevices: 1/1
 Subdevice #0: subdevice #0

card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]

 Subdevices: 8/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7

card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]

 Subdevices: 8/8
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
 Subdevice #4: subdevice #4
 Subdevice #5: subdevice #5
 Subdevice #6: subdevice #6
 Subdevice #7: subdevice #7

$ /usr/lib/jriver/Media\ Center\ 23/alsacap

      • Scanning for playback devices ***

Card 0, ID `NVidia', name `HDA NVidia'

 Device 3, ID `HDMI 0', name `HDMI 0', 1 subdevices (1 available)
   2..8 channels, sampling rates 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
   Sample formats: S16_LE, S32_LE
     Subdevice 0, name `subdevice #0'
 Device 7, ID `HDMI 1', name `HDMI 1', 1 subdevices (1 available)
   2..8 channels, sampling rates 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
   Sample formats: S16_LE, S32_LE
     Subdevice 0, name `subdevice #0'
 Device 8, ID `HDMI 2', name `HDMI 2', 1 subdevices (1 available)
   2..8 channels, sampling rates 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
   Sample formats: S16_LE, S32_LE
     Subdevice 0, name `subdevice #0'
 Device 9, ID `HDMI 3', name `HDMI 3', 1 subdevices (1 available)
   2..8 channels, sampling rates 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
   Sample formats: S16_LE, S32_LE
     Subdevice 0, name `subdevice #0'

Card 1, ID `Generic', name `HD-Audio Generic'

 Device 0, ID `ALC887-VD Analog', name `ALC887-VD Analog', 1 subdevices (0 available)

Error opening sound device for card 1, device 0: Device or resource busy. Skipping.

 Device 1, ID `ALC887-VD Digital', name `ALC887-VD Digital', 1 subdevices (1 available)
   2 channels, sampling rates 32000, 44100, 48000, 88200, 96000, 192000 Hz
   Sample formats: S16_LE, S32_LE
     Subdevice 0, name `subdevice #0'

Card 2, ID `Loopback', name `Loopback'

 Device 0, ID `Loopback PCM', name `Loopback PCM', 8 subdevices (8 available)
   2 channels, sampling rates 44100 Hz
   Sample formats: S16_LE
     Subdevice 0, name `subdevice #0'
     Subdevice 1, name `subdevice #1'
     Subdevice 2, name `subdevice #2'
     Subdevice 3, name `subdevice #3'
     Subdevice 4, name `subdevice #4'
     Subdevice 5, name `subdevice #5'
     Subdevice 6, name `subdevice #6'
     Subdevice 7, name `subdevice #7'
 Device 1, ID `Loopback PCM', name `Loopback PCM', 8 subdevices (8 available)
   1..32 channels, sampling rates 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
   Sample formats: S16_LE, S16_BE, S32_LE, S32_BE, FLOAT_LE, FLOAT_BE
     Subdevice 0, name `subdevice #0'
     Subdevice 1, name `subdevice #1'
     Subdevice 2, name `subdevice #2'
     Subdevice 3, name `subdevice #3'
     Subdevice 4, name `subdevice #4'
     Subdevice 5, name `subdevice #5'
     Subdevice 6, name `subdevice #6'
     Subdevice 7, name `subdevice #7'

In this example, note that

  • the host has 2 hardware devices already so the loopback device is loaded as card 2
  • 2 devices (0 and 1) are listed, device 0 is the playback device which then loops back to device 1 as the record device
  • the playback device reports as supporting 44.1kHz only, this means that everything (REW preferences and MC DSP Studio) must be set to 44.1kHz operation

This last point is critical as any mismatch will cause playback to fail.

Configure MC to output to the loopback device

Launch MC and open the options screen, select the Audio page and choose the relevant zone. Set the following options;

  • Audio Device: the ALSA device corresponding to Loopback card device 0

Note that the names shown in MC are those reported by aplay -L. The device should be called something like front:CARD=Loopback,DEV=0

Linux mc audio output.png

Open DSP Studio, deselect all blocks including output format.

Mc dsp passthrough.png

Configure REW to record from the loopback device

Launch REW and open the preferences screen. Set the following options on the Soundcard tab

  • Drivers: Java
  • Sample Rate: 44.1kHz
  • Output Device: Default Device
  • Input Device: select the device corresponding to device 1 on the loopback card, e.g. plughw:2,1,0

Linux rew prefs.png

Prepare MC to Sweep Playback

MC on Linux has no audio input capability so we have to generate a sweep in REW and play that back in MC. To do so;

  • launch REW
  • press the Generator button
  • select "Meas. Sweep" from the dropdown
  • enter frequency start = 0 end = 22050 length = 256k
  • click the "WAV" button
  • check the following boxes
    • Left channel
    • Right channel
    • Add timing reference signal (Left channel)
  • set Sample rate = 44100
  • set sweep level and ref level = -12.0

Rew generate sweep.png

  • click OK
  • select 32bit samples
  • save the file
Verify the Signal Chain
  • Set REW to measure an external signal
    • Launch REW
    • Click "Measure"
    • Set the options to correspond exactly to the options selected when generating the measurement sweep
      • Use acoustic timing reference
      • Timing ref level (dBFS): -12
      • Start Freq: 0
      • End Pref: 22050
      • Level: -12.0
      • Length: 256k
      • Sweeps: 1
      • Output: Default Output/Both
      • Timing Reference Output: Left
      • Check the "Wait for timing reference" box
    • Click "Start Measuring"
  • Play the signal in MC
    • Open MC and select the File/Open Media File menu item
    • Choose the measurement sweep file saved previously
  • Return to REW
    • the sweep should play and REW should display a flat frequency response with an impulse located at T=0

Rew measure test.png

Rew perfect impulse.png