forked from addacsystem/ADDAC-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathADDAC_Quad.h
executable file
·70 lines (50 loc) · 1.14 KB
/
ADDAC_Quad.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* CARTESIAN / POLAR QUADRIPHONIC SPATIALIZER
* Version 0.1 August, 2011
* Copyright 2011 AndrŽ Gonalves / AndrŽ Perrota
* For details, see http://
*
+
* Spatialization algorithm by: Andre Perrota
*/
#ifndef ADDAC_Quad_h
#define ADDAC_Quad_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include <WProgram.h>
// Provides ISR
#include <avr/interrupt.h>
#endif
#define addacMaxResolution 65535
class ADDAC_Quad{
public:
ADDAC_Quad();
//void setup();
void calc(bool _MODE, bool _WRAPmode, float _r, float _theta, float _free1, float _free2, float _free3);
bool WRAPmode, MODE;
float r;
float theta, oldTheta, thetaA;
bool thetaUP;
float x1;
float y1;
float x2;
float y2;
float x3;
float y3;
float x4;
float y4;
float amp1;
float amp2;
float amp3;
float amp4;
float dMax;
float dMaxPower;
float x, y;
float rSpeaker;
float filterFreq;
float filterFreqPower;
float xAbs, yAbs;
float oldAngle, diff;
};
#endif