Old 08-17-2018, 01:49 PM   #1
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 3,950
Default VSTi host and latency

Currently I am using Airwave to host my VST/VSTi plugins, but the lowest latency I can have REAPER set Jack to is 512 samples. If I run 96k it feels pretty tight, but at 48k it begins to feel laggy.

If I'm not using any VSTi plugins, I can run the same as I do with the same hardware in Windows, which is 64 samples and super tight response, but if I try to add a VSTi with anything less than 512 samples, it will lock REAPER up where a reboot is needed to gain control over the hardware again.

Anyway, it just occurred to me that maybe one of the other WINE hosts for VST/VSTi plugins might be more latency friendly than Airwave. Has anybody bench marked the three or so that exist?
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-18-2018, 01:49 PM   #2
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,787
Default

I've never managed to get airwave working, have only tried linvst. I would suggest trying linvst too, to see if it works better. Seeing how these bridges work, I think one can't really expect it to work as well as in windows, on the other hand 512 sounds very high, and it's definitively not normal that the entire linux box would hang and require a reset..

I think we'll need to see how all this plays out on the long term, but IMO windows vst(i)s ought to be ok in reaper for mixing, and most likely many of them ought to work for live monitoring, but it's hard to say to what point and how well..

One question is what have you done to optimize your system, can you memlock and run rt priority threads? Have you installed a lowlatency or realtime kernel?

You can also try to use reaper without jack, as it can handle both audio & midi directly via alsa nowdays.

I also did submit a patch for linvst that would improve it's realtime performance but it never got included in the code, and now it's changed so much that the patch is useless. But I kind of lost interest seeing that I wrote code for nothing

To sum it up, I think on the long term we can probably get quite far with the performance of windows vsts on linux, but it's never going to be as good as on native windows (which is natural), native linux plugins will always have a performance edge. What remains to be seen is how far someone can take the performance and what will be possible or not.
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040,etc. :)
Jack Winter is offline   Reply With Quote
Old 08-19-2018, 07:50 AM   #3
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 3,950
Default

If I don't try to use any bridged from WINE VSTi instruments, I can record audio and midi using Jack running 44/24 @ 64 samples latency with 2 buffers, which is exactly how I run the same machine in Windows with REAPER.

If I try to use an instrument with WINE and Airwave, anything less than 512 samples latency in Jack will cause REAPER to get stuck trying to initialize the audio device to the point that I have to shut it down using the task manager.

Once that has happened, the audio hardware is in a lock state and trying to launch REAPER again will error out trying to access hardware that appears to still be in use. That's when I end up having to reboot to get control again. I'm sure I could probably reset audio in a terminal window, but I'm not yet familiar enough with Linux to know which module (Pulse/Asio/Jack) would be the one or what the command would be, so I just reboot.

I did a quick test using ReaSynth and a mic, and I can record clean audio and midi with no pops or clicks running at 64 samples latency. What kind of native Linux instruments can we using in the native Linux version of REAPER? I'd be interested in seeing how well midi works with some native Linux instrument plugins.

Edit: I forgot to mention that I did record a 25 track test song with real bass and real guitars, but all midi instruments for everything else. EZ-Drummer with Drumkit From Hell, Native Instruments B4 organ, Etc. Tracking at 512 samples was a bit laggy feeling, especially on the last tracks when the song had gotten fairly busy.

https://soundclick.com/share.cfm?id=13768605
__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 08-19-2018 at 08:11 AM.
Glennbo is offline   Reply With Quote
Old 08-19-2018, 08:30 AM   #4
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,787
Default

You can try some of the u-he linux vsts. New betas: https://www.reddit.com/r/UheOnLinux/hot/ and the old ones: https://www.kvraudio.com/forum/viewtopic.php?t=424953 or maybe pianoteq: https://www.pianoteq.com/.

What distro, what did you do to prepare it for low latency, and what kind of soundcard?

Also try reaper with the ALSA driver for midi and audio, that would exclude JACK from the equation.

Edit: But rereading your msg, it's apparently windows vsts that cause your problem, so maybe try linvst instead of airwave?

Edit 2: Seeing that you seem to be a drummer, maybe this is interesting, though I've never tried it myself: https://www.drumgizmo.org/wiki/doku.php

There is also the http://x42-plugins.com/x42/x42-avldrums that can be run with another wrapper: https://github.com/x42/lv2vst, but maybe best to stay with native lvst. So I'd say try the u-he ones, they are very nice!
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040,etc. :)

Last edited by Jack Winter; 08-19-2018 at 08:39 AM.
Jack Winter is offline   Reply With Quote
Old 08-19-2018, 09:01 AM   #5
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 3,950
Default

Quote:
Originally Posted by Jack Winter View Post
You can try some of the u-he linux vsts. New betas: https://www.reddit.com/r/UheOnLinux/hot/ and the old ones: https://www.kvraudio.com/forum/viewtopic.php?t=424953 or maybe pianoteq: https://www.pianoteq.com/.

What distro, what did you do to prepare it for low latency, and what kind of soundcard?

Also try reaper with the ALSA driver for midi and audio, that would exclude JACK from the equation.

Edit: But rereading your msg, it's apparently windows vsts that cause your problem, so maybe try linvst instead of airwave?
I'm running plain Jane Xubuntu with no tweaks for audio. I use a pair of M-Audio Delta 2496 soundcards, and the machine is a dual boot Xubuntu/Win7 i5.

I tried using ALSA, but couldn't get midi to work. I did however experiment with manually creating a couple of measures of midi with my mouse, and just like with Jack, ALSA needed 512 samples of latency or REAPER would hang up. If I set ALSA to 256 with a midi instrument on a track and hit play, REAPER becomes unresponsive. Do the same thing at 512 samples, and it plays without any artifacts.

I plan to try LinVST, and just haven't yet since it seems like from what I've read, will require a lot of hand copying, and typing commands in a terminal window. Airwave had a .deb or whatever they are installer and it put everything where it needed to go for me.

Should I completely remove Airwave before trying LinVST? I'm not even sure I would know how to remove it, since an installer installed it for me.

What I would prefer to try if possible is to have both installed, where I could do some A/B comparisons and then only keep the one that performs the best.

I plan to try some midi instruments that don't have to jump through so many hoops to see what that is like as well. Thanks for the links, I'll check them out.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-19-2018, 10:07 AM   #6
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,787
Default

Well then I don't think you are going to get all that far...

I feel sorry even though I'm in no way personally responsible for Linux audio. Personally I think that distros should do a better job at this, though low latency audio is probably not a concern for most...

It would probably work a lot better if you tried something like https://www.bandshed.net/avlinux as it does this by default for you.

Otherwise do the following:

1. Install a lowlatency kernel, should be in your repos.

2. Make sure that you reconfigure the system so that you get the ability to run realtime threads and lock memory. Normally accomplished by editing a file called limits.conf in /etc/security (the details might wary slightly depending on your distro). add the following and login again:
your-username - rtprio 98
your-username - memlock unlimited

3. Verify that the above worked by running the command ulimit -a

4. Make sure that JACK is running realtime (preferably at priority 80), this is pretty easy if you are starting it with qjackctl.

These changes should already allow you to go a lot lower in latency.

If you need even lower latency without xruns, I'd recommend getting hold of a realtime kernel, and to install and configure the rtirq script to configure your soundcard interrupt to run at a priority 95. There might be another couple of minor tweaks, like making sure that the cpu doesn't go into power save states, etc, but that would be more or less all that one typically would have to do to get really low latency.

It might also be very helpful for you, if you were to add the http://kxstudio.linuxaudio.org/index.php repos to your xubuntu, as that would give you access to quite a lot of good linux audio programs, and fix potential problems with the software distributed by ubuntu.

When did you try alsa with reaper? The ALSA midi support was recently added.

I don't think it would hurt at all to have both linvst and airwave installed. Linvst seems complicated, but once you get the hang of it it's not very hard. It also comes with some scripts to automate the procedure, though I've never tried as I made my own before they were available. Basically you install the linvst package, then you probably should remove the .so files that airwave installed along side your vsts (same name as the .dll but ending in .so). finally either run the scripts to set it up, or manually copy linvst.so to plugin-name.so.

I think probably at this point the biggest problem is that you don't have a lowlatency kernel, and that you haven't setup limits.conf properly. Also running JACK without realtime privs isn't helping. Hope this was helpful and not too confusing

You are also welcome to visit the freenode irc channel #reaper-linux, where it probably would be a lot easier and faster to help you. Also check out the following link, it's a bit dated right now, but I intend to fix it up a bit: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux

Break a leg!
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040,etc. :)
Jack Winter is offline   Reply With Quote
Old 08-19-2018, 11:13 AM   #7
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 3,950
Default

If I forget about midi and only do audio, Jack set for 24-bit 44.1k using 64 samples latency and two buffers gets me 1.4/2.9ms in REAPER, and I can record just fine with no artifacts, pops, or clicks.



I got LinVST working and have spent the morning doing A/B tests between it and Airwave. This is what I've found so far.

LinVST will let me run at 256 samples, but only when not much else is going on. Loading my test song that I posted earlier, I can play it at 256, but it has artifacts in the audio. Increasing it to 512, LinVST plays that song as well as using Airwave.

The other thing I've noticed is that one of the synths I used in my song does NOT get it's patch parameters set properly when using LinVST, but does when using Airwave. If I select the patch that it is already on when using LinVST, all the dials on the synth change to their proper values for the patch, but don't switch upon loading the song like they do with Airwave.

In summary, LinVST is a little more efficient, and won't hang REAPER up, even when latency is set lower than it can play without artifacts, where Airwave will hang REAPER up with anything less than 512 samples of latency on my system.

LinVST did not dial up the parameters correctly on one synth, although it did fine on all others. Airwave does dial up the parameter on the synth properly when performing the same test.

I've got it setup so I can instantly switch between Airwave and LinVST by having two .vst folders with the same group of plugins in each. I'm just renaming the folders so that whichever one currently has the .vst name, that will be the VST host I'm currently using.

The next thing I plan to try is some midi plugins that don't have to jump through the WINE hoop. I'm betting I can run those at real low latency without having to get WINE involved.

The whole reason I even setup this dual boot machine was to get all internet related stuff out of Windows in preparation for January 2020. I have zero desire to run Windows 10, so when support for Windows 7 ends in 2020, I plan to be as free from Windows as possible. If by then I don't have REAPER as functional as it is in Windows 7, I'll still have Windows 7 that I can boot up and just not have it connected to the internet any longer.

It's looking less and less like I will need to dual boot in 2020 though, because I can already do in Linux about 90% of what I do in Windows with REAPER. I'm missing a few nice commercial plugins and have higher latency, but only when using midi with WINE as a bridge.
__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 10-22-2018 at 04:14 PM.
Glennbo is offline   Reply With Quote
Old 08-19-2018, 12:24 PM   #8
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,787
Default

Well this is all something in progress, I'm sure it can be made better, and who knows maybe cockos will write a kick ass wrapper to host windows plugs on linux. B)

But I'm also sure that part of the problem is using ubuntu and not having done the necessary tuning to get lower latency.

Who knows, maybe when 2020 rolls around we'll have what you need!

Do report the problem with loading of patches to osxmidi, maybe he can figure out what is wrong with that plugin in linvst.
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040,etc. :)
Jack Winter is offline   Reply With Quote
Old 08-19-2018, 01:06 PM   #9
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 3,950
Default

Quote:
Originally Posted by Jack Winter View Post
Well this is all something in progress, I'm sure it can be made better, and who knows maybe cockos will write a kick ass wrapper to host windows plugs on linux. B)

But I'm also sure that part of the problem is using ubuntu and not having done the necessary tuning to get lower latency.

Who knows, maybe when 2020 rolls around we'll have what you need!

Do report the problem with loading of patches to osxmidi, maybe he can figure out what is wrong with that plugin in linvst.
So right this moment I have the native Linux U-He "Repro-5" instrument plugin running with only 64 samples latency. No pops or crackles, and extreme tight response.

This is on an un-tweaked Xubunutu with the stock kernel. As long as I'm not trying to emulate Windows for Windows plugins, I'm getting stellar performance.

Using native Linux instrument plugins appears to be many many times more efficient than running emulated Windows plugs. I'm hoping that Justin will whip out some of his voodoo magic on making a real efficient compatibility layer for Windows plugins or plugin makers will start including Linux as an included platform.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-19-2018, 01:11 PM   #10
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,787
Default

I'm with you all the way on that!
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040,etc. :)
Jack Winter is offline   Reply With Quote
Old 08-19-2018, 01:39 PM   #11
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,261
Default

For what it's worth, Ubuntu Studio and (I think?) AV Linux both have low-latency kernels out of the box, and both use XFCE if that's a preference.
Lokasenna is online now   Reply With Quote
Old 08-19-2018, 08:50 PM   #12
osxmidi
Human being with feelings
 
Join Date: Feb 2014
Posts: 536
Default

Quote:
Originally Posted by Glennbo View Post
If I forget about midi and only do audio, Jack set for 24-bit 44.1k using 64 samples latency and two buffers gets me 1.4/2.9ms in REAPER, and I can record just fine with no artifacts, pops, or clicks.



I got LinVST working and have spent the morning doing A/B tests between it and Airwave. This is what I've found so far.

LinVST will let me run at 256 samples, but only when not much else is going on. Loading my test song that I posted earlier, I can play it at 256, but it has artifacts in the audio. Increasing it to 512, LinVST plays that song as well as using Airwave.

The other thing I've noticed is that one of the synths I used in my song does NOT get it's patch parameters set properly when using LinVST, but does when using Airwave. If I select the patch that it is already on when using LinVST, all the dials on the synth change to their proper values for the patch, but don't switch upon loading the song like they do with Airwave.

In summary, LinVST is a little more efficient, and won't hang REAPER up, even when latency is set lower than it can play without artifacts, where Airwave will hang REAPER up with anything less than 512 samples of latency on my system.

LinVST did not dial up the parameters correctly on one synth, although it did fine on all others. Airwave does dial up the parameter on the synth properly when performing the same test.

I've got it setup so I can instantly switch between Airwave and LinVST by having two .vst folders with the same group of plugins in each. I'm just renaming the folders so that whichever one currently has the .vst name, that will be the VST host I'm currently using.

The next thing I plan to try is some midi plugins that don't have to jump through the WINE hoop. I'm betting I can run those at real low latency without having to get WINE involved.

The whole reason I even setup this dual boot machine was to get all internet related stuff out of Windows in preparation for January 2020. I have zero desire to run Windows 10, so when support for Windows 7 ends in 2020, I plan to be as free from Windows as possible. If by then I don't have REAPER as functional as it is in Windows 7, I'll still have Windows 7 that I can boot up and just not have it connected to the internet any longer.

It's looking less and less like I will need to dual boot in 2020 though, because I can already do in Linux about 90% of what I do in Windows with REAPER. I'm missing a few nice commercial plugins and have higher latency, but only when using midi with WINE as a bridge.
Seeing that you are using a Ubuntu try the Liquorix kernel https://liquorix.net/

Open a terminal and enter

sudo add-apt-repository ppa:damentz/liquorix && sudo apt-get update

and then

sudo apt-get install linux-image-liquorix-amd64 linux-headers-liquorix-amd64

and reboot

The stock kernels are not the greatest for audio and the Liquorix kernel is probably a better option.

Another thing is installing rtirq https://packages.ubuntu.com/search?keywords=rtirq-init

Download the appropriate deb file and then open a terminal and enter

sudo dpkg -i rtirq-init_xxxxxx.deb


I've got the same M-Audio Delta 24/96 cards and they can be ok with the right kernel and rtirq and realtime jack.


I've also got a M-Audio Revolution 7.1 in an i7 and Windows 10 and I can't seem to get less than 8ms input latency when recording using asio/wasapi but playback can go much lower.


Recording with things like LinVst is probably not going to as good as playback.


What synth is LinVst having problems with?, I'll look into it.

Last edited by osxmidi; 08-19-2018 at 09:06 PM.
osxmidi is offline   Reply With Quote
Old 08-19-2018, 09:13 PM   #13
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 3,950
Default

Quote:
Originally Posted by osxmidi View Post
Seeing that you are using a Ubuntu try the Liquorix kernel https://liquorix.net/

Open a terminal and enter

sudo add-apt-repository ppa:damentz/liquorix && sudo apt-get update

and then

sudo apt-get install linux-image-liquorix-amd64 linux-headers-liquorix-amd64

and reboot

The stock kernels are not the greatest for audio and the Liquorix kernel is probably a better option.

Another thing is installing rtirq https://packages.ubuntu.com/search?keywords=rtirq-init

Download the appropiate deb file and then open a terminal and enter

sudo dpkg -i debfile.deb


I've got the same Delta 24/96 cards and they can be ok with the right kernel and rtirq.


I've also got a M-Audio Revolution in an i7 and Windows 10 and I can't seem to get less than 8ms input latency when recording.


Recording with things like LinVst is probably not going to as good as playback.


What synth is LinVst having problems with?, I'll look into it.
Performance wise, just swapping out to the low-latency kernel and priority overrides has gotten my machine capable of running 64 samples latency with any softsynth and no artifacts. Even my 25 track test song with 12 Windows VSTi softsynths and 54 other Windows VST plugins now plays smooth. If I get to a point where I'm exhausting the system again, I will look into the Liquorix kernel and the other tweaks you mentioned.

The synth with the anomaly is this freebee simulation of an Oberheim Two Voice.

http://vst4you.com/pages/vst%20instruments/or2v.html

When I load my test song up and open the UI, it is sitting on the correct patch, but sound-wise it is not. Then just clicking the same patch that shows as already being selected, all the dials on the synth change, and the becomes the correct sound.

My next quest will be to figger out a construct of this line,

/usr/bin/jackd -R -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq

that will include "-dhw:M2496,1", because I can only access the first of the two cards in REAPER so far. In Windows, selecting ASIO makes them both show up so I have four analog inputs.

Thanks to you and Jack for all the help.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-19-2018, 11:45 PM   #14
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,787
Default

Quote:
Originally Posted by Glennbo View Post
Performance wise, just swapping out to the low-latency kernel and priority overrides has gotten my machine capable of running 64 samples latency with any softsynth and no artifacts. Even my 25 track test song with 12 Windows VSTi softsynths and 54 other Windows VST plugins now plays smooth. If I get to a point where I'm exhausting the system again, I will look into the Liquorix kernel and the other tweaks you mentioned.
IMO, you are now most of the way to a properly setup system. However one thing you really ought to do is to change the priority of the soundcard interrupt to something really high like 95. It will probably not bring the latency down much, but will make the system more resilient, meaning less potential xruns (audio dropouts) and possibly tighter midi when the system is under load.

This can be accomplished by installing & configuring rtirq, or possibly using udev-rtirq (https://github.com/jhernberg/udev-rtirq). If you chose rtirq, you need to manually configure it, I'd leave out rtc, usb, etc and only let it change the priority of the soundcard interrupts. udev-rtirq is a small utility that I wrote myself that makes this automatic, it even works when hotplugging FW/USB soundcards, the drawback being that it still needs a little work as it might not function correctly when the soundcard shares interrupt with some other card.

Quote:
My next quest will be to figger out a construct of this line,

/usr/bin/jackd -R -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq

that will include "-dhw:M2496,1", because I can only access the first of the two cards in REAPER so far. In Windows, selecting ASIO makes them both show up so I have four analog inputs.
Provided that you can externally sync the cards, maybe via spdif, this ought to work well on linux too. Not sure how this is done on windows, but it's a little bit messy on linux..:S You can either write a custom configuration for alsa to combine the 2 cards into one, or use a package called zita-ajbridge, the latter is possibly the easiest, especially if you have pulseaudio installed. To give you a command line, I'd need the output of "cat /proc/asound/cards" which will tell me the names to use with jack/zita-ajbridge.

A few additional thoughts:

If you can find it for your distro, installing a realtime kernel probably won't lower the latency much if at all, but it will make xruns under load less likely.

Seeing your unsymmetrical latency values tells me that you are using JACK2. It uses double buffering on the output by default, you can disable that by adding the -S parameter to your JACK command line, in this case try: /usr/bin/jackd -P80 -S -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq

It might be of no concern in your case, but since there is no card specific driver used on linux, the system only knows about the latency calculated from buffersize x period / samplerate. You could load reainsert on a track and do a loopback test to determine how many samples of "hidden" latency you have. This can be added in reaper's recording prefs so that reaper knows how much extra latency compensation to use when overdubbing. It can also be added to the jack command line, something like: /usr/bin/jackd -P80 -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq -I47 -O48 (which will make sure that all JACK clients align recorded audio properly).

Edit: The only additional thing I can think of, would be to make sure that there is no CPU power saving in use while running reaper, but how to do this depends on your hardware. This is already getting long, so let's leave that for another post
__________________
Reaper for Linux Documentation (WIP). Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040,etc. :)

Last edited by Jack Winter; 08-19-2018 at 11:54 PM.
Jack Winter is offline   Reply With Quote
Old 08-20-2018, 07:31 AM   #15
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 3,950
Default

Quote:
Originally Posted by Jack Winter View Post
IMO, you are now most of the way to a properly setup system. However one thing you really ought to do is to change the priority of the soundcard interrupt to something really high like 95. It will probably not bring the latency down much, but will make the system more resilient, meaning less potential xruns (audio dropouts) and possibly tighter midi when the system is under load.

This can be accomplished by installing & configuring rtirq, or possibly using udev-rtirq (https://github.com/jhernberg/udev-rtirq). If you chose rtirq, you need to manually configure it, I'd leave out rtc, usb, etc and only let it change the priority of the soundcard interrupts. udev-rtirq is a small utility that I wrote myself that makes this automatic, it even works when hotplugging FW/USB soundcards, the drawback being that it still needs a little work as it might not function correctly when the soundcard shares interrupt with some other card.
A couple items on this one. First, I have been considering trading in some old unused gear and buying a Behringer UMC1820, which is an eight channel rack mount USB Class Compliant device. If I were to switch to an external USB device, would the interrupt tweak still be needed, only on USB? I looked at the info on github, and didn't see where to download udev-rtirq. Is it one that I have to build from source? I've never done that yet as I am still a newbie in Linux.


Quote:
Provided that you can externally sync the cards, maybe via spdif, this ought to work well on linux too. Not sure how this is done on windows, but it's a little bit messy on linux..:S You can either write a custom configuration for alsa to combine the 2 cards into one, or use a package called zita-ajbridge, the latter is possibly the easiest, especially if you have pulseaudio installed. To give you a command line, I'd need the output of "cat /proc/asound/cards" which will tell me the names to use with jack/zita-ajbridge.
The cards are using the same clock over spdif. The first card is the master and the second card slaves it's clock from the first one. In Windows, the M-Audio ASIO driver makes them appear as one card with twice the audio and midi inputs and outputs. The main reasons I am looking at the Behringer unit I mentioned above is that I am now recording acoustic drums a lot, and using four simultaneous inputs. While the cards are reading the same clock, starting and stopping record with them is not sync'd and I always have to manually align two of the four tracks for phasing issues. The other reason is I've read that it works well in Linux, and requires no drivers.

Quote:
A few additional thoughts:

If you can find it for your distro, installing a realtime kernel probably won't lower the latency much if at all, but it will make xruns under load less likely.
From what I've been reading, the Liquornix kernel plays nice with Xubuntu, but until I see a problem that needs fixing, I'll probably stick with the distro version of the low latency kernel. That said, I have not yet really tried doing a full blown production in Linux, so that could happen sooner rather than later. I never really planned to be using REAPER in Linux. I was just setting up an escape from Windows for the internet and every day non music or video production type of tasks. I though I would dual boot and use Windows with internet disabled only for running REAPER and Sony Vegas Video, and use Linux for everything else, but now it's looking more like I might be able to dump Windows all together. I just downloaded KdenLive a few minutes ago to see if I can do some simple video editing with it.

Quote:
Seeing your unsymmetrical latency values tells me that you are using JACK2. It uses double buffering on the output by default, you can disable that by adding the -S parameter to your JACK command line, in this case try: /usr/bin/jackd -P80 -S -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq

It might be of no concern in your case, but since there is no card specific driver used on linux, the system only knows about the latency calculated from buffersize x period / samplerate. You could load reainsert on a track and do a loopback test to determine how many samples of "hidden" latency you have. This can be added in reaper's recording prefs so that reaper knows how much extra latency compensation to use when overdubbing. It can also be added to the jack command line, something like: /usr/bin/jackd -P80 -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq -I47 -O48 (which will make sure that all JACK clients align recorded audio properly).

Edit: The only additional thing I can think of, would be to make sure that there is no CPU power saving in use while running reaper, but how to do this depends on your hardware. This is already getting long, so let's leave that for another post
I always got asymmetric latency values while running REAPER in Windows too. In fact, I'm pretty sure it is the very same values as I am getting now in Linux, although with the -S parameter, I am now seeing 1.4/1.4ms which is lower that I've ever seen in Windows. I just tried playing my 25 track test song and it played without any problems, so I guess I can run without double buffering.

Thanks again for all the help.

EDIT: I did find "rtirq" in Synaptic, so I installed it. Does it need to be hand modified, or will it do it's thing automatically?
__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 08-20-2018 at 07:45 AM.
Glennbo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.