'how to play piano note using mingus?

from mingus.midi import fluidsynth

fluidsynth.init('/usr/share/sounds/sf2/FluidR3_GM.sf2')
fluidsynth.play_Note(64,0,100)

I'm trying to play notes of piano sound by python so I installed mingus. I'm currently using the above code and the error message is

Failed to open '/usr/share/sounds/sf2/FluidR3_GM.sf2': File does not exist.

The error is pretty straight-forward but I'm not sure where I can find and download proper sound files. Does anyone have any idea?

Ideally I want a function that can take input such as a note name (e.g., 'C') and play a sound (e.g., 'Do').

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source