I am making a digital piano software with PyQt5 and one of the functions of it is to be able to play notes automatically. I have registered several musical notes under a list, and am trying to use QSound to play them, however when I do, they play all at the same time. How would I be able to add a delay between sounds? Thanks for the help
def playSheetMusic(self, Piano):
sheetmusic = ["A5", "G4", "C4", "C4", "C4"]
note1 = sheetmusic[0]
file1 = "pianokeys/" + note1 +".wav"
note2 = sheetmusic[1]
file2 = "pianokeys/" + note2 +".wav"
QSound.play(file1)
QSound.play(file2)