arkrow / PyMusicLooper

A python program for repeating music endlessly and creating seamless music loops, with play/export/tagging support.
https://pypi.org/project/pymusiclooper/
MIT License
248 stars 23 forks source link

alt-export-top Sometimes Wraps #43

Open MattEqualsCoder opened 2 weeks ago

MattEqualsCoder commented 2 weeks ago

Before continuing with the bug report, does updating to the latest version fix this issue? No

Describe the bug It appears that the results of --alt-export-top can sometimes word wrap. image

Debugging Information Copy the command-line arguments used and the error message / stack trace if applicable. For ERROR messages, try to re-run the command with debugging enabled using the -d/--debug flag (e.g. pymusiclooper -i --debug play test.mp3) and provide the traceback output if available.

pymusiclooper export-points --min-duration-multiplier 0.25 --path "<file path>" --alt-export-top -1

Optionally, include some brief information about the file(s) being loaded if relevant (e.g. file type/extension, file size, length, does the audio have an obvious loop point that algorithm failed to find?)

Apparently the song length is 7:41.

Expected behavior A clear and concise description of what you expected to happen.

Each line should have the same number of parts if split around spaces.

Environment Information (please complete the following information):

Additional context Add any other context about the problem here.

arkrow commented 2 weeks ago

Hmm, this might be an edge case based on the configured STDOUT terminal. As can be seen below, the logic is very simple and has no wrapping, but the print method provided by the rich library might apply wrapping based on the output terminal.

https://github.com/arkrow/PyMusicLooper/blob/2e4719160154059e71bc1bdff437ec768e3b04e9/pymusiclooper/handler.py#L329-L330

https://github.com/arkrow/PyMusicLooper/blob/2e4719160154059e71bc1bdff437ec768e3b04e9/pymusiclooper/handler.py#L332-L334

I'll change the method that writes to the terminal to one that doesn't apply any transformations implicitly, just to be safe. Thanks for reporting @MattEqualsCoder .


Update: this should be fixed in the new v3.4.2 release. Let me know if the issue is fixed for that sample.

MattEqualsCoder commented 2 weeks ago

I'll check with the user who reported this to me and see if they can test.