### ASIO Configuration Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Example configuration for using the ASIO backend for both capture and playback. ```yaml capture: type: Asio channels: 2 device: "My ASIO Driver" format: S32_LE playback: type: Asio channels: 2 device: "My ASIO Driver" format: S32_LE ``` -------------------------------- ### Resampler configuration example Source: https://github.com/henquist/camilladsp/blob/master/README.md Example of how to configure the resampler section in devices. ```yaml resampler: type: AsyncSinc profile: Balanced ``` -------------------------------- ### Example Device Configuration Source: https://github.com/henquist/camilladsp/blob/master/README.md This is an example configuration block showing various parameters for device settings in CamillaDSP. ```yaml devices: samplerate: 96000 chunksize: 2048 queuelimit: 4 (*) silence_threshold: -60 (*) silence_timeout: 3.0 (*) target_level: 500 (*) adjust_period: 10 (*) enable_rate_adjust: true (*) resampler: null (*) capture_samplerate: 44100 (*) stop_on_rate_change: false (*) rate_measure_interval: 1.0 (*) volume_ramp_time: 400.0 (*) volume_limit: -12.0 (*) multithreaded: false (*) worker_threads: 4 (*) capture: type: Pulse channels: 2 device: "MySink.monitor" labels: ["L", "R"] (*) playback: type: Alsa channels: 2 device: "hw:Generic_1" format: S32_LE ``` -------------------------------- ### List examples Source: https://github.com/henquist/camilladsp/blob/master/README.md Examples of how to define lists in YAML format. ```yaml --- values_a: [ 1, 2, 3, 4, 5 ] values_b: - 1 - 2 - 3 - 4 - 5 ``` -------------------------------- ### Audio Device List Examples Source: https://github.com/henquist/camilladsp/blob/master/websocket.md Example JSON structures returned by device listing commands for different backends. ```json [ ["Microphone (USB Microphone)", null], ["In 3-4 (MOTU M Series)", null] ] ``` ```json [ ["hw:Loopback,0,0", "Loopback, Loopback PCM, subdevice #0"], ["hw:Generic,0,0", "HD-Audio Generic, ALC236 Analog, subdevice #0"] ] ``` -------------------------------- ### Install with Cargo Source: https://github.com/henquist/camilladsp/blob/master/README.md Installs CamillaDSP using Cargo after building. ```bash cargo install --path . ``` -------------------------------- ### BlueALSA Configuration Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Example configuration for the BlueALSA capture backend in CamillaDSP. ```yaml devices: samplerate: 44100 chunksize: 4096 target_level: 8000 adjust_period: 3 resampler: type: AsyncSinc profile: Balanced enable_rate_adjust: true capture: type: Bluez format: S16_LE channels: 2 dbus_path: /org/bluealsa/hci0/dev_A0_B1_C2_D3_E4_F5/a2dpsnk/source service: org.bluealsa (*) ``` -------------------------------- ### Install LLVM/Clang (Windows) Source: https://github.com/henquist/camilladsp/blob/master/README.md Command to install LLVM/Clang on Windows using winget, required for bindgen. ```powershell winget install LLVM.LLVM ``` -------------------------------- ### Start CamillaDSP Server Source: https://github.com/henquist/camilladsp/blob/master/websocket.md Command to launch the CamillaDSP process with a specific port and configuration file. ```bash camilladsp -v -p1234 /path/to/someconfig.yml ``` -------------------------------- ### YAML Configuration Example - Filters and Mixers Source: https://github.com/henquist/camilladsp/blob/master/README.md Example demonstrating the flexibility of YAML format in CamillaDSP configuration, showing reordering of elements within blocks. ```yaml filters: example_fir_a: type: Conv parameters: filename: path/to/filter.txt <-- "filename", "format" and "type" can be in any order as long as they are properly indented to be part of the "parameters" block. format: TEXT <-- type: Raw <-- example_fir_b: parameters: <-- "parameters" can be placed before or after "type". type: Wav filename: path/to/filter.wav type: Conv mixers: mono: mapping: - dest: 0 sources: - channel: 0 gain: -6 - gain: -6 <-- The order of "gain" and "channel" can be reversed. channel: 1 <-- channels: out: 1 in: 2 ``` -------------------------------- ### Example Mixer: Stereo to Mono Source: https://github.com/henquist/camilladsp/blob/master/README.md This example shows a simple mixer configuration to convert a stereo (2-channel) input to a mono (1-channel) output. ```yaml mixers: mono: channels: in: 2 out: 1 mapping: - dest: 0 sources: - channel: 0 gain: -6 - channel: 1 gain: -6 ``` -------------------------------- ### Install PipeWire development files Source: https://github.com/henquist/camilladsp/blob/master/README.md Installs PipeWire development files on various Linux distributions. ```bash sudo dnf install pipewire-devel ``` ```bash sudo apt-get install libpipewire-0.3-dev ``` ```bash sudo pacman -S pipewire ``` -------------------------------- ### Install PulseAudio development files Source: https://github.com/henquist/camilladsp/blob/master/README.md Installs PulseAudio development files on various Linux distributions. ```bash sudo dnf install pulseaudio-libs-devel ``` ```bash sudo apt-get install libpulse-dev ``` ```bash sudo pacman -S libpulse ``` -------------------------------- ### Pipeline Configuration Example Source: https://github.com/henquist/camilladsp/blob/master/README.md An example of how to define the pipeline section in a CamillaDSP configuration file, including mixer, filter, and processor steps. ```yaml pipeline: - type: Mixer description: "Expand to 4 channels" name: to4channels bypassed: false (*) - type: Filter description: "Left and right woofer channels" channels: [0, 1] (*) bypassed: false (*) names: - lowpass_fir - peak1 - type: Filter description: "Left and right tweeter channels" channels: [2, 3] bypassed: false (*) names: - highpass_fir - type: Processor description: "Compressor for protecting the drivers" name: my_compressor bypassed: false (*) ``` -------------------------------- ### Install JACK development files Source: https://github.com/henquist/camilladsp/blob/master/README.md Installs JACK development files on various Linux distributions. ```bash sudo dnf install jack-audio-connection-kit jack-audio-connection-kit-devel ``` ```bash sudo apt-get install jack libjack-dev ``` ```bash sudo pacman -S jack ``` -------------------------------- ### Jack Capture and Playback Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Example configuration for both Jack capture and playback devices, specifying 2 channels and setting the device to 'default'. Note that Jack always uses F32_LE format and the 'device' parameter might be removed in the future. ```yaml capture: type: Jack channels: 2 device: "default" playback: type: Jack channels: 2 device: "default" ``` -------------------------------- ### Compressor Processor Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration example for the Compressor processor, including channels, attack, release, threshold, factor, and makeup gain. ```yaml processors: democompressor: type: Compressor parameters: channels: 2 attack: 0.025 release: 1.0 threshold: -25 factor: 5.0 makeup_gain: 15 (*) clip_limit: 0.0 (*) soft_clip: true (*) monitor_channels: [0, 1] (*) process_channels: [0, 1] (*) pipeline: - type: Processor name: democompressor ``` -------------------------------- ### Skip and Read Bytes Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Example demonstrating how to skip a specified number of bytes at the beginning of a file and then read a subsequent number of bytes. This is useful for handling files with headers, like .wav files. ```yaml skip_bytes: 50 read_bytes: 200 ``` -------------------------------- ### Example Mixer: Two Channels to Four Source: https://github.com/henquist/camilladsp/blob/master/README.md This example demonstrates a mixer configuration that converts two input channels into four output channels. ```yaml mixers: ExampleMixer: description: "Example mixer to convert two channels to four" (*) labels: ["L_LF", "R_LF", "L_HF", "R_HF"] (*) channels: in: 2 out: 4 mapping: - dest: 0 mute: false (*) sources: - channel: 0 gain: 0 (*) inverted: false (*) scale: dB (*) - dest: 1 mute: false (*) sources: - channel: 1 gain: 0 (*) inverted: false (*) scale: dB (*) - dest: 2 sources: - channel: 0 gain: 0 (*) inverted: false (*) scale: dB (*) - dest: 3 sources: - channel: 1 gain: 0 (*) inverted: false (*) scale: dB (*) ``` -------------------------------- ### Title and description properties Source: https://github.com/henquist/camilladsp/blob/master/README.md Example of setting optional title and description properties for a configuration file. ```yaml title: "Example" description: "Example description of a configuration" ``` -------------------------------- ### Example Delay filter Source: https://github.com/henquist/camilladsp/blob/master/README.md A delay filter example. ```yaml filters: delayexample: type: Delay parameters: delay: 12.3 unit: ms subsample: false ``` -------------------------------- ### CoreAudio Device Configuration Source: https://github.com/henquist/camilladsp/blob/master/backend_coreaudio.md Example YAML configuration for setting up CoreAudio capture and playback devices in CamillaDSP. ```yaml capture: type: CoreAudio channels: 2 device: "Soundflower (2ch)" (*) format: S32 (*) playback: type: CoreAudio channels: 2 device: "Built-in Output" (*) format: S24 (*) exclusive: false (*) ``` -------------------------------- ### Install pkg-config Source: https://github.com/henquist/camilladsp/blob/master/README.md Installs the pkg-config utility on various Linux distributions. ```bash sudo dnf install pkgconf-pkg-config ``` ```bash sudo apt-get install pkg-config ``` ```bash sudo pacman -S cargo pkg-config ``` -------------------------------- ### GraphicEqualizer Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration example for a 5-band Graphic Equalizer using BiquadCombo. ```yaml filters: 5band_graphic: type: BiquadCombo parameters: type: GraphicEqualizer freq_min: 20 (*) freq_max: 20000 (*) gains: [0.0, 1.0, 2.0, 1.0, 0.0] ``` -------------------------------- ### Build PipeWire Backend Source: https://github.com/henquist/camilladsp/blob/master/backend_pipewire.md Build CamillaDSP with the 'pipewire-backend' feature enabled. Ensure PipeWire development libraries are installed. ```bash cargo build --release --features pipewire-backend ``` -------------------------------- ### Example configuration for wav input and output Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration snippet for using WavFile for capture and File for playback, with options for WAV header generation. ```yaml capture: type: WavFile filename: "/path/to/inputfile.wav" playback: type: File channels: 2 format: S32_LE wav_header: true filename: "/path/to/outputfile.wav" ``` -------------------------------- ### Example Gain filter Source: https://github.com/henquist/camilladsp/blob/master/README.md Examples of Gain filter configuration for both dB and linear scales. ```yaml filters: gainexample_dB: type: Gain parameters: gain: -6.0 inverted: false (*) mute: false (*) scale: dB (*) gainexample_linear: type: Gain parameters: gain: 0.5 inverted: false (*) mute: false (*) scale: linear (*) ``` -------------------------------- ### Example configuration for Stdin/Stdout Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration snippet for using Stdin for capture and Stdout for playback, specifying channels, format, and optional parameters. ```yaml capture: type: Stdin channels: 2 format: S16_LE extra_samples: 123 (*) skip_bytes: 0 (*) read_bytes: 0 (*) playback: type: Stdout channels: 2 format: S32_LE ``` -------------------------------- ### Load Configuration from File Source: https://github.com/henquist/camilladsp/blob/master/web/camilla.html Opens a file input dialog to select a configuration file. Reads the file content using FileReader and updates the configuration editor. ```javascript function loadConfig() { input.click(); } var input = document.createElement('input'); input.type = 'file'; input.onchange = e => { var file = e.target.files[0] var reader = new FileReader(); reader.readAsText(file, 'UTF-8'); reader.onload = readerEvent => { var content = readerEvent.target.result; var div = document.getElementById('configeditor'); div.innerText = content; } } ``` -------------------------------- ### WASAPI Capture and Playback Configuration Source: https://github.com/henquist/camilladsp/blob/master/backend_wasapi.md Example configuration for WASAPI capture and playback devices. Parameters marked with (*) are optional. Device names are case-sensitive and must match Windows volume control. ```yaml capture: type: Wasapi channels: 2 device: "CABLE Output (VB-Audio Virtual Cable)" (*) format: F32 (*) exclusive: false (*) loopback: false (*) polling: false (*) playback: type: Wasapi channels: 2 device: "SPDIF Interface (FX-AUDIO-DAC-X6)" (*) format: S24 (*) exclusive: true (*) polling: false (*) ``` -------------------------------- ### Install OpenSSL dependency Source: https://github.com/henquist/camilladsp/blob/master/README.md Installs OpenSSL and its development files on various Linux distributions. ```bash sudo dnf install openssl openssl-devel ``` ```bash sudo apt-get install openssl libssl-dev ``` ```bash sudo pacman -S openssl ``` -------------------------------- ### Build with custom features (Example 2) Source: https://github.com/henquist/camilladsp/blob/master/README.md Builds CamillaDSP with only the '32bit' feature, disabling default features. ```bash cargo build --release --no-default-features --features 32bit ``` ```bash cargo install --path . --no-default-features --features 32bit ``` -------------------------------- ### Install ALSA dependency Source: https://github.com/henquist/camilladsp/blob/master/README.md Installs the ALSA development library on various Linux distributions. ```bash sudo dnf install alsa-lib-devel ``` ```bash sudo apt-get install libasound2-dev ``` ```bash sudo pacman -S alsa-lib ``` -------------------------------- ### Example configuration for raw files Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration snippet for using RawFile for capture and File for playback, specifying channels, filename, and sample format. ```yaml capture: type: RawFile channels: 2 filename: "/path/to/inputfile.raw" format: S16_LE extra_samples: 123 (*) skip_bytes: 0 (*) read_bytes: 0 (*) playback: type: File channels: 2 filename: "/path/to/outputfile.raw" format: S32_LE ``` -------------------------------- ### Difference Equation Filter Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration example for the DiffEq filter, showing coefficients for a, and b. ```yaml example_diffeq: type: DiffEq parameters: a: [1.0, -0.1462978543780541, 0.005350765548905586] b: [0.21476322779271284, 0.4295264555854257, 0.21476322779271284] ``` -------------------------------- ### Build with custom features (Example 1) Source: https://github.com/henquist/camilladsp/blob/master/README.md Builds CamillaDSP with 'websocket' (default) and 'pulse-backend' features. ```bash cargo build --release --features pulse-backend ``` ```bash cargo install --path . --features pulse-backend ``` -------------------------------- ### Initialize WebSocket Connection Source: https://github.com/henquist/camilladsp/blob/master/websocket.md Python commands to establish a WebSocket connection to the CamillaDSP server. ```python In [1]: from websocket import create_connection In [2]: import json In [3]: ws = create_connection("ws://127.0.0.1:1234") ``` -------------------------------- ### Install PulseAudio Dependencies (macOS) Source: https://github.com/henquist/camilladsp/blob/master/README.md Commands to install PulseAudio dependencies on macOS using Homebrew. ```bash brew install pkg-config brew install pulseaudio ``` -------------------------------- ### General Commands Source: https://github.com/henquist/camilladsp/blob/master/websocket.md Core commands for system information and lifecycle management. ```APIDOC ## General Commands ### Commands - **GetVersion**: Returns the CamillaDSP version string. - **GetSupportedDeviceTypes**: Returns a list of supported playback and capture device types. - **Stop**: Stops processing and waits for a new configuration. - **Exit**: Stops processing and exits the application. ``` -------------------------------- ### Limiter Filter Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration example for the Limiter filter, demonstrating soft clipping and clip limit. ```yaml example_limiter: type: Limiter parameters: soft_clip: false (*) clip_limit: -10.0 ``` -------------------------------- ### Example Volume filter Source: https://github.com/henquist/camilladsp/blob/master/README.md Example of Volume filter configuration, specifying ramp time, limit, and fader. ```yaml filters: volumeexample: type: Volume parameters: ramp_time: 200 (*) limit: 10.0 (*) fader: Aux1 ``` -------------------------------- ### Example RACE Configuration Source: https://github.com/henquist/camilladsp/blob/master/README.md This YAML configuration demonstrates how to implement the RACE algorithm with filters, mixers, and the RACE processor itself within CamillaDSP. ```yaml processors: race: type: RACE parameters: channels: 6 channel_a: 2 channel_b: 3 attenuation: 3 delay: 0.09 mixers: 2to6: channels: in: 2 out: 6 mapping: - dest: 0 sources: - channel: 0 gain: 0 inverted: false - dest: 1 sources: - channel: 1 gain: 0 inverted: false - dest: 2 sources: - channel: 0 gain: 0 inverted: false - dest: 3 sources: - channel: 1 gain: 0 inverted: false - dest: 4 sources: - channel: 0 gain: 0 inverted: false - dest: 5 sources: - channel: 1 gain: 0 inverted: false 6to2: channels: in: 6 out: 2 mapping: - dest: 0 sources: - channel: 0 gain: -3 inverted: false - channel: 2 gain: -3 inverted: false - channel: 4 gain: -3 inverted: false - dest: 1 sources: - channel: 1 gain: -3 inverted: false - channel: 3 gain: -3 inverted: false - channel: 5 gain: -3 inverted: false filters: highpass_lower: type: BiquadCombo parameters: type: LinkwitzRileyHighpass freq: 250 order: 4 lowpass_lower: type: BiquadCombo parameters: type: LinkwitzRileyLowpass freq: 250 order: 4 highpass_upper: type: BiquadCombo parameters: type: LinkwitzRileyHighpass freq: 5000 order: 4 lowpass_upper: type: BiquadCombo parameters: type: LinkwitzRileyLowpass freq: 5000 order: 4 pipeline: - type: Mixer name: 2to6 - type: Filter channels: [0, 1] names: - lowpass_lower - type: Filter channels: [2, 3] names: - highpass_lower - lowpass_upper - type: Filter channels: [4, 5] names: - highpass_upper - type: Processor name: race - type: Mixer name: 6to2 ``` -------------------------------- ### BlueALSA Device Information Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Example output from the gdbus command showing BlueALSA device information. ```text ({objectpath '/org/bluealsa/hci0/dev_A0_B1_C2_D3_E4_F5/a2dpsnk/source': {'org.bluealsa.PCM1': {'Device': , 'Sequence': , 'Transport': <'A2DP-sink'>, 'Mode': <'source'>, 'Format': , 'Channels': , 'Sampling': , 'Codec': <'AAC'>, 'CodecConfiguration': <[byte 0x80, 0x01, 0x04, 0x03, 0x5b, 0x60]>, 'Delay': , 'SoftVolume': , 'Volume': }}},) ``` -------------------------------- ### Monitor PipeWire Nodes with pw-top Source: https://github.com/henquist/camilladsp/blob/master/backend_pipewire.md Use `pw-top` to monitor active PipeWire nodes and their CPU usage in real-time. ```bash pw-top ``` -------------------------------- ### Compare 24-bit sample byte representations Source: https://github.com/henquist/camilladsp/blob/master/FAQ.md Demonstration of how different 24-bit audio formats (S24_3_LE, S24_4_RJ_LE, S24_4_LJ_LE) store sample data in memory using hex byte sequences. ```text Sample 1: `0xA1, 0xA2, 0xA3` Sample 2: `0xB1, 0xB2, 0xB3` Sample 3: `0xC1, 0xC2, 0xC3` As I24_3_LE: `0xA1, 0xA2, 0xA3, 0xB1, 0xB2, 0xB3, 0xC1, 0xC2, 0xC3` As S24_4_RJ_LE: `0xA1, 0xA2, 0xA3, 0x00, 0xB1, 0xB2, 0xB3, 0x00, 0xC1, 0xC2, 0xC3, 0x00` As S24_4_LJ_LE: `0x00, 0xA1, 0xA2, 0xA3, 0x00, 0xB1, 0xB2, 0xB3, 0x00, 0xC1, 0xC2, 0xC3` ``` -------------------------------- ### Noise Gate Processor Example Source: https://github.com/henquist/camilladsp/blob/master/README.md Configuration example for the NoiseGate processor, showing channels, attack, release, threshold, and attenuation. ```yaml processors: demogate: type: NoiseGate parameters: channels: 2 attack: 0.025 release: 1.0 threshold: -25 attenuation: 50.0 monitor_channels: [0, 1] (*) process_channels: [0, 1] (*) pipeline: - type: Processor name: demogate ```