Managed to make TiMidity++ work together with PulseAudio just fine on Focal 20.04.1. The idea is just to start both pulseaudio and timidity under the same user. One-liner for the current desktop user:
One can replace $USER with any user name given PulseAudio starts under the same user as well, the user is a member of the respective groups, and it has sufficient permissions for both daemons.
Managed to make TiMidity++ work together with PulseAudio just fine on Focal 20.04.1. The idea is just to start both pulseaudio and timidity under the same user. One-liner for the current desktop user:
sudo sed -E "s,^(SERVER_ NAME)=( .*)$,\1= $(id --user --name $USER) #\2," -E "s,^(SERVER_ GROUP)= (.*)$,\ 1=$(id --group --name $USER) #\2," -i /etc/default/ timidity && sudo sed -E "s,^(\s*chown) timidity (/var/run/ timidity) $,\1 "$SERVER_USER" \2," -i /etc/init. d/timidity && sudo systemctl daemon-reload && sudo systemctl stop timidity && sudo killall timidity; sudo systemctl start timidity && ps -o pid=,state= ,command= -C timidity; systemctl status timidity; sudo systemctl restart pulseaudio; pacmd list-cards
One can replace $USER with any user name given PulseAudio starts under the same user as well, the user is a member of the respective groups, and it has sufficient permissions for both daemons.