summaryrefslogtreecommitdiff
path: root/ar/.config/pipewire/pipewire.conf.d/99-limiter-sink.conf
blob: 1c4915d502830825f386e00b37d4c741f2cd1b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Loudness limiter sink — 갑자기 튀는 큰 소리를 눌러주는 가상 출력
# 신호 경로: 입력 -> sc4 컴프레서 -> fastLookaheadLimiter -> 출력(블루투스)
#   컴프레서: 큰 소리의 다이내믹을 부드럽게 압축
#   리미터  : 남은 피크를 최종 차단 + 게인 보정
context.modules = [
    { name = libpipewire-module-filter-chain
        args = {
            node.description = "Limiter (소리 제한)"
            media.name       = "Limiter"
            filter.graph = {
                nodes = [
                    {
                        type    = ladspa
                        name    = compressor
                        plugin  = /usr/lib/ladspa/sc4_1882.so
                        label   = sc4
                        control = {
                            "RMS/peak"             = 0.0
                            "Attack time (ms)"     = 10.0
                            "Release time (ms)"    = 200.0
                            "Threshold level (dB)" = -24.0
                            "Ratio (1:n)"          = 4.0
                            "Knee radius (dB)"     = 3.0
                            "Makeup gain (dB)"     = 0.0
                        }
                    }
                    {
                        type    = ladspa
                        name    = limiter
                        plugin  = /usr/lib/ladspa/fast_lookahead_limiter_1913.so
                        label   = fastLookaheadLimiter
                        control = {
                            "Input gain (dB)"  = 8.0
                            "Limit (dB)"       = -4.0
                            "Release time (s)" = 0.4
                        }
                    }
                ]
                links = [
                    { output = "compressor:Left output"  input = "limiter:Input 1" }
                    { output = "compressor:Right output" input = "limiter:Input 2" }
                ]
            }
            audio.channels = 2
            audio.position = [ FL FR ]
            capture.props = {
                node.name   = "effect_input.limiter"
                media.class = Audio/Sink
            }
            playback.props = {
                node.name     = "effect_output.limiter"
                node.passive  = true
                # 리미터 출력을 블루투스 스피커로 고정.
                # 다른 장치로 바꾸려면 이 값을 해당 sink 의 node.name 으로 변경
                # (확인: pactl list sinks short). 비워두면 PipeWire 가 임의 장치를 잡음.
                target.object = "bluez_output.58_18_62_05_90_04.1"
            }
        }
    }
]