Public Slots | Signals | Public Member Functions | Public Attributes

Spectrogram Class Reference

This class holds the parameters for a spectrogram and implements its synthesis and generation. More...

#include <spectrogram.hpp>

List of all members.

Public Slots

void cancel ()
 Informs the working thread of a request to interrupt the computation.

Signals

void progress (int value) const
 Signals percentual progress to the main application.
void status (const QString &text) const
 Signals the state of the computation to the main application.

Public Member Functions

 Spectrogram (QObject *parent=0)
QImage to_image (real_vec &signal, int samplerate) const
 Generates a spectrogram for the given signal.
real_vec synthetize (const QImage &image, int samplerate, SynthesisType type) const
 Synthesizes the given spectrogram to sound.
QString serialized () const
 Serializes the Spectrogram object.
void deserialize (const QString &serialized)
 Loads the serialized parameters into this object.

Public Attributes

double bandwidth
 Bandwidth of the frequency-domain filters.
double basefreq
 Base frequency of the spectrogram.
double maxfreq
 Maximum frequency of the spectrogram.
double overlap
 Overlap of the frequency-domain filters, 1 = full overlap (useless), 0 = no overlap.
double pixpersec
 Time resolution of the spectrogram, pixels per second.
Window window
 Window function used on the frequency-domain intervals.
AxisScale intensity_axis
 Scale type of the intensity axis (linear or logarithmic).
AxisScale frequency_axis
 Scale type of the frequency axis (linear or logarithmic).
BrightCorrection correction
 Brightness correction used in generation of the spectrogram.
Palette palette
 Palette used for drawing the spectrogram.

Detailed Description

This class holds the parameters for a spectrogram and implements its synthesis and generation.

Definition at line 99 of file spectrogram.hpp.


Constructor & Destructor Documentation

Spectrogram::Spectrogram ( QObject *  parent = 0  ) 

Definition at line 219 of file spectrogram.cpp.


Member Function Documentation

void Spectrogram::cancel (  )  [slot]

Informs the working thread of a request to interrupt the computation.

Definition at line 461 of file spectrogram.cpp.

void Spectrogram::deserialize ( const QString &  serialized  ) 

Loads the serialized parameters into this object.

Definition at line 485 of file spectrogram.cpp.

void Spectrogram::progress ( int  value  )  const [signal]

Signals percentual progress to the main application.

QString Spectrogram::serialized (  )  const

Serializes the Spectrogram object.

The serialized string is saved in image metadata to indicate parameters with which the spectrogram has been generated.

Definition at line 498 of file spectrogram.cpp.

void Spectrogram::status ( const QString &  text  )  const [signal]

Signals the state of the computation to the main application.

real_vec Spectrogram::synthetize ( const QImage &  image,
int  samplerate,
SynthesisType  type 
) const

Synthesizes the given spectrogram to sound.

Definition at line 339 of file spectrogram.cpp.

QImage Spectrogram::to_image ( real_vec signal,
int  samplerate 
) const

Generates a spectrogram for the given signal.

Definition at line 233 of file spectrogram.cpp.


Member Data Documentation

Bandwidth of the frequency-domain filters.

In Hz for linear spectrograms, in cents (cent = octave/1200) for logarithmic spectrograms.

Definition at line 117 of file spectrogram.hpp.

Base frequency of the spectrogram.

Definition at line 119 of file spectrogram.hpp.

Brightness correction used in generation of the spectrogram.

Definition at line 133 of file spectrogram.hpp.

Scale type of the frequency axis (linear or logarithmic).

Definition at line 131 of file spectrogram.hpp.

Scale type of the intensity axis (linear or logarithmic).

Definition at line 129 of file spectrogram.hpp.

Maximum frequency of the spectrogram.

Definition at line 121 of file spectrogram.hpp.

Overlap of the frequency-domain filters, 1 = full overlap (useless), 0 = no overlap.

Definition at line 123 of file spectrogram.hpp.

Palette used for drawing the spectrogram.

Definition at line 135 of file spectrogram.hpp.

Time resolution of the spectrogram, pixels per second.

Definition at line 125 of file spectrogram.hpp.

Window function used on the frequency-domain intervals.

Definition at line 127 of file spectrogram.hpp.


The documentation for this class was generated from the following files: