[mad-dev] Equaliser style effect.. i.e visualisation.
Mon, 13 May 2002 11:49:04 +0100
I'm using the high level API. Could I implement the bar drawing code in
the filter callback or would this cause problems/delays with the
decoding process? Otherwise how do I get at the frame structure?
Rob Leslie wrote:
> On Thursday, May 2, 2002, at 07:56 AM, Thomas Rathbone wrote:
>> In what stage of the decoding process can i find the information I
>> would need to create an equaliser (a frequencies bar graph)
>> visualisation? Do I just look at the subband levels or is that
>> totally wrong? Has anybody done this?
> You could look at the subbands after decoding a frame, yes, before
> synthesis (or actually whether or not you perform synthesis.) The
> subbands are somewhat coarse, and there is some overlap between them,
> so implementing an equalizer *control* with them is tricky, but they
> should be sufficient for a simple *visualization*.
> The subband samples are found in:
> where `channel' is less than MAD_NCHANNELS(&frame->header),
> `timeslice' represents an output unit of 32 PCM samples and is less
> than MAD_NSBSAMPLES(&frame->header), and `subband' is 0-31 covering
> the frequency spectrum in equal-width bands up to the Nyquist frequency.
> One thing to keep in mind is that the subband values are both positive
> and negative. The general range is +/- MAD_F_ONE, but actually any
> value is possible.
> Rob Leslie