ln -s /usr/local/bin/mma /sw/bin/mma
Now the program will work from Terminal as advertised in the documentation. The resulting .mid files will play with the Quicktime Player and can either be double-clicked from the Finder or opened with the command:
open filename.mid