This AddOn simply plays custom music (like Pokemon music) during pet battles. To add tracks, follow the instructions in music.lua.
For copyright reasons I can't distribute any Pokemon music with this AddOn, but if you know of some suitable music with a permissive licence (or in the public domain), just leave a comment on Curse or WoW Interface and I'll see if I can package it with future releases.
CAUTION: The included Populate_Music scripts will completely overwrite your existing music.lua file! Make sure you back up any manual changes you make.
Both the Windows and Unix scripts require the ogginfo program from the vorbis-tools package.
On Windows, download vorbis-tools-win32-bin.7z from here, unpack it and copy ogginfo.exe, libogg.dll and libvorbis.dll into the Interface\AddOns\PetBattleMusic\ogginfo folder.
On Mac OSX, you can install vorbis-tools from Homebrew (you don't need to put ogginfo in the AddOn folder like on Windows). On other Unix-like systems, you can probably install it from your package manager.
The Unix script also requires mp3info, available from Homebrew or your package manager.
Limitations in 6.0
As of patch 6.0.1, WoW doesn't play user-added MP3 sound files at all and doesn't play user-added Ogg files on the Music channel. This means that you need to have all of your music in Ogg format and select a sound channel other than Music in config.lua. MP3 files from the game itself will still work if you add them to music.lua manually.
These changes haven't been officially mentioned, so it may or may not be a bug.
Alpha Versions, API and Source Code
For the latest alpha versions, check CurseForge. API documentation for AddOn authors can be found here.