Jamoma API  0.6.0.a19
j.vimic~.h
1 //j.vimic.h
2 #ifndef _JCOM_VIMIC_H_
3 #define _JCOM_VIMIC_H_
4 
5 #include "Properties.h"
6 #include <ext.h>
7 #include <z_dsp.h>
8 
9 #define _USE_MATH_DEFINES
10 #include <math.h>
11 #include <stdlib.h>
12 #include <stdio.h>
13 #include <string.h>
14 #include "TTDSP.h" // TTBlue Interfaces...
15 
16 #define t_floatarg double
17 
18 #define streq(a,b) (strcmp(a,b)==0)
19 
20 class Mirror;
21 class Mic;
22 class Room;
23 class CrossFadeQueue;
24 
25 
26 typedef struct _vimic {
27  t_pxobject x_obj;
28  //TTAudioSignalPtr audioIn;
29  //TTAudioSignalPtr audioOut;
30  double x_sr;
31  int grainCounter;
32  int numOfChannels;
33  double reflGains[Properties::REFLECTIONORDER];
34  bool reflGainFlag;
35  int numOfSources;
36  int maxReflOrder;
37  int distModel;
38  int maxDynRefl;
39  int numRefl;
40  int reflOrder;
41  int blocksize;
42  int renderInterval;
43  double grainsize;
44  double micPolarity;
45  CrossFadeQueue *fades;
46  int c_phase;
47  enum Properties::AudioProcess AudioProcType;
48  double temperature;
49  double speedOfSound;
50  double invSpeedOfSound;
51  int bufSz;
52  double *delay;
53  double *c_vec;
54  bool normalizeSensiFlag;
55  bool minimumDelayFlag;
56  bool minSensiFlag;
57  double minSensi;
58  double *sensitivity;
59  double *currentSensitivity;
60  double *currentDelay;
61  double *delGrain;
62  double *sensiGrain;
63  int reportFlag;
64  int directBang;
65  Room *room;
66 } t_vimic;
67 
68 //static void *vimic_class = NULL; // TM: added static keyword to get it to link,
69 static t_class *vimic_class; // changed [NP]
70 
71 //int main(); // declaring this proto causes linker errors with MSVC [TAP]
72 void* vimic_new(t_symbol *s, int argc, t_atom *argv);
73 void vimic_free(t_vimic *x);
74 void vimic_dsp(t_vimic *x, t_signal **p, short *count);
75 void vimic_dsp64(t_vimic *x, t_object *dsp64, short *count, double samplerate, long maxvectorsize, long flags); // DSP64 Method
76 void vimic_bang(t_vimic *x);
77 void vimic_sourcePosAbs(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
78 void vimic_sourcePos(t_vimic *x,t_symbol *s, short argc, t_atom *argv);
79 void vimic_reflGain(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
80 void vimic_micPos(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
81 void vimic_roomSize(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
82 void vimic_disPow(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
83 void vimic_dirPow(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
84 void vimic_dbUnit(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
85 void vimic_micAngle(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
86 void vimic_micDirectivity(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
87 void vimic_micGain(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
88 void vimic_temperature(t_vimic *x, double n);
89 void vimic_minSensi(t_vimic *x, double n);
90 void vimic_directBang(t_vimic *x, long n);
91 void vimic_micPolarity(t_vimic *x, long n);
92 void vimic_distModel(t_vimic *x, long n);
93 void vimic_renderType(t_vimic *x, long n);
94 void vimic_report(t_vimic *x, long n);
95 void vimic_sourceYaw(t_vimic *x, long n);
96 void vimic_sourceDirectivityFlag(t_vimic *x, long n);
97 void vimic_normalizeSensiFlag(t_vimic *x, long n);
98 void vimic_minimumDelayFlag(t_vimic *x, long n);
99 void vimic_minSensiFlag(t_vimic *x, long n);
100 void vimic_airfilter(t_vimic *x, long n);
101 void vimic_xFadeLength(t_vimic *x, long n);
102 void vimic_xFadeFunction(t_vimic *x, long n);
103 void vimic_xFadeThreshold(t_vimic *x, long n);
104 void vimic_renderintervall(t_vimic *x, long n);
105 void vimic_getDirTable(t_vimic *x, t_symbol *s);
106 void vimic_highCf(t_vimic *x, long n, long freq);
107 void vimic_lowCf(t_vimic *x, long n, long freq);
108 void vimic_lowAbsorption(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
109 void vimic_midAbsorption(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
110 void vimic_highAbsorption(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
111 void vimic_wallFilter(t_vimic *x, t_symbol *s, short argc, t_atom *argv);
112 void vimic_reportAll(t_vimic *x);
113 void vimic_warnings(t_vimic *x, long n);
114 void vimic_assist(t_vimic *x, Object *b, long msg, long arg, char *s);
115 void vimic_anything(t_vimic *x, t_symbol *message, short argc, t_atom *argv);
116 t_int* vimic_perform(t_int *w);
117 
118 
119 #endif // _JCOM_VIMIC_H_
120 // vim:sw=4:et:cindent:
Jamoma DSP Library.
CrossFadeQueue class.
Microphone class.
Definition: Mic.h:22
Sound mirror class.
Definition: Mirror.h:19
Room class.
Definition: Room.h:25