easyeffects icon indicating copy to clipboard operation
easyeffects copied to clipboard

Suggestion: Make PipeWire node.description more human readable

Open RafaelKr opened this issue 2 years ago • 3 comments

Discussed in https://github.com/wwmm/easyeffects/discussions/1811

Originally posted by RafaelKr September 8, 2022 Running pw-cli ls Node has the following output for me:

	id 28, type PipeWire:Interface:Node/3
 		object.serial = "28"
 		factory.id = "10"
 		priority.driver = "20000"
 		node.name = "Dummy-Driver"
	id 29, type PipeWire:Interface:Node/3
 		object.serial = "29"
 		factory.id = "10"
 		priority.driver = "19000"
 		node.name = "Freewheel-Driver"
	id 37, type PipeWire:Interface:Node/3
 		object.serial = "38"
 		factory.id = "10"
 		client.id = "32"
 		node.name = "Midi-Bridge"
 		media.class = "Midi/Bridge"
	id 46, type PipeWire:Interface:Node/3
 		object.serial = "47"
 		object.path = "v4l2:/dev/video0"
 		factory.id = "10"
 		client.id = "32"
 		device.id = "42"
 		node.description = "Integrated Camera"
 		node.name = "v4l2_input.pci-0000_05_00.3-usb-0_3_1.0"
 		media.class = "Video/Source"
 		media.role = "Camera"
	id 51, type PipeWire:Interface:Node/3
 		object.serial = "81"
 		object.path = "alsa:pcm:0:hdmi:0:playback"
 		factory.id = "18"
 		client.id = "32"
 		device.id = "44"
 		priority.session = "696"
 		priority.driver = "696"
 		node.description = "GA104 High Definition Audio Controller Digital Stereo (HDMI)"
 		node.name = "alsa_output.pci-0000_01_00.1.hdmi-stereo"
 		node.nick = "HDA NVidia"
 		media.class = "Audio/Sink"
	id 52, type PipeWire:Interface:Node/3
 		object.serial = "54"
 		object.path = "alsa:pcm:1:front:1:playback"
 		factory.id = "18"
 		client.id = "32"
 		device.id = "45"
 		priority.session = "1009"
 		priority.driver = "1009"
 		node.description = "Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo"
 		node.name = "alsa_output.pci-0000_05_00.6.analog-stereo"
 		node.nick = "HD-Audio Generic"
 		media.class = "Audio/Sink"
	id 53, type PipeWire:Interface:Node/3
 		object.serial = "55"
 		object.path = "alsa:pcm:1:front:1:capture"
 		factory.id = "18"
 		client.id = "32"
 		device.id = "45"
 		priority.session = "2009"
 		priority.driver = "2009"
 		node.description = "Family 17h (Models 10h-1fh) HD Audio Controller Analog Stereo"
 		node.name = "alsa_input.pci-0000_05_00.6.analog-stereo"
 		node.nick = "HD-Audio Generic"
 		media.class = "Audio/Source"
	id 62, type PipeWire:Interface:Node/3
 		object.serial = "89"
 		factory.id = "18"
 		client.id = "61"
 		node.description = "EasyEffects Sink"
 		node.name = "easyeffects_sink"
 		media.class = "Audio/Sink"
	id 63, type PipeWire:Interface:Node/3
 		object.serial = "90"
 		factory.id = "18"
 		client.id = "61"
 		node.description = "EasyEffects Source"
 		node.name = "easyeffects_source"
 		media.class = "Audio/Source/Virtual"
	id 72, type PipeWire:Interface:Node/3
 		object.serial = "99"
 		client.id = "61"
 		node.description = "ee_soe_output_level"
 		node.name = "ee_soe_output_level"
 		node.nick = "output_level"
 		media.type = "Audio"
 		media.category = "Filter"
 		media.role = "DSP"
	id 77, type PipeWire:Interface:Node/3
 		object.serial = "104"
 		client.id = "61"
 		node.description = "ee_soe_spectrum"
 		node.name = "ee_soe_spectrum"
 		node.nick = "spectrum"
 		media.type = "Audio"
 		media.category = "Filter"
 		media.role = "DSP"
	id 88, type PipeWire:Interface:Node/3
 		object.serial = "115"
 		client.id = "61"
 		node.description = "ee_sie_output_level"
 		node.name = "ee_sie_output_level"
 		node.nick = "output_level"
 		media.type = "Audio"
 		media.category = "Filter"
 		media.role = "DSP"
	id 93, type PipeWire:Interface:Node/3
 		object.serial = "120"
 		client.id = "61"
 		node.description = "ee_sie_spectrum"
 		node.name = "ee_sie_spectrum"
 		node.nick = "spectrum"
 		media.type = "Audio"
 		media.category = "Filter"
 		media.role = "DSP"
	id 98, type PipeWire:Interface:Node/3
 		object.serial = "125"
 		client.id = "61"
 		node.description = "ee_sie_rnnoise"
 		node.name = "ee_sie_rnnoise"
 		node.nick = "rnnoise"
 		media.type = "Audio"
 		media.category = "Filter"
 		media.role = "DSP"
	id 103, type PipeWire:Interface:Node/3
 		object.serial = "189"
 		factory.id = "6"
 		client.id = "111"
 		application.name = "spotify"
 		node.name = "spotify"
 		media.class = "Stream/Output/Audio"
 		media.role = "Music"
	id 105, type PipeWire:Interface:Node/3
 		object.serial = "213"
 		factory.id = "8"
 		client.id = "32"
 		device.id = "106"
 		priority.session = "1010"
 		priority.driver = "1010"
 		node.description = "Teufel BOOMSTER"
 		node.name = "bluez_output.00_12_6F_C1_2C_50.a2dp-sink"
 		media.class = "Audio/Sink"

As you can see most nodes have a "human readable" name set as the node.description and a more generic name as node.nick.

Currently helvum, the "official" patchbay for PipeWire, prefers the nick and falls back to the description. So the names for the EasyEffects nodes look okay:

image

But there's an ongoing discussion about changing it to the order node.description > node.nick > node.name: https://gitlab.freedesktop.org/pipewire/helvum/-/issues/38

So I'd like to suggest to set the description to something more human readable to prepare for that change.

RafaelKr avatar Sep 08 '22 15:09 RafaelKr

I gave it a shot in #1819 and made the description the same as the nick. I think this is a good first step.

Maybe this can be improved even further with more human-readable descriptions (e.g. EasyEffects Output Level instead of output_level) but I think this needs a bit more of refactoring and I'm not deep enough into C++ and this codebase to do it.

RafaelKr avatar Sep 13 '22 08:09 RafaelKr

but I think this needs a bit more of refactoring and I'm not deep enough into C++ and this codebase to do it.

I think I will have time to take a look at this in the next days.

wwmm avatar Sep 13 '22 14:09 wwmm

That sounds great! The minimal changes in #1819 would still be ready to merge on their own if the changes to src/pipe_manager.cpp are correct.

RafaelKr avatar Sep 13 '22 14:09 RafaelKr

I admit I have forgotten the current state of this issue. How are things on Helvum side? Do we need to do more changes or are the ones already in place enough?

wwmm avatar Nov 02 '22 14:11 wwmm

With the changes in place EasyEffects is prepared for the merge of the Helvum Merge Request !27 Draft: Display better names.

With that MR Helvum will prefer node.description over node.nick. Currently on the EasyEffects nodes the node.description is less readable as the node.nick, see my "Details" spoiler in the OP: https://github.com/wwmm/easyeffects/issues/1812#issue-1366521414, example ee_soe_output_level instead of output_level. With the changes from my PR #1819 node.description will be the same as the current node.nick, so nothing will change when the Helvum version with the changes from MR !27 will be released.

So the issue with the regressing display names with the new Helvum version is resolved when you release the next EasyEffects version. But the node description in EasyEffects could still be improved, e.g. EasyEffects Output Level instead of output_level.

RafaelKr avatar Nov 02 '22 15:11 RafaelKr

So the issue with the regressing display names with the new Helvum version is resolved when you release the next EasyEffects version. But the node description in EasyEffects could still be improved, e.g. EasyEffects Output Level instead of output_level.

Ok. So let's keep this issue open for more time then. As I am considering releasing EasyEffects 7.0 today I was concerned that things would be horrible in Helvum. But if it is just minor adjustments we can do this in the future.

wwmm avatar Nov 02 '22 15:11 wwmm

Yes, with the 7.0 release nothing regarding the node names in Helvum should break, it should be as is.

BTW: I edited my previous comment to make it more clear.

RafaelKr avatar Nov 02 '22 15:11 RafaelKr

Helvum 0.4.0 was now released. The EasyEffects 7.0.0 labels are, as expected, still the same as they were with Helvum 0.3.4 👌

https://gitlab.freedesktop.org/pipewire/helvum/-/releases/0.4.0

RafaelKr avatar Feb 13 '23 08:02 RafaelKr

Helvum 0.4.0 was now released. The EasyEffects 7.0.0 labels are, as expected, still the same as they were with Helvum 0.3.4

Ok :-). So now it is only a matter of doing the following small improvement

But the node description in EasyEffects could still be improved, e.g. EasyEffects Output Level instead of output_level

I will try to do this this week.

wwmm avatar Feb 13 '23 14:02 wwmm

With the latest changes in our master branch the description should be equal to what can be seen in the Add Effects menu. This means that the descriptions showed in Helvum will now also be translated just like in the Add Effects menu.

wwmm avatar Feb 16 '23 14:02 wwmm

Love it, thanks for your work on that! :heart:

RafaelKr avatar Feb 16 '23 14:02 RafaelKr

Just tested it, works great!

Easy Effects (Devel) [Compilation from master] Screenshot from 2023-02-16 16-02-40

for reference Easy Effects v7.0.0 Screenshot from 2023-02-16 16-03-01

RafaelKr avatar Feb 16 '23 15:02 RafaelKr