Enable running with uv
This PR enables running lsd_viz with uv:
uv run python lsdviz.py /path/to/your_song.mp3
This PR adds pyproject.toml which specifies the required dependencies and Python version (3.11). uv run automatically installs those requirements in an isolated virtual environment. If the user does not already have Python 3.11, then uv automatically downloads and installs it in isolation from other Python versions.
lsd_viz does not work in Python 3.12, because the following line raises SyntaxWarning: invalid escape sequence '\d'.
https://github.com/bmcfee/lsd_viz/blob/426f9e03e9bcf3418ce0c3937b1ed8f5f3a4f67b/lsdviz.py#L60
Instead of changing that line of code, I just used Python 3.11, which worked.
Instead of changing that line of code, I just used Python 3.11, which worked.
This seems like a pretty heavyweight change - the proper fix is to make this explicitly into a raw string:
m = re.search(r'(\d+)-(\d*)', range_header)