REW fails to output sound on Linux

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
I am running Debian Sid. I've tried REW both in WINE and with the Linux installer but the issue is the same. I know the problem is not with Linux because I can play music at the same time REW is attemping to check levels but failing. If I turn up REW to max in the software mixer I hear a bit of noise during the level check, but it's nowhere near as loud as it should be.

I had REW working previously on this machine, so I know it can work.

Just to check if what I want is possible with REW: Is it possible to find frequency/phase response, then do a single tone THD measurement, which is then normalized to the freq/phase response, and then export the result as a .wav file? Is it also possible to normalize it to the loopback audio signal rather than the REW output?
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
Which REW version are you running? If 5.20 beta 2 open the REW signal generator before trying a level check.

I'm afraid I don't understand what you are asking for regarding the THD measurement.
 

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
Sometimes it mentions trouble writing the fade out block. The closest I get to sound output is choosing the Pulseaudio mixer for output. Whenever I end the tone I get one startling burst of sound for a split second. The same thing occurs for both 5.1 and 5.2.

What I want to do:

1: Generate frequency response and phase based on loopback from the amp output.
2: Measure THD at a constant frequency
3: Apply magnitude and phase response to the THD spectrum to remove phase shift and response variations.
4: Export the result as a .wav file.
 

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
If I do a level check on the Settings page it hangs with most of the boxes greyed out, and I have to restart REW to reset it. I can instead do it on the Measurements page, going back and forth between Measurements and Settings to change the sound devices. But no luck so far.
 

John Mulcahy

REW Author
Joined
Apr 3, 2017
Messages
7,212
Perhaps a Linux user will comment on the audio setup, not something I can help with, sorry. For level check on settings open the REW signal generator first.

Measuring responses is REW's main role, a loopback connection can be used as a timing reference. Sweep measurements also include distortion measurement and the harmonics can be normalised to the level of the response at the harmonic frequency, there is an option in the distortion graph controls for that.

REW doesn't really have a way to capture a tone and alter it. It is possible to import recorded audio data as long as the segment isn't too long (less than a minute or so) and the trace arithmetic features of the All SPL graph would allow an A/B operation between that audio sample and the system's impulse response, the result of that could be exported as a WAV though I'm not certain it would achieve what you want.
 

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
Well I figured out that REW works in WINE. Apparently the level check sound is just a noise blip played in loop!? I just assumed it was a bug.

Problem is the Linux version still doesn't work and the Windows version is limited to 48KHz.
 

forlau

Registered
Joined
Feb 1, 2020
Messages
1
same here: no audio output possible with Ubuntu 19.04. In preferences whatever output device i try, the output box below stays empty. REW 5.19

Code:
REW V5.20 Beta 34 running JRE 1.8.0_242 64-bit on linux 5.3.0-29-generic, de, UTF-8
 

Message:
    javax.sound.sampled.LineUnavailableException: PulseAudio Mixer has no lines available supporting PCM_SIGNED 48000.0 Hz, 16 bit, 6 channels, 12 bytes/frame, little-endian
Stack Trace:
PulseAudio Mixer has no lines available supporting PCM_SIGNED 48000.0 Hz, 16 bit, 6 channels, 12 bytes/frame, little-endian
    roomeqwizard.E.E(y:2671)
    roomeqwizard.hG$16.actionPerformed(y:20)
    javax.swing.JComboBox.fireActionEvent(JComboBox.java:1258)
    javax.swing.JComboBox.setSelectedItem(JComboBox.java:586)
    javax.swing.JComboBox.setSelectedIndex(JComboBox.java:622)
    javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:868)
    java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
    java.awt.Component.processMouseEvent(Component.java:6539)
    javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:517)
    java.awt.Component.processEvent(Component.java:6304)
    java.awt.Container.processEvent(Container.java:2239)
    java.awt.Component.dispatchEventImpl(Component.java:4889)
    java.awt.Container.dispatchEventImpl(Container.java:2297)
    java.awt.Component.dispatchEvent(Component.java:4711)
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    java.awt.Container.dispatchEventImpl(Container.java:2283)
    java.awt.Window.dispatchEventImpl(Window.java:2746)
    java.awt.Component.dispatchEvent(Component.java:4711)
    java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    java.awt.EventQueue.access$500(EventQueue.java:97)
    java.awt.EventQueue$3.run(EventQueue.java:709)
    java.awt.EventQueue$3.run(EventQueue.java:703)
    java.security.AccessController.doPrivileged(Native Method)
    java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    java.awt.EventQueue$4.run(EventQueue.java:733)
    java.awt.EventQueue$4.run(EventQueue.java:731)
    java.security.AccessController.doPrivileged(Native Method)
    java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:705)
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
 
Last edited:

4WheelSpyder

Registered
Joined
May 29, 2020
Messages
4
I am trying to get REW going on a portable setup. To rule out hardware or Lubuntu release specific issues as much as possible, I installed REW 5.20 Beta 53 on 2 older laptops. The first has a 32 Bit processor running Lubutu 18.04 and the second is a 64 bit machine running Lubuntu 20.04. In both cases I installed Java 8 JDK (non headless) version. The Sound interface is a USB based VanTec NBA-200U which I have used with REW on a Windows setup with good results.

In both cases the PulseAudio Volume Control GUI allows the NBA-200U to be configured into a stereo only setup, or full surround sound. I have confirmed this by playing a 5.1 movie using the VLC Player. As soon as the VLC player starts to communicate with the NBA-200U, the blue led on the unit changes from being constantly on, to flashing.

When running REW the configuration screen presents PulseAudio Mixer as output and input sources which can be selected without any issue. However, when I try output sound using the REW signal generator, the blue LED starts flashing, (indicating some communication is happening) but no sound. The PulseAudio Volume Control GUI unit also do not indicate any output on the monitor graph. This happens on both setups.

I have tried Oracle Java 8 and that does not present PulseAudio Mixer as an option, but a more generic Output 0_1 (or something like that) when it detects the NBA-200U. Again no sound.

It feels as if I am only one or two settings away from using this great piece of software on my portable setup. Any new pointers on this topic?
 

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
I was able to run REW in WINE when it wasn't working natively.

Try using another Java app with sound to see if it works. If so then it is probably a bug in REW that can be fixed.

I did have a no sound problem that I was able to fix by switching back and forth between left and right channels in the sound card preferences. Currently my problem is that REW has choppy sound output. I can fix this in the sound preferences by using the "check levels" button multiple times, if that doesn't work go back and forth between the sound generator and check levels, and eventually the chopping stops.

So yeah, REW on linux is pretty buggy. I'm glad that it works at all.

I would suggest looking through your software repository for java sound related packages, things that might alter the communication between Java and Linux slightly and get things to work.
 

4WheelSpyder

Registered
Joined
May 29, 2020
Messages
4
Wow, thanks for the quick responses. 1536 kHz certainly shows what can be done!. I have a hunch that the problem may be around the interface with the PulseAudio Mixer/ NBA-200U combination. If their is any record of success using a simpler single (or stereo) channel USB input and output audio interface with Linux, that is also suitable for subwoofer analysis, I am willing to order one to try it out (at my own risk of course)
 

4WheelSpyder

Registered
Joined
May 29, 2020
Messages
4
Got it to work. Replaced the Lubuntu distro with a Linux Mint distro based on Debian. The only version available is the Cinnamon version which takes significantly longer to boot than the lighter Lubuntu, but appears to more stable when leaving the laptop on overnight. Had to first uninstall the java 11 that came with the distro. When I tried to install Java 8 there was a message that openjdk-8 is obsolete and it is replaced by nvidia-openjdk-8. I decided to give it a go. Was a bit worried that the Nvidia version may not support sound, especially when java -version did not show anything. I noted that the Linux Mint distro also did not include PulseAudio. I believe it is using ALSA. To select the USB device I selected Device [plughw:1.0] as output device and Line as Output in the Preferences. All 8 channels appeared in the dropdown list. Using the sound generator I could verify that the selection of individual channels are functional on the 7.1 output device. Will report back once I have run my first sweeps. Some wood cutting to do first.
 

keantoken

New Member
Thread Starter
Joined
May 31, 2018
Messages
62
Good to hear. I will note that, for its disadvantages, I still use Pulseaudio because it allows me to change the input to REW while recording. But this needs to be done keeping samplerate conversion in mind.
 

4WheelSpyder

Registered
Joined
May 29, 2020
Messages
4
I was not to happy with the extended login time of the Debian based build, so I decided to try the recently released Ubuntu Focal based build of Mint, codename Ulyana, specifically the MATE edition. This came with PulseAudio installed. Even with the PulseAudio server being present the Device [plughw:1.0] is listed as soon as the NBA-200U is hooked up and it worked as before.
 
Last edited:

bjmsam

Registered
Joined
Jan 28, 2018
Messages
6
Location
Mount Airy, MD
More  
Preamp, Processor or Receiver
Denon AVR X4000
Main Amp
Adcom GFA-585
Additional Amp
Adcom GFA-2535
Front Speakers
AR-9
Surround Speakers
Definitive Technology
Surround Back Speakers
KSI
Video Display Device
Epson 3020
Screen
120"
Thanks for this thread. REW worked perfectly on my Aspire One D255 running Lubuntu a few years ago, but after upgrading to version 5.20.4 this morning to take new measurements, it is behaving as described above (nothing from Check Levels and only a burst of sound when stopping the generator) with Default Output on PulseAudio Mixer. Unfortunately, I did not keep the installer for the earlier version of REW that worked. ☹️
 

bjmsam

Registered
Joined
Jan 28, 2018
Messages
6
Location
Mount Airy, MD
More  
Preamp, Processor or Receiver
Denon AVR X4000
Main Amp
Adcom GFA-585
Additional Amp
Adcom GFA-2535
Front Speakers
AR-9
Surround Speakers
Definitive Technology
Surround Back Speakers
KSI
Video Display Device
Epson 3020
Screen
120"
Thank you! I last used 5_19_beta_9 successfully but it no longer works so perhaps the problem is due to an OS update (Bug 1914649 - REW: no pulseaudio output for a different distro potentially is relevant).

Update: I reinstalled the latest Lubuntu distro (20.4.3) and now get output via the headphones jack but no input via the microphone jack. Both work as expected in the PulseAudio mixer app, but REW meters only OUT and REF IN. IN appears to be active but meters silence (screen shots of this configuration are attached below) unless "Monitor of Built-In Audio Analog Stereo" is set as Fallback, which appears to reflect the source signal (bypassing headphones output and microphone input).

Update 2: I connected an old USB 7.1 device I happened to find in my stash and everything works as expected in REW but the loopback calibration curve looks completely unacceptable (-3dB at 70Hz). I ordered a two channel alternative and will see if it's any better before giving up on the Audyssey mic and buying a UMIK-1.

Note: In REW 5.20, the Preferences window is taller than it was in 5.19, complicating access to the bottom buttons when rendered on this netbook's 1024x600 (WSVGA) screen (the snaps attached below are full screen). A workaround is to move the window up as far as possible (so the title bar is mostly obscured) and enable the Auto-hide option for the LXQt Panel at bottom.

49662


Above with Audyssey mic connected, below with loopback connected, both with same Volume Control settings. When Monitor is set to Fallback instead, all three meters look identical, presumably because the I/O ports are bypassed.

49676
 
Last edited:

jschwender

Member
Joined
Mar 16, 2021
Messages
140
Location
GERMANY
More  
Front Speakers
Nubert digital pro
Other Speakers or Equipment
Philips dss940
pulseaudio or wine is not a good choice, it makes things unpredictable. pusleaudio is very good for destop application, as it allows to transparently join multiple audio streams with different rates or resolution and run them through network or your speakers. This signal path may utilize re-coding and re-sampling that you certainly not want for measurement or for professional recording for example. try to access alsa device directly. You must know that alsa devices access is exclusive. That means REW does not see the device if another application is accessing the device. For example, if you open the pulseaudio mixer, and this one accesses the alsa device you want REW to use, this will not work. This is not a bug, it is a feature. Depending on your hardware, your alsa device has default settings that are usable for REW or not. I have a asus U7, and this one needs settings adjusted before REW can use it, otherwise the level is too low. You may have to adjust alsa settings according to your requirements.
 

bjmsam

Registered
Joined
Jan 28, 2018
Messages
6
Location
Mount Airy, MD
More  
Preamp, Processor or Receiver
Denon AVR X4000
Main Amp
Adcom GFA-585
Additional Amp
Adcom GFA-2535
Front Speakers
AR-9
Surround Speakers
Definitive Technology
Surround Back Speakers
KSI
Video Display Device
Epson 3020
Screen
120"
Interesting - thank you! I tried the new Sabrent USB device (item B00IRVQ0F8 on Amazon) and it measures even worse (red trace) than the old 7.1 device (green trace). To eliminate my netbook's hardware as the culprit, I installed REW on a Macbook Air and repeated the results there. So, unless I'm misinterpreting any of this, it's time to pursue ALSA vs. PulseAudio (in hopes of helping REW access the netbook's mic input) or order a UMIK-1 (calibrated ones remain unavailable on the Cross Spectrum web site).

49667
 
Last edited:

jschwender

Member
Joined
Mar 16, 2021
Messages
140
Location
GERMANY
More  
Front Speakers
Nubert digital pro
Other Speakers or Equipment
Philips dss940
for acoustic measurements, a USB microphone like UMIK-1 has the advantage that it is simple. I have a UMIK-2 and it does not have any mixer controls, switches or something you can screw up. You plug it in, an alsa-device appears and REW does recognize it properly. Very user friendly.
 

bjmsam

Registered
Joined
Jan 28, 2018
Messages
6
Location
Mount Airy, MD
More  
Preamp, Processor or Receiver
Denon AVR X4000
Main Amp
Adcom GFA-585
Additional Amp
Adcom GFA-2535
Front Speakers
AR-9
Surround Speakers
Definitive Technology
Surround Back Speakers
KSI
Video Display Device
Epson 3020
Screen
120"
Understood. The drawbacks to a USB microphone include: 1. no loopback, 2. I don't have one, 3. CSL has none. ;)

After issuing the following commands to stop PulseAudio and prevent it from restarting:
Code:
systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
systemctl --user disable pulseaudio.socket
systemctl --user disable pulseaudio.service
systemctl --user mask pulseaudio.socket
systemctl --user mask pulseaudio.service


...REW detected the netbook's device, so perhaps there is hope!

49682


After swapping the Input channel:

49683


The Output list displayed in REW comprises Master, Headphone, Speaker, PCM, Mic, Mic Boost, Beep.
The Input list displayed in REW comprises Mic Boost, Capture, Digital, Inverted.

It seems odd that 'Mic' is a Playback channel and not a Capture channel...

Code:
$ amixer controls
numid=20,iface=CARD,name='Headphone Jack'
numid=19,iface=CARD,name='Internal Mic Phantom Jack'
numid=18,iface=CARD,name='Mic Jack'
numid=21,iface=CARD,name='Speaker Phantom Jack'
numid=17,iface=MIXER,name='Master Playback Switch'
numid=16,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Headphone Playback Switch'
numid=1,iface=MIXER,name='Headphone Playback Volume'
numid=24,iface=MIXER,name='PCM Playback Volume'
numid=13,iface=MIXER,name='Mic Boost Volume'
numid=7,iface=MIXER,name='Mic Playback Switch'
numid=6,iface=MIXER,name='Mic Playback Volume'
numid=11,iface=MIXER,name='Capture Switch'
numid=9,iface=MIXER,name='Capture Volume'
numid=5,iface=MIXER,name='Loopback Mixing'
numid=8,iface=MIXER,name='Auto-Mute Mode'
numid=15,iface=MIXER,name='Beep Playback Switch'
numid=14,iface=MIXER,name='Beep Playback Volume'
numid=25,iface=MIXER,name='Digital Capture Volume'
numid=12,iface=MIXER,name='Inverted Capture Switch'
numid=10,iface=MIXER,name='Inverted Capture Volume'
numid=4,iface=MIXER,name='Speaker Playback Switch'
numid=3,iface=MIXER,name='Speaker Playback Volume'
numid=23,iface=PCM,name='Capture Channel Map'
numid=22,iface=PCM,name='Playback Channel Map'

$ amixer scontents
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 52 [81%] [-12.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 0 [0%] [-64.00dB] [off]
  Front Right: Playback 0 [0%] [-64.00dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Beep',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 31
  Mono: Capture 20 [65%] [13.50dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Digital',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 60 [50%] [0.00dB]
  Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control 'Inverted',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 31
  Mono: Capture 0 [0%] [-16.50dB] [off]
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'


Must REW meter "Ref In" to function properly? Calibration seems to work fine with the channels reversed, even with PulseAudio re-enabled, so perhaps I have been over-complicating the situation:

49684
 
Last edited:

jschwender

Member
Joined
Mar 16, 2021
Messages
140
Location
GERMANY
More  
Front Speakers
Nubert digital pro
Other Speakers or Equipment
Philips dss940
As UMIK comes with cal file, you don't need loopback for calibrating. For timing reference you can use acoustic signal in the measurement.
If you start pulsseaudio after REW, that works because access to device is locking, and preventing other applications from access. Like if you have REW running on a specific device, and then start another application like audacity, it will not be able to access the same device. Running pulseaudio alone does not lock the device, the locking takes place when you use it in pulse. If you start the pulseaudio mixer, this locks the device. If you then close the mixer, it takes some time, like 20 s to release the access to the device. If you wait that long, you should be able to run REW without shutting down the pa service.
 

bjmsam

Registered
Joined
Jan 28, 2018
Messages
6
Location
Mount Airy, MD
More  
Preamp, Processor or Receiver
Denon AVR X4000
Main Amp
Adcom GFA-585
Additional Amp
Adcom GFA-2535
Front Speakers
AR-9
Surround Speakers
Definitive Technology
Surround Back Speakers
KSI
Video Display Device
Epson 3020
Screen
120"
Yes, I was over-complicating things. It seems to be working fine now! Rather than purchasing another microphone, I donated the money to John Mulcahy!

49713


49714


More graphs here.
 
Last edited:
Top Bottom