|
HARDT - The Ham Radio DSP Toolkit
|
#include <hfftoutput.h>


Public Member Functions | |
| HFftOutput (int size, int average, int skip, HWriter< HFftResults > *writer, HWindow< T > *window, H_SAMPLE_RATE zoomRate=0, int zoomFactor=1, int zoomCenter=0) | |
| HFftOutput (int size, int average, int skip, HWriterConsumer< T > *consumer, HWindow< T > *window, H_SAMPLE_RATE zoomRate=0, int zoomFactor=1, int zoomCenter=0) | |
| HFftOutput (int size, int average, int skip, HWriter< HFftResults > *writer, HWindow< T > *window, bool isIq) | |
| HFftOutput (int size, int average, int skip, HWriterConsumer< T > *consumer, HWindow< T > *window, bool isIq) | |
| ~HFftOutput () | |
| int | Output (T *src, size_t size) |
| bool | Command (HCommand *command) |
| int | Width () |
| int | Left () |
| int | Right () |
| int | Center () |
| float | BinSize () |
| float | BinSize (H_SAMPLE_RATE rate) |
| H_SAMPLE_RATE | Rate () |
| void | SetZoom (int zoomFactor, int zoomCenter) |
| bool | Start () |
| bool | Stop () |
Public Member Functions inherited from HOutput< T, HFftResults > | |
| void | Ready (HFftResults *buffer, size_t blocksize) |
| void | Ready (HFftResults value) |
| void | Ready () |
| bool | Start () |
| bool | Stop () |
| HOutput () | |
| HOutput (HWriterConsumer< T > *consumer) | |
| HOutput (std::function< void(HFftResults *, size_t)> ready) | |
| HOutput (std::function< void(HFftResults *, size_t)> ready, HWriterConsumer< T > *consumer) | |
| HOutput (std::function< void(HFftResults)> ready) | |
| HOutput (std::function< void(HFftResults)> ready, HWriterConsumer< T > *consumer) | |
| HOutput (std::function< void()> ready) | |
| HOutput (std::function< void()> ready, HWriterConsumer< T > *consumer) | |
| HOutput (HWriter< HFftResults > *writer) | |
| HOutput (HWriter< HFftResults > *writer, HWriterConsumer< T > *consumer) | |
| HOutput (int chunksize) | |
| HOutput (int chunksize, HWriterConsumer< T > *consumer) | |
| HOutput (std::function< void(HFftResults *, size_t)> ready, int chunksize) | |
| HOutput (std::function< void(HFftResults *, size_t)> ready, int chunksize, HWriterConsumer< T > *consumer) | |
| HOutput (std::function< void(HFftResults)> ready, int chunksize) | |
| HOutput (std::function< void(HFftResults)> ready, int chunksize, HWriterConsumer< T > *consumer) | |
| HOutput (std::function< void()> ready, int chunksize) | |
| HOutput (std::function< void()> ready, int chunksize, HWriterConsumer< T > *consumer) | |
| HOutput (HWriter< HFftResults > *writer, int chunksize) | |
| HOutput (HWriter< HFftResults > *writer, int chunksize, HWriterConsumer< T > *consumer) | |
| int | WriteChunk (T *src, size_t blocksize) |
| void | SetWriter (HWriter< HFftResults > *writer) |
Public Member Functions inherited from HChunkWriter< T > | |
| int | Write (T *src, size_t blocksize) |
| HChunkWriter () | |
| HChunkWriter (int chunksize) | |
| int | GetChunksize () |
Public Member Functions inherited from HWriter< T > | |
| virtual | ~HWriter ()=default |
| HWriter< T > * | Writer () |
Public Member Functions inherited from HObject | |
| HObject () | |
Public Member Functions inherited from HWriterConsumer< HFftResults > | |
| HWriterConsumer< HFftResults > * | Consumer () |
Calculate a number of dfft's, if applicable then average the spectrum over the number of dfft's, then write the calculated spectrum results to the given writer (usually a HCustomWRiter)
| HFftOutput< T >::HFftOutput | ( | int | size, |
| int | average, | ||
| int | skip, | ||
| HWriter< HFftResults > * | writer, | ||
| HWindow< T > * | window, | ||
| H_SAMPLE_RATE | zoomRate = 0, |
||
| int | zoomFactor = 1, |
||
| int | zoomCenter = 0 |
||
| ) |
Create a new HFft output that writes to a writer
| size | The FFT size (1024 is a good choice for analytic use, 256 is recommended for realtime applications) |
| average | The number of FFT's to accumulate and average before calling the result writer. Note that if you use anything but 1, you can not run your signal through the output multiple times since that would mix results in the averaging phase (say if you where zooming in) |
| skip | Take each 'skip' sample and skip the rest |
| writer | The result writer (most likely a HCustomerWriter<HFftResults>*) |
| window | The window to use before calculating the FFT |
| zoomRate | The samplerate of the input samples |
| zoomFactor | Zoom factor. If larger than 1, then the spectrum is zoomed around 'center' (in relation to 'size'). The factor must divide up into 'size' with an integer result (1024/4 = ok, 1024/3 = not-ok!). |
| zoomCenter | The center bin (frequency), must be in the [0-size/2] range. Use the static HFftOutput::BinAtFrequency() method if you do not already know the bin number. |
If you intend to use scaling, you must initialize the HFftOutput with a samplerate. You can set the factor to 1 initially to disable zooming. But if you have not provided zoomRate != 0, zooming will not be setup and be available.!
| HFftOutput< T >::HFftOutput | ( | int | size, |
| int | average, | ||
| int | skip, | ||
| HWriterConsumer< T > * | consumer, | ||
| HWindow< T > * | window, | ||
| H_SAMPLE_RATE | zoomRate = 0, |
||
| int | zoomFactor = 1, |
||
| int | zoomCenter = 0 |
||
| ) |
Create a new HFft output that registers with an upstream writer
| size | The FFT size (1024 is a good choice for analytic use, 256 is recommended for realtime applications) |
| average | The number of FFT's to accumulate and average before calling the result writer. Note that if you use anything but 1, you can not run your signal through the output multiple times since that would mix results in the averaging phase (say if you where zooming in) |
| skip | Take each 'skip' sample and skip the rest |
| consumer | The upstream writer that should write to this component |
| window | The window to use before calculating the FFT |
| zoomRate | The samplerate of the input samples |
| zoomFactor | Zoom factor. If larger than 1, then the spectrum is zoomed around 'center' (in relation to 'size'). The factor must divide up into 'size' with an integer result (1024/4 = ok, 1024/3 = not-ok!). |
| zoomCenter | The center bin (frequency), must be in the [0-size/2] range. Use the static HFftOutput::BinAtFrequency() method if you do not already know the bin number. |
If you intend to use scaling, you must initialize the HFftOutput with a samplerate. You can set the factor to 1 initially to disable zooming. But if you have not provided zoomRate != 0, zooming will not be setup and be available.!
| HFftOutput< T >::HFftOutput | ( | int | size, |
| int | average, | ||
| int | skip, | ||
| HWriter< HFftResults > * | writer, | ||
| HWindow< T > * | window, | ||
| bool | isIq | ||
| ) |
Create a new HFft output that writes to a writer
| size | The FFT size (1024 is a good choice for analytic use, 256 is recommended for realtime applications) |
| average | The number of FFT's to accumulate and average before calling the result writer. |
| skip | Take each 'skip' sample and skip the rest |
| writer | The result writer (most likely a HCustomerWriter<HFftResults>*) |
| window | The window to use before calculating the FFT |
| isIq | If set to true then the input must be IQ data and the returned spectrum then contains negative as well as positive frequencies. If you intend to use scaling, you must initialize the HFftOutput with a samplerate. You can set the factor to 1 initially to disable zooming. But if you have not provided zoomRate != 0, zooming will not be setup and be available.! |
| HFftOutput< T >::HFftOutput | ( | int | size, |
| int | average, | ||
| int | skip, | ||
| HWriterConsumer< T > * | consumer, | ||
| HWindow< T > * | window, | ||
| bool | isIq | ||
| ) |
Create a new HFft output that writes to a writer
| size | The FFT size (1024 is a good choice for analytic use, 256 is recommended for realtime applications) |
| average | The number of FFT's to accumulate and average before calling the result writer. |
| skip | Take each 'skip' sample and skip the rest |
| consumer | The upstream writer that should write to this component |
| window | The window to use before calculating the FFT |
| isIq | If set to true then the input must be IQ data and the returned spectrum then contains negative as well as positive frequencies. If you intend to use scaling, you must initialize the HFftOutput with a samplerate. You can set the factor to 1 initially to disable zooming. But if you have not provided zoomRate != 0, zooming will not be setup and be available.! |
|
inline |
Default destructor
|
inline |
Return the number of frequencies per bin
|
inline |
Given a samplerate, return the number of frequencies per bin
|
inline |
Get the center FFT frequency
|
inlinevirtual |
Execute or carry through a command
Implements HChunkWriter< T >.
|
inline |
Get the leftmost frequency of the selected fft window
|
virtual |
Process a block of samples
Implements HOutput< T, HFftResults >.
|
inline |
Return the output sample rate after resampling
|
inline |
Get the rightmost frequency of the selected fft window
| void HFftOutput< T >::SetZoom | ( | int | zoomFactor, |
| int | zoomCenter | ||
| ) |
Change zoom factor and center
|
inlinevirtual |
Initialize before first read/write
Reimplemented from HWriter< T >.
|
inlinevirtual |
Cleanup after last read/write
Reimplemented from HWriter< T >.
|
inline |
Get the width of the FFT spectrum (how many frequencies is covered)
1.8.17