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

Reply
 
Thread Tools Display Modes
Old 08-03-2022, 09:45 AM   #1
reapercurious
Human being with feelings
 
reapercurious's Avatar
 
Join Date: Jul 2007
Posts: 1,890
Default noticing midi instrument timing issues with plain ALSA but not Jack2

title says it. this is referring to midi plugin instruments by the way. Maybe it depends on the plugin but let's assume I'm using a jittery soundfont player. I've been noticing recently a bit of slurred and/or randomly swung notes. timing issues using ALSA.

Just as an experiment I tried Jack2 to see if there's a difference and it's day and night. Jack2 is giving more or less perfect timing but when I use ALSA, it's exceedingly choppy with the midi sync.

any clues on what might be causing this? (inb4 'user error')

edit:

had a minor discovery. I'm using an old trusty soundfont player called BassMidiVsti and for whatever reason, running it as a 'separate process' causes a lot of midi timing instability. Other modes seem to run it acceptably. since this is new, and possibly a bridiging issue with Wine, I need to do some more digging and will report.

Last edited by reapercurious; 08-03-2022 at 02:10 PM.
reapercurious is offline   Reply With Quote
Old 09-22-2022, 08:33 AM   #2
DuX
Human being with feelings
 
DuX's Avatar
 
Join Date: Jan 2007
Location: Underworld
Posts: 1,188
Default

I have a similar problem with Reaper and ALSA. It started about Reaper version 6.2 or so, I think [I'm a bit forgetful ]. I started getting hanging MIDI notes very often. Do you get hanging MIDI notes, too? I didn't even notice timing being off because hanging notes were annoying enough. So I use Reaper with Jack now and everything is fine. More than fine, actually.

I guess if ALSA works fine, one should leave it on ALSA, but if having problems JACK is the way to go. For me, JACK also uses a bit less CPU than ALSA, even though JACK uses ALSA, actually.

It's not like our ALSA configuration is wrong also, since I remember it working with Reaper. Also, ALSA MIDI works perfectly with Element. Timing is great and no hanging MIDI notes, so It must be Reaper's problem.
__________________
Goodnight, thank you, and may your God go with you.
DuX is offline   Reply With Quote
Old 09-22-2022, 05:10 PM   #3
audiojunkie
Human being with feelings
 
audiojunkie's Avatar
 
Join Date: Nov 2011
Posts: 971
Default

Quote:
Originally Posted by DuX View Post
I have a similar problem with Reaper and ALSA. It started about Reaper version 6.2 or so, I think [I'm a bit forgetful ]. I started getting hanging MIDI notes very often. Do you get hanging MIDI notes, too? I didn't even notice timing being off because hanging notes were annoying enough. So I use Reaper with Jack now and everything is fine. More than fine, actually.

I guess if ALSA works fine, one should leave it on ALSA, but if having problems JACK is the way to go. For me, JACK also uses a bit less CPU than ALSA, even though JACK uses ALSA, actually.

It's not like our ALSA configuration is wrong also, since I remember it working with Reaper. Also, ALSA MIDI works perfectly with Element. Timing is great and no hanging MIDI notes, so It must be Reaper's problem.
This is just my personal opinion, but I firmly believe that users of modern linux should always use pipewire-jack for low latency audio when Pipewire is installed—this is different from what I believed even a year ago. Pipewire is designed with the intention that pro level audio work is to be done through pipewire-jack —eventually doing away with the original jack and PulseAudio servers entirely. Although you “can” bypass the pipewire server and use ALSA, that was not the designed purpose. I believe that fighting against the purpose and design of pipewire, when using a system that has pipewire installed will lead to problems eventually. Now, of course, if a user knows enough, and wants to do it, he/she certainly can strip out pipewire, PulseAudio, and Jack, and run programs just fine straight on top of ALSA. A person who knows enough can do whatever he/she wants with Linux—that’s the beauty of Linux.

In short, I believe the most problem-free results will be had by not trying to use ALSA directly on a system with Pipewire, but by using Pipewire’s native tools: pipewire-alsa, pipewire-pulse, and pipewire-jack. Of course, the system is new and there are features and bugfixes patched in continuously, so things are not yet perfect, but attempting to do things differently than intended (despite the fact that we all used to do it that way, is like the futility and frustration of swimming against an ocean tide.
audiojunkie is offline   Reply With Quote
Old 09-23-2022, 08:34 AM   #4
DuX
Human being with feelings
 
DuX's Avatar
 
Join Date: Jan 2007
Location: Underworld
Posts: 1,188
Default

Absolutely agreed, Audiojunkie. I can't wait to see Pipewire in Debian! That's going to be similar to ASIO or WaveRT on Windows, low-latency system-level audio. Magnificent! One could argue it is ALSA done properly...

ALSA is great for when you're using just one app with it, but I like running several audio apps and patching things between them, so Jack is the only "audio unification" solution for me right now.

Hopefully Pipewire will land in Debian soon. I will research it, actually. I've been planing on doing that for quite a while now.

Big problem is Firefox which uses Pulseaudio. There used to be an option to compile Firefox with ALSA, but it's gone since a couple of years. I wonder what's going to happen with Firefox. Will it be able to use Pipewire at some point? Not through pulseaudio though. That would be the best solution so we can forget about pulseaudio.

I've heard that even Pulseaudio dev team is resigning developing Pulseaudio and like Pipewire better.

p.s. have you ever had problems with hanging midi notes in Reaper? It puzzles me that it works properly with Jack but not pure ALSA. Now I'm just curious. Staying with Jack until I can use Pipewire.
__________________
Goodnight, thank you, and may your God go with you.

Last edited by DuX; 09-23-2022 at 08:47 AM.
DuX is offline   Reply With Quote
Old 09-23-2022, 04:37 PM   #5
audiojunkie
Human being with feelings
 
audiojunkie's Avatar
 
Join Date: Nov 2011
Posts: 971
Default

Quote:
Originally Posted by DuX View Post
Absolutely agreed, Audiojunkie. I can't wait to see Pipewire in Debian! That's going to be similar to ASIO or WaveRT on Windows, low-latency system-level audio. Magnificent! One could argue it is ALSA done properly...

ALSA is great for when you're using just one app with it, but I like running several audio apps and patching things between them, so Jack is the only "audio unification" solution for me right now.

Hopefully Pipewire will land in Debian soon. I will research it, actually. I've been planing on doing that for quite a while now.

Big problem is Firefox which uses Pulseaudio. There used to be an option to compile Firefox with ALSA, but it's gone since a couple of years. I wonder what's going to happen with Firefox. Will it be able to use Pipewire at some point? Not through pulseaudio though. That would be the best solution so we can forget about pulseaudio.

I've heard that even Pulseaudio dev team is resigning developing Pulseaudio and like Pipewire better.

p.s. have you ever had problems with hanging midi notes in Reaper? It puzzles me that it works properly with Jack but not pure ALSA. Now I'm just curious. Staying with Jack until I can use Pipewire.
I can't say that I've experienced the hanging notes problem. I bypassed the JACK server and PulseAudio server and went straight with ALSA until Pipewire came along. I've read every bit of documentation I can find about pipewire over and over--trying to wrap my head around all of it. The more I learn about (and understand) it, the more I love its pure simplicity, elegance, and configurability. Right now, pipewire is relatively new, and still developing, so making changes to settings have to be manually done (which honestly isn't too difficult now that I'm starting to understand it), but I'm going to make a prediction. I foresee in the very near future, a tool similar to qjackctl that is designed specifically for pipewire that allows a person to instantly change default bitrate/kHz rate, as well as latency rate. I expect that it will have a built in jack synchronized transport. I predict that this new control panel will bring all Linux users into a new realm of absolute ease with using pipewire.

No, I'm not a prophet. I am not a seer. I do not have any special inside information. What I see is a need begging to be filled to bring the masses completely over to pipewire in entirety. Most of what is needed is already here. We can already configure everything manually by hand--all of the reference documentation is already here and available. What the masses are needing is for someone to write a pipewire-centric control tool like qjackctl. As it stands, qjackctl does the majority of what is needed already (as do several other tools made by various developers (including FalkTX). The masses simply need a specific tool for pipewire. I can't imagine that it will be too long after all of the major distros use it by default, and people understand how it works. Once that is done, people will create a tool so that they can save time and effort.

You can use it now in Debian 11, by the way. It's just not fully integrated--you have to manually make the changes. I'm pretty confident that by the time Debian 12 rolls out, the process will be simplified even further, if its not fully integrated by then.

The future is bright with pipewire! 99% of every existing pulseaudio, alsa, and jack app will simply just work. That is our future with pipewire!

Edit: I don't understand your concern with Firefox and its usage of PulseAudio. Pipewire is a graph based audio server built from the ground up to be everything we could need. Here's something for you to try when you get a chance--try running multiple ALSA apps concurrently. Let's see the original ALSA pull that off alone. In fact, you can have multiple ALSA, PulseAudio, and JACK apps connected and communicating with each other like how we connect two JACK apps together. The key thing to remember is that the pipewire-jack side if things is meant for low latency, but since pipewire is a combination of the ideas of the two servers, a hybrid if you will, you'll likely get lower latency through ALSA and PulseAudio connections run through pipewire as well if you desire to configure them for such. I look forward to the day someone creates a simple GUI based pipewire control panel.

Last edited by audiojunkie; 09-23-2022 at 04:47 PM.
audiojunkie 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 04:13 PM.


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