How to run Reaper in Wine on Linux

From CockosWiki

Revision as of 15:23, 12 June 2011 by JackWinter (Talk | contribs)
Jump to: navigation, search

Contents

Introduction

There is no native linux port of Reaper so far, but luckily it can be made to run quite well in Wine on Linux, as can the vast majority of VST and VSTI plugins (excluding some copy protected ones). The major drawbacks being higher cpu usage, higher latency, and a slightly sluggish gui. The sad truth is that it runs much better in windows, but on a modern multicore system it is more than usable for serious mixing work and the occasional overdub while monitoring through FX. Recording high track counts while monitoring through FX, is however probably better done in Windows or OSX. This page attempts to explain what extra software is needed and how to tweak Reaper, Wine and Linux for best results. This is intended as general information and does not cover distribution specific issues. Use the forums or irc channels pertaining to your chosen distribution for such information.

Needed software

Supported soundcards

JACK

JACK is a keystone component for low latency audio on linux. From a windows perspective it can be viewed as a combination of ASIO and rewire, in as much as it allows the apps to connect to the sound card for low latency operation, and that it can connect different programs together and synchronize their transport. It also has support for distributing audio processing over a network (lan/wan). JACK exists in two implementations called JACK1 and JACK2, they are parallel implementations of the same API (programming interface) and are ABI (runtime) compatible. JACK2 was intended to replace JACK1 thus the naming, but for various reasons this has not happened, and JACK1 is still the reference implementation. Note that on a 64bit Linux you will also need to install 32bit client drivers for WineASIO to use. Be aware that JACK2 in it's default configuration (asynchronous mode) doubles the output latency. See: http://jackaudio.org/, JACK FAQ and jackd manpage for more details. Typically both JACK implementations are available in your distro as a binary packages and you install either but not both of them with your package manager.

You might also want to install QJackCtl, a gui to control the JACK server. Somewhat analogous to the windows ASIO control panel. See: http://qjackctl.sourceforge.net/. It is also typically installed through your package manager.

Wine

Wine let's you run Windows software on Linux (and other operating systems). It's not really an emulator in the sense of VirtualBox or VMWare, rather it's a collection of runtime libraries and other support software, setting up a windows environment and mapping windows functionality to the native equivalents on the host operating system. It has the potential to be just as fast and in some cases even faster than native windows. See: http://www.winehq.org/ and Wine FAQ for more details. It is also typically installed from the package manager of your distribution, but if you want to add the wine-rt functionality you might have to build it yourself.

WineASIO

WineASIO is an ASIO driver for wine that connects to the JACK server, effectively turning your ASIO aware windows program into a JACK client. So far it's only available for 32bit Wine, thus limiting you to running the 32bit version of Reaper in wine. Unfortunately you might end up having to build this yourself, as it needs a header file (asio.h) from Steinberg's ASIO SDK, which Steinberg prohibits 3:rd parties from distributing. This is also the reason that there is no 64bit WineASIO yet, as the header needs to be rewritten due to differences in the meaning of data sizes between Windows and Linux on 64bit systems. See: http://sourceforge.net/projects/wineasio/ and for the ASIO SDK: http://www.steinberg.net/en/company/developer.html, you will have to create an account, login and download the SDK to get the asio.h file needed. Some distributions might have a binary package for WineASIO saving you this step. If so just install using the package manager.

Wine-rt

The Wine-rt patch allows programs that use Windows' concept of thread priority to gain similar functionality under Linux. It maps windows priority levels to linux scheduling policies. You will most likely need this if you want to run Reaper at low latency under Wine. Unfortunately this has not been included in the standard Wine source code and it's unlikely that it will be included any time soon thus this is one component you might have to build yourself. If your distro has already patched it's wine, then you can install it with the usual package manager. See: http://dl.dropbox.com/u/879835/wine-rt-101107.patch

Using MIDI

Wine does not support JACK midi, it needs to use ALSA directly for midi support. You need to use winecfg to configure Wine to use ALSA and nothing else for sound and midi support. Note that WineASIO has nothing at all to do with this setting nor with midi support, as it accesses JACK directly independently of this setting. Unfortunately Reaper's time stamping of midi messages seems to get lost somewhere, so the tightest timing that is to say the lowest jitter is achieved by using the lowest JACK/ASIO buffer size.

Reaper preferences

  • Preferences->Buffering->Use native events for syncronizing: Due to the way wine works there is a lot of overhead in using IPC (Inter Process Communication). Reaper uses one such mechanism to syncronise it's threads, namely Native Events. Best results can most likely be achieved by unchecking Preferences->Buffering->Use native events for syncronizing. This will have the drawback (on SMP systems) of the cpus/cores running in loops and thus cause extra cpu usage, but the trade off is lower latency and less risk of xruns (audio dropouts) in the ASIO/JACK callback thread. One way of dealing with the high cpu usage is to manually specify a lower amount of cpus, like 1 or 2 in Preferences->Buffering until you really need more cpu.
  • Preferences->Appearances->UI updates: Setting this to Lazy always, will speed up the zooming and scrolling somewhat and comes with no significant drawback.

Linux specifics

32 & 64 bit support

Reaper will run on both 64 and 32bit Linux. You are however limited to running the 32bit windows executable in 32bit Wine at the moment.

Video drivers

Kernel patches

  • -rt - Realtime patch
  • -bfs or -ck - Brain Fuck Scheduler patch
  • -bfq - Budget Fair Queueing patch

Linux utilities

A list of working VST and VSTI plugins

  • In general most any VST/VSTI plugin without copy protection works well.
  • All the Reaper built-in plugins.
Personal tools