Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Linux

Reply
 
Thread Tools Display Modes
Old 08-17-2018, 01:49 PM   #1
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
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,803
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 online now   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: 4,055
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,803
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 online now   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: 4,055
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,803
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 online now   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: 4,055
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,803
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 online now   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: 4,055
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,803
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 online now   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,361
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 offline   Reply With Quote
Old 08-19-2018, 01:59 PM   #12
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Lokasenna View Post
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.
I'm not too keen on switching out distros, as I really set up this Linux side of my dual boot machine to be my "everything but REAPER and Sony Vegas" OS.

Shortly after setting up my SSD for dual boot, I noticed the native Linux version of REAPER, and since I was running Linux for all my normal day to day stuff, decided to try it out and see what I could do with it.

From what I'm seeing, doing audio and native Linux plugins, I can run every bit as low latency as I can when booted up in Windows, and since I record mostly audio tracks with real drums, real guitars, and real bass, I may do some serious projects in Linux. I might even start looking at buying a few native Linux plugins too.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-19-2018, 02:11 PM   #13
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

I might be wrong, but I think AV Linux comes with a realtime kernel as default. At least it used to.
__________________
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 online now   Reply With Quote
Old 08-19-2018, 06:56 PM   #14
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Jack Winter View Post
I might be wrong, but I think AV Linux comes with a realtime kernel as default. At least it used to.
After extensive testing, I've removed Airwave from my system, and LinVST is all that remains. With no alteration to the stock Xubuntu install, I can run Windows VST/VSTi plugins for the most part at 128 samples latency.

I say for the most part meaning before lots of other plugins get added for mixing a stereo master. Loading my test song which has 12 softsynths plus 54 additional FX (all Windows VST/VSTi) across 25 tracks, and it can't play without artifacts at 128 samples.

Doing tracking on a new song however should be no problem at 128 samples, and I can easily run like that until a song gets really loaded up.

I did also install the distro version of the low latency kernel issuing a "sudo apt-get install linux-lowlatency". Can't say that I see any difference good or bad so far, but it didn't break anything so I'm leaving it for now.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-19-2018, 07:50 PM   #15
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Jack Winter View Post
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.
I've done 1 thru 3, but at #4 I'm stuck. I let REAPER fire up Jack with the following command,

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

Should changing it to this with the added -R switch be all that's needed,

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

or is that even necessary since it says the default is already realtime?

Issuing jackd by itself comes back with this

Usage: jackdmp [ --no-realtime OR -r ]
[ --realtime OR -R [ --realtime-priority OR -P priority ] ]
(the two previous arguments are mutually exclusive. The default is --realtime)


EDIT:

OK, THAT made some difference! I can play my test song now without a pop or crackle at 64 samples latency. That's how I always ran this machine in Windows with REAPER and it looks like I can do it in Linux now after those last tweaks.
__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 08-19-2018 at 08:06 PM.
Glennbo is offline   Reply With Quote
Old 08-19-2018, 08:50 PM   #16
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   #17
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
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, 10:28 PM   #18
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

Quote:
Originally Posted by Glennbo View Post
I've done 1 thru 3, but at #4 I'm stuck. I let REAPER fire up Jack with the following command,

/usr/bin/jackd -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq
Try with: /usr/bin/jackd -P80 -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq
__________________
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 online now   Reply With Quote
Old 08-19-2018, 11:01 PM   #19
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Jack Winter View Post
Try with: /usr/bin/jackd -P80 -dalsa -dhw:M2496,0 -r44100 -p128 -n2 -Xseq
Just tried it and then stacked three U-he synths on a track, each with real busy and long fading stuff going on, and not a pop or click.

Also, I changed the -p128 argument to -p64 and it's all happy!

Thanks for all your help.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-19-2018, 11:45 PM   #20
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
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 online now   Reply With Quote
Old 08-20-2018, 07:31 AM   #21
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
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
Old 08-20-2018, 09:20 AM   #22
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

Quote:
Originally Posted by Glennbo View Post
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?
Let's leave the USB stuff for another time. But in brief, yes you should change the priority of the USB hub that you connected your sound card to. I can understand that 4 channels of audio is not really enough as a drummer, you can make nice recordings with it, but it's very nice to have more channels for spot & room mics.

The main drawback with USB is that it gives quite a lot of extra latency on Linux, and annoyingly the "hidden" extra latency changes when you change buffersize (not a fixed value). This might not be a problem depending on how you record. I don't monitor through the DAW so I just set a high buffersize, make sure that I configure reaper to properly compensate for the extra (hidden) latency and then just forget about it.

Seeing that your existing cards are PCI they likely are lower roundtrip latency and have a fixed overhead, so much nicer to use in this context.

Quote:
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.
There is a button that says clone or download, just download the zip, unzip it somewhere and then run "make install". But let's leave that for another day, as I just saw that I didn't provide a way to run make uninstall, and there is an added hurdle to overcome on ubuntu as they have removed the sudo command. I think you can install sudo, but I'm not sure about this.

Quote:
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.
Well let's see if we can't make that work better in Linux than in Windows But I still need to see the output of "cat /proc/asound/cards" to be able to help you.

Quote:
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.
You might be wise in this decision. I left Ubuntu a long time ago because it stopped providing a realtime kernel, and because I got fed up with problems, especially when doing a distro upgrade, which seemed to always end up in a complete reinstall.. I hope that this has improved since then and that your experience will be smoother.

The lowlatency kernel is already very good and there are many that claim that there is no need for a realtime kernel. Personally I would dispute this, but I might also be wrong, or it's a question of what hardware you have and how hard you push the system. The realtime kernel is basically the same (a kernel capable of preempting running threads to run other threads) but it removes some existing bottle necks in the kernel to lower thread scheduling delays. That is to say it will probably be just a bit less likely to cause xruns (dropouts) in your audio.

But as you say, no hurry and cross that hurdle when you have too

Quote:
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.
Heh, then the maudio driver did double buffering too by default. There most likely is some small additional latency that reaper doesn't know about, for hardware buffers and conversion time of DAC. This can be tested and compensated for in reaper. Most likely it's so little that you can safely ignore it, but if you want to you can use reainsert and a cable connected from an output to an input to check how much it is. You could also play back a click track and see how well the recorded track aligns to the click. On my rme hdsp it's a constant 95 samples, so about 2.1ms roundtrip. Not really worth worrying about...

Quote:
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?
It will take effect on the next boot. I assume it's similarly configured on ubuntu as on archlinux, and if so the default configuration isn't optimal, as it changes the priority of a lot of things that aren't really relevant in your case, mainly all the USB interrupts too.

I'd edit /etc/rtirq.conf and change it to the following (comment out the rest):
RTIRQ_NAME_LIST="snd"
RTIRQ_PRIO_HIGH=95
RTIRQ_PRIO_DECR=1

Then after rebooting run "rtirq status" to see if it had the desired effect.

Additionally for this to work, you might have to add the "threadirqs" irq boot flag to your boot manager, I don't know if this is needed or not on ubuntu.

Note that I've hardly ever used rtirq myself, so I'm not 100% sure about all the details. But hopefully this gets it working on your system and doesn't cause any problems!
__________________
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-20-2018 at 09:27 AM.
Jack Winter is online now   Reply With Quote
Old 08-20-2018, 10:13 AM   #23
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Jack Winter View Post
Let's leave the USB stuff for another time. But in brief, yes you should change the priority of the USB hub that you connected your sound card to. I can understand that 4 channels of audio is not really enough as a drummer, you can make nice recordings with it, but it's very nice to have more channels for spot & room mics.

The main drawback with USB is that it gives quite a lot of extra latency on Linux, and annoyingly the "hidden" extra latency changes when you change buffersize (not a fixed value). This might not be a problem depending on how you record. I don't monitor through the DAW so I just set a high buffersize, make sure that I configure reaper to properly compensate for the extra (hidden) latency and then just forget about it.

Seeing that your existing cards are PCI they likely are lower roundtrip latency and have a fixed overhead, so much nicer to use in this context.
USB might be an issue for me then, because I monitor through the DAW 100% of the time, even if I'm just jamming around on a guitar or bass. I monitor through a lot of FX on occasion as well, and never had any issues with laggy performance or artifacts in the audio. Maybe I'll just keep using my dinosaur cards that I bought when Windows 98 was king.

Quote:
There is a button that says clone or download, just download the zip, unzip it somewhere and then run "make install". But let's leave that for another day, as I just saw that I didn't provide a way to run make uninstall, and there is an added hurdle to overcome on ubuntu as they have removed the sudo command. I think you can install sudo, but I'm not sure about this.
OK, I downloaded the file. As far as sudo goes, I use it more than I probably should, doing things like "sudo thunar" so I have the control freak version of the file browser, ready for me to click a config file deep in the heart of the system, and change it!

I also have the OS set to not hide anything from me, so it is a cluttered bunch of stuff in the file browser, but I can see everything that is going on.

Quote:
Well let's see if we can't make that work better in Linux than in Windows But I still need to see the output of "cat /proc/asound/cards" to be able to help you.
I'm down with that! BTW, if the IRQs end up like they were in Windows, both of the 2496 cards are sharing IRQs with other stuff. One is sharing with USB, and the other with the video card, but again that was in Windows, and I presume were soft IRQs.

Here's the output.

0 [MID ]: HDA-Intel - HDA Intel MID
HDA Intel MID at 0xf9ff8000 irq 32
1 [M2496 ]: ICE1712 - M Audio Audiophile 24/96
M Audio Audiophile 24/96 at 0xec00, irq 16
2 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfbcfc000 irq 17
3 [M2496_1 ]: ICE1712 - M Audio Audiophile 24/96
M Audio Audiophile 24/96 at 0xe400, irq 17

Quote:
You might be wise in this decision. I left Ubuntu a long time ago because it stopped providing a realtime kernel, and because I got fed up with problems, especially when doing a distro upgrade, which seemed to always end up in a complete reinstall.. I hope that this has improved since then and that your experience will be smoother.

The lowlatency kernel is already very good and there are many that claim that there is no need for a realtime kernel. Personally I would dispute this, but I might also be wrong, or it's a question of what hardware you have and how hard you push the system. The realtime kernel is basically the same (a kernel capable of preempting running threads to run other threads) but it removes some existing bottle necks in the kernel to lower thread scheduling delays. That is to say it will probably be just a bit less likely to cause xruns (dropouts) in your audio.

But as you say, no hurry and cross that hurdle when you have too

Heh, then the maudio driver did double buffering too by default. There most likely is some small additional latency that reaper doesn't know about, for hardware buffers and conversion time of DAC. This can be tested and compensated for in reaper. Most likely it's so little that you can safely ignore it, but if you want to you can use reainsert and a cable connected from an output to an input to check how much it is. You could also play back a click track and see how well the recorded track aligns to the click. On my rme hdsp it's a constant 95 samples, so about 2.1ms roundtrip. Not really worth worrying about...
As the system is running right now, I have open a stock ticker that is constantly hitting the net and parsing data, an NNTP newsgroups reader, Thunderbird mail, Firefox web browser and a bunch of other things running, and all the while looping over and over in the background, my test song in REAPER, playing without the slightest hiccup.

Quote:


It will take effect on the next boot. I assume it's similarly configured on ubuntu as on archlinux, and if so the default configuration isn't optimal, as it changes the priority of a lot of things that aren't really relevant in your case, mainly all the USB interrupts too.

I'd edit /etc/rtirq.conf and change it to the following (comment out the rest):
RTIRQ_NAME_LIST="snd"
RTIRQ_PRIO_HIGH=95
RTIRQ_PRIO_DECR=1

Then after rebooting run "rtirq status" to see if it had the desired effect.

Additionally for this to work, you might have to add the "threadirqs" irq boot flag to your boot manager, I don't know if this is needed or not on ubuntu.

Note that I've hardly ever used rtirq myself, so I'm not 100% sure about all the details. But hopefully this gets it working on your system and doesn't cause any problems!
I scanned my entire system volume and found no existing rtirq.conf file. Should there be one, or is this one I need to create myself? I have rebooted and like I mentioned, I'm playing a fairly busy project in REAPER with a lot of Windows plugins and instruments while doing all my normal daily stuff like modifying my stock ticker app because now that Windows file browsing works properly, it broke my ticker, and I had to change an internal path to how Wine sees it now, which is how it should have seen it originally but comctrl altered it.

Getting both cards to work in REAPER would be the most beneficial thing for me at this point, as it seems latency is every bit as good as it ever was in Windows. Being able to record four simultaneously tracks of my acoustic drums would be another major breakthrough event for me.
__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 08-20-2018 at 10:24 AM.
Glennbo is offline   Reply With Quote
Old 08-20-2018, 10:47 AM   #24
eric71
Human being with feelings
 
Join Date: Feb 2008
Location: Finland
Posts: 160
Default

Quote:
Originally Posted by Glennbo View Post
Getting both cards to work in REAPER would be the most beneficial thing for me at this point, as it seems latency is every bit as good as it ever was in Windows. Being able to record four simultaneously tracks of my acoustic drums would be another major breakthrough event for me.
Maybe about 6 years ago I was recording an ep with a drummer friend and was trying to improve what I could do. I had an Alesis Multimix 4 USB which could do two channels at once. He had some sort of edirol usb device that could also do 2 channels. The answer was to use something included with Jack called "alsa_in". I know there are newer things like netjack and zita_ajbridge, but I believe alsa_in and alsa_out are still there. I was using Reaper in wine at the time, but it should work the same if you are using native Linux Reaper with jack. I remember the options in starting alsa_in were a bit confusing, but some googling will help there. I'm sure some old questions of mine are still floating around the internet somewhere, and I got the answers I needed at the time. And 4 tracks of Glyn Johns style drums.
eric71 is offline   Reply With Quote
Old 08-20-2018, 10:58 AM   #25
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by eric71 View Post
Maybe about 6 years ago I was recording an ep with a drummer friend and was trying to improve what I could do. I had an Alesis Multimix 4 USB which could do two channels at once. He had some sort of edirol usb device that could also do 2 channels. The answer was to use something included with Jack called "alsa_in". I know there are newer things like netjack, but I believe alsa_in and alsa_out are still there. I was using Reaper in wine at the time, but it should work the same if you are using native Linux Reaper with jack. I remember the options in starting alsa_in were a bit confusing, but some googling will help there. I'm sure some old questions of mine are still floating around the internet somewhere, and I got the answers I needed at the time. And 4 tracks of Glyn Johns style drums.
I use the RecorderMan setup, which is a variation of Glyn Johns method, but moves the side fill mic to over the right shoulder. Then in addition to those two mics, I use dedicated kick and snare mics.

I tried using ALSA with the latest version of REAPER, but I couldn't get midi to work. I suspect that it was locked by some other process. Jack audio is giving me stellar results, but currently only sees one of the two M-Audio Delta 2496 cards.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-20-2018, 11:10 AM   #26
eric71
Human being with feelings
 
Join Date: Feb 2008
Location: Finland
Posts: 160
Default

I've been searching around, and my original questions on the ubuntuforums are long gone (I think they had a security issue and the old forum was scrapped a number of years ago. But I did find an old post related to qjackctl.

http://www.rncbc.org/drupal/node/180

But you are starting jack from Reaper directly - so you would need to just open a terminal and run alsa_in from there (after Reaper starts jack). Also, in that post I mention alsa_in was only included in Jack1 - that's definitely not the case, as it is installed with Jack2 in ubuntu these days.

At any rate, alsa_in adds channels from another alsa card to the card that jack is using. In the qjackctl post from 2010, I mention my command was "alsa_in -d hw:1". In that case I was trying to add my Alsesis Multimix to the onboard sound of the laptop. hw:0 was the first card started in jack. Alsa_in added hw:1, the second card to that. There's other modifiers that can be added, but keeping it simple like that worked well enough for recording 3 minute power pop songs, even with 2 unlinked usb interfaces. From your alsa info above, it looks like you would need "alsa_in -d hw:3"if jack is using your other Audiophile hw:1.

A useful link about alsa_in and Alsa_out: http://www.penguinproducer.com/Blog/...ces-with-jack/

But reading about zita_ajbridge, it may be able to do the same, but better. Never used that, though.

https://kokkinizita.linuxaudio.org/l...uickguide.html

Last edited by eric71; 08-20-2018 at 11:45 AM.
eric71 is offline   Reply With Quote
Old 08-20-2018, 12:40 PM   #27
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

Quote:
Originally Posted by Glennbo View Post
USB might be an issue for me then, because I monitor through the DAW 100% of the time, even if I'm just jamming around on a guitar or bass. I monitor through a lot of FX on occasion as well, and never had any issues with laggy performance or artifacts in the audio. Maybe I'll just keep using my dinosaur cards that I bought when Windows 98 was king.
Here is a recent post I made with tested loopback latency at various buffers/periods. AFAIK this is typical for USB on linux, and I'm not sure that this is going to change: https://forum.cockos.com/showpost.ph...8&postcount=14

Quote:
I'm down with that! BTW, if the IRQs end up like they were in Windows, both of the 2496 cards are sharing IRQs with other stuff. One is sharing with USB, and the other with the video card, but again that was in Windows, and I presume were soft IRQs.
In that case I'd advice to skip udev-rtirq, at least until I've fixed the issue with shared interrupts... In any case rtirq ought to do the same thing for you, as you won't be able to hotplug your cards.

Quote:
Here's the output.

0 [MID ]: HDA-Intel - HDA Intel MID
HDA Intel MID at 0xf9ff8000 irq 32
1 [M2496 ]: ICE1712 - M Audio Audiophile 24/96
M Audio Audiophile 24/96 at 0xec00, irq 16
2 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfbcfc000 irq 17
3 [M2496_1 ]: ICE1712 - M Audio Audiophile 24/96
M Audio Audiophile 24/96 at 0xe400, irq 17
Install zita-ajbridge, and try "zita-a2j -d hw:M2496_1" for inputs and"zita-j2a -d hw:M2496_1" for outputs. As you have the cards externally synced you can also try the alsa_in/out utilities mentioned above.

You might also want to start qjackctl to get a display showing if there are any xruns. Reaper's performance page also has something called RT biggest block. The first value should stay under the second, as if it exceeds it then not all audio got read/written.

It should also be possible to create a combined device using alsa user space, but I have no idea how that works when a system has pulseaudio installed and would have to google how to do that. It would probably be the better long term solution as then you wouldn't have to run the above utilities

Quote:
As the system is running right now, I have open a stock ticker that is constantly hitting the net and parsing data, an NNTP newsgroups reader, Thunderbird mail, Firefox web browser and a bunch of other things running, and all the while looping over and over in the background, my test song in REAPER, playing without the slightest hiccup.
Here again it might be advantageous to run qjackctl and check rt cpu and rt biggest block on the reaper's performance page. I think it also has a xrun counter that would be good to enable. An alternative would be to remove the jackd command line from the device config page, and run it in a terminal as it would show the xruns. IIRC there is also an undocumented flag that one can add to reaper.ini that will make the RT longest block sticky, otherwise I think it resets every one in a while. All this to make sure that there aren't xruns that you don't really hear, or don't notice while doing other stuff.

Quote:
I scanned my entire system volume and found no existing rtirq.conf file. Should there be one, or is this one I need to create myself?
Sorry I misled you On ubuntu it's apparently in /etc/default/rtirq, the beauty of many distros changing things around... On my archlinux system it's in /etc/rtiq.conf.:S

If you already rebooted, just run rtirq status and see what it says, you ought to see the soundcards at the top with high priorities. Otherwise you have to add the threadirqs boot flag in your boot managers config file.
__________________
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 online now   Reply With Quote
Old 08-20-2018, 04:48 PM   #28
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Jack Winter View Post
Install zita-ajbridge, and try "zita-a2j -d hw:M2496_1" for inputs and"zita-j2a -d hw:M2496_1" for outputs. As you have the cards externally synced you can also try the alsa_in/out utilities mentioned above.
I tried both the alsa_in that Eric mentioned and the zita-a2j that you mentioned. I was only able to get it to work by NOT having REAPER start Jack for me, and instead doing this set of procedures.

1. Start QjackCtrl
2. Open a terminal and then issue the command, zita-a2j -d hw:3 which hangs the terminal window till that process is stopped.
3. Fire up REAPER, and now I can get to all four inputs.

I'm wondering if it is possible to still have REAPER launch jack for me, and still get all four inputs.

If not, I'm assuming I could write some kind of script that gets launched by QjackCtrl, after it has fired up. I already have it directly issuing the command a2jmidid -e & to make midi work when I don't have REAPER start jack for me.


Quote:
You might also want to start qjackctl to get a display showing if there are any xruns. Reaper's performance page also has something called RT biggest block. The first value should stay under the second, as if it exceeds it then not all audio got read/written.

It should also be possible to create a combined device using alsa user space, but I have no idea how that works when a system has pulseaudio installed and would have to google how to do that. It would probably be the better long term solution as then you wouldn't have to run the above utilities
I tried setting ALSA in REAPER to 24/44 64 samples latency with 2 buffers and it did not do as well as jack audio. I even set the priority of ALSA in REAPER up to 90%, but still got lots of artifacts in the audio.

Quote:
Here again it might be advantageous to run qjackctl and check rt cpu and rt biggest block on the reaper's performance page. I think it also has a xrun counter that would be good to enable. An alternative would be to remove the jackd command line from the device config page, and run it in a terminal as it would show the xruns. IIRC there is also an undocumented flag that one can add to reaper.ini that will make the RT longest block sticky, otherwise I think it resets every one in a while. All this to make sure that there aren't xruns that you don't really hear, or don't notice while doing other stuff.
I ran my test song while watching the status page in QjackCtrl, and it showed no xruns. It did have a notice that one happened an hour and a half ago, but I was trying things that were hanging QjackCtrl up around then, so I don't think it's anything to worry about.

What I really want to make happen at this point is to get both my cards available to REAPER without having to go through a bunch of steps or procedures in order to record drums.

Quote:
Sorry I misled you On ubuntu it's apparently in /etc/default/rtirq, the beauty of many distros changing things around... On my archlinux system it's in /etc/rtiq.conf.:S

If you already rebooted, just run rtirq status and see what it says, you ought to see the soundcards at the top with high priorities. Otherwise you have to add the threadirqs boot flag in your boot managers config file.
I modified the file, commenting out every line it had originally, which appeared to all be for USB audio, which I have none of currently. The only live lines in the file now are the three you posted earlier.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-20-2018, 10:24 PM   #29
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

Quote:
Originally Posted by Glennbo View Post
I tried both the alsa_in that Eric mentioned and the zita-a2j that you mentioned. I was only able to get it to work by NOT having REAPER start Jack for me, and instead doing this set of procedures.

1. Start QjackCtrl
2. Open a terminal and then issue the command, zita-a2j -d hw:3 which hangs the terminal window till that process is stopped.
3. Fire up REAPER, and now I can get to all four inputs.

I'm wondering if it is possible to still have REAPER launch jack for me, and still get all four inputs.

If not, I'm assuming I could write some kind of script that gets launched by QjackCtrl, after it has fired up. I already have it directly issuing the command a2jmidid -e & to make midi work when I don't have REAPER start jack for me.
I wonder if one part of the problem isn't pulseaudio. I assume that your system has that running. As a basic precaution fire up pavucontrol and go to the configuration tab. Set both M-Audio cards to off, as far as I understand that will make sure that PA doesn't try to use them, causing problems with other programs.

Personally I think reaper's JACK device page could use some more love. I'll think about it and try to see if I could come up with a coherent FR to make it more flexible

I don't know of a way to do more than starting the jackd server itself from there, anything more complex will need some external help. There are probably multiple ways of doing this, but that would get a long post and I'm tired...

Let's start with trying to get it all up and running from qjackctl. In the field you used to start a2jmidid you can chain commands by putting a ';' between commands, so try using "zita-a2j -d hw:3;a2jmidid -e". You can probably also point to a more complex script there, though I've never tried myself. I'm a bit puzzled that you can't use hw:M2496_1, but let's go with hw:3 for the moment.

Then start qjackctl and once it's up and running launch reaper with JACK selected as device, and autostart jack unchecked and the autoconnect options checked.

Quote:
I tried setting ALSA in REAPER to 24/44 64 samples latency with 2 buffers and it did not do as well as jack audio. I even set the priority of ALSA in REAPER up to 90%, but still got lots of artifacts in the audio
This surprises me, but we could revisit the issue later. What I meant about using an ALSA device is that there is a way to combine multiple devices into one, and then run JACK on it. This would normally be a bad solution due to drifting clocks, but seeing that you have them externally synced, that ought to be doable. I'll google the details, as I've never used such a device myself. Am the happy owner of a rme hdsp, at least until I'll upgrade my computer and find myself without a PCI slot anymore. But that's a different story

Quote:
I modified the file, commenting out every line it had originally, which appeared to all be for USB audio, which I have none of currently. The only live lines in the file now are the three you posted earlier.
To verify that it works, what is the output of rtirq status? You don't have to paste all of it, but the top couple of lines would be nice to see.
__________________
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 online now   Reply With Quote
Old 08-20-2018, 10:58 PM   #30
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Jack Winter View Post
I wonder if one part of the problem isn't pulseaudio. I assume that your system has that running. As a basic precaution fire up pavucontrol and go to the configuration tab. Set both M-Audio cards to off, as far as I understand that will make sure that PA doesn't try to use them, causing problems with other programs.
Early on I disabled both the M-Audio cards and the nVidia over HDMI audio, so only motherboard audio is accessible by Pulse.

Quote:
Personally I think reaper's JACK device page could use some more love. I'll think about it and try to see if I could come up with a coherent FR to make it more flexible

I don't know of a way to do more than starting the jackd server itself from there, anything more complex will need some external help. There are probably multiple ways of doing this, but that would get a long post and I'm tired...

Let's start with trying to get it all up and running from qjackctl. In the field you used to start a2jmidid you can chain commands by putting a ';' between commands, so try using "zita-a2j -d hw:3;a2jmidid -e". You can probably also point to a more complex script there, though I've never tried myself. I'm a bit puzzled that you can't use hw:M2496_1, but let's go with hw:3 for the moment.

Then start qjackctl and once it's up and running launch reaper with JACK selected as device, and autostart jack unchecked and the autoconnect options checked.
Turns out I think I have a totally usable solution. I had written a short script to get midi going, bind the second audio card, and fire up REAPER, along with a default patch mapping that gets the second card audio to inputs 3 and 4 in REAPER. That works great and very consistent. I only have to fire up QjackCtrl and everything needed for four channel recording gets enabled, mapped, and REAPER starts.

What I just realized is that I can have my original line that worked so well in REAPER so I can directly launch REAPER still, but it will fire up with only two channel capability, which is fine for everything I do except record acoustic drums. Launching QjackCtrl will still get everything setup, and even though REAPER is set to do it's own start of jack, once it's up, I still have four channel recording capabilities.

So unless I'm recording drums, I can just launch REAPER from the REAPER icon they way I always have, and if I'm going to track drums, launch using QjackCtrl. I did this quick and dirty four channel test to verify that the four drums mics are indeed working.

https://soundclick.com/share.cfm?id=13771023

Quote:
This surprises me, but we could revisit the issue later. What I meant about using an ALSA device is that there is a way to combine multiple devices into one, and then run JACK on it. This would normally be a bad solution due to drifting clocks, but seeing that you have them externally synced, that ought to be doable. I'll google the details, as I've never used such a device myself. Am the happy owner of a rme hdsp, at least until I'll upgrade my computer and find myself without a PCI slot anymore. But that's a different story



To verify that it works, what is the output of rtirq status? You don't have to paste all of it, but the top couple of lines would be nice to see.
Looks like all the snd guys are high priority now.

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
420 FF 95 - 135 0.0 S irq/32-snd_hda_
421 FF 95 - 135 0.0 S irq/17-snd_hda_
424 FF 95 - 135 0.2 S irq/16-snd_ice1
467 FF 95 - 135 0.0 S irq/17-snd_ice1
48 FF 50 - 90 0.0 S irq/9-acpi
102 FF 50 - 90 0.0 S irq/16-ehci_hcd
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-21-2018, 12:04 AM   #31
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

OK, think I found what we need!

Create a ~/.asoundrc file, and put the following into it:

Code:
pcm.Maudio {
    type multi;
    slaves.a.pcm hw:1
    slaves.a.channels 2;
    slaves.b.pcm hw:3
    slaves.b.channels 2;
    bindings.0.slave a;
    bindings.0.channel 0;
    bindings.1.slave b;
    bindings.1.channel 0;
    bindings.2.slave a;
    bindings.2.channel 1;
    bindings.3.slave b;
    bindings.3.channel 1;
}

ctl.Maudio {
    type hw
    card 1
}
Start JACK with the following command line: /usr/bin/jackd -R -dalsa -dhw:Maudio -r44100 -p128 -n2 -Xseq

Observations:

I've never done this before, just googled and modified slightly for your current setup. We'll probably have to reiterate over it a few times, as I suspect the channels will probably need to be reordered and there might be other unforeseen issues. But as a first try it ought to be good.

For other readers of this thread, this will only work well if you have cards that are externally synced, forget it if you can't sync the cards as drifting clocks will cause problems. In this case using zita-ajbridge would be the prefered solution as detailed earlier in this thread. zita-ajbridge has a nice resampler function to compensate for drifting clocks.

It will probably be seen by PA too, so again start pavucontrol and disable the Maudio device too, you might have to restart the PA server or reboot for this to happen. "pulseaudio -k" ought to restart it.

I would have preferred to use the device names instead of the device index numbers in the above, but since you had problems using hw:M2496_1 I decided to use the indexes instead. This might however have been due to pulseaudio hogging the card even though it's not using it.

Note that it is possible for the index to change at reboot, probably unlikely in your case as you are using PCI devices, but it's a real issue using USB devices. This is the reason that it's always preferable to refer to a device by it's name rather than it's index.

You can configure the system so that each device gets a specific index. I'll leave that for a later post, so that we don't mess anything up while trying this!

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 online now   Reply With Quote
Old 08-21-2018, 12:26 AM   #32
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

Quote:
Originally Posted by Glennbo View Post
Turns out I think I have a totally usable solution. I had written a short script to get midi going, bind the second audio card, and fire up REAPER, along with a default patch mapping that gets the second card audio to inputs 3 and 4 in REAPER. That works great and very consistent.
Great news. Since I have little experience with this, would you mind doing some short tests to see if everything aligns properly? Connecting a loopback cable and using reainsert will allow you to test what the actual real world latency is as opposed to the one calculated by buffer x period / samplerate (which is the only one reaper knows about). You can even add this to the recording prefs (or to the jack command line) to hopefully get it aligned down to the sample.

Another way to check the final result would be to insert a click source on one track and then play it back on output 1/2 and recording it onto input 1/3. I don't think this solution would introduce any extra latency between the 2 cards, but it would be nice to have that verified, and I suppose it would save you some work in the future not having to move tracks to line them up

Quote:
Looks like all the snd guys are high priority now.

PID CLS RTPRIO NI PRI %CPU STAT COMMAND
420 FF 95 - 135 0.0 S irq/32-snd_hda_
421 FF 95 - 135 0.0 S irq/17-snd_hda_
424 FF 95 - 135 0.2 S irq/16-snd_ice1
467 FF 95 - 135 0.0 S irq/17-snd_ice1
48 FF 50 - 90 0.0 S irq/9-acpi
102 FF 50 - 90 0.0 S irq/16-ehci_hcd
That looks good indeed. Did you have to add the threadirqs boot flag, or did it work without it? Something I'm not sure about concerning ubuntu's lowlatency kernel configuration.
__________________
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 online now   Reply With Quote
Old 08-21-2018, 07:30 AM   #33
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by Jack Winter View Post
Great news. Since I have little experience with this, would you mind doing some short tests to see if everything aligns properly? Connecting a loopback cable and using reainsert will allow you to test what the actual real world latency is as opposed to the one calculated by buffer x period / samplerate (which is the only one reaper knows about). You can even add this to the recording prefs (or to the jack command line) to hopefully get it aligned down to the sample.
The reported latency on reainsert is 192 samples, but running the ping test comes back with 206. This was tested while letting QjackCtrl start jack up so that both cards were functioning, which did revert back to the 1.4/2.9ms, which is how it always read in Windows with the M-Audio ASIO drivers.

Quote:
Another way to check the final result would be to insert a click source on one track and then play it back on output 1/2 and recording it onto input 1/3. I don't think this solution would introduce any extra latency between the 2 cards, but it would be nice to have that verified, and I suppose it would save you some work in the future not having to move tracks to line them up
The alignment issue isn't due to latency. It's due to the two cards not kicking into record at the exact same precise moment, so there is drift of the start time, but no drift otherwise. Sometimes they will be almost on the money with each other, and other times they will be off a bit from each other. I just did a test where I had all four inputs in record, and then sent them all the same mix of the single click of a pair of drumsticks. Here's what I got. The second card got into record a fraction later than the first card. If I scoot the second card's track to the left to match the first card, then all following events will be on the money with each other.



Quote:
That looks good indeed. Did you have to add the threadirqs boot flag, or did it work without it? Something I'm not sure about concerning ubuntu's lowlatency kernel configuration.
I didn't have to do anything beyond installing rtirq with Synaptic, and then making the modifications you posted to it's config file.
__________________
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-21-2018, 07:36 AM   #34
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,927
Default

Quote:
The alignment issue isn't due to latency. It's due to the two cards not kicking into record at the exact same precise moment, so there is drift of the start time, but no drift otherwise.
Not a Linux guy and may be beating a dead horse but the above is the thing that most sync mechanisms can't address. They can 'sync' but they can't initially 'align' to ensure frame 1 device 1 is aligned with frame 1 device 2, but whatever it is will stay synced after that - I have the same issue with when syncing multiple devices in windows so it's always smart to keep phase-sensitive channels on the same device FWIW. IOW, when I mic drums OH/Kick/Snare go through the same device.

In my testing, this misalignment will also vary with subsequent playback/record attempts. Glenn, wasn't it you and I that went over the same issue with the same devices in your Windows setup or was that someone/something else?
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   Reply With Quote
Old 08-21-2018, 07:55 AM   #35
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by karbomusic View Post
Not a Linux guy and may be beating a dead horse but the above is the thing that most sync mechanisms can't address. They can 'sync' but they can't initially 'align' to ensure frame 1 device 1 is aligned with frame 1 device 2, but whatever it is will stay synced after that - I have the same issue with when syncing multiple devices in windows so it's always smart to keep phase-sensitive channels on the same device FWIW. IOW, when I mic drums OH/Kick/Snare go through the same device.

In my testing, this misalignment will also vary with subsequent playback/record attempts.
I get different results each time I perform the sticks click test. You put me onto the right path a while back that it was the start of record time that wasn't matching. Since then, I've learned to deal with it pretty well now that I know what exactly is going on.

I was toying with the idea of getting a Behringer UMC1820 so I'd have a lot of inputs from one device, but Jack pointed me to a test he did in Linux, which showed the "monitoring thru" latency of USB devices in Linux. Since the only time I ever use four inputs at the same time is when recording acoustic drums, I think for the time being that I will stick with my old dinosaur Delta cards that were made back when Windows 98 walked the Earth.

When recording drums I now check the alignment the moment I finish recording, and find some loud snare hit and some loud kick hit to use as my visual timing marks. Only takes a few seconds to hand align, if it needs it, which about 25% of the time it doesn't. That is what was messing with my head before knowing what was going on too, because sometimes I'd record drums and they would sound full and robust, and other times they would sound wimpy and thin.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-21-2018, 08:11 AM   #36
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,927
Default

Quote:
Originally Posted by Glennbo View Post
I get different results each time I perform the sticks click test.
Yes it should change each time (roughly).

Quote:
When recording drums I now check the alignment the moment I finish recording, and find some loud snare hit and some loud kick hit to use as my visual timing marks.
That's the way I would do it.
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   Reply With Quote
Old 08-21-2018, 08:33 AM   #37
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,055
Default

Quote:
Originally Posted by karbomusic View Post
Yes it should change each time (roughly).



That's the way I would do it.
So what do you make of these loopback times that Jack posted?

https://forum.cockos.com/showpost.ph...8&postcount=14

This line is of most interest to me, "64/2 128 + 256 ~ 8.7ms", because with my PCI cards I am running in Linux 64 samples latency with 2 buffers with a reported latency from REAPER of around 3ms. The loopback test Jack had me do using ReaInsert showed a reported latency of 192 samples, but the ping test came back with 206. I'm not sure how much that translates into ms, but if getting a USB sound device will not be as tight as my system feels right now, it would be somewhat of a downgrade except for more inputs on a single device.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-21-2018, 08:51 AM   #38
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,927
Default

Quote:
Originally Posted by Glennbo View Post
So what do you make of these loopback times that Jack posted?

https://forum.cockos.com/showpost.ph...8&postcount=14

This line is of most interest to me, "64/2 128 + 256 ~ 8.7ms", because with my PCI cards I am running in Linux 64 samples latency with 2 buffers with a reported latency from REAPER of around 3ms. The loopback test Jack had me do using ReaInsert showed a reported latency of 192 samples, but the ping test came back with 206. I'm not sure how much that translates into ms, but if getting a USB sound device will not be as tight as my system feels right now, it would be somewhat of a downgrade except for more inputs on a single device.
I'm vastly guessing Jacks numbers are due to the driver not being written by RME?

44.1k = 44,100/1000 = 44.1 samples per ms = 192 samples/44.1 = 4.3 ms. I've not followed these threads so who knows what I'm missing.
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   Reply With Quote
Old 08-21-2018, 09:03 AM   #39
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,803
Default

Quote:
Originally Posted by Glennbo View Post
The reported latency on reainsert is 192 samples, but running the ping test comes back with 206. This was tested while letting QjackCtrl start jack up so that both cards were functioning, which did revert back to the 1.4/2.9ms, which is how it always read in Windows with the M-Audio ASIO drivers.
The reason that it reverted to 192 samples (3x64) is that you didn't add the -S parameter to qjackctl You can do this in settings - advanced - server prefix, just add -S after jackd. Then you ought to get 64/64 just like you had when starting it from reaper or the command line. I take it that the 206 value is what was reported in the additional delay compensation field? Was additional delay compensation selected?

Quote:
The alignment issue isn't due to latency. It's due to the two cards not kicking into record at the exact same precise moment, so there is drift of the start time, but no drift otherwise. Sometimes they will be almost on the money with each other, and other times they will be off a bit from each other.
I won't dispute that this actually happens, I have zero experience with combining cards in this manner. However I don't buy the explanation that the cards kick in to record mode at different times. The cards are inputting audio the entire time you run reaper, be it in record mode or not. Sadly I can't offer an alternative explanation for why this would be

The reason I mentioned latency in this context is because I'm not sure if using zita-a2j adds latency or not, though my guess is that it doesn't. It was one thing I wanted to ascertain as I'm on vacation with my laptop and I have no reliable way to test myself. I.E. I wanted to use you as a guinea pig, I hope you don't mind

Quote:
I didn't have to do anything beyond installing rtirq with Synaptic, and then making the modifications you posted to it's config file.
Thanks, that's useful information for me. Then I know that the next time I can tell ubuntu users to just install rtirq and edit the config file. Adding a kernel boot flag to the boot manager is a lot more complicated to explain

As a matter of interest, what version of ubuntu do you use?
__________________
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 online now   Reply With Quote
Old 08-21-2018, 09:06 AM   #40
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 24,927
Default

Quote:
Originally Posted by Jack Winter View Post

I won't dispute that this actually happens, I have zero experience with combining cards in this manner. However I don't buy the explanation that the cards kick in to record mode at different times. The cards are inputting audio the entire time you run reaper, be it in record mode or not. Sadly I can't offer an alternative explanation for why this would be
I don't think it has anything to do with the OS, it's the difference between "syncing" and "aligning" samples at the device level AFAIK. IOW, ADAT or WC sync can't address this either, they can sync what they have but they can't determine "who was out of the gate first", and can only keep what is there from drifting.
__________________
If it requires a null test to find it, it is by definition minuscule.
karbomusic is online now   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 06:49 AM.


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