• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: fft_zrip confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fft_zrip confusion


  • Subject: Re: fft_zrip confusion
  • From: Mark Woollard <email@hidden>
  • Date: Wed, 14 Apr 2004 20:00:38 +0100

Yes, the two lines of code I posted are called each time. I'm getting different results but they don't make sense as for the basically the same input signal (440 Hz A guitar tone being read from aiff file) the output grows each time its called despite having very similar input data. I'm sure I'm missing something obvious!

Mark

On 14 Apr 2004, at 18:58, Austin Shoemaker wrote:

ctoz takes your array of real floats and packs them into the complex buffer. fft_zrip operates on the complex buffer to produce the FFT in place. If you don't call ctoz every time before the fft_zrip, you will be operating on the result of the last FFT, so you will get different results each time. If you repeat the two lines you typed below each time, you should get the same result every time. Are you calling ctoz each time?

Regards,
Austin Shoemaker

On Apr 14, 2004, at 10:07 AM, Mark Woollard wrote:

I'm using this to do a forward fft on segments of a data stream. Sample
values are in the range -1 to 1. First time I call fft_zrip it works as
expected with a peak in the output data where I'd expect. But each
subsequent call the output values grow significantly, the input data
I've checked and is always within the described range. What am I
missing? Code segment:

// Apply fft
ctoz( (COMPLEX*) m_buffer, 2, &m_complex, 1, m_resultSize );
fft_zrip( m_weights, &m_complex, 1, m_log2f, FFT_FORWARD );

where m_buffer is an array of floats with the input data, m_complex a
COMPLEX_SPLIT with realp and imagp setup with buffers with enough space
for the results. I've checked the m_buffer contents by adding printf
loop and the input isn't getting ramped up. m_log2f and m_resultsSize
are calculated at the start and are correct. I've not used ztoc as I'm
happy working with the split output and not scaled the output as this
doesn't matter to me either.

Thanks for any input, been scratching my head for a few hours on this
one!

Mark
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: fft_zrip confusion
      • From: Shaun Wexler <email@hidden>
References: 
 >fft_zrip confusion (From: Mark Woollard <email@hidden>)
 >Re: fft_zrip confusion (From: Austin Shoemaker <email@hidden>)

  • Prev by Date: Internal Microphone
  • Next by Date: Re: Internal Microphone
  • Previous by thread: Re: fft_zrip confusion
  • Next by thread: Re: fft_zrip confusion
  • Index(es):
    • Date
    • Thread