Voss Connection Detection
1
Detect a connector click using realtime code on Bela hardware
timedelay.h
Go to the documentation of this file.
1
#pragma once
2
#include <vector>
3
#include "
config.h
"
4
#include "
buffer.h
"
5
6
class
Fft;
7
12
class
TimeDelay
{
13
// Storage for the raw signals
14
std::vector<float> mic1_copy;
15
std::vector<float> mic2_copy;
16
// Hann window
17
std::vector<float> hann;
18
19
Fft* fft1, *fft2, *ifft;
20
std::vector<float> re_conv;
21
std::vector<float> im_conv;
22
float
fs;
23
24
public
:
30
TimeDelay
(
const
float
& fs);
40
float
determineDelay
(
const
Channel
& mic1,
41
const
Channel
& mic2);
42
43
~TimeDelay
();
44
45
};
TimeDelay::~TimeDelay
~TimeDelay()
Definition:
timedelay.cpp:111
Channel
std::array< float, BLOCKSIZE > Channel
A Channel contains data for the length of BLOCKSIZE.
Definition:
config.h:183
TimeDelay
Time delay determination between two signals, based on cross-correlation and windowing of the data.
Definition:
timedelay.h:12
buffer.h
TimeDelay::determineDelay
float determineDelay(const Channel &mic1, const Channel &mic2)
Determine the delay between two microphone signals. A positive signal means that mic 1 comes [t] time...
Definition:
timedelay.cpp:37
config.h
Configuration parameters for connection detection.
TimeDelay::TimeDelay
TimeDelay(const float &fs)
Initialize a time delay finder.
Definition:
timedelay.cpp:8
src
timedelay.h
Generated by
1.8.17