View Single Post
Old 07-16-2017, 04:57 AM   #43
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Location: Luxembourg/Spain
Posts: 1,922
Default

Quote:
Originally Posted by mschnell View Post
[b]Very[\b] interesting information !!!

Regarding the other Thread here:

1) What about the VSTs ? (I suppose REeaper handles them as (Audio) threads with the appropriate priority setting

2) What about Windows VST running in Wine ? Can the the "bridged" processes running via Wine be assigned decent priorities ?

-Michael
Yes it does. It makes some calls from a realtime context (audio processing), and others like GUI code from a non realtime context. This ought to work fine with linux vsts.

The interesting problem is with windows vsts, as they run as a different process with their own threads. I wrote a patch for wine many years ago called wine-rt, which allows windows programs that ask for elevated thread priorities to get their threads scheduled as realtime threads. Been using this for years to run reaper in wine with good success. With some plugins I can see them using this functionality to set a high priority thread.

This patch is not part of normal wine, but you could patch wine and build it yourself to get this capability. Some distros (kxstudio, maybe others) might have a wine-rt package, and the functionality has been added to wine-staging, but it needs to be activated by setting a couple of environment variables. For wine-rt it's WINE_RT and WINE_SRV_RT, and for wine-staging it's STAGING_RT_PRIORITY_BASE and STAGING_RT_PRIORITY_SERVER.

Regarding LinVst both me and osxmidi have recently added realtime support, albeit in different ways. To add osxmidi's realtime support you have to build it with a special makefile, and it will try to run lin-vst-server with all threads as realtime.

I submitted a patch that hasn't made it into the main LinVst repo, but which is available on my github fork: https://github.com/jhernberg/LinVst/tree/realtime

This patch takes a different approach. When reaper calls the plugin, it asks for the priority of the calling thread, then sends that info over the named pipes and finally sets the same priority of thread handling the request in wine. This means if reaper is asking linvst to process audio from a realtime thread, then the corresponding thread in lin-vst-server.exe will get the same priority.

I suppose one could even combine the two patches and run them at the same time. But haven't had much time to play with this, as I need to work on music and not hack code

So to sum it up, linux vsts ought to work fine even at low latencies. Windows vsts will work fine in LinVst without doing anything special, but for lower latency it could benefit from:

1. Use and configure realtime support in either wine-rt or wine-staging.
2. Use either osxmidi's or my recent realtime support in LinVst

I'll try to get around to cleaning up my linvst github and write a howto in the other thread.
__________________
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; 07-16-2017 at 05:05 AM.
Jack Winter is offline   Reply With Quote