REAPER for Linux

From CockosWiki

Jump to: navigation, search

Main Page > REAPER Documentation

This article is about using the native REAPER for Linux build.

Contents

REAPER

REAPER for Linux builds are considered experimental/unsupported versions - use at your own risk!

Download from reaper.fm

REAPER is available for the i686, x86_64, and ARMv7 (Raspberry Pi 3) platforms.

It supports the ALSA, JACK, and Pulseaudio audio backends, as well as ALSA (raw) and JACK midi. Plugin formats supported are the builtin ReaPlugs, and Linux VST 2/3. DSSI, LADSPA and LV2 are not yet supported.

A short explanation of the various backends: https://wiki.linuxaudio.org/wiki/linux_audio_overview

Dependencies

  • libstdc++.so.5
  • gtk+ v3 or optionally v2 (see note below)
  • desktop-file-utils
  • xdg-utils
  • alsa
  • jack (optional)
  • pulseaudio (optional)
  • vlc (optional)
  • ffmpeg (optional)

Note: REPAER depends on gtk+ v3 by default, but gtk+ v2 can be targeted by compiling libSwell, see (instructions).

Installation

The REAPER tarball contains the install-reaper.sh script to install either into the user's home, or system wide. It can add desktop support for either install type, and creates an uninstall script to facilitate removal.

It is also possible to run REAPER directly from the extracted tarball. To create a portable install, create an empty reaper.ini file or copy the already existing ~/.config/REAPER/reaper.ini to the extracted files.

Archlinux has a buildscript on AUR that downloads REAPER and creates a package.

User Configuration

By default REAPER will use ~/.config/REAPER for it's configuration files. It first looks in the same directory as the executable, and then in ~/.config/REAPER.

User Extensions

Either download a binary run-time lib, or build it from source. Install the *.so file into ~/.config/REAPER/UserPlugins or in the case of a portable install into REAPER/UserPlugins.

Swell Themes

Since Swell doesn't use OS system calls to display menus and dialog boxes, it is possible to theme their appearance. The theme definition is contained in a file called libSwell.colotheme. To override the default definition, copy libSwell.colortheme to ~/.config/REAPER/libSwell-user.colortheme, and if you use a portable install, to REAPER/libSwell-user.colortheme.

Tested plugins

A list of some of the plugins that have been tested and do work well:

Using unsupported plug-ins

Plug-ins not natively supported by REAPER, might be used by employing third party solutions:

  • Carla is a plug-in host (FX rack) that can be used to host Linux VST, LV2, LADSPA, DSSI and Windows VST(i)s.

As an alternative, try one of the following wrappers/bridges:

Linux multimedia distributions

A Linux distribution that focuses on multimedia is generally already configured for low latency audio, and will often need less or no configuration at all. It will also offer more multimedia applications and plug-ins. If you are new to Linux, this author's recommendation is to try AV Linux.

The following distributions are suitable out of the box for running REAPER:

AV Linux

AV Linux is a niche project maintained by a single developer derived from the Debian/GNU Linux “Testing” Distribution which is utilized to create a independent, focused and specialized platform for Multimedia Content Creation using Linux. It is made available as a freely shared 32 and 64bit downloadable and installable ISO Image created from a carefully pre-configured snapshot.

AV Linux is essentially a collected and combined showcase of the phenomenal work of Open-Source and Commercial Audio developers from all over the planet and celebrates and presents their work organized in an easy-to-use fashion. In addition to a hardware-friendly efficient XFCE4 Desktop a low-latency Audio environment is provided with a custom ‘RT’ kernel and JACK Audio Connection Kit. A full, robust development suite is included for software developers and the leading Audio/Video/Graphics applications are included or available for installation from the Debian or included KXStudio software repositories.

Before downloading AV Linux it is essential to read it’s user manual, Most FAQ’s and many specific operational details including Installation are covered in it’s 130 illustrated pages. The user manual is also included within AV Linux and can be found in the ‘Accessories’ Menu.

Ubuntu Studio

Ubuntu Studio is a free and open source operative system, and an official flavor of Ubuntu. Ubuntu Studio is the most widely used multimedia orientated GNU/Linux distribution in the world. It comes preinstalled with a selection of the most common free multimedia applications available, and is configured for best performance for the Ubuntu Studio defined workflows: Audio, Graphics, Video, Photography and Publishing.

Ubuntu Studio is a community effort, created by volunteers, targeted towards all skill levels, from beginner to pro, and aims to be easy to install and easy to use, as well as provide all the tools nessecary for any type of media content creation.

We aim to be an example on how to configure a Debian based operative system for our workflows, contributing in bringing improvements upstream to Debian, and communicating with developers directly, by doing testing, fixing bugs and providing feedback.

We aim to be a gateway for users coming into the Linux world, wanting to use Linux for multimedia content creation, by providing applications and documentation, as well as being a portal to other GNU/Linux and FLOSS communities in the world.

KXStudio

KXStudio is a collection of applications and plug-ins for professional audio production. It also provides Debian and Ubuntu compatible repositories and its own Linux Distribution currently based on Ubuntu 14.04.5 LTS. The repositories can be used to install a good set of applications and plug-ins on most debian based distributions.

The KXStudio project is divided into 3 main sections:

  • Applications A custom set of applications and utilities for Linux and Windows, including a fully-featured audio plugin host, a JACK patchbay and more.
  • Plug-ins A wide range of open-source audio plug-ins and Linux ports, and custom patched plug-ins that work better and/or support more features.
  • Repositories Use the Debian and Ubuntu compatible repositories to get extra applications and updates, or to migrate to the KXStudio distribution.
  • KXStudio Documentation
  • Note: Does not have a realtime kernel, but one can be installed from a third party repository.

Linux system configuration

None is required for REAPER to run, but for lower latency there are a few considerations.

Linux low latency audio is based on POSIX real time threads. A thread of a higher priority will preempt threads of lower priority and will run until it is finished. The idea is to order the priority of the threads, so that the soundcard interrupt has the highest priority, then in order of descending priority, REAPER's audio callback thread, hardware interrupts (like disk, screen, etc), and lower than that REAPER's other threads and the rest of the programs running on the system.

Kernels

Kernels can be built to schedule threads in different ways. The relevant ones for low latency audio are capable of preempting a running thread to run another one. If the kernel isn't configured for this, REAPER can still run but will need bigger buffers. The suitable kernels are commonly referred to as lowlatency and realtime.

A lowlatency kernel can preempt threads. The realtime kernel in addition makes the kernel itself preemptable, so it achieves a lower kernel scheduling latency.

This is the time it takes the kernel to start running a thread, a lower scheduling latency means less possible audio dropouts at low latency settings and high system load. Given a deadline of 1.45ms, if it takes the kernel 2ms to schedule the audio processing threads, there is a dropout.

The only relevant difference is that the realtime kernel can achieve a lower scheduling latency than the lowlatency kernel.

To see what type of kernel is running, use the command "uname -a", if the output contains "PREEMPT" it is a lowlatency kernel, and if "PREEMPT RT" it is a realtime kernel.

There can be many causes for a high scheduling latency, Some worth mentioning (in no particular order) are: a misconfigured system, badly programmed kernel modules, faulty hardware timers, SMIs, NMIs, CPU power management, etc.

User privileges

As Linux is a multiuser OS, there are (by default) 2 relevant privileges denied the user, as a malicious user could use them to attack the system:

  • rtprio - allow the user to run realtime threads
  • memlock - allow the user to lock code and data into RAM, preventing it from being discarded or swapped out

To be able to schedule realtime threads, the user (or a group the user belongs to) needs to be given "rtprio" rights at login. The max value configurable is 99, but there are some kernel threads running there, so a suggested setting for "rtprio" is 98.

If the system discards or swaps out RAM (containing REAPER/plugin code/data), it will likely cause a dropout when it needs to be reloaded, thus the reason to give the user the right to use "memlock". A suggested setting is unlimited.

  • To run REAPER with pulseaudio no special configuration is needed
  • To use REAPER's ALSA backend with the "RT priority" option, "rtprio" privileges are needed
  • To use REAPER's JACK backend, both privileges are probably needed (depending on the JACK configuration)

To check what capabilities the logged in user has, run "ulimit -a".

See this link for more detailed JACK configuration instructions: http://www.jackaudio.org/faq/linux_rt_config.html

Thread priorities

The realtime kernel exports the hardware interrupt handlers to run as threads in user space, as does the lowlatency kernel when configured to or when booted with the "threadirq" boot flag. This allows the user to manipulate the priority of the interrupt handlers.

By default the hardware interrupt handlers will run at priority 50, with some kernel house keeping threads at 99 and software timers at 1.

Setting the thread handling the soundcard or the usb hub IRQ to a high priority (like 95), and the audio threads slightly lower (80) will make sure that they run before most other threads.

The rtirq script available on most distributions can be used to set the soundcard's interrupt priority

Low latency checklist

  1. Give the user rtprio and memlock privileges
  2. Install a realtime or lowlatency kernel if not already installed
  3. If using a lowlatency kernel adding the "threadirq" boot flag might be needed
  4. Set the thread handling the soundcard or USB hub IRQ to priority 95
  5. Set JACK (or REAPER if using the ALSA driver) to use priority 80

Online resources

REAPER for Linux has it's own forum located at the Cockos Incorporated Forums

Other online resources.

A good forum dealing with Linux audio can be found at https://linuxmusicians.com.

There is a channel dedicated to REAPER on Linux at freenode.org called #reaper-linux. A general Linux audio channel can be found at freenode.org - #opensourcemusicians

Tips and tricks

  • The generic Windows controls can be themed by editing libSwell.colortheme (in the directory containing the reaper5 executable).
  • If text and windows controls are too small, add ui_scale=1.5 to the [.swell] section in reaper.ini. This will scale the fonts, menus, windows and dialogs.
  • When using a tiling window manager (like i3), REAPER will by default spawn a new window for the splash screen and tooltips. The WM tries to tile these instead of floating them. To fix this behavior, change gdk_borderless_are_override_redirect=auto to 1 in reaper.ini.

Main Page > REAPER Documentation

Personal tools