Shop OBEX P1 Docs P2 Docs Learn Events
Fast Fourier Transform processed using the Propeller's counters. — Parallax Forums

Fast Fourier Transform processed using the Propeller's counters.

I thought I heard Chip Gracey (on Youtube) say that the Prop2's counters
are of use for computing fast fourier transforms, was I mistaken?

And if so, is there an explanation as to how this is done?
Is there code? Can it be done on the Prop1?

Fingers crossed :)



Comments

  • cgraceycgracey Posts: 14,133
    It can be done on either, but the Prop2 has some special things which make it easy:

    1) ADC's and counters on every pin for signal input
    2) CORDIC solver which can compute scaled sin and cos all at once
    3) Goertzel circuit for single-frequency amplitude+phase detection if whole FFT is not needed
  • Thanks Chip.

    I design synths and the prop is the best thing to happen
    in my field since the invention of the silicon transistor :) Honest


  • cgraceycgracey Posts: 14,133
    edited 2018-10-19 14:29
    chtuc wrote: »
    Thanks Chip.

    I design synths and the prop is the best thing to happen
    in my field since the invention of the silicon transistor :) Honest


    I am glad you see it like that. Audio was my earliest interest in electronics, from when I was about 9. I put everything I know of into the P2 to cover audio processing. The CORDIC can convert between polar and cartesian systems at 32 bits of resolution, so you can operate in whatever system is best for each process step. I've been looking forward to being able to play with it all for 12 years now.

    Oh, and the CORDIC does logarithmic and exponential operations, too. These are beautiful for translating notes into frequencies. They let you handle the exponential frequency domain with simple adds and subtracts on a musical-note basis, with many sub-bits of resolution.

    Welcome to the forums!
  • RaymanRayman Posts: 13,892
    Is there going to be a P2 vocal tract demo?

    Seems we should be able to do speech synthesis...
  • cgraceycgracey Posts: 14,133
    Rayman wrote: »
    Is there going to be a P2 vocal tract demo?

    Seems we should be able to do speech synthesis...

    You bet! Instead of one voice, though, we could do a whole choir of a hundred differentiated voices, spatially placed and moving around. And above and below, not just left and right. 3D binaural on headphones.
  • RaymanRayman Posts: 13,892
    I was just reading that FFT is faster if you can build sin and cos tables first...
    Also reading that FFT can do DCT, which I think we need for jpg and mp3 decode...
  • chtuc wrote: »
    Thanks Chip.

    I design synths and the prop is the best thing to happen
    in my field since the invention of the silicon transistor :) Honest

    Sounds interesting. What sorts of synths have you designed? Did any use P1?

  • cgraceycgracey Posts: 14,133
    edited 2018-10-19 14:39
    Rayman wrote: »
    I was just reading that FFT is faster if you can build sin and cos tables first...
    Also reading that FFT can do DCT, which I think we need for jpg and mp3 decode...

    Those sines and cosines need to be multiplied by your samples, too. We can do a scaled sine/cosine operation almost every 8 clocks. That's faster than looking up either in hub memory, and the multiply is free.
  • Don't bother with sine/cosine tables or multiplications. It's four as fast to have the CORDIC just rotate your samples directly instead of doing four multiplications to accomplish the same.
  • Chip, you need to put the Tabernacle Choir on the chip!
  • pedward wrote: »
    Chip, you need to put the Tabernacle Choir on the chip!

    Promoting the age-old question: How many angelic voices fit in the hub of a P2?
  • Here's what I need... the complete math dummies guide to an intuitive understanding of DSP techniques.

    Despite passing grades in Calculus, I didn't understand the value or reason for derivatives until well into my 30's and from all things, it took looking at an element of a Lego re-creation of Babbage's difference engine to make it understandable.

    Any curated links y'all can share about this?

    Warning: I failed differential equations class in college and rage-quit the EE program after that class.

    -joe
  • octetta wrote: »
    Here's what I need... the complete math dummies guide to an intuitive understanding of DSP techniques.

    Despite passing grades in Calculus, I didn't understand the value or reason for derivatives until well into my 30's and from all things, it took looking at an element of a Lego re-creation of Babbage's difference engine to make it understandable.

    Any curated links y'all can share about this?

    Warning: I failed differential equations class in college and rage-quit the EE program after that class.

    -joe

    Start here: http://dspguide.com

  • Start here: http://dspguide.com

    Very nice! Thanks!
Sign In or Register to comment.