def file_handle(filename, ext): sound = core.Sound(filename, ext) lvoice = core.Voice(sound, loop=True) rvoice = core.Voice(sound, loop=True) lvoice.play() rvoice.play() lvoice.pan = -1.0 rvoice.pan = 1.0 try: while True: pan_voices(lvoice, rvoice, time.time()) core.update() time.sleep(0.001) except KeyboardInterrupt: print("interrupted")