I'm trying to play song1 and song2 (the commented out one) at the same time, but I don't know how to do that using myro or winsound or whatever it is. Someone suggested using threading, but I'm not sure how to do that either, since I am just a very baby beginner programmer. Would someone please help me figure this thing out and/or explain in detail how to do this? Here's what I have so far:
import winsound
from myro import *
def main():
HftM1 = makeSong("Db4 3/8; C4 3/8; Bb3 1/4; Bb3 3/8; Ab3 3/8; Gb3 3/8; Ab3 1/16; C4 3/8; Bb3 3/8; Ab3 1/8; Eb3 1/16; F3 1/16; Ab3 3/8; G3 3/8; F3 3/8; C4 1/16; Db4 3/8; C4 3/8; Bb3 1/8; F3 1/16; Gb3 1/16; Bb3 3/8; Ab3 3/8; Gb3 3/8; C4 3/8; Bb3 3/8; Ab3 1/8; Eb3 1/16; F3 1/16; Ab3 3/8; G3 3/8; F3 3/8")
saveSong(HftM1, "HymnfortheMissing1.txt", append=1)
HftM2 = makeSong("Bb2 1/8; F3 1/8; Bb3 1/4; Bb2 1/8; F3 3/8; Gb2 1/8; Db3 1/8; Gb3 1/4; Gb2 1/8; Db3 3/8; Ab2 1/8; Eb3 1/8; Ab3 1/4; Ab2 1/8; Eb3 3/8; F2 1/8; C3 1/8; F3 1/4; F2 1/8; C3 3/8; Bb2 1/8; F3 1/8; Bb3 1/4; Bb2 1/8; F3 3/8; Gb2 1/8; Db3 1/8; Gb3 1/4; Gb2 1/8; Db3 3/8; Ab2 1/8; Eb3 1/8; Ab3 1/4; Ab2 1/8; Eb3 3/8; F2 1/8; C3 1/8; F3 1/4; F2 1/8; C3 3/8")
saveSong(HftM2, "HymnfortheMissing2.txt", append=1)
song1 = readSong("HymnfortheMissing1.txt")
#song2 = readSong("HymnfortheMissing2.txt") #This part of the song is supposed to be played at the same time as the first part, but I don't know how to do that so...
play = []
for n in range(len(song1)):
play = song1[n]
note = play[0]
duration = play[1]
winsound.Beep(int(note), int(duration*2000))
main()