Back to holes in our codebase left by Echonest.
File "fore/combine_tracks.py", line 41, in render_track track2 = audio.LocalAudioFile('instrumentals/'+file2)
Start the server again:
sudo python -m fore.server ... more info socket.error: [Errno 48] Address already in use
See who’s using our socket:
$ ps 47023 ttys002 0:02.95 /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -m fore.server
kill -9 47023 sudo python -m fore.server
Let’s poke around a bit more…
File "fore/mixer.py", line 266, in __init__ tempanalysis = AudioAnalysis(str(track_md5))
Searching the codebase for the term ‘echonest’, it occurs 49 times in 10 files. Not too bad. Let’s play around with Amen a bit.
Not sure if Amen actually supports MP3 audio, which might be a deal breaker for this project. We definitely need to replace
remixs AudioData function which I have grabbed. If I try to add it to my own fork of the library, it’s located at
Hmm. I can install with pip from git repo.
pip install git+https://github.com/MikeiLL/amen/archive/master.zip
Did not work. This did:
sudo pip install git+https://github.com/MikeiLL/amen
And pulled in the master, Rosuav, who has ported a version of the app for Python3. Python 3 (at least 3.4 or so) comes with a built-in virtual environment:
$ python3 -m venv env $ source env/bin/activate $ pip install --upgrade pip $ pip install -r requirements.txt
At one point I mentioned the idea of totally rewriting the codebase and my dear mentor Chris Angelico shared this post called Things You Should Never Do In Software Development. Nice.