bpm-analyzer.cpp File Reference

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <qapplication.h>
#include <qradiobutton.h>
#include <qlineedit.h>
#include <qpixmap.h>
#include <qpainter.h>
#include <qpushbutton.h>
#include <qlcdnumber.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qprogressbar.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <libgen.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <qspinbox.h>
#include <unistd.h>
#include <time.h>
#include <sys/times.h>
#include <math.h>
#include <assert.h>
#include <sys/mman.h>
#include <syscall.h>
#include <fftw3.h>
#include "bpm-analyzer.h"
#include "version.h"
#include "player-core.h"
#include "scripts.h"
#include "bpm.h"
#include "memory.h"
#include "clock-drivers.h"
Include dependency graph for bpm-analyzer.cpp:

Defines

#define IMAGE_XS   320
#define IMAGE_YS   240
#define FIT_CURVES
#define FFT_MIN_SINK

Functions

void map_output (float4 *target, int startfreq, int count, double *hcfreq, int winsize)
void spectrum_to_bark (fftw_complex *in, int window_size, double *out)
void read_audio (FILE *f, unsigned8 offset, double *target, unsigned4 length)
fft_type index2autocortempo (signed4 i)

Variables

const signed4 shifter = 12
const signed4 spectrum_shifter = 2

Define Documentation

#define FFT_MIN_SINK

The expected outcome modifies the output such that it will provide an estimate base don what was already seen. Comparing the measurement against what we expect it to be mioght hint which tempos are interesting. FFT MIN_SINK will look atht the melody spectrum and lower each value based on the last minimum value. RS_MAX_RAISE Perofrms the same stuff but will instead raise the last element to its last known position.

#define FIT_CURVES

The smootmelody define will look at the melodyline and 'fix'it. Didn't work too well. FIT_CURVES will set the analyzer such that it uses a log function to normalize the resulting mismatchgraph This feature improves the output of the algortihm from 30% to 40% successrate on a particular dataset.

#define IMAGE_XS   320
#define IMAGE_YS   240

Function Documentation

fft_type index2autocortempo ( signed4  i  ) 

References assert(), diskrate, and spectrum_shifter.

void map_output ( float4 target,
int  startfreq,
int  count,
double *  hcfreq,
int  winsize 
)

To deal with multiple levels of rayshooting we can define the following To help me overload gnuplot, I export all note and frequency data into a nice large file

References assert(), and diskrate.

void read_audio ( FILE *  f,
unsigned8  offset,
double *  target,
unsigned4  length 
)

Deze functie leest niet alleen de audio maar normalizeert die ook gebasseeerd op een windowsize van 1/16e beat.

The buffer contains the values that are currently added into the sum.

References assert(), and i.

void spectrum_to_bark ( fftw_complex *  in,
int  window_size,
double *  out 
)

Target must be spectrum_size long

References assert(), barkbounds, barksize, diskrate, and i.


Variable Documentation

const signed4 shifter = 12

Referenced by index2autocortempo().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by  doxygen 1.6.2