def overlay(tracks):
    """Mixes multiple tracks together by layering one onto another"""
    main_track = tracks[0]
    for track in tracks[1:]:
        main_track = main_track.overlay(track, loop=True)
    return main_track