Mercurial > hg > beaglert
diff examples/audio_in_FFT/render.cpp @ 372:db2fe4e1b88e prerelease
Doxygen content added to each example render.cpp.
References to AnalogReadFrame etc. removed from doxygen content.
author | Robert Jack <robert.h.jack@gmail.com> |
---|---|
date | Thu, 09 Jun 2016 18:16:05 +0100 |
parents | e4392164b458 |
children | 3bed6b09223c |
line wrap: on
line diff
--- a/examples/audio_in_FFT/render.cpp Thu Jun 09 17:31:44 2016 +0100 +++ b/examples/audio_in_FFT/render.cpp Thu Jun 09 18:16:05 2016 +0100 @@ -1,3 +1,12 @@ +/* + ____ _____ _ _ +| __ )| ____| | / \ +| _ \| _| | | / _ \ +| |_) | |___| |___ / ___ \ +|____/|_____|_____/_/ \_\.io + + */ + /* * render.cpp * @@ -5,6 +14,25 @@ * Author: parallels */ +/** +\example 4_audio_FFT + +Fast Fourier Transform +---------------------- + +This sketch performs an FFT (Fast Fourier Transform) on incoming audio. It uses +the NE10 library, included at the top of the file (line 11). + +Read the documentation on the NE10 library [here](http://projectne10.github.io/Ne10/doc/annotated.html). + +The variables `timeDomainIn`, `timeDomainOut` and `frequencyDomain` are +variables of the struct `ne10_fft_cpx_float32_t` [http://projectne10.github.io/Ne10/doc/structne10__fft__cpx__float32__t.html](http://projectne10.github.io/Ne10/doc/structne10__fft__cpx__float32__t.html). +These are declared at the top of the file (line 21), and memory is allocated +for them in `setup()` (line 41). + +In `render()` a `for` loop performs the FFT which is performed on each sample, +and the resulting output is placed on each channel. +*/ #include <Bela.h> #include <rtdk.h>