Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00033 #ifndef TIME_FREQUENCY_H
00034 # define TIME_FREQUENCY_H
00035
00036 #include "definitions.h"
00037 #include "complex.h"
00038 #include "array.h"
00039 #include "optarg.h"
00040 #include <math.h>
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00051 typedef Array* (*WindowFunction)(int,double);
00052
00055 typedef struct {
00056 int N_freq;
00057 int N_time;
00058 double samplingrate;
00059 double low_corner_freq;
00060 double up_corner_freq;
00061 Complex **sgram;
00062 } Spectrogram;
00063
00064 Spectrogram* spectrogram_stft(const Array* sig, double sampling_rate,
00065 const Array *Window, int N_freq, int N_time,
00066 double corner_freqs[2],
00067 int *timepoints, Spectrogram *spectgram);
00068 Spectrogram* spectrogram( const Array *sig, Spectrogram *spectgram,
00069 OptArgList *optargs );
00070 Array* spectrogram_powerspectrum( const Spectrogram *spect );
00071
00072 Spectrogram* spectrogram_init( int N_freq, int N_time );
00073 void spectrogram_free( Spectrogram *s );
00074
00075
00076
00077 Array* window_dirichlet( int n, double noparam );
00078 Array* window_gaussian ( int n, double sigma );
00079 Array* window_hamming ( int n, double noparam );
00080 Array* window_hanning ( int n, double noparam );
00081 Array* window_kaiser ( int n, double alpha );
00082
00083 #ifdef __cplusplus
00084 }
00085 #endif
00086
00087
00088
00089 #endif