Loopadrine is a script written in Python in order to automate generating looped audio playlists with minimal effort. Loopadrine utilizes various modules in order to allow for the downloading, looping and conversion of YouTube videos/playlists to Nintendo's BRSTM's format, which can be inserted into a number of games.
The motivation for this project initially was speed up the process of adding new music to Super Smash Bros. Ultimate. I initially wrote this in the C# language, but switched to Python because of its ease of manipulating files and calling on other Python modules/CLIs.
Loopadrine is a script written in the Python language. In order to use it you will need the following dependencies installed on your machine:
- Python (64-bit) >= 3.9
- PyMusicLooper >= 3.0
- This includes PyMusicLooper's dependencies for full usage of its features so FFMPEG as well.
Use the script by firstly adding a list of YouTube URLs to the songs.txt
file. If this file does not exist, create it and add YouTube URLs to it (one line per link.)
Run the script using Python from the command line: python Loopadrine.py
. There are flags that Loopadrine can accept for different operation modes:
-r, --redo - Takes a BRSTM file(s) from the ~redo directory and its corresponding audio file from the ~processed directory and restarts the loop conversion process.
-s, --skip - Skips the loop generation portion of the conversion process.
Loopadrine (if the --skip/--redo flags aren't set) will then download and extract the audio from all of the links listed in the songs.txt file. Loopadrine will then ask which looping mode you'd like to use for the batch:
- interactive (inter) - Use PyMusicLooper to generate a list of potential loop pairs. You can test each loop pair by entering the loop index you want to preview and adding 'p' at the end (e.g 0p.) Once a desirable loop pair is found, select it by entering the index and pressing enter.
- automatic (auto) - PyMusicLooper will automatically choose the best discovered loop point based on its selection algorithm.
Once finished generating the looping file, the script will then convert the audio file to a BRSTM using the LoopingAudioConverter.
Large thanks go out to the creators of these projects:
- The yt-dlp/ytdl-org teams for creating the yt-dlp / youtube-dl projects
- Hazem "arkrow" Nabil for creating the PyMusicLooper project
- Libertyernie and all of its contributors for creating the LoopingAudioConverter project.
Please feel free to fork this project and submit a pull request under this repository. Any improvements/bugfixes/additions are welcome!