projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.32k stars 372 forks source link

Apple TV implementation #723

Open ghost opened 1 year ago

ghost commented 1 year ago

Someone should build a frontend for apple TV and release it for free.

Blaquewithaq commented 1 year ago

Sounds like your volunteering? :D

kblaschke commented 1 year ago

Seriously, if anyone is able to write an open-source app for iOS and tvOS, that'd be amazing!

Once there's there's a working implementation, we finally have a good incentive to use some of our OpenCollective funds to buy an Apple Developer subscription and release the new app, the SDL frontend and the Music plug-in with proper code signing and an official Apple Store account managed by the projectM team.

connorjs commented 11 months ago

Are there any example iOS-like apps that y'all know of that can hook into existing sound? The macOS app works via its microphone, but the Apple TV doesn't have a mic.

I assume the idea would be that I start Spotify or Apple Music or something and then open this app second.

I haven't dove too deeply, but I think I saw the Apple Music app existed as a plug in somehow?

Context: I've always wanted a visualizer similar to the old iTunes one, and liked projectM from trying it out. I've also always wanted to build an Apple TV app. I'm happy to try to build this out, but hoping for any direction/guidance to get me started.

(Treat this as "interested" not "yes I'm doing it" though 😀)

kblaschke commented 11 months ago

Yes, there is a plug-in for Apple Music. Not exactly sure if it works on Apple TV, can't try it because I don't have such a device, but I don't see a reason why it shouldn't. You'd have to build it with the tvOS SDK and code-sign your build with a proper developer ID to be able to run code on the Apple TV, similar to iOS apps. If you've got an Apple developer account, then just go ahead, the sources are here:

https://github.com/projectM-visualizer/frontend-music-plug-in

Due to limitations of the - now deprecated and undocumented - iTunes visualizer API, you will only get 8-bit audio data and only updates every 200ms, so the beat detection won't work very well and the waveforms look a bit choppy, but as with all Apple things there's not much we can do here.

Not sure about how to package/install the extension bundle on tvOS, but there's probably some documentation available.