# Matrix Spatialiser sink
#
# Copy this file into a conf.d/ directory such as
# ~/.config/pipewire/filter-chain.conf.d/
#
# ( Jean-Philippe Guillemin <hyp3ri0n@sfr.fr> )
#

context.modules = [
    { name = libpipewire-module-filter-chain
        flags = [ nofail ]
        args = {
            node.description = "Matrix Spatialiser"
            media.name       = "Matrix Spatialiser"
            filter.graph = {
                nodes = [
                    {
                        type   = ladspa
                        name   = matrix
                        plugin = matrix_spatialiser_1422
                        label  = matrixSpatialiser
                        control = {
                            "Width" = 80
                        }
                    }
                ]
                inputs  = [ "matrix:Input L" "matrix:Input R" ]
                outputs = [ "matrix:Output L" "matrix:Output R" ]
            }
            audio.channels = 2
            audio.position = [ FL FR ]
            capture.props = {
                node.name      = "effect_input.matrix_spatialiser"
                media.class    = Audio/Sink
            }
            playback.props = {
                node.name      = "effect_output.matrix_spatialiser"
                node.passive   = true
            }
        }
    }
]
