Added some functions for monitoring Quicktime movie audio frequency and volume levels.
You can configure the number of channels and bands, and you can set whether you want to monitor frequency or volume.
I also added an example that shows all this in action.
@obviousjim This is the same functionality that you looked at a couple of days ago, just a little more oF-y.
Implemented retrieving the audio frequency and volume levels from the…
Based on http://www.okado.no/posts/how-to-use-itunes-music-visualizers-in-coco/index.html
Added an example to retrieve audio data from an ofQTKitPlayer instance.
Added method to get the actual frequency ranges returned in the audio…
Added flags to enable audio monitoring.
Made everything more oF-y.
Fixed bug with wrong number of frequency metering bands.
Made example sexy.
@obviousjim what do you think about this?
Thanks for the nudge. pulling into a local branch and taking a look,
I looked through code and it seems really awesome, and definitely useful. Here are my concerns:
1) The QTKit based video player is straying further from the cross-platform supported features in OF. This is a general OF strategy, something that @arturoc could comment on. Is this a problem or is it ok?
2) Moving forward, I think we see QTKit as a bandaid solution for a GStreamer or AVFoundation implementation. Are we stitching ourselves up by adding this to the core in that we must 'promise' to support audio frequency with the similar API as we move forward to new solutions. Or can we leave it as a 'one off bonus' for those who choose to use ofQTKitPlayer directly?
From a code perspective, it looks clean and worked well for me. Be good to get a few more eyes on it, @bakercp always has a discretionary opinions
Bump @arturoc @bakercp @obviousjim
I guess this could also be an addon if that makes more sense.
Is there a way to structure it as an addon that just uses the ofQTKitPlayer object internally? I'd be worried about having another QTKit movie player with duplciated code floating around
My first instinct would be to subclass ofQTKitPlayer and ofQTKitMovieRenderer and override ofQTKitPlayer::loadMovie() and `ofQTKitPlayer::update().
But that would require modifications to the current classes. I would need access to some private variables like ofQTKitPlayer.moviePlayer and [ofQTKitMovieRendere .movie].
Fixed issue where we'd sometimes try to access a null pointer.