GNOME Bugzilla – Bug 593482
Spectrum: Multi-Channel support and Stereo to Mono compat report(cross-correlation)
Last modified: 2011-03-09 16:11:21 UTC
The idea behind this feature request is well explained under te topic "Cross-Correlation" on this paper: http://www.rs-met.com/documents/tutorials/StereoProcessing.pdf In order to achieve what's explained there, one can use the spectrum plugin, but as it is, is merges all channels into a single(mono) one. The solution right now, is to deinterleave to get both monos out of a stereo signal, pass each to the spectrum plugin and do the explained calculations using both mono sources to achieve the goal proposed on this enhancement request.
What we need is another property like gboolean "multi-band" which default to "false". If set to true we would analyse each channel. Not sure how we send the result. a) Add a index to the field name: Magnitude0, Magnitude1, ... b) Leave the demuxing to the app: Magnitude will contain values for all channels one after the other (if N bands then first N values for 1st channel, then N-values for 2nd channel) c) Use hierarchic structures: Magnitute would contain Channel0, Channel1,. which inturn contain the values. I prefer b).
I would prefer c)... magnitude would be a GstValueArray, n-th element is the GstValueArray with the magnitude for the n-th channel. b) would put them all into a single array which sounds a bit unclean to me ;)
What's the state of this request? Could we at least have multi-channel support? ie, analisys of each of the channels passed?
Noone had time to do it so far. The plan is to add a "channel-mode=merged,separate" option with "merged" as a default for backwards compatibility. In "separate" mode it would use the array like in option c.
Working on it now.
(In reply to comment #5) > Working on it now. Glad to hear it! Keep up the good work!
commit c622477a92aaa0910d91530b2f17083c96d2b17d Author: Stefan Kost <ensonic@users.sf.net> Date: Wed Mar 9 16:57:28 2011 +0200 spectrum: multi-channel support Add a boolean multi-channel property with a default of FALSE. When set to TRUE the element won't mix all input channels to mono, but instead run a FFT on each channel. In that case the result message would contain a 2 dimensional array of channel x data for magnitude and phase. API: GstSpectrum:multi-channel https://bugzilla.gnome.org/show_bug.cgi?id=593482