REW with Software EQ

Discuss your workplace, instruments, amps, and any other gear.

Moderators: khz, MattKingUSA

User avatar
lilith
Established Member
Posts: 481
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Contact:

REW with Software EQ

Postby lilith » Fri Dec 29, 2017 8:14 pm

As Room Equation Wizard does not use Jack, is there any way to use REW with a software Equalizer plugin to test the settings, i.e. if the signal becomes more linear with EQ on? I have KXStudio 14.04 running.
https://soundcloud.com/lilith_93
_____________________________
Debian 9 (XFCE) & KXStudio repos

Musinux
Established Member
Posts: 33
Joined: Sun Jan 14, 2018 8:38 pm

Re: REW with Software EQ

Postby Musinux » Sun Jan 14, 2018 9:20 pm

1. See http://www.jackaudio.org/faq/routing_alsa.html . Change your .asoundrc to the jack-bridge and REW can "see" your jackd.

2. If you have this running, and if you're brave enough, see https://www.ludd.ltu.se/~torger/brutefir.html , which let's you try eq changes in realtime (and much more)

User avatar
CrocoDuck
Established Member
Posts: 929
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: REW with Software EQ

Postby CrocoDuck » Mon Jan 15, 2018 9:42 am

Musinux wrote:2. If you have this running, and if you're brave enough, see https://www.ludd.ltu.se/~torger/brutefir.html , which let's you try eq changes in realtime (and much more)


That's pretty interesting! I did not know about that program. I reckon that if you export the impulse response of your room from REW, if it isn't too long, you can calculate an inverse of it and use that program to convolve it to your audio signals, thus (theoretically) compensating perfectly for your room acoustics.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

User avatar
funkmuscle
Established Member
Posts: 2156
Joined: Mon Jun 02, 2008 2:30 pm

Re: REW with Software EQ

Postby funkmuscle » Mon Jan 15, 2018 4:43 pm

CrocoDuck wrote:
Musinux wrote:2. If you have this running, and if you're brave enough, see https://www.ludd.ltu.se/~torger/brutefir.html , which let's you try eq changes in realtime (and much more)


That's pretty interesting! I did not know about that program. I reckon that if you export the impulse response of your room from REW, if it isn't too long, you can calculate an inverse of it and use that program to convolve it to your audio signals, thus (theoretically) compensating perfectly for your room acoustics.

Croco, this ties into some of your theories..

User avatar
lilith
Established Member
Posts: 481
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Contact:

Re: REW with Software EQ

Postby lilith » Sat Jan 20, 2018 8:05 pm

Musinux wrote:1. See http://www.jackaudio.org/faq/routing_alsa.html . Change your .asoundrc to the jack-bridge and REW can "see" your jackd.

2. If you have this running, and if you're brave enough, see https://www.ludd.ltu.se/~torger/brutefir.html , which let's you try eq changes in realtime (and much more)


Thanks for your reply! My .asoundrc file looks like:

Code: Select all

# ------------------------------------------------------
# Custom asoundrc file for use with snd-aloop and JACK
#
# use it like this:
# env JACK_SAMPLE_RATE=44100 JACK_PERIOD_SIZE=1024 alsa_in (...)
#

# ------------------------------------------------------
# playback device
pcm.aloopPlayback {
  type dmix
  ipc_key 1
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,0"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# capture device
pcm.aloopCapture {
  type dsnoop
  ipc_key 2
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,1"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# duplex device
pcm.aloopDuplex {
  type asym
  playback.pcm "aloopPlayback"
  capture.pcm "aloopCapture"
}

# ------------------------------------------------------
# default device
pcm.!default {
  type plug
  slave.pcm "aloopDuplex"
}

# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
  type dsnoop
  ipc_key 3
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,1,0"
    channels 2
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 32768
  }
}

# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}


What do I have to inlcude here that REW sees the input channel? BruteFIR looks pretty complicated, thanks for the tip.
https://soundcloud.com/lilith_93
_____________________________
Debian 9 (XFCE) & KXStudio repos

User avatar
CrocoDuck
Established Member
Posts: 929
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: REW with Software EQ

Postby CrocoDuck » Sun Jan 21, 2018 9:17 am

lilith wrote:As Room Equation Wizard does not use Jack, is there any way to use REW with a software Equalizer plugin to test the settings, i.e. if the signal becomes more linear with EQ on?


Just for curiosity, I am not very familiar with REQ, but what can you export from REW? Can you export the whole impulse response in some way?
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

User avatar
lilith
Established Member
Posts: 481
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Contact:

Re: REW with Software EQ

Postby lilith » Sun Jan 21, 2018 2:32 pm

CrocoDuck wrote:
lilith wrote:As Room Equation Wizard does not use Jack, is there any way to use REW with a software Equalizer plugin to test the settings, i.e. if the signal becomes more linear with EQ on?


Just for curiosity, I am not very familiar with REQ, but what can you export from REW? Can you export the whole impulse response in some way?


You can export EQ settings as a file based on your measurement for various hardware or plugins (e.g. miniDSP). I was just interested in equalizing three frequencies on which I have have strong room modes (~40, 50 and 120 Hz). You can also show the correction settings as a table (frequency, Q-factor, damping) which you can use for any EQ (plugin or hardware) by setting the parameters by hand.
https://soundcloud.com/lilith_93
_____________________________
Debian 9 (XFCE) & KXStudio repos

User avatar
CrocoDuck
Established Member
Posts: 929
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: REW with Software EQ

Postby CrocoDuck » Sun Jan 21, 2018 5:34 pm

lilith wrote:
CrocoDuck wrote:
lilith wrote:As Room Equation Wizard does not use Jack, is there any way to use REW with a software Equalizer plugin to test the settings, i.e. if the signal becomes more linear with EQ on?


Just for curiosity, I am not very familiar with REQ, but what can you export from REW? Can you export the whole impulse response in some way?


You can export EQ settings as a file based on your measurement for various hardware or plugins (e.g. miniDSP). I was just interested in equalizing three frequencies on which I have have strong room modes (~40, 50 and 120 Hz). You can also show the correction settings as a table (frequency, Q-factor, damping) which you can use for any EQ (plugin or hardware) by setting the parameters by hand.


The feature list suggests that it is possible to export the measured impulse response as WAV. If you manage to do that, it would be fun to try to invert it and use the inverse in a convolution reverb. Octave can be used for that pretty easily. This should give you the highest degree of compensation for the transmission line you measured. This means that, if you put your head where the microphone was during the measurement, then the compensation will be not optimal as your Head Related Transfer Functions are not the mic response, but maybe it will work OK anyway, especially at low frequency I think.

If you have time to spare, try to give us your impulse response, if you figure out how to do it. I can try to calculate the inverse for you and we can give it a spin, and compare it with the EQ solution.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

User avatar
lilith
Established Member
Posts: 481
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Contact:

Re: REW with Software EQ

Postby lilith » Sun Jan 21, 2018 5:52 pm

CrocoDuck wrote:
lilith wrote:
CrocoDuck wrote:
Just for curiosity, I am not very familiar with REQ, but what can you export from REW? Can you export the whole impulse response in some way?


You can export EQ settings as a file based on your measurement for various hardware or plugins (e.g. miniDSP). I was just interested in equalizing three frequencies on which I have have strong room modes (~40, 50 and 120 Hz). You can also show the correction settings as a table (frequency, Q-factor, damping) which you can use for any EQ (plugin or hardware) by setting the parameters by hand.


The feature list suggests that it is possible to export the measured impulse response as WAV. If you manage to do that, it would be fun to try to invert it and use the inverse in a convolution reverb. Octave can be used for that pretty easily. This should give you the highest degree of compensation for the transmission line you measured. This means that, if you put your head where the microphone was during the measurement, then the compensation will be not optimal as your Head Related Transfer Functions are not the mic response, but maybe it will work OK anyway, especially at low frequency I think.

If you have time to spare, try to give us your impulse response, if you figure out how to do it. I can try to calculate the inverse for you and we can give it a spin, and compare it with the EQ solution.


That sounds interesting. What kind of convolution plugin can I use for that in Linux? I'll check how to do this in REW. Anyway ... My monitors (Neumann KH80) have in in-built room correction, however I'm still waiting for the control app which is always shifted. It should come out in summer 2018.
https://soundcloud.com/lilith_93
_____________________________
Debian 9 (XFCE) & KXStudio repos

User avatar
CrocoDuck
Established Member
Posts: 929
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: REW with Software EQ

Postby CrocoDuck » Sun Jan 21, 2018 6:09 pm

lilith wrote:
That sounds interesting. What kind of convolution plugin can I use for that in Linux? I'll check how to do this in REW. Anyway ... My monitors (Neumann KH80) have in in-built room correction, however I'm still waiting for the control app which is always shifted. It should come out in summer 2018.


I don't really use convolution reverbs a lot, so I am probably missing out many. There is one in the LSP Plugins suite. I believe Guitarix has one too. I am pretty sure there is plenty of good ones around, perhaps other user will have others to suggest.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

Musinux
Established Member
Posts: 33
Joined: Sun Jan 14, 2018 8:38 pm

Re: REW with Software EQ

Postby Musinux » Fri Feb 09, 2018 9:08 pm

lilith wrote:[
What do I have to inlcude here that REW sees the input channel? BruteFIR looks pretty complicated, thanks for the tip.


Although I'm pretty sure you don't want to do it that way:


For this asoundrc, you have to load the snd-aloop module with

Code: Select all

sudo modprobe snd_aloop
or fill /etc/modprobe.d/sound.conf with

Code: Select all

options snd_aloop pcm_substreams=2 index=4


you can leave out the pcm_substreams and index options, but this is needed i.e. for consistent numbering of soundcards after reboots...

You have to point the !default device in .asoundrc (see below) to the loopback input device.

check with

Code: Select all

# playback devices
aplay -l
# recording devices
arecord -l
# for advanced devices like hdmi
aplay -L
arecord -L


You'd have to route the physical in/outs to the loopback and out of it back to the physical in/outs.


To avoid timing issues and the unforseeable latency of alsa loopback in general, try it with the rather simple approach from the jack faq:

Code: Select all

pcm.!default {
    type plug
    slave { pcm "rawjack" }
}
pcm.rawjack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}

pcm.jack {
    type plug
    slave { pcm "rawjack" }
    hint {
    description "JACK Audio Connection Kit"
    }
}


The !default entry ensures that after saving the .asoundrc everything uses the alsa->jack bridge.
Depending on your interface and setup, you only need to change the ports (system:playback_1...) to your channels.
Then in REW you just select the "default" device and that should be it.

If this doesn't work, you're probably missing some package named alsa-plugins or alsa-jack.

I know the faq mentions something about a more robust approach using the loopback method, this can be true for studio or recording stuff, but REW is "dumb" picking alsa devices, sample rates and such.

Btw, I have to use jack2 with REW when measuring since jack1 will kick REW because of timing issues.

User avatar
lilith
Established Member
Posts: 481
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Contact:

Re: REW with Software EQ

Postby lilith » Sun Feb 11, 2018 3:25 pm

Musinux wrote:
lilith wrote:[
What do I have to inlcude here that REW sees the input channel? BruteFIR looks pretty complicated, thanks for the tip.


Although I'm pretty sure you don't want to do it that way:


For this asoundrc, you have to load the snd-aloop module with

Code: Select all

sudo modprobe snd_aloop
or fill /etc/modprobe.d/sound.conf with

Code: Select all

options snd_aloop pcm_substreams=2 index=4


you can leave out the pcm_substreams and index options, but this is needed i.e. for consistent numbering of soundcards after reboots...

You have to point the !default device in .asoundrc (see below) to the loopback input device.

check with

Code: Select all

# playback devices
aplay -l
# recording devices
arecord -l
# for advanced devices like hdmi
aplay -L
arecord -L


You'd have to route the physical in/outs to the loopback and out of it back to the physical in/outs.


To avoid timing issues and the unforseeable latency of alsa loopback in general, try it with the rather simple approach from the jack faq:

Code: Select all

pcm.!default {
    type plug
    slave { pcm "rawjack" }
}
pcm.rawjack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}

pcm.jack {
    type plug
    slave { pcm "rawjack" }
    hint {
    description "JACK Audio Connection Kit"
    }
}


The !default entry ensures that after saving the .asoundrc everything uses the alsa->jack bridge.
Depending on your interface and setup, you only need to change the ports (system:playback_1...) to your channels.
Then in REW you just select the "default" device and that should be it.

If this doesn't work, you're probably missing some package named alsa-plugins or alsa-jack.

I know the faq mentions something about a more robust approach using the loopback method, this can be true for studio or recording stuff, but REW is "dumb" picking alsa devices, sample rates and such.

Btw, I have to use jack2 with REW when measuring since jack1 will kick REW because of timing issues.


Hi,

thanks for your reply. Do I understand you correctly that method no. 2

Code: Select all

pcm.!default {
    type plug
    slave { pcm "rawjack" }
}
pcm.rawjack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}

pcm.jack {
    type plug
    slave { pcm "rawjack" }
    hint {
    description "JACK Audio Connection Kit"
    }
}


is enough? I'll give it a trial as soon I find some time and do some reading first.
https://soundcloud.com/lilith_93
_____________________________
Debian 9 (XFCE) & KXStudio repos

Musinux
Established Member
Posts: 33
Joined: Sun Jan 14, 2018 8:38 pm

Re: REW with Software EQ

Postby Musinux » Sun Feb 11, 2018 6:11 pm

lilith wrote:is enough? I'll give it a trial as soon I find some time and do some reading first.


Yes, enough for room measurements with REW.

User avatar
lilith
Established Member
Posts: 481
Joined: Fri May 27, 2016 11:41 pm
Location: bLACK fOREST
Contact:

Re: REW with Software EQ

Postby lilith » Thu Sep 20, 2018 3:59 pm

Thanks!!! Just tested it and after some fiddling it works. I added the lines in .asoundrc
Then start Cadence, Jack and the alsa jack bridge.

Image

Then started REW and choose Default Device as output. After this a rawjack device appears in Catia and a EQ can be added in front of it.

Image
https://soundcloud.com/lilith_93
_____________________________
Debian 9 (XFCE) & KXStudio repos


Return to “Your Studio & Gear”

Who is online

Users browsing this forum: No registered users and 1 guest