ASCII spectral periodogram for computing and displaying an estimate of a signal's power spectrum with ASCII characters
Public Functions
asgramcf | asgramcf_create( |
asgramcf | asgramcf_copy( |
int | asgramcf_destroy( |
int | asgramcf_reset( |
int | asgramcf_set_scale( |
int | asgramcf_set_display( |
int | asgramcf_push( |
int | asgramcf_write( |
int | asgramcf_execute( |
int | asgramcf_print( |
Interfaces
asgramcf asgramcf_create(
Create asgram object with size _nfft
- _nfft : size of FFT taken for each transform (character width)
asgramcf asgramcf_copy(
Copy object including all internal objects and state
int asgramcf_destroy(
Destroy asgram object, freeing all internally-allocated memory
int asgramcf_reset(
Reset the internal state of the asgram object
int asgramcf_set_scale(
Set the scale and offset for spectrogram in terms of dB for display purposes
- _q : asgram object
- _ref : signal reference level [dB]
- _div : signal division [dB]
int asgramcf_set_display(
Set the display's 10 characters for output string starting from the weakest and ending with the strongest
- _q : asgram object
- _ascii : 10-character display, default: " .,-+*&NM#"
int asgramcf_push(
Push a single sample into the asgram object, executing internal transform as necessary.
- _q : asgram object
- _x : input sample
int asgramcf_write(
Write a block of samples to the asgram object, executing internal transforms as necessary.
- _q : asgram object
- _x : input buffer, shape: (_n, 1)
- _n : input buffer length
int asgramcf_execute(
Compute spectral periodogram output from current buffer contents and return the ascii character string to display along with the peak value and its frequency location
- _q : asgram object
- _ascii : output ASCII string, shape: (_nfft, 1)
- _peakval : peak power spectral density value [dB]
- _peakfreq : peak power spectral density frequency
int asgramcf_print(
Compute spectral periodogram output from current buffer contents and print standard format to stdout