GNOME Bugzilla – Bug 327367
real time frequency domain display
Last modified: 2018-05-24 11:08:01 UTC
It would be really cool to have a real time frequency domain display in the interface. Similar to what iTunes does. This should be pretty easy if we can get FFT output from gstreamer and do the drawing with cairo. Maybe gstreamer already has a plugin for this?
gst had a spectrum plugin (not wonderful since it was a bit limited, but should be ok for just display). Needs to be ported to gstreamer 0.10 though
Bug #76519 is about including visualisations more generally.
Hmm yes, I would love a simple (really simple, to stay in tune with the Gnome spirit) FFT display like XMMS has typicaly. Purely 2D, no fancy 3D stuff, just one colour (picked from the GTK theme and/or configurable) If I raise both of my hands, does it count as two votes or just one ? ;-)
Created attachment 83933 [details] Spectrum analyzer in action Well, thanks to the new ability plugins have to insert gstreamer elements in the pipeline, and with some cairo love, I wrote a plugin doing this. I'll handoff the code when it's a little bit cleaner. In particular, the 'spectrum' element sends messages to the gstreamer bus of the playbin element which already has an handler. So I had to install one of higher priority (using gst_add_watch_full) to be sure that my messages were not stolen. Maybe we should allow plugin to install something in this handler. Maybe I should use another bus (it seems many 'bin' elements exist in the pipeline in the end).
Created attachment 84383 [details] [review] Spectrum analyzer plugin So here a patch against current svn for a spectrum analyser plugin. Expect it to be buggy. For instance when activated, RB can't jump to the next track anymore (I think the plugin eats the EOS messages). I also have some unpleasant warnings on the terminal while running it (gst_bus_source_dispatch, IA__g_object_set_valist on GstSpectrum), and it had hanged RB several time when playing with the parameters to vigourously. Finally the code is still dirty (lots of g_print and draft comments).
Rather than adding it as a filter element and stealing playbin's messages, it would probably be better to add it as a tee element and use an event probe to watch for the events.
I don't now very well gstreamer, so I'm just guessing: what I think is needed here is another bus (in order not to hook on the playbin bus). I don't now how the buses are implicitly created in gstreamer: is there one bus per pipeline ? one bus per 'branches' (as in gst-tee creating a new branch) ? The filter elements are first wrapped in a bin before being inserted in the RB pipeline; is this creating a new bus I can use ? Or should I simpling create a new bus myself ? So basically I don't really get what a tee would give me...
Perhaps it would also be possible to integrate the spectrum into the bar that has the play/pause/next buttons, between those and the volume on the right, so that it doesn't take up any space in the library interface. That's where I think I would enjoy it most, otherwise it would be rather obtrusive, and I don't think I'd use it. (Not to say it should be made for me, but, I think that would be the best place for it)
mmmm yes, I agree 100% with the above. A simple and small display integrated somewhere in the controls area at the top, so that it doesn't interfere with the library browser, and can be visible at all times... would be the most enjoyable implementation of a FFT display.
We could have multiple states: integrated / popup / fullscreen like for visualizations. Right now the rendering is a bit slow for fullscreen and the integration might need to wait for more serious thought about the whole arrangment of the "top part" of RB window (controls / progress bar / integration of cover arts ? / ...)
about the comment 10: having this feature with the options integrated / popup / fullscreen would make it just another visualisation plugin. I think that things should not be mixed. Make one more visualisation to do the integrated / popup / fullscreen stuff for the visualisation plugin and leave the frequency domain display in the interface. Similar to what iTunes does. "Perhaps it would also be possible to integrate the spectrum into the bar that has the play/pause/next buttons, between those and the volume on the right" For long time I thought how could we make a better use of that space... well I think that the spectrum could just be the answer.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/122.