SynthLab SDK
synthconstants.h
1 #ifndef __synthConstants_h__
2 #define __synthConstants_h__
3 
4 #include <cmath>
5 #include <random>
6 #include <string>
7 #include <sstream>
8 #include <vector>
9 #include <stdint.h>
10 #include <memory>
11 
12 
13 #define _MATH_DEFINES_DEFINED
14 
15 // -----------------------------
16 // --- SynthLab SDK File --- //
17 // ----------------------------
25 // -----------------------------------------------------------------------------
26 namespace SynthLab
27 {
29 
35  const uint32_t MAX_VOICES = 16; // --- in Debug mode, you may only get 2 or 3 for extreme-synths; in Release mode you will easily get 32, even up to 64 depending on algorithms
36  const uint32_t MAX_SYNTH_CHANNELS = 32; // --- VST3 allows for 22.1, so 32 should cover us
37  const uint32_t MAX_OSC_CHANNELS = 32; // --- VST3 allows for 22.1, so 32 should cover us
38  const uint32_t MAX_PROCESSOR_CHANNELS = 32; // --- VST3 allows for 22.1, so 32 should cover us
39  const uint32_t MAX_MODULATION_CHANNELS = 48; // --- increase if you want more
41 
43 
47  const bool PITCHLESS_LOOP = true;
48  const bool AUBIO_SLICES = true;
50 
52 
58  const uint32_t NO_CHANNELS = 0;
59  enum { LEFT_CHANNEL, RIGHT_CHANNEL };
60  enum { LEFT, RIGHT, STEREO };
61  enum { MONO_CHANNEL = 0, STEREO_CHANNELS = 2 }; // MONO is same as LEFT_CHANNEL here
62  enum { MONO_TO_MONO, MONO_TO_STEREO, STEREO_TO_STEREO};
64 
65 
67 
71  enum class SynthMode { kMono, kLegato, kUnison, kUnisonLegato, kPoly };
72  enum class FilterMode { kSeries, kParallel };
73  enum class DX100Algo { kFM1, kFM2, kFM3, kFM4, kFM5, kFM6, kFM7, kFM8 };
75 
77 
81  enum class XFadeType { kLinear, kSquareLaw, kConstantPower };
82  enum class LoopDirection { kForward, kBackward, kForwardBackward };
83  enum class StepMode { kNote, kRest, kGate };
84  const uint32_t MAX_SEQ_STEPS = 8; // for this plugin is only 8
85  const uint32_t WRAP_MASK = MAX_SEQ_STEPS - 1;
86  enum { WAVE_LANE, PITCH_LANE, STEP_SEQ_LANE, NUM_MOD_LANES };
88 
89  // --- Voice level constants
91 
95  const uint32_t NUM_OSC = 4;
96  const uint32_t NUM_LFO = 2;
97  const uint32_t NUM_FILTER = 2;
98  const uint32_t NUM_EG = 3;
99  const uint32_t NUM_WS_OSCILLATORS = 4;
100  const double SHUTDOWN_TIME_MSEC = 2.0;
101 
102 
104 
110  const uint32_t UNDEFINED_MODULE = 0;
111  const uint32_t LFO_MODULE = 1;
112  const uint32_t EG_MODULE = 2;
113  const uint32_t DCA_MODULE = 3;
114  const uint32_t FILTER_MODULE = 4;
115  const uint32_t WTO_MODULE = 5;
116  const uint32_t VAO_MODULE = 6;
117  const uint32_t FMO_MODULE = 7;
118  const uint32_t PCMO_MODULE = 8;
119  const uint32_t KSO_MODULE = 9;
120  const uint32_t OSC_MODULE = 10;
122 
124 
128  const uint32_t MODULE_STRINGS = 16;
129  const uint32_t WTBANK_SOURCES = MODULE_STRINGS;
131  const uint32_t MOD_KNOBS = 4;
132  const uint32_t NUM_MODULE_CORES = 4;
133  const uint32_t DEFAULT_CORE = 0;
134  const uint32_t CUSTOM_CORE_0 = 1;
135  const uint32_t CUSTOM_CORE_1 = 2;
136  const uint32_t CUSTOM_CORE_2 = 3;
138 
140 
147  // --- update codes for droplist menus
148  // --- zero is reserved and not used!!!
149  const uint32_t LFO1_WAVEFORMS = 0x1; // b1
150  const uint32_t LFO2_WAVEFORMS = 0x2; // b2
151  const uint32_t OSC1_WAVEFORMS = 0x4; // b3
152  const uint32_t OSC2_WAVEFORMS = 0x8; // b4
153  const uint32_t OSC3_WAVEFORMS = 0x10; // b5
154  const uint32_t OSC4_WAVEFORMS = 0x20; // b6
155  const uint32_t EG1_CONTOUR = 0x40; // b7
156  const uint32_t EG2_CONTOUR = 0x80; // b8
157  const uint32_t EG3_CONTOUR = 0x100; // b9
158  const uint32_t FILTER1_TYPES = 0x200; // b10
159  const uint32_t FILTER2_TYPES = 0x400; // b11
160  const uint32_t LFO1_SOURCE = 0x800; // b12
161  const uint32_t LFO2_SOURCE = 0x1000; // b13
162  const uint32_t OSC1_SOURCE = 0x2000; // b14
163  const uint32_t OSC2_SOURCE = 0x4000; // b15
164  const uint32_t OSC3_SOURCE = 0x8000; // b16
165  const uint32_t OSC4_SOURCE = 0x10000; // b17
166  const uint32_t EG1_SOURCE = 0x20000; // b18
167  const uint32_t EG2_SOURCE = 0x40000; // b19
168  const uint32_t EG3_SOURCE = 0x80000; // b20
169  const uint32_t FILTER1_SOURCE = 0x100000; // b21
170  const uint32_t FILTER2_SOURCE = 0x200000; // b22
171  const uint32_t WAVE_SEQ_WAVES_1 = 0x400000; // b23
172  const uint32_t WAVE_SEQ_WAVES_2 = 0x800000; // b24
173  const uint32_t WAVE_SEQ_WAVES_3 = 0x1000000; // b25
174  const uint32_t WAVE_SEQ_WAVES_4 = 0x2000000; // b26
175  const uint32_t WAVE_SEQ_WAVES_5 = 0x4000000; // b27
176  const uint32_t WAVE_SEQ_WAVES_6 = 0x8000000; // b28
177  const uint32_t WAVE_SEQ_WAVES_7 = 0x10000000; // b29
178  const uint32_t WAVE_SEQ_WAVES_8 = 0x20000000; // b30
179 
180  const std::string empty_string = "-----";
182 
183 
185 
192  // --- mod knobs, other knob controls
193  const uint32_t LFO1_MOD_KNOBS = 0x1; // b1
194  const uint32_t LFO2_MOD_KNOBS = 0x2; // b2
195  const uint32_t OSC1_MOD_KNOBS = 0x4; // b3
196  const uint32_t OSC2_MOD_KNOBS = 0x8; // b4
197  const uint32_t OSC3_MOD_KNOBS = 0x10; // b5
198  const uint32_t OSC4_MOD_KNOBS = 0x20; // b6
199  const uint32_t EG1_MOD_KNOBS = 0x40; // b7
200  const uint32_t EG2_MOD_KNOBS = 0x80; // b8
201  const uint32_t EG3_MOD_KNOBS = 0x100; // b9
202  const uint32_t FILTER1_MOD_KNOBS = 0x200; // b10
203  const uint32_t FILTER2_MOD_KNOBS = 0x400; // b11
204  enum { MOD_KNOB_A, MOD_KNOB_B, MOD_KNOB_C, MOD_KNOB_D };
206 
208 
212  static double sin_1024[1024] = { 0.00000000000000000000000000000000, 0.00613588464915447526909497710790, 0.01227153828571992538742918554817, 0.01840672990580482018541097488651, 0.02454122852291228812360301958506, 0.03067480317663662595095708240933, 0.03680722294135883171373180289265, 0.04293825693494082024193048141569, 0.04906767432741801493456534899451, 0.05519524434968993420458360787961, 0.06132073630220857829442593356362, 0.06744391956366405094236426975840, 0.07356456359966742630795977220259, 0.07968243797143012563388708713319, 0.08579731234443989384974571521525, 0.09190895649713272386183149365024, 0.09801714032956060362877792613290, 0.10412163387205458642270627933613, 0.11022220729388305937579417559391, 0.11631863091190475234526502390509, 0.12241067519921619566325432515441, 0.12849811079379316880455519367388, 0.13458070850712616772781871077314, 0.14065823933284921087860652733070, 0.14673047445536174793190298260015, 0.15279718525844343535169400638551, 0.15885814333386144570070541703899, 0.16491312048996989436666638084716, 0.17096188876030121717164433903235, 0.17700422041214874946390978038835, 0.18303988795514095078154070961318, 0.18906866414980619262031780181132, 0.19509032201612824808378832130984, 0.20110463484209190054841087658133, 0.20711137619221856032147854875802, 0.21311031991609136193588369678764, 0.21910124015686979759287567048887, 0.22508391135979283204093803760770, 0.23105810828067110951344886871084, 0.23702360599436719801325068601727, 0.24298017990326387094413007616822, 0.24892760574572014853345081064617, 0.25486565960451457169000377689372, 0.26079411791527551400804441072978, 0.26671275747489836538406393628975, 0.27262135544994897662363086965343, 0.27851968938505305972697101424274, 0.28440753721127187692019333553617, 0.29028467725446233105301985233382, 0.29615088824362378883137125740177, 0.30200594931922808417112946699490, 0.30784964004153486660797511831333, 0.31368174039889151760718277728301, 0.31950203081601569188308076263638, 0.32531029216226292621882976163761, 0.33110630575987642920665621204535, 0.33688985339222005110926261295390, 0.34266071731199437833126353325497, 0.34841868024943456472186653627432, 0.35416352542049034379800787064596, 0.35989503653498811086564046490821, 0.36561299780477385379384713814943, 0.37131719395183754306444257053954, 0.37700741021641825945209802739555, 0.38268343236508978177923268049199, 0.38834504669882624616761290781142, 0.39399204006104809883126449676638, 0.39962419984564678809846327567357, 0.40524131400498986099734111121506, 0.41084317105790391089215063402662, 0.41642956009763715252702809266339, 0.42200027079979968158696124191920, 0.42755509343028208490977704059333, 0.43309381885315195725993930864206, 0.43861623853852765853034156862122, 0.44412214457042920034979260890395, 0.44961132965460653965195092496288, 0.45508358712634383591577602601319, 0.46053871095824000514440399456362, 0.46597649576796618120511084271129, 0.47139673682599764203970948983624, 0.47679923006332208812452222446154, 0.48218377207912271886769417506002, 0.48755016014843599592154532729182, 0.49289819222978403789880985641503, 0.49822766697278186853736769990064, 0.50353838372571757542317527622799, 0.50883014254310698909478105633752, 0.51410274419322166128409890006878, 0.51935599016558964269307807626319, 0.52458968267846894928396750401589, 0.52980362468629460526159391520196, 0.53499761988709715332390715047950, 0.54017147272989285422539751380100, 0.54532498842204646383180488555809, 0.55045797293660481130928019410931, 0.55557023301960217764872140833177, 0.56066157619733603123535203849315, 0.56573181078361312046354214544408, 0.57078074588696725566450140831876, 0.57580819141784533865546791275847, 0.58081395809576452649025668506511, 0.58579785745643886407663103454979, 0.59075970185887416441516961640446, 0.59569930449243335690567846540944, 0.60061647938386897305207412500749, 0.60551104140432554512329943463556, 0.61038280627630947527961779996986, 0.61523159058062681925349579614704, 0.62005721176328909560737656647689, 0.62485948814238634341222677903716, 0.62963823891492698425764729108778, 0.63439328416364548779426968394546, 0.63912444486377573138469188052113, 0.64383154288979138613058239570819, 0.64851440102211244109753351949621, 0.65317284295377675551463880765368, 0.65780669329707863735023920526146, 0.66241577759017178372857870272128, 0.66699992230363747136578922436456, 0.67155895484701833009211213720846, 0.67609270357531592310351697960868, 0.68060099779545302212113710993435, 0.68508366777270035541391735023353, 0.68954054473706682948375146224862, 0.69397146088965400156922669339110, 0.69837624940897291558883352990961, 0.70275474445722529992508498253301, 0.70710678118654746171500846685376, 0.71143219574521643355780042838887, 0.71573082528381859468424863734981, 0.72000250796138165476634185324656, 0.72424708295146689174259790888755, 0.72846439044822519637278901427635, 0.73265427167241281569687316732598, 0.73681656887736979300029815931339, 0.74095112535495910588423384979251, 0.74505778544146594732922039838741, 0.74913639452345925917597924126312, 0.75318679904361240939891786183580, 0.75720884650648445646226036842563, 0.76120238548426177871419895382132, 0.76516726562245895859604161159950, 0.76910333764557958780017088429304, 0.77301045336273699337681364340824, 0.77688846567323244229896772594657, 0.78073722857209437719916422793176, 0.78455659715557524158668911695713, 0.78834642762660622761217155129998, 0.79210657730021238887019308094750, 0.79583690460888345530321430487675, 0.79953726910790501314352241024608, 0.80320753148064483184498385526240, 0.80684755354379922298591054641292, 0.81045719825259476820633608440403, 0.81403632970594830275956610421417, 0.81758481315158371138807069655741, 0.82110251499110464834529921063222, 0.82458930278502529098716422595317, 0.82804504525775579626412081779563, 0.83146961230254523567140267914510, 0.83486287498638001025597077386919, 0.83822470555483796772477944614366, 0.84155497743689833267666244864813, 0.84485356524970700586862903946894, 0.84812034480329712149426768519334, 0.85135519310526519554116475774208, 0.85455798836540053375898651211173, 0.85772861000027211808571792062139, 0.86086693863776730939463277536561, 0.86397285612158669643179109698394, 0.86704624551569264845340967440279, 0.87008699110871134951850081051816, 0.87309497841829009079361867406988, 0.87607009419540660122294184475322, 0.87901222642863341416585853949073, 0.88192126434835493853370280703530, 0.88479709843093778953715400348301, 0.88763962040285393495508969863295, 0.89044872324475787817021910086623, 0.89322430119551532445854036268429, 0.89596624975618510688946116715670, 0.89867446569395381672507028270047, 0.90134884704602202809553546103416, 0.90398929312344333819595476597897, 0.90659570451491533482624163298169, 0.90916798309052226922943873432814, 0.91170603200542987831767050010967, 0.91420975570353069095119735720800, 0.91667905992104270485043571170536, 0.91911385169005777040496241170331, 0.92151403934204190182555294086342, 0.92387953251128673848313610506011, 0.92621024213831126825624551202054, 0.92850608047321547822150478168624, 0.93076696107898371224109723698348, 0.93299279883473884567024470015895, 0.93518350993894749922930031971191, 0.93733901191257495977282587773516, 0.93945922360218991897795604018029, 0.94154406518302080630888895029784, 0.94359345816196038558842928978265, 0.94560732538052127971184290800011, 0.94758559101774109123539346910547, 0.94952818059303667475035126699368, 0.95143502096900833819859144568909, 0.95330604035419375108517670014407, 0.95514116830577067140950475732097, 0.95694033573220893540423048762023, 0.95870347489587159905966018413892, 0.96043051941556578654513032233808, 0.96212140426904158019283386238385, 0.96377606579543984022251379428781, 0.96539444169768939829623377590906, 0.96697647104485207059099138859892, 0.96852209427441726674601341073867, 0.97003125319454397423868385885726, 0.97150389098625178352364173406386, 0.97293995220556006575662877366995, 0.97433938278557585821459952057921, 0.97570213003852857003295184767921, 0.97702814265775439483974196264171, 0.97831737071962765472932233024039, 0.97956976568544051886533452488948, 0.98078528040323043057924223830923, 0.98196386910955524296440444231848, 0.98310548743121628501029363178532, 0.98421009238692902520995176018914, 0.98527764238894122161838140527834, 0.98630809724459866938417462733923, 0.98730141815785843473207705756067, 0.98825756773074946437418475397862, 0.98917650996478101443898367506335, 0.99005821026229712256139237069874, 0.99090263542778000971367191596073, 0.99170975366909952519733906228794, 0.99247953459870996706371215623221, 0.99321194923479450000769475082052, 0.99390697000235606051177228437155, 0.99456457073425541537403660186101, 0.99518472667219681770944816889823, 0.99576741446765981713440396561055, 0.99631261218277800129072829804500, 0.99682029929116566790980868972838, 0.99729045667869020697082760307239, 0.99772306664419163624302200332750, 0.99811811290014917918966830256977, 0.99847558057329477421149022120517, 0.99879545620517240500646494183457, 0.99907772775264536146977434327709, 0.99932238458834954375475945198559, 0.99952941750109314256178549840115, 0.99969881869620424996725205346593, 0.99983058179582340319058175737155, 0.99992470183914450299056397852837, 0.99998117528260110908888691483298, 1.00000000000000000000000000000000, 0.99998117528260110908888691483298, 0.99992470183914450299056397852837, 0.99983058179582340319058175737155, 0.99969881869620424996725205346593, 0.99952941750109314256178549840115, 0.99932238458834954375475945198559, 0.99907772775264536146977434327709, 0.99879545620517240500646494183457, 0.99847558057329477421149022120517, 0.99811811290014917918966830256977, 0.99772306664419163624302200332750, 0.99729045667869020697082760307239, 0.99682029929116577893211115224403, 0.99631261218277800129072829804500, 0.99576741446765981713440396561055, 0.99518472667219692873175063141389, 0.99456457073425541537403660186101, 0.99390697000235606051177228437155, 0.99321194923479450000769475082052, 0.99247953459870996706371215623221, 0.99170975366909952519733906228794, 0.99090263542778000971367191596073, 0.99005821026229712256139237069874, 0.98917650996478101443898367506335, 0.98825756773074946437418475397862, 0.98730141815785843473207705756067, 0.98630809724459866938417462733923, 0.98527764238894122161838140527834, 0.98421009238692902520995176018914, 0.98310548743121628501029363178532, 0.98196386910955524296440444231848, 0.98078528040323043057924223830923, 0.97956976568544051886533452488948, 0.97831737071962765472932233024039, 0.97702814265775439483974196264171, 0.97570213003852857003295184767921, 0.97433938278557585821459952057921, 0.97293995220556017677893123618560, 0.97150389098625178352364173406386, 0.97003125319454397423868385885726, 0.96852209427441737776831587325432, 0.96697647104485207059099138859892, 0.96539444169768939829623377590906, 0.96377606579543984022251379428781, 0.96212140426904158019283386238385, 0.96043051941556589756743278485374, 0.95870347489587159905966018413892, 0.95694033573220893540423048762023, 0.95514116830577067140950475732097, 0.95330604035419386210747916265973, 0.95143502096900833819859144568909, 0.94952818059303667475035126699368, 0.94758559101774120225769593162113, 0.94560732538052139073414537051576, 0.94359345816196038558842928978265, 0.94154406518302080630888895029784, 0.93945922360218991897795604018029, 0.93733901191257495977282587773516, 0.93518350993894761025160278222756, 0.93299279883473884567024470015895, 0.93076696107898371224109723698348, 0.92850608047321558924380724420189, 0.92621024213831137927854797453620, 0.92387953251128673848313610506011, 0.92151403934204201284785540337907, 0.91911385169005777040496241170331, 0.91667905992104270485043571170536, 0.91420975570353069095119735720800, 0.91170603200542987831767050010967, 0.90916798309052249127404365935945, 0.90659570451491533482624163298169, 0.90398929312344344921825722849462, 0.90134884704602202809553546103416, 0.89867446569395392774737274521613, 0.89596624975618521791176362967235, 0.89322430119551521343623790016863, 0.89044872324475798919252156338189, 0.88763962040285393495508969863295, 0.88479709843093790055945646599866, 0.88192126434835504955600526955095, 0.87901222642863352518816100200638, 0.87607009419540660122294184475322, 0.87309497841829020181592113658553, 0.87008699110871146054080327303382, 0.86704624551569275947571213691845, 0.86397285612158680745409355949960, 0.86086693863776719837233031284995, 0.85772861000027211808571792062139, 0.85455798836540053375898651211173, 0.85135519310526519554116475774208, 0.84812034480329723251657014770899, 0.84485356524970722791323396450025, 0.84155497743689844369896491116378, 0.83822470555483818976938437117497, 0.83486287498638012127827323638485, 0.83146961230254545771600760417641, 0.82804504525775579626412081779563, 0.82458930278502517996486176343751, 0.82110251499110475936760167314787, 0.81758481315158371138807069655741, 0.81403632970594852480417102924548, 0.81045719825259476820633608440403, 0.80684755354379944503051547144423, 0.80320753148064494286728631777805, 0.79953726910790523518812733527739, 0.79583690460888356632551676739240, 0.79210657730021227784789061843185, 0.78834642762660633863447401381563, 0.78455659715557513056438665444148, 0.78073722857209459924376915296307, 0.77688846567323244229896772594657, 0.77301045336273710439911610592389, 0.76910333764557958780017088429304, 0.76516726562245906961834407411516, 0.76120238548426188973650141633698, 0.75720884650648467850686529345694, 0.75318679904361252042122032435145, 0.74913639452345925917597924126312, 0.74505778544146605835152286090306, 0.74095112535495899486193138727685, 0.73681656887737001504490308434470, 0.73265427167241281569687316732598, 0.72846439044822530739509147679200, 0.72424708295146689174259790888755, 0.72000250796138176578864431576221, 0.71573082528381870570655109986546, 0.71143219574521665560240535342018, 0.70710678118654757273731092936941, 0.70275474445722518890278252001735, 0.69837624940897291558883352990961, 0.69397146088965400156922669339110, 0.68954054473706705152835638727993, 0.68508366777270035541391735023353, 0.68060099779545324416574203496566, 0.67609270357531592310351697960868, 0.67155895484701855213671706223977, 0.66699992230363758238809168688022, 0.66241577759017200577318362775259, 0.65780669329707874837254166777711, 0.65317284295377664449233634513803, 0.64851440102211255211983598201186, 0.64383154288979138613058239570819, 0.63912444486377584240699434303679, 0.63439328416364548779426968394546, 0.62963823891492720630225221611909, 0.62485948814238634341222677903716, 0.62005721176328942867428395402385, 0.61523159058062693027579825866269, 0.61038280627630969732422272500116, 0.60551104140432565614560189715121, 0.60061647938386886202977166249184, 0.59569930449243346792798092792509, 0.59075970185887416441516961640446, 0.58579785745643897509893349706545, 0.58081395809576452649025668506511, 0.57580819141784544967777037527412, 0.57078074588696725566450140831876, 0.56573181078361345353044953299104, 0.56066157619733614225765450100880, 0.55557023301960217764872140833177, 0.55045797293660492233158265662496, 0.54532498842204635280950242304243, 0.54017147272989296524769997631665, 0.53499761988709715332390715047950, 0.52980362468629482730619884023326, 0.52458968267846894928396750401589, 0.51935599016558975371538053877885, 0.51410274419322177230640136258444, 0.50883014254310732216168844388449, 0.50353838372571768644547773874365, 0.49822766697278175751506523738499, 0.49289819222978414892111231893068, 0.48755016014843588489924286477617, 0.48218377207912288540114786883350, 0.47679923006332208812452222446154, 0.47139673682599786408431441486755, 0.46597649576796618120511084271129, 0.46053871095824022718900891959493, 0.45508358712634389142692725727102, 0.44961132965460687271885831250984, 0.44412214457042931137209507141961, 0.43861623853852754750803910610557, 0.43309381885315206828224177115771, 0.42755509343028202939862580933550, 0.42200027079979984812041493569268, 0.41642956009763715252702809266339, 0.41084317105790413293675555905793, 0.40524131400498991650849234247289, 0.39962419984564706565421943196270, 0.39399204006104815434241572802421, 0.38834504669882657923452029535838, 0.38268343236508989280153514300764, 0.37700741021641814842979556487990, 0.37131719395183770959789626431302, 0.36561299780477379828269590689160, 0.35989503653498833291024538993952, 0.35416352542049039930915910190379, 0.34841868024943478676647146130563, 0.34266071731199443384241476451280, 0.33688985339222032866501876924303, 0.33110630575987648471780744330317, 0.32531029216226325928573714918457, 0.31950203081601580290538322515204, 0.31368174039889140658488031476736, 0.30784964004153503314142881208682, 0.30200594931922802865997823573707, 0.29615088824362401087597618243308, 0.29028467725446238656417108359165, 0.28440753721127209896479826056748, 0.27851968938505317074927347675839, 0.27262135544994925417938702594256, 0.26671275747489847640636639880540, 0.26079411791527584707495179827674, 0.25486565960451468271230623940937, 0.24892760574572009302229957938835, 0.24298017990326406523315938557062, 0.23702360599436717025767507038836, 0.23105810828067133155805379374215, 0.22508391135979283204093803760770, 0.21910124015687004739305621114909, 0.21311031991609141744703492804547, 0.20711137619221883787723470504716, 0.20110463484209201157071333909698, 0.19509032201612860890627132448572, 0.18906866414980635915377149558481, 0.18303988795514089527038947835536, 0.17700422041214894375293908979074, 0.17096188876030121717164433903235, 0.16491312048997014416684692150739, 0.15885814333386147345628103266790, 0.15279718525844368515187454704574, 0.14673047445536180344305421385798, 0.14065823933284954394551391487767, 0.13458070850712627875012117328879, 0.12849811079379308553782834678714, 0.12241067519921634831892021111344, 0.11631863091190471071190160046172, 0.11022220729388323978703567718185, 0.10412163387205457254491847152167, 0.09801714032956082567338285116421, 0.09190895649713275161740710927916, 0.08579731234444015752771406368993, 0.07968243797143019502282612620547, 0.07356456359966773161929154412064, 0.06744391956366417584245454008851, 0.06132073630220848808880518276965, 0.05519524434969009379914339774587, 0.04906767432741796636230802164391, 0.04293825693494102146985369472532, 0.03680722294135883171373180289265, 0.03067480317663686534279676720871, 0.02454122852291232628751949107482, 0.01840672990580510121061408312926, 0.01227153828572000691943255645810, 0.00613588464915479879502324678242, 0.00000000000000012246467991473532, -0.00613588464915455419901313405262, -0.01227153828571976232342244372830, -0.01840672990580485834932744637626, -0.02454122852291207995678590236821, -0.03067480317663661901206317850210, -0.03680722294135858191355126223243, -0.04293825693494077860856705797232, -0.04906767432741772350102138489092, -0.05519524434968985093785676099287, -0.06132073630220824522751854601665, -0.06744391956366392604227399942829, -0.07356456359966749569689881127488, -0.07968243797142994522264558554525, -0.08579731234443992160532133084416, -0.09190895649713251569501437643339, -0.09801714032956058975099011831844, -0.10412163387205432274473793086145, -0.11022220729388300386464294433608, -0.11631863091190447478950886761595, -0.12241067519921609851873967045321, -0.12849811079379283573764780612692, -0.13458070850712605670551624825748, -0.14065823933284929414533337421744, -0.14673047445536158139844928882667, -0.15279718525844343535169400638551, -0.15885814333386122365610049200768, -0.16491312048996989436666638084716, -0.17096188876030096737146379837213, -0.17700422041214869395275854913052, -0.18303988795514064547020893769513, -0.18906866414980610935359095492458, -0.19509032201612835910609078382549, -0.20110463484209176177053279843676, -0.20711137619221858807705416438694, -0.21311031991609119540243000301416, -0.21910124015686979759287567048887, -0.22508391135979260999633311257639, -0.23105810828067108175787325308193, -0.23702360599436694821307014535705, -0.24298017990326381543297884491039, -0.24892760574571987097769465435704, -0.25486565960451446066770131437806, -0.26079411791527562503034687324543, -0.26671275747489825436176147377410, -0.27262135544994903213478210091125, -0.27851968938505289319351732046925, -0.28440753721127182140904210427834, -0.29028467725446210900841492730251, -0.29615088824362378883137125740177, -0.30200594931922780661537331070576, -0.30784964004153481109682388705551, -0.31368174039889118454027538973605, -0.31950203081601558086077830012073, -0.32531029216226298172998099289543, -0.33110630575987626267320251827186, -0.33688985339222010662041384421173, -0.34266071731199421179780983948149, -0.34841868024943456472186653627432, -0.35416352542049012175340294561465, -0.35989503653498811086564046490821, -0.36561299780477357623809098186030, -0.37131719395183743204214010802389, -0.37700741021641792638519063984859, -0.38268343236508967075693021797633, -0.38834504669882635718991537032707, -0.39399204006104793229781080299290, -0.39962419984564684360961450693139, -0.40524131400498969446388741744158, -0.41084317105790391089215063402662, -0.41642956009763693048242316763208, -0.42200027079979962607581001066137, -0.42755509343028180735402088430419, -0.43309381885315184623763684612641, -0.43861623853852732546343418107426, -0.44412214457042908932749014638830, -0.44961132965460665067425338747853, -0.45508358712634366938232233223971, -0.46053871095824006065555522582144, -0.46597649576796595916050591767998, -0.47139673682599764203970948983624, -0.47679923006332186607991729943024, -0.48218377207912266335654294380220, -0.48755016014843566285463793974486, -0.49289819222978392687650739389937, -0.49822766697278153547046031235368, -0.50353838372571746440087281371234, -0.50883014254310710011708351885318, -0.51410274419322155026179643755313, -0.51935599016558964269307807626319, -0.52458968267846872723936257898458, -0.52980362468629460526159391520196, -0.53499761988709693127930222544819, -0.54017147272989285422539751380100, -0.54532498842204613076489749801112, -0.55045797293660470028697773159365, -0.55557023301960195560411648330046, -0.56066157619733592021304957597749, -0.56573181078361323148584460795973, -0.57078074588696714464219894580310, -0.57580819141784533865546791275847, -0.58081395809576430444565176003380, -0.58579785745643886407663103454979, -0.59075970185887394237056469137315, -0.59569930449243324588337600289378, -0.60061647938386863998516673746053, -0.60551104140432543410099697211990, -0.61038280627630947527961779996986, -0.61523159058062670823119333363138, -0.62005721176328920662967902899254, -0.62485948814238623238992431652150, -0.62963823891492698425764729108778, -0.63439328416364526574966475891415, -0.63912444486377573138469188052113, -0.64383154288979127510827993319253, -0.64851440102211233007523105698056, -0.65317284295377653347003388262237, -0.65780669329707852632793674274581, -0.66241577759017178372857870272128, -0.66699992230363736034348676184891, -0.67155895484701844111441459972411, -0.67609270357531581208121451709303, -0.68060099779545302212113710993435, -0.68508366777270013336931242520222, -0.68954054473706682948375146224862, -0.69397146088965377952462176835979, -0.69837624940897280456653106739395, -0.70275474445722507788048005750170, -0.70710678118654746171500846685376, -0.71143219574521643355780042838887, -0.71573082528381848366194617483416, -0.72000250796138165476634185324656, -0.72424708295146678072029544637189, -0.72846439044822519637278901427635, -0.73265427167241259365226824229467, -0.73681656887736979300029815931339, -0.74095112535495888383962892476120, -0.74505778544146583630691793587175, -0.74913639452345903713137431623181, -0.75318679904361240939891786183580, -0.75720884650648423441765544339432, -0.76120238548426200075880387885263, -0.76516726562245895859604161159950, -0.76910333764557947677786842177738, -0.77301045336273666030990625586128, -0.77688846567323255332127018846222, -0.78073722857209437719916422793176, -0.78455659715557501954208419192582, -0.78834642762660589454526416375302, -0.79210657730021238887019308094750, -0.79583690460888345530321430487675, -0.79953726910790479109891748521477, -0.80320753148064505388958878029371, -0.80684755354379922298591054641292, -0.81045719825259465718403362188837, -0.81403632970594808071496117918286, -0.81758481315158382241037315907306, -0.82110251499110464834529921063222, -0.82458930278502506894255930092186, -0.82804504525775546319721343024867, -0.83146961230254523567140267914510, -0.83486287498638001025597077386919, -0.83822470555483785670247698362800, -0.84155497743689855472126737367944, -0.84485356524970700586862903946894, -0.84812034480329712149426768519334, -0.85135519310526486247425737019512, -0.85455798836540064478128897462739, -0.85772861000027200706341545810574, -0.86086693863776708735002785033430, -0.86397285612158647438718617195264, -0.86704624551569264845340967440279, -0.87008699110871134951850081051816, -0.87309497841828986874901374903857, -0.87607009419540671224524430726888, -0.87901222642863341416585853949073, -0.88192126434835493853370280703530, -0.88479709843093756749254907845170, -0.88763962040285404597739216114860, -0.89044872324475787817021910086623, -0.89322430119551521343623790016863, -0.89596624975618488484485624212539, -0.89867446569395381672507028270047, -0.90134884704602191707323299851851, -0.90398929312344311615134984094766, -0.90659570451491544584854409549735, -0.90916798309052238025174119684380, -0.91170603200542976729536803759402, -0.91420975570353046890659243217669, -0.91667905992104270485043571170536, -0.91911385169005765938265994918766, -0.92151403934204179080325047834776, -0.92387953251128651643853118002880, -0.92621024213831137927854797453620, -0.92850608047321547822150478168624, -0.93076696107898360121879477446782, -0.93299279883473895669254716267460, -0.93518350993894761025160278222756, -0.93733901191257484875052341521950, -0.93945922360218969693335111514898, -0.94154406518302080630888895029784, -0.94359345816196027456612682726700, -0.94560732538052116868954044548445, -0.94758559101774120225769593162113, -0.94952818059303667475035126699368, -0.95143502096900833819859144568909, -0.95330604035419375108517670014407, -0.95514116830577078243180721983663, -0.95694033573220882438192802510457, -0.95870347489587148803735772162327, -0.96043051941556567552282785982243, -0.96212140426904158019283386238385, -0.96377606579543984022251379428781, -0.96539444169768928727393131339340, -0.96697647104485218161329385111458, -0.96852209427441726674601341073867, -0.97003125319454397423868385885726, -0.97150389098625167250133927154820, -0.97293995220556017677893123618560, -0.97433938278557585821459952057921, -0.97570213003852845901064938516356, -0.97702814265775428381743950012606, -0.97831737071962765472932233024039, -0.97956976568544051886533452488948, -0.98078528040323031955693977579358, -0.98196386910955535398670690483414, -0.98310548743121628501029363178532, -0.98421009238692902520995176018914, -0.98527764238894111059607894276269, -0.98630809724459866938417462733923, -0.98730141815785832370977459504502, -0.98825756773074946437418475397862, -0.98917650996478090341668121254770, -0.99005821026229712256139237069874, -0.99090263542778000971367191596073, -0.99170975366909952519733906228794, -0.99247953459871007808601461874787, -0.99321194923479450000769475082052, -0.99390697000235606051177228437155, -0.99456457073425541537403660186101, -0.99518472667219692873175063141389, -0.99576741446765981713440396561055, -0.99631261218277800129072829804500, -0.99682029929116566790980868972838, -0.99729045667869020697082760307239, -0.99772306664419163624302200332750, -0.99811811290014917918966830256977, -0.99847558057329477421149022120517, -0.99879545620517240500646494183457, -0.99907772775264536146977434327709, -0.99932238458834943273245698946994, -0.99952941750109314256178549840115, -0.99969881869620424996725205346593, -0.99983058179582340319058175737155, -0.99992470183914450299056397852837, -0.99998117528260110908888691483298, -1.00000000000000000000000000000000, -0.99998117528260110908888691483298, -0.99992470183914450299056397852837, -0.99983058179582340319058175737155, -0.99969881869620424996725205346593, -0.99952941750109314256178549840115, -0.99932238458834954375475945198559, -0.99907772775264536146977434327709, -0.99879545620517240500646494183457, -0.99847558057329477421149022120517, -0.99811811290014917918966830256977, -0.99772306664419163624302200332750, -0.99729045667869020697082760307239, -0.99682029929116566790980868972838, -0.99631261218277800129072829804500, -0.99576741446765981713440396561055, -0.99518472667219692873175063141389, -0.99456457073425541537403660186101, -0.99390697000235606051177228437155, -0.99321194923479461102999721333617, -0.99247953459871007808601461874787, -0.99170975366909952519733906228794, -0.99090263542778000971367191596073, -0.99005821026229712256139237069874, -0.98917650996478090341668121254770, -0.98825756773074946437418475397862, -0.98730141815785843473207705756067, -0.98630809724459878040647708985489, -0.98527764238894122161838140527834, -0.98421009238692913623225422270480, -0.98310548743121639603259609430097, -0.98196386910955535398670690483414, -0.98078528040323043057924223830923, -0.97956976568544062988763698740513, -0.97831737071962776575162479275605, -0.97702814265775428381743950012606, -0.97570213003852857003295184767921, -0.97433938278557596923690198309487, -0.97293995220556028780123369870125, -0.97150389098625178352364173406386, -0.97003125319454397423868385885726, -0.96852209427441737776831587325432, -0.96697647104485229263559631363023, -0.96539444169768939829623377590906, -0.96377606579543995124481625680346, -0.96212140426904169121513632489950, -0.96043051941556578654513032233808, -0.95870347489587159905966018413892, -0.95694033573220893540423048762023, -0.95514116830577089345410968235228, -0.95330604035419386210747916265973, -0.95143502096900844922089390820474, -0.94952818059303678577265372950933, -0.94758559101774131327999839413678, -0.94560732538052127971184290800011, -0.94359345816196038558842928978265, -0.94154406518302091733119141281350, -0.93945922360218980795565357766463, -0.93733901191257495977282587773516, -0.93518350993894772127390524474322, -0.93299279883473906771484962519025, -0.93076696107898371224109723698348, -0.92850608047321558924380724420189, -0.92621024213831149030085043705185, -0.92387953251128662746083364254446, -0.92151403934204190182555294086342, -0.91911385169005788142726487421896, -0.91667905992104281587273817422101, -0.91420975570353057992889489469235, -0.91170603200542987831767050010967, -0.90916798309052249127404365935945, -0.90659570451491555687084655801300, -0.90398929312344333819595476597897, -0.90134884704602213911783792354981, -0.89867446569395403876967520773178, -0.89596624975618499586715870464104, -0.89322430119551532445854036268429, -0.89044872324475798919252156338189, -0.88763962040285415699969462366425, -0.88479709843093767851485154096736, -0.88192126434835504955600526955095, -0.87901222642863363621046346452204, -0.87607009419540693428984923230018, -0.87309497841829009079361867406988, -0.87008699110871146054080327303382, -0.86704624551569287049801459943410, -0.86397285612158658540948863446829, -0.86086693863776730939463277536561, -0.85772861000027222910802038313705, -0.85455798836540075580359143714304, -0.85135519310526508451886229522643, -0.84812034480329734353887261022464, -0.84485356524970722791323396450025, -0.84155497743689877676587229871075, -0.83822470555483796772477944614366, -0.83486287498638012127827323638485, -0.83146961230254545771600760417641, -0.82804504525775568524181835527997, -0.82458930278502529098716422595317, -0.82110251499110487038990413566353, -0.81758481315158404445497808410437, -0.81403632970594830275956610421417, -0.81045719825259487922863854691968, -0.80684755354379944503051547144423, -0.80320753148064527593419370532501, -0.79953726910790501314352241024608, -0.79583690460888367734781922990805, -0.79210657730021261091479800597881, -0.78834642762660611658986908878433, -0.78455659715557524158668911695713, -0.78073722857209459924376915296307, -0.77688846567323277536587511349353, -0.77301045336273688235451118089259, -0.76910333764557969882247334680869, -0.76516726562245918064064653663081, -0.76120238548426222280340880388394, -0.75720884650648456748456283094129, -0.75318679904361263144352278686711, -0.74913639452345959224288662881008, -0.74505778544146583630691793587175, -0.74095112535495910588423384979251, -0.73681656887737012606720554686035, -0.73265427167241314876378055487294, -0.72846439044822508535048655176070, -0.72424708295146700276490037140320, -0.72000250796138187681094677827787, -0.71573082528381903877345848741243, -0.71143219574521643355780042838887, -0.70710678118654768375961339188507, -0.70275474445722563299199237007997, -0.69837624940897269354422860487830, -0.69397146088965400156922669339110, -0.68954054473706716255065884979558, -0.68508366777270079950312720029615, -0.68060099779545302212113710993435, -0.67609270357531603412581944212434, -0.67155895484701866315901952475542, -0.66699992230363802647730153694283, -0.66241577759017178372857870272128, -0.65780669329707885939484413029277, -0.65317284295377708858154619520064, -0.64851440102211233007523105698056, -0.64383154288979149715288485822384, -0.63912444486377595342929680555244, -0.63439328416364593188347953400807, -0.62963823891492698425764729108778, -0.62485948814238645443452924155281, -0.62005721176328953969658641653950, -0.61523159058062737436500810872531, -0.61038280627630947527961779996986, -0.60551104140432565614560189715121, -0.60061647938386930611898151255446, -0.59569930449243324588337600289378, -0.59075970185887427543747207892011, -0.58579785745643908612123595958110, -0.58081395809576497057946653512772, -0.57580819141784522763316545024281, -0.57078074588696736668680387083441, -0.56573181078361356455275199550670, -0.56066157619733658634686435107142, -0.55557023301960217764872140833177, -0.55045797293660503335388511914061, -0.54532498842204679689871227310505, -0.54017147272989274320309505128535, -0.53499761988709726434620961299515, -0.52980362468629493832850130274892, -0.52458968267846939337317735407851, -0.51935599016558953167077561374754, -0.51410274419322188332870382510009, -0.50883014254310743318399090640014, -0.50353838372571813053468758880626, -0.49822766697278186853736769990064, -0.49289819222978425994341478144634, -0.48755016014843638449960394609661, -0.48218377207912260784539171254437, -0.47679923006332219914682468697720, -0.47139673682599791959546564612538, -0.46597649576796668080547192403174, -0.46053871095823994963325276330579, -0.45508358712634400244922971978667, -0.44961132965460698374116077502549, -0.44412214457042981097245615274005, -0.43861623853852765853034156862122, -0.43309381885315217930454423367337, -0.42755509343028252899898689065594, -0.42200027079979957056465877940354, -0.41642956009763726354933055517904, -0.41084317105790424395905802157358, -0.40524131400499041610885342379333, -0.39962419984564678809846327567357, -0.39399204006104826536471819053986, -0.38834504669882669025682275787403, -0.38268343236509039240189622432808, -0.37700741021641825945209802739555, -0.37131719395183782062019872682868, -0.36561299780477435339420821946987, -0.35989503653498799984333800239256, -0.35416352542049051033146156441944, -0.34841868024943489778877392382128, -0.34266071731199493344277584583324, -0.33688985339221999559811138169607, -0.33110630575987659574010990581883, -0.32531029216226337030803961170022, -0.31950203081601546983847583760507, -0.31368174039889151760718277728301, -0.30784964004153514416373127460247, -0.30200594931922858377149054831534, -0.29615088824362373332022002614394, -0.29028467725446249758647354610730, -0.28440753721127220998710072308313, -0.27851968938505367034963455807883, -0.27262135544994897662363086965343, -0.26671275747489858742866886132106, -0.26079411791527595809725426079240, -0.25486565960451440515655008312024, -0.24892760574572020404460204190400, -0.24298017990326417625546184808627, -0.23702360599436772536918738296663, -0.23105810828067099849114640619518, -0.22508391135979297081881611575227, -0.21910124015687015841535867366474, -0.21311031991609197255854724062374, -0.20711137619221853256590293312911, -0.20110463484209212259301580161264, -0.19509032201612871992857378700137, -0.18906866414980602608686410803784, -0.18303988795514100629269194087101, -0.17700422041214905477524155230640, -0.17096188876030177228315665161062, -0.16491312048996981109993953396042, -0.15885814333386158447858349518356, -0.15279718525844379617417700956139, -0.14673047445536238631014214206516, -0.14065823933284921087860652733070, -0.13458070850712641752799925143336, -0.12849811079379364064934065936541, -0.12241067519921602912980063138093, -0.11631863091190483561199187079183, -0.11022220729388336468712594751196, -0.10412163387205512765643078409994, -0.09801714032956050648426327143170, -0.09190895649713287651749737960927, -0.08579731234444028242780433402004, -0.07968243797143075013433843878374, -0.07356456359966741243017196438814, -0.06744391956366428686475700260416, -0.06132073630220905707810530316237, -0.05519524434968977461002381801336, -0.04906767432741809126239829197402, -0.04293825693494113943105006114820, -0.03680722294135939376413801937815, -0.03067480317663654268423023552259, -0.02454122852291244771816280945131, -0.01840672990580522611070435345937, -0.01227153828572057243928572489722, -0.00613588464915447700381845308470 };
213  const uint32_t DEFAULT_LUT_LENGTH = 1024;
214  const uint32_t DEFAULT_LUT_WRAP_MASK = 1023;
215  enum { HANN_LUT, HAMMING_LUT };
217 
219 
223  const double kMinModGain_dB = -60.0;
224  const double kMaxModGain_dB = 0.0;
225  const double kMinAbsoluteGain_dB = -96.0;
226  const double kDCA_Amp_ModRange = 1.0; // --> unipolar, 100%
227  const double kDCA_Pan_ModRange = 1.0; // --> unipolar, 100%
228  const double kOscBipolarModRangeSemitones = 12.0; // --> unipolar, 100%
230 
240  {
241  // --- LFOs here
242  kSourceLFO1_Norm,
243  kSourceLFO1_Inv,
244  kSourceLFO1_QP,
245  kSourceLFO1_MaxDown,
246 
247  kSourceLFO2_Norm,
248  kSourceLFO2_Inv,
249  kSourceLFO2_QP,
250 
251  // --- EGs here
252  kSourceAmpEG_Norm,
253  kSourceAmpEG_Bias,
254 
255  kSourceFilterEG_Norm,
256  kSourceFilterEG_Bias,
257 
258  kSourceAuxEG_Norm,
259  kSourceAuxEG_Bias,
260 
261  // --- oscillators here
262  kSourceOsc1_Norm, // osc 1 output
263 
264  // --- other modulators (e.g. filter output) here
265  kSourceJoystickAC,
266  kSourceJoystickBD,
267 
268  kSourceWSWaveMix_A,
269  kSourceWSWaveMix_B,
270  kSourceWSWaveIndex_A,
271  kSourceWSWaveIndex_B,
272  kSourceWSWaveAmpMod_A,
273  kSourceWSWaveAmpMod_B,
274  kSourceWSPitchMod_A,
275  kSourceWSPitchMod_B,
276  kSourceWStepSeqMod,
277  kSourceWSXfadeDone,
278  kSourceWSStepNumber_A,
279  kSourceWSStepNumber_B,
280 
281  // --- remain last, will always be the size of modulator array
282  kNumberModSources
283  };
284 
294  {
295  // --- oscillator pitch (add more here)
296  kDestOsc1_fo,
297  kDestOsc2_fo,
298  kDestOsc3_fo,
299  kDestOsc4_fo,
300  kDestOsc5_fo,
301  kDestOsc6_fo,
302  kDestOsc7_fo,
303  kDestOsc8_fo,
304 
305  kDestOsc1_Shape,
306  kDestOsc2_Shape,
307  kDestOsc3_Shape,
308  kDestOsc4_Shape,
309 
310  kDestOsc1_Amp,
311  kDestOsc2_Amp,
312  kDestOsc3_Amp,
313  kDestOsc4_Amp,
314 
315  kDestOsc1_Mod,
316  kDestOsc2_Mod,
317  kDestOsc3_Mod,
318  kDestOsc4_Mod,
319  kDestOsc5_Mod,
320  kDestOsc6_Mod,
321  kDestOsc7_Mod,
322  kDestOsc8_Mod,
323 
324  kDestOsc1_Morph,
325  kDestOsc2_Morph,
326  kDestOsc3_Morph,
327  kDestOsc4_Morph,
328  kDestOsc5_Morph,
329  kDestOsc6_Morph,
330  kDestOsc7_Morph,
331  kDestOsc8_Morph,
332 
333  kDestOsc1_WSWaveMix_A,
334  kDestOsc2_WSWaveMix_A,
335  kDestOsc1_WSWaveMix_B,
336  kDestOsc2_WSWaveMix_B,
337 
338  kDestOsc1_WSWaveIndex_A,
339  kDestOsc2_WSWaveIndex_A,
340  kDestOsc1_WSWaveIndex_B,
341  kDestOsc2_WSWaveIndex_B,
342 
343  kDestOsc1_WSWaveAmp_A,
344  kDestOsc2_WSWaveAmp_A,
345  kDestOsc1_WSWaveAmp_B,
346  kDestOsc2_WSWaveAmp_B,
347 
348  kDestOsc1_WSWavePitch_A,
349  kDestOsc2_WSWavePitch_A,
350  kDestOsc1_WSWavePitch_B,
351  kDestOsc2_WSWavePitch_B,
352 
353  kDestOsc1WSXFadeDone,
354  kDestOsc2WSXFadeDone,
355  kDestOsc3WSXFadeDone,
356  kDestOsc4WSXFadeDone,
357  kDestWSWaveStepNumber_A1,
358  kDestWSWaveStepNumber_B1,
359  kDestWSWaveStepNumber_A2,
360  kDestWSWaveStepNumber_B2,
361 
362  // --- EG retrigger
363  kDestAmpEGRetrigger,
364  kDestFilterEGRetrigger,
365  kDestAuxEGRetrigger,
366 
367  // --- LFO
368  kDestLFO1_fo, // lfo FM
369  kDestLFO2_fo, // lfo FM
370 
371  // --- FILTER (add more here)
372  kDestFilter1_fc_EG, // Fc
373  kDestFilter2_fc_EG, // Fc
374  kDestFilter1_fc_Bipolar, // Fc
375  kDestFilter2_fc_Bipolar, // Fc
376 
377  // --- DCA (add more here)
378  kDestDCA_EGMod, // EG Input
379  kDestDCA_AmpMod,// Amp Mod Input
380  kDestDCA_PanMod,// Pan Mod Input
381  kDestDCA_SampleHoldMod, // bipolar clamping mod input // --- ((1))
382  kDestDCA_TriggerMod, // retrigger DCA on -1 -> 1 transition, bipolar, need AR or AHR mode for this to be really cool.
383 
384  // --- remain last, will always be the size of modulator array
385  kNumberModDestinations
386  };
387 
389 
393  enum {
394  kNoMMTransform,
395  kMMTransformBipolar,
396  kMMTransformUnipolar,
397  kNumMMTransforms
398  };
399 
400  enum {
401  kEGMod,
402  kBiasedEGMod,
403  kUnipolarMod,
404  kBipolarMod,
405  kFrequencyMod,
406  kPhaseMod,
407  kAmpMod,
408  kMaxDownAmpMod,
409  kPanMod,
410  kShapeMod,
411  kUniqueMod,
412  kTriggerMod,
413  kWaveMorphMod,
414  kWaveSeqWave_AGainMod,
415  kWaveSeqWave_BGainMod,
416  kWaveSeqWaveIndex_AMod,
417  kWaveSeqWaveIndex_BMod,
418  kWaveSeqPitch_AMod,
419  kWaveSeqPitch_BMod,
420  kWaveSeqAmp_AMod,
421  kWaveSeqAmp_BMod,
422  kWaveSeqStepSeqMod,
423  kWaveSeqXFadeDoneMod,
424  kWaveStepNumber_A,
425  kWaveStepNumber_B,
426 
427  kNumModulators
428  };
430 
431 
450  enum globalMIDI {
451  kCurrentMIDINoteNumber, /* 7 bits 0 ->127 */
452  kCurrentMIDINoteVelocity, /* 7 bits 0 ->127 */
453  kLastMIDINoteNumber, /* 7 bits 0 ->127 */
454  kLastMIDINoteVelocity, /* 7 bits 0 ->127 */
455  kMIDIPitchBendDataLSB, /* 14 bit LSB */
456  kMIDIPitchBendDataMSB, /* 14 bit MSB */
457  kMIDIMasterPBSensCoarse, /* MSB: 7 bits 0 ->127 Semitones */
458  kMIDIMasterPBSensFine, /* LSB: 7 bits 0 ->127 cents */
459  kMIDIMasterTuneCoarseLSB, /* 14 bit LSB */
460  kMIDIMasterTuneCoarseMSB, /* 14 bit MSB */
461  kMIDIMasterTuneFineLSB, /* 14 bit LSB */
462  kMIDIMasterTuneFineMSB, /* 14 bit MSB */
463  kMIDIMasterVolumeLSB, /* 14 bit LSB */
464  kMIDIMasterVolumeMSB, /* 14 bit MSB */
465  kNumMIDIGlobals
466  }; // --- for global MIDI table
467 
468 
476  // --- array locations in mod output
477  enum {
478  kWSWaveMix_A,
479  kWSWaveMix_B,
480  kWSWaveIndex_A,
481  kWSWaveIndex_B,
482  kWSWaveAmpMod_A,
483  kWSWaveAmpMod_B,
484  kWSPitchMod_A,
485  kWSPitchMod_B,
486  kWStepSeqMod,
487  kWSXFadeDone,
488  kWSWaveStepNumber_A,
489  kWSWaveStepNumber_B,
490  kNumWSOutputs
491  };
492 
500  // --- array locations in mod output
501  enum auxMIDI {
502  kBPM,
503  kTSNumerator,
504  kTSDenominator,
505  kAbsBufferTime,
506  kNumMIDIAuxes,
507  };
508 
509 
515  const double kSqrtTwo = pow(2.0, 0.5);
516 
522  const double kPi = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899;
523 
529  const double kTwoPi = 2.0*3.14159265358979323846264338327950288419716939937510582097494459230781640628620899;
530 
532  //const double ENVELOPE_DIGITAL_TC = -4.6051701859880913680359829093687;///< ln(1%)
533  //const double ENVELOPE_ANALOG_TC = -1.0023934309275667804345424248947; ///< ln(36.7%)
534 
535  // --- 1024 point sinusoid table; burned into ROM here: ------------- >>>
536  const uint32_t sineTableLength = 1024;
537  static double sinetable[sineTableLength] = { 0.00000000000000000000000000000000, 0.00613588464915447526909497710790, 0.01227153828571992538742918554817, 0.01840672990580482018541097488651, 0.02454122852291228812360301958506, 0.03067480317663662595095708240933, 0.03680722294135883171373180289265, 0.04293825693494082024193048141569, 0.04906767432741801493456534899451, 0.05519524434968993420458360787961, 0.06132073630220857829442593356362, 0.06744391956366405094236426975840, 0.07356456359966742630795977220259, 0.07968243797143012563388708713319, 0.08579731234443989384974571521525, 0.09190895649713272386183149365024, 0.09801714032956060362877792613290, 0.10412163387205458642270627933613, 0.11022220729388305937579417559391, 0.11631863091190475234526502390509, 0.12241067519921619566325432515441, 0.12849811079379316880455519367388, 0.13458070850712616772781871077314, 0.14065823933284921087860652733070, 0.14673047445536174793190298260015, 0.15279718525844343535169400638551, 0.15885814333386144570070541703899, 0.16491312048996989436666638084716, 0.17096188876030121717164433903235, 0.17700422041214874946390978038835, 0.18303988795514095078154070961318, 0.18906866414980619262031780181132, 0.19509032201612824808378832130984, 0.20110463484209190054841087658133, 0.20711137619221856032147854875802, 0.21311031991609136193588369678764, 0.21910124015686979759287567048887, 0.22508391135979283204093803760770, 0.23105810828067110951344886871084, 0.23702360599436719801325068601727, 0.24298017990326387094413007616822, 0.24892760574572014853345081064617, 0.25486565960451457169000377689372, 0.26079411791527551400804441072978, 0.26671275747489836538406393628975, 0.27262135544994897662363086965343, 0.27851968938505305972697101424274, 0.28440753721127187692019333553617, 0.29028467725446233105301985233382, 0.29615088824362378883137125740177, 0.30200594931922808417112946699490, 0.30784964004153486660797511831333, 0.31368174039889151760718277728301, 0.31950203081601569188308076263638, 0.32531029216226292621882976163761, 0.33110630575987642920665621204535, 0.33688985339222005110926261295390, 0.34266071731199437833126353325497, 0.34841868024943456472186653627432, 0.35416352542049034379800787064596, 0.35989503653498811086564046490821, 0.36561299780477385379384713814943, 0.37131719395183754306444257053954, 0.37700741021641825945209802739555, 0.38268343236508978177923268049199, 0.38834504669882624616761290781142, 0.39399204006104809883126449676638, 0.39962419984564678809846327567357, 0.40524131400498986099734111121506, 0.41084317105790391089215063402662, 0.41642956009763715252702809266339, 0.42200027079979968158696124191920, 0.42755509343028208490977704059333, 0.43309381885315195725993930864206, 0.43861623853852765853034156862122, 0.44412214457042920034979260890395, 0.44961132965460653965195092496288, 0.45508358712634383591577602601319, 0.46053871095824000514440399456362, 0.46597649576796618120511084271129, 0.47139673682599764203970948983624, 0.47679923006332208812452222446154, 0.48218377207912271886769417506002, 0.48755016014843599592154532729182, 0.49289819222978403789880985641503, 0.49822766697278186853736769990064, 0.50353838372571757542317527622799, 0.50883014254310698909478105633752, 0.51410274419322166128409890006878, 0.51935599016558964269307807626319, 0.52458968267846894928396750401589, 0.52980362468629460526159391520196, 0.53499761988709715332390715047950, 0.54017147272989285422539751380100, 0.54532498842204646383180488555809, 0.55045797293660481130928019410931, 0.55557023301960217764872140833177, 0.56066157619733603123535203849315, 0.56573181078361312046354214544408, 0.57078074588696725566450140831876, 0.57580819141784533865546791275847, 0.58081395809576452649025668506511, 0.58579785745643886407663103454979, 0.59075970185887416441516961640446, 0.59569930449243335690567846540944, 0.60061647938386897305207412500749, 0.60551104140432554512329943463556, 0.61038280627630947527961779996986, 0.61523159058062681925349579614704, 0.62005721176328909560737656647689, 0.62485948814238634341222677903716, 0.62963823891492698425764729108778, 0.63439328416364548779426968394546, 0.63912444486377573138469188052113, 0.64383154288979138613058239570819, 0.64851440102211244109753351949621, 0.65317284295377675551463880765368, 0.65780669329707863735023920526146, 0.66241577759017178372857870272128, 0.66699992230363747136578922436456, 0.67155895484701833009211213720846, 0.67609270357531592310351697960868, 0.68060099779545302212113710993435, 0.68508366777270035541391735023353, 0.68954054473706682948375146224862, 0.69397146088965400156922669339110, 0.69837624940897291558883352990961, 0.70275474445722529992508498253301, 0.70710678118654746171500846685376, 0.71143219574521643355780042838887, 0.71573082528381859468424863734981, 0.72000250796138165476634185324656, 0.72424708295146689174259790888755, 0.72846439044822519637278901427635, 0.73265427167241281569687316732598, 0.73681656887736979300029815931339, 0.74095112535495910588423384979251, 0.74505778544146594732922039838741, 0.74913639452345925917597924126312, 0.75318679904361240939891786183580, 0.75720884650648445646226036842563, 0.76120238548426177871419895382132, 0.76516726562245895859604161159950, 0.76910333764557958780017088429304, 0.77301045336273699337681364340824, 0.77688846567323244229896772594657, 0.78073722857209437719916422793176, 0.78455659715557524158668911695713, 0.78834642762660622761217155129998, 0.79210657730021238887019308094750, 0.79583690460888345530321430487675, 0.79953726910790501314352241024608, 0.80320753148064483184498385526240, 0.80684755354379922298591054641292, 0.81045719825259476820633608440403, 0.81403632970594830275956610421417, 0.81758481315158371138807069655741, 0.82110251499110464834529921063222, 0.82458930278502529098716422595317, 0.82804504525775579626412081779563, 0.83146961230254523567140267914510, 0.83486287498638001025597077386919, 0.83822470555483796772477944614366, 0.84155497743689833267666244864813, 0.84485356524970700586862903946894, 0.84812034480329712149426768519334, 0.85135519310526519554116475774208, 0.85455798836540053375898651211173, 0.85772861000027211808571792062139, 0.86086693863776730939463277536561, 0.86397285612158669643179109698394, 0.86704624551569264845340967440279, 0.87008699110871134951850081051816, 0.87309497841829009079361867406988, 0.87607009419540660122294184475322, 0.87901222642863341416585853949073, 0.88192126434835493853370280703530, 0.88479709843093778953715400348301, 0.88763962040285393495508969863295, 0.89044872324475787817021910086623, 0.89322430119551532445854036268429, 0.89596624975618510688946116715670, 0.89867446569395381672507028270047, 0.90134884704602202809553546103416, 0.90398929312344333819595476597897, 0.90659570451491533482624163298169, 0.90916798309052226922943873432814, 0.91170603200542987831767050010967, 0.91420975570353069095119735720800, 0.91667905992104270485043571170536, 0.91911385169005777040496241170331, 0.92151403934204190182555294086342, 0.92387953251128673848313610506011, 0.92621024213831126825624551202054, 0.92850608047321547822150478168624, 0.93076696107898371224109723698348, 0.93299279883473884567024470015895, 0.93518350993894749922930031971191, 0.93733901191257495977282587773516, 0.93945922360218991897795604018029, 0.94154406518302080630888895029784, 0.94359345816196038558842928978265, 0.94560732538052127971184290800011, 0.94758559101774109123539346910547, 0.94952818059303667475035126699368, 0.95143502096900833819859144568909, 0.95330604035419375108517670014407, 0.95514116830577067140950475732097, 0.95694033573220893540423048762023, 0.95870347489587159905966018413892, 0.96043051941556578654513032233808, 0.96212140426904158019283386238385, 0.96377606579543984022251379428781, 0.96539444169768939829623377590906, 0.96697647104485207059099138859892, 0.96852209427441726674601341073867, 0.97003125319454397423868385885726, 0.97150389098625178352364173406386, 0.97293995220556006575662877366995, 0.97433938278557585821459952057921, 0.97570213003852857003295184767921, 0.97702814265775439483974196264171, 0.97831737071962765472932233024039, 0.97956976568544051886533452488948, 0.98078528040323043057924223830923, 0.98196386910955524296440444231848, 0.98310548743121628501029363178532, 0.98421009238692902520995176018914, 0.98527764238894122161838140527834, 0.98630809724459866938417462733923, 0.98730141815785843473207705756067, 0.98825756773074946437418475397862, 0.98917650996478101443898367506335, 0.99005821026229712256139237069874, 0.99090263542778000971367191596073, 0.99170975366909952519733906228794, 0.99247953459870996706371215623221, 0.99321194923479450000769475082052, 0.99390697000235606051177228437155, 0.99456457073425541537403660186101, 0.99518472667219681770944816889823, 0.99576741446765981713440396561055, 0.99631261218277800129072829804500, 0.99682029929116566790980868972838, 0.99729045667869020697082760307239, 0.99772306664419163624302200332750, 0.99811811290014917918966830256977, 0.99847558057329477421149022120517, 0.99879545620517240500646494183457, 0.99907772775264536146977434327709, 0.99932238458834954375475945198559, 0.99952941750109314256178549840115, 0.99969881869620424996725205346593, 0.99983058179582340319058175737155, 0.99992470183914450299056397852837, 0.99998117528260110908888691483298, 1.00000000000000000000000000000000, 0.99998117528260110908888691483298, 0.99992470183914450299056397852837, 0.99983058179582340319058175737155, 0.99969881869620424996725205346593, 0.99952941750109314256178549840115, 0.99932238458834954375475945198559, 0.99907772775264536146977434327709, 0.99879545620517240500646494183457, 0.99847558057329477421149022120517, 0.99811811290014917918966830256977, 0.99772306664419163624302200332750, 0.99729045667869020697082760307239, 0.99682029929116577893211115224403, 0.99631261218277800129072829804500, 0.99576741446765981713440396561055, 0.99518472667219692873175063141389, 0.99456457073425541537403660186101, 0.99390697000235606051177228437155, 0.99321194923479450000769475082052, 0.99247953459870996706371215623221, 0.99170975366909952519733906228794, 0.99090263542778000971367191596073, 0.99005821026229712256139237069874, 0.98917650996478101443898367506335, 0.98825756773074946437418475397862, 0.98730141815785843473207705756067, 0.98630809724459866938417462733923, 0.98527764238894122161838140527834, 0.98421009238692902520995176018914, 0.98310548743121628501029363178532, 0.98196386910955524296440444231848, 0.98078528040323043057924223830923, 0.97956976568544051886533452488948, 0.97831737071962765472932233024039, 0.97702814265775439483974196264171, 0.97570213003852857003295184767921, 0.97433938278557585821459952057921, 0.97293995220556017677893123618560, 0.97150389098625178352364173406386, 0.97003125319454397423868385885726, 0.96852209427441737776831587325432, 0.96697647104485207059099138859892, 0.96539444169768939829623377590906, 0.96377606579543984022251379428781, 0.96212140426904158019283386238385, 0.96043051941556589756743278485374, 0.95870347489587159905966018413892, 0.95694033573220893540423048762023, 0.95514116830577067140950475732097, 0.95330604035419386210747916265973, 0.95143502096900833819859144568909, 0.94952818059303667475035126699368, 0.94758559101774120225769593162113, 0.94560732538052139073414537051576, 0.94359345816196038558842928978265, 0.94154406518302080630888895029784, 0.93945922360218991897795604018029, 0.93733901191257495977282587773516, 0.93518350993894761025160278222756, 0.93299279883473884567024470015895, 0.93076696107898371224109723698348, 0.92850608047321558924380724420189, 0.92621024213831137927854797453620, 0.92387953251128673848313610506011, 0.92151403934204201284785540337907, 0.91911385169005777040496241170331, 0.91667905992104270485043571170536, 0.91420975570353069095119735720800, 0.91170603200542987831767050010967, 0.90916798309052249127404365935945, 0.90659570451491533482624163298169, 0.90398929312344344921825722849462, 0.90134884704602202809553546103416, 0.89867446569395392774737274521613, 0.89596624975618521791176362967235, 0.89322430119551521343623790016863, 0.89044872324475798919252156338189, 0.88763962040285393495508969863295, 0.88479709843093790055945646599866, 0.88192126434835504955600526955095, 0.87901222642863352518816100200638, 0.87607009419540660122294184475322, 0.87309497841829020181592113658553, 0.87008699110871146054080327303382, 0.86704624551569275947571213691845, 0.86397285612158680745409355949960, 0.86086693863776719837233031284995, 0.85772861000027211808571792062139, 0.85455798836540053375898651211173, 0.85135519310526519554116475774208, 0.84812034480329723251657014770899, 0.84485356524970722791323396450025, 0.84155497743689844369896491116378, 0.83822470555483818976938437117497, 0.83486287498638012127827323638485, 0.83146961230254545771600760417641, 0.82804504525775579626412081779563, 0.82458930278502517996486176343751, 0.82110251499110475936760167314787, 0.81758481315158371138807069655741, 0.81403632970594852480417102924548, 0.81045719825259476820633608440403, 0.80684755354379944503051547144423, 0.80320753148064494286728631777805, 0.79953726910790523518812733527739, 0.79583690460888356632551676739240, 0.79210657730021227784789061843185, 0.78834642762660633863447401381563, 0.78455659715557513056438665444148, 0.78073722857209459924376915296307, 0.77688846567323244229896772594657, 0.77301045336273710439911610592389, 0.76910333764557958780017088429304, 0.76516726562245906961834407411516, 0.76120238548426188973650141633698, 0.75720884650648467850686529345694, 0.75318679904361252042122032435145, 0.74913639452345925917597924126312, 0.74505778544146605835152286090306, 0.74095112535495899486193138727685, 0.73681656887737001504490308434470, 0.73265427167241281569687316732598, 0.72846439044822530739509147679200, 0.72424708295146689174259790888755, 0.72000250796138176578864431576221, 0.71573082528381870570655109986546, 0.71143219574521665560240535342018, 0.70710678118654757273731092936941, 0.70275474445722518890278252001735, 0.69837624940897291558883352990961, 0.69397146088965400156922669339110, 0.68954054473706705152835638727993, 0.68508366777270035541391735023353, 0.68060099779545324416574203496566, 0.67609270357531592310351697960868, 0.67155895484701855213671706223977, 0.66699992230363758238809168688022, 0.66241577759017200577318362775259, 0.65780669329707874837254166777711, 0.65317284295377664449233634513803, 0.64851440102211255211983598201186, 0.64383154288979138613058239570819, 0.63912444486377584240699434303679, 0.63439328416364548779426968394546, 0.62963823891492720630225221611909, 0.62485948814238634341222677903716, 0.62005721176328942867428395402385, 0.61523159058062693027579825866269, 0.61038280627630969732422272500116, 0.60551104140432565614560189715121, 0.60061647938386886202977166249184, 0.59569930449243346792798092792509, 0.59075970185887416441516961640446, 0.58579785745643897509893349706545, 0.58081395809576452649025668506511, 0.57580819141784544967777037527412, 0.57078074588696725566450140831876, 0.56573181078361345353044953299104, 0.56066157619733614225765450100880, 0.55557023301960217764872140833177, 0.55045797293660492233158265662496, 0.54532498842204635280950242304243, 0.54017147272989296524769997631665, 0.53499761988709715332390715047950, 0.52980362468629482730619884023326, 0.52458968267846894928396750401589, 0.51935599016558975371538053877885, 0.51410274419322177230640136258444, 0.50883014254310732216168844388449, 0.50353838372571768644547773874365, 0.49822766697278175751506523738499, 0.49289819222978414892111231893068, 0.48755016014843588489924286477617, 0.48218377207912288540114786883350, 0.47679923006332208812452222446154, 0.47139673682599786408431441486755, 0.46597649576796618120511084271129, 0.46053871095824022718900891959493, 0.45508358712634389142692725727102, 0.44961132965460687271885831250984, 0.44412214457042931137209507141961, 0.43861623853852754750803910610557, 0.43309381885315206828224177115771, 0.42755509343028202939862580933550, 0.42200027079979984812041493569268, 0.41642956009763715252702809266339, 0.41084317105790413293675555905793, 0.40524131400498991650849234247289, 0.39962419984564706565421943196270, 0.39399204006104815434241572802421, 0.38834504669882657923452029535838, 0.38268343236508989280153514300764, 0.37700741021641814842979556487990, 0.37131719395183770959789626431302, 0.36561299780477379828269590689160, 0.35989503653498833291024538993952, 0.35416352542049039930915910190379, 0.34841868024943478676647146130563, 0.34266071731199443384241476451280, 0.33688985339222032866501876924303, 0.33110630575987648471780744330317, 0.32531029216226325928573714918457, 0.31950203081601580290538322515204, 0.31368174039889140658488031476736, 0.30784964004153503314142881208682, 0.30200594931922802865997823573707, 0.29615088824362401087597618243308, 0.29028467725446238656417108359165, 0.28440753721127209896479826056748, 0.27851968938505317074927347675839, 0.27262135544994925417938702594256, 0.26671275747489847640636639880540, 0.26079411791527584707495179827674, 0.25486565960451468271230623940937, 0.24892760574572009302229957938835, 0.24298017990326406523315938557062, 0.23702360599436717025767507038836, 0.23105810828067133155805379374215, 0.22508391135979283204093803760770, 0.21910124015687004739305621114909, 0.21311031991609141744703492804547, 0.20711137619221883787723470504716, 0.20110463484209201157071333909698, 0.19509032201612860890627132448572, 0.18906866414980635915377149558481, 0.18303988795514089527038947835536, 0.17700422041214894375293908979074, 0.17096188876030121717164433903235, 0.16491312048997014416684692150739, 0.15885814333386147345628103266790, 0.15279718525844368515187454704574, 0.14673047445536180344305421385798, 0.14065823933284954394551391487767, 0.13458070850712627875012117328879, 0.12849811079379308553782834678714, 0.12241067519921634831892021111344, 0.11631863091190471071190160046172, 0.11022220729388323978703567718185, 0.10412163387205457254491847152167, 0.09801714032956082567338285116421, 0.09190895649713275161740710927916, 0.08579731234444015752771406368993, 0.07968243797143019502282612620547, 0.07356456359966773161929154412064, 0.06744391956366417584245454008851, 0.06132073630220848808880518276965, 0.05519524434969009379914339774587, 0.04906767432741796636230802164391, 0.04293825693494102146985369472532, 0.03680722294135883171373180289265, 0.03067480317663686534279676720871, 0.02454122852291232628751949107482, 0.01840672990580510121061408312926, 0.01227153828572000691943255645810, 0.00613588464915479879502324678242, 0.00000000000000012246467991473532, -0.00613588464915455419901313405262, -0.01227153828571976232342244372830, -0.01840672990580485834932744637626, -0.02454122852291207995678590236821, -0.03067480317663661901206317850210, -0.03680722294135858191355126223243, -0.04293825693494077860856705797232, -0.04906767432741772350102138489092, -0.05519524434968985093785676099287, -0.06132073630220824522751854601665, -0.06744391956366392604227399942829, -0.07356456359966749569689881127488, -0.07968243797142994522264558554525, -0.08579731234443992160532133084416, -0.09190895649713251569501437643339, -0.09801714032956058975099011831844, -0.10412163387205432274473793086145, -0.11022220729388300386464294433608, -0.11631863091190447478950886761595, -0.12241067519921609851873967045321, -0.12849811079379283573764780612692, -0.13458070850712605670551624825748, -0.14065823933284929414533337421744, -0.14673047445536158139844928882667, -0.15279718525844343535169400638551, -0.15885814333386122365610049200768, -0.16491312048996989436666638084716, -0.17096188876030096737146379837213, -0.17700422041214869395275854913052, -0.18303988795514064547020893769513, -0.18906866414980610935359095492458, -0.19509032201612835910609078382549, -0.20110463484209176177053279843676, -0.20711137619221858807705416438694, -0.21311031991609119540243000301416, -0.21910124015686979759287567048887, -0.22508391135979260999633311257639, -0.23105810828067108175787325308193, -0.23702360599436694821307014535705, -0.24298017990326381543297884491039, -0.24892760574571987097769465435704, -0.25486565960451446066770131437806, -0.26079411791527562503034687324543, -0.26671275747489825436176147377410, -0.27262135544994903213478210091125, -0.27851968938505289319351732046925, -0.28440753721127182140904210427834, -0.29028467725446210900841492730251, -0.29615088824362378883137125740177, -0.30200594931922780661537331070576, -0.30784964004153481109682388705551, -0.31368174039889118454027538973605, -0.31950203081601558086077830012073, -0.32531029216226298172998099289543, -0.33110630575987626267320251827186, -0.33688985339222010662041384421173, -0.34266071731199421179780983948149, -0.34841868024943456472186653627432, -0.35416352542049012175340294561465, -0.35989503653498811086564046490821, -0.36561299780477357623809098186030, -0.37131719395183743204214010802389, -0.37700741021641792638519063984859, -0.38268343236508967075693021797633, -0.38834504669882635718991537032707, -0.39399204006104793229781080299290, -0.39962419984564684360961450693139, -0.40524131400498969446388741744158, -0.41084317105790391089215063402662, -0.41642956009763693048242316763208, -0.42200027079979962607581001066137, -0.42755509343028180735402088430419, -0.43309381885315184623763684612641, -0.43861623853852732546343418107426, -0.44412214457042908932749014638830, -0.44961132965460665067425338747853, -0.45508358712634366938232233223971, -0.46053871095824006065555522582144, -0.46597649576796595916050591767998, -0.47139673682599764203970948983624, -0.47679923006332186607991729943024, -0.48218377207912266335654294380220, -0.48755016014843566285463793974486, -0.49289819222978392687650739389937, -0.49822766697278153547046031235368, -0.50353838372571746440087281371234, -0.50883014254310710011708351885318, -0.51410274419322155026179643755313, -0.51935599016558964269307807626319, -0.52458968267846872723936257898458, -0.52980362468629460526159391520196, -0.53499761988709693127930222544819, -0.54017147272989285422539751380100, -0.54532498842204613076489749801112, -0.55045797293660470028697773159365, -0.55557023301960195560411648330046, -0.56066157619733592021304957597749, -0.56573181078361323148584460795973, -0.57078074588696714464219894580310, -0.57580819141784533865546791275847, -0.58081395809576430444565176003380, -0.58579785745643886407663103454979, -0.59075970185887394237056469137315, -0.59569930449243324588337600289378, -0.60061647938386863998516673746053, -0.60551104140432543410099697211990, -0.61038280627630947527961779996986, -0.61523159058062670823119333363138, -0.62005721176328920662967902899254, -0.62485948814238623238992431652150, -0.62963823891492698425764729108778, -0.63439328416364526574966475891415, -0.63912444486377573138469188052113, -0.64383154288979127510827993319253, -0.64851440102211233007523105698056, -0.65317284295377653347003388262237, -0.65780669329707852632793674274581, -0.66241577759017178372857870272128, -0.66699992230363736034348676184891, -0.67155895484701844111441459972411, -0.67609270357531581208121451709303, -0.68060099779545302212113710993435, -0.68508366777270013336931242520222, -0.68954054473706682948375146224862, -0.69397146088965377952462176835979, -0.69837624940897280456653106739395, -0.70275474445722507788048005750170, -0.70710678118654746171500846685376, -0.71143219574521643355780042838887, -0.71573082528381848366194617483416, -0.72000250796138165476634185324656, -0.72424708295146678072029544637189, -0.72846439044822519637278901427635, -0.73265427167241259365226824229467, -0.73681656887736979300029815931339, -0.74095112535495888383962892476120, -0.74505778544146583630691793587175, -0.74913639452345903713137431623181, -0.75318679904361240939891786183580, -0.75720884650648423441765544339432, -0.76120238548426200075880387885263, -0.76516726562245895859604161159950, -0.76910333764557947677786842177738, -0.77301045336273666030990625586128, -0.77688846567323255332127018846222, -0.78073722857209437719916422793176, -0.78455659715557501954208419192582, -0.78834642762660589454526416375302, -0.79210657730021238887019308094750, -0.79583690460888345530321430487675, -0.79953726910790479109891748521477, -0.80320753148064505388958878029371, -0.80684755354379922298591054641292, -0.81045719825259465718403362188837, -0.81403632970594808071496117918286, -0.81758481315158382241037315907306, -0.82110251499110464834529921063222, -0.82458930278502506894255930092186, -0.82804504525775546319721343024867, -0.83146961230254523567140267914510, -0.83486287498638001025597077386919, -0.83822470555483785670247698362800, -0.84155497743689855472126737367944, -0.84485356524970700586862903946894, -0.84812034480329712149426768519334, -0.85135519310526486247425737019512, -0.85455798836540064478128897462739, -0.85772861000027200706341545810574, -0.86086693863776708735002785033430, -0.86397285612158647438718617195264, -0.86704624551569264845340967440279, -0.87008699110871134951850081051816, -0.87309497841828986874901374903857, -0.87607009419540671224524430726888, -0.87901222642863341416585853949073, -0.88192126434835493853370280703530, -0.88479709843093756749254907845170, -0.88763962040285404597739216114860, -0.89044872324475787817021910086623, -0.89322430119551521343623790016863, -0.89596624975618488484485624212539, -0.89867446569395381672507028270047, -0.90134884704602191707323299851851, -0.90398929312344311615134984094766, -0.90659570451491544584854409549735, -0.90916798309052238025174119684380, -0.91170603200542976729536803759402, -0.91420975570353046890659243217669, -0.91667905992104270485043571170536, -0.91911385169005765938265994918766, -0.92151403934204179080325047834776, -0.92387953251128651643853118002880, -0.92621024213831137927854797453620, -0.92850608047321547822150478168624, -0.93076696107898360121879477446782, -0.93299279883473895669254716267460, -0.93518350993894761025160278222756, -0.93733901191257484875052341521950, -0.93945922360218969693335111514898, -0.94154406518302080630888895029784, -0.94359345816196027456612682726700, -0.94560732538052116868954044548445, -0.94758559101774120225769593162113, -0.94952818059303667475035126699368, -0.95143502096900833819859144568909, -0.95330604035419375108517670014407, -0.95514116830577078243180721983663, -0.95694033573220882438192802510457, -0.95870347489587148803735772162327, -0.96043051941556567552282785982243, -0.96212140426904158019283386238385, -0.96377606579543984022251379428781, -0.96539444169768928727393131339340, -0.96697647104485218161329385111458, -0.96852209427441726674601341073867, -0.97003125319454397423868385885726, -0.97150389098625167250133927154820, -0.97293995220556017677893123618560, -0.97433938278557585821459952057921, -0.97570213003852845901064938516356, -0.97702814265775428381743950012606, -0.97831737071962765472932233024039, -0.97956976568544051886533452488948, -0.98078528040323031955693977579358, -0.98196386910955535398670690483414, -0.98310548743121628501029363178532, -0.98421009238692902520995176018914, -0.98527764238894111059607894276269, -0.98630809724459866938417462733923, -0.98730141815785832370977459504502, -0.98825756773074946437418475397862, -0.98917650996478090341668121254770, -0.99005821026229712256139237069874, -0.99090263542778000971367191596073, -0.99170975366909952519733906228794, -0.99247953459871007808601461874787, -0.99321194923479450000769475082052, -0.99390697000235606051177228437155, -0.99456457073425541537403660186101, -0.99518472667219692873175063141389, -0.99576741446765981713440396561055, -0.99631261218277800129072829804500, -0.99682029929116566790980868972838, -0.99729045667869020697082760307239, -0.99772306664419163624302200332750, -0.99811811290014917918966830256977, -0.99847558057329477421149022120517, -0.99879545620517240500646494183457, -0.99907772775264536146977434327709, -0.99932238458834943273245698946994, -0.99952941750109314256178549840115, -0.99969881869620424996725205346593, -0.99983058179582340319058175737155, -0.99992470183914450299056397852837, -0.99998117528260110908888691483298, -1.00000000000000000000000000000000, -0.99998117528260110908888691483298, -0.99992470183914450299056397852837, -0.99983058179582340319058175737155, -0.99969881869620424996725205346593, -0.99952941750109314256178549840115, -0.99932238458834954375475945198559, -0.99907772775264536146977434327709, -0.99879545620517240500646494183457, -0.99847558057329477421149022120517, -0.99811811290014917918966830256977, -0.99772306664419163624302200332750, -0.99729045667869020697082760307239, -0.99682029929116566790980868972838, -0.99631261218277800129072829804500, -0.99576741446765981713440396561055, -0.99518472667219692873175063141389, -0.99456457073425541537403660186101, -0.99390697000235606051177228437155, -0.99321194923479461102999721333617, -0.99247953459871007808601461874787, -0.99170975366909952519733906228794, -0.99090263542778000971367191596073, -0.99005821026229712256139237069874, -0.98917650996478090341668121254770, -0.98825756773074946437418475397862, -0.98730141815785843473207705756067, -0.98630809724459878040647708985489, -0.98527764238894122161838140527834, -0.98421009238692913623225422270480, -0.98310548743121639603259609430097, -0.98196386910955535398670690483414, -0.98078528040323043057924223830923, -0.97956976568544062988763698740513, -0.97831737071962776575162479275605, -0.97702814265775428381743950012606, -0.97570213003852857003295184767921, -0.97433938278557596923690198309487, -0.97293995220556028780123369870125, -0.97150389098625178352364173406386, -0.97003125319454397423868385885726, -0.96852209427441737776831587325432, -0.96697647104485229263559631363023, -0.96539444169768939829623377590906, -0.96377606579543995124481625680346, -0.96212140426904169121513632489950, -0.96043051941556578654513032233808, -0.95870347489587159905966018413892, -0.95694033573220893540423048762023, -0.95514116830577089345410968235228, -0.95330604035419386210747916265973, -0.95143502096900844922089390820474, -0.94952818059303678577265372950933, -0.94758559101774131327999839413678, -0.94560732538052127971184290800011, -0.94359345816196038558842928978265, -0.94154406518302091733119141281350, -0.93945922360218980795565357766463, -0.93733901191257495977282587773516, -0.93518350993894772127390524474322, -0.93299279883473906771484962519025, -0.93076696107898371224109723698348, -0.92850608047321558924380724420189, -0.92621024213831149030085043705185, -0.92387953251128662746083364254446, -0.92151403934204190182555294086342, -0.91911385169005788142726487421896, -0.91667905992104281587273817422101, -0.91420975570353057992889489469235, -0.91170603200542987831767050010967, -0.90916798309052249127404365935945, -0.90659570451491555687084655801300, -0.90398929312344333819595476597897, -0.90134884704602213911783792354981, -0.89867446569395403876967520773178, -0.89596624975618499586715870464104, -0.89322430119551532445854036268429, -0.89044872324475798919252156338189, -0.88763962040285415699969462366425, -0.88479709843093767851485154096736, -0.88192126434835504955600526955095, -0.87901222642863363621046346452204, -0.87607009419540693428984923230018, -0.87309497841829009079361867406988, -0.87008699110871146054080327303382, -0.86704624551569287049801459943410, -0.86397285612158658540948863446829, -0.86086693863776730939463277536561, -0.85772861000027222910802038313705, -0.85455798836540075580359143714304, -0.85135519310526508451886229522643, -0.84812034480329734353887261022464, -0.84485356524970722791323396450025, -0.84155497743689877676587229871075, -0.83822470555483796772477944614366, -0.83486287498638012127827323638485, -0.83146961230254545771600760417641, -0.82804504525775568524181835527997, -0.82458930278502529098716422595317, -0.82110251499110487038990413566353, -0.81758481315158404445497808410437, -0.81403632970594830275956610421417, -0.81045719825259487922863854691968, -0.80684755354379944503051547144423, -0.80320753148064527593419370532501, -0.79953726910790501314352241024608, -0.79583690460888367734781922990805, -0.79210657730021261091479800597881, -0.78834642762660611658986908878433, -0.78455659715557524158668911695713, -0.78073722857209459924376915296307, -0.77688846567323277536587511349353, -0.77301045336273688235451118089259, -0.76910333764557969882247334680869, -0.76516726562245918064064653663081, -0.76120238548426222280340880388394, -0.75720884650648456748456283094129, -0.75318679904361263144352278686711, -0.74913639452345959224288662881008, -0.74505778544146583630691793587175, -0.74095112535495910588423384979251, -0.73681656887737012606720554686035, -0.73265427167241314876378055487294, -0.72846439044822508535048655176070, -0.72424708295146700276490037140320, -0.72000250796138187681094677827787, -0.71573082528381903877345848741243, -0.71143219574521643355780042838887, -0.70710678118654768375961339188507, -0.70275474445722563299199237007997, -0.69837624940897269354422860487830, -0.69397146088965400156922669339110, -0.68954054473706716255065884979558, -0.68508366777270079950312720029615, -0.68060099779545302212113710993435, -0.67609270357531603412581944212434, -0.67155895484701866315901952475542, -0.66699992230363802647730153694283, -0.66241577759017178372857870272128, -0.65780669329707885939484413029277, -0.65317284295377708858154619520064, -0.64851440102211233007523105698056, -0.64383154288979149715288485822384, -0.63912444486377595342929680555244, -0.63439328416364593188347953400807, -0.62963823891492698425764729108778, -0.62485948814238645443452924155281, -0.62005721176328953969658641653950, -0.61523159058062737436500810872531, -0.61038280627630947527961779996986, -0.60551104140432565614560189715121, -0.60061647938386930611898151255446, -0.59569930449243324588337600289378, -0.59075970185887427543747207892011, -0.58579785745643908612123595958110, -0.58081395809576497057946653512772, -0.57580819141784522763316545024281, -0.57078074588696736668680387083441, -0.56573181078361356455275199550670, -0.56066157619733658634686435107142, -0.55557023301960217764872140833177, -0.55045797293660503335388511914061, -0.54532498842204679689871227310505, -0.54017147272989274320309505128535, -0.53499761988709726434620961299515, -0.52980362468629493832850130274892, -0.52458968267846939337317735407851, -0.51935599016558953167077561374754, -0.51410274419322188332870382510009, -0.50883014254310743318399090640014, -0.50353838372571813053468758880626, -0.49822766697278186853736769990064, -0.49289819222978425994341478144634, -0.48755016014843638449960394609661, -0.48218377207912260784539171254437, -0.47679923006332219914682468697720, -0.47139673682599791959546564612538, -0.46597649576796668080547192403174, -0.46053871095823994963325276330579, -0.45508358712634400244922971978667, -0.44961132965460698374116077502549, -0.44412214457042981097245615274005, -0.43861623853852765853034156862122, -0.43309381885315217930454423367337, -0.42755509343028252899898689065594, -0.42200027079979957056465877940354, -0.41642956009763726354933055517904, -0.41084317105790424395905802157358, -0.40524131400499041610885342379333, -0.39962419984564678809846327567357, -0.39399204006104826536471819053986, -0.38834504669882669025682275787403, -0.38268343236509039240189622432808, -0.37700741021641825945209802739555, -0.37131719395183782062019872682868, -0.36561299780477435339420821946987, -0.35989503653498799984333800239256, -0.35416352542049051033146156441944, -0.34841868024943489778877392382128, -0.34266071731199493344277584583324, -0.33688985339221999559811138169607, -0.33110630575987659574010990581883, -0.32531029216226337030803961170022, -0.31950203081601546983847583760507, -0.31368174039889151760718277728301, -0.30784964004153514416373127460247, -0.30200594931922858377149054831534, -0.29615088824362373332022002614394, -0.29028467725446249758647354610730, -0.28440753721127220998710072308313, -0.27851968938505367034963455807883, -0.27262135544994897662363086965343, -0.26671275747489858742866886132106, -0.26079411791527595809725426079240, -0.25486565960451440515655008312024, -0.24892760574572020404460204190400, -0.24298017990326417625546184808627, -0.23702360599436772536918738296663, -0.23105810828067099849114640619518, -0.22508391135979297081881611575227, -0.21910124015687015841535867366474, -0.21311031991609197255854724062374, -0.20711137619221853256590293312911, -0.20110463484209212259301580161264, -0.19509032201612871992857378700137, -0.18906866414980602608686410803784, -0.18303988795514100629269194087101, -0.17700422041214905477524155230640, -0.17096188876030177228315665161062, -0.16491312048996981109993953396042, -0.15885814333386158447858349518356, -0.15279718525844379617417700956139, -0.14673047445536238631014214206516, -0.14065823933284921087860652733070, -0.13458070850712641752799925143336, -0.12849811079379364064934065936541, -0.12241067519921602912980063138093, -0.11631863091190483561199187079183, -0.11022220729388336468712594751196, -0.10412163387205512765643078409994, -0.09801714032956050648426327143170, -0.09190895649713287651749737960927, -0.08579731234444028242780433402004, -0.07968243797143075013433843878374, -0.07356456359966741243017196438814, -0.06744391956366428686475700260416, -0.06132073630220905707810530316237, -0.05519524434968977461002381801336, -0.04906767432741809126239829197402, -0.04293825693494113943105006114820, -0.03680722294135939376413801937815, -0.03067480317663654268423023552259, -0.02454122852291244771816280945131, -0.01840672990580522611070435345937, -0.01227153828572057243928572489722, -0.00613588464915447700381845308470 };
538 
539 
541 #define FLT_EPSILON_PLUS 1.192092896e-07
542 
543 #define FLT_EPSILON_MINUS -1.192092896e-07
544 
545 #define FLT_MIN_PLUS 1.175494351e-38
546 
547 #define FLT_MIN_MINUS -1.175494351e-38
548 
549 
550 
554  const double kPiSqared = kPi * kPi;
555  const double kFourPi = kPi * 4.0;
556  const double kPiOverFour = kPi / 4.0;
558 
562  const uint32_t kNumMIDICCs = 128;
563 
565 
569  // --- CHANNEL VOICE MESSAGES
570  const unsigned char NOTE_OFF = 0x80;
571  const unsigned char NOTE_ON = 0x90;
572  const unsigned char POLY_PRESSURE = 0xA0;
573  const unsigned char CONTROL_CHANGE = 0xB0;
574  const unsigned char PROGRAM_CHANGE = 0xC0;
575  const unsigned char CHANNEL_PRESSURE = 0xD0;
576  const unsigned char PITCH_BEND = 0xE0;
577 
578  // --- CONTINUOUS CONTROLLERS
579  const unsigned char MOD_WHEEL = 0x01;
580  const unsigned char VOLUME_CC07 = 0x07;
581  const unsigned char PAN_CC10 = 0x0A;
582  const unsigned char EXPRESSION_CC11 = 0x0B;
583  const unsigned char JOYSTICK_X = 0x10;
584  const unsigned char JOYSTICK_Y = 0x11;
585  const unsigned char SUSTAIN_PEDAL = 0x40;
586  const unsigned char RESET_ALL_CONTROLLERS = 0x79;
587  const unsigned char ALL_NOTES_OFF = 0x7B;
588 
589  // --- SYSTEM MESSAGES
590  const unsigned char SYSTEM_EXCLUSIVE = 0xF0;
591  const unsigned char MIDI_TIME_CODE = 0xF1;
592  const unsigned char SONG_POSITION_POINTER = 0xF2;
593  const unsigned char SONG_SELECT = 0xF3;
594  const unsigned char TUNE_REQUEST = 0xF6;
595  const unsigned char END_OF_EXCLUSIVE = 0xF7;
596  const unsigned char TIMING_CLOCK = 0xF8;
597  const unsigned char START = 0xFA;
598  const unsigned char CONTINUE = 0xFB;
599  const unsigned char SToP = 0xFC;
600  const unsigned char ACTIVE_SENSING = 0xFE;
601  const unsigned char SYSTEM_RESET = 0xFF;
602 
603  const uint32_t NUM_MIDI_NOTES = 128;
604  const uint32_t MIDI_NOTE_A0 = 21; // bottom of piano
605  const uint32_t MIDI_NOTE_A4 = 69; // A440
606  const double MIDI_NOTE_0_FREQ = 8.176; //
607 
608  enum midiChannels {
609  MIDI_CH_1 = 0, MIDI_CH_2, MIDI_CH_3, MIDI_CH_4, MIDI_CH_5, MIDI_CH_6, MIDI_CH_7,
610  MIDI_CH_8, MIDI_CH_9, MIDI_CH_10, MIDI_CH_11, MIDI_CH_12, MIDI_CH_13,
611  MIDI_CH_14, MIDI_CH_15, MIDI_CH_16, MIDI_CH_ALL
612  };
614 
615 } // namespace
616 
617 #endif /* defined(__synthConstants_h__) */
const bool PITCHLESS_LOOP
Definition: synthconstants.h:47
const uint32_t WAVE_SEQ_WAVES_8
Definition: synthconstants.h:178
const uint32_t OSC2_SOURCE
Definition: synthconstants.h:163
const uint32_t NUM_MODULE_CORES
Definition: synthconstants.h:132
const double kMaxModGain_dB
Definition: synthconstants.h:224
const uint32_t LFO1_MOD_KNOBS
Definition: synthconstants.h:193
const uint32_t NUM_OSC
Definition: synthconstants.h:95
const uint32_t SMPLBANK_SOURCES
Definition: synthconstants.h:130
const uint32_t NUM_LFO
Definition: synthconstants.h:96
const double kDCA_Pan_ModRange
Definition: synthconstants.h:227
const uint32_t FMO_MODULE
Definition: synthconstants.h:117
const double kFourPi
Definition: synthconstants.h:555
DX100Algo
Definition: synthconstants.h:73
const uint32_t CUSTOM_CORE_1
Definition: synthconstants.h:135
const double kPi
pi to 80 decimal places
Definition: synthconstants.h:522
const double SHUTDOWN_TIME_MSEC
short shutdown time when stealing a voice
Definition: synthconstants.h:100
const uint32_t LFO_MODULE
Definition: synthconstants.h:111
auxMIDI
Enumeration for the aux data that is transmitted with the MIDI input information; it may or may not o...
Definition: synthconstants.h:501
const unsigned char NOTE_OFF
Definition: synthconstants.h:570
FilterMode
Definition: synthconstants.h:72
const uint32_t EG3_SOURCE
Definition: synthconstants.h:168
const uint32_t WAVE_SEQ_WAVES_1
Definition: synthconstants.h:171
const uint32_t FILTER1_SOURCE
Definition: synthconstants.h:169
const uint32_t WTO_MODULE
Definition: synthconstants.h:115
const uint32_t WTBANK_SOURCES
Definition: synthconstants.h:129
const uint32_t FILTER1_TYPES
Definition: synthconstants.h:158
const uint32_t NUM_EG
Definition: synthconstants.h:98
const uint32_t FILTER2_TYPES
Definition: synthconstants.h:159
const uint32_t EG2_CONTOUR
Definition: synthconstants.h:156
const uint32_t OSC2_WAVEFORMS
Definition: synthconstants.h:152
const uint32_t NO_CHANNELS
Definition: synthconstants.h:58
const uint32_t UNDEFINED_MODULE
Definition: synthconstants.h:110
const uint32_t EG_MODULE
Definition: synthconstants.h:112
const uint32_t WRAP_MASK
Definition: synthconstants.h:85
const uint32_t FILTER_MODULE
Definition: synthconstants.h:114
const uint32_t LFO1_SOURCE
Definition: synthconstants.h:160
const uint32_t FILTER2_SOURCE
Definition: synthconstants.h:170
Definition: synthengine.cpp:16
const uint32_t EG2_SOURCE
Definition: synthconstants.h:167
const uint32_t MAX_SEQ_STEPS
Definition: synthconstants.h:84
const uint32_t MAX_PROCESSOR_CHANNELS
Definition: synthconstants.h:38
const uint32_t CUSTOM_CORE_0
Definition: synthconstants.h:134
const double kDCA_Amp_ModRange
Definition: synthconstants.h:226
const uint32_t MAX_SYNTH_CHANNELS
Definition: synthconstants.h:36
const uint32_t OSC1_SOURCE
Definition: synthconstants.h:162
const uint32_t VAO_MODULE
Definition: synthconstants.h:116
const uint32_t MODULE_STRINGS
Definition: synthconstants.h:128
SynthMode
Definition: synthconstants.h:71
modDestination
Enumeration for accessing an array of modulator destinations.
Definition: synthconstants.h:293
const uint32_t NUM_FILTER
Definition: synthconstants.h:97
globalMIDI
Enumeration for the global MIDI data array.
Definition: synthconstants.h:450
const uint32_t MAX_VOICES
Definition: synthconstants.h:35
const uint32_t PCMO_MODULE
Definition: synthconstants.h:118
const double kOscBipolarModRangeSemitones
Definition: synthconstants.h:228
const uint32_t WAVE_SEQ_WAVES_4
Definition: synthconstants.h:174
const uint32_t WAVE_SEQ_WAVES_7
Definition: synthconstants.h:177
modSource
Enumeration for accessing an array of modulator sources.
Definition: synthconstants.h:239
const uint32_t OSC3_SOURCE
Definition: synthconstants.h:164
const uint32_t DCA_MODULE
Definition: synthconstants.h:113
const uint32_t OSC3_WAVEFORMS
Definition: synthconstants.h:153
const uint32_t MAX_OSC_CHANNELS
Definition: synthconstants.h:37
const uint32_t EG1_CONTOUR
Definition: synthconstants.h:155
const uint32_t WAVE_SEQ_WAVES_5
Definition: synthconstants.h:175
const uint32_t MOD_KNOBS
Definition: synthconstants.h:131
const double kTwoPi
2pi to 80 decimal places
Definition: synthconstants.h:529
const uint32_t OSC1_WAVEFORMS
Definition: synthconstants.h:151
const uint32_t LFO2_SOURCE
Definition: synthconstants.h:161
const double kPiSqared
Definition: synthconstants.h:554
const uint32_t EG3_CONTOUR
Definition: synthconstants.h:157
const uint32_t KSO_MODULE
Definition: synthconstants.h:119
const uint32_t OSC4_WAVEFORMS
Definition: synthconstants.h:154
const std::string empty_string
Definition: synthconstants.h:180
const uint32_t LFO2_WAVEFORMS
Definition: synthconstants.h:150
const uint32_t OSC4_SOURCE
Definition: synthconstants.h:165
const uint32_t WAVE_SEQ_WAVES_3
Definition: synthconstants.h:173
const uint32_t CUSTOM_CORE_2
Definition: synthconstants.h:136
XFadeType
Definition: synthconstants.h:81
const double kMinAbsoluteGain_dB
Definition: synthconstants.h:225
const uint32_t DEFAULT_CORE
Definition: synthconstants.h:133
const double kPiOverFour
Definition: synthconstants.h:556
const double kMinModGain_dB
Definition: synthconstants.h:223
LoopDirection
Definition: synthconstants.h:82
const uint32_t EG1_SOURCE
Definition: synthconstants.h:166
const bool AUBIO_SLICES
Definition: synthconstants.h:48
const uint32_t OSC_MODULE
Definition: synthconstants.h:120
const uint32_t WAVE_SEQ_WAVES_2
Definition: synthconstants.h:172
const uint32_t WAVE_SEQ_WAVES_6
Definition: synthconstants.h:176
const uint32_t kNumMIDICCs
Definition: synthconstants.h:562
const uint32_t NUM_WS_OSCILLATORS
Definition: synthconstants.h:99
const uint32_t MAX_MODULATION_CHANNELS
Definition: synthconstants.h:39
const double kSqrtTwo
square root of 2
Definition: synthconstants.h:515
const uint32_t LFO1_WAVEFORMS
Definition: synthconstants.h:149
StepMode
Definition: synthconstants.h:83