Playing apple music from AVFoundation for visualization

Hi I am working on a music app where I can do some sound analysis, my end goal is to integrate Apple Music API in my app where users can search songs. When the song is played I want to show a type of soundwave/spectrogram. For sound visualization I have AVFoundation but the Music API returns only song ID which could be played using Apple MediaPlayer framework only. Is there any API for doing sound analysis or can I play the Apple music songs using AVFoundation.

Hello @FJaffri,

Playing Apple Music content using AVFoundation is not supported.

The recommended APIs for playing Apple Music content are ApplicationMusicPlayer and SystemMusicPlayer in MusicKit.

However, it would help us to have specific information about your use-case so we can try to think about the best approach to enable the functionality you want to build in a way that is compatible with our contractual obligations for DRM content.

Capturing this information in a ticket on Feedback Assistant is the best way forward for this enhancement request.

Thank you very much in advance.

Best regards,

I just created a ticket for this enhancement request via the Feedback Assistant.

Any update on this?

This is basic functionality. It's really surprising/embarrassing that all major libraries out there have this functionality built in but the official Apple library MusicKit doesnt provide a simple method to capture the data to create a sound wave chart..

Playing apple music from AVFoundation for visualization
 
 
Q