samplebrain/server/samplebrain.h
Dave Griffiths 35b84c6da5 stuffs
2015-07-07 20:41:53 +01:00

36 lines
704 B
C++

#include "sample.h"
#include <vector>
class brain_block {
// runs analysis on pcm
brain_block(const sample &pcm);
// returns distance based on ratio of fft-mfcc values
float compare(const brain_block &other, float ratio);
public:
sample m_pcm;
sample m_fft;
sample m_mfcc;
};
class sample_brain {
public:
sample_brain();
// rewrites whole brain
void init(u32 block_size, u32 overlap);
// take another brain and rebuild this brain from bits of that one
// (presumably this one is made from a single sample)
sample resynth(const sample_brain *other, ratio);
private:
vector<brain_block> m_brain;
u32 m_block_size;
u32 m_overlap;
};