25 Mar 2023, 09:35

Decent Sampler on Linux

I recently stumbled upon the Decent Sampler Plugin and excellent free sample library available from Pianobook. Keen to try out some of the samples, I downloaded the plugin for Linux. There are 3 options for using Decent Sampler (which all come in the download package) - standalone player or VST2 and VST3 plugins. I didn’t have a DAW installed and didn’t really want to use one just to try a few samples out, but quickly discovered that the Decent Sampler standalone player is quite limited and seems to be a bit buggy too. For example, clicking Options -> Audio/Midi Settings didn’t work - no settings dialog appeared!?* As such, I was unable to configure my MIDI keyboard as an input device. I then proceeded to try the VST plugin option.

I spent quite a bit of time without success messing with different audio programs for Linux (Qtractor, Element) in an attempt to use Decent Sampler as a VST plugin but found they crashed when loading the VST. I eventually found Carla - an audio plugin host - which did the job. Using Carla, I was able to quickly load Decent Sampler as a VST, then hookup my MIDI keyboard as an input device to it, and off I went. To get acceptable latency I had to reduce the buffer size from the default 1024 to 64 (any lower resulted in audio glitches). I couldn’t see how to do this from within Cara itself. Instead it can be done by setting the environment variable PIPEWIRE_LATENCY when starting Carla e.g.

PIPEWIRE_LATENCY=64/48000 carla [<carla project file>]

* I’m using Fedora 38, your experience may vary.

11 Feb 2021, 10:23

Split Tracks and Pulseaudio

I’m learning to play the drums. Something I’m trialling is split tracks, where the mix of the recording is separated into left and right, with left being only drums and vocals, and right being everything except drums and vocals. This is great except when played through stereo headphones, the mix sounds odd and is uncomfortable to listen to. The solution is to convert the stereo output to mono, however most home setups won’t have the kind of gear required for this.

My solution is to use Linux Pulseaudio to create a ‘sound sink’ which is essentially a virtual output device that sits between my music player software and the sound card.

I added 3 lines to the end of /etc/pulse/default.pa - each one creates a new sound sink, in addition to the normal stereo output.

load-module module-remap-sink sink_name=Mono sink_properties="device.description='Stereo to Mono'" master=alsa_output.pci-0000_00_1b.0.analog-stereo channels=2 channel_map=mono,mono

load-module module-remap-sink sink_name=Left-to-Mono sink_properties="device.description='Left to Mono'" master=alsa_output.pci-0000_00_1b.0.analog-stereo channels=1 master_channel_map=mono channel_map=left

load-module module-remap-sink sink_name=Right-to-Mono sink_properties="device.description='Right to Mono'" master=alsa_output.pci-0000_00_1b.0.analog-stereo channels=1 master_channel_map=mono channel_map=right

The first line creates the ‘Stereo to Mono’ sink, useful for listening to both left and right channels of the split track together. Then there is ‘Left to Mono’, useful for listening to drums only - instead of them coming out of only the left headphone, they come out of both headphones. Then ‘Right to Mono’.

When playing back a split track song I can switch between the 3 different sinks in the audio config settings as required.