SongMetriek Class Reference

#include <song-metric.h>

Inheritance diagram for SongMetriek:
Inheritance graph
[legend]
Collaboration diagram for SongMetriek:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 accessors (float4, tempo_limits, 0.05)
 SongMetriek (float4 tw, float4 sw, float4 hw, float4 rw, float4 cw)
 SongMetriek (MetricWidget &take_from)
void set_show_harmonics (bool h5, bool h6, bool h7, bool h8)
void set_unknown_tempo_matches (bool v)
void set_tempo_weight (float4 val)
void set_spectrum_weight (float4 val)
void set_echo_weight (float4 val)
void set_rhythm_weight (float4 val)
void set_composition_weight (float4 val)
void prepare ()
float4 tempo_diff (const Song &a, const Song &b) const
float4 tempo_dist (const Song &a, const Song &b) const
float4 spectrum_dist (const Song &, const Song &song) const
float4 histogram_dist (const Song &, const Song &song, float8 breakat) const
float4 rhythm_dist (const Song &, const Song &song, float8 breakat) const
float4 composition_dist (const Song &a, const Song &song, float8 breakat) const
float4 find_harmonic (float4 td, int &which) const
float4 distance (const Song &a, const Song &b, float8 limit) const

Public Attributes

float4 tempo
float4 spectrum
float4 histogram
float4 rhythm
float4 composition

Static Public Attributes

static SongMetriek std

Constructor & Destructor Documentation

SongMetriek::SongMetriek ( float4  tw,
float4  sw,
float4  hw,
float4  rw,
float4  cw 
)

References composition, histogram, rhythm, spectrum, and tempo.

SongMetriek::SongMetriek ( MetricWidget take_from  ) 

Member Function Documentation

SongMetriek::accessors ( float4  ,
tempo_limits  ,
0.  05 
)
float4 SongMetriek::composition_dist ( const Song a,
const Song song,
float8  breakat 
) const
float4 SongMetriek::distance ( const Song a,
const Song b,
float8  limit 
) const

These should better be sorted according to the metric. The one with the highest impact should be measured first. Currently we only do this for the intensive histogram and rhythm matching.

References composition, composition_dist(), histogram, histogram_dist(), no_distance, rhythm, rhythm_dist(), spectrum, spectrum_dist(), tempo, and tempo_dist().

Referenced by composition_dist(), Song::distance(), Song::get_distance_to_main(), histogram_dist(), rhythm_dist(), and spectrum_dist().

float4 SongMetriek::find_harmonic ( float4  td,
int &  which 
) const

References no_distance.

Referenced by QSong::colorOfTempoCol(), and Song::tempo_show().

float4 SongMetriek::histogram_dist ( const Song self,
const Song song,
float8  breakat 
) const
void SongMetriek::prepare (  ) 

References composition, histogram, rhythm, spectrum, and tempo.

Referenced by SongMetriek().

float4 SongMetriek::rhythm_dist ( const Song self,
const Song song,
float8  breakat 
) const
void SongMetriek::set_composition_weight ( float4  val  )  [inline]

References composition.

Referenced by SongMetriek().

void SongMetriek::set_echo_weight ( float4  val  )  [inline]

References histogram.

Referenced by SongMetriek().

void SongMetriek::set_rhythm_weight ( float4  val  )  [inline]

References rhythm.

Referenced by SongMetriek().

void SongMetriek::set_show_harmonics ( bool  h5,
bool  h6,
bool  h7,
bool  h8 
)

Referenced by SongMetriek().

void SongMetriek::set_spectrum_weight ( float4  val  )  [inline]

References spectrum.

Referenced by SongMetriek().

void SongMetriek::set_tempo_weight ( float4  val  )  [inline]

References tempo.

Referenced by SongMetriek().

void SongMetriek::set_unknown_tempo_matches ( bool  v  )  [inline]
float4 SongMetriek::spectrum_dist ( const Song self,
const Song song 
) const
float4 SongMetriek::tempo_diff ( const Song a,
const Song b 
) const
float4 SongMetriek::tempo_dist ( const Song a,
const Song b 
) const [inline]

References tempo_diff().

Referenced by distance().


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by  doxygen 1.6.2