MythTV  master
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
MelScale Class Reference

#include <mythplugins/mythmusic/mythmusic/visualize.h>

Collaboration diagram for MelScale:
[legend]

Public Member Functions

 MelScale (int maxscale=0, int maxrange=0, int maxfreq=0)
 
int scale () const
 
int range () const
 
void setMax (int maxscale, int maxrange, int maxfreq)
 
int operator[] (int index)
 
QString note (int note)
 
int pixel (int note)
 
int freq (int note)
 

Static Public Member Functions

static double hz2mel (double hz)
 
static double mel2hz (double mel)
 

Private Attributes

std::vector< int > m_indices
 
std::array< QString, 12 > m_notes = {"C", ".", "D", ".", "E", "F", ".", "G", ".", "A", ".", "B"}
 
std::array< int, 126 > m_pixels {0}
 
std::array< int, 126 > m_freqs {0}
 
int m_scale {0}
 
int m_range {0}
 

Detailed Description

Definition at line 197 of file visualize.h.

Constructor & Destructor Documentation

◆ MelScale()

MelScale::MelScale ( int  maxscale = 0,
int  maxrange = 0,
int  maxfreq = 0 
)
explicit

Definition at line 156 of file visualize.cpp.

Member Function Documentation

◆ scale()

int MelScale::scale ( ) const
inline

Definition at line 202 of file visualize.h.

◆ range()

int MelScale::range ( ) const
inline

Definition at line 203 of file visualize.h.

Referenced by Spectrum::processUndisplayed(), and Spectrum::resize().

◆ setMax()

void MelScale::setMax ( int  maxscale,
int  maxrange,
int  maxfreq 
)

Definition at line 161 of file visualize.cpp.

Referenced by MelScale(), Spectrum::resize(), and Spectrogram::Spectrogram().

◆ hz2mel()

static double MelScale::hz2mel ( double  hz)
inlinestatic

Definition at line 206 of file visualize.h.

Referenced by setMax().

◆ mel2hz()

static double MelScale::mel2hz ( double  mel)
inlinestatic

Definition at line 207 of file visualize.h.

Referenced by setMax().

◆ operator[]()

int MelScale::operator[] ( int  index)

Definition at line 196 of file visualize.cpp.

◆ note()

QString MelScale::note ( int  note)

Definition at line 201 of file visualize.cpp.

Referenced by freq(), pixel(), Spectrogram::process(), and setMax().

◆ pixel()

int MelScale::pixel ( int  note)

Definition at line 208 of file visualize.cpp.

Referenced by Spectrogram::process().

◆ freq()

int MelScale::freq ( int  note)

Definition at line 215 of file visualize.cpp.

Referenced by Spectrogram::process(), and setMax().

Member Data Documentation

◆ m_indices

std::vector<int> MelScale::m_indices
private

Definition at line 214 of file visualize.h.

Referenced by operator[](), and setMax().

◆ m_notes

std::array<QString, 12> MelScale::m_notes = {"C", ".", "D", ".", "E", "F", ".", "G", ".", "A", ".", "B"}
private

Definition at line 216 of file visualize.h.

Referenced by note().

◆ m_pixels

std::array<int,126> MelScale::m_pixels {0}
private

Definition at line 217 of file visualize.h.

Referenced by pixel(), and setMax().

◆ m_freqs

std::array<int,126> MelScale::m_freqs {0}
private

Definition at line 218 of file visualize.h.

Referenced by freq(), and setMax().

◆ m_scale

int MelScale::m_scale {0}
private

Definition at line 219 of file visualize.h.

Referenced by scale(), and setMax().

◆ m_range

int MelScale::m_range {0}
private

Definition at line 220 of file visualize.h.

Referenced by range(), and setMax().


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