This is not possible because of Apple's restrictions. There's no
API that lets app developers access and alter the sound signal for
Apple Music. I can't find the tweet but the dev mentioned about
this before on Twitter. It's a really big let down on Apple's part.
Hopefully they introduce some improvements to Apple Music API at
WWDC in June 2017.