These are definitely DRM’d files - downloaded via Apple Music and yep they have a m4p extension. Guessing that m4p files can come from a variety of sources across the iTunes eco-system.
I just wanted to play random snippets from the ‘Music Library’ aka - any file under ~/Music (“guess that song” style).
Disappointing that only iTunes can play these files and not even afplay seems to work.
I was hoping the the OS would be able to verify my iTunes Store credentials and allow the OS audio frameworks to play the files while I remain signed into the store, but it seems that is wholly the function of iTunes.
Not really sure what extra protection they are putting in place by limiting the function to iTunes only - in fact, there isn’t any as far as I can tell.
I might have to explore using AppleScript to drive iTunes - not ideal.