#include <cstdio>#include <Qt/qapplication.h>#include <Qt/qlineedit.h>#include <Qt/qpixmap.h>#include <Qt/qpainter.h>#include <Qt/qpushbutton.h>#include <Qt/qlcdnumber.h>#include <Qt/qcheckbox.h>#include <Qt/qlabel.h>#include <Qt/qprogressbar.h>#include <stdlib.h>#include <string.h>#include <stdio.h>#include <libgen.h>#include <Qt/qprogressdialog.h>#include <fcntl.h>#include <signal.h>#include <sys/ioctl.h>#include <Qt/qspinbox.h>#include <unistd.h>#include <Qt/qcombobox.h>#include <Qt/qslider.h>#include <time.h>#include <sys/times.h>#include <math.h>#include <assert.h>#include <sys/mman.h>#include <Qt/qmessagebox.h>#include <set>#include "beatgraph-label.h"#include "beatgraph-analyzer.h"#include "rhythm-analyzer.h"#include "bpmplay.h"#include "version.h"#include "scripts.h"#include "memory.h"#include "signals.h"#include "clock-drivers.h"#include "hues.h"#include "info.h"
Defines | |
| #define | COLLAPSE 4 |
Functions | |
| void | getBandColor (int band, QColor &color, float4 val) |
| void | channel_to_energy (unsigned4 ws, unsigned4 n, void *D, unsigned4 stride) |
Variables | |
| const int | maxslice = 8 |
| #define COLLAPSE 4 |
ws = the window size over which we calculate the rms value n = the length of the input and output channels data = the start of the input and output channel (This is an in-place transform) stride = how to go from one sample to the next. 1 is a standard array. 2 will skip 1
This function does what I hate in biological data analysis. It THRESHOLDS. The horror but it works quite well. I would never do this if it had not to do with the speed of computation. Whoever reads this: please forgive me for this random collection of thresholds. Well.... They are not that random. The mean is move to 0 and then the average distance to the mean is used to reposition the mean.
A second disaster with this function is that it receives an area and treats it as signed4 integers and then write the result back as if it were unsigned4 !
First we convert the signed integers to unsigned integers that can be added ws times and we also square them already
To normalize the signal here we tested a number of different approaches subtraction of the mean; division by the mean and log(v/me) there was not much qualitative difference between subtraction and log, except that we had gray faster than with subtraction. Division underperformed v/=me; // division method v=log(v/me); // log method
| const int maxslice = 8 |
Referenced by getBandColor().
1.6.2