I am currently using the subprocess module to play .mp3 files. It works just fine getting them to play, but once I do subprocess.call(["afplay", "../music/songname.mp3"]), that's all the code will do until the entire duration of the song has finished playing. I want to make things happen while the song is playing. I don't know how easy this is but I've struggled to find people online asking about the same thing. Is it possible to use a different command with the same subprocess module and achieve this result? Is there a completely separate way to achieve this? I'm open to anything, but keep in mind I'm very new to this.
I have created a loop track so that, after a certain time in the song has been reached, it will instead play an identical track which has set beginning and end times that, when played back-to-back, create a perfect music loop. Once that first problem is solved, how can I rig this track to repeat infinitely in the background?
I'm very new to this.