Skyler Grey | 33b23e3 | 2022-05-19 06:42:03 +0100 | [diff] [blame] | 1 | # Convolver sink |
| 2 | # |
| 3 | # start with pipewire -c filter-chain/sink-virtual-surround-7.1-hesuvi.conf |
| 4 | # |
| 5 | context.properties = { |
| 6 | log.level = 0 |
| 7 | } |
| 8 | |
| 9 | context.spa-libs = { |
| 10 | audio.convert.* = audioconvert/libspa-audioconvert |
| 11 | support.* = support/libspa-support |
| 12 | } |
| 13 | |
| 14 | context.modules = [ |
| 15 | { name = libpipewire-module-rt |
| 16 | args = { |
| 17 | #rt.prio = 88 |
| 18 | #rt.time.soft = -1 |
| 19 | #rt.time.hard = -1 |
| 20 | } |
| 21 | flags = [ ifexists nofail ] |
| 22 | } |
| 23 | { name = libpipewire-module-protocol-native } |
| 24 | { name = libpipewire-module-client-node } |
| 25 | { name = libpipewire-module-adapter } |
| 26 | |
| 27 | { name = libpipewire-module-filter-chain |
| 28 | args = { |
| 29 | node.name = "effect_output.virtual-surround-7.1-hesuvi" |
| 30 | node.description = "Virtual Surround Sink" |
| 31 | media.name = "Virtual Surround Sink" |
| 32 | filter.graph = { |
| 33 | nodes = [ |
| 34 | # duplicate inputs |
| 35 | { type = builtin label = copy name = copyFL } |
| 36 | { type = builtin label = copy name = copyFR } |
| 37 | { type = builtin label = copy name = copyFC } |
| 38 | { type = builtin label = copy name = copyRL } |
| 39 | { type = builtin label = copy name = copyRR } |
| 40 | { type = builtin label = copy name = copySL } |
| 41 | { type = builtin label = copy name = copySR } |
| 42 | { type = builtin label = copy name = copyLFE } |
| 43 | |
| 44 | # apply hrir - HeSuVi 14-channel WAV (not the *-.wav variants) (note: */44/* in HeSuVi are the same, but resampled to 44100) |
| 45 | { type = builtin label = convolver name = convFL_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 0 } } |
| 46 | { type = builtin label = convolver name = convFL_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 1 } } |
| 47 | { type = builtin label = convolver name = convSL_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 2 } } |
| 48 | { type = builtin label = convolver name = convSL_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 3 } } |
| 49 | { type = builtin label = convolver name = convRL_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 4 } } |
| 50 | { type = builtin label = convolver name = convRL_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 5 } } |
| 51 | { type = builtin label = convolver name = convFC_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 6 } } |
| 52 | { type = builtin label = convolver name = convFR_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 7 } } |
| 53 | { type = builtin label = convolver name = convFR_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 8 } } |
| 54 | { type = builtin label = convolver name = convSR_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 9 } } |
| 55 | { type = builtin label = convolver name = convSR_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 10 } } |
| 56 | { type = builtin label = convolver name = convRR_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 11 } } |
| 57 | { type = builtin label = convolver name = convRR_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 12 } } |
| 58 | { type = builtin label = convolver name = convFC_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 13 } } |
| 59 | |
| 60 | # treat LFE as FC |
| 61 | { type = builtin label = convolver name = convLFE_L config = { filename = "hrir_hesuvi/hrir.wav" channel = 6 } } |
| 62 | { type = builtin label = convolver name = convLFE_R config = { filename = "hrir_hesuvi/hrir.wav" channel = 13 } } |
| 63 | |
| 64 | # stereo output |
| 65 | { type = builtin label = mixer name = mixL } |
| 66 | { type = builtin label = mixer name = mixR } |
| 67 | ] |
| 68 | links = [ |
| 69 | # input |
| 70 | { output = "copyFL:Out" input="convFL_L:In" } |
| 71 | { output = "copyFL:Out" input="convFL_R:In" } |
| 72 | { output = "copySL:Out" input="convSL_L:In" } |
| 73 | { output = "copySL:Out" input="convSL_R:In" } |
| 74 | { output = "copyRL:Out" input="convRL_L:In" } |
| 75 | { output = "copyRL:Out" input="convRL_R:In" } |
| 76 | { output = "copyFC:Out" input="convFC_L:In" } |
| 77 | { output = "copyFR:Out" input="convFR_R:In" } |
| 78 | { output = "copyFR:Out" input="convFR_L:In" } |
| 79 | { output = "copySR:Out" input="convSR_R:In" } |
| 80 | { output = "copySR:Out" input="convSR_L:In" } |
| 81 | { output = "copyRR:Out" input="convRR_R:In" } |
| 82 | { output = "copyRR:Out" input="convRR_L:In" } |
| 83 | { output = "copyFC:Out" input="convFC_R:In" } |
| 84 | { output = "copyLFE:Out" input="convLFE_L:In" } |
| 85 | { output = "copyLFE:Out" input="convLFE_R:In" } |
| 86 | |
| 87 | # output |
| 88 | { output = "convFL_L:Out" input="mixL:In 1" } |
| 89 | { output = "convFL_R:Out" input="mixR:In 1" } |
| 90 | { output = "convSL_L:Out" input="mixL:In 2" } |
| 91 | { output = "convSL_R:Out" input="mixR:In 2" } |
| 92 | { output = "convRL_L:Out" input="mixL:In 3" } |
| 93 | { output = "convRL_R:Out" input="mixR:In 3" } |
| 94 | { output = "convFC_L:Out" input="mixL:In 4" } |
| 95 | { output = "convFC_R:Out" input="mixR:In 4" } |
| 96 | { output = "convFR_R:Out" input="mixR:In 5" } |
| 97 | { output = "convFR_L:Out" input="mixL:In 5" } |
| 98 | { output = "convSR_R:Out" input="mixR:In 6" } |
| 99 | { output = "convSR_L:Out" input="mixL:In 6" } |
| 100 | { output = "convRR_R:Out" input="mixR:In 7" } |
| 101 | { output = "convRR_L:Out" input="mixL:In 7" } |
| 102 | { output = "convLFE_R:Out" input="mixR:In 8" } |
| 103 | { output = "convLFE_L:Out" input="mixL:In 8" } |
| 104 | ] |
| 105 | inputs = [ "copyFL:In" "copyFR:In" "copyFC:In" "copyLFE:In" "copyRL:In" "copyRR:In", "copySL:In", "copySR:In" ] |
| 106 | outputs = [ "mixL:Out" "mixR:Out" ] |
| 107 | } |
| 108 | capture.props = { |
| 109 | media.class = Audio/Sink |
| 110 | audio.channels = 8 |
| 111 | audio.position = [ FL FR FC LFE RL RR SL SR ] |
| 112 | } |
| 113 | playback.props = { |
| 114 | node.passive = true |
| 115 | audio.channels = 2 |
| 116 | audio.position = [ FL FR ] |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | ] |