jackschaedler / circles-sines-signals

A Compact Primer on Digital Signal Processing
988 stars 86 forks source link

DFT deeper: selectable bins #17

Closed robert-wallis closed 9 years ago

robert-wallis commented 9 years ago

This adds a clickable rect for every bin so you don't have to push the increment/decrement buttons to change the bin. Because, I tried clicking the bin but it didn't work.

There's a closure on the click because i needs to be closed to a local bin value. Without a closure it will always try to change to the last i.

P.S. I've been trying to learn FFT for a while, and you have helped me the most. Thank you!

jackschaedler commented 9 years ago

Hi Robert,

Thanks so much for this! And thanks for being brave enough to venture into my hacky javascript ;)

This is a really nice change, but it seems like one little thing is missing. If I click the "Prev Bin" button repeatedly, the grey highlight will no longer follow the current bin. Other than that, this looks good to me.

robert-wallis commented 9 years ago

Oops! Sorry about that, I should have tested it better. For some reason I thought modulus always returned a positive value.

I also updated Leakage Figure 1, and tested on Safari and Chrome for Mac to make sure I didn't miss something else. Didn't try FF because I don't have it, and I'm on vacation so I have a slow connection.

jackschaedler commented 9 years ago

Brilliant, thanks so much for doing this! I'll update the gh-pages ASAP. Thanks again!

jackschaedler commented 9 years ago

Ok, just updated the gh-pages. Should all be live now :)