nolannicholson / looper Goto Github PK
View Code? Open in Web Editor NEWA script for repeating music seamlessly and endlessly, designed with video game music in mind.
License: MIT License
A script for repeating music seamlessly and endlessly, designed with video game music in mind.
License: MIT License
(venv) C:\PycharmProjects>loop.py Desert.mp3
Loading Desert.mp3...
Traceback (most recent call last):
File "C:\PycharmProjects\loop.py", line 174, in
loop_track(sys.argv[1])
File "C:\PycharmProjects\loop.py", line 157, in loop_track
track = MusicFile(filename)
File "C:\PycharmProjects\loop.py", line 11, in init
mp3 = Mpg123(filename)
File "C:\PycharmProjects\venv\lib\site-packages\mpg123.py", line 110, in init
self._lib = self.init_library(library_path)
File "C:\PycharmProjects\venv\lib\site-packages\mpg123.py", line 99, in init_library
raise self.LibInitializationException('libmpg123 not found')
mpg123.LibInitializationException: libmpg123 not found
It would be awesome if you could specify with an option like -o
that would write the resulting looped audio to a file instead of playing it.
I don't think I installed mpg123 correctly, I can't find anything on how to install it. When I run the python3 loop.py track.mp3 command with an mp3 I get this error.
Traceback (most recent call last): File "loop.py", line 174, in <module> loop_track(sys.argv[1]) File "loop.py", line 157, in loop_track track = MusicFile(filename) File "loop.py", line 11, in __init__ mp3 = Mpg123(filename) File "C:\Users\kirbe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\mpg123.py", line 110, in __init__ self._lib = self.init_library(library_path) File "C:\Users\kirbe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\mpg123.py", line 101, in init_library lib = ctypes.CDLL(library_path) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\ctypes\__init__.py", line 364, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found
I don't know wtf I did wrong, I don't know how to get your program working. I can't find any good info on mpg123. I just dragged the executables from this
into the folder with your program in it, then ran the program.
I'm on a Win 10 64bit operating system.
libout123 is a dependency too.
Playing with loop from 02:47.523 back to 01:23.122 (78% match)
(press Ctrl+C to exit)
Traceback (most recent call last):
File "loop.py", line 174, in <module>
loop_track(sys.argv[1])
File "loop.py", line 165, in loop_track
track.play_looping(start_offset, best_offset)
File "loop.py", line 140, in play_looping
out = Out123()
File "/usr/local/lib/python3.5/dist-packages/mpg123.py", line 274, in __init__
self._lib = self.init_library(library_path)
File "/usr/local/lib/python3.5/dist-packages/mpg123.py", line 263, in init_library
raise self.LibInitializationException('libout123 not found')
mpg123.LibInitializationException: libout123 not found
I installed with:
pip3 install -r requirements.txt
python3 ~/gits/Looper/loop.py Arriba\ Arriba\ (Extended\ Mix)-5ySKv0hUrIE.mp3
and i'm getting this error:
Loading Arriba Arriba (Extended Mix)-5ySKv0hUrIE.mp3...
Playing with loop from 03:08.088 back to 01:39.480 (61% match)
(press Ctrl+C to exit)
Traceback (most recent call last):
File "/home/pkssd/gits/Looper/loop.py", line 174, in
loop_track(sys.argv[1])
File "/home/pkssd/gits/Looper/loop.py", line 165, in loop_track
track.play_looping(start_offset, best_offset)
File "/home/pkssd/gits/Looper/loop.py", line 140, in play_looping
out = Out123()
File "/home/pkssd/.local/lib/python3.5/site-packages/mpg123.py", line 274, in init
self._lib = self.init_library(library_path)
File "/home/pkssd/.local/lib/python3.5/site-packages/mpg123.py", line 263, in init_library
raise self.LibInitializationException('libout123 not found')
mpg123.LibInitializationException: libout123 not found
It would be great with an option to serach from the END of the song for a matching piece of sound. I have a clip that is about 3 minutes, I want as much of it as possible to play in the loop, but it usually fins a match after about 20-30 seconds.
It seems like the program finds a point in the song, and then looks for the next place where it gets a match.
Cool work!
I use Winamp which is very outdated, but has an excellent and broad plugin ecosystem. Other desktop audio players, like Foobar2000, also support plugins.
Curious, how easy/hard would it be to adapt your work into that sort of app plugin?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.