How can I add the midi file in python program

When I add the midi file, I got an error message.

code:
pygame.mixer.music.load(‘background.mid’)

error message:
Traceback (most recent call last):
File “main.py”, line 39, in
pygame.mixer.music.load(‘background.mid’)
pygame.error: Couldn’t open /etc/timidity/freepats.cfg
exit status 1

I already installed 3 packages in left packages panel.
musicpy, timidity, pygame
And uploaded the midi file.

I googled and found a solution to install “freepats” package.
However, there is no such package in packages panel.

Please give an advice to solve this problem.
Thanks.

Hi there! This sounds like a cool project! :musical_note:

One of my excellent colleagues created this template to help get you set up!