-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProjectSettings.h
More file actions
80 lines (64 loc) · 3.38 KB
/
ProjectSettings.h
File metadata and controls
80 lines (64 loc) · 3.38 KB
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
71
72
73
74
75
76
77
78
79
80
#pragma once
//Contains all the settings used throughout the project
namespace constants {
//Plugin name
const std::string PLUGIN_NAME = "Fuzzed";
/* PI */
const double PI = 3.14159265358979323846; //- extra digits of precision
//Define the default sample rates as 44.1kHz
const int DEFAULT_SR = 44100;
//Declare enum types for the different knob styles
enum KnobType { PARAM_KNOB, GAIN_KNOB, METER };
//Controls the min and max param values
const double CTRL_INCREMENT = 0.001; //The increment of the control knobs
const double CTRL_MIN = 0.0; //The minimum ctrl parameter value
const double CTRL_MAX = 1; //The maximum ctrl parameter
const double SLIDER_SENS = 500; //Controls the sensitivty of the sliders, Higher number = lower sensitivity
//Constrols the min and max input gain vals
const double GAIN_INCREMENT = 0.001;
const double GAIN_MIN = -6; //in db
const double GAIN_MAX = 6; //in db
//Input Signal/ Clipping control
const double INPUT_SCALAR = 3; //scales the input signal to the processSample method by a factor of MAX_INPUT_SIG * (2^-INPUT_SCALAR)
const double MAX_INPUT_SIG = 0.1; //The maximum value that can be put into the system and maintain stability,
const double CLIPPING_POINT = 0.1; //if the input signal excedes this then clip to ensure system cannot crash
const double OUTPUT_SCALAR = 2; //Scale the output of the system back up to useable levels
const int STARTUP = 9500; //Number of samples used for the ramped output volume when the plugin is first instantiated. (This will ramp input from 1/9500 -> 1/1 * output)
//timer freq for the UI updater in hz
const int UI_TIMER_FREQ = 100;
//timer freq for the param updater in hz
const int P_TIMER_FREQ = 100;
//the time in s between parameter updates
const double SMOOTHING_TIME_S = 0.05;
//controls the number of samples between parameter updates
const int UPDATE_PARAM_MAJOR = 32;
//controls the cutoff of param changes
const int PARAM_CUTOFF = 4;
//controls the cutoff of the zipper matrix smoothing
const int ZIP_SMOOTH = 100;
//controls the update speed of the VU meter, smaller is faster
const double METER_UPDATE_RATE = 0.15;
const double METER_MAX = 12.0; //db max value for meter
const double METER_MIN = -48.0; //dB min value for meter
//Defaults for the parameters
const double GAIN_DEFAULT = 0;
const double FUZZ_DEFAULT = 0.1;
const double VOL_DEFAULT = 0.4;
//Window size of plugin
const int WIN_WIDTH = 600;
const int WIN_HEIGHT = 280;
const int PARAM_KNOB_SIZE = 90;
const int GAIN_KNOB_SIZE = 120;
const int METER_LIGHT_SIZE = 40;
const int TEXT_BOX_WIDTH = 65;
const int TEXT_BOX_HEIGHT = 16;
const float FONT_SIZE = 16.0f;
//Defaults for the Simulation cpp
const double DEFAULT_VCC = 8.1; // default value for the voltage power supply, 90% of 9v = 8.1v for more realism
const float ZERO_INPUT = 0.; // zero input used for getting the system to steady state
const double DURFADE = 0.1; //duration of the faded power supply used for steady state
const double STEADY_STATE_FACTOR = 4.5; //Factor which controls the size of the window window used to reach steady state (where window size in samples = hanWin*steadyStateFactor)
const int MAX_ITERATIONS = 90; //Maximum number of iterations for the newton raphson solver
const int MAX_SUB_ITERATIONS = 10; //maximum number of subiterations for the damped newton raphson solver
const double TOL = 1e-7; //error tolerance of the system
}