Skip to content

Instantly share code, notes, and snippets.

@lukassup
Last active October 6, 2023 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukassup/9ac6394cf4c952f3d5b9a11743317c57 to your computer and use it in GitHub Desktop.
Save lukassup/9ac6394cf4c952f3d5b9a11743317c57 to your computer and use it in GitHub Desktop.
Low latency for Reaper on PipeWire
#!/bin/sh
# Reaper reports latency of 4ms with this config.
#
# It may also be a good idea to use "Pro Audio" audio profile
#
# $ pactl list short cards
# $ pactl set-card-profile YOUR_CARD_NAME pro-audio
#
mkdir -p ~/.config/pipewire/pipewire.conf.d
mkdir -p ~/.config/pipewire/jack.conf.d/
# NOTE: adjust allowed clock rates according to your sound interface
# these are optimal for Focusrite Scarlett 2i2 gen3
cat > ~/.config/pipewire/pipewire.conf.d/10-clock-rate.conf << EOF
context.properties = {
default.clock.allowed-rates = [ 48000 96000 192000 44100 88200 176400 ]
default.clock.rate = 48000
}
EOF
cat > ~/.config/pipewire/jack.conf.d/10-reaper.conf << EOF
jack.rules = [
{
matches = [
{ client.name = "REAPER" },
{ application.process.binary = "reaper" }
]
actions = {
update-props = {
node.latency = 256/96000
node.rate = 1/96000
node.quantum = 256/96000
node.lock-quantum = true
node.force-quantum = 256
}
}
}
]
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment