Find which package contains a file
dpkg --search /usr/bin/amidi # debian/ubuntu, local search
apt-file update;apt-file search amidi # debian/ubuntu, remote seach. You need install apt-file at first.
equery b -e amidi # gentoo, remote/local search. You need install gentoolkits at first
pacman -Qo admidi # archlinux, local search
pkgfile amidi # archlinux, You need install pkgfile