Codebase list guitarix / 2de0086
Imported Upstream version 0.27.1 Ross Gammon 8 years ago
940 changed file(s) with 92338 addition(s) and 12594 deletion(s). Raw diff Collapse all Expand all
0 guitarix2 (0.27.1) unstable; urgency=low
1 * git head
2
3 -- brummer <brummer-@web.de> Sat, 20 Apr 2013 21:30:35 +0200
4
05 guitarix2 (0.25.2) unstable; urgency=low
16 * add ts9 tube screamer to lv2.plugs
27 * add dunlop wah to lv2.plugs
88 action='store_const',
99 default=False,
1010 const=True,
11 help=('build support for Glade / GtkBuilder'),
11 help=('build support for Glade / GtkBuilder (Developers only!!)'),
1212 )
1313 grp.add_option('--glade-catalog-dir',
1414 type='string',
23722372 gint y0 = wi->allocation.y;
23732373 gint w = wi->allocation.width;
23742374 gint h = wi->allocation.height;
2375 static int spf, opf = 0;
2376 gtk_widget_style_get(GTK_WIDGET(wi), "icon-set", &spf, NULL);
2377
23752378 static double ne_w = 0.;
2376 if (ne_w != w*h || !(GDK_IS_PIXBUF (paintbox-> gxr_image))) {
2379 if (spf != opf || ne_w != w*h || !(GDK_IS_PIXBUF (paintbox-> gxr_image))) {
23772380 ne_w = w*h;
2381 opf = spf;
23782382 while (G_IS_OBJECT(paintbox-> gxr_image)) {
23792383 g_object_unref(paintbox->gxr_image);
23802384 }
6969
7070 void gxw_init()
7171 {
72 #if !GLIB_CHECK_VERSION(2, 36, 0)
7273 g_type_init();
74 #endif
7375 GtkIconFactory *factory = gtk_icon_factory_new();
7476 for (image_entry *p = image_data; p->icon_name; p++) {
7577 gtk_icon_factory_add(
2323 #define __GX_INIT_H__
2424
2525 #include <gtk/gtk.h>
26 #include <glib.h>
2627
2728 G_BEGIN_DECLS
2829
0 #include <glibmm.h>
01 #include <gtkmm/main.h>
12 #include <gtkmm/window.h>
23 #include <gtkmm/box.h>
1515 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1616 */
1717
18 #include <glibmm.h>
1819 #include <gtkmm/main.h>
1920 #include <gxw/gxinit.h>
2021 #include <gxwmm/init.h>
1717 const=True,
1818 help=('install shared library headers'),
1919 )
20 grp.add_option('--no-ldconfig',
21 action='store_const',
22 default=False,
23 const=True,
24 help=('dont run ldconfig'),
25 )
2026 grp.add_option('--generate-cpp-wrapper',
2127 action='store_const',
2228 default=False,
2329 const=True,
24 help=('use the pre-built c++ library wrapper files'),
30 help=('re-generate the pre-built c++ library wrapper files (Developers only!!)'),
2531 )
2632
2733 def configure(conf):
4248 conf.env["GX_LIB_SHARED"] = True
4349 conf.env["GX_LIB_DEV"] = True
4450 conf.env["GX_LIB_STATIC"] = False
51 if Options.options.no_ldconfig:
52 conf.env["NO_LDCONFIG"] = True
4553
4654
4755 def template2cc(task):
3333 #include <gxwmm/selector.h>
3434 #include <gxwmm/smallknob.h>
3535 #include <gxwmm/smallknobr.h>
36 #include <gxwmm/simplevaluedisplay.h>
3637 #include <gxwmm/switch.h>
3738 #include <gxwmm/toggleimage.h>
3839 #include <gxwmm/tuner.h>
3940 #include <gxwmm/racktuner.h>
4041 #include <gxwmm/vslider.h>
42 #include <gxwmm/valuedisplay.h>
4143 #include <gxwmm/waveview.h>
4244 #include <gxwmm/wheel.h>
4345 #include <gxwmm/portdisplay.h>
88 action='store_const',
99 default=False,
1010 const=True,
11 help=('build python wrapper for library'),
11 help=('build python wrapper for library (Developers only!!)'),
1212 )
1313
1414 def configure(conf):
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 // generated by ../../tools/tube_transfer.py
20 // tube: 12AT7
21 // plate current function: triode
22 // mu: 60
23 // kx: 1.35
24 // kg1: 460
25 // kp: 300
26 // kvb: 300
27
28 table1d_imp<2001> tubetable_12AT7[2] =
29 {
30 {
31 // Ri = 68k
32 -5,5,200,2001, {
33 223.484971051,223.38189846,223.278606859,223.175096438,223.071367386,
34 222.967419894,222.863254153,222.758870355,222.654268692,222.549449358,
35 222.444412546,222.339158451,222.233687268,222.127999193,222.022094421,
36 221.915973151,221.809635579,221.703081904,221.596312324,221.489327039,
37 221.382126248,221.274710152,221.167078951,221.059232846,220.951172041,
38 220.842896736,220.734407134,220.62570344,220.516785857,220.407654588,
39 220.298309839,220.188751814,220.078980719,219.96899676,219.858800143,
40 219.748391075,219.637769762,219.526936413,219.415891235,219.304634436,
41 219.193166225,219.081486809,218.9695964,218.857495205,218.745183435,
42 218.6326613,218.519929009,218.406986775,218.293834807,218.180473316,
43 218.066902515,217.953122614,217.839133825,217.724936362,217.610530435,
44 217.495916257,217.381094042,217.266064002,217.150826349,217.035381299,
45 216.919729063,216.803869855,216.68780389,216.571531381,216.455052541,
46 216.338367587,216.22147673,216.104380187,215.987078171,215.869570897,
47 215.75185858,215.633941434,215.515819675,215.397493517,215.278963175,
48 215.160228865,215.041290801,214.922149198,214.802804272,214.683256238,
49 214.563505311,214.443551707,214.32339564,214.203037325,214.082476979,
50 213.961714816,213.840751051,213.719585899,213.598219576,213.476652297,
51 213.354884277,213.232915731,213.110746873,212.988377919,212.865809083,
52 212.74304058,212.620072625,212.496905433,212.373539217,212.249974193,
53 212.126210573,212.002248574,211.878088408,211.75373029,211.629174433,
54 211.504421051,211.379470357,211.254322565,211.128977889,211.003436541,
55 210.877698734,210.751764681,210.625634594,210.499308686,210.37278717,
56 210.246070256,210.119158158,209.992051086,209.864749253,209.737252869,
57 209.609562146,209.481677294,209.353598524,209.225326046,209.096860071,
58 208.968200809,208.839348469,208.710303261,208.581065394,208.451635077,
59 208.322012519,208.192197928,208.062191513,207.931993481,207.801604041,
60 207.671023398,207.540251762,207.409289338,207.278136334,207.146792955,
61 207.015259407,206.883535897,206.75162263,206.61951981,206.487227642,
62 206.354746332,206.222076083,206.089217099,205.956169583,205.82293374,
63 205.689509771,205.555897879,205.422098267,205.288111136,205.153936688,
64 205.019575125,204.885026646,204.750291453,204.615369746,204.480261724,
65 204.344967587,204.209487534,204.073821763,203.937970474,203.801933864,
66 203.66571213,203.52930547,203.392714081,203.255938159,203.1189779,
67 202.9818335,202.844505154,202.706993058,202.569297405,202.43141839,
68 202.293356206,202.155111047,202.016683105,201.878072574,201.739279645,
69 201.60030451,201.46114736,201.321808386,201.182287779,201.042585728,
70 200.902702422,200.762638052,200.622392806,200.481966872,200.341360438,
71 200.200573691,200.059606819,199.918460008,199.777133444,199.635627312,
72 199.493941798,199.352077087,199.210033363,199.067810809,198.92540961,
73 198.782829948,198.640072006,198.497135966,198.354022009,198.210730316,
74 198.067261068,197.923614446,197.779790629,197.635789796,197.491612126,
75 197.347257797,197.202726987,197.058019875,196.913136635,196.768077446,
76 196.622842482,196.477431919,196.331845933,196.186084697,196.040148386,
77 195.894037174,195.747751232,195.601290734,195.454655852,195.307846758,
78 195.160863622,195.013706614,194.866375906,194.718871667,194.571194065,
79 194.423343269,194.275319448,194.127122768,193.978753398,193.830211503,
80 193.681497249,193.532610803,193.383552329,193.234321992,193.084919955,
81 192.935346382,192.785601437,192.635685281,192.485598078,192.335339987,
82 192.18491117,192.034311788,191.883542,191.732601966,191.581491845,
83 191.430211795,191.278761974,191.127142539,190.975353646,190.823395453,
84 190.671268115,190.518971788,190.366506625,190.213872781,190.061070409,
85 189.908099664,189.754960697,189.60165366,189.448178705,189.294535983,
86 189.140725644,188.986747838,188.832602715,188.678290424,188.523811112,
87 188.369164928,188.214352019,188.059372531,187.904226611,187.748914404,
88 187.593436056,187.43779171,187.281981512,187.126005604,186.96986413,
89 186.813557231,186.65708505,186.500447728,186.343645406,186.186678223,
90 186.029546321,185.872249837,185.71478891,185.55716368,185.399374282,
91 185.241420854,185.083303532,184.925022452,184.766577751,184.607969561,
92 184.449198018,184.290263255,184.131165406,183.971904602,183.812480977,
93 183.652894661,183.493145785,183.33323448,183.173160876,183.012925102,
94 182.852527286,182.691967557,182.531246043,182.37036287,182.209318165,
95 182.048112054,181.886744663,181.725216116,181.563526537,181.401676051,
96 181.239664781,181.077492849,180.915160377,180.752667487,180.590014299,
97 180.427200936,180.264227515,180.101094157,179.93780098,179.774348102,
98 179.610735642,179.446963716,179.283032441,179.118941932,178.954692305,
99 178.790283676,178.625716158,178.460989865,178.29610491,178.131061407,
100 177.965859466,177.8004992,177.634980719,177.469304135,177.303469556,
101 177.137477092,176.971326852,176.805018943,176.638553475,176.471930553,
102 176.305150284,176.138212774,175.971118129,175.803866452,175.63645785,
103 175.468892424,175.301170279,175.133291517,174.965256239,174.797064548,
104 174.628716544,174.460212328,174.291551999,174.122735656,173.953763399,
105 173.784635325,173.615351532,173.445912117,173.276317175,173.106566804,
106 172.936661098,172.766600153,172.596384061,172.426012917,172.255486814,
107 172.084805844,171.9139701,171.742979672,171.571834651,171.400535128,
108 171.229081192,171.057472933,170.885710438,170.713793796,170.541723094,
109 170.36949842,170.197119859,170.024587497,169.851901419,169.679061711,
110 169.506068455,169.332921736,169.159621635,168.986168237,168.812561622,
111 168.638801872,168.464889067,168.290823288,168.116604613,167.942233123,
112 167.767708895,167.593032007,167.418202536,167.24322056,167.068086154,
113 166.892799395,166.717360356,166.541769112,166.366025738,166.190130307,
114 166.014082891,165.837883563,165.661532395,165.485029456,165.308374819,
115 165.131568552,164.954610726,164.777501409,164.60024067,164.422828575,
116 164.245265193,164.06755059,163.889684831,163.711667983,163.533500109,
117 163.355181276,163.176711545,162.998090981,162.819319646,162.640397602,
118 162.46132491,162.282101632,162.102727828,161.923203558,161.743528881,
119 161.563703855,161.383728539,161.20360299,161.023327265,160.842901421,
120 160.662325513,160.481599598,160.300723728,160.11969796,159.938522345,
121 159.757196938,159.57572179,159.394096954,159.212322481,159.030398422,
122 158.848324827,158.666101745,158.483729225,158.301207317,158.118536068,
123 157.935715525,157.752745735,157.569626745,157.3863586,157.202941345,
124 157.019375024,156.835659683,156.651795363,156.467782109,156.283619962,
125 156.099308963,155.914849155,155.730240578,155.545483271,155.360577274,
126 155.175522626,154.990319366,154.80496753,154.619467157,154.433818283,
127 154.248020943,154.062075174,153.87598101,153.689738486,153.503347636,
128 153.316808491,153.130121087,152.943285453,152.756301622,152.569169625,
129 152.381889493,152.194461254,152.006884938,151.819160575,151.631288191,
130 151.443267815,151.255099474,151.066783193,150.878318999,150.689706918,
131 150.500946973,150.312039189,150.122983589,149.933780197,149.744429035,
132 149.554930124,149.365283487,149.175489143,148.985547114,148.795457417,
133 148.605220074,148.414835102,148.224302518,148.033622341,147.842794587,
134 147.651819272,147.460696413,147.269426023,147.078008117,146.88644271,
135 146.694729815,146.502869444,146.31086161,146.118706324,145.926403598,
136 145.733953442,145.541355866,145.348610879,145.15571849,144.962678708,
137 144.76949154,144.576156994,144.382675075,144.18904579,143.995269144,
138 143.801345143,143.60727379,143.413055089,143.218689043,143.024175656,
139 142.829514928,142.634706862,142.439751458,142.244648717,142.049398638,
140 141.854001221,141.658456465,141.462764367,141.266924924,141.070938135,
141 140.874803995,140.678522501,140.482093647,140.285517428,140.088793838,
142 139.891922871,139.694904521,139.497738779,139.300425637,139.102965087,
143 138.905357119,138.707601724,138.509698892,138.311648611,138.113450871,
144 137.915105658,137.716612961,137.517972767,137.319185062,137.120249831,
145 136.921167061,136.721936735,136.522558838,136.323033353,136.123360263,
146 135.923539552,135.7235712,135.52345519,135.323191502,135.122780116,
147 134.922221012,134.72151417,134.520659568,134.319657184,134.118506996,
148 133.917208981,133.715763115,133.514169375,133.312427735,133.110538172,
149 132.908500658,132.706315168,132.503981676,132.301500154,132.098870574,
150 131.896092908,131.693167128,131.490093204,131.286871106,131.083500803,
151 130.879982266,130.676315463,130.472500361,130.268536929,130.064425133,
152 129.860164941,129.655756317,129.451199229,129.24649364,129.041639516,
153 128.836636821,128.631485518,128.426185571,128.220736941,128.015139592,
154 127.809393485,127.603498581,127.397454841,127.191262225,126.984920693,
155 126.778430205,126.57179072,126.365002195,126.158064589,125.950977859,
156 125.743741963,125.536356858,125.328822499,125.121138842,124.913305843,
157 124.705323458,124.497191639,124.288910343,124.080479522,123.87189913,
158 123.66316912,123.454289445,123.245260057,123.036080908,122.82675195,
159 122.617273133,122.407644409,122.197865728,121.987937041,121.777858298,
160 121.567629447,121.357250439,121.146721222,120.936041745,120.725211957,
161 120.514231806,120.30310124,120.091820207,119.880388654,119.668806528,
162 119.457073777,119.245190347,119.033156186,118.82097124,118.608635455,
163 118.396148777,118.183511154,117.970722531,117.757782854,117.544692069,
164 117.331450122,117.118056958,116.904512525,116.690816767,116.476969631,
165 116.262971063,116.048821008,115.834519413,115.620066224,115.405461388,
166 115.19070485,114.975796559,114.76073646,114.545524502,114.330160631,
167 114.114644796,113.898976945,113.683157025,113.467184988,113.25106078,
168 113.034784354,112.818355658,112.601774644,112.385041264,112.168155469,
169 111.951117213,111.733926449,111.516583131,111.299087215,111.081438657,
170 110.863637413,110.645683442,110.427576702,110.209317154,109.990904759,
171 109.772339479,109.553621277,109.334750119,109.115725972,108.896548803,
172 108.677218581,108.457735278,108.238098866,108.01830932,107.798366617,
173 107.578270734,107.358021653,107.137619356,106.917063827,106.696355055,
174 106.475493028,106.25447774,106.033309184,105.81198736,105.590512267,
175 105.36888391,105.147102295,104.925167434,104.703079339,104.480838028,
176 104.258443522,104.035895848,103.813195034,103.590341113,103.367334124,
177 103.14417411,102.920861118,102.697395202,102.473776418,102.250004831,
178 102.02608051,101.802003529,101.577773971,101.353391923,101.128857479,
179 100.904170741,100.679331818,100.454340825,100.229197888,100.003903138,
180 99.778456717,99.5528587734,99.3271094667,99.1012089653,98.8751574477,
181 98.6489551024,98.4226021292,98.1960987386,97.969445153,97.7426416069,
182 97.5156883471,97.2885856338,97.0613337405,96.833932955,96.6063835797,
183 96.3786859321,96.1508403457,95.9228471705,95.6947067733,95.4664195391,
184 95.2379858709,95.0094061912,94.7806809423,94.5518105871,94.3227956102,
185 94.0936365183,93.8643338415,93.6348881337,93.405299974,93.1755699676,
186 92.9456987464,92.7156869704,92.4855353287,92.2552445406,92.0248153569,
187 91.7942485605,91.5635449686,91.3327054332,91.1017308426,90.8706221232,
188 90.6393802404,90.4080062002,90.1765010512,89.9448658855,89.7131018408,
189 89.4812101019,89.2491919027,89.0170485276,88.784781314,88.5523916537,
190 88.3198809952,88.0872508458,87.8545027735,87.6216384098,87.3886594513,
191 87.1555676628,86.9223648793,86.6890530085,86.4556340339,86.2221100172,
192 85.9884831011,85.7547555124,85.5209295646,85.2870076616,85.0529923004,
193 84.8188860745,84.5846916773,84.3504119056,84.1160496633,83.8816079647,
194 83.647089939,83.4124988332,83.1778380171,82.9431109867,82.7083213689,
195 82.4734729256,82.2385695581,82.0036153116,81.7686143804,81.5335711119,
196 81.2984900118,81.0633757495,80.8282331624,80.5930672616,80.3578832372,
197 80.1226864634,79.8874825043,79.6522771191,79.417076268,79.1818861179,
198 78.946713048,78.7115636561,78.4764447639,78.2413634234,78.0063269226,
199 77.7713427919,77.5364188098,77.3015630089,77.0667836823,76.832089389,
200 76.5974889606,76.3629915064,76.1286064198,75.8943433838,75.6602123765,
201 75.4262236766,75.1923878688,74.9587158488,74.7252188281,74.4919083386,
202 74.2587962373,74.0258947099,73.7932162747,73.5607737859,73.3285804366,
203 73.0966497613,72.8649956377,72.6336322885,72.4025742822,72.1718365333,
204 71.9414343025,71.7113831952,71.4816991604,71.2523984878,71.0234978052,
205 70.7950140739,70.5669645844,70.3393669505,70.1122391024,69.8855992793,
206 69.659466021,69.4338581579,69.2087948004,68.9842953275,68.7603793738,
207 68.5370668156,68.3143777559,68.0923325085,67.8709515808,67.6502556556,
208 67.4302655713,67.2110023025,66.9924869376,66.7747406569,66.5577847094,
209 66.341640388,66.1263290049,65.9118718655,65.6982902415,65.485605344,
210 65.2738382953,65.0630101007,64.8531416195,64.644253536,64.4363663304,
211 64.2295002488,64.0236752742,63.8189110973,63.6152270868,63.4126422611,
212 63.2111752599,63.0108443162,62.8116672294,62.613661339,62.4168434988,
213 62.2212300529,62.026836812,61.8336790312,61.6417713894,61.4511279693,
214 61.2617622392,61.0736870367,60.8869145531,60.7014563202,60.5173231979,
215 60.3345253642,60.1530723064,59.9729728143,59.7942349746,59.6168661678,
216 59.4408730656,59.2662616311,59.0930371202,58.9212040837,58.7507663728,
217 58.5817271438,58.4140888665,58.2478533317,58.0830216621,57.9195943226,
218 57.757571133,57.5969512811,57.437733337,57.2799152681,57.1234944552,
219 56.9684677091,56.8148312878,56.6625809145,56.5117117958,56.3622186407,
220 56.2140956792,56.0673366819,55.9219349798,55.777883483,55.6351747015,
221 55.4938007636,55.3537534367,55.2150241456,55.0776039925,54.9414837759,
222 54.8066540091,54.6731049389,54.5408265635,54.4098086506,54.2800407545,
223 54.1515122329,54.0242122639,53.8981298612,53.7732538906,53.6495730842,
224 53.5270760555,53.4057513131,53.2855872745,53.166572279,53.0486945999,
225 52.9319424571,52.816304028,52.7017674586,52.5883208741,52.4759523889,
226 52.3646501157,52.2544021747,52.1451967025,52.0370218595,51.9298658379,
227 51.8237168688,51.718563229,51.6143932475,51.5111953109,51.4089578697,
228 51.3076694432,51.2073186239,51.1078940829,51.0093845734,50.9117789348,
229 50.815066096,50.7192350793,50.6242750025,50.5301750825,50.4369246372,
230 50.3445130879,50.2529299611,50.1621648909,50.0722076197,49.9830480004,
231 49.894675997,49.8070816859,49.7202552566,49.6341870125,49.5488673716,
232 49.4642868666,49.3804361451,49.2973059702,49.2148872203,49.1331708887,
233 49.052148084,48.9718100296,48.892148063,48.8131536359,48.7348183134,
234 48.6571337734,48.5800918059,48.5036843125,48.4279033056,48.3527409073,
235 48.2781893488,48.2042409693,48.1308882153,48.0581236393,47.9859398991,
236 47.9143297565,47.8432860762,47.772801825,47.7028700705,47.6334839797,
237 47.5646368183,47.4963219495,47.4285328322,47.3612630208,47.2945061629,
238 47.2282559993,47.1625063616,47.0972511721,47.0324844415,46.9682002687,
239 46.9043928391,46.8410564231,46.7781853756,46.7157741343,46.6538172188,
240 46.5923092291,46.5312448446,46.4706188231,46.4104259995,46.3506612843,
241 46.2913196632,46.2323961953,46.1738860123,46.1157843173,46.0580863839,
242 46.0007875547,45.9438832405,45.8873689195,45.8312401357,45.7754924981,
243 45.7201216798,45.665123417,45.6104935076,45.5562278108,45.5023222456,
244 45.4487727904,45.3955754813,45.3427264119,45.2902217321,45.238057647,
245 45.1862304162,45.1347363532,45.0835718238,45.0327332461,44.982217089,
246 44.9320198716,44.8821381626,44.8325685792,44.7833077865,44.7343524964,
247 44.6856994674,44.6373455033,44.5892874528,44.5415222087,44.4940467071,
248 44.4468579267,44.3999528883,44.3533286537,44.3069823257,44.2609110467,
249 44.2151119985,44.1695824018,44.124319515,44.0793206341,44.034583092,
250 43.9901042576,43.9458815358,43.9019123661,43.8581942231,43.8147246147,
251 43.7715010829,43.728521202,43.6857825789,43.6432828524,43.6010196926,
252 43.5589908004,43.5171939069,43.4756267733,43.4342871901,43.3931729766,
253 43.3522819807,43.3116120784,43.2711611731,43.2309271955,43.1909081027,
254 43.1511018785,43.1115065323,43.0721200993,43.0329406393,42.9939662373,
255 42.9551950023,42.9166250673,42.878254589,42.8400817471,42.8021047443,
256 42.7643218057,42.7267311786,42.6893311322,42.6521199569,42.6150959646,
257 42.5782574877,42.5416028795,42.5051305131,42.4688387817,42.4327260982,
258 42.3967908945,42.3610316219,42.32544675,42.2900347672,42.2547941799,
259 42.2197235125,42.184821307,42.1500861227,42.1155165361,42.0811111406,
260 42.0468685461,42.0127873789,41.9788662816,41.9451039126,41.9114989459,
261 41.8780500709,41.8447559925,41.8116154303,41.7786271187,41.7457898069,
262 41.7131022583,41.6805632504,41.6481715748,41.6159260367,41.5838254549,
263 41.5518686617,41.5200545023,41.4883818353,41.4568495316,41.4254564751,
264 41.394201562,41.3630837008,41.3321018122,41.3012548286,41.2705416944,
265 41.2399613655,41.2095128092,41.1791950042,41.1490069403,41.1189476183,
266 41.0890160496,41.0592112567,41.0295322723,40.9999781396,40.970547912,
267 40.9412406531,40.9120554366,40.8829913457,40.8540474735,40.8252229228,
268 40.7965168056,40.7679282435,40.7394563671,40.7111003161,40.6828592393,
269 40.6547322942,40.626718647,40.5988174728,40.5710279548,40.5433492849,
270 40.5157806631,40.4883212976,40.4609704049,40.433727209,40.4065909422,
271 40.3795608443,40.3526361629,40.3258161531,40.2991000774,40.2724872058,
272 40.2459768155,40.2195681909,40.1932606236,40.1670534118,40.1409458612,
273 40.114937284,40.089026999,40.063214332,40.0374986152,40.0118791874,
274 39.9863553935,39.9609265851,39.9355921199,39.9103513619,39.8852036809,
275 39.8601484532,39.8351850605,39.8103128908,39.7855313379,39.7608398011,
276 39.7362376854,39.7117244017,39.6872993662,39.6629620004,39.6387117317,
277 39.6145479924,39.5904702202,39.5664778582,39.5425703542,39.5187471617,
278 39.4950077387,39.4713515484,39.447778059,39.4242867434,39.4008770793,
279 39.3775485493,39.3543006404,39.3311328446,39.3080446582,39.2850355821,
280 39.2621051218,39.2392527869,39.2164780918,39.193780555,39.1711596991,
281 39.1486150512,39.1261461426,39.1037525085,39.0814336882,39.0591892253,
282 39.0370186672,39.0149215651,38.9928974745,38.9709459543,38.9490665676,
283 38.9272588811,38.9055224652,38.883856894,38.8622617454,38.8407366006,
284 38.8192810448,38.7978946663,38.7765770572,38.7553278128,38.7341465321,
285 38.7130328173,38.6919862739,38.6710065108,38.6500931402,38.6292457774,
286 38.608464041,38.5877475528,38.5670959377,38.5465088236,38.5259858415,
287 38.5055266257,38.485130813,38.4647980436,38.4445279604,38.4243202094,
288 38.4041744393,38.3840903017,38.3640674511,38.3441055447,38.3242042424,
289 38.3043632069,38.2845821037,38.2648606009,38.2451983691,38.2255950817,
290 38.2060504147,38.1865640465,38.1671356581,38.1477649333,38.1284515578,
291 38.1091952204,38.0899956119,38.0708524256,38.0517653574,38.0327341052,
292 38.0137583696,37.9948378534,37.9759722615,37.9571613012,37.9384046823,
293 37.9197021164,37.9010533177,37.8824580021,37.8639158882,37.8454266964,
294 37.8269901493,37.8086059716,37.7902738901,37.7719936336,37.753764933,
295 37.7355875212,37.717461133,37.6993855054,37.6813603772,37.6633854891,
296 37.6454605838,37.6275854059,37.6097597018,37.59198322,37.5742557106,
297 37.5565769256,37.5389466189,37.521364546,37.5038304645,37.4863441334,
298 37.4689053137,37.4515137681,37.4341692609,37.4168715581,37.3996204275,
299 37.3824156386,37.3652569623,37.3481441714,37.3310770401,37.3140553445,
300 37.297078862,37.2801473717,37.2632606542,37.2464184918,37.2296206681,
301 37.2128669684,37.1961571795,37.1794910896,37.1628684884,37.1462891671,
302 37.1297529184,37.1132595362,37.0968088162,37.0804005552,37.0640345515,
303 37.0477106048,37.0314285162,37.0151880881,36.9989891244,36.9828314301,
304 36.9667148116,36.9506390768,36.9346040347,36.9186094956,36.9026552713,
305 36.8867411745,36.8708670195,36.8550326217,36.8392377978,36.8234823655,
306 36.807766144,36.7920889536,36.7764506158,36.7608509532,36.7452897896,
307 36.7297669502,36.714282261,36.6988355493,36.6834266436,36.6680553734,
308 36.6527215694,36.6374250634,36.6221656883,36.606943278,36.5917576675,
309 36.5766086929,36.5614961915,36.5464200014,36.5313799619,36.5163759132,
310 36.5014076967,36.4864751547,36.4715781305,36.4567164685,36.4418900139,
311 36.4270986131,36.4123421134,36.3976203629,36.382933211,36.3682805076,
312 36.353662104,36.3390778522,36.324527605,36.3100112165,36.2955285412,
313 36.2810794351,36.2666637545,36.252281357,36.237932101,36.2236158457,
314 36.2093324512,36.1950817784,36.1808636892,36.1666780462,36.152524713,
315 36.1384035538,36.1243144338,36.1102572191,36.0962317763,36.0822379733,
316 36.0682756782,36.0543447604,36.0404450898,36.0265765373,36.0127389743,
317 35.9989322732,35.9851563071,35.9714109499,35.957696076,35.944011561,
318 35.9303572808,35.9167331123,35.903138933,35.8895746213,35.8760400561,
319 35.8625351171,35.8490596847,35.8356136401,35.822196865,35.808809242,
320 35.7954506543,35.7821209857,35.7688201207,35.7555479447,35.7423043434,
321 35.7290892035,35.715902412,35.7027438569,35.6896134267,35.6765110104,
322 35.663436498,35.6503897796,35.6373707465,35.6243792901,35.6114153029,
323 35.5984786777,35.5855693079,35.5726870876,35.5598319116,35.5470036751,
324 35.534202274,35.5214276048,35.5086795644,35.4959580506,35.4832629614,
325 35.4705941957,35.4579516528,35.4453352325,35.4327448353,35.4201803622,
326 35.4076417148,35.3951287951,35.3826415057,35.3701797498,35.3577434311,
327 35.3453324539,35.3329467228,35.3205861432,35.3082506207,35.2959400619,
328 35.2836543733,35.2713934625,35.2591572371,35.2469456055,35.2347584766,
329 35.2225957595,35.2104573643,35.198343201,35.1862531805,35.174187214,
330 35.1621452133,35.1501270905,35.1381327583,35.1261621298,35.1142151186,
331 35.1022916388,35.0903916048,35.0785149317,35.0666615348,35.0548313299,
332 35.0430242335,35.0312401621,35.0194790329,35.0077407637,34.9960252724,
333 34.9843324774,34.9726622977,34.9610146526,34.9493894618,34.9377866455,
334 34.9262061242,34.9146478189,34.903111651,34.8915975423,34.880105415,
335 34.8686351915,34.8571867951,34.845760149,34.8343551769,34.8229718032,
336 34.8116099522,34.800269549,34.7889505189,34.7776527876,34.7663762811,
337 34.7551209259,34.7438866488,34.732673377,34.7214810381,34.7103095599,
338 34.6991588708,34.6880288994,34.6769195746,34.665830826,34.654762583,
339 34.6437147759,34.632687335,34.6216801911,34.6106932752,34.5997265188,
340 34.5887798536,34.5778532119,34.5669465259,34.5560597285,34.5451927529,
341 34.5343455323,34.5235180007,34.5127100921,34.5019217408,34.4911528817,
342 34.4804034497,34.4696733802,34.458962609,34.4482710719,34.4375987053,
343 34.4269454458,34.4163112303,34.405695996,34.3950996804,34.3845222213,
344 34.373963557,34.3634236256,34.3529023661,34.3423997173,34.3319156186,
345 34.3214500095,34.3110028299,34.30057402,34.2901635202,34.2797712711,
346 34.2693972139,34.2590412897,34.2487034402,34.2383836071,34.2280817325,
347 34.2177977589,34.2075316288,34.1972832853,34.1870526713,34.1768397305,
348 34.1666444064,34.1564666431,34.1463063848,34.1361635759,34.1260381613,
349 34.1159300859,34.1058392949,34.0957657339,34.0857093486,34.075670085,
350 34.0656478894,34.0556427083,34.0456544884,34.0356831767,34.0257287205,
351 34.0157910671,34.0058701643,33.9959659601,33.9860784026,33.9762074403,
352 33.9663530217,33.9565150959,33.9466936118,33.9368885189,33.9270997666,
353 33.9173273049,33.9075710837,33.8978310533,33.8881071641,33.8783993668,
354 33.8687076124,33.8590318519,33.8493720367,33.8397281184,33.8301000487,
355 33.8204877797,33.8108912635,33.8013104526,33.7917452996,33.7821957572,
356 33.7726617786,33.763143317,33.7536403258,33.7441527588,33.7346805697,
357 33.7252237126,33.7157821418,33.7063558118,33.6969446771,33.6875486927,
358 33.6781678136,33.6688019951,33.6594511925,33.6501153616,33.6407944581,
359 33.631488438,33.6221972577,33.6129208733,33.6036592416,33.5944123194,
360 33.5851800634,33.575962431,33.5667593793,33.5575708659,33.5483968486,
361 33.539237285,33.5300921334,33.5209613518,33.5118448987,33.5027427327,
362 33.4936548125,33.484581097,33.4755215454,33.4664761168,33.4574447707,
363 33.4484274668,33.4394241647,33.4304348245,33.4214594063,33.4124978703,
364 33.403550177,33.3946162869,33.3856961609,33.3767897599,33.367897045,
365 33.3590179775,33.3501525187,33.3413006302,33.3324622739,33.3236374115,
366 33.3148260051,33.3060280169,33.2972434094,33.2884721449,33.2797141863,
367 33.2709694962,33.2622380377,33.2535197739,33.2448146681,33.2361226837,
368 33.2274437842,33.2187779335,33.2101250953,33.2014852337,33.1928583128,
369 33.184244297,33.1756431507,33.1670548384,33.158479325,33.1499165753,
370 33.1413665542,33.1328292271,33.124304559,33.1157925156,33.1072930624,
371 33.098806165,33.0903317894,33.0818699015,33.0734204674,33.0649834534,
372 33.0565588258,33.0481465513,33.0397465963,33.0313589278,33.0229835126,
373 33.0146203178,33.0062693106,32.9979304582,32.989603728,32.9812890877,
374 32.972986505,32.9646959476,32.9564173834,32.9481507806,32.9398961073,
375 32.9316533318,32.9234224226,32.9152033482,32.9069960773,32.8988005787,
376 32.8906168214,32.8824447742,32.8742844065,32.8661356875,32.8579985866,
377 32.8498730732,32.8417591171,32.833656688,32.8255657557,32.8174862902,
378 32.8094182617,32.8013616402,32.7933163962,32.7852825001,32.7772599223,
379 32.7692486337,32.7612486048,32.7532598067,32.7452822103,32.7373157867,
380 32.7293605071,32.7214163428,32.7134832652,32.705561246,32.6976502567,
381 32.689750269,32.6818612548,32.6739831862,32.666116035,32.6582597736,
382 32.6504143741,32.6425798089,32.6347560506,32.6269430716,32.6191408447,
383 32.6113493427,32.6035685384,32.5957984048,32.588038915,32.5802900421,
384 32.5725517595,32.5648240406,32.5571068587,32.5494001875,32.5417040007,
385 32.5340182719,32.5263429752,32.5186780844,32.5110235735,32.5033794168,
386 32.4957455885,32.4881220628,32.4805088143,32.4729058175,32.4653130469,
387 32.4577304774,32.4501580835,32.4425958404,32.4350437229,32.4275017061,
388 32.4199697652,32.4124478754,32.404936012,32.3974341505,32.3899422665,
389 32.3824603354,32.374988333,32.3675262351,32.3600740175,32.3526316561,
390 32.3451991271,32.3377764065,32.3303634705,32.3229602955,32.3155668577,
391 32.3081831337,32.3008091,32.2934447331,32.2860900099,32.2787449071,
392 32.2714094015,32.2640834702,32.2567670901,32.2494602383,32.2421628922,
393 32.2348750288,32.2275966256,32.22032766,32.2130681096,32.2058179518,
394 32.1985771644,32.1913457251,32.1841236118,32.1769108022,32.1697072745,
395 32.1625130066,32.1553279767,32.148152163,32.1409855437,32.1338280972,
396 32.126679802,32.1195406365,32.1124105793,32.1052896091,32.0981777045,
397 32.0910748445,32.0839810077,32.0768961733,32.0698203201,32.0627534273,
398 32.0556954741,32.0486464396,32.0416063031,32.0345750441,32.0275526419,
399 32.020539076,32.0135343261,32.0065383718,31.9995511928,31.9925727688,
400 31.9856030797,31.9786421055,31.9716898261,31.9647462215,31.957811272,
401 31.9508849576,31.9439672587,31.9370581555,31.9301576284,31.9232656579,
402 31.9163822245,31.9095073088,31.9026408914,31.895782953,31.8889334744,
403 31.8820924364,31.87525982,31.8684356061,31.8616197757,31.8548123099,
404 31.8480131899,31.8412223968,31.834439912,31.8276657168,31.8208997926,
405 31.8141421208,31.8073926829,31.8006514606,31.7939184355,31.7871935893,
406 31.7804769038,31.7737683607,31.7670679419,31.7603756294,31.7536914052,
407 31.7470152514,31.74034715,31.7336870832,31.7270350332,31.7203909824,
408 31.7137549131,31.7071268077,31.7005066486,31.6938944183,31.6872900995,
409 31.6806936748,31.6741051267,31.6675244382,31.6609515919,31.6543865707,
410 31.6478293576,31.6412799354,31.6347382873,31.6282043961,31.6216782452,
411 31.6151598176,31.6086490966,31.6021460655,31.5956507075,31.5891630062,
412 31.5826829449,31.576210507,31.5697456763,31.5632884362,31.5568387704,
413 31.5503966626,31.5439620966,31.5375350561,31.5311155251,31.5247034874,
414 31.5182989269,31.5119018277,31.5055121739,31.4991299494,31.4927551386,
415 31.4863877255,31.4800276945,31.4736750299,31.4673297159,31.4609917371,
416 31.4546610778,31.4483377225,31.4420216558,31.4357128623,31.4294113266,
417 31.4231170334,31.4168299674,31.4105501135,31.4042774564,31.398011981,
418 31.3917536723,31.3855025152,31.3792584947,31.3730215959,31.3667918039,
419 31.3605691038,31.3543534809,31.3481449203,31.3419434074,31.3357489276,
420 31.329561466,31.3233810083,31.3172075399,31.3110410462,31.3048815128,
421 31.2987289254,31.2925832695,31.2864445309,31.2803126952,31.2741877483,
422 31.2680696759,31.261958464,31.2558540983,31.249756565,31.2436658498,
423 31.2375819389,31.2315048184,31.2254344742,31.2193708927,31.2133140599,
424 31.2072639622,31.2012205857,31.1951839169,31.189153942,31.1831306474,
425 31.1771140197,31.1711040452,31.1651007105,31.1591040022,31.1531139068,
426 31.1471304109,31.1411535014,31.1351831648,31.1292193879,31.1232621575,
427 31.1173114605,31.1113672838,31.1054296141,31.0994984385,31.0935737441,
428 31.0876555177,31.0817437464,31.0758384175,31.0699395179,31.0640470349,
429 31.0581609557,31.0522812675,31.0464079577,31.0405410135,31.0346804223,
430 31.0288261716,31.0229782487,31.0171366411,31.0113013363,31.0054723219,
431 30.9996495855,30.9938331146,30.988022897,30.9822189203,30.9764211722,
432 30.9706296405,30.9648443129,30.9590651774,30.9532922218,30.9475254339,
433 30.9417648017
434 }
435 },
436 {
437 // Ri = 250k
438 -5,5,200,2001, {
439 223.484971051,223.38189846,223.278606859,223.175096438,223.071367386,
440 222.967419894,222.863254153,222.758870355,222.654268692,222.549449358,
441 222.444412546,222.339158451,222.233687268,222.127999193,222.022094421,
442 221.915973151,221.809635579,221.703081904,221.596312324,221.489327039,
443 221.382126248,221.274710152,221.167078951,221.059232846,220.951172041,
444 220.842896736,220.734407134,220.62570344,220.516785857,220.407654588,
445 220.298309839,220.188751814,220.078980719,219.96899676,219.858800143,
446 219.748391075,219.637769762,219.526936413,219.415891235,219.304634436,
447 219.193166225,219.081486809,218.9695964,218.857495205,218.745183435,
448 218.6326613,218.519929009,218.406986775,218.293834807,218.180473316,
449 218.066902515,217.953122614,217.839133825,217.724936362,217.610530435,
450 217.495916257,217.381094042,217.266064002,217.150826349,217.035381299,
451 216.919729063,216.803869855,216.68780389,216.571531381,216.455052541,
452 216.338367587,216.22147673,216.104380187,215.987078171,215.869570897,
453 215.75185858,215.633941434,215.515819675,215.397493517,215.278963175,
454 215.160228865,215.041290801,214.922149198,214.802804272,214.683256238,
455 214.563505311,214.443551707,214.32339564,214.203037325,214.082476979,
456 213.961714816,213.840751051,213.719585899,213.598219576,213.476652297,
457 213.354884277,213.232915731,213.110746873,212.988377919,212.865809083,
458 212.74304058,212.620072625,212.496905433,212.373539217,212.249974193,
459 212.126210573,212.002248574,211.878088408,211.75373029,211.629174433,
460 211.504421051,211.379470357,211.254322565,211.128977889,211.003436541,
461 210.877698734,210.751764681,210.625634594,210.499308686,210.37278717,
462 210.246070256,210.119158158,209.992051086,209.864749253,209.737252869,
463 209.609562146,209.481677294,209.353598524,209.225326046,209.096860071,
464 208.968200809,208.839348469,208.710303261,208.581065394,208.451635077,
465 208.322012519,208.192197928,208.062191513,207.931993481,207.801604041,
466 207.671023398,207.540251762,207.409289338,207.278136334,207.146792955,
467 207.015259407,206.883535897,206.75162263,206.61951981,206.487227642,
468 206.354746332,206.222076083,206.089217099,205.956169583,205.82293374,
469 205.689509771,205.555897879,205.422098267,205.288111136,205.153936688,
470 205.019575125,204.885026646,204.750291453,204.615369746,204.480261724,
471 204.344967587,204.209487534,204.073821763,203.937970474,203.801933864,
472 203.66571213,203.52930547,203.392714081,203.255938159,203.1189779,
473 202.9818335,202.844505154,202.706993058,202.569297405,202.43141839,
474 202.293356206,202.155111047,202.016683105,201.878072574,201.739279645,
475 201.60030451,201.46114736,201.321808386,201.182287779,201.042585728,
476 200.902702422,200.762638052,200.622392806,200.481966872,200.341360438,
477 200.200573692,200.059606819,199.918460008,199.777133444,199.635627312,
478 199.493941798,199.352077087,199.210033363,199.067810809,198.92540961,
479 198.782829948,198.640072006,198.497135966,198.354022009,198.210730316,
480 198.067261068,197.923614446,197.779790629,197.635789796,197.491612126,
481 197.347257797,197.202726987,197.058019875,196.913136635,196.768077446,
482 196.622842482,196.477431919,196.331845933,196.186084697,196.040148386,
483 195.894037174,195.747751232,195.601290734,195.454655852,195.307846758,
484 195.160863622,195.013706614,194.866375906,194.718871667,194.571194065,
485 194.423343269,194.275319448,194.127122768,193.978753398,193.830211503,
486 193.681497249,193.532610803,193.383552329,193.234321992,193.084919955,
487 192.935346382,192.785601437,192.635685281,192.485598078,192.335339987,
488 192.18491117,192.034311788,191.883542,191.732601966,191.581491845,
489 191.430211795,191.278761974,191.127142539,190.975353646,190.823395454,
490 190.671268116,190.518971788,190.366506625,190.213872781,190.06107041,
491 189.908099664,189.754960697,189.60165366,189.448178705,189.294535983,
492 189.140725644,188.986747838,188.832602716,188.678290424,188.523811112,
493 188.369164928,188.214352019,188.059372531,187.904226611,187.748914404,
494 187.593436056,187.43779171,187.281981512,187.126005604,186.96986413,
495 186.813557231,186.65708505,186.500447728,186.343645406,186.186678223,
496 186.029546321,185.872249837,185.714788911,185.55716368,185.399374282,
497 185.241420854,185.083303532,184.925022453,184.766577751,184.607969561,
498 184.449198018,184.290263255,184.131165406,183.971904603,183.812480977,
499 183.652894661,183.493145785,183.333234481,183.173160876,183.012925102,
500 182.852527286,182.691967558,182.531246043,182.37036287,182.209318165,
501 182.048112055,181.886744663,181.725216116,181.563526538,181.401676052,
502 181.239664781,181.077492849,180.915160377,180.752667487,180.5900143,
503 180.427200936,180.264227516,180.101094157,179.937800981,179.774348103,
504 179.610735643,179.446963717,179.283032441,179.118941933,178.954692306,
505 178.790283677,178.625716159,178.460989866,178.296104912,178.131061408,
506 177.965859467,177.800499201,177.634980721,177.469304136,177.303469557,
507 177.137477093,176.971326853,176.805018945,176.638553477,176.471930555,
508 176.305150286,176.138212776,175.971118131,175.803866455,175.636457852,
509 175.468892427,175.301170281,175.133291519,174.965256242,174.797064551,
510 174.628716547,174.460212331,174.291552002,174.12273566,173.953763402,
511 173.784635329,173.615351536,173.44591212,173.276317179,173.106566808,
512 172.936661103,172.766600157,172.596384066,172.426012922,172.255486819,
513 172.084805849,171.913970105,171.742979677,171.571834657,171.400535134,
514 171.229081198,171.057472939,170.885710445,170.713793803,170.541723102,
515 170.369498428,170.197119867,170.024587505,169.851901428,169.67906172,
516 169.506068464,169.332921745,169.159621646,168.986168248,168.812561633,
517 168.638801884,168.464889079,168.2908233,168.116604626,167.942233136,
518 167.767708909,167.593032021,167.418202552,167.243220576,167.068086171,
519 166.892799412,166.717360374,166.541769131,166.366025758,166.190130327,
520 166.014082912,165.837883585,165.661532417,165.48502948,165.308374843,
521 165.131568578,164.954610753,164.777501437,164.600240698,164.422828605,
522 164.245265224,164.067550622,163.889684865,163.711668018,163.533500146,
523 163.355181313,163.176711584,162.998091022,162.819319688,162.640397646,
524 162.461324957,162.28210168,162.102727878,161.92320361,161.743528935,
525 161.563703911,161.383728597,161.203603051,161.023327328,160.842901487,
526 160.662325582,160.481599669,160.300723803,160.119698037,159.938522426,
527 159.757197022,159.575721877,159.394097045,159.212322576,159.03039852,
528 158.848324929,158.666101851,158.483729336,158.301207432,158.118536187,
529 157.935715649,157.752745864,157.569626879,157.38635874,157.20294149,
530 157.019375176,156.83565984,156.651795527,156.467782279,156.283620139,
531 156.099309148,155.914849347,155.730240777,155.545483478,155.36057749,
532 155.175522851,154.9903196,154.804967774,154.61946741,154.433818546,
533 154.248021217,154.062075459,153.875981307,153.689738795,153.503347956,
534 153.316808825,153.130121434,152.943285814,152.756301998,152.569170017,
535 152.3818899,152.194461677,152.006885379,151.819161033,151.631288668,
536 151.443268311,151.25509999,151.06678373,150.878319558,150.689707498,
537 150.500947577,150.312039817,150.122984243,149.933780877,149.744429742,
538 149.55493086,149.365284253,149.17548994,148.985547943,148.79545828,
539 148.605220971,148.414836035,148.224303489,148.033623351,147.842795638,
540 147.651820366,147.46069755,147.269427206,147.078009348,146.886443991,
541 146.694731147,146.50287083,146.310863051,146.118707824,145.926405158,
542 145.733955065,145.541357554,145.348612635,145.155720318,144.962680609,
543 144.769493518,144.576159051,144.382677215,144.189048016,143.995271461,
544 143.801347552,143.607276296,143.413057696,143.218691756,143.024178478,
545 142.829517864,142.634709916,142.439754635,142.244652022,142.049402077,
546 141.854004798,141.658460186,141.462768238,141.266928951,141.070942324,
547 140.874808353,140.678527034,140.482098363,140.285522334,140.088798942,
548 139.891928181,139.694910044,139.497744525,139.300431614,139.102971305,
549 138.905363588,138.707608454,138.509705892,138.311655894,138.113458446,
550 137.915113539,137.71662116,137.517981296,137.319193934,137.120259061,
551 136.921176662,136.721946723,136.522569228,136.323044162,136.123371508,
552 135.923551249,135.723583369,135.523467849,135.32320467,135.122793815,
553 134.922235263,134.721528995,134.52067499,134.319673227,134.118523685,
554 133.917226342,133.715781176,133.514188163,133.31244728,133.110558503,
555 132.908521808,132.70633717,132.504004564,132.301523963,132.098895342,
556 131.896118674,131.693193931,131.490121086,131.286900111,131.083530977,
557 130.880013655,130.676348115,130.472534329,130.268572264,130.064461891,
558 129.860203179,129.655796095,129.451240608,129.246536686,129.041684295,
559 128.836683403,128.631533975,128.426235979,128.220789379,128.015194141,
560 127.80945023,127.603557611,127.397516247,127.191326104,126.984987144,
561 126.778499331,126.571862629,126.365076999,126.158142404,125.951058808,
562 125.74382617,125.536444455,125.328913622,125.121233634,124.913404451,
563 124.705426035,124.497298346,124.289021346,124.080594993,123.87201925,
564 123.663294075,123.45441943,123.245395274,123.036221568,122.826898272,
565 122.617425345,122.407802748,122.198030441,121.988108384,121.778036537,
566 121.567814861,121.357443316,121.146921862,120.936250462,120.725429075,
567 120.514457662,120.303336187,120.09206461,119.880642893,119.669071,
568 119.457348893,119.245476537,119.033453894,118.821280929,118.608957608,
569 118.396483896,118.18385976,117.971085166,117.758160083,117.545084479,
570 117.331858324,117.118481589,116.904954244,116.691276262,116.477447617,
571 116.263468283,116.049338237,115.835057456,115.620625918,115.406043603,
572 115.191310494,114.976426573,114.761391825,114.546206237,114.330869797,
573 114.115382497,113.899744328,113.683955284,113.468015365,113.251924567,
574 113.035682894,112.819290349,112.60274694,112.386052677,112.169207573,
575 111.952211643,111.735064908,111.517767389,111.300319114,111.082720112,
576 110.864970417,110.647070067,110.429019104,110.210817576,109.992465532,
577 109.77396303,109.55531013,109.336506899,109.117553408,108.898449735,
578 108.679195963,108.459792182,108.240238489,108.020534985,107.800681781,
579 107.580678994,107.360526749,107.140225178,106.919774422,106.69917463,
580 106.478425962,106.257528585,106.036482676,105.815288423,105.593946025,
581 105.372455689,105.150817638,104.929032102,104.707099327,104.48501957,
582 104.262793102,104.040420207,103.817901185,103.595236351,103.372426033,
583 103.149470578,102.926370349,102.703125726,102.479737108,102.256204914,
584 102.032529581,101.808711566,101.58475135,101.360649435,101.136406344,
585 100.912022628,100.687498859,100.462835637,100.23803359,100.013093371,
586 99.7880156641,99.5628011832,99.3374506734,99.1119649126,98.8863447123,
587 98.6605909195,98.4347044173,98.2086861271,97.9825370096,97.7562580661,
588 97.5298503407,97.3033149214,97.076652942,96.8498655839,96.6229540776,
589 96.3959197048,96.1687638004,95.9414877543,95.7140930135,95.4865810843,
590 95.2589535346,95.0312119958,94.8033581658,94.5753938109,94.3473207683,
591 94.1191409492,93.8908563411,93.6624690106,93.4339811063,93.205394862,
592 92.9767125993,92.7479367311,92.5190697648,92.2901143054,92.0610730592,
593 91.8319488373,91.602744559,91.373463256,91.1441080758,90.9146822859,
594 90.6851892779,90.4556325714,90.2260158187,89.9963428088,89.7666174721,
595 89.536843885,89.3070262745,89.0771690233,88.8472766741,88.6173539356,
596 88.3874056866,88.1574369818,87.9274530572,87.697459335,87.4674614297,
597 87.237465153,87.0074765201,86.7775017551,86.5475472965,86.3176198036,
598 86.087726162,85.8578734896,85.6280691424,85.3983207206,85.1686360744,
599 84.9390233102,84.7094907959,84.4800471675,84.2507013342,84.0214624844,
600 83.7923400915,83.5633439187,83.334484025,83.1057707701,82.8772148192,
601 82.6488271479,82.4206190466,82.1926021248,81.9647883147,81.7371898752,
602 81.5098193947,81.282689794,81.0558143286,80.8292065906,80.6028805099,
603 80.3768503551,80.1511307336,79.9257365914,79.7006832114,79.4759862124,
604 79.2516615459,79.0277254929,78.80419466,78.5810859742,78.3584166771,
605 78.1362043179,77.914466746,77.6932221017,77.4724888073,77.2522855555,
606 77.0326312982,76.8135452334,76.5950467914,76.3771556195,76.1598915665,
607 75.943274665,75.7273251137,75.5120632578,75.297509569,75.0836846242,
608 74.8706090831,74.6583036656,74.4467891271,74.2360862344,74.0262157397,
609 73.8171983546,73.609054723,73.4018053941,73.195470794,72.9900711983,
610 72.7856267028,72.5821571954,72.3796823271,72.1782214839,71.9777937575,
611 71.7784179177,71.5801123841,71.3828951991,71.1867840008,70.9917959968,
612 70.7979479394,70.6052561006,70.413736249,70.2234036275,70.0342729319,
613 69.8463582915,69.6596732499,69.4742307486,69.2900431108,69.1071220272,
614 68.925478544,68.7451230512,68.5660652733,68.3883142621,68.2118783899,
615 68.0367653452,67.8629821298,67.6905350579,67.5194297558,67.349671164,
616 67.1812635406,67.0142104662,66.8485148499,66.6841789368,66.5212043171,
617 66.359591936,66.1993421046,66.0404545127,65.8829282415,65.7267617781,
618 65.5719530301,65.4184993417,65.2663975098,65.1156438011,64.9662339694,
619 64.8181632736,64.6714264963,64.5260179616,64.3819315545,64.2391607398,
620 64.0976985804,63.9575377573,63.8186705879,63.6810890449,63.5447847755,
621 63.4097491195,63.2759731279,63.1434475806,63.0121630047,62.8821096914,
622 62.7532777134,62.6256569412,62.4992370596,62.3740075834,62.2499578725,
623 62.1270771474,62.0053545027,61.8847789218,61.7653392897,61.6470244065,
624 61.5298229991,61.4137237339,61.2987152275,61.1847860581,61.0719247757,
625 60.9601199122,60.8493599906,60.7396335345,60.630929076,60.5232351645,
626 60.4165403737,60.3108333094,60.2061026159,60.1023369826,59.9995251502,
627 59.8976559158,59.7967181389,59.6967007458,59.5975927344,59.4993831786,
628 59.4020612319,59.3056161312,59.2100372005,59.1153138535,59.0214355966,
629 58.9283920315,58.8361728577,58.7447678742,58.6541669817,58.5643601843,
630 58.4753375907,58.3870894158,58.2996059815,58.2128777181,58.1268951645,
631 58.0416489694,57.9571298914,57.8733287998,57.7902366743,57.7078446055,
632 57.6261437948,57.5451255545,57.4647813073,57.3851025863,57.3060810344,
633 57.2277084041,57.1499765569,57.0728774627,56.9964031993,56.9205459515,
634 56.8452980105,56.7706517731,56.6965997408,56.6231345189,56.5502488157,
635 56.4779354416,56.4061873078,56.3349974256,56.2643589053,56.1942649551,
636 56.12470888,56.0556840808,55.9871840529,55.9192023854,55.8517327594,
637 55.7847689478,55.7183048131,55.6523343072,55.5868514695,55.5218504263,
638 55.4573253892,55.3932706543,55.3296806009,55.2665496903,55.2038724646,
639 55.1416435458,55.0798576345,55.0185095087,54.9575940229,54.8971061066,
640 54.8370407637,54.7773930709,54.718158177,54.6593313016,54.6009077341,
641 54.5428828326,54.4852520229,54.4280107972,54.3711547138,54.3146793951,
642 54.2585805273,54.2028538591,54.147495201,54.092500424,54.0378654587,
643 53.9835862945,53.9296589787,53.8760796154,53.8228443647,53.7699494418,
644 53.7173911161,53.6651657104,53.6132695999,53.5616992114,53.5104510228,
645 53.4595215617,53.408907405,53.358605178,53.3086115536,53.2589232516,
646 53.2095370379,53.1604497237,53.1116581648,53.0631592611,53.0149499554,
647 52.9670272332,52.9193881217,52.8720296893,52.8249490449,52.7781433372,
648 52.7316097539,52.6853455215,52.6393479043,52.5936142039,52.5481417587,
649 52.5029279432,52.4579701673,52.4132658761,52.3688125489,52.3246076991,
650 52.2806488732,52.2369336506,52.193459643,52.1502244938,52.1072258777,
651 52.0644615,52.0219290964,51.9796264325,51.9375513029,51.8957015313,
652 51.8540749699,51.8126694984,51.7714830245,51.7305134827,51.6897588342,
653 51.6492170664,51.6088861928,51.568764252,51.5288493078,51.4891394485,
654 51.4496327869,51.4103274594,51.3712216261,51.3323134703,51.2936011979,
655 51.2550830374,51.2167572394,51.1786220761,51.1406758414,51.1029168502,
656 51.065343438,51.0279539611,50.9907467956,50.9537203379,50.9168730035,
657 50.8802032274,50.8437094637,50.8073901849,50.7712438821,50.7352690645,
658 50.6994642591,50.6638280107,50.6283588811,50.5930554497,50.5579163121,
659 50.522940081,50.4881253853,50.4534708698,50.4189751955,50.3846370388,
660 50.3504550916,50.3164280609,50.2825546688,50.2488336522,50.2152637622,
661 50.1818437647,50.1485724393,50.1154485799,50.0824709937,50.0496385019,
662 50.0169499386,49.9844041515,49.9520000008,49.9197363597,49.8876121142,
663 49.8556261623,49.8237774146,49.7920647936,49.7604872338,49.7290436813,
664 49.6977330941,49.6665544412,49.6355067033,49.6045888718,49.5737999493,
665 49.5431389491,49.5126048954,49.4821968226,49.4519137756,49.4217548096,
666 49.3917189898,49.3618053914,49.3320130994,49.3023412085,49.2727888229,
667 49.2433550565,49.2140390322,49.1848398821,49.1557567476,49.1267887789,
668 49.0979351349,49.0691949835,49.040567501,49.0120518721,48.9836472901,
669 48.9553529564,48.9271680807,48.8990918806,48.8711235817,48.8432624174,
670 48.815507629,48.7878584653,48.7603141827,48.732874045,48.7055373233,
671 48.6783032962,48.6511712493,48.6241404752,48.5972102736,48.5703799512,
672 48.5436488213,48.517016204,48.4904814261,48.464043821,48.4377027285,
673 48.4114574948,48.3853074723,48.35925202,48.3332905028,48.3074222917,
674 48.2816467637,48.2559633019,48.2303712951,48.204870138,48.179459231,
675 48.1541379801,48.1289057971,48.103762099,48.0787063085,48.0537378537,
676 48.0288561678,48.0040606896,47.9793508627,47.9547261362,47.9301859641,
677 47.9057298055,47.8813571243,47.8570673896,47.832860075,47.8087346591,
678 47.7846906251,47.7607274611,47.7368446597,47.7130417179,47.6893181375,
679 47.6656734245,47.6421070895,47.6186186475,47.5952076176,47.5718735233,
680 47.5486158923,47.5254342566,47.5023281519,47.4792971185,47.4563407004,
681 47.4334584457,47.4106499063,47.3879146382,47.3652522011,47.3426621586,
682 47.3201440779,47.2976975301,47.27532209,47.2530173358,47.2307828496,
683 47.2086182168,47.1865230265,47.1644968713,47.142539347,47.1206500531,
684 47.0988285923,47.0770745708,47.0553875978,47.033767286,47.0122132513,
685 46.9907251128,46.9693024927,46.9479450163,46.926652312,46.9054240114,
686 46.884259749,46.8631591622,46.8421218916,46.8211475806,46.8002358755,
687 46.7793864255,46.7585988825,46.7378729014,46.7172081399,46.6966042582,
688 46.6760609195,46.6555777895,46.6351545368,46.6147908322,46.5944863497,
689 46.5742407654,46.5540537582,46.5339250095,46.5138542031,46.4938410254,
690 46.4738851652,46.4539863139,46.434144165,46.4143584145,46.394628761,
691 46.374954905,46.3553365498,46.3357734005,46.3162651648,46.2968115526,
692 46.2774122759,46.258067049,46.2387755882,46.2195376123,46.200352842,
693 46.181221,46.1621418113,46.143115003,46.124140304,46.1052174456,
694 46.0863461607,46.0675261845,46.0487572541,46.0300391084,46.0113714885,
695 45.9927541372,45.9741867993,45.9556692215,45.9372011522,45.9187823419,
696 45.9004125427,45.8820915086,45.8638189954,45.8455947607,45.8274185639,
697 45.8092901659,45.7912093296,45.7731758195,45.7551894018,45.7372498443,
698 45.7193569166,45.7015103899,45.683710037,45.6659556324,45.648246952,
699 45.6305837735,45.6129658761,45.5953930405,45.5778650491,45.5603816856,
700 45.5429427354,45.5255479853,45.5081972237,45.4908902404,45.4736268266,
701 45.4564067751,45.4392298799,45.4220959367,45.4050047424,45.3879560955,
702 45.3709497956,45.3539856439,45.3370634429,45.3201829964,45.3033441096,
703 45.286546589,45.2697902423,45.2530748788,45.2364003088,45.2197663439,
704 45.2031727971,45.1866194827,45.170106216,45.1536328136,45.1371990936,
705 45.120804875,45.1044499781,45.0881342244,45.0718574366,45.0556194386,
706 45.0394200553,45.0232591129,45.0071364388,44.9910518613,44.97500521,
707 44.9589963155,44.9430250097,44.9270911254,44.9111944966,44.8953349582,
708 44.8795123463,44.8637264982,44.8479772519,44.8322644468,44.816587923,
709 44.8009475218,44.7853430856,44.7697744577,44.7542414822,44.7387440046,
710 44.7232818711,44.7078549288,44.6924630261,44.677106012,44.6617837367,
711 44.6464960512,44.6312428075,44.6160238584,44.6008390578,44.5856882605,
712 44.570571322,44.5554880988,44.5404384485,44.5254222292,44.5104393001,
713 44.4954895213,44.4805727536,44.4656888589,44.4508376997,44.4360191394,
714 44.4212330422,44.4064792734,44.3917576987,44.3770681849,44.3624105996,
715 44.347784811,44.3331906883,44.3186281014,44.3040969209,44.2895970184,
716 44.2751282661,44.2606905369,44.2462837046,44.2319076438,44.2175622296,
717 44.2032473381,44.188962846,44.1747086307,44.1604845704,44.1462905441,
718 44.1321264312,44.1179921121,44.1038874679,44.0898123802,44.0757667314,
719 44.0617504046,44.0477632835,44.0338052526,44.0198761971,44.0059760025,
720 43.9921045555,43.978261743,43.9644474528,43.9506615732,43.9369039933,
721 43.9231746028,43.9094732918,43.8957999513,43.8821544728,43.8685367485,
722 43.854946671,43.8413841338,43.8278490309,43.8143412567,43.8008607064,
723 43.7874072758,43.7739808611,43.7605813594,43.747208668,43.733862685,
724 43.720543309,43.7072504393,43.6939839756,43.6807438181,43.6675298677,
725 43.6543420258,43.6411801944,43.628044276,43.6149341734,43.6018497904,
726 43.5887910309,43.5757577997,43.5627500017,43.5497675426,43.5368103287,
727 43.5238782665,43.5109712632,43.4980892264,43.4852320645,43.4723996859,
728 43.459592,43.4468089162,43.4340503448,43.4213161963,43.4086063818,
729 43.395920813,43.3832594017,43.3706220606,43.3580087026,43.3454192411,
730 43.33285359,43.3203116637,43.3077933769,43.2952986449,43.2828273833,
731 43.2703795084,43.2579549366,43.2455535849,43.2331753709,43.2208202124,
732 43.2084880276,43.1961787354,43.1838922548,43.1716285054,43.1593874071,
733 43.1471688805,43.1349728462,43.1227992256,43.1106479402,43.0985189119,
734 43.0864120634,43.0743273173,43.0622645969,43.0502238257,43.0382049278,
735 43.0262078276,43.0142324497,43.0022787194,42.9903465622,42.9784359039,
736 42.9665466709,42.9546787897,42.9428321874,42.9310067914,42.9192025293,
737 42.9074193294,42.89565712,42.88391583,42.8721953886,42.8604957252,
738 42.8488167698,42.8371584525,42.825520704,42.8139034551,42.8023066371,
739 42.7907301817,42.7791740206,42.7676380862,42.7561223111,42.7446266282,
740 42.7331509707,42.7216952722,42.7102594667,42.6988434883,42.6874472716,
741 42.6760707514,42.664713863,42.6533765417,42.6420587235,42.6307603444,
742 42.6194813408,42.6082216494,42.5969812074,42.5857599519,42.5745578207,
743 42.5633747516,42.5522106829,42.5410655531,42.529939301,42.5188318657,
744 42.5077431866,42.4966732034,42.485621856,42.4745890847,42.4635748299,
745 42.4525790326,42.4416016337,42.4306425747,42.4197017972,42.4087792431,
746 42.3978748545,42.3869885739,42.3761203441,42.365270108,42.3544378088,
747 42.3436233901,42.3328267957,42.3220479695,42.3112868559,42.3005433995,
748 42.2898175449,42.2791092374,42.2684184221,42.2577450447,42.2470890509,
749 42.2364503869,42.2258289989,42.2152248334,42.2046378373,42.1940679577,
750 42.1835151416,42.1729793368,42.1624604909,42.1519585519,42.1414734681,
751 42.1310051879,42.1205536599,42.1101188331,42.0997006567,42.08929908,
752 42.0789140527,42.0685455244,42.0581934454,42.0478577658,42.0375384362,
753 42.0272354073,42.0169486299,42.0066780553,41.9964236349,41.9861853201,
754 41.9759630629,41.9657568151,41.955566529,41.9453921571,41.935233652,
755 41.9250909665,41.9149640537,41.9048528668,41.8947573593,41.8846774848,
756 41.8746131972,41.8645644507,41.8545311993,41.8445133977,41.8345110004,
757 41.8245239623,41.8145522385,41.8045957842,41.7946545548,41.784728506,
758 41.7748175936,41.7649217736,41.7550410021,41.7451752356,41.7353244307,
759 41.725488544,41.7156675325,41.7058613534,41.696069964,41.6862933217,
760 41.6765313841,41.6667841092,41.657051455,41.6473333796,41.6376298415,
761 41.6279407991,41.6182662112,41.6086060367,41.5989602347,41.5893287644,
762 41.5797115852,41.5701086567,41.5605199386,41.5509453909,41.5413849736,
763 41.531838647,41.5223063714,41.5127881076,41.5032838162,41.493793458,
764 41.4843169943,41.4748543861,41.4654055949,41.4559705822,41.4465493097,
765 41.4371417393,41.427747833,41.4183675529,41.4090008614,41.3996477209,
766 41.3903080941,41.3809819438,41.3716692328,41.3623699242,41.3530839814,
767 41.3438113676,41.3345520464,41.3253059814,41.3160731366,41.3068534757,
768 41.2976469631,41.2884535628,41.2792732394,41.2701059573,41.2609516812,
769 41.251810376,41.2426820066,41.2335665381,41.2244639357,41.2153741649,
770 41.2062971912,41.1972329801,41.1881814975,41.1791427094,41.1701165817,
771 41.1611030807,41.1521021727,41.1431138241,41.1341380016,41.1251746718,
772 41.1162238016,41.1072853581,41.0983593082,41.0894456193,41.0805442586,
773 41.0716551938,41.0627783924,41.0539138221,41.0450614508,41.0362212466,
774 41.0273931776,41.0185772119,41.0097733179,41.0009814642,40.9922016194,
775 40.9834337521,40.9746778312,40.9659338257,40.9572017046,40.9484814373,
776 40.9397729929,40.931076341,40.9223914511,40.9137182928,40.905056836,
777 40.8964070505,40.8877689064,40.8791423738,40.8705274229,40.8619240242,
778 40.853332148,40.8447517649,40.8361828457,40.8276253611,40.8190792821,
779 40.8105445796,40.8020212248,40.7935091889,40.7850084433,40.7765189594,
780 40.7680407088,40.7595736631,40.7511177941,40.7426730737,40.7342394738,
781 40.7258169666,40.7174055242,40.7090051189,40.7006157231,40.6922373093,
782 40.68386985,40.6755133181,40.6671676862,40.6588329272,40.6505090143,
783 40.6421959203,40.6338936187,40.6256020825,40.6173212853,40.6090512004,
784 40.6007918016,40.5925430624,40.5843049567,40.5760774582,40.567860541,
785 40.5596541792,40.5514583468,40.5432730181,40.5350981675,40.5269337693,
786 40.5187797982,40.5106362286,40.5025030354,40.4943801934,40.4862676773,
787 40.4781654622,40.4700735231,40.4619918353,40.4539203738,40.4458591142,
788 40.4378080318,40.429767102,40.4217363005,40.4137156031,40.4057049853,
789 40.3977044232,40.3897138925,40.3817333695,40.37376283,40.3658022505,
790 40.357851607,40.3499108761,40.3419800341,40.3340590575,40.3261479229,
791 40.3182466072,40.3103550869,40.302473339,40.2946013404,40.2867390681,
792 40.2788864992,40.2710436109,40.2632103804,40.2553867851,40.2475728023,
793 40.2397684096,40.2319735845,40.2241883047,40.2164125479,40.2086462918,
794 40.2008895143,40.1931421935,40.1854043073,40.1776758338,40.1699567512,
795 40.1622470377,40.1545466718,40.1468556316,40.1391738959,40.131501443,
796 40.1238382516,40.1161843004,40.1085395682,40.1009040337,40.093277676,
797 40.0856604739,40.0780524066,40.0704534531,40.0628635927,40.0552828046,
798 40.0477110681,40.0401483626,40.0325946677,40.0250499628,40.0175142275,
799 40.0099874416,40.0024695847,39.9949606367,39.9874605775,39.979969387,
800 39.9724870452,39.9650135322,39.9575488282,39.9500929133,39.9426457678,
801 39.9352073722,39.9277777067,39.9203567518,39.9129444882,39.9055408964,
802 39.898145957,39.8907596508,39.8833819586,39.8760128612,39.8686523396,
803 39.8613003748,39.8539569477,39.8466220395,39.8392956313,39.8319777044,
804 39.8246682402,39.8173672198,39.8100746247,39.8027904365,39.7955146366,
805 39.7882472066,39.7809881283,39.7737373832,39.7664949532,39.75926082,
806 39.7520349657,39.7448173721,39.7376080212,39.7304068951,39.7232139759,
807 39.7160292458,39.708852687,39.7016842819,39.6945240127,39.6873718619,
808 39.6802278119,39.6730918453,39.6659639446,39.6588440925,39.6517322716,
809 39.6446284646,39.6375326544,39.6304448239,39.6233649558,39.6162930333,
810 39.6092290392,39.6021729567,39.5951247688,39.5880844588,39.5810520098,
811 39.5740274052,39.5670106282,39.5600016623,39.5530004909,39.5460070974,
812 39.5390214655,39.5320435786,39.5250734205,39.5181109748,39.5111562253,
813 39.5042091557,39.4972697499,39.4903379919,39.4834138654,39.4764973546,
814 39.4695884435,39.4626871162,39.4557933567,39.4489071494,39.4420284784,
815 39.435157328,39.4282936826,39.4214375266,39.4145888443,39.4077476203,
816 39.4009138391,39.3940874853,39.3872685434,39.3804569982,39.3736528344,
817 39.3668560367,39.36006659,39.353284479,39.3465096888,39.3397422042,
818 39.3329820103,39.3262290921,39.3194834346,39.3127450231,39.3060138426,
819 39.2992898784,39.2925731158,39.2858635401,39.2791611366,39.2724658907,
820 39.2657777879,39.2590968136,39.2524229534,39.2457561929,39.2390965176,
821 39.2324439132,39.2257983655,39.2191598602,39.212528383,39.2059039198,
822 39.1992864564,39.1926759788,39.186072473,39.1794759249,39.1728863205,
823 39.166303646,39.1597278875,39.153159031,39.1465970629,39.1400419694,
824 39.1334937368,39.1269523513,39.1204177994,39.1138900674,39.1073691419,
825 39.1008550092,39.094347656,39.0878470687,39.081353234,39.0748661385,
826 39.068385769,39.0619121121,39.0554451545,39.0489848832,39.0425312849,
827 39.0360843464,39.0296440548,39.023210397,39.0167833599,39.0103629306,
828 39.0039490962,38.9975418437,38.9911411603,38.9847470331,38.9783594495,
829 38.9719783965,38.9656038616,38.959235832,38.9528742952,38.9465192384,
830 38.9401706492,38.933828515,38.9274928232,38.9211635616,38.9148407175,
831 38.9085242787,38.9022142328,38.8959105674,38.8896132703,38.8833223293,
832 38.877037732,38.8707594665,38.8644875204,38.8582218817,38.8519625383,
833 38.8457094782,38.8394626894,38.8332221598,38.8269878777,38.8207598309,
834 38.8145380078,38.8083223964,38.802112985,38.7959097617,38.7897127148,
835 38.7835218327,38.7773371036,38.7711585159,38.7649860581,38.7588197184,
836 38.7526594855,38.7465053477,38.7403572936,38.7342153118,38.7280793908,
837 38.7219495192,38.7158256858,38.7097078791,38.7035960879,38.697490301,
838 38.691390507,38.6852966949,38.6792088534,38.6731269715,38.667051038,
839 38.6609810418
840 }
841 }
842 };
0 // generated by ../../tools/tube_transfer.py
1 // tube: 12AU7
2 // plate current function: pentode
3 // mu: 21.5
4 // kx: 1.3
5 // kg1: 1180
6 // kp: 84
7 // kvb: 300
8
9 table1d_imp<2001> tubetable_12AU7[2] = {
10 { // Ri = 68k
11 -5,5,200,2001, {
12 127.202255052,127.144735521,127.087208545,127.029674135,126.972132303,
13 126.914583061,126.857026422,126.799462397,126.741890998,126.684312237,
14 126.626726127,126.569132679,126.511531906,126.45392382,126.396308434,
15 126.338685759,126.281055807,126.223418592,126.165774125,126.108122418,
16 126.050463485,125.992797338,125.935123988,125.877443449,125.819755734,
17 125.762060854,125.704358822,125.646649651,125.588933353,125.531209942,
18 125.473479429,125.415741829,125.357997152,125.300245413,125.242486624,
19 125.184720797,125.126947947,125.069168085,125.011381225,124.953587379,
20 124.895786561,124.837978784,124.780164061,124.722342404,124.664513828,
21 124.606678345,124.548835968,124.490986711,124.433130587,124.375267609,
22 124.317397791,124.259521146,124.201637688,124.143747429,124.085850383,
23 124.027946564,123.970035986,123.912118661,123.854194604,123.796263828,
24 123.738326347,123.680382175,123.622431324,123.56447381,123.506509646,
25 123.448538845,123.390561421,123.332577389,123.274586763,123.216589556,
26 123.158585782,123.100575455,123.04255859,122.984535201,122.926505301,
27 122.868468905,122.810426027,122.752376682,122.694320883,122.636258645,
28 122.578189982,122.520114909,122.46203344,122.40394559,122.345851372,
29 122.287750803,122.229643895,122.171530664,122.113411125,122.055285291,
30 121.997153178,121.939014801,121.880870174,121.822719312,121.76456223,
31 121.706398942,121.648229465,121.590053812,121.531871999,121.47368404,
32 121.415489952,121.357289748,121.299083444,121.240871056,121.182652598,
33 121.124428085,121.066197534,121.007960959,120.949718376,120.891469799,
34 120.833215245,120.77495473,120.716688268,120.658415874,120.600137566,
35 120.541853358,120.483563266,120.425267305,120.366965492,120.308657843,
36 120.250344372,120.192025096,120.133700031,120.075369193,120.017032598,
37 119.958690261,119.900342199,119.841988428,119.783628965,119.725263824,
38 119.666893023,119.608516578,119.550134505,119.49174682,119.433353539,
39 119.37495468,119.316550259,119.258140292,119.199724795,119.141303785,
40 119.08287728,119.024445295,118.966007847,118.907564953,118.84911663,
41 118.790662894,118.732203763,118.673739253,118.615269382,118.556794165,
42 118.498313621,118.439827767,118.381336619,118.322840194,118.26433851,
43 118.205831585,118.147319435,118.088802077,118.03027953,117.97175181,
44 117.913218935,117.854680922,117.796137789,117.737589554,117.679036234,
45 117.620477847,117.56191441,117.503345942,117.444772459,117.386193981,
46 117.327610524,117.269022108,117.210428748,117.151830465,117.093227275,
47 117.034619197,116.97600625,116.91738845,116.858765817,116.800138368,
48 116.741506123,116.682869099,116.624227315,116.565580789,116.50692954,
49 116.448273586,116.389612947,116.330947639,116.272277683,116.213603098,
50 116.1549239,116.096240111,116.037551747,115.97885883,115.920161376,
51 115.861459406,115.802752938,115.744041992,115.685326586,115.62660674,
52 115.567882473,115.509153805,115.450420754,115.39168334,115.332941582,
53 115.274195501,115.215445115,115.156690443,115.097931507,115.039168325,
54 114.980400916,114.921629302,114.862853501,114.804073533,114.745289419,
55 114.686501178,114.62770883,114.568912395,114.510111894,114.451307346,
56 114.392498772,114.333686192,114.274869626,114.216049094,114.157224618,
57 114.098396216,114.039563911,113.980727722,113.92188767,113.863043775,
58 113.804196059,113.745344542,113.686489244,113.627630187,113.568767392,
59 113.509900879,113.451030669,113.392156784,113.333279244,113.274398071,
60 113.215513286,113.156624909,113.097732963,113.038837469,112.979938447,
61 112.92103592,112.862129909,112.803220436,112.744307521,112.685391187,
62 112.626471456,112.567548349,112.508621887,112.449692094,112.39075899,
63 112.331822598,112.272882939,112.213940036,112.154993911,112.096044586,
64 112.037092083,111.978136425,111.919177633,111.860215731,111.801250739,
65 111.742282682,111.683311582,111.624337461,111.565360341,111.506380246,
66 111.447397198,111.38841122,111.329422335,111.270430566,111.211435936,
67 111.152438467,111.093438183,111.034435107,110.975429263,110.916420672,
68 110.857409359,110.798395347,110.73937866,110.68035932,110.621337352,
69 110.562312778,110.503285623,110.44425591,110.385223663,110.326188906,
70 110.267151662,110.208111956,110.149069811,110.090025251,110.030978301,
71 109.971928984,109.912877325,109.853823348,109.794767077,109.735708537,
72 109.676647751,109.617584745,109.558519543,109.49945217,109.440382649,
73 109.381311006,109.322237266,109.263161453,109.204083592,109.145003709,
74 109.085921827,109.026837972,108.96775217,108.908664445,108.849574822,
75 108.790483327,108.731389985,108.672294822,108.613197862,108.554099132,
76 108.494998657,108.435896462,108.376792573,108.317687016,108.258579817,
77 108.199471001,108.140360595,108.081248624,108.022135114,107.963020092,
78 107.903903583,107.844785615,107.785666212,107.726545401,107.667423209,
79 107.608299663,107.549174788,107.490048611,107.430921159,107.371792458,
80 107.312662535,107.253531418,107.194399132,107.135265705,107.076131164,
81 107.016995535,106.957858847,106.898721125,106.839582398,106.780442692,
82 106.721302034,106.662160454,106.603017976,106.54387463,106.484730443,
83 106.425585442,106.366439655,106.30729311,106.248145835,106.188997857,
84 106.129849205,106.070699906,106.011549989,105.952399482,105.893248413,
85 105.83409681,105.774944701,105.715792116,105.656639082,105.597485627,
86 105.538331781,105.479177572,105.420023029,105.360868181,105.301713056,
87 105.242557683,105.183402091,105.124246309,105.065090367,105.005934293,
88 104.946778117,104.887621867,104.828465574,104.769309266,104.710152973,
89 104.650996725,104.591840551,104.532684481,104.473528544,104.41437277,
90 104.35521719,104.296061832,104.236906727,104.177751906,104.118597397,
91 104.059443232,104.00028944,103.941136051,103.881983097,103.822830607,
92 103.763678612,103.704527143,103.64537623,103.586225903,103.527076194,
93 103.467927133,103.408778751,103.34963108,103.290484149,103.231337991,
94 103.172192635,103.113048115,103.05390446,102.994761702,102.935619872,
95 102.876479002,102.817339124,102.758200268,102.699062467,102.639925752,
96 102.580790156,102.521655709,102.462522444,102.403390393,102.344259588,
97 102.285130061,102.226001843,102.166874968,102.107749468,102.048625375,
98 101.989502721,101.930381539,101.871261862,101.812143721,101.753027151,
99 101.693912183,101.634798851,101.575687186,101.516577224,101.457468995,
100 101.398362534,101.339257873,101.280155047,101.221054087,101.161955028,
101 101.102857902,101.043762744,100.984669587,100.925578465,100.86648941,
102 100.807402458,100.748317642,100.689234995,100.630154552,100.571076347,
103 100.512000413,100.452926786,100.393855498,100.334786586,100.275720082,
104 100.216656021,100.157594438,100.098535367,100.039478843,99.9804249014,
105 99.9213735758,99.8623249014,99.8032789131,99.7442356459,99.6851951348,
106 99.626157415,99.5671225215,99.5080904897,99.4490613547,99.390035152,
107 99.3310119171,99.2719916853,99.2129744923,99.1539603737,99.0949493652,
108 99.0359415025,98.9769368215,98.9179353582,98.8589371484,98.7999422282,
109 98.7409506337,98.681962401,98.6229775665,98.5639961663,98.5050182369,
110 98.4460438148,98.3870729363,98.3281056381,98.2691419569,98.2101819292,
111 98.151225592,98.092272982,98.0333241361,97.9743790913,97.9154378847,
112 97.8565005533,97.7975671344,97.7386376651,97.6797121827,97.6207907248,
113 97.5618733286,97.5029600316,97.4440508716,97.3851458861,97.3262451127,
114 97.2673485894,97.2084563538,97.149568444,97.0906848979,97.0318057536,
115 96.972931049,96.9140608226,96.8551951123,96.7963339567,96.737477394,
116 96.6786254626,96.6197782012,96.5609356482,96.5020978424,96.4432648223,
117 96.3844366268,96.3256132947,96.2667948649,96.2079813764,96.1491728683,
118 96.0903693795,96.0315709494,95.9727776171,95.9139894219,95.8552064032,
119 95.7964286005,95.7376560531,95.6788888008,95.6201268831,95.5613703397,
120 95.5026192104,95.443873535,95.3851333534,95.3263987056,95.2676696315,
121 95.2089461714,95.1502283653,95.0915162534,95.0328098761,94.9741092737,
122 94.9154144866,94.8567255554,94.7980425205,94.7393654225,94.6806943022,
123 94.6220292003,94.5633701577,94.5047172151,94.4460704135,94.387429794,
124 94.3287953976,94.2701672655,94.2115454388,94.1529299589,94.094320867,
125 94.0357182045,93.977122013,93.918532334,93.859949209,93.8013726797,
126 93.7428027879,93.6842395753,93.6256830838,93.5671333553,93.5085904318,
127 93.4500543553,93.391525168,93.3330029121,93.2744876298,93.2159793634,
128 93.1574781553,93.098984048,93.0404970839,92.9820173057,92.923544756,
129 92.8650794774,92.8066215128,92.7481709051,92.689727697,92.6312919317,
130 92.572863652,92.5144429013,92.4560297225,92.397624159,92.3392262541,
131 92.2808360511,92.2224535935,92.1640789248,92.1057120886,92.0473531285,
132 91.9890020883,91.9306590116,91.8723239425,91.8139969247,91.7556780023,
133 91.6973672194,91.63906462,91.5807702484,91.5224841489,91.4642063657,
134 91.4059369434,91.3476759263,91.289423359,91.2311792862,91.1729437526,
135 91.1147168029,91.0564984821,90.9982888349,90.9400879065,90.8818957418,
136 90.8237123861,90.7655378846,90.7073722826,90.6492156254,90.5910679586,
137 90.5329293276,90.4747997782,90.4166793559,90.3585681067,90.3004660764,
138 90.2423733109,90.1842898562,90.1262157586,90.0681510643,90.0100958195,
139 89.9520500706,89.8940138642,89.8359872468,89.7779702652,89.719962966,
140 89.6619653962,89.6039776027,89.5459996326,89.4880315331,89.4300733515,
141 89.3721251352,89.3141869316,89.2562587884,89.1983407533,89.1404328741,
142 89.0825351988,89.0246477754,88.9667706523,88.9089038776,88.8510474998,
143 88.7932015676,88.7353661296,88.6775412346,88.6197269318,88.5619232702,
144 88.5041302991,88.446348068,88.3885766264,88.3308160242,88.2730663111,
145 88.2153275374,88.1575997532,88.099883009,88.0421773555,87.9844828434,
146 87.9267995237,87.8691274477,87.8114666667,87.7538172323,87.6961791964,
147 87.6385526111,87.5809375286,87.5233340014,87.4657420824,87.4081618245,
148 87.350593281,87.2930365055,87.2354915517,87.1779584739,87.1204373264,
149 87.062928164,87.0054310416,86.9479460146,86.8904731388,86.8330124701,
150 86.775564065,86.7181279803,86.6607042731,86.6032930011,86.545894222,
151 86.4885079945,86.4311343773,86.3737734298,86.3164252117,86.2590897832,
152 86.2017672053,86.1444575392,86.0871608467,86.0298771904,85.9726066331,
153 85.9153492385,85.858105071,85.8008741953,85.743656677,85.6864525825,
154 85.6292619788,85.5720849335,85.5149215154,85.4577717937,85.4006358386,
155 85.3435137212,85.2864055135,85.2293112884,85.1722311199,85.1151650827,
156 85.058113253,85.0010757077,84.9440525249,84.8870437842,84.830049566,
157 84.7730699521,84.7161050257,84.6591548713,84.6022195749,84.5452992237,
158 84.4883939067,84.4315037144,84.3746287389,84.317769074,84.2609248154,
159 84.2040960603,84.1472829082,84.0904854603,84.03370382,83.9769380928,
160 83.9201883863,83.8634548107,83.8067374781,83.7500365035,83.6933520043,
161 83.6366841005,83.580032915,83.5233985736,83.4667812049,83.4101809407,
162 83.3535979161,83.2970322693,83.2404841423,83.1839536804,83.1274410328,
163 83.0709463526,83.0144697967,82.9580115264,82.9015717072,82.8451505094,
164 82.7887481075,82.7323646812,82.676000415,82.619655499,82.5633301282,
165 82.5070245037,82.4507388321,82.3944733263,82.3382282053,82.2820036947,
166 82.2258000269,82.1696174413,82.1134561847,82.0573165111,82.0011986828,
167 81.9451029699,81.8890296512,81.8329790139,81.7769513547,81.7209469793,
168 81.6649662036,81.6090093531,81.5530767642,81.4971687841,81.4412857711,
169 81.3854280954,81.3295961391,81.2737902971,81.2180109771,81.1622586004,
170 81.1065336021,81.0508364319,80.9951675546,80.9395274501,80.8839166148,
171 80.8283355615,80.7727848202,80.7172649388,80.6617764836,80.60632004,
172 80.550896213,80.4955056283,80.4401489323,80.3848267936,80.3295399031,
173 80.2742889753,80.2190747483,80.1638979857,80.1087594762,80.0536600356,
174 79.9986005067,79.9435817607,79.8886046981,79.8336702492,79.7787793757,
175 79.7239330709,79.6691323614,79.6143783076,79.5596720049,79.5050145846,
176 79.4504072153,79.3958511034,79.3413474946,79.2868976751,79.232502972,
177 79.1781647554,79.1238844387,79.0696634799,79.0155033833,78.9614056998,
178 78.9073720286,78.8534040181,78.7995033671,78.745671826,78.6919111977,
179 78.6382233388,78.5846101608,78.5310736309,78.4776157733,78.4242386699,
180 78.3709444615,78.3177353487,78.2646135927,78.2115815159,78.1586415033,
181 78.1057960025,78.0530475247,78.0003986452,77.947852004,77.8954103058,
182 77.8430763209,77.7908528846,77.738742898,77.6867493276,77.6348752053,
183 77.5831236277,77.5314977563,77.4800008163,77.4286360961,77.3774069467,
184 77.3263167799,77.2753690679,77.2245673409,77.1739151864,77.1234162467,
185 77.0730742172,77.0228928441,76.9728759219,76.9230272907,76.8733508334,
186 76.8238504726,76.7745301674,76.7253939097,76.6764457203,76.6276896455,
187 76.5791297525,76.530770125,76.4826148588,76.4346680573,76.3869338259,
188 76.3394162677,76.2921194775,76.245047537,76.1982045089,76.1515944315,
189 76.1052213127,76.0590891244,76.0132017967,75.9675632117,75.9221771979,
190 75.8770475238,75.8321778926,75.787571936,75.7432332085,75.6991651814,
191 75.6553712381,75.6118546675,75.5686186599,75.5256663009,75.4830005672,
192 75.4406243218,75.3985403095,75.3567511527,75.3152593478,75.2740672612,
193 75.2331771266,75.1925910414,75.1523109648,75.1123387149,75.0726759671,
194 75.0333242522,74.9942849556,74.9555593161,74.9171484253,74.8790532275,
195 74.84127452,74.8038129532,74.7666690316,74.729843115,74.6933354196,
196 74.6571460201,74.6212748514,74.5857217107,74.5504862605,74.5155680309,
197 74.4809664224,74.4466807098,74.4127100446,74.3790534589,74.3457098694,
198 74.3126780802,74.2799567878,74.2475445842,74.2154399613,74.183641315,
199 74.1521469494,74.1209550808,74.0900638421,74.0594712869,74.0291753936,
200 73.9991740699,73.9694651566,73.940046432,73.9109156157,73.8820703727,
201 73.8535083174,73.8252270172,73.7972239966,73.7694967405,73.7420426981,
202 73.7148592861,73.6879438923,73.6612938788,73.6349065851,73.608779331,
203 73.5829094199,73.5572941414,73.5319307741,73.5068165879,73.481948847,
204 73.4573248118,73.4329417415,73.408796896,73.3848875381,73.3612109353,
205 73.337764362,73.3145451007,73.2915504439,73.2687776959,73.2462241737,
206 73.2238872088,73.2017641484,73.1798523562,73.1581492141,73.1366521227,
207 73.1153585028,73.0942657956,73.073371464,73.0526729932,73.0321678913,
208 73.01185369,72.9917279452,72.9717882373,72.9520321718,72.9324573797,
209 72.9130615179,72.8938422692,72.8747973428,72.8559244746,72.8372214272,
210 72.8186859901,72.8003159797,72.7821092396,72.7640636405,72.7461770802,
211 72.7284474836,72.7108728027,72.6934510167,72.6761801314,72.6590581798,
212 72.6420832213,72.6252533423,72.6085666551,72.5920212986,72.5756154379,
213 72.5593472636,72.5432149922,72.5272168657,72.5113511511,72.4956161407,
214 72.4800101513,72.4645315244,72.4491786254,72.433949844,72.4188435934,
215 72.4038583105,72.388992455,72.3742445097,72.3596129798,72.3450963931,
216 72.3306932992,72.3164022693,72.3022218964,72.2881507943,72.2741875978,
217 72.2603309624,72.2465795636,72.232932097,72.2193872781,72.2059438415,
218 72.192600541,72.1793561494,72.1662094579,72.1531592761,72.1402044315,
219 72.1273437694,72.1145761524,72.1019004605,72.0893155905,72.0768204558,
220 72.0644139862,72.0520951278,72.0398628423,72.0277161072,72.0156539153,
221 72.0036752745,71.9917792075,71.9799647519,71.9682309594,71.956576896,
222 71.9450016415,71.9335042896,71.9220839473,71.9107397349,71.8994707857,
223 71.888276246,71.8771552744,71.8661070421,71.8551307324,71.8442255407,
224 71.8333906741,71.8226253513,71.8119288024,71.8013002686,71.7907390024,
225 71.7802442669,71.7698153359,71.7594514938,71.7491520351,71.7389162647,
226 71.7287434971,71.718633057,71.7085842785,71.6985965052,71.6886690901,
227 71.6788013952,71.6689927918,71.6592426597,71.6495503876,71.6399153729,
228 71.6303370213,71.6208147466,71.6113479711,71.6019361248,71.592578646,
229 71.5832749802,71.574024581,71.5648269093,71.5556814334,71.5465876288,
230 71.5375449783,71.5285529715,71.5196111052,71.5107188828,71.5018758143,
231 71.4930814165,71.4843352126,71.4756367321,71.4669855107,71.4583810906,
232 71.4498230196,71.4413108518,71.432844147,71.424422471,71.416045395,
233 71.407712496,71.3994233563,71.3911775639,71.3829747119,71.3748143987,
234 71.366696228,71.3586198085,71.3505847537,71.3425906823,71.3346372179,
235 71.3267239885,71.3188506271,71.3110167714,71.3032220633,71.2954661496,
236 71.2877486811,71.2800693133,71.2724277058,71.2648235225,71.2572564313,
237 71.2497261043,71.2422322176,71.2347744514,71.2273524895,71.2199660198,
238 71.212614734,71.2052983272,71.1980164986,71.1907689508,71.18355539,
239 71.1763755258,71.1692290714,71.1621157434,71.1550352617,71.1479873495,
240 71.1409717334,71.133988143,71.1270363112,71.1201159739,71.1132268703,
241 71.1063687424,71.0995413353,71.0927443969,71.0859776782,71.0792409329,
242 71.0725339177,71.0658563918,71.0592081174,71.0525888592,71.0459983846,
243 71.0394364638,71.0329028693,71.0263973764,71.0199197628,71.0134698085,
244 71.0070472963,71.0006520112,70.9942837405,70.9879422739,70.9816274037,
245 70.9753389239,70.9690766313,70.9628403246,70.9566298047,70.9504448748,
246 70.94428534,70.9381510078,70.9320416875,70.9259571906,70.9198973305,
247 70.9138619226,70.9078507843,70.901863735,70.8959005958,70.8899611899,
248 70.8840453422,70.8781528795,70.8722836304,70.8664374253,70.8606140963,
249 70.8548134773,70.8490354038,70.8432797131,70.8375462442,70.8318348376,
250 70.8261453356,70.8204775819,70.814831422,70.8092067028,70.8036032728,
251 70.7980209821,70.7924596821,70.7869192259,70.7813994679,70.7759002642,
252 70.7704214719,70.7649629499,70.7595245583,70.7541061588,70.748707614,
253 70.7433287883,70.7379695473,70.7326297578,70.7273092879,70.722008007,
254 70.7167257859,70.7114624965,70.7062180119,70.7009922065,70.6957849559,
255 70.6905961368,70.6854256272,70.6802733061,70.6751390538,70.6700227516,
256 70.664924282,70.6598435285,70.6547803759,70.6497347097,70.6447064169,
257 70.6396953852,70.6347015035,70.6297246618,70.6247647509,70.6198216628,
258 70.6148952904,70.6099855275,70.6050922689,70.6002154106,70.5953548492,
259 70.5905104824,70.5856822089,70.580869928,70.5760735403,70.5712929469,
260 70.5665280502,70.5617787532,70.5570449596,70.5523265745,70.5476235032,
261 70.5429356523,70.5382629289,70.5336052413,70.5289624981,70.5243346092,
262 70.5197214849,70.5151230364,70.5105391758,70.5059698158,70.5014148699,
263 70.4968742524,70.4923478781,70.4878356629,70.4833375231,70.4788533759,
264 70.4743831391,70.4699267312,70.4654840714,70.4610550798,70.4566396767,
265 70.4522377835,70.447849322,70.4434742148,70.439112385,70.4347637566,
266 70.4304282539,70.426105802,70.4217963266,70.4174997541,70.4132160112,
267 70.4089450256,70.4046867254,70.4004410391,70.3962078961,70.3919872262,
268 70.3877789598,70.3835830278,70.3793993618,70.3752278939,70.3710685566,
269 70.3669212831,70.3627860071,70.3586626627,70.3545511847,70.3504515084,
270 70.3463635694,70.3422873042,70.3382226493,70.3341695421,70.3301279203,
271 70.3260977221,70.3220788863,70.3180713521,70.314075059,70.3100899473,
272 70.3061159575,70.3021530306,70.2982011081,70.2942601321,70.2903300448,
273 70.2864107891,70.2825023083,70.278604546,70.2747174464,70.270840954,
274 70.2669750137,70.263119571,70.2592745716,70.2554399617,70.2516156878,
275 70.2478016971,70.2439979368,70.2402043547,70.2364208989,70.2326475181,
276 70.2288841612,70.2251307773,70.2213873163,70.2176537281,70.2139299631,
277 70.2102159721,70.2065117062,70.2028171169,70.1991321561,70.1954567758,
278 70.1917909286,70.1881345674,70.1844876454,70.180850116,70.1772219332,
279 70.1736030512,70.1699934245,70.1663930079,70.1628017565,70.159219626,
280 70.155646572,70.1520825507,70.1485275185,70.1449814321,70.1414442485,
281 70.1379159251,70.1343964195,70.1308856895,70.1273836935,70.1238903898,
282 70.1204057374,70.1169296952,70.1134622226,70.1100032792,70.1065528249,
283 70.10311082,70.0996772248,70.0962520002,70.0928351069,70.0894265065,
284 70.0860261602,70.08263403,70.0792500778,70.0758742659,70.072506557,
285 70.0691469136,70.065795299,70.0624516764,70.0591160093,70.0557882615,
286 70.052468397,70.0491563801,70.0458521752,70.0425557471,70.0392670607,
287 70.0359860812,70.032712774,70.0294471048,70.0261890395,70.022938544,
288 70.0196955847,70.0164601282,70.0132321412,70.0100115905,70.0067984435,
289 70.0035926675,70.0003942301,69.997203099,69.9940192423,69.9908426281,
290 69.987673225,69.9845110014,69.9813559263,69.9782079686,69.9750670975,
291 69.9719332824,69.968806493,69.9656866989,69.9625738702,69.9594679771,
292 69.9563689898,69.9532768789,69.9501916152,69.9471131695,69.9440415128,
293 69.9409766166,69.9379184521,69.934866991,69.9318222051,69.9287840663,
294 69.9257525469,69.922727619,69.9197092551,69.916697428,69.9136921103,
295 69.9106932751,69.9077008955,69.9047149448,69.9017353964,69.898762224,
296 69.8957954014,69.8928349024,69.8898807013,69.8869327721,69.8839910894,
297 69.8810556276,69.8781263615,69.875203266,69.872286316,69.8693754867,
298 69.8664707534,69.8635720915,69.8606794767,69.8577928846,69.8549122911,
299 69.8520376723,69.8491690042,69.8463062633,69.843449426,69.8405984687,
300 69.8377533682,69.8349141014,69.8320806452,69.8292529768,69.8264310733,
301 69.8236149122,69.820804471,69.8179997272,69.8152006587,69.8124072433,
302 69.809619459,69.806837284,69.8040606966,69.8012896751,69.798524198,
303 69.7957642439,69.7930097917,69.7902608201,69.7875173082,69.7847792351,
304 69.7820465799,69.7793193221,69.7765974411,69.7738809164,69.7711697277,
305 69.7684638549,69.7657632778,69.7630679764,69.760377931,69.7576931216,
306 69.7550135287,69.7523391328,69.7496699143,69.747005854,69.7443469326,
307 69.741693131,69.7390444302,69.7364008113,69.7337622555,69.731128744,
308 69.7285002583,69.7258767798,69.7232582901,69.720644771,69.7180362043,
309 69.7154325717,69.7128338553,69.7102400373,69.7076510997,69.7050670248,
310 69.702487795,69.6999133929,69.6973438008,69.6947790015,69.6922189777,
311 69.6896637122,69.6871131881,69.6845673881,69.6820262956,69.6794898936,
312 69.6769581654,69.6744310945,69.6719086642,69.669390858,69.6668776597,
313 69.6643690529,69.6618650215,69.6593655492,69.65687062,69.6543802181,
314 69.6518943274,69.6494129323,69.646936017,69.6444635658,69.6419955633,
315 69.6395319939,69.6370728423,69.6346180932,69.6321677312,69.6297217413,
316 69.6272801083,69.6248428174,69.6224098534,69.6199812016,69.6175568472,
317 69.6151367755,69.6127209718,69.6103094217,69.6079021105,69.605499024,
318 69.6031001477,69.6007054674,69.5983149688,69.595928638,69.5935464607,
319 69.5911684231,69.5887945111,69.586424711,69.5840590089,69.5816973912,
320 69.5793398442,69.5769863543,69.5746369081,69.5722914919,69.5699500926,
321 69.5676126967,69.565279291,69.5629498624,69.5606243976,69.5583028837,
322 69.5559853076,69.5536716564,69.5513619173,69.5490560774,69.546754124,
323 69.5444560444,69.542161826,69.5398714561,69.5375849224,69.5353022123,
324 69.5330233135,69.5307482137,69.5284769005,69.5262093618,69.5239455854,
325 69.5216855592,69.5194292712,69.5171767094,69.5149278619,69.5126827168,
326 69.5104412624,69.5082034867,69.5059693782,69.5037389252,69.5015121161,
327 69.4992889393,69.4970693835,69.4948534371,69.4926410887,69.4904323271,
328 69.488227141,69.4860255191,69.4838274503,69.4816329235,69.4794419275,
329 69.4772544515,69.4750704843,69.4728900152,69.4707130332,69.4685395275,
330 69.4663694874,69.4642029021,69.462039761,69.4598800535,69.4577237689,
331 69.4555708968,69.4534214266,69.451275348,69.4491326506,69.446993324,
332 69.444857358,69.4427247423,69.4405954667,69.438469521,69.4363468952,
333 69.4342275792,69.4321115629,69.4299988365,69.42788939,69.4257832134,
334 69.4236802971,69.421580631,69.4194842056,69.4173910112,69.4153010379,
335 69.4132142763,69.4111307167,69.4090503496,69.4069731655,69.404899155,
336 69.4028283086,69.400760617,69.3986960708,69.3966346607,69.3945763775,
337 69.392521212,69.390469155,69.3884201974,69.3863743301,69.384331544,
338 69.3822918302,69.3802551795,69.3782215832,69.3761910323,69.374163518,
339 69.3721390314,69.3701175638,69.3680991063,69.3660836504,69.3640711872,
340 69.3620617083,69.360055205,69.3580516687,69.3560510909,69.3540534631,
341 69.3520587769,69.3500670239,69.3480781956,69.3460922837,69.34410928,
342 69.3421291761,69.3401519637,69.3381776348,69.3362061811,69.3342375944,
343 69.3322718667,69.3303089899,69.328348956,69.3263917569,69.3244373848,
344 69.3224858315,69.3205370893,69.3185911503,69.3166480066,69.3147076504,
345 69.312770074,69.3108352696,69.3089032295,69.306973946,69.3050474114,
346 69.3031236182,69.3012025588,69.2992842255,69.297368611,69.2954557076,
347 69.293545508,69.2916380046,69.2897331902,69.2878310572,69.2859315985,
348 69.2840348066,69.2821406742,69.2802491942,69.2783603593,69.2764741623,
349 69.274590596,69.2727096534,69.2708313271,69.2689556103,69.2670824959,
350 69.2652119768,69.263344046,69.2614786965,69.2596159215,69.2577557139,
351 69.255898067,69.2540429739,69.2521904276,69.2503404215,69.2484929487,
352 69.2466480025,69.2448055761,69.2429656629,69.2411282562,69.2392933493,
353 69.2374609357,69.2356310086,69.2338035617,69.2319785882,69.2301560817,
354 69.2283360358,69.2265184438,69.2247032995,69.2228905963,69.2210803279,
355 69.2192724879,69.21746707,69.2156640679,69.2138634751,69.2120652856,
356 69.210269493,69.2084760912,69.2066850738,69.2048964348,69.203110168,
357 69.2013262672,69.1995447265,69.1977655395,69.1959887005,69.1942142031,
358 69.1924420416,69.1906722099,69.1889047019,69.1871395119,69.1853766338,
359 69.1836160617,69.1818577899,69.1801018123,69.1783481232,69.1765967169,
360 69.1748475874,69.173100729,69.171356136,69.1696138026,69.1678737232,
361 69.1661358921,69.1644003035,69.162666952,69.1609358317,69.1592069373,
362 69.157480263,69.1557558033,69.1540335526,69.1523135056,69.1505956566,
363 69.1488800002,69.1471665309,69.1454552434,69.1437461321,69.1420391917,
364 69.1403344169,69.1386318022,69.1369313423,69.1352330319,69.1335368658,
365 69.1318428385,69.130150945,69.1284611799,69.126773538,69.1250880141,
366 69.1234046031,69.1217232997,69.1200440988,69.1183669953,69.1166919841,
367 69.1150190601,69.1133482182,69.1116794534,69.1100127607,69.1083481349,
368 69.1066855712,69.1050250645,69.1033666098,69.1017102023,69.100055837,
369 69.098403509,69.0967532133,69.0951049452,69.0934586997,69.0918144721,
370 69.0901722574,69.0885320509,69.0868938478,69.0852576434,69.0836234328,
371 69.0819912113,69.0803609742,69.0787327168,69.0771064344,69.0754821223,
372 69.0738597759,69.0722393905,69.0706209615,69.0690044844,69.0673899544,
373 69.065777367,69.0641667177,69.0625580019,69.0609512151,69.0593463528,
374 69.0577434105,69.0561423836,69.0545432678,69.0529460585,69.0513507514,
375 69.049757342,69.0481658259,69.0465761987,69.0449884561,69.0434025936,
376 69.041818607,69.0402364919,69.0386562439,69.0370778589,69.0355013325,
377 69.0339266603,69.0323538383,69.0307828621,69.0292137275,69.0276464302,
378 69.0260809661,69.0245173311,69.0229555208,69.0213955313,69.0198373582,
379 69.0182809975,69.0167264451,69.0151736969,69.0136227488,69.0120735967,
380 69.0105262365,69.0089806642,69.0074368758,69.0058948672,69.0043546345,
381 69.0028161736,69.0012794806,68.9997445515,68.9982113823,68.9966799691,
382 68.995150308,68.993622395,68.9920962263,68.990571798,68.9890491061,
383 68.9875281469,68.9860089165,68.984491411,68.9829756266,68.9814615595,
384 68.9799492059,68.978438562,68.976929624,68.9754223882,68.9739168508,
385 68.9724130081,68.9709108564,68.9694103919,68.9679116109,68.9664145098,
386 68.9649190848,68.9634253323,68.9619332487,68.9604428303,68.9589540734,
387 68.9574669745,68.95598153,68.9544977362,68.9530155895,68.9515350864,
388 68.9500562234,68.9485789968,68.9471034032,68.945629439,68.9441571007,
389 68.9426863847,68.9412172877,68.9397498061,68.9382839364,68.9368196752,
390 68.935357019,68.9338959644,68.932436508,68.9309786463,68.929522376,
391 68.9280676936,68.9266145957,68.9251630791,68.9237131402,68.9222647759,
392 68.9208179827,68.9193727572,68.9179290963,68.9164869965,68.9150464545,
393 68.9136074672,68.9121700311,68.9107341431,68.9092997998,68.907866998,
394 68.9064357345,68.9050060061,68.9035778095,68.9021511415,68.9007259989,
395 68.8993023786,68.8978802773,68.8964596919,68.8950406192,68.8936230561,
396 68.8922069994,68.890792446,68.8893793928,68.8879678367,68.8865577745,
397 68.8851492032,68.8837421197,68.8823365209,68.8809324038,68.8795297653,
398 68.8781286023,68.8767289119,68.8753306909,68.8739339364,68.8725386454,
399 68.8711448149,68.8697524418,68.8683615232,68.8669720562,68.8655840377,
400 68.8641974648,68.8628123346,68.8614286441,68.8600463904,68.8586655705,
401 68.8572861817,68.8559082209,68.8545316853,68.853156572,68.8517828781,
402 68.8504106007,68.8490397371,68.8476702843,68.8463022395,68.8449355998,
403 68.8435703625,68.8422065248,68.8408440837,68.8394830366,68.8381233807,
404 68.836765113,68.835408231,68.8340527318,68.8326986126,68.8313458707,
405 68.8299945034,68.8286445079,68.8272958816,68.8259486216,68.8246027253,
406 68.8232581899,68.8219150129,68.8205731915,68.8192327229,68.8178936047,
407 68.816555834,68.8152194082,68.8138843248,68.812550581,68.8112181742,
408 68.8098871018,68.8085573612,68.8072289498,68.8059018649,68.804576104,
409 68.8032516645,68.8019285438,68.8006067394,68.7992862487,68.797967069,
410 68.796649198,68.795332633,68.7940173715,68.7927034109,68.7913907488,
411 68.7900793827,68.78876931,68.7874605283,68.786153035,68.7848468276,
412 68.7835419038
413 }},
414 { // Ri = 250k
415 -5,5,200,2001, {
416 127.202255052,127.144735521,127.087208545,127.029674135,126.972132303,
417 126.914583061,126.857026422,126.799462397,126.741890998,126.684312237,
418 126.626726127,126.569132679,126.511531906,126.45392382,126.396308434,
419 126.338685759,126.281055807,126.223418592,126.165774125,126.108122418,
420 126.050463485,125.992797338,125.935123988,125.877443449,125.819755734,
421 125.762060854,125.704358822,125.646649651,125.588933353,125.531209942,
422 125.473479429,125.415741829,125.357997152,125.300245413,125.242486624,
423 125.184720797,125.126947947,125.069168085,125.011381225,124.953587379,
424 124.895786561,124.837978784,124.780164061,124.722342404,124.664513828,
425 124.606678345,124.548835968,124.490986711,124.433130587,124.375267609,
426 124.317397791,124.259521146,124.201637688,124.143747429,124.085850383,
427 124.027946564,123.970035986,123.912118661,123.854194604,123.796263828,
428 123.738326347,123.680382175,123.622431324,123.56447381,123.506509646,
429 123.448538845,123.390561421,123.332577389,123.274586763,123.216589556,
430 123.158585782,123.100575455,123.04255859,122.984535201,122.926505301,
431 122.868468905,122.810426027,122.752376682,122.694320883,122.636258645,
432 122.578189982,122.520114909,122.46203344,122.40394559,122.345851372,
433 122.287750803,122.229643895,122.171530664,122.113411125,122.055285291,
434 121.997153178,121.939014801,121.880870174,121.822719312,121.76456223,
435 121.706398942,121.648229465,121.590053812,121.531871999,121.47368404,
436 121.415489952,121.357289748,121.299083444,121.240871056,121.182652598,
437 121.124428085,121.066197534,121.007960959,120.949718376,120.891469799,
438 120.833215245,120.77495473,120.716688268,120.658415874,120.600137566,
439 120.541853358,120.483563266,120.425267305,120.366965492,120.308657843,
440 120.250344372,120.192025096,120.133700031,120.075369193,120.017032598,
441 119.958690261,119.900342199,119.841988428,119.783628965,119.725263824,
442 119.666893023,119.608516578,119.550134505,119.49174682,119.433353539,
443 119.37495468,119.316550259,119.258140292,119.199724795,119.141303786,
444 119.08287728,119.024445295,118.966007847,118.907564953,118.84911663,
445 118.790662894,118.732203763,118.673739253,118.615269382,118.556794165,
446 118.498313621,118.439827767,118.381336619,118.322840194,118.26433851,
447 118.205831585,118.147319435,118.088802077,118.03027953,117.97175181,
448 117.913218935,117.854680922,117.796137789,117.737589554,117.679036234,
449 117.620477847,117.56191441,117.503345942,117.444772459,117.386193981,
450 117.327610524,117.269022108,117.210428748,117.151830465,117.093227275,
451 117.034619197,116.97600625,116.91738845,116.858765817,116.800138368,
452 116.741506123,116.682869099,116.624227315,116.565580789,116.50692954,
453 116.448273586,116.389612947,116.330947639,116.272277683,116.213603098,
454 116.1549239,116.096240111,116.037551747,115.97885883,115.920161376,
455 115.861459406,115.802752938,115.744041992,115.685326586,115.62660674,
456 115.567882473,115.509153805,115.450420754,115.39168334,115.332941582,
457 115.274195501,115.215445115,115.156690443,115.097931507,115.039168325,
458 114.980400916,114.921629302,114.862853501,114.804073533,114.745289419,
459 114.686501178,114.62770883,114.568912395,114.510111894,114.451307346,
460 114.392498772,114.333686192,114.274869626,114.216049094,114.157224618,
461 114.098396216,114.039563911,113.980727722,113.92188767,113.863043775,
462 113.804196059,113.745344542,113.686489244,113.627630188,113.568767392,
463 113.509900879,113.451030669,113.392156784,113.333279244,113.274398071,
464 113.215513286,113.156624909,113.097732963,113.038837469,112.979938447,
465 112.92103592,112.862129909,112.803220436,112.744307521,112.685391187,
466 112.626471456,112.567548349,112.508621888,112.449692094,112.39075899,
467 112.331822598,112.272882939,112.213940037,112.154993911,112.096044586,
468 112.037092083,111.978136425,111.919177633,111.860215731,111.80125074,
469 111.742282682,111.683311582,111.624337461,111.565360341,111.506380246,
470 111.447397198,111.38841122,111.329422336,111.270430566,111.211435936,
471 111.152438467,111.093438183,111.034435107,110.975429263,110.916420672,
472 110.857409359,110.798395347,110.73937866,110.68035932,110.621337352,
473 110.562312778,110.503285623,110.44425591,110.385223663,110.326188906,
474 110.267151662,110.208111956,110.149069811,110.090025251,110.030978301,
475 109.971928984,109.912877325,109.853823348,109.794767077,109.735708537,
476 109.676647752,109.617584746,109.558519543,109.49945217,109.440382649,
477 109.381311006,109.322237266,109.263161453,109.204083593,109.145003709,
478 109.085921827,109.026837973,108.96775217,108.908664445,108.849574822,
479 108.790483327,108.731389986,108.672294822,108.613197863,108.554099132,
480 108.494998657,108.435896462,108.376792573,108.317687016,108.258579817,
481 108.199471001,108.140360595,108.081248624,108.022135115,107.963020092,
482 107.903903584,107.844785615,107.785666212,107.726545402,107.66742321,
483 107.608299663,107.549174788,107.490048611,107.430921159,107.371792458,
484 107.312662536,107.253531418,107.194399133,107.135265706,107.076131165,
485 107.016995536,106.957858848,106.898721126,106.839582398,106.780442692,
486 106.721302035,106.662160454,106.603017977,106.543874631,106.484730444,
487 106.425585443,106.366439656,106.307293111,106.248145836,106.188997858,
488 106.129849206,106.070699908,106.011549991,105.952399484,105.893248414,
489 105.834096811,105.774944703,105.715792117,105.656639083,105.597485629,
490 105.538331783,105.479177574,105.420023031,105.360868183,105.301713058,
491 105.242557685,105.183402093,105.124246312,105.065090369,105.005934295,
492 104.946778119,104.88762187,104.828465577,104.769309269,104.710152976,
493 104.650996728,104.591840554,104.532684484,104.473528547,104.414372774,
494 104.355217194,104.296061836,104.236906732,104.17775191,104.118597402,
495 104.059443236,104.000289445,103.941136056,103.881983102,103.822830613,
496 103.763678618,103.704527149,103.645376236,103.586225909,103.527076201,
497 103.46792714,103.408778759,103.349631087,103.290484157,103.231337999,
498 103.172192644,103.113048124,103.053904469,102.994761711,102.935619882,
499 102.876479012,102.817339134,102.758200279,102.699062479,102.639925765,
500 102.580790168,102.521655722,102.462522458,102.403390407,102.344259603,
501 102.285130076,102.226001859,102.166874985,102.107749485,102.048625393,
502 101.989502739,101.930381558,101.871261882,101.812143742,101.753027172,
503 101.693912205,101.634798874,101.575687211,101.516577249,101.457469021,
504 101.398362561,101.339257902,101.280155076,101.221054117,101.161955059,
505 101.102857935,101.043762779,100.984669623,100.925578502,100.866489449,
506 100.807402498,100.748317684,100.689235038,100.630154597,100.571076394,
507 100.512000462,100.452926836,100.393855551,100.33478664,100.275720138,
508 100.21665608,100.157594499,100.098535431,100.03947891,99.9804249704,
509 99.9213736475,99.8623249759,99.8032789906,99.7442357264,99.6851952186,
510 99.626157502,99.567122612,99.5080905837,99.4490614525,99.3900352536,
511 99.3310120227,99.2719917951,99.2129746064,99.1539604923,99.0949494884,
512 99.0359416307,98.9769369548,98.9179354966,98.8589372923,98.7999423778,
513 98.7409507892,98.6819625626,98.6229777345,98.563996341,98.5050184185,
514 98.4460440035,98.3870731325,98.328105842,98.2691421688,98.2101821495,
515 98.151225821,98.09227322,98.0333243835,97.9743793485,97.915438152,
516 97.8565008311,97.7975674231,97.7386379652,97.6797124948,97.6207910491,
517 97.5618736657,97.5029603821,97.4440512358,97.3851462647,97.3262455062,
518 97.2673489984,97.208456779,97.149568886,97.0906853573,97.031806231,
519 96.9729315454,96.9140613384,96.8551956486,96.7963345141,96.7374779733,
520 96.6786260648,96.6197788271,96.5609362988,96.5020985186,96.4432655252,
521 96.3844373574,96.3256140541,96.2667956543,96.2079821969,96.1491737211,
522 96.090370266,96.0315718708,95.9727785748,95.9139904174,95.8552074379,
523 95.796429676,95.737657171,95.6788899628,95.6201280909,95.5613715951,
524 95.5026205153,95.4438748913,95.3851347632,95.3264001709,95.2676711546,
525 95.2089477545,95.1502300108,95.0915179637,95.0328116538,94.9741111215,
526 94.9154164072,94.8567275516,94.7980445954,94.7393675792,94.6806965439,
527 94.6220315304,94.5633725795,94.5047197323,94.44607303,94.3874325135,
528 94.3287982243,94.2701702035,94.2115484926,94.152933133,94.0943241661,
529 94.0357216337,93.9771255772,93.9185360386,93.8599530596,93.801376682,
530 93.7428069478,93.684243899,93.6256875779,93.5671380264,93.5085952869,
531 93.4500594017,93.3915304132,93.3330083638,93.2744932962,93.215985253,
532 93.1574842769,93.0989904107,93.0405036972,92.9820241794,92.9235519003,
533 92.8650869031,92.806629231,92.7481789271,92.689736035,92.631300598,
534 92.5728726596,92.5144522635,92.4560394534,92.397634273,92.3392367663,
535 92.2808469772,92.2224649498,92.1640907283,92.1057243567,92.0473658796,
536 91.9890153414,91.9306727865,91.8723382596,91.8140118055,91.7556934689,
537 91.6973832947,91.6390813282,91.5807876143,91.5225021983,91.4642251255,
538 91.4059564416,91.3476961919,91.2894444223,91.2312011785,91.1729665065,
539 91.1147404523,91.0565230622,90.9983143824,90.9401144593,90.8819233396,
540 90.8237410699,90.7655676971,90.7074032682,90.6492478303,90.5911014307,
541 90.5329641168,90.4748359361,90.4167169366,90.3586071659,90.3005066723,
542 90.242415504,90.1843337093,90.1262613369,90.0681984356,90.0101450544,
543 89.9521012424,89.8940670489,89.8360425236,89.7780277163,89.7200226769,
544 89.6620274557,89.6040421032,89.54606667,89.4881012072,89.4301457658,
545 89.3722003975,89.3142651538,89.2563400868,89.1984252488,89.1405206923,
546 89.0826264704,89.0247426361,88.966869243,88.9090063449,88.8511539961,
547 88.7933122511,88.7354811649,88.6776607928,88.6198511904,88.5620524139,
548 88.5042645199,88.4464875652,88.3887216073,88.3309667042,88.2732229142,
549 88.2154902961,88.1577689093,88.1000588138,88.04236007,87.9846727391,
550 87.9269968825,87.8693325627,87.8116798425,87.7540387854,87.6964094557,
551 87.6387919184,87.5811862391,87.5235924843,87.4660107213,87.408441018,
552 87.3508834435,87.2933380675,87.2358049606,87.1782841946,87.1207758422,
553 87.0632799768,87.0057966733,86.9483260074,86.8908680562,86.8334228976,
554 86.7759906111,86.7185712772,86.661164978,86.6037717966,86.5463918178,
555 86.4890251277,86.4316718142,86.3743319664,86.3170056754,86.2596930337,
556 86.2023941359,86.145109078,86.0878379584,86.0305808771,85.9733379363,
557 85.9161092405,85.8588948961,85.8016950119,85.7445096993,85.687339072,
558 85.6301832461,85.5730423407,85.5159164775,85.4588057811,85.4017103791,
559 85.3446304022,85.2875659842,85.2305172625,85.1734843777,85.1164674741,
560 85.0594666999,85.0024822069,84.945514151,84.8885626925,84.8316279957,
561 84.7747102297,84.717809568,84.6609261892,84.6040602768,84.5472120195,
562 84.4903816116,84.4335692527,84.3767751485,84.3199995108,84.2632425574,
563 84.2065045129,84.1497856085,84.0930860825,84.0364061805,83.9797461556,
564 83.9231062687,83.866486789,83.809887994,83.75331017,83.6967536122,
565 83.6402186255,83.5837055244,83.5272146335,83.470746288,83.4143008337,
566 83.3578786281,83.3014800399,83.2451054504,83.1887552531,83.1324298546,
567 83.0761296751,83.0198551485,82.9636067233,82.9073848632,82.8511900471,
568 82.79502277,82.7388835436,82.682772897,82.6266913768,82.5706395482,
569 82.5146179955,82.4586273228,82.4026681544,82.346741136,82.290846935,
570 82.2349862413,82.1791597684,82.1233682537,82.0676124596,82.0118931742,
571 81.9562112123,81.9005674161,81.844962656,81.7893978318,81.7338738734,
572 81.6783917418,81.6229524301,81.5675569644,81.5122064049,81.456901847,
573 81.4016444219,81.3464352983,81.291275683,81.2361668221,81.1811100021,
574 81.1261065514,81.0711578405,81.0162652843,80.9614303422,80.90665452,
575 80.8519393705,80.7972864951,80.7426975448,80.6881742212,80.6337182778,
576 80.579331521,80.5250158115,80.470773065,80.4166052536,80.3625144069,
577 80.3085026127,80.2545720181,80.2007248309,80.1469633197,80.0932898155,
578 80.0397067122,79.9862164673,79.9328216025,79.8795247049,79.8263284265,
579 79.7732354857,79.7202486668,79.6673708208,79.6146048653,79.5619537845,
580 79.5094206291,79.4570085162,79.4047206287,79.352560215,79.3005305881,
581 79.2486351248,79.1968772648,79.1452605095,79.0937884205,79.042464618,
582 78.9912927792,78.9402766362,78.8894199741,78.838726628,78.7882004811,
583 78.7378454614,78.6876655389,78.6376647223,78.5878470553,78.5382166134,
584 78.4887774995,78.4395338398,78.3904897799,78.3416494797,78.2930171091,
585 78.2445968429,78.1963928557,78.1484093165,78.1006503837,78.053120199,
586 78.0058228821,77.958762525,77.9119431858,77.8653688829,77.819043589,
587 77.7729712253,77.7271556551,77.6816006782,77.6363100247,77.591287349,
588 77.5465362241,77.5020601362,77.4578624787,77.4139465467,77.3703155323,
589 77.3269725192,77.2839204776,77.2411622604,77.1987005979,77.1565380947,
590 77.1146772253,77.0731203307,77.0318696155,76.990927145,76.9502948426,
591 76.909974488,76.8699677149,76.8302760101,76.7909007119,76.7518430099,
592 76.7131039444,76.6746844061,76.636585137,76.5988067306,76.5613496329,
593 76.5242141439,76.4874004191,76.4509084712,76.4147381725,76.3788892573,
594 76.3433613242,76.3081538394,76.2732661397,76.2386974356,76.2044468146,
595 76.1705132456,76.1368955816,76.1035925643,76.070602828,76.0379249031,
596 76.0055572212,75.9734981182,75.9417458394,75.9102985434,75.8791543063,
597 75.848311126,75.8177669265,75.7875195623,75.7575668221,75.7279064333,
598 75.6985360662,75.6694533373,75.6406558142,75.6121410187,75.5839064308,
599 75.5559494925,75.5282676111,75.5008581629,75.4737184964,75.4468459357,
600 75.4202377835,75.3938913241,75.3678038265,75.3419725471,75.3163947322,
601 75.291067621,75.2659884475,75.2411544433,75.2165628397,75.1922108698,
602 75.1680957703,75.1442147838,75.1205651605,75.0971441596,75.0739490514,
603 75.0509771182,75.0282256564,75.0056919772,74.9833734085,74.9612672952,
604 74.9393710013,74.9176819098,74.8961974247,74.874914971,74.8538319958,
605 74.8329459692,74.8122543847,74.7917547597,74.7714446366,74.7513215823,
606 74.7313831897,74.7116270773,74.6920508898,74.6726522985,74.6534290013,
607 74.634378723,74.6154992156,74.5967882581,74.578243657,74.5598632461,
608 74.5416448865,74.5235864667,74.5056859027,74.4879411377,74.470350142,
609 74.4529109135,74.4356214765,74.4184798829,74.4014842108,74.3846325653,
610 74.3679230776,74.3513539054,74.3349232322,74.3186292676,74.3024702466,
611 74.2864444294,74.2705501017,74.2547855738,74.2391491806,74.2236392814,
612 74.2082542598,74.1929925227,74.177852501,74.1628326486,74.1479314424,
613 74.133147382,74.1184789894,74.1039248086,74.0894834054,74.0751533673,
614 74.0609333028,74.0468218415,74.0328176334,74.0189193491,74.0051256791,
615 73.9914353336,73.9778470424,73.9643595544,73.9509716375,73.937682078,
616 73.9244896808,73.9113932687,73.8983916822,73.8854837795,73.8726684358,
617 73.8599445434,73.8473110113,73.8347667649,73.8223107457,73.8099419111,
618 73.7976592344,73.785461704,73.7733483235,73.7613181117,73.7493701016,
619 73.737503341,73.7257168917,73.7140098296,73.7023812443,73.6908302387,
620 73.6793559292,73.6679574452,73.6566339291,73.6453845356,73.6342084321,
621 73.6231047982,73.6120728253,73.6011117169,73.590220688,73.579398965,
622 73.5686457855,73.5579603984,73.547342063,73.5367900498,73.5263036396,
623 73.5158821233,73.5055248024,73.495230988,73.4850000013,73.474831173,
624 73.4647238434,73.4546773621,73.4446910879,73.4347643887,73.4248966411,
625 73.4150872306,73.4053355513,73.3956410057,73.3860030047,73.3764209671,
626 73.3668943202,73.3574224987,73.3480049456,73.3386411111,73.3293304532,
627 73.3200724372,73.3108665357,73.3017122285,73.2926090024,73.2835563511,
628 73.2745537752,73.2656007821,73.2566968855,73.2478416058,73.2390344699,
629 73.2302750107,73.2215627675,73.2128972856,73.2042781163,73.1957048168,
630 73.1871769501,73.178694085,73.1702557957,73.1618616621,73.1535112694,
631 73.1452042084,73.1369400749,73.12871847,73.1205389999,73.1124012759,
632 73.104304914,73.0962495354,73.0882347658,73.0802602359,73.0723255807,
633 73.0644304401,73.0565744583,73.0487572841,73.0409785705,73.0332379747,
634 73.0255351586,73.0178697878,73.0102415321,73.0026500655,72.9950950659,
635 72.9875762151,72.9800931987,72.9726457062,72.9652334309,72.9578560697,
636 72.950513323,72.9432048951,72.9359304935,72.9286898295,72.9214826175,
637 72.9143085755,72.9071674247,72.9000588896,72.8929826981,72.885938581,
638 72.8789262723,72.8719455093,72.8649960321,72.8580775839,72.8511899108,
639 72.844332762,72.8375058893,72.8307090475,72.8239419941,72.8172044895,
640 72.8104962966,72.8038171811,72.7971669113,72.7905452582,72.7839519951,
641 72.7773868982,72.7708497458,72.764340319,72.757858401,72.7514037776,
642 72.7449762369,72.7385755693,72.7322015676,72.7258540266,72.7195327435,
643 72.7132375179,72.7069681511,72.7007244468,72.694506211,72.6883132513,
644 72.6821453778,72.6760024024,72.6698841391,72.6637904036,72.6577210139,
645 72.6516757897,72.6456545528,72.6396571265,72.6336833363,72.6277330094,
646 72.6218059746,72.6159020628,72.6100211064,72.6041629397,72.5983273985,
647 72.5925143204,72.5867235447,72.5809549122,72.5752082655,72.5694834485,
648 72.5637803071,72.5580986883,72.5524384409,72.5467994152,72.5411814629,
649 72.5355844373,72.530008193,72.5244525861,72.5189174741,72.5134027161,
650 72.5079081723,72.5024337044,72.4969791754,72.4915444497,72.4861293931,
651 72.4807338724,72.475357756,72.4700009133,72.4646632153,72.4593445339,
652 72.4540447423,72.448763715,72.4435013277,72.4382574572,72.4330319815,
653 72.4278247797,72.4226357321,72.4174647202,72.4123116263,72.4071763341,
654 72.4020587284,72.3969586948,72.3918761201,72.3868108923,72.3817629002,
655 72.3767320336,72.3717181837,72.3667212421,72.3617411019,72.3567776569,
656 72.3518308019,72.3469004328,72.3419864461,72.3370887397,72.332207212,
657 72.3273417625,72.3224922916,72.3176587005,72.3128408914,72.3080387673,
658 72.3032522319,72.2984811901,72.2937255474,72.2889852101,72.2842600854,
659 72.2795500813,72.2748551066,72.2701750709,72.2655098845,72.2608594586,
660 72.2562237051,72.2516025367,72.2469958667,72.2424036093,72.2378256794,
661 72.2332619927,72.2287124653,72.2241770145,72.2196555578,72.2151480137,
662 72.2106543013,72.2061743404,72.2017080515,72.1972553556,72.1928161746,
663 72.1883904309,72.1839780475,72.1795789482,72.1751930572,72.1708202995,
664 72.1664606008,72.1621138871,72.1577800852,72.1534591226,72.1491509271,
665 72.1448554274,72.1405725526,72.1363022322,72.1320443967,72.1277989769,
666 72.123565904,72.1193451101,72.1151365275,72.1109400894,72.1067557292,
667 72.1025833809,72.0984229793,72.0942744593,72.0901377566,72.0860128072,
668 72.0818995479,72.0777979156,72.073707848,72.0696292831,72.0655621596,
669 72.0615064164,72.0574619931,72.0534288296,72.0494068663,72.0453960442,
670 72.0413963045,72.0374075891,72.0334298402,72.0294630004,72.0255070128,
671 72.0215618211,72.017627369,72.0137036011,72.009790462,72.0058878971,
672 72.0019958519,71.9981142724,71.9942431051,71.9903822968,71.9865317947,
673 71.9826915465,71.9788615,71.9750416037,71.9712318063,71.967432057,
674 71.9636423053,71.959862501,71.9560925943,71.9523325359,71.9485822768,
675 71.9448417681,71.9411109616,71.9373898094,71.9336782636,71.9299762771,
676 71.9262838028,71.9226007941,71.9189272048,71.9152629889,71.9116081006,
677 71.9079624947,71.9043261262,71.9006989504,71.8970809229,71.8934719996,
678 71.8898721369,71.8862812912,71.8826994194,71.8791264786,71.8755624264,
679 71.8720072205,71.8684608189,71.8649231799,71.8613942621,71.8578740245,
680 71.8543624263,71.8508594268,71.8473649859,71.8438790635,71.8404016199,
681 71.8369326157,71.8334720117,71.8300197691,71.826575849,71.8231402132,
682 71.8197128235,71.816293642,71.8128826312,71.8094797536,71.806084972,
683 71.8026982497,71.79931955,71.7959488366,71.7925860731,71.7892312238,
684 71.785884253,71.7825451252,71.7792138052,71.775890258,71.7725744489,
685 71.7692663434,71.7659659071,71.762673106,71.7593879063,71.7561102742,
686 71.7528401764,71.7495775796,71.746322451,71.7430747576,71.7398344669,
687 71.7366015466,71.7333759644,71.7301576886,71.7269466872,71.7237429288,
688 71.7205463819,71.7173570156,71.7141747987,71.7109997006,71.7078316906,
689 71.7046707384,71.7015168139,71.698369887,71.6952299278,71.6920969069,
690 71.6889707947,71.685851562,71.6827391798,71.679633619,71.676534851,
691 71.6734428473,71.6703575795,71.6672790193,71.6642071389,71.6611419102,
692 71.6580833057,71.6550312978,71.6519858592,71.6489469627,71.6459145813,
693 71.6428886881,71.6398692565,71.6368562598,71.6338496718,71.6308494663,
694 71.6278556171,71.6248680983,71.6218868843,71.6189119494,71.6159432682,
695 71.6129808154,71.6100245659,71.6070744946,71.6041305767,71.6011927875,
696 71.5982611025,71.5953354972,71.5924159474,71.589502429,71.5865949179,
697 71.5836933903,71.5807978225,71.577908191,71.5750244723,71.5721466431,
698 71.5692746802,71.5664085606,71.5635482615,71.56069376,71.5578450334,
699 71.5550020594,71.5521648155,71.5493332795,71.5465074292,71.5436872426,
700 71.5408726979,71.5380637733,71.5352604472,71.532462698,71.5296705045,
701 71.5268838452,71.5241026992,71.5213270452,71.5185568625,71.5157921303,
702 71.5130328278,71.5102789345,71.5075304299,71.5047872938,71.5020495058,
703 71.4993170459,71.4965898941,71.4938680305,71.4911514352,71.4884400887,
704 71.4857339713,71.4830330636,71.4803373463,71.4776468,71.4749614057,
705 71.4722811443,71.4696059969,71.4669359446,71.4642709687,71.4616110506,
706 71.4589561717,71.4563063136,71.453661458,71.4510215867,71.4483866814,
707 71.4457567242,71.4431316972,71.4405115824,71.4378963621,71.4352860186,
708 71.4326805345,71.4300798922,71.4274840743,71.4248930635,71.4223068427,
709 71.4197253947,71.4171487025,71.4145767492,71.412009518,71.409446992,
710 71.4068891546,71.4043359893,71.4017874795,71.3992436089,71.3967043611,
711 71.3941697198,71.3916396689,71.3891141924,71.3865932742,71.3840768985,
712 71.3815650494,71.3790577112,71.3765548681,71.3740565047,71.3715626054,
713 71.3690731547,71.3665881374,71.3641075382,71.3616313418,71.3591595332,
714 71.3566920973,71.3542290191,71.3517702838,71.3493158765,71.3468657825,
715 71.3444199871,71.3419784758,71.3395412339,71.3371082471,71.334679501,
716 71.3322549813,71.3298346737,71.3274185641,71.3250066384,71.3225988825,
717 71.3201952826,71.3177958246,71.3154004948,71.3130092795,71.3106221649,
718 71.3082391374,71.3058601835,71.3034852898,71.3011144427,71.2987476289,
719 71.2963848352,71.2940260482,71.2916712549,71.2893204422,71.286973597,
720 71.2846307063,71.2822917573,71.279956737,71.2776256327,71.2752984317,
721 71.2729751214,71.270655689,71.2683401221,71.2660284081,71.2637205347,
722 71.2614164895,71.2591162602,71.2568198345,71.2545272002,71.2522383453,
723 71.2499532575,71.247671925,71.2453943357,71.2431204777,71.2408503393,
724 71.2385839085,71.2363211736,71.234062123,71.2318067451,71.2295550282,
725 71.2273069608,71.2250625314,71.2228217287,71.2205845412,71.2183509577,
726 71.2161209669,71.2138945576,71.2116717186,71.2094524388,71.2072367071,
727 71.2050245127,71.2028158444,71.2006106914,71.1984090428,71.1962108879,
728 71.1940162159,71.191825016,71.1896372776,71.1874529901,71.1852721429,
729 71.1830947256,71.1809207276,71.1787501385,71.176582948,71.1744191456,
730 71.1722587212,71.1701016646,71.1679479654,71.1657976135,71.163650599,
731 71.1615069116,71.1593665414,71.1572294785,71.1550957128,71.1529652346,
732 71.1508380339,71.1487141011,71.1465934263,71.1444759999,71.1423618121,
733 71.1402508534,71.1381431141,71.1360385848,71.133937256,71.1318391181,
734 71.1297441618,71.1276523777,71.1255637565,71.1234782889,71.1213959656,
735 71.1193167774,71.1172407152,71.1151677698,71.1130979321,71.1110311931,
736 71.1089675437,71.106906975,71.1048494781,71.102795044,71.1007436639,
737 71.098695329,71.0966500304,71.0946077595,71.0925685075,71.0905322657,
738 71.0884990255,71.0864687783,71.0844415156,71.0824172287,71.0803959093,
739 71.0783775489,71.0763621389,71.0743496712,71.0723401372,71.0703335287,
740 71.0683298374,71.066329055,71.0643311734,71.0623361844,71.0603440798,
741 71.0583548515,71.0563684914,71.0543849915,71.0524043438,71.0504265403,
742 71.048451573,71.0464794341,71.0445101156,71.0425436098,71.0405799088,
743 71.0386190048,71.03666089,71.0347055568,71.0327529975,71.0308032044,
744 71.0288561699,71.0269118863,71.0249703462,71.023031542,71.0210954661,
745 71.0191621112,71.0172314698,71.0153035344,71.0133782977,71.0114557523,
746 71.009535891,71.0076187064,71.0057041912,71.0037923382,71.0018831403,
747 70.9999765902,70.9980726807,70.9961714049,70.9942727555,70.9923767255,
748 70.9904833079,70.9885924957,70.9867042819,70.9848186595,70.9829356216,
749 70.9810551613,70.9791772718,70.9773019462,70.9754291776,70.9735589594,
750 70.9716912847,70.9698261468,70.9679635389,70.9661034545,70.9642458868,
751 70.9623908292,70.9605382751,70.958688218,70.9568406512,70.9549955682,
752 70.9531529626,70.9513128279,70.9494751575,70.9476399451,70.9458071843,
753 70.9439768687,70.9421489919,70.9403235476,70.9385005294,70.9366799312,
754 70.9348617467,70.9330459695,70.9312325936,70.9294216127,70.9276130206,
755 70.9258068113,70.9240029785,70.9222015163,70.9204024184,70.918605679,
756 70.9168112919,70.9150192512,70.9132295508,70.9114421849,70.9096571474,
757 70.9078744325,70.9060940343,70.904315947,70.9025401645,70.9007666812,
758 70.8989954913,70.8972265889,70.8954599683,70.8936956238,70.8919335496,
759 70.89017374,70.8884161894,70.8866608922,70.8849078426,70.8831570351,
760 70.8814084641,70.879662124,70.8779180092,70.8761761143,70.8744364337,
761 70.8726989619,70.8709636935,70.869230623,70.867499745,70.865771054,
762 70.8640445448,70.8623202118,70.8605980499,70.8588780535,70.8571602175,
763 70.8554445365,70.8537310053,70.8520196185,70.850310371,70.8486032576,
764 70.846898273,70.8451954121,70.8434946697,70.8417960407,70.8400995199,
765 70.8384051023,70.8367127827,70.8350225561,70.8333344174,70.8316483616,
766 70.8299643837,70.8282824787,70.8266026417,70.8249248675,70.8232491514,
767 70.8215754884,70.8199038735,70.8182343019,70.8165667687,70.8149012691,
768 70.8132377981,70.8115763511,70.8099169231,70.8082595094,70.8066041053,
769 70.8049507059,70.8032993065,70.8016499024,70.8000024889,70.7983570614,
770 70.796713615,70.7950721452,70.7934326474,70.7917951169,70.7901595491,
771 70.7885259394,70.7868942832,70.785264576,70.7836368132,70.7820109903,
772 70.7803871028,70.7787651462,70.777145116,70.7755270077,70.7739108169,
773 70.7722965391,70.77068417,70.769073705,70.7674651399,70.7658584703,
774 70.7642536917,70.7626507999,70.7610497905,70.7594506591,70.7578534016,
775 70.7562580136,70.7546644907,70.7530728289,70.7514830237,70.7498950711,
776 70.7483089667,70.7467247064,70.745142286,70.7435617013,70.7419829481,
777 70.7404060224,70.7388309199,70.7372576365,70.7356861682,70.7341165109,
778 70.7325486605,70.7309826128,70.729418364,70.7278559098,70.7262952464,
779 70.7247363697,70.7231792756,70.7216239603,70.7200704198,70.71851865,
780 70.716968647,70.715420407,70.713873926,70.7123292001,70.7107862253,
781 70.7092449979,70.707705514,70.7061677696,70.704631761,70.7030974843,
782 70.7015649357,70.7000341115,70.6985050077,70.6969776207,70.6954519467,
783 70.6939279818,70.6924057225,70.6908851648,70.6893663052,70.68784914,
784 70.6863336653,70.6848198776,70.6833077731,70.6817973482,70.6802885993,
785 70.6787815228,70.6772761149,70.6757723721,70.6742702908,70.6727698674,
786 70.6712710983,70.66977398,70.6682785089,70.6667846814,70.6652924941,
787 70.6638019434,70.6623130257,70.6608257377,70.6593400758,70.6578560365,
788 70.6563736163,70.6548928119,70.6534136197,70.6519360364,70.6504600585,
789 70.6489856826,70.6475129053,70.6460417232,70.6445721329,70.6431041311,
790 70.6416377145,70.6401728795,70.638709623,70.6372479416,70.635787832,
791 70.6343292908,70.6328723148,70.6314169007,70.6299630452,70.6285107451,
792 70.6270599971,70.6256107979,70.6241631443,70.6227170332,70.6212724612,
793 70.6198294252,70.618387922,70.6169479483,70.6155095011,70.6140725771,
794 70.6126371732,70.6112032863,70.6097709132,70.6083400508,70.6069106959,
795 70.6054828456,70.6040564965,70.6026316458,70.6012082902,70.5997864268,
796 70.5983660524,70.5969471641,70.5955297587,70.5941138333,70.5926993847,
797 70.5912864101,70.5898749064,70.5884648705,70.5870562996,70.5856491906,
798 70.5842435406,70.5828393466,70.5814366056,70.5800353147,70.578635471,
799 70.5772370716,70.5758401135,70.5744445938,70.5730505096,70.5716578581,
800 70.5702666363,70.5688768414,70.5674884705,70.5661015208,70.5647159894,
801 70.5633318734,70.5619491701,70.5605678767,70.5591879902,70.5578095079,
802 70.5564324271,70.5550567448,70.5536824584,70.552309565,70.550938062,
803 70.5495679464,70.5481992157,70.546831867,70.5454658977,70.5441013049,
804 70.542738086,70.5413762383,70.5400157591,70.5386566456,70.5372988952,
805 70.5359425053,70.534587473,70.5332337959,70.5318814712,70.5305304963,
806 70.5291808686,70.5278325853,70.526485644,70.5251400419,70.5237957765,
807 70.5224528452,70.5211112453,70.5197709744,70.5184320297,70.5170944088,
808 70.5157581091,70.514423128,70.513089463,70.5117571115,70.510426071,
809 70.5090963391,70.507767913,70.5064407904,70.5051149688,70.5037904455,
810 70.5024672183,70.5011452845,70.4998246417,70.4985052874,70.4971872192,
811 70.4958704345,70.494554931,70.4932407063,70.4919277578,70.4906160832,
812 70.48930568,70.4879965458,70.4866886782,70.4853820748,70.4840767332,
813 70.4827726511,70.481469826,70.4801682555,70.4788679374,70.4775688692,
814 70.4762710486,70.4749744732,70.4736791407,70.4723850488,70.4710921952,
815 70.4698005774,70.4685101933,70.4672210404,70.4659331165,70.4646464193,
816 70.4633609466
817 }}
818 };
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 // generated by ../../tools/tube_transfer.py
21 // tube: 12AX7
22 // plate current function: triode
23 // mu: 100
24 // kx: 1.4
25 // kg1: 1060
26 // kp: 600
27 // kvb: 300
28
29 table1d_imp<2001> tubetable_12AX7[2] =
30 {
31 {
32 // Ri = 68k
33 -5,5,200,2001, {
34 249.98706929,249.986851225,249.986629489,249.986404021,249.986174757,
35 249.985941635,249.985704589,249.985463554,249.985218463,249.984969247,
36 249.984715838,249.984458166,249.984196158,249.983929743,249.983658846,
37 249.983383392,249.983103306,249.982818508,249.982528921,249.982234464,
38 249.981935056,249.981630613,249.981321052,249.981006287,249.98068623,
39 249.980360793,249.980029887,249.979693419,249.979351296,249.979003424,
40 249.978649708,249.978290048,249.977924346,249.9775525,249.977174409,
41 249.976789967,249.976399069,249.976001606,249.97559747,249.975186548,
42 249.974768727,249.974343893,249.973911927,249.973472711,249.973026125,
43 249.972572044,249.972110345,249.9716409,249.971163579,249.970678252,
44 249.970184785,249.969683043,249.969172887,249.968654177,249.968126772,
45 249.967590526,249.967045292,249.96649092,249.965927258,249.965354153,
46 249.964771446,249.964178978,249.963576587,249.962964107,249.962341372,
47 249.961708211,249.96106445,249.960409914,249.959744424,249.959067797,
48 249.95837985,249.957680393,249.956969237,249.956246188,249.955511048,
49 249.954763616,249.95400369,249.953231063,249.952445523,249.951646857,
50 249.950834849,249.950009276,249.949169916,249.94831654,249.947448916,
51 249.946566809,249.945669979,249.944758184,249.943831177,249.942888706,
52 249.941930516,249.940956349,249.93996594,249.938959023,249.937935324,
53 249.936894568,249.935836475,249.934760758,249.933667127,249.932555289,
54 249.931424944,249.930275788,249.929107511,249.9279198,249.926712337,
55 249.925484796,249.92423685,249.922968162,249.921678394,249.9203672,
56 249.91903423,249.917679127,249.916301529,249.914901069,249.913477372,
57 249.912030061,249.910558748,249.909063042,249.907542547,249.905996856,
58 249.904425561,249.902828244,249.901204482,249.899553844,249.897875894,
59 249.896170188,249.894436274,249.892673696,249.890881989,249.889060679,
60 249.887209288,249.885327328,249.883414305,249.881469716,249.879493052,
61 249.877483793,249.875441414,249.87336538,249.87125515,249.869110171,
62 249.866929885,249.864713724,249.86246111,249.860171458,249.857844173,
63 249.855478652,249.853074281,249.850630438,249.848146491,249.845621799,
64 249.843055711,249.840447565,249.837796689,249.835102404,249.832364016,
65 249.829580824,249.826752115,249.823877166,249.820955243,249.8179856,
66 249.81496748,249.811900117,249.80878273,249.80561453,249.802394713,
67 249.799122465,249.795796959,249.792417358,249.788982809,249.785492449,
68 249.781945403,249.778340779,249.774677678,249.770955183,249.767172365,
69 249.763328284,249.759421981,249.75545249,249.751418824,249.747319988,
70 249.743154968,249.738922738,249.734622257,249.730252468,249.725812301,
71 249.72130067,249.716716471,249.712058589,249.70732589,249.702517225,
72 249.697631429,249.692667321,249.687623703,249.682499361,249.677293063,
73 249.672003562,249.666629592,249.661169871,249.655623098,249.649987954,
74 249.644263106,249.638447197,249.632538857,249.626536694,249.620439299,
75 249.614245244,249.607953082,249.601561346,249.59506855,249.588473189,
76 249.581773739,249.574968653,249.568056367,249.561035295,249.553903831,
77 249.546660348,249.5393032,249.531830718,249.524241211,249.516532969,
78 249.508704259,249.500753327,249.492678397,249.48447767,249.476149326,
79 249.467691521,249.459102391,249.450380046,249.441522576,249.432528047,
80 249.423394501,249.414119957,249.404702411,249.395139834,249.385430176,
81 249.37557136,249.365561287,249.355397831,249.345078845,249.334602156,
82 249.323965565,249.313166851,249.302203767,249.291074039,249.27977537,
83 249.268305439,249.256661896,249.244842368,249.232844458,249.220665739,
84 249.208303762,249.195756051,249.183020104,249.170093394,249.156973366,
85 249.143657441,249.130143014,249.116427453,249.102508098,249.088382267,
86 249.074047249,249.059500307,249.044738677,249.029759572,249.014560175,
87 248.999137645,248.983489114,248.967611688,248.951502446,248.935158442,
88 248.918576704,248.901754233,248.884688005,248.867374969,248.84981205,
89 248.831996145,248.813924127,248.795592843,248.776999115,248.75813974,
90 248.739011488,248.719611106,248.699935316,248.679980814,248.659744274,
91 248.639222342,248.618411645,248.597308781,248.575910327,248.554212837,
92 248.532212841,248.509906845,248.487291335,248.464362771,248.441117595,
93 248.417552224,248.393663055,248.369446462,248.344898801,248.320016406,
94 248.29479559,248.269232647,248.243323852,248.217065459,248.190453706,
95 248.163484811,248.136154974,248.108460379,248.080397191,248.05196156,
96 248.02314962,247.993957487,247.964381265,247.934417041,247.904060889,
97 247.87330887,247.84215703,247.810601403,247.778638011,247.746262866,
98 247.713471967,247.680261303,247.646626855,247.612564592,247.578070476,
99 247.543140461,247.507770494,247.471956513,247.435694453,247.398980241,
100 247.3618098,247.32417905,247.286083906,247.247520279,247.208484082,
101 247.168971222,247.128977607,247.088499146,247.047531747,247.00607132,
102 246.964113777,246.921655031,246.878691002,246.835217611,246.791230785,
103 246.746726457,246.701700566,246.656149058,246.610067887,246.563453015,
104 246.516300414,246.468606066,246.420365964,246.371576111,246.322232524,
105 246.272331232,246.221868279,246.170839722,246.119241634,246.067070104,
106 246.014321237,245.960991157,245.907076004,245.852571939,245.79747514,
107 245.74178181,245.685488167,245.628590455,245.571084939,245.512967907,
108 245.454235672,245.394884569,245.334910961,245.274311236,245.213081807,
109 245.151219115,245.08871963,245.02557985,244.9617963,244.897365536,
110 244.832284146,244.766548747,244.700155987,244.633102547,244.565385141,
111 244.497000515,244.427945449,244.358216758,244.287811291,244.216725932,
112 244.144957602,244.072503257,243.999359889,243.92552453,243.850994248,
113 243.775766147,243.699837372,243.623205106,243.545866572,243.467819032,
114 243.389059786,243.309586179,243.229395592,243.148485449,243.066853216,
115 242.984496398,242.901412546,242.817599248,242.733054138,242.647774892,
116 242.561759227,242.475004906,242.387509732,242.299271553,242.210288262,
117 242.120557793,242.030078124,241.938847279,241.846863324,241.754124371,
118 241.660628575,241.566374134,241.471359294,241.375582341,241.279041608,
119 241.181735472,241.083662355,240.984820721,240.885209081,240.784825989,
120 240.683670043,240.581739885,240.479034203,240.375551726,240.271291229,
121 240.166251531,240.060431493,239.95383002,239.846446061,239.738278607,
122 239.629326695,239.5195894,239.409065844,239.29775519,239.185656641,
123 239.072769446,238.959092892,238.84462631,238.729369072,238.61332059,
124 238.496480317,238.378847747,238.260422414,238.141203892,238.021191795,
125 237.900385775,237.778785524,237.656390773,237.533201291,237.409216884,
126 237.284437398,237.158862715,237.032492753,236.905327469,236.777366855,
127 236.648610938,236.519059783,236.388713489,236.257572188,236.125636051,
128 235.992905278,235.859380107,235.725060807,235.58994768,235.454041062,
129 235.31734132,235.179848852,235.041564089,234.902487493,234.762619556,
130 234.6219608,234.480511776,234.338273067,234.195245283,234.051429062,
131 233.906825072,233.761434008,233.615256591,233.468293572,233.320545726,
132 233.172013855,233.022698786,232.872601372,232.721722492,232.570063047,
133 232.417623965,232.264406196,232.110410713,231.955638512,231.800090614,
134 231.643768059,231.48667191,231.328803251,231.170163188,231.010752847,
135 230.850573373,230.689625933,230.527911712,230.365431915,230.202187764,
136 230.0381805,229.873411384,229.707881693,229.541592719,229.374545774,
137 229.206742186,229.038183299,228.868870471,228.698805078,228.527988509,
138 228.356422169,228.184107477,228.011045867,227.837238785,227.662687692,
139 227.487394061,227.311359378,227.134585141,226.957072863,226.778824064,
140 226.59984028,226.420123056,226.239673947,226.058494521,225.876586355,
141 225.693951036,225.510590161,225.326505336,225.141698178,224.956170309,
142 224.769923365,224.582958985,224.39527882,224.206884527,224.017777772,
143 223.827960226,223.637433569,223.446199487,223.254259674,223.061615828,
144 222.868269655,222.674222866,222.479477179,222.284034315,222.087896002,
145 221.891063973,221.693539966,221.495325721,221.296422987,221.096833513,
146 220.896559053,220.695601367,220.493962216,220.291643365,220.088646583,
147 219.884973642,219.680626315,219.475606381,219.269915618,219.063555809,
148 218.856528737,218.64883619,218.440479954,218.231461819,218.021783577,
149 217.811447019,217.600453941,217.388806137,217.176505402,216.963553533,
150 216.749952328,216.535703584,216.3208091,216.105270675,215.889090106,
151 215.672269193,215.454809735,215.23671353,215.017982376,214.798618071,
152 214.578622412,214.357997196,214.136744219,213.914865275,213.692362159,
153 213.469236664,213.245490582,213.021125704,212.796143819,212.570546714,
154 212.344336178,212.117513994,211.890081946,211.662041815,211.433395383,
155 211.204144425,210.97429072,210.74383604,210.512782158,210.281130844,
156 210.048883865,209.816042987,209.582609974,209.348586585,209.113974579,
157 208.878775712,208.642991738,208.406624407,208.169675468,207.932146665,
158 207.694039743,207.455356441,207.216098496,206.976267643,206.735865613,
159 206.494894135,206.253354936,206.011249738,205.76858026,205.52534822,
160 205.281555332,205.037203306,204.792293851,204.54682867,204.300809466,
161 204.054237936,203.807115776,203.559444679,203.311226332,203.062462422,
162 202.813154631,202.563304638,202.312914121,202.06198475,201.810518197,
163 201.558516128,201.305980206,201.05291209,200.799313438,200.545185904,
164 200.290531137,200.035350786,199.779646493,199.5234199,199.266672645,
165 199.009406363,198.751622683,198.493323236,198.234509646,197.975183536,
166 197.715346523,197.455000226,197.194146256,196.932786223,196.670921736,
167 196.408554398,196.145685811,195.882317572,195.618451279,195.354088524,
168 195.089230896,194.823879985,194.558037374,194.291704646,194.024883381,
169 193.757575156,193.489781546,193.221504124,192.952744459,192.68350412,
170 192.413784672,192.143587679,191.872914702,191.601767301,191.330147033,
171 191.058055454,190.785494118,190.512464577,190.238968382,189.965007082,
172 189.690582224,189.415695355,189.14034802,188.864541763,188.588278126,
173 188.311558653,188.034384883,187.756758358,187.478680617,187.200153199,
174 186.921177645,186.641755492,186.36188828,186.081577548,185.800824834,
175 185.519631679,185.237999622,184.955930205,184.673424969,184.390485457,
176 184.107113213,183.823309782,183.539076713,183.254415552,182.969327853,
177 182.683815168,182.397879052,182.111521065,181.824742767,181.537545724,
178 181.249931504,180.961901678,180.673457823,180.384601519,180.095334351,
179 179.805657909,179.515573788,179.225083588,178.934188917,178.642891387,
180 178.351192617,178.059094236,177.766597877,177.473705181,177.1804178,
181 176.886737393,176.592665628,176.298204182,176.003354745,175.708119016,
182 175.412498704,175.116495531,174.820111234,174.523347558,174.226206264,
183 173.92868913,173.630797944,173.332534512,173.033900658,172.734898219,
184 172.435529055,172.13579504,171.835698069,171.53524006,171.234422948,
185 170.933248694,170.631719279,170.32983671,170.027603019,169.725020263,
186 169.422090529,169.118815931,168.815198611,168.511240746,168.206944541,
187 167.902312237,167.597346111,167.292048474,166.986421676,166.680468107,
188 166.374190197,166.06759042,165.760671293,165.453435381,165.145885296,
189 164.8380237,164.529853307,164.221376886,163.912597261,163.603517315,
190 163.294139991,162.984468296,162.674505303,162.36425415,162.05371805,
191 161.742900285,161.431804217,161.120433284,160.808791007,160.496880994,
192 160.184706939,159.872272629,159.559581944,159.246638866,158.933447477,
193 158.620011964,158.306336627,157.992425878,157.678284247,157.363916386,
194 157.049327076,156.734521226,156.419503883,156.104280235,155.788855613,
195 155.473235502,155.15742554,154.841431529,154.525259436,154.2089154,
196 153.89240574,153.575736958,153.258915746,152.941948993,152.624843791,
197 152.307607442,151.990247462,151.672771591,151.3551878,151.037504296,
198 150.719729528,150.4018722,150.083941272,149.765945972,149.4478958,
199 149.129800541,148.811670267,148.493515348,148.17534646,147.857174591,
200 147.539011052,147.220867482,146.90275586,146.584688509,146.266678104,
201 145.948737684,145.630880657,145.313120806,144.995472301,144.677949704,
202 144.360567975,144.043342481,143.726289002,143.409423738,143.092763314,
203 142.776324787,142.46012565,142.144183838,141.828517734,141.513146167,
204 141.198088421,140.883364237,140.56899381,140.254997798,139.941397314,
205 139.628213931,139.31546968,139.003187046,138.691388964,138.380098818,
206 138.069340432,137.759138065,137.449516402,137.140500548,136.832116012,
207 136.524388701,136.217344903,135.911011273,135.605414819,135.300582882,
208 134.99654312,134.693323486,134.390952204,134.089457749,133.788868823,
209 133.489214324,133.190523322,132.89282503,132.596148773,132.300523955,
210 132.005980028,131.712546456,131.420252683,131.129128093,130.839201977,
211 130.550503492,130.263061625,129.97690515,129.692062595,129.408562198,
212 129.126431866,128.845699141,128.566391153,128.288534586,128.012155639,
213 127.737279983,127.463932729,127.19213839,126.921920841,126.653303293,
214 126.386308253,126.120957494,125.857272028,125.595272075,125.334977038,
215 125.076405477,124.819575089,124.564502686,124.311204176,124.059694549,
216 123.809987864,123.562097233,123.316034816,123.071811813,122.829438459,
217 122.588924021,122.3502768,122.113504129,121.878612383,121.645606978,
218 121.414492385,121.185272137,120.957948844,120.732524201,120.508999009,
219 120.287373188,120.067645798,119.849815055,119.633878355,119.419832294,
220 119.207672691,118.997394612,118.788992394,118.582459671,118.377789395,
221 118.174973871,117.974004772,117.774873176,117.577569586,117.382083958,
222 117.188405731,116.996523847,116.806426787,116.618102586,116.431538869,
223 116.246722869,116.063641457,115.882281163,115.702628206,115.524668508,
224 115.348387726,115.173771271,115.000804328,114.82947188,114.659758727,
225 114.491649506,114.325128711,114.160180708,113.996789759,113.834940032,
226 113.674615621,113.515800563,113.358478849,113.20263444,113.048251282,
227 112.895313317,112.743804495,112.593708787,112.445010196,112.297692766,
228 112.151740591,112.007137828,111.863868702,111.721917517,111.581268659,
229 111.441906608,111.303815943,111.166981347,111.031387613,110.897019652,
230 110.763862493,110.63190129,110.501121329,110.371508026,110.243046933,
231 110.115723745,109.989524294,109.864434561,109.740440669,109.617528892,
232 109.495685656,109.374897534,109.255151254,109.1364337,109.018731905,
233 108.902033061,108.786324515,108.671593767,108.557828476,108.445016453,
234 108.333145667,108.222204241,108.112180452,108.003062732,107.894839664,
235 107.787499986,107.681032587,107.575426505,107.470670928,107.366755194,
236 107.263668787,107.161401337,107.059942619,106.959282552,106.859411195,
237 106.760318751,106.661995559,106.564432098,106.467618982,106.37154696,
238 106.276206914,106.181589858,106.087686935,105.994489418,105.901988705,
239 105.81017632,105.719043911,105.628583246,105.538786217,105.44964483,
240 105.361151211,105.273297602,105.186076356,105.09947994,105.013500931,
241 104.928132016,104.843365988,104.759195746,104.675614294,104.592614738,
242 104.510190286,104.428334244,104.347040018,104.266301109,104.186111115,
243 104.106463726,104.027352725,103.948771984,103.870715468,103.793177227,
244 103.716151398,103.639632204,103.563613952,103.48809103,103.41305791,
245 103.33850914,103.26443935,103.190843246,103.117715611,103.045051301,
246 102.972845249,102.901092457,102.829788,102.758927024,102.688504742,
247 102.618516438,102.54895746,102.479823222,102.411109205,102.342810952,
248 102.274924068,102.207444221,102.140367139,102.07368861,102.007404481,
249 101.941510654,101.876003092,101.810877811,101.746130883,101.681758433,
250 101.617756641,101.554121738,101.490850007,101.427937781,101.365381444,
251 101.303177428,101.241322214,101.179812331,101.118644352,101.057814898,
252 100.997320637,100.937158279,100.877324577,100.817816329,100.758630377,
253 100.6997636,100.641212922,100.582975306,100.525047756,100.467427312,
254 100.410111057,100.353096108,100.296379621,100.23995879,100.183830844,
255 100.127993045,100.072442696,100.017177128,99.9621937113,99.9074898464,
256 99.8530629679,99.7989105427,99.7450300696,99.6914190787,99.6380751312,
257 99.5849958187,99.5321787628,99.4796216147,99.4273220547,99.3752777916,
258 99.3234865625,99.2719461323,99.2206542933,99.1696088648,99.1188076924,
259 99.0682486481,99.0179296296,98.9678485599,98.918003387,98.8683920837,
260 98.8190126467,98.769863097,98.7209414788,98.6722458598,98.6237743302,
261 98.5755250031,98.5274960135,98.4796855184,98.4320916962,98.3847127468,
262 98.3375468908,98.2905923695,98.2438474444,98.1973103972,98.1509795293,
263 98.1048531614,98.0589296337,98.013207305,97.9676845528,97.922359773,
264 97.8772313798,97.8322978049,97.7875574979,97.7430089255,97.6986505718,
265 97.6544809376,97.6104985402,97.5667019136,97.5230896077,97.4796601886,
266 97.4364122381,97.3933443532,97.3504551465,97.3077432458,97.2652072933,
267 97.2228459464,97.1806578767,97.1386417702,97.0967963268,97.0551202605,
268 97.0136122989,96.9722711833,96.931095668,96.8900845209,96.8492365225,
269 96.8085504664,96.7680251586,96.7276594179,96.687452075,96.6474019731,
270 96.6075079673,96.5677689244,96.528183723,96.4887512533,96.4494704166,
271 96.4103401258,96.3713593045,96.3325268876,96.2938418206,96.2553030595,
272 96.2169095712,96.1786603327,96.1405543314,96.1025905648,96.0647680402,
273 96.0270857751,95.9895427965,95.9521381411,95.9148708551,95.8777399941,
274 95.840744623,95.8038838156,95.767156655,95.7305622332,95.6940996508,
275 95.6577680174,95.621566451,95.5854940781,95.5495500336,95.5137334607,
276 95.4780435108,95.4424793434,95.4070401257,95.3717250333,95.3365332491,
277 95.3014639639,95.2665163763,95.231689692,95.1969831244,95.1623958942,
278 95.1279272293,95.0935763647,95.0593425426,95.0252250121,94.9912230293,
279 94.957335857,94.9235627648,94.889903029,94.8563559325,94.8229207646,
280 94.7895968211,94.7563834042,94.7232798225,94.6902853904,94.6573994289,
281 94.6246212649,94.5919502312,94.5593856666,94.5269269159,94.4945733296,
282 94.4623242638,94.4301790804,94.398137147,94.3661978366,94.3343605276,
283 94.3026246041,94.2709894553,94.2394544758,94.2080190654,94.1766826291,
284 94.145444577,94.1143043243,94.0832612913,94.052314903,94.0214645895,
285 93.9907097857,93.9600499313,93.9294844707,93.899012853,93.8686345319,
286 93.8383489659,93.8081556177,93.7780539548,93.7480434489,93.7181235762,
287 93.6882938173,93.658553657,93.6289025843,93.5993400927,93.5698656795,
288 93.5404788464,93.5111790989,93.4819659468,93.4528389037,93.4237974873,
289 93.3948412191,93.3659696245,93.3371822327,93.3084785767,93.2798581933,
290 93.2513206229,93.2228654096,93.1944921013,93.1662002492,93.1379894083,
291 93.109859137,93.0818089971,93.0538385542,93.0259473769,92.9981350374,
292 92.9704011112,92.9427451771,92.9151668171,92.8876656167,92.8602411644,
293 92.8328930518,92.8056208739,92.7784242286,92.7513027171,92.7242559433,
294 92.6972835146,92.670385041,92.6435601356,92.6168084145,92.5901294966,
295 92.5635230038,92.5369885607,92.5105257949,92.4841343366,92.4578138189,
296 92.4315638777,92.4053841514,92.3792742812,92.353233911,92.3272626873,
297 92.3013602592,92.2755262785,92.2497603994,92.2240622787,92.1984315757,
298 92.1728679522,92.1473710724,92.1219406032,92.0965762136,92.0712775751,
299 92.0460443617,92.0208762495,91.9957729173,91.9707340457,91.9457593182,
300 91.9208484199,91.8960010388,91.8712168645,91.8464955894,91.8218369075,
301 91.7972405155,91.7727061118,91.7482333973,91.7238220746,91.6994718488,
302 91.6751824268,91.6509535176,91.6267848322,91.6026760837,91.5786269871,
303 91.5546372594,91.5307066197,91.5068347888,91.4830214895,91.4592664466,
304 91.4355693866,91.4119300382,91.3883481315,91.3648233988,91.3413555741,
305 91.3179443931,91.2945895935,91.2712909146,91.2480480975,91.224860885,
306 91.2017290219,91.1786522542,91.1556303301,91.1326629992,91.1097500128,
307 91.086891124,91.0640860873,91.041334659,91.0186365969,90.9959916605,
308 90.9733996109,90.9508602106,90.9283732238,90.9059384162,90.883555555,
309 90.8612244091,90.8389447485,90.8167163451,90.7945389721,90.7724124041,
310 90.7503364174,90.7283107894,90.7063352991,90.6844097271,90.6625338551,
311 90.6407074663,90.6189303453,90.5972022781,90.5755230521,90.5538924558,
312 90.5323102793,90.510776314,90.4892903525,90.4678521887,90.4464616179,
313 90.4251184365,90.4038224425,90.3825734349,90.3613712139,90.3402155812,
314 90.3191063395,90.2980432928,90.2770262463,90.2560550065,90.2351293809,
315 90.2142491783,90.1934142087,90.1726242833,90.1518792142,90.131178815,
316 90.1105229001,90.0899112853,90.0693437874,90.0488202242,90.0283404148,
317 90.0079041793,89.9875113389,89.9671617157,89.9468551333,89.9265914158,
318 89.9063703888,89.8861918787,89.866055713,89.8459617203,89.82590973,
319 89.8058995729,89.7859310803,89.7660040849,89.7461184202,89.7262739206,
320 89.7064704218,89.68670776,89.6669857728,89.6473042984,89.6276631762,
321 89.6080622464,89.5885013501,89.5689803294,89.5494990274,89.5300572878,
322 89.5106549554,89.491291876,89.4719678961,89.4526828632,89.4334366256,
323 89.4142290324,89.3950599338,89.3759291805,89.3568366244,89.3377821181,
324 89.3187655149,89.2997866691,89.2808454357,89.2619416708,89.2430752308,
325 89.2242459734,89.2054537569,89.1866984403,89.1679798835,89.1492979471,
326 89.1306524926,89.1120433823,89.0934704789,89.0749336464,89.056432749,
327 89.0379676522,89.0195382218,89.0011443245,88.9827858277,88.9644625997,
328 88.9461745092,88.927921426,88.9097032202,88.8915197629,88.8733709258,
329 88.8552565813,88.8371766024,88.8191308631,88.8011192377,88.7831416014,
330 88.7651978299,88.7472877998,88.7294113881,88.7115684728,88.6937589321,
331 88.6759826453,88.658239492,88.6405293526,88.6228521081,88.6052076402,
332 88.5875958312,88.5700165638,88.5524697217,88.5349551889,88.5174728501,
333 88.5000225908,88.4826042968,88.4652178545,88.4478631513,88.4305400746,
334 88.413248513,88.3959883551,88.3787594905,88.3615618091,88.3443952016,
335 88.3272595591,88.3101547733,88.2930807364,88.2760373414,88.2590244815,
336 88.2420420507,88.2250899434,88.2081680546,88.1912762799,88.1744145152,
337 88.1575826573,88.1407806031,88.1240082504,88.1072654973,88.0905522424,
338 88.0738683849,88.0572138245,88.0405884613,88.0239921962,88.0074249301,
339 87.9908865649,87.9743770026,87.9578961459,87.941443898,87.9250201625,
340 87.9086248434,87.8922578454,87.8759190734,87.859608433,87.8433258301,
341 87.8270711713,87.8108443633,87.7946453135,87.7784739298,87.7623301204,
342 87.746213794,87.7301248597,87.7140632271,87.6980288064,87.6820215078,
343 87.6660412424,87.6500879215,87.6341614567,87.6182617604,87.6023887451,
344 87.5865423238,87.57072241,87.5549289176,87.5391617608,87.5234208543,
345 87.5077061131,87.4920174528,87.4763547894,87.4607180389,87.4451071183,
346 87.4295219444,87.4139624349,87.3984285076,87.3829200807,87.3674370729,
347 87.3519794032,87.3365469909,87.321139756,87.3057576185,87.2904004989,
348 87.2750683183,87.2597609977,87.2444784589,87.2292206238,87.2139874149,
349 87.1987787547,87.1835945665,87.1684347736,87.1532992998,87.1381880693,
350 87.1231010065,87.1080380363,87.0929990838,87.0779840746,87.0629929344,
351 87.0480255896,87.0330819666,87.0181619923,87.0032655939,86.988392699,
352 86.9735432353,86.9587171311,86.9439143149,86.9291347155,86.914378262,
353 86.899644884,86.8849345112,86.8702470737,86.855582502,86.8409407267,
354 86.8263216789,86.81172529,86.7971514915,86.7826002155,86.7680713942,
355 86.7535649602,86.7390808462,86.7246189855,86.7101793115,86.695761758,
356 86.681366259,86.6669927487,86.6526411619,86.6383114334,86.6240034983,
357 86.6097172923,86.5954527509,86.5812098103,86.5669884067,86.5527884768,
358 86.5386099573,86.5244527855,86.5103168987,86.4962022346,86.4821087312,
359 86.4680363266,86.4539849594,86.4399545682,86.4259450922,86.4119564705,
360 86.3979886428,86.3840415487,86.3701151284,86.356209322,86.3423240703,
361 86.328459314,86.3146149941,86.3007910521,86.2869874293,86.2732040677,
362 86.2594409093,86.2456978963,86.2319749714,86.2182720773,86.204589157,
363 86.1909261539,86.1772830113,86.1636596731,86.1500560831,86.1364721857,
364 86.1229079253,86.1093632464,86.0958380941,86.0823324135,86.0688461498,
365 86.0553792488,86.0419316561,86.0285033179,86.0150941804,86.0017041901,
366 85.9883332936,85.9749814379,85.9616485701,85.9483346376,85.935039588,
367 85.9217633689,85.9085059285,85.8952672149,85.8820471765,85.868845762,
368 85.8556629201,85.8424986001,85.829352751,85.8162253223,85.8031162638,
369 85.7900255253,85.7769530568,85.7638988086,85.7508627312,85.7378447752,
370 85.7248448915,85.7118630312,85.6988991455,85.6859531858,85.6730251039,
371 85.6601148515,85.6472223807,85.6343476437,85.6214905929,85.608651181,
372 85.5958293606,85.5830250847,85.5702383066,85.5574689796,85.5447170572,
373 85.531982493,85.5192652411,85.5065652554,85.4938824903,85.4812169001,
374 85.4685684394,85.4559370631,85.4433227262,85.4307253837,85.4181449909,
375 85.4055815034,85.3930348768,85.380505067,85.36799203,85.3554957218,
376 85.3430160989,85.3305531178,85.3181067352,85.3056769079,85.2932635929,
377 85.2808667474,85.2684863287,85.2561222943,85.243774602,85.2314432095,
378 85.2191280748,85.2068291561,85.1945464117,85.1822798,85.1700292797,
379 85.1577948095,85.1455763484,85.1333738555,85.1211872901,85.1090166115,
380 85.0968617793,85.0847227531,85.0725994929,85.0604919587,85.0484001106,
381 85.036323909,85.0242633142,85.0122182869,85.0001887879,84.988174778,
382 84.9761762183,84.96419307,84.9522252944,84.940272853,84.9283357074,
383 84.9164138193,84.9045071507,84.8926156637,84.8807393203,84.8688780829,
384 84.8570319141,84.8452007763,84.8333846323,84.821583445,84.8097971775,
385 84.7980257927,84.7862692541,84.7745275251,84.7628005691,84.7510883499,
386 84.7393908313,84.7277079772,84.7160397517,84.704386119,84.6927470434,
387 84.6811224894,84.6695124216,84.6579168048,84.6463356037,84.6347687833,
388 84.6232163088,84.6116781453,84.6001542582,84.588644613,84.5771491752,
389 84.5656679107,84.5542007852,84.5427477647,84.5313088153,84.5198839031,
390 84.5084729946,84.4970760562,84.4856930544,84.4743239558,84.4629687275,
391 84.4516273361,84.4402997488,84.4289859327,84.4176858551,84.4063994834,
392 84.395126785,84.3838677277,84.372622279,84.3613904068,84.3501720791,
393 84.338967264,84.3277759297,84.3165980443,84.3054335763,84.2942824943,
394 84.2831447667,84.2720203625,84.2609092503,84.2498113991,84.238726778,
395 84.2276553561,84.2165971027,84.2055519872,84.194519979,84.1835010476,
396 84.1724951629,84.1615022946,84.1505224125,84.1395554866,84.1286014871,
397 84.1176603842,84.1067321481,84.0958167492,84.0849141581,84.0740243453,
398 84.0631472816,84.0522829378,84.0414312847,84.0305922934,84.0197659349,
399 84.0089521804,83.9981510014,83.987362369,83.9765862548,83.9658226305,
400 83.9550714676,83.944332738,83.9336064135,83.922892466,83.9121908677,
401 83.9015015907,83.8908246072,83.8801598895,83.8695074102,83.8588671416,
402 83.8482390564,83.8376231274,83.8270193272,83.8164276289,83.8058480053,
403 83.7952804295,83.7847248747,83.774181314,83.763649721,83.7531300688,
404 83.7426223311,83.7321264815,83.7216424936,83.7111703411,83.700709998,
405 83.6902614382,83.6798246356,83.6693995644,83.6589861988,83.648584513,
406 83.6381944814,83.6278160785,83.6174492788,83.6070940568,83.5967503873,
407 83.586418245,83.5760976048,83.5657884417,83.5554907305,83.5452044465,
408 83.5349295648,83.5246660606,83.5144139094,83.5041730864,83.4939435673,
409 83.4837253275,83.4735183427,83.4633225887,83.4531380413,83.4429646763,
410 83.4328024696,83.4226513974,83.4125114358,83.4023825609,83.392264749,
411 83.3821579764,83.3720622196,83.361977455,83.3519036592,83.3418408089,
412 83.3317888807,83.3217478514,83.3117176979,83.3016983972,83.2916899262,
413 83.281692262,83.2717053817,83.2617292627,83.251763882,83.2418092172,
414 83.2318652457,83.2219319449,83.2120092924,83.2020972659,83.1921958431,
415 83.1823050018,83.1724247198,83.162554975,83.1526957454,83.1428470091,
416 83.1330087443,83.123180929,83.1133635416,83.1035565603,83.0937599636,
417 83.08397373,83.0741978379,83.064432266,83.0546769929,83.0449319973,
418 83.035197258,83.0254727539,83.0157584639,83.006054367,82.9963604422,
419 82.9866766686,82.9770030254,82.9673394918,82.9576860472,82.9480426709,
420 82.9384093423,82.9287860409,82.9191727463,82.9095694381,82.8999760959,
421 82.8903926995,82.8808192286,82.8712556633,82.8617019832,82.8521581685,
422 82.8426241992,82.8331000553,82.8235857171,82.8140811647,82.8045863785,
423 82.7951013386,82.7856260257,82.77616042,82.7667045022,82.7572582527,
424 82.7478216522,82.7383946815,82.7289773211,82.719569552,82.710171355,
425 82.700782711,82.6914036009,82.6820340059,82.6726739069,82.6633232851,
426 82.6539821217,82.644650398,82.6353280953,82.6260151948,82.6167116781,
427 82.6074175266,82.5981327217,82.5888572452,82.5795910786,82.5703342036,
428 82.5610866019,82.5518482554,82.5426191458,82.5333992551,82.5241885652,
429 82.5149870582,82.505794716,82.4966115208,82.4874374547,82.4782724999,
430 82.4691166388,82.4599698535,82.4508321266,82.4417034403,82.4325837772,
431 82.4234731197,82.4143714505,82.4052787521,82.3961950073,82.3871201986,
432 82.378054309,82.3689973211,82.3599492179,82.3509099823,82.3418795973,
433 82.3328580457,82.3238453108,82.3148413756,82.3058462233,82.296859837,
434 82.2878822
435 }
436 },
437 {
438 // Ri = 250k
439 -5,5,200,2001, {
440 249.98706929,249.986851225,249.986629489,249.986404021,249.986174757,
441 249.985941635,249.985704589,249.985463554,249.985218463,249.984969247,
442 249.984715838,249.984458166,249.984196158,249.983929743,249.983658846,
443 249.983383392,249.983103306,249.982818508,249.982528921,249.982234464,
444 249.981935056,249.981630613,249.981321052,249.981006287,249.98068623,
445 249.980360793,249.980029887,249.979693419,249.979351296,249.979003424,
446 249.978649708,249.978290048,249.977924346,249.9775525,249.977174409,
447 249.976789967,249.976399069,249.976001606,249.97559747,249.975186548,
448 249.974768727,249.974343893,249.973911927,249.973472711,249.973026125,
449 249.972572044,249.972110345,249.9716409,249.971163579,249.970678252,
450 249.970184785,249.969683043,249.969172887,249.968654177,249.968126772,
451 249.967590526,249.967045292,249.96649092,249.965927258,249.965354153,
452 249.964771446,249.964178978,249.963576587,249.962964107,249.962341372,
453 249.961708211,249.96106445,249.960409914,249.959744424,249.959067797,
454 249.95837985,249.957680393,249.956969237,249.956246188,249.955511048,
455 249.954763616,249.95400369,249.953231063,249.952445523,249.951646857,
456 249.950834849,249.950009276,249.949169916,249.94831654,249.947448916,
457 249.946566809,249.945669979,249.944758184,249.943831177,249.942888706,
458 249.941930516,249.940956349,249.93996594,249.938959023,249.937935324,
459 249.936894568,249.935836475,249.934760758,249.933667127,249.932555289,
460 249.931424944,249.930275788,249.929107511,249.9279198,249.926712337,
461 249.925484796,249.92423685,249.922968162,249.921678394,249.9203672,
462 249.91903423,249.917679127,249.916301529,249.914901069,249.913477372,
463 249.912030061,249.910558748,249.909063042,249.907542547,249.905996856,
464 249.904425561,249.902828244,249.901204482,249.899553844,249.897875894,
465 249.896170188,249.894436274,249.892673696,249.890881989,249.889060679,
466 249.887209288,249.885327328,249.883414305,249.881469716,249.879493052,
467 249.877483793,249.875441414,249.87336538,249.87125515,249.869110171,
468 249.866929885,249.864713724,249.86246111,249.860171458,249.857844173,
469 249.855478652,249.853074281,249.850630438,249.848146491,249.845621799,
470 249.843055711,249.840447565,249.837796689,249.835102404,249.832364016,
471 249.829580824,249.826752115,249.823877166,249.820955243,249.8179856,
472 249.81496748,249.811900117,249.80878273,249.80561453,249.802394713,
473 249.799122465,249.795796959,249.792417358,249.788982809,249.785492449,
474 249.781945403,249.778340779,249.774677678,249.770955183,249.767172365,
475 249.763328284,249.759421981,249.75545249,249.751418824,249.747319988,
476 249.743154968,249.738922738,249.734622257,249.730252468,249.725812301,
477 249.72130067,249.716716471,249.712058589,249.70732589,249.702517225,
478 249.697631429,249.692667321,249.687623703,249.682499361,249.677293063,
479 249.672003562,249.666629592,249.661169871,249.655623098,249.649987954,
480 249.644263106,249.638447197,249.632538857,249.626536694,249.620439299,
481 249.614245244,249.607953082,249.601561346,249.59506855,249.588473189,
482 249.581773739,249.574968653,249.568056367,249.561035295,249.553903831,
483 249.546660348,249.5393032,249.531830718,249.524241211,249.516532969,
484 249.508704259,249.500753327,249.492678397,249.48447767,249.476149326,
485 249.467691521,249.459102391,249.450380046,249.441522576,249.432528047,
486 249.423394501,249.414119957,249.404702411,249.395139834,249.385430176,
487 249.37557136,249.365561287,249.355397831,249.345078845,249.334602156,
488 249.323965565,249.313166851,249.302203767,249.291074039,249.27977537,
489 249.268305439,249.256661896,249.244842368,249.232844458,249.220665739,
490 249.208303762,249.195756051,249.183020104,249.170093394,249.156973366,
491 249.143657441,249.130143014,249.116427453,249.102508098,249.088382267,
492 249.074047249,249.059500307,249.044738677,249.029759572,249.014560175,
493 248.999137645,248.983489114,248.967611688,248.951502446,248.935158442,
494 248.918576704,248.901754233,248.884688005,248.867374969,248.84981205,
495 248.831996145,248.813924127,248.795592843,248.776999115,248.75813974,
496 248.739011488,248.719611106,248.699935316,248.679980814,248.659744274,
497 248.639222342,248.618411645,248.597308781,248.575910327,248.554212837,
498 248.532212841,248.509906845,248.487291335,248.464362771,248.441117595,
499 248.417552224,248.393663055,248.369446462,248.344898801,248.320016406,
500 248.29479559,248.269232647,248.243323852,248.217065459,248.190453706,
501 248.163484811,248.136154974,248.108460379,248.080397191,248.05196156,
502 248.02314962,247.993957487,247.964381265,247.934417041,247.90406089,
503 247.87330887,247.84215703,247.810601403,247.778638011,247.746262866,
504 247.713471967,247.680261304,247.646626855,247.612564592,247.578070476,
505 247.543140462,247.507770494,247.471956513,247.435694453,247.398980241,
506 247.361809801,247.32417905,247.286083906,247.24752028,247.208484082,
507 247.168971222,247.128977608,247.088499147,247.047531748,247.006071321,
508 246.964113777,246.921655032,246.878691002,246.835217611,246.791230786,
509 246.746726458,246.701700567,246.656149059,246.610067888,246.563453016,
510 246.516300415,246.468606067,246.420365965,246.371576112,246.322232525,
511 246.272331233,246.22186828,246.170839723,246.119241635,246.067070105,
512 246.014321238,245.960991158,245.907076005,245.85257194,245.797475142,
513 245.741781811,245.685488168,245.628590456,245.57108494,245.512967909,
514 245.454235673,245.394884571,245.334910963,245.274311238,245.213081809,
515 245.151219118,245.088719633,245.025579852,244.961796302,244.897365539,
516 244.832284149,244.76654875,244.70015599,244.633102551,244.565385144,
517 244.497000518,244.427945453,244.358216762,244.287811295,244.216725936,
518 244.144957607,244.072503262,243.999359895,243.925524536,243.850994253,
519 243.775766153,243.699837378,243.623205113,243.545866579,243.467819039,
520 243.389059794,243.309586187,243.2293956,243.148485458,243.066853225,
521 242.984496408,242.901412556,242.817599259,242.733054149,242.647774903,
522 242.561759239,242.475004919,242.387509745,242.299271568,242.210288277,
523 242.120557808,242.03007814,241.938847296,241.846863343,241.75412439,
524 241.660628595,241.566374155,241.471359316,241.375582364,241.279041632,
525 241.181735498,241.083662381,240.984820749,240.88520911,240.78482602,
526 240.683670075,240.581739919,240.479034238,240.375551763,240.271291268,
527 240.166251571,240.060431535,239.953830064,239.846446107,239.738278656,
528 239.629326745,239.519589453,239.4090659,239.297755248,239.185656702,
529 239.072769509,238.959092958,238.84462638,238.729369145,238.613320666,
530 238.496480396,238.37884783,238.260422501,238.141203983,238.02119189,
531 237.900385875,237.778785628,237.656390882,237.533201405,237.409217004,
532 237.284437524,237.158862846,237.03249289,236.905327613,236.777367005,
533 236.648611095,236.519059947,236.38871366,236.257572368,236.125636239,
534 235.992905475,235.859380313,235.725061022,235.589947905,235.454041297,
535 235.317341565,235.179849108,235.041564357,234.902487774,234.762619849,
536 234.621961106,234.480512096,234.338273402,234.195245633,234.051429428,
537 233.906825454,233.761434407,233.615257009,233.468294009,233.320546182,
538 233.172014331,233.022699284,232.872601892,232.721723035,232.570063615,
539 232.417624559,232.264406816,232.110411361,231.955639189,231.800091321,
540 231.643768797,231.486672681,231.328804057,231.17016403,231.010753726,
541 230.850574292,230.689626893,230.527912715,230.365432962,230.202188857,
542 230.038181642,229.873412577,229.707882938,229.541594019,229.374547132,
543 229.206743604,229.038184779,228.868872017,228.698806692,228.527990194,
544 228.356423928,228.184109314,228.011047785,227.837240787,227.662689782,
545 227.487396243,227.311361655,227.134587519,226.957075345,226.778826655,
546 226.599842984,226.420125878,226.239676893,226.058497596,225.876589564,
547 225.693954385,225.510593656,225.326508984,225.141701984,224.956174281,
548 224.769927509,224.58296331,224.395283333,224.206889237,224.017782686,
549 223.827965353,223.637438918,223.446205069,223.254265497,223.061621903,
550 222.868275994,222.674229479,222.479484077,222.284041512,222.08790351,
551 221.891071805,221.693548135,221.495334244,221.296431876,221.096842785,
552 220.896568725,220.695611455,220.493972738,220.29165434,220.08865803,
553 219.88498558,219.680638766,219.475619366,219.269929161,219.063569932,
554 218.856543466,218.648851549,218.440495971,218.231478522,218.021800994,
555 217.811465182,217.60047288,217.388825884,217.176525993,216.963575003,
556 216.749974714,216.535726925,216.320833437,216.105296048,215.88911656,
557 215.672296774,215.45483849,215.236743508,215.018013629,214.798650652,
558 214.578656378,214.358032605,214.136781131,213.914903754,213.692402271,
559 213.469278477,213.245534168,213.021171136,212.796191175,212.570596077,
560 212.344387629,212.117567622,211.890137843,211.662100076,211.433456105,
561 211.204207714,210.974356681,210.743904787,210.512853806,210.281205515,
562 210.048961685,209.816124088,209.582694492,209.348674664,209.114066368,
563 208.878871366,208.643091418,208.406728281,208.169783711,207.93225946,
564 207.694157278,207.455478915,207.216226114,206.97640062,206.736004172,
565 206.49503851,206.253505367,206.011406477,205.768743571,205.525518376,
566 205.281732618,205.037388018,204.792486297,204.547029172,204.301018358,
567 204.054455568,203.80734251,203.559680893,203.31147242,203.062718793,
568 202.813421712,202.563582874,202.313203973,202.062286701,201.810832747,
569 201.558843799,201.306321542,201.053267658,200.799683826,200.545571726,
570 200.290933032,200.035769418,199.780082556,199.523874114,199.26714576,
571 199.00989916,198.752135977,198.493857873,198.235066508,197.97576354,
572 197.715950626,197.455629421,197.19480158,196.933468754,196.671632596,
573 196.409294756,196.146456882,195.883120624,195.619287629,195.354959544,
574 195.090138015,194.824824689,194.559021212,194.292729229,194.025950385,
575 193.758686328,193.490938703,193.222709157,192.953999338,192.684810894,
576 192.415145475,192.145004731,191.874390314,191.603303879,191.331747082,
577 191.059721579,190.787229033,190.514271105,190.240849462,189.966965773,
578 189.69262171,189.417818949,189.14255917,188.866844059,188.590675304,
579 188.314054599,188.036983645,187.759464146,187.481497813,187.203086365,
580 186.924231527,186.64493503,186.365198614,186.085024028,185.804413028,
581 185.523367379,185.241888858,184.95997925,184.677640352,184.394873972,
582 184.11168193,183.828066057,183.544028199,183.259570217,182.974693983,
583 182.689401387,182.403694334,182.117574747,181.831044563,181.544105742,
584 181.25676026,180.969010115,180.680857324,180.392303929,180.103351992,
585 179.814003602,179.524260869,179.234125934,178.943600962,178.652688148,
586 178.361389716,178.069707923,177.777645057,177.485203439,177.192385426,
587 176.899193414,176.605629834,176.311697159,176.017397903,175.722734622,
588 175.42770992,175.132326446,174.836586898,174.540494025,174.244050629,
589 173.947259568,173.650123755,173.352646164,173.054829832,172.756677859,
590 172.458193411,172.159379726,171.860240112,171.560777954,171.260996712,
591 170.960899932,170.660491239,170.359774348,170.058753063,169.757431286,
592 169.455813011,169.153902337,168.851703468,168.549220714,168.246458503,
593 167.943421374,167.640113993,167.336541149,167.032707762,166.728618886,
594 166.424279716,166.119695592,165.814872003,165.509814594,165.204529171,
595 164.899021704,164.593298336,164.287365388,163.981229364,163.674896958,
596 163.36837506,163.061670761,162.754791362,162.447744379,162.140537551,
597 161.833178847,161.525676469,161.218038867,160.91027474,160.602393044,
598 160.294403003,159.986314114,159.678136154,159.369879193,159.061553594,
599 158.753170027,158.444739474,158.13627324,157.827782957,157.519280595,
600 157.21077847,156.90228925,156.593825964,156.285402011,155.977031166,
601 155.668727586,155.360505823,155.052380826,154.744367948,154.436482957,
602 154.128742038,153.821161801,153.513759285,153.206551968,152.899557763,
603 152.592795032,152.286282581,151.980039672,151.674086016,151.368441781,
604 151.063127591,150.758164527,150.453574123,150.149378371,149.84559971,
605 149.542261029,149.239385659,148.936997368,148.635120356,148.333779243,
606 148.032999061,147.732805244,147.433223619,147.134280384,146.836002101,
607 146.538415678,146.241548349,145.945427656,145.650081429,145.355537765,
608 145.061825,144.768971689,144.477006578,144.185958573,143.895856717,
609 143.606730155,143.318608101,143.031519811,142.745494544,142.460561528,
610 142.176749925,141.894088794,141.612607053,141.33233344,141.053296478,
611 140.775524432,140.499045269,140.223886626,139.950075761,139.677639521,
612 139.406604303,139.13699601,138.86884002,138.602161147,138.336983605,
613 138.073330973,137.811226163,137.550691387,137.291748127,137.034417106,
614 136.778718261,136.524670718,136.272292766,136.021601842,135.772614503,
615 135.525346418,135.279812345,135.036026122,134.79400066,134.553747926,
616 134.315278945,134.078603792,133.843731591,133.610670518,133.379427799,
617 133.150009719,132.922421627,132.696667945,132.472752176,132.25067692,
618 132.030443888,131.812053912,131.595506968,131.380802191,131.167937895,
619 130.956911595,130.747720026,130.540359167,130.334824266,130.13110986,
620 129.929209804,129.729117294,129.53082489,129.334324549,129.139607641,
621 128.946664984,128.755486867,128.566063074,128.378382911,128.192435235,
622 128.008208475,127.82569066,127.644869442,127.465732122,127.288265674,
623 127.112456765,126.938291784,126.765756859,126.594837879,126.425520519,
624 126.257790258,126.091632396,125.92703208,125.763974314,125.602443985,
625 125.442425874,125.283904673,125.126865007,124.971291439,124.817168494,
626 124.664480664,124.51321243,124.363348265,124.214872655,124.067770102,
627 123.922025141,123.777622345,123.634546339,123.492781803,123.352313488,
628 123.213126215,123.075204892,122.938534511,122.803100162,122.668887034,
629 122.535880424,122.404065739,122.273428504,122.143954363,122.015629084,
630 121.888438563,121.76236883,121.637406044,121.513536504,121.390746648,
631 121.269023054,121.148352444,121.028721683,120.910117783,120.792527903,
632 120.675939349,120.560339577,120.445716191,120.332056945,120.219349742,
633 120.107582636,119.996743831,119.886821679,119.777804682,119.669681491,
634 119.562440905,119.45607187,119.350563481,119.245904975,119.142085739,
635 119.039095299,118.936923328,118.835559639,118.734994187,118.635217064,
636 118.536218503,118.437988872,118.340518677,118.243798555,118.147819277,
637 118.052571748,117.958046998,117.864236189,117.771130609,117.678721671,
638 117.587000912,117.495959991,117.405590688,117.315884902,117.226834649,
639 117.138432063,117.050669391,116.963538993,116.87703334,116.791145014,
640 116.705866704,116.621191207,116.537111424,116.453620361,116.370711124,
641 116.288376922,116.206611062,116.125406949,116.044758083,115.964658061,
642 115.885100572,115.806079397,115.727588408,115.649621564,115.572172916,
643 115.495236596,115.418806826,115.342877908,115.267444229,115.192500255,
644 115.118040534,115.04405969,114.970552425,114.89751352,114.824937826,
645 114.752820271,114.681155856,114.60993965,114.539166794,114.4688325,
646 114.398932045,114.329460774,114.260414097,114.191787491,114.123576494,
647 114.055776708,113.988383796,113.921393483,113.854801553,113.788603846,
648 113.722796265,113.657374766,113.592335361,113.527674118,113.463387161,
649 113.399470663,113.335920853,113.27273401,113.209906463,113.147434593,
650 113.085314829,113.023543648,112.962117574,112.901033179,112.840287082,
651 112.779875944,112.719796474,112.660045423,112.600619585,112.541515797,
652 112.482730939,112.42426193,112.36610573,112.308259341,112.250719802,
653 112.19348419,112.136549623,112.079913253,112.023572271,111.967523904,
654 111.911765414,111.856294098,111.801107289,111.746202353,111.691576689,
655 111.637227729,111.583152939,111.529349816,111.475815888,111.422548715,
656 111.369545886,111.316805023,111.264323773,111.212099817,111.160130862,
657 111.108414643,111.056948924,111.005731497,110.954760178,110.904032814,
658 110.853547274,110.803301456,110.75329328,110.703520696,110.653981674,
659 110.60467421,110.555596324,110.50674606,110.458121485,110.409720688,
660 110.361541782,110.313582902,110.265842202,110.218317863,110.171008082,
661 110.123911081,110.077025099,110.030348399,109.983879261,109.937615986,
662 109.891556896,109.845700329,109.800044645,109.754588221,109.709329453,
663 109.664266754,109.619398556,109.57472331,109.530239481,109.485945553,
664 109.441840028,109.397921423,109.354188272,109.310639125,109.267272548,
665 109.224087122,109.181081447,109.138254133,109.095603809,109.053129118,
666 109.010828717,108.968701278,108.926745487,108.884960045,108.843343665,
667 108.801895077,108.760613021,108.719496253,108.67854354,108.637753663,
668 108.597125417,108.556657609,108.516349056,108.476198591,108.436205057,
669 108.39636731,108.356684217,108.317154657,108.277777521,108.238551712,
670 108.199476141,108.160549735,108.121771427,108.083140165,108.044654905,
671 108.006314614,107.96811827,107.930064861,107.892153386,107.854382852,
672 107.816752278,107.77926069,107.741907128,107.704690637,107.667610274,
673 107.630665104,107.593854203,107.557176653,107.520631548,107.48421799,
674 107.447935087,107.41178196,107.375757736,107.339861549,107.304092545,
675 107.268449875,107.2329327,107.197540188,107.162271514,107.127125864,
676 107.092102428,107.057200405,107.022419004,106.987757437,106.953214926,
677 106.9187907,106.884483995,106.850294054,106.816220127,106.78226147,
678 106.748417348,106.714687031,106.681069796,106.647564927,106.614171713,
679 106.580889453,106.547717448,106.514655009,106.48170145,106.448856093,
680 106.416118267,106.383487304,106.350962545,106.318543335,106.286229026,
681 106.254018974,106.221912543,106.189909101,106.158008021,106.126208684,
682 106.094510473,106.06291278,106.031414999,106.000016532,105.968716784,
683 105.937515166,105.906411094,105.87540399,105.844493279,105.813678393,
684 105.782958766,105.752333841,105.721803061,105.691365878,105.661021745,
685 105.630770122,105.600610472,105.570542264,105.540564971,105.51067807,
686 105.480881041,105.451173372,105.421554551,105.392024073,105.362581436,
687 105.333226143,105.3039577,105.274775617,105.245679411,105.216668597,
688 105.1877427,105.158901246,105.130143764,105.101469788,105.072878857,
689 105.04437051,105.015944294,104.987599757,104.959336451,104.931153932,
690 104.903051759,104.875029495,104.847086706,104.819222962,104.791437835,
691 104.763730902,104.736101743,104.708549941,104.681075081,104.653676754,
692 104.626354551,104.599108068,104.571936905,104.544840663,104.517818946,
693 104.490871364,104.463997527,104.437197048,104.410469545,104.383814638,
694 104.357231948,104.330721102,104.304281728,104.277913457,104.251615922,
695 104.225388761,104.199231613,104.173144119,104.147125925,104.121176677,
696 104.095296026,104.069483624,104.043739125,104.018062189,103.992452474,
697 103.966909643,103.941433361,103.916023296,103.890679118,103.865400498,
698 103.840187112,103.815038637,103.789954751,103.764935137,103.739979478,
699 103.715087461,103.690258774,103.665493107,103.640790154,103.616149609,
700 103.59157117,103.567054536,103.542599408,103.51820549,103.493872487,
701 103.469600108,103.445388062,103.42123606,103.397143817,103.373111047,
702 103.34913747,103.325222804,103.301366771,103.277569095,103.253829501,
703 103.230147716,103.206523469,103.182956493,103.159446518,103.13599328,
704 103.112596516,103.089255964,103.065971363,103.042742456,103.019568986,
705 102.996450698,102.97338734,102.950378659,102.927424406,102.904524334,
706 102.881678195,102.858885746,102.836146742,102.813460943,102.790828108,
707 102.768247999,102.74572038,102.723245015,102.700821671,102.678450115,
708 102.656130116,102.633861446,102.611643877,102.589477183,102.567361139,
709 102.545295522,102.523280109,102.501314681,102.479399019,102.457532905,
710 102.435716122,102.413948457,102.392229695,102.370559624,102.348938035,
711 102.327364716,102.305839461,102.284362062,102.262932314,102.241550013,
712 102.220214956,102.198926941,102.177685768,102.156491237,102.135343152,
713 102.114241314,102.093185529,102.072175603,102.051211342,102.030292555,
714 102.009419051,101.98859064,101.967807134,101.947068347,101.926374091,
715 101.905724182,101.885118436,101.864556671,101.844038704,101.823564356,
716 101.803133447,101.782745799,101.762401235,101.742099578,101.721840653,
717 101.701624287,101.681450305,101.661318537,101.641228811,101.621180958,
718 101.601174808,101.581210193,101.561286947,101.541404903,101.521563896,
719 101.501763763,101.482004341,101.462285466,101.442606979,101.422968719,
720 101.403370526,101.383812242,101.36429371,101.344814774,101.325375276,
721 101.305975064,101.286613983,101.267291879,101.248008601,101.228763999,
722 101.20955792,101.190390216,101.171260738,101.152169339,101.133115871,
723 101.114100189,101.095122146,101.076181599,101.057278403,101.038412416,
724 101.019583497,101.000791503,100.982036294,100.96331773,100.944635673,
725 100.925989984,100.907380526,100.888807163,100.870269758,100.851768177,
726 100.833302284,100.814871947,100.796477033,100.778117409,100.759792944,
727 100.741503507,100.723248969,100.705029199,100.68684407,100.668693453,
728 100.650577222,100.632495249,100.614447409,100.596433577,100.578453629,
729 100.56050744,100.542594887,100.524715848,100.506870202,100.489057826,
730 100.471278601,100.453532406,100.435819123,100.418138632,100.400490816,
731 100.382875557,100.365292739,100.347742246,100.330223961,100.312737771,
732 100.29528356,100.277861215,100.260470623,100.243111672,100.225784249,
733 100.208488243,100.191223543,100.17399004,100.156787623,100.139616184,
734 100.122475614,100.105365804,100.088286649,100.07123804,100.054219871,
735 100.037232038,100.020274434,100.003346955,99.9864494965,99.9695819554,
736 99.9527442284,99.935936213,99.9191578071,99.9024089092,99.8856894183,
737 99.8689992338,99.8523382559,99.8357063851,99.8191035222,99.8025295689,
738 99.7859844271,99.7694679993,99.7529801885,99.7365208981,99.7200900321,
739 99.7036874949,99.6873131914,99.6709670269,99.6546489073,99.6383587388,
740 99.6220964281,99.6058618826,99.5896550097,99.5734757178,99.5573239152,
741 99.5411995111,99.5251024148,99.5090325364,99.492989786,99.4769740745,
742 99.460985313,99.4450234132,99.4290882872,99.4131798474,99.3972980067,
743 99.3814426785,99.3656137764,99.3498112147,99.3340349078,99.3182847708,
744 99.3025607191,99.2868626683,99.2711905347,99.2555442348,99.2399236857,
745 99.2243288047,99.2087595095,99.1932157183,99.1776973497,99.1622043225,
746 99.146736556,99.1312939699,99.1158764842,99.1004840195,99.0851164964,
747 99.0697738362,99.0544559603,99.0391627907,99.0238942497,99.0086502598,
748 98.993430744,98.9782356258,98.9630648287,98.9479182768,98.9327958945,
749 98.9176976065,98.902623338,98.8875730143,98.8725465613,98.857543905,
750 98.8425649718,98.8276096887,98.8126779826,98.7977697811,98.7828850119,
751 98.7680236031,98.7531854831,98.7383705808,98.7235788251,98.7088101455,
752 98.6940644717,98.6793417336,98.6646418617,98.6499647867,98.6353104394,
753 98.6206787511,98.6060696534,98.5914830783,98.5769189578,98.5623772246,
754 98.5478578113,98.533360651,98.5188856772,98.5044328236,98.490002024,
755 98.4755932127,98.4612063243,98.4468412937,98.4324980559,98.4181765464,
756 98.4038767009,98.3895984552,98.3753417457,98.361106509,98.3468926817,
757 98.332700201,98.3185290043,98.3043790291,98.2902502134,98.2761424952,
758 98.2620558131,98.2479901058,98.2339453121,98.2199213714,98.205918223,
759 98.1919358068,98.1779740627,98.164032931,98.1501123522,98.136212267,
760 98.1223326165,98.108473342,98.0946343849,98.080815687,98.0670171904,
761 98.0532388372,98.03948057,98.0257423315,98.0120240648,97.9983257129,
762 97.9846472195,97.9709885281,97.9573495827,97.9437303276,97.930130707,
763 97.9165506656,97.9029901484,97.8894491003,97.8759274667,97.8624251931,
764 97.8489422254,97.8354785095,97.8220339916,97.8086086182,97.795202336,
765 97.7818150918,97.7684468328,97.7550975062,97.7417670596,97.7284554407,
766 97.7151625976,97.7018884783,97.6886330313,97.6753962052,97.6621779488,
767 97.648978211,97.6357969412,97.6226340887,97.6094896032,97.5963634346,
768 97.5832555327,97.570165848,97.5570943308,97.5440409318,97.5310056019,
769 97.5179882919,97.5049889533,97.4920075374,97.4790439958,97.4660982804,
770 97.4531703431,97.4402601362,97.427367612,97.4144927232,97.4016354224,
771 97.3887956627,97.3759733971,97.3631685791,97.350381162,97.3376110997,
772 97.3248583459,97.3121228548,97.2994045805,97.2867034775,97.2740195003,
773 97.2613526038,97.2487027429,97.2360698727,97.2234539485,97.2108549257,
774 97.1982727601,97.1857074075,97.1731588237,97.1606269651,97.1481117878,
775 97.1356132485,97.1231313037,97.1106659104,97.0982170254,97.0857846061,
776 97.0733686096,97.0609689935,97.0485857155,97.0362187333,97.0238680049,
777 97.0115334885,96.9992151424,96.9869129251,96.974626795,96.9623567111,
778 96.9501026322,96.9378645174,96.925642326,96.9134360174,96.901245551,
779 96.8890708866,96.8769119841,96.8647688034,96.8526413048,96.8405294484,
780 96.8284331947,96.8163525044,96.8042873382,96.792237657,96.7802034217,
781 96.7681845937,96.7561811342,96.7441930046,96.7322201667,96.7202625821,
782 96.7083202128,96.6963930208,96.6844809683,96.6725840175,96.660702131,
783 96.6488352713,96.6369834012,96.6251464835,96.6133244813,96.6015173576,
784 96.5897250758,96.5779475993,96.5661848916,96.5544369164,96.5427036375,
785 96.5309850188,96.5192810244,96.5075916186,96.4959167655,96.4842564298,
786 96.472610576,96.4609791688,96.449362173,96.4377595536,96.4261712758,
787 96.4145973047,96.4030376057,96.3914921443,96.379960886,96.3684437966,
788 96.3569408419,96.3454519879,96.3339772007,96.3225164464,96.3110696914,
789 96.2996369022,96.2882180452,96.2768130873,96.2654219951,96.2540447357,
790 96.242681276,96.2313315832,96.2199956245,96.2086733674,96.1973647793,
791 96.1860698279,96.1747884809,96.1635207061,96.1522664715,96.1410257451,
792 96.1297984951,96.1185846898,96.1073842976,96.096197287,96.0850236266,
793 96.0738632851,96.0627162315,96.0515824345,96.0404618634,96.0293544871,
794 96.018260275,96.0071791965,95.9961112211,95.9850563182,95.9740144577,
795 95.9629856092,95.9519697427,95.9409668282,95.9299768358,95.9189997356,
796 95.908035498,95.8970840934,95.8861454923,95.8752196653,95.8643065831,
797 95.8534062165,95.8425185365,95.8316435139,95.82078112,95.8099313258,
798 95.7990941028,95.7882694223,95.7774572558,95.7666575748,95.7558703512,
799 95.7450955566,95.7343331628,95.723583142,95.7128454661,95.7021201073,
800 95.6914070379,95.6807062301,95.6700176564,95.6593412894,95.6486771016,
801 95.6380250658,95.6273851547,95.6167573413,95.6061415985,95.5955378994,
802 95.5849462171,95.5743665249,95.5637987962,95.5532430042,95.5426991226,
803 95.532167125,95.521646985,95.5111386764,95.500642173,95.4901574488,
804 95.4796844778,95.4692232342,95.4587736921,95.4483358257,95.4379096096,
805 95.4274950181,95.4170920257,95.406700607,95.3963207368,95.3859523898,
806 95.375595541,95.3652501651,95.3549162373,95.3445937326,95.3342826263,
807 95.3239828935,95.3136945097,95.3034174503,95.2931516907,95.2828972066,
808 95.2726539735,95.2624219673,95.2522011637,95.2419915386,95.231793068,
809 95.221605728,95.2114294947,95.2012643442,95.1911102528,95.1809671969,
810 95.1708351529,95.1607140973,95.1506040066,95.1405048576,95.1304166269,
811 95.1203392913,95.1102728277,95.100217213,95.0901724243,95.0801384386,
812 95.070115233,95.0601027849,95.0501010715,95.0401100701,95.0301297583,
813 95.0201601135,95.0102011132,95.0002527353,94.9903149573,94.9803877571,
814 94.9704711125,94.9605650015,94.950669402,94.9407842921,94.93090965,
815 94.9210454538,94.9111916818,94.9013483124,94.8915153239,94.8816926948,
816 94.8718804037,94.8620784292,94.8522867499,94.8425053445,94.8327341919,
817 94.8229732709,94.8132225604,94.8034820394,94.793751687,94.7840314824,
818 94.7743214046,94.7646214329,94.7549315467,94.7452517252,94.7355819481,
819 94.7259221946,94.7162724445,94.7066326773,94.6970028726,94.6873830104,
820 94.6777730702,94.6681730321,94.658582876,94.6490025817,94.6394321295,
821 94.6298714993,94.6203206714,94.610779626,94.6012483433,94.5917268037,
822 94.5822149877,94.5727128756,94.563220448,94.5537376855,94.5442645687,
823 94.5348010783,94.525347195,94.5159028997,94.5064681732,94.4970429965,
824 94.4876273505,94.4782212162,94.4688245748,94.4594374074,94.4500596952,
825 94.4406914195,94.4313325615,94.4219831026,94.4126430243,94.403312308,
826 94.3939909353,94.3846788878,94.375376147,94.3660826947,94.3567985126,
827 94.3475235826,94.3382578864,94.329001406,94.3197541234,94.3105160205,
828 94.3012870794,94.2920672823,94.2828566112,94.2736550485,94.2644625763,
829 94.255279177,94.2461048331,94.2369395268,94.2277832407,94.2186359572,
830 94.2094976591,94.2003683288,94.1912479492,94.1821365028,94.1730339724,
831 94.163940341,94.1548555913,94.1457797063,94.136712669,94.1276544623,
832 94.1186050694,94.1095644733,94.1005326572,94.0915096044,94.082495298,
833 94.0734897214,94.064492858,94.0555046911,94.0465252043,94.0375543809,
834 94.0285922045,94.0196386587,94.0106937272,94.0017573936,93.9928296417,
835 93.9839104552,93.974999818,93.9660977138,93.9572041267,93.9483190405,
836 93.9394424393,93.9305743071,93.921714628,93.9128633861,93.9040205657,
837 93.8951861508,93.8863601258,93.8775424751,93.8687331828,93.8599322335,
838 93.8511396116,93.8423553016,93.8335792879,93.8248115552,93.816052088,
839 93.8073008711,93.798557889,93.7898231266,93.7810965686,93.7723781999,
840 93.7636680053
841 }
842 }
843 };
0 // generated by ../../tools/tube_transfer.py
1 // tube: 6C16
2 // plate current function: triode
3 // mu: 42.2
4 // kx: 2.21
5 // kg1: 393
6 // kp: 629
7 // kvb: 446
8
9 table1d_imp<2001> tubetable_6C16[2] =
10 {
11 {
12 // Ri = 68k
13 -5,5,200,2001, {
14 214.806581677,214.650587712,214.494441388,214.338143449,214.181694635,
15 214.025095677,213.868347304,213.711450238,213.554405194,213.397212884,
16 213.239874013,213.082389282,212.924759385,212.766985013,212.60906685,
17 212.451005576,212.292801864,212.134456385,211.975969802,211.817342776,
18 211.658575961,211.499670005,211.340625555,211.181443251,211.022123727,
19 210.862667614,210.703075539,210.543348122,210.383485982,210.22348973,
20 210.063359973,209.903097317,209.742702359,209.582175694,209.421517913,
21 209.260729602,209.099811343,208.938763714,208.777587287,208.616282633,
22 208.454850316,208.293290899,208.131604938,207.969792986,207.807855593,
23 207.645793304,207.483606661,207.321296202,207.15886246,206.996305965,
24 206.833627244,206.67082682,206.507905211,206.344862933,206.181700497,
25 206.018418412,205.855017182,205.691497309,205.527859289,205.364103618,
26 205.200230785,205.036241278,204.872135582,204.707914176,204.543577538,
27 204.379126141,204.214560458,204.049880955,203.885088096,203.720182343,
28 203.555164155,203.390033984,203.224792285,203.059439505,202.893976089,
29 202.728402482,202.562719123,202.396926447,202.23102489,202.065014882,
30 201.898896852,201.732671223,201.56633842,201.399898861,201.233352963,
31 201.066701141,200.899943805,200.733081363,200.566114223,200.399042787,
32 200.231867455,200.064588626,199.897206695,199.729722054,199.562135094,
33 199.394446202,199.226655764,199.058764161,198.890771775,198.722678983,
34 198.554486159,198.386193678,198.217801909,198.04931122,197.880721977,
35 197.712034543,197.54324928,197.374366545,197.205386696,197.036310087,
36 196.86713707,196.697867994,196.528503206,196.359043053,196.189487877,
37 196.019838019,195.850093818,195.680255611,195.510323732,195.340298515,
38 195.170180288,194.999969382,194.829666122,194.659270832,194.488783835,
39 194.318205451,194.147535999,193.976775794,193.805925153,193.634984386,
40 193.463953805,193.292833719,193.121624434,192.950326255,192.778939486,
41 192.607464428,192.43590138,192.264250641,192.092512505,191.920687267,
42 191.74877522,191.576776653,191.404691857,191.232521118,191.060264721,
43 190.887922951,190.715496088,190.542984415,190.370388209,190.197707747,
44 190.024943305,189.852095157,189.679163575,189.50614883,189.33305119,
45 189.159870923,188.986608295,188.813263571,188.639837013,188.466328882,
46 188.292739439,188.119068941,187.945317645,187.771485807,187.597573681,
47 187.423581518,187.249509571,187.075358088,186.901127317,186.726817506,
48 186.552428899,186.377961741,186.203416274,186.028792738,185.854091375,
49 185.679312422,185.504456116,185.329522693,185.154512388,184.979425434,
50 184.804262062,184.629022504,184.453706988,184.278315742,184.102848994,
51 183.927306968,183.751689889,183.57599798,183.400231463,183.224390558,
52 183.048475484,182.872486461,182.696423704,182.520287429,182.344077852,
53 182.167795186,181.991439642,181.815011432,181.638510767,181.461937854,
54 181.285292902,181.108576118,180.931787707,180.754927872,180.577996819,
55 180.400994749,180.223921863,180.046778361,179.869564443,179.692280306,
56 179.514926148,179.337502164,179.16000855,178.982445499,178.804813204,
57 178.627111857,178.449341649,178.27150277,178.093595408,177.915619752,
58 177.737575989,177.559464305,177.381284884,177.203037911,177.024723568,
59 176.846342039,176.667893504,176.489378144,176.310796138,176.132147665,
60 175.953432902,175.774652027,175.595805214,175.416892639,175.237914476,
61 175.058870898,174.879762077,174.700588185,174.521349393,174.342045871,
62 174.162677786,173.983245308,173.803748604,173.624187839,173.444563181,
63 173.264874792,173.085122839,172.905307483,172.725428887,172.545487212,
64 172.365482621,172.185415271,172.005285324,171.825092937,171.644838268,
65 171.464521474,171.284142712,171.103702136,170.923199902,170.742636163,
66 170.562011074,170.381324785,170.20057745,170.019769219,169.838900242,
67 169.65797067,169.476980651,169.295930334,169.114819866,168.933649395,
68 168.752419065,168.571129024,168.389779415,168.208370384,168.026902072,
69 167.845374625,167.663788182,167.482142887,167.300438881,167.118676302,
70 166.936855292,166.754975989,166.573038531,166.391043057,166.208989703,
71 166.026878606,165.844709901,165.662483725,165.480200212,165.297859496,
72 165.11546171,164.933006988,164.750495462,164.567927263,164.385302523,
73 164.202621372,164.019883941,163.837090358,163.654240754,163.471335255,
74 163.288373991,163.105357087,162.922284672,162.739156871,162.555973809,
75 162.372735612,162.189442404,162.00609431,161.822691453,161.639233955,
76 161.45572194,161.272155529,161.088534844,160.904860005,160.721131134,
77 160.537348349,160.353511771,160.169621519,159.98567771,159.801680463,
78 159.617629896,159.433526124,159.249369266,159.065159437,158.880896752,
79 158.696581327,158.512213277,158.327792715,158.143319755,157.958794511,
80 157.774217096,157.589587621,157.4049062,157.220172943,157.035387961,
81 156.850551366,156.665663268,156.480723775,156.295732998,156.110691046,
82 155.925598028,155.74045405,155.555259222,155.37001365,155.184717441,
83 154.999370702,154.813973539,154.628526057,154.443028363,154.25748056,
84 154.071882754,153.886235049,153.700537548,153.514790354,153.328993572,
85 153.143147302,152.957251649,152.771306713,152.585312596,152.3992694,
86 152.213177225,152.027036171,151.840846339,151.654607829,151.46832074,
87 151.28198517,151.09560122,150.909168986,150.722688568,150.536160062,
88 150.349583566,150.162959178,149.976286994,149.78956711,149.602799623,
89 149.415984628,149.22912222,149.042212495,148.855255548,148.668251473,
90 148.481200364,148.294102315,148.106957419,147.919765771,147.732527463,
91 147.545242587,147.357911237,147.170533503,146.983109479,146.795639255,
92 146.608122923,146.420560573,146.232952297,146.045298185,145.857598327,
93 145.669852813,145.482061732,145.294225174,145.106343228,144.918415983,
94 144.730443527,144.542425949,144.354363336,144.166255777,143.978103358,
95 143.789906168,143.601664294,143.413377821,143.225046837,143.036671428,
96 142.848251681,142.65978768,142.471279512,142.282727262,142.094131015,
97 141.905490856,141.71680687,141.528079142,141.339307755,141.150492794,
98 140.961634343,140.772732485,140.583787303,140.394798882,140.205767303,
99 140.016692651,139.827575006,139.638414453,139.449211072,139.259964947,
100 139.070676158,138.881344788,138.691970919,138.50255463,138.313096004,
101 138.123595121,137.934052062,137.744466908,137.554839739,137.365170636,
102 137.175459677,136.985706944,136.795912515,136.606076471,136.416198891,
103 136.226279854,136.036319439,135.846317724,135.65627479,135.466190714,
104 135.276065574,135.08589945,134.895692419,134.70544456,134.515155949,
105 134.324826666,134.134456787,133.94404639,133.753595552,133.563104351,
106 133.372572864,133.182001167,132.991389337,132.800737452,132.610045587,
107 132.41931382,132.228542226,132.037730882,131.846879864,131.655989247,
108 131.465059109,131.274089524,131.083080569,130.892032318,130.700944849,
109 130.509818235,130.318652552,130.127447876,129.936204281,129.744921843,
110 129.553600637,129.362240737,129.170842219,128.979405156,128.787929624,
111 128.596415698,128.404863451,128.213272959,128.021644295,127.829977533,
112 127.638272749,127.446530017,127.254749409,127.062931001,126.871074867,
113 126.679181079,126.487249713,126.295280842,126.103274541,125.911230881,
114 125.719149938,125.527031786,125.334876497,125.142684145,124.950454804,
115 124.758188548,124.565885449,124.373545582,124.18116902,123.988755837,
116 123.796306105,123.603819898,123.41129729,123.218738354,123.026143164,
117 122.833511792,122.640844313,122.448140799,122.255401324,122.062625961,
118 121.869814784,121.676967866,121.484085281,121.291167101,121.098213401,
119 120.905224253,120.712199732,120.51913991,120.326044862,120.132914661,
120 119.93974938,119.746549093,119.553313874,119.360043796,119.166738933,
121 118.973399359,118.780025148,118.586616373,118.393173109,118.19969543,
122 118.006183409,117.81263712,117.619056639,117.425442039,117.231793394,
123 117.038110779,116.844394268,116.650643936,116.456859857,116.263042107,
124 116.069190759,115.87530589,115.681387573,115.487435884,115.293450898,
125 115.09943269,114.905381337,114.711296912,114.517179492,114.323029153,
126 114.128845971,113.93463002,113.740381379,113.546100122,113.351786326,
127 113.157440068,112.963061424,112.768650472,112.574207287,112.379731948,
128 112.185224531,111.990685114,111.796113774,111.601510589,111.406875638,
129 111.212208997,111.017510746,110.822780964,110.628019727,110.433227116,
130 110.238403209,110.043548087,109.848661827,109.65374451,109.458796215,
131 109.263817024,109.068807015,108.87376627,108.678694869,108.483592894,
132 108.288460425,108.093297545,107.898104334,107.702880875,107.507627251,
133 107.312343543,107.117029835,106.921686209,106.726312749,106.530909539,
134 106.335476663,106.140014205,105.944522249,105.749000881,105.553450185,
135 105.357870248,105.162261155,104.966622992,104.770955847,104.575259805,
136 104.379534954,104.183781382,103.987999177,103.792188428,103.596349222,
137 103.40048165,103.204585801,103.008661765,102.812709632,102.616729493,
138 102.420721441,102.224685566,102.02862196,101.832530717,101.636411929,
139 101.440265691,101.244092096,101.047891239,100.851663216,100.655408121,
140 100.459126052,100.262817104,100.066481377,99.8701189658,99.673729971,
141 99.477314491,99.2808726256,99.0844044752,98.8879101407,98.6913897236,
142 98.4948433264,98.2982710519,98.1016730037,97.9050492862,97.7084000044,
143 97.5117252641,97.3150251718,97.1182998349,96.9215493615,96.7247738603,
144 96.5279734411,96.3311482144,96.1342982917,95.9374237851,95.7405248079,
145 95.5436014741,95.3466538988,95.1496821978,94.9526864881,94.7556668877,
146 94.5586235156,94.3615564917,94.1644659371,93.9673519741,93.7702147259,
147 93.5730543171,93.3758708733,93.1786645213,92.9814353893,92.7841836066,
148 92.5869093039,92.3896126132,92.1922936679,91.9949526028,91.7975895541,
149 91.6002046595,91.4027980582,91.205369891,91.0079203002,90.8104494298,
150 90.6129574255,90.4154444347,90.2179106065,90.0203560919,89.8227810438,
151 89.6251856168,89.4275699678,89.2299342554,89.0322786405,88.8346032859,
152 88.636908357,88.4391940209,88.2414604476,88.0437078089,87.8459362796,
153 87.6481460367,87.4503372598,87.2525101312,87.0546648361,86.8568015623,
154 86.6589205007,86.461021845,86.2631057922,86.0651725422,85.8672222985,
155 85.6692552677,85.47127166,85.2732716892,85.0752555725,84.8772235314,
156 84.6791757908,84.4811125799,84.2830341322,84.084940685,83.8868324806,
157 83.6887097654,83.4905727907,83.2924218127,83.0942570925,82.8960788963,
158 82.6978874958,82.499683168,82.3014661959,82.1032368679,81.9049954788,
159 81.7067423296,81.5084777275,81.3102019866,81.1119154278,80.9136183791,
160 80.7153111759,80.516994161,80.3186676851,80.1203321072,79.9219877944,
161 79.7236351224,79.5252744761,79.3269062494,79.1285308459,78.9301486789,
162 78.7317601719,78.533365759,78.3349658854,78.1365610071,77.9381515922,
163 77.7397381206,77.5413210848,77.34290099,77.1444783551,76.9460537123,
164 76.7476276085,76.5492006051,76.350773279,76.1523462226,75.9539200451,
165 75.7554953721,75.5570728472,75.3586531317,75.160236906,74.9618248697,
166 74.7634177425,74.5650162649,74.3666211991,74.1682333293,73.969853463,
167 73.7714824312,73.57312109,73.3747703208,73.1764310315,72.9781041575,
168 72.7797906624,72.5814915392,72.3832078112,72.1849405333,71.9866907928,
169 71.7884597106,71.5902484426,71.3920581808,71.1938901544,70.9957456312,
170 70.7976259192,70.5995323675,70.4014663683,70.203429358,70.0054228187,
171 69.8074482801,69.6095073209,69.4116015707,69.2137327114,69.0159024793,
172 68.8181126671,68.6203651253,68.4226617647,68.2250045581,68.0273955426,
173 67.8298368217,67.6323305676,67.4348790234,67.2374845055,67.0401494061,
174 66.8428761956,66.6456674255,66.4485257304,66.2514538315,66.0544545389,
175 65.8575307545,65.6606854752,65.4639217957,65.2672429117,65.070652123,
176 64.8741528369,64.6777485713,64.4814429582,64.2852397473,64.0891428094,
177 63.89315614,63.6972838629,63.5015302341,63.3058996458,63.1103966298,
178 62.9150258617,62.7197921649,62.5247005146,62.3297560418,62.1349640375,
179 61.9403299569,61.7458594236,61.5515582334,61.3574323592,61.1634879547,
180 60.9697313588,60.7761690999,60.5828078998,60.3896546781,60.1967165562,
181 60.0040008615,59.811515131,59.6192671154,59.427264783,59.2355163231,
182 59.0440301495,58.852814904,58.6618794596,58.4712329231,58.2808846382,
183 58.090844188,57.9011213969,57.7117263328,57.5226693086,57.3339608836,
184 57.1456118642,56.9576333046,56.7700365068,56.58283302,56.3960346403,
185 56.2096534086,56.0237016094,55.8381917678,55.6531366466,55.4685492428,
186 55.284442783,55.1008307186,54.9177267197,54.7351446693,54.5530986556,
187 54.3716029642,54.1906720696,54.0103206254,53.8305634543,53.6514155368,
188 53.4728919991,53.295008101,53.1177792216,52.9412208454,52.7653485472,
189 52.5901779759,52.4157248378,52.2420048797,52.0690338701,51.8968275811,
190 51.7254017683,51.5547721516,51.3849543941,51.2159640815,51.0478167004,
191 50.8805276169,50.7141120546,50.5485850721,50.3839615409,50.220256123,
192 50.0574832487,49.895657094,49.7347915589,49.5749002458,49.4159964377,
193 49.2580930777,49.1012027484,48.9453376526,48.7905095938,48.6367299582,
194 48.4840096974,48.3323593121,48.1817888365,48.0323078239,47.8839253338,
195 47.7366499195,47.5904896174,47.4454519373,47.3015438542,47.1587718012,
196 47.0171416637,46.876658775,46.7373279131,46.5991532994,46.4621385973,
197 46.326286914,46.1916008015,46.0580822608,45.9257327457,45.7945531685,
198 45.6645439069,45.5357048113,45.4080352138,45.2815339377,45.1561993078,
199 45.032029162,44.9090208631,44.7871713114,44.6664769582,44.5469338196,
200 44.4285374906,44.3112831602,44.195165626,44.08017931,43.9663182736,
201 43.8535762342,43.7419465802,43.6314223873,43.5219964345,43.4136612197,
202 43.3064089756,43.2002316854,43.0951210982,42.9910687444,42.8880659502,
203 42.7861038533,42.6851734163,42.5852654418,42.4863705854,42.3884793696,
204 42.2915821966,42.1956693612,42.1007310628,42.0067574174,41.913738469,
205 41.8216642003,41.7305245439,41.6403093918,41.5510086055,41.4626120252,
206 41.3751094786,41.2884907892,41.2027457849,41.1178643049,41.0338362075,
207 40.9506513767,40.8682997286,40.7867712177,40.7060558425,40.6261436509,
208 40.5470247451,40.4686892867,40.3911275007,40.3143296798,40.238286188,
209 40.1629874645,40.0884240263,40.0145864718,39.9414654832,39.869051829,
210 39.7973363663,39.7263100428,39.6559638986,39.5862890679,39.5172767805,
211 39.4489183628,39.381205239,39.3141289323,39.2476810652,39.1818533604,
212 39.1166376415,39.0520258329,38.9880099602,38.9245821507,38.861734633,
213 38.799459737,38.7377498939,38.6765976358,38.6159955956,38.5559365061,
214 38.4964132002,38.4374186098,38.3789457655,38.3209877958,38.2635379265,
215 38.20658948,38.1501358741,38.0941706218,38.03868733,37.9836796987,
216 37.9291415199,37.8750666772,37.821449144,37.7682829833,37.7155623461,
217 37.6632814707,37.6114346815,37.5600163879,37.5090210835,37.4584433446,
218 37.4082778296,37.3585192774,37.3091625068,37.260202415,37.2116339769,
219 37.1634522436,37.1156523417,37.0682294717,37.0211789077,36.9744959955,
220 36.9281761519,36.882214864,36.8366076874,36.7913502455,36.7464382288,
221 36.7018673933,36.6576335597,36.6137326126,36.5701604991,36.5269132281,
222 36.4839868692,36.4413775518,36.3990814641,36.3570948521,36.3154140187,
223 36.2740353227,36.2329551782,36.1921700533,36.1516764693,36.1114710002,
224 36.0715502713,36.0319109585,35.9925497878,35.953463534,35.9146490203,
225 35.8761031172,35.8378227417,35.7998048569,35.7620464706,35.7245446353,
226 35.6872964468,35.6502990438,35.6135496072,35.5770453592,35.5407835628,
227 35.5047615211,35.4689765763,35.4334261096,35.3981075401,35.3630183243,
228 35.3281559555,35.2935179634,35.2591019128,35.2249054039,35.190926071,
229 35.1571615823,35.1236096394,35.0902679764,35.0571343594,35.0242065864,
230 34.9914824864,34.9589599188,34.9266367732,34.8945109687,34.8625804535,
231 34.8308432042,34.7992972259,34.7679405508,34.7367712388,34.7057873762,
232 34.6749870757,34.6443684758,34.6139297407,34.5836690592,34.553584645,
233 34.523674736,34.4939375938,34.4643715034,34.4349747732,34.4057457337,
234 34.3766827382,34.3477841616,34.3190484007,34.2904738733,34.2620590183,
235 34.2338022949,34.2057021827,34.1777571813,34.1499658098,34.1223266066,
236 34.094838129,34.067498953,34.0403076731,34.0132629019,33.9863632696,
237 33.9596074241,33.9329940306,33.906521771,33.8801893442,33.8539954655,
238 33.8279388664,33.8020182942,33.7762325121,33.7505802987,33.7250604478,
239 33.6996717682,33.6744130834,33.6492832315,33.624281065,33.5994054503,
240 33.5746552679,33.5500294117,33.5255267892,33.5011463214,33.4768869419,
241 33.4527475975,33.4287272476,33.404824864,33.3810394309,33.3573699445,
242 33.333815413,33.3103748565,33.2870473064,33.2638318058,33.2407274087,
243 33.2177331806,33.1948481976,33.1720715466,33.1494023254,33.1268396418,
244 33.1043826143,33.0820303713,33.0597820513,33.0376368026,33.0155937833,
245 32.9936521611,32.971811113,32.9500698254,32.928427494,32.9068833234,
246 32.885436527,32.8640863273,32.8428319553,32.8216726506,32.8006076611,
247 32.7796362431,32.7587576613,32.7379711881,32.7172761042,32.696671698,
248 32.6761572657,32.6557321111,32.6353955456,32.615146888,32.5949854646,
249 32.5749106086,32.5549216607,32.5350179685,32.5151988864,32.4954637759,
250 32.4758120052,32.4562429491,32.4367559889,32.4173505127,32.3980259148,
251 32.3787815958,32.3596169627,32.3405314284,32.3215244122,32.3025953392,
252 32.2837436404,32.2649687528,32.246270119,32.2276471875,32.2090994121,
253 32.1906262525,32.1722271737,32.1539016461,32.1356491454,32.1174691527,
254 32.0993611542,32.0813246412,32.0633591103,32.0454640627,32.027639005,
255 32.0098834483,31.9921969088,31.9745789073,31.9570289692,31.9395466249,
256 31.922131409,31.9047828608,31.8875005241,31.870283947,31.8531326821,
257 31.8360462862,31.8190243203,31.8020663499,31.7851719442,31.768340677,
258 31.7515721256,31.7348658718,31.7182215011,31.7016386029,31.6851167705,
259 31.6686556011,31.6522546954,31.6359136583,31.6196320978,31.603409626,
260 31.5872458584,31.571140414,31.5550929153,31.5391029884,31.5231702628,
261 31.5072943712,31.49147495,31.4757116385,31.4600040794,31.4443519189,
262 31.4287548061,31.4132123933,31.3977243359,31.3822902925,31.3669099247,
263 31.3515828971,31.3363088772,31.3210875356,31.3059185458,31.2908015839,
264 31.2757363292,31.2607224636,31.245759672,31.2308476417,31.2159860631,
265 31.2011746291,31.1864130351,31.1717009795,31.1570381631,31.1424242891,
266 31.1278590637,31.1133421951,31.0988733943,31.0844523748,31.0700788523,
267 31.0557525451,31.0414731739,31.0272404614,31.0130541332,30.9989139168,
268 30.9848195421,30.9707707411,30.9567672485,30.9428088006,30.9288951362,
269 30.9150259964,30.9012011241,30.8874202647,30.8736831652,30.8599895751,
270 30.8463392459,30.8327319308,30.8191673854,30.805645367,30.7921656351,
271 30.778727951,30.7653320779,30.751977781,30.7386648273,30.7253929858,
272 30.7121620271,30.6989717239,30.6858218505,30.6727121831,30.6596424997,
273 30.64661258,30.6336222053,30.6206711589,30.6077592256,30.5948861919,
274 30.582051846,30.5692559778,30.5564983788,30.543778842,30.5310971622,
275 30.5184531356,30.5058465602,30.4932772352,30.4807449617,30.4682495421,
276 30.4557907804,30.4433684821,30.430982454,30.4186325047,30.4063184439,
277 30.394040083,30.3817972346,30.369589713,30.3574173335,30.3452799132,
278 30.3331772701,30.3211092241,30.309075596,30.2970762081,30.285110884,
279 30.2731794486,30.2612817281,30.24941755,30.237586743,30.2257891371,
280 30.2140245634,30.2022928546,30.1905938442,30.1789273672,30.1672932596,
281 30.1556913586,30.1441215028,30.1325835317,30.1210772861,30.1096026079,
282 30.09815934,30.0867473267,30.0753664132,30.0640164459,30.0526972721,
283 30.0414087405,30.0301507006,30.018923003,30.0077254995,29.9965580428,
284 29.9854204867,29.974312686,29.9632344964,29.9521857749,29.9411663791,
285 29.930176168,29.9192150012,29.9082827395,29.8973792446,29.8865043791,
286 29.8756580067,29.8648399918,29.8540501999,29.8432884974,29.8325547515,
287 29.8218488304,29.8111706032,29.8005199399,29.7898967112,29.7793007888,
288 29.7687320454,29.7581903544,29.74767559,29.7371876273,29.7267263422,
289 29.7162916116,29.705883313,29.6955013249,29.6851455263,29.6748157973,
290 29.6645120188,29.6542340722,29.64398184,29.6337552052,29.6235540517,
291 29.6133782642,29.6032277281,29.5931023295,29.5830019553,29.5729264931,
292 29.5628758312,29.5528498587,29.5428484654,29.5328715418,29.5229189789,
293 29.5129906688,29.503086504,29.4932063777,29.4833501839,29.4735178172,
294 29.4637091728,29.4539241467,29.4441626356,29.4344245366,29.4247097476,
295 29.4150181672,29.4053496945,29.3957042294,29.3860816723,29.3764819242,
296 29.3669048868,29.3573504624,29.3478185538,29.3383090646,29.3288218988,
297 29.3193569611,29.3099141568,29.3004933916,29.2910945721,29.2817176051,
298 29.2723623983,29.2630288597,29.2537168981,29.2444264227,29.2351573433,
299 29.2259095701,29.2166830142,29.2074775868,29.1982931999,29.189129766,
300 29.1799871982,29.1708654098,29.161764315,29.1526838283,29.1436238647,
301 29.1345843399,29.1255651698,29.1165662711,29.1075875607,29.0986289563,
302 29.0896903759,29.0807717379,29.0718729614,29.0629939658,29.054134671,
303 29.0452949975,29.0364748662,29.0276741982,29.0188929155,29.0101309403,
304 29.0013881953,28.9926646035,28.9839600886,28.9752745746,28.9666079859,
305 28.9579602474,28.9493312845,28.9407210228,28.9321293887,28.9235563085,
306 28.9150017094,28.9064655188,28.8979476644,28.8894480746,28.880966678,
307 28.8725034037,28.864058181,28.8556309398,28.8472216105,28.8388301235,
308 28.8304564099,28.8221004011,28.813762029,28.8054412256,28.7971379235,
309 28.7888520556,28.7805835552,28.772332356,28.764098392,28.7558815975,
310 28.7476819073,28.7394992566,28.7313335807,28.7231848155,28.7150528972,
311 28.7069377621,28.6988393474,28.69075759,28.6826924275,28.6746437979,
312 28.6666116394,28.6585958904,28.6505964899,28.6426133771,28.6346464915,
313 28.626695773,28.6187611617,28.6108425982,28.6029400232,28.595053378,
314 28.5871826039,28.5793276427,28.5714884365,28.5636649277,28.5558570589,
315 28.5480647731,28.5402880136,28.532526724,28.5247808482,28.5170503302,
316 28.5093351147,28.5016351463,28.4939503701,28.4862807313,28.4786261758,
317 28.4709866492,28.4633620978,28.4557524681,28.4481577067,28.4405777608,
318 28.4330125775,28.4254621044,28.4179262893,28.4104050804,28.4028984259,
319 28.3954062746,28.3879285752,28.3804652769,28.3730163292,28.3655816816,
320 28.3581612841,28.3507550868,28.3433630402,28.3359850949,28.3286212019,
321 28.3212713123,28.3139353775,28.3066133492,28.2993051793,28.2920108199,
322 28.2847302234,28.2774633423,28.2702101296,28.2629705384,28.2557445219,
323 28.2485320337,28.2413330275,28.2341474574,28.2269752777,28.2198164427,
324 28.2126709072,28.205538626,28.1984195544,28.1913136475,28.1842208611,
325 28.1771411508,28.1700744728,28.1630207831,28.1559800382,28.1489521948,
326 28.1419372097,28.13493504,28.1279456429,28.1209689759,28.1140049966,
327 28.107053663,28.1001149332,28.0931887653,28.0862751179,28.0793739497,
328 28.0724852196,28.0656088866,28.0587449099,28.0518932492,28.0450538639,
329 28.038226714,28.0314117595,28.0246089606,28.0178182778,28.0110396715,
330 28.0042731028,27.9975185324,27.9907759215,27.9840452315,27.9773264239,
331 27.9706194605,27.9639243029,27.9572409134,27.9505692542,27.9439092876,
332 27.9372609763,27.9306242829,27.9239991704,27.917385602,27.9107835408,
333 27.9041929503,27.8976137942,27.8910460361,27.8844896401,27.8779445702,
334 27.8714107907,27.8648882661,27.8583769608,27.8518768397,27.8453878678,
335 27.8389100099,27.8324432315,27.8259874979,27.8195427746,27.8131090273,
336 27.806686222,27.8002743245,27.7938733011,27.7874831181,27.781103742,
337 27.7747351393,27.7683772768,27.7620301215,27.7556936405,27.7493678008,
338 27.74305257,27.7367479154,27.7304538047,27.7241702058,27.7178970865,
339 27.7116344149,27.7053821593,27.6991402879,27.6929087694,27.6866875722,
340 27.6804766652,27.6742760174,27.6680855976,27.6619053752,27.6557353194,
341 27.6495753996,27.6434255855,27.6372858468,27.6311561533,27.6250364749,
342 27.6189267819,27.6128270443,27.6067372327,27.6006573174,27.594587269,
343 27.5885270585,27.5824766565,27.5764360341,27.5704051624,27.5643840127,
344 27.5583725563,27.5523707647,27.5463786095,27.5403960625,27.5344230955,
345 27.5284596804,27.5225057894,27.5165613947,27.5106264685,27.5047009834,
346 27.4987849119,27.4928782266,27.4869809004,27.4810929061,27.4752142168,
347 27.4693448056,27.4634846457,27.4576337105,27.4517919735,27.4459594082,
348 27.4401359884,27.4343216877,27.4285164802,27.4227203398,27.4169332407,
349 27.411155157,27.4053860632,27.3996259336,27.3938747428,27.3881324655,
350 27.3823990764,27.3766745503,27.3709588622,27.3652519873,27.3595539006,
351 27.3538645774,27.3481839931,27.3425121231,27.3368489431,27.3311944287,
352 27.3255485556,27.3199112998,27.3142826371,27.3086625437,27.3030509957,
353 27.2974479694,27.291853441,27.2862673871,27.2806897842,27.2751206089,
354 27.2695598379,27.2640074481,27.2584634164,27.2529277198,27.2474003354,
355 27.2418812403,27.2363704118,27.2308678274,27.2253734644,27.2198873005,
356 27.2144093132,27.2089394803,27.2034777796,27.1980241889,27.1925786864,
357 27.18714125,27.181711858,27.1762904885,27.1708771199,27.1654717306,
358 27.1600742991,27.1546848041,27.1493032241,27.1439295379,27.1385637244,
359 27.1332057625,27.1278556311,27.1225133094,27.1171787765,27.1118520117,
360 27.1065329942,27.1012217036,27.0959181192,27.0906222206,27.0853339875,
361 27.0800533996,27.0747804366,27.0695150786,27.0642573053,27.0590070968,
362 27.0537644333,27.048529295,27.0433016619,27.0380815146,27.0328688334,
363 27.0276635988,27.0224657913,27.0172753915,27.0120923803,27.0069167383,
364 27.0017484463,26.9965874854,26.9914338364,26.9862874805,26.9811483988,
365 26.9760165725,26.9708919829,26.9657746112,26.960664439,26.9555614477,
366 26.9504656189,26.9453769341,26.9402953751,26.9352209236,26.9301535615,
367 26.9250932707,26.920040033,26.9149938306,26.9099546455,26.9049224599,
368 26.899897256,26.8948790161,26.8898677226,26.8848633578,26.8798659043,
369 26.8748753447,26.8698916614,26.8649148373,26.8599448551,26.8549816974,
370 26.8500253473,26.8450757877,26.8401330015,26.8351969718,26.8302676817,
371 26.8253451143,26.820429253,26.815520081,26.8106175817,26.8057217385,
372 26.8008325349,26.7959499543,26.7910739805,26.786204597,26.7813417876,
373 26.7764855361,26.7716358262,26.7667926419,26.7619559671,26.7571257859,
374 26.7523020822,26.7474848402,26.7426740441,26.737869678,26.7330717264,
375 26.7282801735,26.7234950037,26.7187162015,26.7139437514,26.7091776379,
376 26.7044178457,26.6996643594,26.6949171638,26.6901762436,26.6854415837,
377 26.680713169,26.6759909844,26.6712750148,26.6665652454,26.6618616612,
378 26.6571642474,26.6524729891,26.6477878717,26.6431088804,26.6384360006,
379 26.6337692177,26.6291085171,26.6244538844,26.6198053051,26.6151627648,
380 26.6105262491,26.6058957438,26.6012712347,26.5966527074,26.592040148,
381 26.5874335422,26.5828328761,26.5782381356,26.5736493067,26.5690663756,
382 26.5644893285,26.5599181514,26.5553528306,26.5507933525,26.5462397032,
383 26.5416918693,26.5371498371,26.5326135931,26.5280831239,26.5235584158,
384 26.5190394557,26.5145262301,26.5100187257,26.5055169292,26.5010208275,
385 26.4965304073,26.4920456556,26.4875665593,26.4830931052,26.4786252805,
386 26.4741630721,26.4697064672,26.4652554529,26.4608100163,26.4563701447,
387 26.4519358254,26.4475070456,26.4430837927,26.4386660541,26.4342538172,
388 26.4298470695,26.4254457985,26.4210499918,26.4166596369,26.4122747215,
389 26.4078952332,26.4035211598,26.3991524891,26.3947892088,26.3904313068,
390 26.3860787709,26.3817315891,26.3773897493,26.3730532396,26.3687220479,
391 26.3643961623,26.360075571,26.3557602621,26.3514502237,26.3471454442,
392 26.3428459118,26.3385516148,26.3342625415,26.3299786803,26.3257000197,
393 26.3214265481,26.3171582539,26.3128951257,26.3086371522,26.3043843218,
394 26.3001366232,26.2958940452,26.2916565763,26.2874242055,26.2831969213,
395 26.2789747128,26.2747575687,26.2705454778,26.2663384293,26.2621364119,
396 26.2579394148,26.2537474269,26.2495604373,26.2453784351,26.2412014095,
397 26.2370293495,26.2328622446,26.2287000837,26.2245428563,26.2203905517,
398 26.2162431591,26.212100668,26.2079630678,26.2038303479,26.1997024978,
399 26.1955795069,26.1914613649,26.1873480613,26.1832395857,26.1791359278,
400 26.1750370772,26.1709430235,26.1668537567,26.1627692664,26.1586895424,
401 26.1546145745,26.1505443526,26.1464788667,26.1424181066,26.1383620622,
402 26.1343107237,26.1302640809,26.1262221239,26.1221848429,26.1181522279,
403 26.114124269,26.1101009565,26.1060822805,26.1020682313,26.098058799,
404 26.0940539741,26.0900537468,26.0860581075,26.0820670466,26.0780805544,
405 26.0740986214,26.070121238,26.0661483949,26.0621800824,26.0582162911,
406 26.0542570117,26.0503022347,26.0463519507,26.0424061505,26.0384648247,
407 26.0345279641,26.0305955593,26.0266676012,26.0227440806,26.0188249883,
408 26.0149103152,26.0110000522,26.0070941901,26.00319272,25.9992956327,
409 25.9954029194,25.9915145709,25.9876305784,25.983750933,25.9798756257,
410 25.9760046476,25.97213799,25.9682756441,25.9644176009,25.9605638518,
411 25.956714388,25.9528692009,25.9490282816,25.9451916216,25.9413592122,
412 25.9375310449,25.9337071109,25.9298874018,25.9260719091,25.9222606242,
413 25.9184535386,25.9146506439,25.9108519316,25.9070573933,25.9032670207,
414 25.8994808054
415 }
416 },
417 {
418 // Ri = 250k
419 -5,5,200,2001, {
420 214.806581677,214.650587712,214.494441388,214.338143449,214.181694635,
421 214.025095677,213.868347304,213.711450238,213.554405194,213.397212884,
422 213.239874013,213.082389282,212.924759385,212.766985013,212.60906685,
423 212.451005576,212.292801864,212.134456385,211.975969802,211.817342776,
424 211.658575961,211.499670005,211.340625555,211.181443251,211.022123727,
425 210.862667614,210.703075539,210.543348122,210.383485982,210.22348973,
426 210.063359973,209.903097317,209.742702359,209.582175694,209.421517913,
427 209.260729602,209.099811343,208.938763714,208.777587287,208.616282633,
428 208.454850316,208.293290899,208.131604938,207.969792986,207.807855593,
429 207.645793304,207.483606661,207.321296202,207.15886246,206.996305965,
430 206.833627244,206.67082682,206.507905211,206.344862933,206.181700497,
431 206.018418412,205.855017182,205.691497309,205.527859289,205.364103618,
432 205.200230785,205.036241278,204.872135582,204.707914176,204.543577538,
433 204.379126141,204.214560458,204.049880955,203.885088096,203.720182343,
434 203.555164155,203.390033984,203.224792285,203.059439505,202.893976089,
435 202.728402482,202.562719123,202.396926447,202.23102489,202.065014882,
436 201.898896852,201.732671223,201.56633842,201.399898861,201.233352963,
437 201.066701141,200.899943805,200.733081363,200.566114223,200.399042787,
438 200.231867455,200.064588626,199.897206695,199.729722054,199.562135094,
439 199.394446202,199.226655764,199.058764161,198.890771775,198.722678983,
440 198.554486159,198.386193678,198.217801909,198.04931122,197.880721977,
441 197.712034543,197.54324928,197.374366545,197.205386696,197.036310087,
442 196.86713707,196.697867994,196.528503206,196.359043053,196.189487877,
443 196.019838019,195.850093818,195.680255611,195.510323732,195.340298515,
444 195.170180288,194.999969382,194.829666122,194.659270832,194.488783835,
445 194.318205451,194.147535999,193.976775794,193.805925153,193.634984386,
446 193.463953805,193.292833719,193.121624434,192.950326255,192.778939486,
447 192.607464428,192.43590138,192.264250641,192.092512505,191.920687267,
448 191.74877522,191.576776653,191.404691857,191.232521118,191.060264721,
449 190.887922951,190.715496088,190.542984415,190.370388209,190.197707747,
450 190.024943305,189.852095157,189.679163575,189.50614883,189.33305119,
451 189.159870923,188.986608295,188.813263571,188.639837013,188.466328882,
452 188.292739439,188.119068941,187.945317645,187.771485807,187.597573681,
453 187.423581518,187.249509571,187.075358088,186.901127317,186.726817506,
454 186.552428899,186.377961741,186.203416274,186.028792738,185.854091375,
455 185.679312422,185.504456116,185.329522693,185.154512388,184.979425434,
456 184.804262062,184.629022504,184.453706988,184.278315742,184.102848994,
457 183.927306968,183.751689889,183.57599798,183.400231463,183.224390558,
458 183.048475484,182.872486461,182.696423704,182.520287429,182.344077852,
459 182.167795186,181.991439642,181.815011432,181.638510767,181.461937854,
460 181.285292902,181.108576118,180.931787707,180.754927872,180.577996819,
461 180.400994749,180.223921863,180.046778361,179.869564443,179.692280306,
462 179.514926148,179.337502164,179.16000855,178.982445499,178.804813204,
463 178.627111857,178.449341649,178.27150277,178.093595408,177.915619752,
464 177.737575989,177.559464305,177.381284884,177.203037911,177.024723568,
465 176.846342039,176.667893504,176.489378144,176.310796138,176.132147665,
466 175.953432902,175.774652027,175.595805214,175.416892639,175.237914476,
467 175.058870898,174.879762077,174.700588185,174.521349393,174.342045871,
468 174.162677786,173.983245308,173.803748604,173.624187839,173.444563181,
469 173.264874793,173.085122839,172.905307483,172.725428887,172.545487212,
470 172.365482621,172.185415272,172.005285324,171.825092937,171.644838268,
471 171.464521475,171.284142712,171.103702136,170.923199902,170.742636163,
472 170.562011074,170.381324785,170.20057745,170.019769219,169.838900242,
473 169.65797067,169.476980651,169.295930334,169.114819867,168.933649395,
474 168.752419065,168.571129024,168.389779415,168.208370384,168.026902072,
475 167.845374625,167.663788183,167.482142888,167.300438881,167.118676302,
476 166.936855292,166.754975989,166.573038531,166.391043057,166.208989703,
477 166.026878606,165.844709901,165.662483725,165.480200212,165.297859496,
478 165.115461711,164.933006988,164.750495462,164.567927263,164.385302523,
479 164.202621372,164.019883941,163.837090359,163.654240754,163.471335256,
480 163.288373991,163.105357088,162.922284672,162.739156871,162.555973809,
481 162.372735612,162.189442405,162.006094311,161.822691453,161.639233956,
482 161.455721941,161.27215553,161.088534844,160.904860006,160.721131134,
483 160.53734835,160.353511772,160.169621519,159.985677711,159.801680464,
484 159.617629896,159.433526125,159.249369267,159.065159438,158.880896753,
485 158.696581328,158.512213278,158.327792716,158.143319756,157.958794512,
486 157.774217097,157.589587623,157.404906201,157.220172944,157.035387963,
487 156.850551368,156.665663269,156.480723777,156.295733,156.110691048,
488 155.925598029,155.740454052,155.555259223,155.370013651,155.184717443,
489 154.999370704,154.813973541,154.62852606,154.443028365,154.257480563,
490 154.071882757,153.886235051,153.70053755,153.514790357,153.328993575,
491 153.143147306,152.957251652,152.771306717,152.5853126,152.399269404,
492 152.213177229,152.027036175,151.840846344,151.654607834,151.468320744,
493 151.281985175,151.095601225,150.909168991,150.722688573,150.536160067,
494 150.349583572,150.162959184,149.976287,149.789567117,149.60279963,
495 149.415984635,149.229122227,149.042212503,148.855255556,148.668251481,
496 148.481200372,148.294102323,148.106957428,147.919765781,147.732527473,
497 147.545242597,147.357911247,147.170533514,146.98310949,146.795639267,
498 146.608122935,146.420560586,146.232952311,146.045298199,145.857598342,
499 145.669852828,145.482061748,145.294225191,145.106343245,144.918416001,
500 144.730443545,144.542425968,144.354363356,144.166255797,143.97810338,
501 143.789906191,143.601664317,143.413377845,143.225046862,143.036671454,
502 142.848251708,142.659787708,142.471279541,142.282727292,142.094131047,
503 141.905490889,141.716806905,141.528079178,141.339307792,141.150492833,
504 140.961634383,140.772732527,140.583787347,140.394798927,140.20576735,
505 140.016692699,139.827575057,139.638414505,139.449211127,139.259965004,
506 139.070676217,138.88134485,138.691970983,138.502554697,138.313096073,
507 138.123595193,137.934052137,137.744466986,137.55483982,137.36517072,
508 137.175459765,136.985707035,136.79591261,136.60607657,136.416198993,
509 136.22627996,136.036319549,135.846317839,135.656274909,135.466190838,
510 135.276065704,135.085899585,134.895692559,134.705444705,134.5151561,
511 134.324826823,134.13445695,133.944046559,133.753595729,133.563104534,
512 133.372573054,133.182001365,132.991389543,132.800737666,132.61004581,
513 132.419314051,132.228542467,132.037731132,131.846880124,131.655989518,
514 131.46505939,131.274089817,131.083080873,130.892032635,130.700945177,
515 130.509818577,130.318652908,130.127448245,129.936204665,129.744922243,
516 129.553601052,129.362241169,129.170842668,128.979405623,128.78793011,
517 128.596416203,128.404863976,128.213273504,128.021644862,127.829978123,
518 127.638273363,127.446530654,127.254750072,127.062931691,126.871075583,
519 126.679181825,126.487250488,126.295281648,126.103275378,125.911231752,
520 125.719150844,125.527032727,125.334877475,125.142685163,124.950455862,
521 124.758189648,124.565886593,124.373546772,124.181170257,123.988757122,
522 123.796307442,123.603821288,123.411298735,123.218739857,123.026144726,
523 122.833513416,122.640846001,122.448142555,122.255403149,122.062627859,
524 121.869816757,121.676969918,121.484087414,121.291169319,121.098215706,
525 120.90522665,120.712202224,120.519142502,120.326047556,120.132917462,
526 119.939752292,119.746552121,119.553317022,119.360047069,119.166742336,
527 118.973402897,118.780028826,118.586620198,118.393177086,118.199699564,
528 118.006187707,117.81264159,117.619061286,117.42544687,117.231798417,
529 117.038116001,116.844399697,116.650649581,116.456865726,116.263048209,
530 116.069197103,115.875312486,115.68139443,115.487443014,115.293458311,
531 115.099440397,114.905389349,114.711305243,114.517188154,114.323038158,
532 114.128855333,113.934639754,113.740391499,113.546110644,113.351797266,
533 113.157451442,112.963073249,112.768662766,112.574220069,112.379745237,
534 112.185238347,111.990699479,111.796128709,111.601526117,111.406891782,
535 111.212225782,111.017528197,110.822799106,110.62803859,110.433246727,
536 110.238423599,110.043569285,109.848683866,109.653767423,109.458820038,
537 109.263841792,109.068832766,108.873793042,108.678722704,108.483621833,
538 108.288490512,108.093328825,107.898136855,107.702914687,107.507662403,
539 107.31238009,107.117067832,106.921725713,106.726353821,106.53095224,
540 106.335521058,106.14006036,105.944570235,105.749050771,105.553502054,
541 105.357924174,105.16231722,104.966681281,104.771016447,104.575322809,
542 104.379600457,104.183849483,103.98806998,103.792262038,103.596425752,
543 103.400561215,103.204668521,103.008747766,102.812799044,102.616822451,
544 102.420818085,102.224786042,102.028726421,101.832639321,101.63652484,
545 101.440383079,101.244214139,101.048018121,100.851795129,100.655545265,
546 100.459268634,100.26296534,100.06663549,99.8702791895,99.6738965474,
547 99.4774876719,99.2810526729,99.0845916608,98.8881047476,98.691592046,
548 98.4950536699,98.2984897344,98.1019003557,97.9052856512,97.7086457396,
549 97.5119807408,97.315290776,97.1185759679,96.9218364403,96.7250723187,
550 96.52828373,96.3314708025,96.1346336663,95.9377724527,95.7408872952,
551 95.5439783285,95.3470456894,95.1500895163,94.9531099497,94.7561071318,
552 94.5590812068,94.3620323212,94.1649606233,93.9678662638,93.7707493956,
553 93.5736101738,93.3764487561,93.1792653025,92.9820599756,92.7848329407,
554 92.5875843657,92.3903144214,92.1930232816,91.9957111228,91.7983781248,
555 91.6010244707,91.4036503465,91.2062559421,91.0088414506,90.8114070689,
556 90.6139529975,90.4164794409,90.2189866076,90.0214747103,89.823943966,
557 89.626394596,89.4288268263,89.2312408877,89.0336370159,88.8360154516,
558 88.6383764408,88.4407202349,88.243047091,88.045357272,87.8476510469,
559 87.6499286907,87.4521904852,87.2544367185,87.0566676858,86.8588836897,
560 86.6610850397,86.4632720534,86.2654450561,86.0676043814,85.8697503714,
561 85.6718833771,85.4740037586,85.2761118852,85.0782081364,84.8802929016,
562 84.6823665808,84.4844295847,84.2864823355,84.0885252669,83.8905588249,
563 83.6925834679,83.4945996672,83.2966079077,83.0986086881,82.9006025218,
564 82.7025899369,82.504571477,82.3065477019,82.1085191881,81.9104865291,
565 81.7124503365,81.5144112404,81.31636989,81.1183269543,80.9202831233,
566 80.7222391079,80.5241956415,80.3261534801,80.1281134038,79.9300762172,
567 79.7320427503,79.5340138598,79.3359904296,79.1379733722,78.9399636292,
568 78.7419621732,78.5439700078,78.3459881699,78.14801773,77.9500597938,
569 77.7521155034,77.5541860386,77.3562726184,77.1583765021,76.960498991,
570 76.7626414298,76.5648052081,76.3669917621,76.1692025763,75.971439185,
571 75.7737031742,75.5759961834,75.3783199075,75.1806760987,74.9830665686,
572 74.78549319,74.5879578994,74.3904626989,74.1930096588,73.9956009193,
573 73.7982386937,73.6009252702,73.4036630149,73.2064543742,73.0093018775,
574 72.8122081401,72.6151758657,72.4182078498,72.2213069825,72.0244762512,
575 71.8277187444,71.6310376545,71.4344362812,71.2379180349,71.0414864401,
576 70.8451451392,70.6488978956,70.4527485979,70.2567012634,70.0607600418,
577 69.8649292195,69.6692132231,69.4736166236,69.2781441408,69.0828006466,
578 68.8875911702,68.6925209014,68.4975951954,68.302819577,68.1081997447,
579 67.9137415753,67.7194511279,67.5253346485,67.3313985744,67.137649538,
580 66.9440943715,66.750740111,66.5575940006,66.3646634965,66.1719562709,
581 65.979480216,65.7872434478,65.5952543092,65.4035213744,65.2120534512,
582 65.0208595845,64.8299490593,64.6393314028,64.4490163873,64.2590140316,
583 64.0693346033,63.8799886194,63.6909868482,63.502340309,63.3140602728,
584 63.1261582616,62.9386460478,62.7515356528,62.5648393451,62.3785696378,
585 62.1927392856,62.0073612811,61.8224488501,61.6380154473,61.4540747498,
586 61.2706406511,61.0877272534,60.9053488602,60.7235199671,60.5422552522,
587 60.3615695659,60.1814779194,60.0019954732,59.8231375236,59.6449194893,
588 59.467356897,59.290465366,59.1142605922,58.9387583312,58.7639743808,
589 58.5899245626,58.4166247035,58.2440906157,58.0723380767,57.9013828089,
590 57.7312404584,57.5619265734,57.3934565824,57.2258457724,57.0591092663,
591 56.8932620005,56.7283187029,56.5642938699,56.4012017447,56.2390562951,
592 56.0778711918,55.9176597869,55.7584350933,55.6002097646,55.442996075,
593 55.2868059006,55.1316507015,54.9775415045,54.8244888866,54.67250296,
594 54.521593358,54.3717692215,54.2230391876,54.0754113787,53.928893393,
595 53.7834922966,53.6392146163,53.4960663344,53.3540528842,53.213179147,
596 53.0734494507,52.9348675694,52.7974367242,52.6611595853,52.5260382756,
597 52.392074375,52.2592689262,52.1276224411,51.9971349089,51.8678058046,
598 51.7396340988,51.6126182678,51.4867563052,51.3620457335,51.2384836172,
599 51.1160665754,50.9947907962,50.8746520501,50.7556457053,50.6377667424,
600 50.5210097692,50.4053690366,50.2908384541,50.177411605,50.0650817627,
601 49.953841906,49.8436847348,49.7346026858,49.626587948,49.5196324774,
602 49.4137280128,49.30886609,49.2050380567,49.1022350863,49.0004481925,
603 48.899668242,48.7998859685,48.7010919851,48.6032767968,48.5064308127,
604 48.4105443574,48.3156076826,48.2216109775,48.1285443795,48.0363979842,
605 47.9451618546,47.8548260307,47.7653805379,47.6768153954,47.5891206244,
606 47.5022862551,47.4163023342,47.3311589317,47.2468461468,47.1633541147,
607 47.0806730113,46.9987930595,46.9177045334,46.8373977633,46.7578631402,
608 46.6790911195,46.6010722248,46.5237970519,46.4472562712,46.3714406313,
609 46.2963409615,46.2219481742,46.1482532672,46.0752473257,46.0029215242,
610 45.9312671284,45.8602754958,45.789938078,45.7202464213,45.6511921675,
611 45.582767055,45.5149629195,45.4477716941,45.3811854103,45.3151961979,
612 45.249796285,45.1849779988,45.1207337645,45.0570561064,44.9939376466,
613 44.9313711053,44.8693493005,44.8078651471,44.746911657,44.686481938,
614 44.6265691936,44.567166722,44.5082679158,44.449866261,44.391955336,
615 44.3345288112,44.2775804481,44.2211040981,44.1650937017,44.1095432878,
616 44.0544469725,43.9997989584,43.9455935331,43.8918250688,43.8384880208,
617 43.7855769268,43.7330864057,43.6810111566,43.6293459579,43.5780856658,
618 43.5272252138,43.4767596114,43.426683943,43.3769933668,43.3276831139,
619 43.2787484874,43.230184861,43.181987678,43.1341524507,43.0866747587,
620 43.0395502487,42.9927746327,42.9463436875,42.9002532535,42.8544992337,
621 42.8090775929,42.7639843566,42.7192156101,42.6747674974,42.6306362206,
622 42.5868180387,42.5433092665,42.5001062744,42.4572054868,42.4146033815,
623 42.3722964889,42.3302813911,42.2885547209,42.2471131613,42.2059534443,
624 42.1650723503,42.1244667073,42.0841333903,42.0440693199,42.0042714625,
625 41.9647368285,41.9254624723,41.8864454915,41.8476830258,41.8091722568,
626 41.7709104067,41.7328947382,41.6951225536,41.6575911941,41.6202980392,
627 41.5832405061,41.5464160489,41.5098221582,41.4734563605,41.4373162174,
628 41.4013993251,41.3657033141,41.3302258481,41.294964624,41.2599173708,
629 41.2250818496,41.1904558528,41.1560372035,41.1218237553,41.0878133915,
630 41.0540040246,41.0203935961,40.9869800759,40.9537614617,40.9207357786,
631 40.8879010787,40.8552554409,40.8227969699,40.7905237962,40.7584340756,
632 40.7265259888,40.694797741,40.6632475612,40.6318737025,40.6006744409,
633 40.5696480755,40.5387929281,40.5081073423,40.477589684,40.4472383402,
634 40.4170517192,40.3870282502,40.3571663827,40.3274645866,40.2979213512,
635 40.2685351859,40.2393046187,40.210228197,40.1813044866,40.1525320716,
636 40.1239095543,40.0954355544,40.0671087095,40.0389276741,40.0108911199,
637 39.982997735,39.955246224,39.9276353079,39.9001637232,39.8728302225,
638 39.8456335736,39.8185725594,39.7916459781,39.7648526423,39.7381913793,
639 39.7116610306,39.6852604519,39.6589885127,39.6328440961,39.6068260988,
640 39.5809334306,39.5551650145,39.5295197862,39.5039966942,39.4785946995,
641 39.4533127753,39.4281499069,39.4031050918,39.3781773388,39.3533656688,
642 39.3286691137,39.304086717,39.2796175331,39.2552606273,39.2310150758,
643 39.2068799653,39.1828543931,39.1589374668,39.1351283041,39.1114260327,
644 39.0878297902,39.064338724,39.0409519911,39.0176687579,38.9944882003,
645 38.9714095031,38.9484318604,38.9255544753,38.9027765596,38.8800973337,
646 38.8575160268,38.8350318765,38.8126441286,38.7903520373,38.7681548648,
647 38.7460518814,38.7240423652,38.7021256022,38.6803008859,38.6585675176,
648 38.636924806,38.6153720669,38.5939086239,38.5725338073,38.5512469547,
649 38.5300474107,38.5089345267,38.4879076609,38.4669661783,38.4461094505,
650 38.4253368556,38.4046477781,38.384041609,38.3635177454,38.3430755908,
651 38.3227145546,38.3024340525,38.2822335058,38.2621123421,38.2420699944,
652 38.2221059018,38.2022195088,38.1824102656,38.1626776278,38.1430210566,
653 38.1234400185,38.1039339853,38.0845024341,38.065144847,38.0458607114,
654 38.0266495197,38.0075107692,37.9884439622,37.9694486057,37.9505242119,
655 37.9316702972,37.912886383,37.8941719953,37.8755266647,37.8569499261,
656 37.838441319,37.8200003873,37.8016266793,37.7833197474,37.7650791485,
657 37.7469044434,37.7287951972,37.7107509792,37.6927713625,37.6748559244,
658 37.6570042459,37.6392159121,37.621490512,37.6038276382,37.5862268871,
659 37.568687859,37.5512101577,37.5337933905,37.5164371687,37.4991411068,
660 37.4819048228,37.4647279384,37.4476100786,37.4305508715,37.4135499491,
661 37.3966069463,37.3797215014,37.3628932558,37.3461218542,37.3294069446,
662 37.3127481779,37.296145208,37.2795976922,37.2631052905,37.2466676661,
663 37.2302844849,37.2139554159,37.197680131,37.1814583048,37.1652896148,
664 37.1491737414,37.1331103675,37.1170991789,37.1011398641,37.0852321142,
665 37.069375623,37.0535700867,37.0378152045,37.0221106777,37.0064562103,
666 36.990851509,36.9752962825,36.9597902425,36.9443331026,36.9289245791,
667 36.9135643906,36.8982522581,36.8829879046,36.8677710558,36.8526014395,
668 36.8374787856,36.8224028263,36.8073732962,36.7923899319,36.7774524719,
669 36.7625606573,36.747714231,36.7329129381,36.7181565255,36.7034447426,
670 36.6887773404,36.6741540721,36.6595746928,36.6450389596,36.6305466316,
671 36.6160974695,36.6016912363,36.5873276967,36.5730066171,36.5587277661,
672 36.5444909137,36.530295832,36.5161422947,36.5020300775,36.4879589576,
673 36.473928714,36.4599391274,36.4459899804,36.4320810569,36.4182121427,
674 36.4043830253,36.3905934937,36.3768433384,36.3631323519,36.3494603278,
675 36.3358270615,36.32223235,36.3086759918,36.2951577868,36.2816775364,
676 36.2682350438,36.2548301133,36.2414625508,36.2281321637,36.2148387608,
677 36.2015821522,36.1883621497,36.1751785661,36.1620312159,36.1489199148,
678 36.1358444799,36.1228047297,36.1098004839,36.0968315636,36.0838977911,
679 36.0709989901,36.0581349856,36.0453056038,36.0325106721,36.0197500193,
680 36.0070234752,35.9943308711,35.9816720393,35.9690468132,35.9564550278,
681 35.9438965189,35.9313711235,35.9188786799,35.9064190275,35.8939920068,
682 35.8815974594,35.869235228,35.8569051565,35.8446070897,35.8323408738,
683 35.8201063558,35.8079033838,35.7957318069,35.7835914756,35.771482241,
684 35.7594039553,35.747356472,35.7353396454,35.7233533306,35.7113973841,
685 35.6994716631,35.6875760259,35.6757103316,35.6638744405,35.6520682136,
686 35.640291513,35.6285442016,35.6168261434,35.6051372032,35.5934772466,
687 35.5818461403,35.5702437517,35.5586699493,35.5471246023,35.5356075808,
688 35.5241187557,35.512657999,35.5012251833,35.489820182,35.4784428696,
689 35.4670931211,35.4557708126,35.4444758209,35.4332080234,35.4219672987,
690 35.4107535258,35.3995665848,35.3884063562,35.3772727218,35.3661655635,
691 35.3550847646,35.3440302088,35.3330017805,35.321999365,35.3110228483,
692 35.300072117,35.2891470586,35.2782475612,35.2673735136,35.2565248054,
693 35.2457013268,35.2349029688,35.2241296228,35.2133811812,35.2026575371,
694 35.1919585838,35.1812842159,35.1706343282,35.1600088162,35.1494075763,
695 35.1388305053,35.1282775008,35.1177484608,35.1072432842,35.0967618704,
696 35.0863041192,35.0758699315,35.0654592084,35.0550718516,35.0447077637,
697 35.0343668477,35.0240490072,35.0137541462,35.0034821697,34.9932329829,
698 34.9830064918,34.9728026027,34.9626212228,34.9524622596,34.9423256212,
699 34.9322112164,34.9221189543,34.9120487447,34.9020004979,34.8919741248,
700 34.8819695366,34.8719866453,34.8620253633,34.8520856033,34.842167279,
701 34.8322703041,34.8223945932,34.8125400611,34.8027066232,34.7928941955,
702 34.7831026943,34.7733320366,34.7635821397,34.7538529214,34.7441443,
703 34.7344561944,34.7247885237,34.7151412076,34.7055141664,34.6959073207,
704 34.6863205914,34.6767539002,34.6672071689,34.6576803201,34.6481732765,
705 34.6386859615,34.6292182987,34.6197702123,34.6103416268,34.6009324673,
706 34.5915426592,34.5821721282,34.5728208006,34.5634886031,34.5541754628,
707 34.544881307,34.5356060638,34.5263496612,34.517112028,34.5078930933,
708 34.4986927864,34.4895110373,34.4803477761,34.4712029334,34.4620764403,
709 34.4529682279,34.4438782282,34.4348063732,34.4257525953,34.4167168273,
710 34.4076990026,34.3986990546,34.3897169172,34.3807525248,34.3718058119,
711 34.3628767135,34.353965165,34.3450711019,34.3361944604,34.3273351768,
712 34.3184931877,34.3096684302,34.3008608417,34.2920703598,34.2832969226,
713 34.2745404684,34.2658009359,34.2570782641,34.2483723923,34.2396832601,
714 34.2310108075,34.2223549748,34.2137157025,34.2050929316,34.1964866032,
715 34.1878966587,34.1793230401,34.1707656894,34.1622245491,34.1536995617,
716 34.1451906704,34.1366978184,34.1282209493,34.1197600069,34.1113149355,
717 34.1028856794,34.0944721833,34.0860743924,34.0776922518,34.0693257072,
718 34.0609747043,34.0526391894,34.0443191087,34.0360144089,34.027725037,
719 34.0194509401,34.0111920657,34.0029483616,33.9947197757,33.9865062562,
720 33.9783077517,33.970124211,33.9619555829,33.9538018168,33.9456628623,
721 33.937538669,33.929429187,33.9213343666,33.9132541583,33.9051885128,
722 33.8971373811,33.8891007144,33.8810784643,33.8730705825,33.8650770208,
723 33.8570977314,33.8491326669,33.8411817798,33.833245023,33.8253223496,
724 33.8174137129,33.8095190666,33.8016383643,33.7937715601,33.7859186082,
725 33.7780794631,33.7702540793,33.7624424119,33.7546444159,33.7468600466,
726 33.7390892595,33.7313320104,33.7235882552,33.7158579501,33.7081410514,
727 33.7004375158,33.6927472999,33.6850703608,33.6774066556,33.6697561417,
728 33.6621187768,33.6544945186,33.646883325,33.6392851544,33.6316999649,
729 33.6241277153,33.6165683642,33.6090218706,33.6014881937,33.5939672928,
730 33.5864591274,33.5789636572,33.5714808422,33.5640106423,33.5565530179,
731 33.5491079294,33.5416753374,33.5342552028,33.5268474865,33.5194521497,
732 33.5120691538,33.5046984602,33.4973400307,33.489993827,33.4826598114,
733 33.475337946,33.4680281931,33.4607305153,33.4534448754,33.4461712362,
734 33.4389095608,33.4316598125,33.4244219546,33.4171959506,33.4099817644,
735 33.4027793597,33.3955887006,33.3884097513,33.3812424763,33.3740868399,
736 33.3669428069,33.3598103421,33.3526894105,33.3455799772,33.3384820076,
737 33.3313954671,33.3243203212,33.3172565359,33.3102040768,33.3031629102,
738 33.2961330022,33.2891143192,33.2821068276,33.2751104942,33.2681252856,
739 33.2611511689,33.254188111,33.2472360793,33.2402950411,33.2333649639,
740 33.2264458153,33.2195375632,33.2126401754,33.20575362,33.1988778652,
741 33.1920128793,33.1851586308,33.1783150883,33.1714822206,33.1646599965,
742 33.157848385,33.1510473553,33.1442568766,33.1374769184,33.1307074501,
743 33.1239484414,33.1171998621,33.1104616821,33.1037338714,33.0970164003,
744 33.090309239,33.0836123579,33.0769257276,33.0702493187,33.063583102,
745 33.0569270484,33.050281129,33.0436453148,33.0370195773,33.0304038877,
746 33.0237982176,33.0172025386,33.0106168224,33.004041041,32.9974751662,
747 32.9909191702,32.9843730252,32.9778367035,32.9713101775,32.9647934199,
748 32.9582864031,32.9517891002,32.9453014838,32.938823527,32.932355203,
749 32.9258964848,32.919447346,32.9130077598,32.9065776998,32.9001571398,
750 32.8937460533,32.8873444143,32.8809521968,32.8745693748,32.8681959225,
751 32.8618318142,32.8554770243,32.8491315272,32.8427952975,32.8364683099,
752 32.8301505393,32.8238419604,32.8175425484,32.8112522782,32.8049711251,
753 32.7986990644,32.7924360713,32.7861821216,32.7799371906,32.7737012541,
754 32.7674742879,32.7612562677,32.7550471697,32.7488469698,32.7426556442,
755 32.7364731692,32.730299521,32.7241346761,32.717978611,32.7118313024,
756 32.705692727,32.6995628615,32.6934416828,32.6873291679,32.6812252939,
757 32.6751300379,32.6690433772,32.6629652891,32.656895751,32.6508347404,
758 32.6447822349,32.6387382122,32.6327026501,32.6266755264,32.620656819,
759 32.614646506,32.6086445654,32.6026509754,32.5966657144,32.5906887606,
760 32.5847200926,32.5787596887,32.5728075277,32.5668635881,32.5609278488,
761 32.5550002886,32.5490808863,32.5431696211,32.537266472,32.5313714181,
762 32.5254844387,32.519605513,32.5137346206,32.5078717408,32.5020168532,
763 32.4961699374,32.4903309731,32.4844999401,32.4786768182,32.4728615874,
764 32.4670542276,32.4612547189,32.4554630416,32.4496791757,32.4439031016,
765 32.4381347996,32.4323742503,32.426621434,32.4208763314,32.4151389231,
766 32.4094091899,32.4036871126,32.3979726719,32.3922658489,32.3865666246,
767 32.38087498,32.3751908962,32.3695143546,32.3638453363,32.3581838227,
768 32.3525297952,32.3468832354,32.3412441247,32.3356124448,32.3299881773,
769 32.3243713041,32.3187618069,32.3131596676,32.3075648682,32.3019773906,
770 32.296397217,32.2908243294,32.2852587101,32.2797003414,32.2741492056,
771 32.268605285,32.2630685622,32.2575390196,32.2520166399,32.2465014056,
772 32.2409932995,32.2354923044,32.229998403,32.2245115783,32.2190318133,
773 32.2135590908,32.208093394,32.202634706,32.1971830101,32.1917382894,
774 32.1863005272,32.1808697069,32.175445812,32.170028826,32.1646187322,
775 32.1592155144,32.1538191563,32.1484296414,32.1430469536,32.1376710768,
776 32.1323019947,32.1269396913,32.1215841506,32.1162353567,32.1108932936,
777 32.1055579455,32.1002292966,32.0949073313,32.0895920337,32.0842833883,
778 32.0789813795,32.0736859917,32.0683972096,32.0631150177,32.0578394006,
779 32.052570343,32.0473078297,32.0420518455,32.0368023751,32.0315594036,
780 32.0263229158,32.0210928968,32.0158693316,32.0106522053,32.0054415031,
781 32.0002372101,31.9950393117,31.989847793,31.9846626396,31.9794838367,
782 31.9743113698,31.9691452245,31.9639853862,31.9588318406,31.9536845733,
783 31.9485435701,31.9434088165,31.9382802985,31.9331580018,31.9280419124,
784 31.9229320162,31.9178282991,31.9127307472,31.9076393466,31.9025540833,
785 31.8974749435,31.8924019134,31.8873349793,31.8822741275,31.8772193443,
786 31.8721706161,31.8671279293,31.8620912705,31.857060626,31.8520359826,
787 31.8470173268,31.8420046452,31.8369979246,31.8319971517,31.8270023133,
788 31.8220133962,31.8170303872,31.8120532733,31.8070820415,31.8021166787,
789 31.797157172,31.7922035084,31.7872556751,31.7823136593,31.7773774481,
790 31.7724470288,31.7675223886,31.762603515,31.7576903953,31.7527830168,
791 31.7478813671,31.7429854336,31.7380952039,31.7332106655,31.728331806,
792 31.7234586132,31.7185910746,31.713729178,31.7088729112,31.7040222619,
793 31.6991772181,31.6943377676,31.6895038984,31.6846755983,31.6798528554,
794 31.6750356577,31.6702239933,31.6654178504,31.660617217,31.6558220813,
795 31.6510324316,31.6462482561,31.6414695432,31.636696281,31.6319284582,
796 31.6271660629,31.6224090837,31.6176575091,31.6129113276,31.6081705277,
797 31.6034350979,31.5987050271,31.5939803036,31.5892609164,31.5845468541,
798 31.5798381054,31.5751346592,31.5704365043,31.5657436296,31.5610560239,
799 31.5563736762,31.5516965754,31.5470247107,31.5423580709,31.5376966452,
800 31.5330404227,31.5283893925,31.5237435438,31.5191028657,31.5144673476,
801 31.5098369787,31.5052117483,31.5005916457,31.4959766602,31.4913667814,
802 31.4867619986,31.4821623013,31.477567679,31.4729781212,31.4683936175,
803 31.4638141574,31.4592397306,31.4546703267,31.4501059355,31.4455465465,
804 31.4409921497,31.4364427347,31.4318982914,31.4273588096,31.4228242792,
805 31.4182946901,31.4137700321,31.4092502953,31.4047354697,31.4002255452,
806 31.395720512,31.39122036,31.3867250795,31.3822346605,31.3777490932,
807 31.3732683678,31.3687924745,31.3643214037,31.3598551455,31.3553936903,
808 31.3509370284,31.3464851502,31.3420380461,31.3375957065,31.3331581218,
809 31.3287252826,31.3242971794,31.3198738027,31.315455143,31.311041191,
810 31.3066319372,31.3022273724,31.2978274871,31.2934322722,31.2890417183,
811 31.2846558161,31.2802745565,31.2758979303,31.2715259284,31.2671585414,
812 31.2627957605,31.2584375764,31.2540839802,31.2497349627,31.245390515,
813 31.2410506282,31.2367152932,31.2323845011,31.228058243,31.2237365101,
814 31.2194192934,31.2151065843,31.2107983738,31.2064946532,31.2021954137,
815 31.1979006466,31.1936103433,31.189324495,31.1850430931,31.180766129,
816 31.176493594,31.1722254796,31.1679617772,31.1637024784,31.1594475745,
817 31.1551970572,31.1509509179,31.1467091483,31.1424717399,31.1382386843,
818 31.1340099732,31.1297855982,31.1255655511,31.1213498235,31.1171384071,
819 31.1129312938,31.1087284753,31.1045299434,31.1003356899,31.0961457067,
820 31.0919599856
821 }
822 }
823 };
0 // generated by ../../tools/tube_transfer.py
1 // tube: 6DJ8
2 // plate current function: triode
3 // mu: 28
4 // kx: 1.3
5 // kg1: 330
6 // kp: 320
7 // kvb: 300
8
9 table1d_imp<2001> tubetable_6DJ8[2] =
10 {
11 {
12 // Ri = 68k
13 -5,5,200,2001, {
14 137.512728867,137.399223264,137.285690251,137.17212984,137.058542039,
15 136.944926859,136.831284308,136.717614396,136.603917133,136.490192528,
16 136.37644059,136.262661328,136.148854752,136.035020871,135.921159694,
17 135.80727123,135.693355487,135.579412475,135.465442203,135.351444679,
18 135.237419911,135.12336791,135.009288682,134.895182238,134.781048584,
19 134.66688773,134.552699684,134.438484454,134.324242049,134.209972477,
20 134.095675745,133.981351862,133.867000836,133.752622675,133.638217387,
21 133.523784979,133.40932546,133.294838836,133.180325116,133.065784308,
22 132.951216418,132.836621455,132.721999425,132.607350337,132.492674197,
23 132.377971012,132.263240791,132.148483539,132.033699265,131.918887974,
24 131.804049675,131.689184374,131.574292077,131.459372792,131.344426526,
25 131.229453284,131.114453074,130.999425902,130.884371775,130.769290699,
26 130.654182681,130.539047726,130.423885842,130.308697033,130.193481308,
27 130.078238671,129.962969128,129.847672686,129.732349351,129.616999128,
28 129.501622024,129.386218043,129.270787192,129.155329476,129.039844901,
29 128.924333473,128.808795197,128.693230078,128.577638121,128.462019333,
30 128.346373717,128.230701281,128.115002027,127.999275963,127.883523091,
31 127.767743419,127.65193695,127.536103689,127.420243641,127.304356811,
32 127.188443204,127.072502824,126.956535675,126.840541763,126.724521091,
33 126.608473664,126.492399486,126.376298562,126.260170896,126.144016492,
34 126.027835354,125.911627486,125.795392892,125.679131576,125.562843542,
35 125.446528794,125.330187335,125.213819169,125.0974243,124.981002732,
36 124.864554467,124.74807951,124.631577864,124.515049532,124.398494517,
37 124.281912824,124.165304454,124.048669411,123.932007699,123.815319319,
38 123.698604276,123.581862572,123.465094209,123.348299192,123.231477521,
39 123.114629201,122.997754234,122.880852622,122.763924367,122.646969473,
40 122.529987942,122.412979775,122.295944976,122.178883547,122.061795488,
41 121.944680804,121.827539496,121.710371565,121.593177014,121.475955845,
42 121.358708059,121.241433658,121.124132644,121.006805019,120.889450784,
43 120.772069941,120.654662491,120.537228435,120.419767776,120.302280513,
44 120.18476665,120.067226186,119.949659123,119.832065462,119.714445204,
45 119.596798349,119.4791249,119.361424857,119.24369822,119.12594499,
46 119.008165168,118.890358755,118.772525751,118.654666156,118.536779972,
47 118.418867198,118.300927835,118.182961883,118.064969342,117.946950213,
48 117.828904495,117.710832189,117.592733295,117.474607812,117.356455741,
49 117.238277081,117.120071832,117.001839993,116.883581565,116.765296547,
50 116.646984939,116.52864674,116.410281948,116.291890565,116.173472589,
51 116.055028019,115.936556854,115.818059094,115.699534738,115.580983784,
52 115.462406232,115.343802081,115.225171329,115.106513975,114.987830018,
53 114.869119456,114.750382289,114.631618514,114.51282813,114.394011136,
54 114.27516753,114.15629731,114.037400475,113.918477022,113.799526951,
55 113.680550258,113.561546942,113.442517002,113.323460434,113.204377236,
56 113.085267407,112.966130945,112.846967846,112.727778109,112.608561731,
57 112.489318709,112.370049041,112.250752725,112.131429757,112.012080135,
58 111.892703857,111.773300918,111.653871317,111.53441505,111.414932115,
59 111.295422508,111.175886226,111.056323266,110.936733624,110.817117298,
60 110.697474283,110.577804577,110.458108176,110.338385076,110.218635274,
61 110.098858766,109.979055549,109.859225617,109.739368969,109.619485599,
62 109.499575504,109.379638679,109.259675121,109.139684826,109.019667789,
63 108.899624005,108.779553471,108.659456182,108.539332134,108.419181322,
64 108.299003742,108.178799389,108.058568258,107.938310344,107.818025643,
65 107.697714149,107.577375859,107.457010766,107.336618867,107.216200154,
66 107.095754624,106.975282272,106.854783091,106.734257077,106.613704224,
67 106.493124526,106.372517979,106.251884576,106.131224312,106.010537181,
68 105.889823177,105.769082295,105.648314528,105.52751987,105.406698316,
69 105.28584986,105.164974495,105.044072215,104.923143013,104.802186884,
70 104.681203821,104.560193818,104.439156867,104.318092963,104.197002099,
71 104.075884268,103.954739463,103.833567678,103.712368905,103.591143138,
72 103.46989037,103.348610593,103.2273038,103.105969985,102.98460914,
73 102.863221257,102.74180633,102.62036435,102.498895311,102.377399205,
74 102.255876023,102.134325759,102.012748405,101.891143952,101.769512394,
75 101.647853721,101.526167926,101.404455002,101.282714939,101.16094773,
76 101.039153366,100.917331839,100.795483141,100.673607263,100.551704197,
77 100.429773934,100.307816465,100.185831783,100.063819877,99.9417807401,
78 99.8197143622,99.6976207349,99.575499849,99.4533516955,99.3311762653,
79 99.2089735491,99.0867435378,98.964486222,98.8422015924,98.7198896394,
80 98.5975503536,98.4751837255,98.3527897454,98.2303684035,98.1079196902,
81 97.9854435957,97.86294011,97.7404092232,97.6178509253,97.4952652063,
82 97.3726520559,97.250011464,97.1273434204,97.0046479148,96.8819249367,
83 96.7591744756,96.6363965212,96.5135910627,96.3907580897,96.2678975913,
84 96.1450095569,96.0220939755,95.8991508364,95.7761801285,95.6531818408,
85 95.5301559623,95.4071024818,95.2840213882,95.1609126701,95.0377763163,
86 94.9146123152,94.7914206556,94.6682013258,94.5449543144,94.4216796095,
87 94.2983771996,94.1750470729,94.0516892175,93.9283036216,93.8048902731,
88 93.6814491601,93.5579802705,93.4344835922,93.3109591128,93.1874068203,
89 93.0638267021,92.940218746,92.8165829395,92.6929192701,92.5692277251,
90 92.4455082919,92.3217609579,92.1979857102,92.0741825361,91.9503514226,
91 91.8264923567,91.7026053255,91.5786903159,91.4547473147,91.3307763088,
92 91.2067772848,91.0827502295,90.9586951294,90.8346119711,90.7105007411,
93 90.5863614258,90.4621940116,90.3379984848,90.2137748316,90.0895230382,
94 89.9652430908,89.8409349754,89.7165986779,89.5922341844,89.4678414807,
95 89.3434205527,89.218971386,89.0944939665,88.9699882796,88.8454543111,
96 88.7208920464,88.596301471,88.4716825703,88.3470353296,88.2223597342,
97 88.0976557693,87.9729234202,87.8481626718,87.7233735093,87.5985559176,
98 87.4737098817,87.3488353864,87.2239324165,87.0990009569,86.9740409921,
99 86.8490525069,86.7240354858,86.5989899134,86.4739157741,86.3488130523,
100 86.2236817325,86.0985217988,85.9733332355,85.8481160269,85.7228701571,
101 85.5975956101,85.47229237,85.3469604207,85.2215997461,85.0962103302,
102 84.9707921567,84.8453452094,84.719869472,84.5943649281,84.4688315614,
103 84.3432693553,84.2176782934,84.092058359,83.9664095357,83.8407318067,
104 83.7150251553,83.5892895648,83.4635250183,83.337731499,83.2119089899,
105 83.0860574742,82.9601769347,82.8342673545,82.7083287164,82.5823610033,
106 82.456364198,82.3303382832,82.2042832416,82.078199056,81.9520857088,
107 81.8259431828,81.6997714604,81.5735705241,81.4473403564,81.3210809396,
108 81.1947922561,81.0684742883,80.9421270183,80.8157504285,80.6893445011,
109 80.5629092181,80.4364445617,80.309950514,80.1834270571,80.0568741728,
110 79.9302918433,79.8036800504,79.677038776,79.550368002,79.4236677102,
111 79.2969378824,79.1701785004,79.0433895459,78.9165710006,78.7897228462,
112 78.6628450643,78.5359376366,78.4090005446,78.2820337698,78.1550372939,
113 78.0280110983,77.9009551645,77.7738694739,77.6467540081,77.5196087483,
114 77.3924336761,77.2652287728,77.1379940197,77.0107293981,76.8834348895,
115 76.756110475,76.6287561361,76.5013718539,76.3739576098,76.2465133849,
116 76.1190391605,75.9915349179,75.8640006383,75.7364363029,75.6088418928,
117 75.4812173894,75.3535627738,75.2258780272,75.0981631308,74.9704180658,
118 74.8426428134,74.7148373548,74.5870016713,74.459135744,74.3312395542,
119 74.203313083,74.0753563118,73.9473692218,73.8193517943,73.6913040105,
120 73.5632258517,73.4351172993,73.3069783346,73.178808939,73.0506090938,
121 72.9223787804,72.7941179804,72.6658266751,72.537504846,72.4091524748,
122 72.2807695429,72.1523560319,72.0239119235,71.8954371994,71.7669318413,
123 71.6383958309,71.5098291501,71.3812317808,71.2526037048,71.1239449041,
124 70.9952553608,70.866535057,70.7377839747,70.6090020962,70.4801894039,
125 70.3513458799,70.2224715068,70.0935662671,69.9646301433,69.835663118,
126 69.706665174,69.5776362942,69.4485764614,69.3194856586,69.190363869,
127 69.0612110757,68.932027262,68.8028124113,68.6735665071,68.544289533,
128 68.4149814728,68.2856423104,68.1562720296,68.0268706146,67.8974380496,
129 67.767974319,67.6384794072,67.508953299,67.379395979,67.2498074323,
130 67.1201876439,66.990536599,66.8608542831,66.7311406816,66.6013957805,
131 66.4716195655,66.3418120229,66.2119731387,66.0821028996,65.9522012923,
132 65.8222683035,65.6923039203,65.5623081301,65.4322809203,65.3022222787,
133 65.1721321933,65.0420106521,64.9118576437,64.7816731566,64.65145718,
134 64.5212097028,64.3909307146,64.2606202051,64.1302781642,63.9999045824,
135 63.86949945,63.7390627581,63.6085944978,63.4780946606,63.3475632383,
136 63.2170002231,63.0864056074,62.955779384,62.8251215463,62.6944320876,
137 62.563711002,62.4329582837,62.3021739275,62.1713579283,62.0405102818,
138 61.9096309838,61.7787200307,61.6477774192,61.5168031466,61.3857972106,
139 61.2547596093,61.1236903414,60.9925894061,60.8614568029,60.7302925321,
140 60.5990965942,60.4678689907,60.3366097231,60.205318794,60.0739962062,
141 59.9426419632,59.8112560693,59.6798385291,59.5483893481,59.4169085323,
142 59.2853960884,59.1538520239,59.0222763469,58.8906690661,58.7590301912,
143 58.6273597325,58.4956577011,58.3639241087,58.2321589683,58.1003622931,
144 57.9685340977,57.8366743971,57.7047832076,57.5728605462,57.4409064308,
145 57.3089208804,57.1769039148,57.0448555549,56.9127758226,56.7806647409,
146 56.6485223339,56.5163486267,56.3841436456,56.251907418,56.1196399725,
147 55.9873413389,55.8550115484,55.7226506333,55.5902586273,55.4578355654,
148 55.3253814839,55.1928964206,55.0603804149,54.9278335073,54.7952557401,
149 54.6626471571,54.5300078037,54.3973377269,54.2646369754,54.1319055996,
150 53.9991436517,53.8663511857,53.7335282574,53.6006749245,53.4677912468,
151 53.3348772861,53.2019331059,53.0689587724,52.9359543534,52.8029199192,
152 52.6698555425,52.5367612981,52.4036372633,52.2704835179,52.1373001442,
153 52.0040872271,51.8708448542,51.7375731158,51.6042721052,51.4709419183,
154 51.3375826542,51.204194415,51.070777306,50.9373314355,50.8038569154,
155 50.6703538609,50.5368223907,50.4032626271,50.2696746961,50.1360587275,
156 50.0024148551,49.8687432167,49.7350439541,49.6013172136,49.4675631456,
157 49.3337819053,49.1999736524,49.0661385513,48.9322767715,48.7983884873,
158 48.6644738783,48.5305331297,48.3965664318,48.2625739808,48.1285559787,
159 47.9945126336,47.8604441597,47.7263507774,47.592232714,47.4580902033,
160 47.3239234861,47.1897328106,47.0555184321,46.9212806137,46.7870196261,
161 46.6527357484,46.5184292679,46.3841004803,46.2497496903,46.1153772119,
162 45.9809833681,45.846568492,45.7121329263,45.5776770243,45.4432011498,
163 45.3087056776,45.1741909936,45.0396574956,44.9051055933,44.7705357088,
164 44.635948277,44.5013437459,44.3667225771,44.2320852465,44.0974322441,
165 43.962764075,43.8280812598,43.6933843349,43.5586738531,43.4239503843,
166 43.2892145156,43.1544668524,43.0197080186,42.8849386573,42.7501594316,
167 42.6153710249,42.4805741417,42.3457695087,42.2109578746,42.0761400117,
168 41.9413167163,41.8064888093,41.6716571374,41.5368225735,41.401986018,
169 41.2671483992,41.1323106748,40.9974738322,40.8626388899,40.7278068984,
170 40.5929789412,40.4581561358,40.3233396351,40.1885306281,40.0537303414,
171 39.9189400403,39.78416103,39.6493946568,39.5146423098,39.3799054219,
172 39.2451854712,39.1104839826,38.9758025293,38.8411427342,38.7065062715,
173 38.5718948684,38.4373103067,38.3027544245,38.1682291179,38.0337363429,
174 37.8992781174,37.7648565227,37.6304737057,37.4961318809,37.3618333323,
175 37.2275804158,37.093375561,36.9592212736,36.8251201375,36.6910748171,
176 36.55708806,36.4231626987,36.2893016539,36.1555079361,36.0217846488,
177 35.8881349906,35.7545622582,35.6210698488,35.4876612628,35.3543401068,
178 35.2211100958,35.0879750567,34.9549389303,34.822005775,34.6891797689,
179 34.556465213,34.4238665343,34.2913882882,34.1590351614,34.0268119754,
180 33.8947236884,33.7627753988,33.6309723478,33.499319922,33.3678236562,
181 33.236489236,33.1053225003,32.9743294439,32.8435162196,32.7128891409,
182 32.5824546835,32.4522194881,32.3221903615,32.1923742787,32.0627783842,
183 31.9334099937,31.8042765947,31.6753858474,31.5467455858,31.4183638174,
184 31.2902487238,31.1624086599,31.0348521538,30.9075879057,30.7806247864,
185 30.6539718359,30.5276382612,30.4016334335,30.275966886,30.1506483095,
186 30.0256875494,29.9010946007,29.7768796032,29.6530528365,29.5296247133,
187 29.4066057737,29.2840066773,29.1618381963,29.0401112068,28.9188366802,
188 28.7980256739,28.6776893212,28.557838821,28.4384854266,28.3196404341,
189 28.2013151706,28.083520981,27.9662692154,27.8495712153,27.7334382994,
190 27.6178817497,27.502912796,27.3885426015,27.274782247,27.1616427153,
191 27.0491348756,26.9372694673,26.8260570842,26.7155081583,26.605632944,
192 26.4964415017,26.3879436828,26.2801491135,26.1730671799,26.066707013,
193 25.9610774742,25.8561871411,25.7520442943,25.6486569043,25.5460326191,
194 25.4441787527,25.343102274,25.2428097972,25.1433075719,25.0446014749,
195 24.9466970027,24.8495992647,24.7533129776,24.6578424604,24.5631916308,
196 24.4693640021,24.3763626815,24.284190369,24.1928493573,24.102341533,
197 24.0126683781,23.9238309727,23.8358299992,23.7486657456,23.6623381119,
198 23.576846615,23.492190396,23.4083682275,23.3253785212,23.2432193369,
199 23.1618883911,23.0813830671,23.0017004246,22.9228372103,22.8447898684,
200 22.7675545521,22.6911271343,22.6155032194,22.5406781549,22.4666470431,
201 22.3934047528,22.3209459315,22.2492650165,22.1783562475,22.1082136777,
202 22.0388311858,21.9702024871,21.9023211449,21.8351805819,21.7687740907,
203 21.7030948443,21.6381359073,21.573890245,21.5103507342,21.4475101722,
204 21.3853612859,21.3238967417,21.2631091529,21.2029910891,21.1435350836,
205 21.0847336411,21.0265792455,20.9690643664,20.9121814661,20.8559230061,
206 20.800281453,20.7452492842,20.6908189936,20.6369830967,20.5837341354,
207 20.5310646827,20.4789673469,20.4274347758,20.3764596604,20.3260347384,
208 20.2761527978,20.2268066794,20.1779892802,20.1296935556,20.081912522,
209 20.034639259,19.9878669114,19.941588691,19.8957978783,19.8504878237,
210 19.8056519493,19.7612837498,19.7173767936,19.6739247233,19.6309212573,
211 19.5883601896,19.5462353909,19.5045408084,19.4632704669,19.4224184683,
212 19.3819789922,19.3419462957,19.3023147134,19.2630786571,19.2242326162,
213 19.1857711566,19.1476889213,19.109980629,19.0726410748,19.0356651289,
214 18.9990477362,18.9627839162,18.9268687619,18.8912974396,18.8560651877,
215 18.8211673166,18.7865992077,18.7523563125,18.7184341523,18.6848283169,
216 18.6515344643,18.6185483195,18.5858656739,18.5534823845,18.5213943728,
217 18.4895976244,18.4580881876,18.4268621732,18.3959157529,18.3652451591,
218 18.3348466836,18.3047166771,18.2748515479,18.2452477615,18.2159018395,
219 18.1868103586,18.1579699502,18.1293772992,18.1010291432,18.0729222719,
220 18.0450535259,18.0174197962,17.9900180234,17.9628451967,17.9358983531,
221 17.9091745768,17.8826709984,17.856384794,17.8303131846,17.804453435,
222 17.7788028537,17.7533587915,17.7281186413,17.7030798369,17.6782398529,
223 17.6535962035,17.629146442,17.60488816,17.5808189872,17.5569365901,
224 17.5332386719,17.5097229715,17.4863872631,17.4632293556,17.4402470917,
225 17.4174383478,17.3948010329,17.3723330884,17.3500324875,17.3278972343,
226 17.3059253639,17.2841149411,17.2624640605,17.2409708457,17.2196334488,
227 17.19845005,17.177418857,17.1565381047,17.1358060544,17.1152209936,
228 17.0947812357,17.0744851191,17.0543310071,17.0343172874,17.0144423714,
229 16.9947046944,16.9751027147,16.9556349131,16.9362997931,16.9170958798,
230 16.8980217202,16.8790758822,16.8602569547,16.8415635471,16.8229942888,
231 16.804547829,16.7862228364,16.7680179988,16.7499320229,16.7319636336,
232 16.714111574,16.6963746054,16.6787515061,16.661241072,16.6438421159,
233 16.6265534672,16.6093739717,16.5923024914,16.5753379039,16.5584791027,
234 16.5417249963,16.5250745085,16.5085265778,16.4920801573,16.4757342144,
235 16.4594877306,16.4433397013,16.4272891353,16.4113350551,16.3954764962,
236 16.3797125071,16.3640421492,16.3484644962,16.3329786343,16.3175836618,
237 16.3022786889,16.2870628377,16.2719352417,16.2568950459,16.2419414064,
238 16.2270734904,16.2122904759,16.1975915515,16.1829759164,16.1684427801,
239 16.1539913623,16.1396208926,16.1253306106,16.1111197655,16.0969876161,
240 16.0829334306,16.0689564863,16.0550560698,16.0412314765,16.0274820108,
241 16.0138069857,16.0002057227,15.9866775518,15.9732218113,15.9598378476,
242 15.9465250152,15.9332826765,15.9201102017,15.9070069688,15.8939723631,
243 15.8810057776,15.8681066125,15.8552742754,15.8425081808,15.8298077503,
244 15.8171724125,15.8046016028,15.7920947632,15.7796513423,15.7672707954,
245 15.754952584,15.7426961761,15.7305010459,15.7183666735,15.7062925455,
246 15.694278154,15.6823229973,15.6704265793,15.6585884097,15.6468080039,
247 15.6350848828,15.6234185725,15.611808605,15.6002545171,15.5887558512,
248 15.5773121548,15.5659229802,15.5545878851,15.543306432,15.5320781883,
249 15.5209027261,15.5097796223,15.4987084586,15.4876888213,15.476720301,
250 15.465802493,15.454934997,15.4441174172,15.4333493618,15.4226304434,
251 15.4119602788,15.4013384891,15.3907646991,15.3802385379,15.3697596385,
252 15.3593276378,15.3489421765,15.3386028993,15.3283094545,15.3180614942,
253 15.3078586739,15.2977006532,15.2875870947,15.277517665,15.267492034,
254 15.2575098748,15.2475708642,15.2376746822,15.2278210121,15.2180095404,
255 15.208239957,15.1985119547,15.1888252296,15.1791794809,15.1695744108,
256 15.1600097243,15.1504851298,15.1410003383,15.1315550638,15.1221490232,
257 15.1127819361,15.1034535249,15.094163515,15.0849116342,15.0756976132,
258 15.0665211851,15.057382086,15.0482800541,15.0392148306,15.030186159,
259 15.0211937853,15.012237458,15.003316928,14.9944319486,14.9855822755,
260 14.9767676668,14.9679878826,14.9592426857,14.950531841,14.9418551155,
261 14.9332122786,14.9246031017,14.9160273584,14.9074848247,14.8989752782,
262 14.8904984989,14.8820542689,14.8736423721,14.8652625946,14.8569147243,
263 14.8485985512,14.8403138672,14.832060466,14.8238381434,14.8156466968,
264 14.8074859258,14.7993556314,14.7912556167,14.7831856865,14.7751456474,
265 14.7671353076,14.7591544771,14.7512029678,14.7432805929,14.7353871675,
266 14.7275225084,14.7196864338,14.7118787638,14.7040993197,14.6963479248,
267 14.6886244037,14.6809285825,14.6732602889,14.6656193522,14.6580056031,
268 14.6504188737,14.6428589975,14.6353258098,14.6278191469,14.6203388467,
269 14.6128847485,14.6054566928,14.5980545218,14.5906780788,14.5833272083,
270 14.5760017565,14.5687015706,14.5614264991,14.554176392,14.5469511003,
271 14.5397504764,14.532574374,14.5254226477,14.5182951536,14.511191749,
272 14.5041122922,14.4970566428,14.4900246616,14.4830162103,14.476031152,
273 14.4690693508,14.4621306719,14.4552149818,14.4483221476,14.4414520381,
274 14.4346045227,14.427779472,14.4209767576,14.4141962524,14.4074378298,
275 14.4007013648,14.3939867329,14.3872938109,14.3806224764,14.3739726081,
276 14.3673440856,14.3607367896,14.3541506013,14.3475854034,14.3410410791,
277 14.3345175128,14.3280145895,14.3215321954,14.3150702174,14.3086285433,
278 14.3022070619,14.2958056626,14.2894242359,14.283062673,14.276720866,
279 14.2703987079,14.2640960923,14.2578129137,14.2515490676,14.24530445,
280 14.2390789579,14.232872489,14.2266849416,14.2205162152,14.2143662096,
281 14.2082348255,14.2021219646,14.1960275289,14.1899514215,14.1838935459,
282 14.1778538067,14.1718321088,14.165828358,14.1598424609,14.1538743246,
283 14.1479238569,14.1419909664,14.1360755623,14.1301775544,14.1242968532,
284 14.11843337,14.1125870164,14.106757705,14.1009453487,14.0951498615,
285 14.0893711574,14.0836091515,14.0778637594,14.0721348971,14.0664224814,
286 14.0607264296,14.0550466597,14.0493830902,14.0437356402,14.0381042293,
287 14.0324887777,14.0268892062,14.0213054361,14.0157373894,14.0101849885,
288 14.0046481563,13.9991268163,13.9936208926,13.9881303098,13.9826549929,
289 13.9771948675,13.9717498598,13.9663198964,13.9609049044,13.9555048114,
290 13.9501195456,13.9447490356,13.9393932105,13.9340519998,13.9287253336,
291 13.9234131425,13.9181153575,13.91283191,13.9075627319,13.9023077557,
292 13.8970669141,13.8918401405,13.8866273686,13.8814285326,13.876243567,
293 13.871072407,13.865914988,13.860771246,13.8556411172,13.8505245383,
294 13.8454214467,13.8403317797,13.8352554755,13.8301924725,13.8251427093,
295 13.8201061252,13.8150826598,13.8100722531,13.8050748454,13.8000903775,
296 13.7951187905,13.790160026,13.7852140259,13.7802807323,13.775360088,
297 13.7704520359,13.7655565194,13.7606734822,13.7558028685,13.7509446227,
298 13.7460986895,13.7412650141,13.7364435419,13.7316342189,13.7268369912,
299 13.7220518053,13.717278608,13.7125173466,13.7077679684,13.7030304215,
300 13.6983046538,13.693590614,13.6888882508,13.6841975133,13.679518351,
301 13.6748507136,13.6701945512,13.665549814,13.6609164529,13.6562944187,
302 13.6516836627,13.6470841366,13.6424957921,13.6379185813,13.6333524569,
303 13.6287973714,13.6242532779,13.6197201297,13.6151978803,13.6106864838,
304 13.6061858941,13.6016960656,13.5972169532,13.5927485117,13.5882906964,
305 13.5838434627,13.5794067665,13.5749805636,13.5705648106,13.5661594637,
306 13.5617644799,13.5573798162,13.5530054299,13.5486412786,13.54428732,
307 13.5399435123,13.5356098136,13.5312861826,13.526972578,13.5226689589,
308 13.5183752845,13.5140915142,13.5098176079,13.5055535255,13.5012992271,
309 13.4970546733,13.4928198245,13.4885946418,13.4843790862,13.4801731191,
310 13.4759767019,13.4717897965,13.4676123647,13.4634443689,13.4592857713,
311 13.4551365347,13.4509966219,13.4468659959,13.4427446199,13.4386324575,
312 13.4345294722,13.4304356279,13.4263508888,13.422275219,13.418208583,
313 13.4141509456,13.4101022715,13.4060625259,13.4020316739,13.3980096811,
314 13.393996513,13.3899921354,13.3859965145,13.3820096163,13.3780314073,
315 13.374061854,13.3701009232,13.3661485818,13.362204797,13.358269536,
316 13.3543427662,13.3504244554,13.3465145714,13.3426130821,13.3387199557,
317 13.3348351605,13.3309586652,13.3270904383,13.3232304487,13.3193786654,
318 13.3155350575,13.3116995946,13.3078722459,13.3040529813,13.3002417706,
319 13.2964385836,13.2926433907,13.2888561621,13.2850768682,13.2813054797,
320 13.2775419674,13.2737863022,13.2700384552,13.2662983976,13.2625661008,
321 13.2588415363,13.2551246758,13.2514154912,13.2477139545,13.2440200377,
322 13.2403337131,13.2366549531,13.2329837303,13.2293200174,13.2256637873,
323 13.2220150128,13.2183736671,13.2147397235,13.2111131554,13.2074939363,
324 13.2038820398,13.2002774397,13.19668011,13.1930900248,13.1895071582,
325 13.1859314845,13.1823629783,13.178801614,13.1752473665,13.1717002105,
326 13.168160121,13.1646270732,13.1611010422,13.1575820033,13.1540699321,
327 13.1505648041,13.1470665951,13.1435752808,13.1400908372,13.1366132404,
328 13.1331424666,13.1296784921,13.1262212933,13.1227708467,13.1193271291,
329 13.1158901171,13.1124597877,13.1090361179,13.1056190848,13.1022086655,
330 13.0988048375,13.0954075782,13.0920168651,13.0886326759,13.0852549884,
331 13.0818837805,13.0785190301,13.0751607154,13.0718088145,13.0684633057,
332 13.0651241676,13.0617913785,13.0584649171,13.0551447622,13.0518308925,
333 13.048523287,13.0452219246,13.0419267846,13.0386378462,13.0353550886,
334 13.0320784913,13.0288080338,13.0255436958,13.0222854569,13.019033297,
335 13.0157871959,13.0125471336,13.0093130904,13.0060850462,13.0028629815,
336 12.9996468766,12.9964367119,12.993232468,12.9900341256,12.9868416654,
337 12.9836550682,12.9804743149,12.9772993866,12.9741302643,12.9709669292,
338 12.9678093625,12.9646575458,12.9615114602,12.9583710875,12.9552364092,
339 12.9521074069,12.9489840625,12.9458663579,12.9427542749,12.9396477957,
340 12.9365469022,12.9334515768,12.9303618016,12.9272775591,12.9241988316,
341 12.9211256016,12.9180578519,12.9149955649,12.9119387235,12.9088873106,
342 12.9058413089,12.9028007015,12.8997654714,12.8967356018,12.8937110759,
343 12.8906918769,12.8876779882,12.8846693933,12.8816660756,12.8786680187,
344 12.8756752064,12.8726876222,12.86970525,12.8667280736,12.8637560771,
345 12.8607892443,12.8578275594,12.8548710066,12.8519195701,12.848973234,
346 12.8460319829,12.8430958011,12.8401646731,12.8372385835,12.8343175169,
347 12.831401458,12.8284903916,12.8255843025,12.8226831755,12.8197869957,
348 12.8168957481,12.8140094178,12.8111279898,12.8082514496,12.8053797822,
349 12.8025129731,12.7996510076,12.7967938713,12.7939415497,12.7910940284,
350 12.7882512929,12.7854133292,12.7825801228,12.7797516597,12.7769279257,
351 12.7741089069,12.7712945892,12.7684849587,12.7656800016,12.762879704,
352 12.7600840522,12.7572930325,12.7545066312,12.7517248349,12.74894763,
353 12.7461750029,12.7434069404,12.7406434291,12.7378844557,12.7351300068,
354 12.7323800695,12.7296346305,12.7268936767,12.7241571952,12.721425173,
355 12.7186975971,12.7159744547,12.7132557331,12.7105414194,12.7078315009,
356 12.7051259651,12.7024247993,12.699727991,12.6970355276,12.6943473968,
357 12.6916635861,12.6889840833,12.6863088759,12.6836379519,12.680971299,
358 12.678308905,12.6756507579,12.6729968456,12.6703471562,12.6677016776,
359 12.6650603981,12.6624233057,12.6597903887,12.6571616353,12.6545370337,
360 12.6519165725,12.6493002398,12.6466880242,12.6440799142,12.6414758982,
361 12.6388759649,12.6362801029,12.6336883008,12.6311005473,12.6285168312,
362 12.6259371414,12.6233614666,12.6207897957,12.6182221177,12.6156584215,
363 12.6130986962,12.6105429308,12.6079911145,12.6054432363,12.6028992855,
364 12.6003592512,12.5978231229,12.5952908898,12.5927625412,12.5902380665,
365 12.5877174553,12.585200697,12.582687781,12.580178697,12.5776734346,
366 12.5751719835,12.5726743332,12.5701804736,12.5676903943,12.5652040853,
367 12.5627215363,12.5602427373,12.5577676781,12.5552963487,12.5528287392,
368 12.5503648395,12.5479046397,12.54544813,12.5429953005,12.5405461414,
369 12.5381006428,12.5356587952,12.5332205887,12.5307860138,12.5283550607,
370 12.52592772,12.523503982,12.5210838372,12.5186672762,12.5162542895,
371 12.5138448677,12.5114390014,12.5090366814,12.5066378982,12.5042426426,
372 12.5018509054,12.4994626774,12.4970779493,12.4946967122,12.4923189569,
373 12.4899446743,12.4875738554,12.4852064912,12.4828425728,12.4804820912,
374 12.4781250374,12.4757714028,12.4734211784,12.4710743554,12.468730925,
375 12.4663908786,12.4640542075,12.4617209029,12.4593909562,12.4570643588,
376 12.4547411022,12.4524211778,12.4501045771,12.4477912916,12.4454813129,
377 12.4431746326,12.4408712422,12.4385711334,12.4362742979,12.4339807274,
378 12.4316904136,12.4294033483,12.4271195232,12.4248389303,12.4225615613,
379 12.4202874082,12.4180164628,12.4157487171,12.413484163,12.4112227927,
380 12.408964598,12.406709571,12.4044577039,12.4022089887,12.3999634176,
381 12.3977209827,12.3954816763,12.3932454906,12.3910124178,12.3887824501,
382 12.38655558,12.3843317998,12.3821111017,12.3798934782,12.3776789218,
383 12.3754674248,12.3732589797,12.371053579,12.3688512153,12.366651881,
384 12.3644555688,12.3622622713,12.3600719811,12.3578846908,12.3557003931,
385 12.3535190807,12.3513407464,12.3491653829,12.3469929829,12.3448235394,
386 12.342657045,12.3404934928,12.3383328755,12.336175186,12.3340204173,
387 12.3318685624,12.3297196142,12.3275735657,12.3254304099,12.3232901399,
388 12.3211527488,12.3190182296,12.3168865756,12.3147577797,12.3126318353,
389 12.3105087354,12.3083884733,12.3062710423,12.3041564356,12.3020446464,
390 12.2999356681,12.2978294941,12.2957261176,12.2936255321,12.2915277309,
391 12.2894327075,12.2873404553,12.2852509678,12.2831642384,12.2810802607,
392 12.2789990281,12.2769205344,12.2748447729,12.2727717373,12.2707014213,
393 12.2686338185,12.2665689225,12.2645067269,12.2624472256,12.2603904123,
394 12.2583362806,12.2562848243,12.2542360373,12.2521899133,12.2501464462,
395 12.2481056297,12.2460674579,12.2440319245,12.2419990234,12.2399687487,
396 12.2379410942,12.2359160539,12.2338936219,12.231873792,12.2298565583,
397 12.227841915,12.225829856,12.2238203754,12.2218134674,12.2198091261,
398 12.2178073455,12.2158081199,12.2138114435,12.2118173105,12.209825715,
399 12.2078366513,12.2058501137,12.2038660965,12.2018845939,12.1999056003,
400 12.1979291099,12.1959551172,12.1939836165,12.1920146022,12.1900480687,
401 12.1880840104,12.1861224218,12.1841632973,12.1822066314,12.1802524186,
402 12.1783006534,12.1763513304,12.174404444,12.1724599888,12.1705179595,
403 12.1685783507,12.1666411568,12.1647063727,12.1627739928,12.160844012,
404 12.1589164248,12.156991226,12.1550684103,12.1531479725,12.1512299072,
405 12.1493142093,12.1474008735,12.1454898947,12.1435812676,12.1416749871,
406 12.1397710481,12.1378694453,12.1359701738,12.1340732283,12.1321786038,
407 12.1302862953,12.1283962977,12.1265086058,12.1246232148,12.1227401197,
408 12.1208593153,12.1189807968,12.1171045592,12.1152305975,12.1133589068,
409 12.1114894822,12.1096223189,12.1077574118,12.1058947562,12.1040343472,
410 12.1021761799,12.1003202496,12.0984665514,12.0966150806,12.0947658323,
411 12.0929188017,12.0910739843,12.0892313751,12.0873909695,12.0855527628,
412 12.0837167503,12.0818829273,12.0800512891,12.0782218311,12.0763945487,
413 12.0745694373,12.0727464922,12.0709257088,12.0691070826,12.067290609,
414 12.0654762834
415 }
416 },
417 {
418 // Ri = 250k
419 -5,5,200,2001, {
420 137.512728867,137.399223264,137.285690251,137.17212984,137.058542039,
421 136.944926859,136.831284308,136.717614396,136.603917133,136.490192528,
422 136.37644059,136.262661328,136.148854752,136.035020871,135.921159694,
423 135.80727123,135.693355487,135.579412475,135.465442203,135.351444679,
424 135.237419911,135.12336791,135.009288682,134.895182238,134.781048584,
425 134.66688773,134.552699684,134.438484454,134.324242049,134.209972477,
426 134.095675745,133.981351862,133.867000836,133.752622675,133.638217387,
427 133.523784979,133.40932546,133.294838836,133.180325116,133.065784308,
428 132.951216418,132.836621455,132.721999425,132.607350337,132.492674197,
429 132.377971012,132.263240791,132.148483539,132.033699265,131.918887974,
430 131.804049675,131.689184374,131.574292077,131.459372792,131.344426526,
431 131.229453284,131.114453074,130.999425902,130.884371775,130.769290699,
432 130.654182681,130.539047726,130.423885842,130.308697033,130.193481308,
433 130.078238671,129.962969128,129.847672686,129.732349351,129.616999128,
434 129.501622024,129.386218043,129.270787192,129.155329476,129.039844901,
435 128.924333473,128.808795197,128.693230078,128.577638121,128.462019333,
436 128.346373717,128.230701281,128.115002027,127.999275963,127.883523091,
437 127.767743419,127.65193695,127.536103689,127.420243641,127.304356811,
438 127.188443204,127.072502824,126.956535675,126.840541763,126.724521091,
439 126.608473664,126.492399486,126.376298562,126.260170896,126.144016492,
440 126.027835354,125.911627486,125.795392892,125.679131576,125.562843542,
441 125.446528794,125.330187335,125.213819169,125.0974243,124.981002732,
442 124.864554467,124.74807951,124.631577864,124.515049532,124.398494517,
443 124.281912824,124.165304454,124.048669411,123.932007699,123.815319319,
444 123.698604276,123.581862572,123.465094209,123.348299192,123.231477521,
445 123.114629201,122.997754234,122.880852622,122.763924367,122.646969473,
446 122.529987942,122.412979775,122.295944976,122.178883547,122.061795488,
447 121.944680804,121.827539496,121.710371565,121.593177014,121.475955845,
448 121.358708059,121.241433658,121.124132644,121.006805019,120.889450784,
449 120.772069941,120.654662491,120.537228435,120.419767776,120.302280513,
450 120.18476665,120.067226186,119.949659123,119.832065462,119.714445204,
451 119.596798349,119.4791249,119.361424857,119.24369822,119.12594499,
452 119.008165168,118.890358755,118.772525751,118.654666156,118.536779972,
453 118.418867198,118.300927835,118.182961883,118.064969342,117.946950213,
454 117.828904495,117.710832189,117.592733295,117.474607812,117.356455741,
455 117.238277081,117.120071832,117.001839993,116.883581565,116.765296548,
456 116.646984939,116.52864674,116.410281948,116.291890565,116.173472589,
457 116.055028019,115.936556854,115.818059094,115.699534738,115.580983784,
458 115.462406232,115.343802081,115.225171329,115.106513975,114.987830018,
459 114.869119456,114.750382289,114.631618514,114.51282813,114.394011136,
460 114.27516753,114.15629731,114.037400475,113.918477022,113.799526951,
461 113.680550258,113.561546942,113.442517002,113.323460434,113.204377236,
462 113.085267407,112.966130945,112.846967846,112.727778109,112.608561731,
463 112.489318709,112.370049041,112.250752725,112.131429757,112.012080135,
464 111.892703857,111.773300918,111.653871317,111.53441505,111.414932115,
465 111.295422508,111.175886226,111.056323266,110.936733624,110.817117298,
466 110.697474283,110.577804577,110.458108176,110.338385076,110.218635274,
467 110.098858766,109.979055549,109.859225618,109.739368969,109.619485599,
468 109.499575504,109.379638679,109.259675121,109.139684826,109.019667789,
469 108.899624005,108.779553471,108.659456182,108.539332134,108.419181322,
470 108.299003742,108.178799389,108.058568258,107.938310344,107.818025643,
471 107.69771415,107.577375859,107.457010766,107.336618867,107.216200154,
472 107.095754624,106.975282272,106.854783091,106.734257077,106.613704224,
473 106.493124526,106.372517979,106.251884576,106.131224312,106.010537181,
474 105.889823177,105.769082295,105.648314528,105.52751987,105.406698317,
475 105.28584986,105.164974495,105.044072215,104.923143013,104.802186884,
476 104.681203821,104.560193818,104.439156867,104.318092963,104.197002099,
477 104.075884268,103.954739463,103.833567678,103.712368905,103.591143138,
478 103.46989037,103.348610593,103.227303801,103.105969985,102.98460914,
479 102.863221258,102.74180633,102.620364351,102.498895311,102.377399205,
480 102.255876023,102.134325759,102.012748405,101.891143953,101.769512394,
481 101.647853721,101.526167927,101.404455002,101.282714939,101.16094773,
482 101.039153366,100.917331839,100.795483141,100.673607263,100.551704197,
483 100.429773934,100.307816466,100.185831783,100.063819878,99.9417807406,
484 99.8197143628,99.6976207354,99.5754998496,99.4533516961,99.3311762659,
485 99.2089735498,99.0867435385,98.9644862227,98.8422015931,98.7198896402,
486 98.5975503544,98.4751837263,98.3527897462,98.2303684044,98.1079196912,
487 97.9854435967,97.862940111,97.7404092242,97.6178509264,97.4952652074,
488 97.3726520571,97.2500114653,97.1273434217,97.0046479161,96.881924938,
489 96.759174477,96.6363965227,96.5135910643,96.3907580913,96.267897593,
490 96.1450095586,96.0220939773,95.8991508382,95.7761801304,95.6531818428,
491 95.5301559644,95.407102484,95.2840213905,95.1609126725,95.0377763187,
492 94.9146123178,94.7914206583,94.6682013286,94.5449543172,94.4216796125,
493 94.2983772027,94.1750470761,94.0516892209,93.9283036251,93.8048902767,
494 93.6814491639,93.5579802744,93.4344835962,93.3109591171,93.1874068247,
495 93.0638267067,92.9402187508,92.8165829445,92.6929192752,92.5692277304,
496 92.4455082975,92.3217609637,92.1979857163,92.0741825423,91.9503514291,
497 91.8264923635,91.7026053326,91.5786903232,91.4547473223,91.3307763167,
498 91.206777293,91.082750238,90.9586951383,90.8346119803,90.7105007507,
499 90.5863614358,90.462194022,90.3379984956,90.2137748429,90.0895230499,
500 89.965243103,89.840934988,89.7165986911,89.5922341981,89.467841495,
501 89.3434205675,89.2189714014,89.0944939825,88.9699882963,88.8454543284,
502 88.7208920644,88.5963014897,88.4716825897,88.3470353498,88.2223597552,
503 88.0976557912,87.9729234429,87.8481626954,87.7233735338,87.5985559431,
504 87.4737099082,87.3488354139,87.2239324452,87.0990009867,86.9740410231,
505 86.8490525391,86.7240355193,86.5989899482,86.4739158103,86.34881309,
506 86.2236817716,86.0985218395,85.9733332779,85.8481160709,85.7228702028,
507 85.5975956577,85.4722924194,85.3469604721,85.2215997996,85.0962103858,
508 84.9707922146,84.8453452696,84.7198695345,84.5943649931,84.4688316289,
509 84.3432694255,84.2176783664,84.092058435,83.9664096147,83.8407318888,
510 83.7150252407,83.5892896536,83.4635251106,83.3377315949,83.2119090897,
511 83.0860575779,82.9601770426,82.8342674667,82.708328833,82.5823611245,
512 82.456364324,82.3303384143,82.2042833779,82.0781991977,81.9520858562,
513 81.825943336,81.6997716197,81.5735706898,81.4473405286,81.3210811187,
514 81.1947924423,81.0684744819,80.9421272196,80.8157506378,80.6893447187,
515 80.5629094444,80.436444797,80.3099507586,80.1834273114,80.0568744373,
516 79.9302921182,79.8036803362,79.6770390732,79.550368311,79.4236680315,
517 79.2969382165,79.1701788478,79.0433899071,78.9165713762,78.7897232367,
518 78.6628454704,78.5359380588,78.4090009835,78.2820342262,78.1550377685,
519 78.0280115917,77.9009556775,77.7738700074,77.6467545627,77.519609325,
520 77.3924342757,77.2652293962,77.1379946679,77.0107300721,76.8834355903,
521 76.7561112037,76.6287568937,76.5013726416,76.3739584288,76.2465142365,
522 76.119040046,75.9915358386,75.8640015956,75.7364372982,75.6088429277,
523 75.4812184654,75.3535638926,75.2258791905,75.0981643403,74.9704193234,
524 74.842644121,74.7148387145,74.587003085,74.4591372139,74.3312410825,
525 74.2033146721,74.0753579641,73.9473709398,73.8193535805,73.6913058677,
526 73.5632277828,73.4351193072,73.3069804223,73.1788111097,73.0506113508,
527 72.9223811272,72.7941204204,72.6658292121,72.537507484,72.4091552176,
528 72.2807723947,72.1523589971,72.0239150066,71.8954404051,71.7669351744,
529 71.6383992966,71.5098327536,71.3812355275,71.2526076005,71.1239489547,
530 70.9952595725,70.8665394361,70.7377885279,70.6090068305,70.4801943263,
531 70.3513509981,70.2224768285,70.0935718004,69.9646358965,69.8356691,
532 69.7066713939,69.5776427614,69.4485831857,69.3194926503,69.1903711386,
533 69.0612186344,68.9320351212,68.802820583,68.6735750037,68.5442983675,
534 68.4149906585,68.2856518613,68.1562819603,68.0268809401,67.8974487857,
535 67.7679854819,67.638491014,67.5089653673,67.3794085272,67.2498204794,
536 67.1202012097,66.9905507042,66.8608689491,66.7311559309,66.601411636,
537 66.4716360515,66.3418291643,66.2119909618,66.0821214314,65.9522205608,
538 65.8222883382,65.6923247516,65.5623297897,65.4323034412,65.302245695,
539 65.1721565406,65.0420359675,64.9118839657,64.7817005253,64.6514856368,
540 64.5212392911,64.3909614794,64.2606521931,64.1303114242,63.9999391648,
541 63.8695354075,63.7391001453,63.6086333716,63.47813508,63.3476052649,
542 63.2170439207,63.0864510425,62.9558266257,62.8251706663,62.6944831608,
543 62.5637641059,62.4330134991,62.3022313383,62.1714176218,62.0405723488,
544 61.9096955186,61.7787871314,61.6478471879,61.5168756894,61.3858726377,
545 61.2548380355,61.1237718859,60.9926741928,60.8615449607,60.730384195,
546 60.5991919017,60.4679680876,60.3367127601,60.2054259277,60.0741075994,
547 59.9427577854,59.8113764964,59.6799637443,59.5485195417,59.4170439022,
548 59.2855368404,59.1539983719,59.0224285133,58.8908272824,58.7591946978,
549 58.6275307794,58.4958355482,58.3641090265,58.2323512377,58.1005622064,
550 57.9687419586,57.8368905217,57.7050079243,57.5730941965,57.4411493697,
551 57.3091734771,57.1771665531,57.0451286339,56.9130597573,56.7809599628,
552 56.6488292914,56.5166677863,56.3844754921,56.2522524556,56.1199987253,
553 55.9877143521,55.8553993885,55.7230538895,55.5906779121,55.4582715156,
554 55.3258347616,55.1933677144,55.0608704404,54.9283430087,54.7957854911,
555 54.6631979622,54.5305804991,54.3979331822,54.2652560946,54.1325493226,
556 53.9998129557,53.8670470866,53.7342518116,53.6014272301,53.4685734456,
557 53.3356905649,53.202778699,53.0698379626,52.9368684747,52.8038703584,
558 52.6708437413,52.5377887554,52.4047055373,52.2715942288,52.1384549761,
559 52.005287931,51.8720932505,51.7388710969,51.6056216384,51.4723450489,
560 51.3390415085,51.2057112034,51.0723543264,50.9389710768,50.8055616609,
561 50.6721262922,50.5386651916,50.4051785874,50.271666716,50.1381298218,
562 50.0045681577,49.8709819854,49.7373715755,49.6037372078,49.470079172,
563 49.3363977676,49.2026933043,49.0689661028,48.9352164944,48.8014448221,
564 48.6676514405,48.5338367167,48.40000103,48.2661447731,48.1322683519,
565 47.9983721867,47.8644567117,47.7305223766,47.5965696462,47.4625990014,
566 47.3286109398,47.1946059759,47.0605846422,46.9265474893,46.792495087,
567 46.6584280245,46.5243469117,46.3902523791,46.2561450792,46.122025687,
568 45.9878949008,45.853753443,45.7196020608,45.5854415275,45.4512726429,
569 45.3170962344,45.1829131581,45.0487242995,44.9145305749,44.7803329321,
570 44.6461323516,44.5119298478,44.3777264702,44.2435233043,44.1093214733,
571 43.9751221389,43.8409265029,43.7067358086,43.5725513419,43.4383744332,
572 43.3042064584,43.1700488409,43.0359030526,42.9017706161,42.7676531062,
573 42.6335521515,42.4994694361,42.3654067018,42.2313657496,42.0973484418,
574 41.9633567039,41.8293925267,41.6954579684,41.5615551566,41.4276862907,
575 41.293853644,41.1600595658,41.0263064842,40.8925969082,40.7589334302,
576 40.6253187286,40.4917555701,40.3582468127,40.2247954079,40.0914044039,
577 39.9580769478,39.8248162888,39.691625781,39.5585088858,39.4254691754,
578 39.2925103354,39.1596361679,39.0268505942,38.8941576581,38.7615615286,
579 38.6290665035,38.4966770114,38.3643976159,38.2322330175,38.1001880572,
580 37.9682677194,37.8364771346,37.7048215822,37.5733064936,37.4419374545,
581 37.3107202079,37.1796606565,37.0487648651,36.9180390628,36.7874896455,
582 36.6571231776,36.526946394,36.3969662016,36.2671896813,36.1376240885,
583 36.0082768545,35.8791555875,35.7502680727,35.6216222725,35.4932263267,
584 35.3650885517,35.23721744,35.1096216587,34.9823100482,34.8552916201,
585 34.7285755548,34.6021711986,34.4760880604,34.3503358077,34.2249242626,
586 34.0998633968,33.9751633259,33.8508343041,33.7268867171,33.6033310755,
587 33.4801780068,33.3574382475,33.2351226341,33.1132420942,32.9918076357,
588 32.8708303373,32.7503213367,32.6302918195,32.5107530067,32.3917161423,
589 32.2731924804,32.1551932711,32.037729747,31.9208131085,31.8044545095,
590 31.6886650419,31.5734557206,31.4588374679,31.3448210978,31.2314173004,
591 31.1186366258,31.0064894684,30.8949860509,30.7841364092,30.6739503761,
592 30.5644375666,30.455607363,30.3474688999,30.2400310502,30.1333024117,
593 30.0272912935,29.9220057037,29.8174533375,29.7136415657,29.6105774244,
594 29.5082676055,29.4067184471,29.3059359261,29.2059256507,29.1066928541,
595 29.0082423889,28.9105787231,28.8137059359,28.7176277156,28.6223473578,
596 28.5278677641,28.4341914432,28.3413205108,28.2492566924,28.1580013255,
597 28.0675553634,27.9779193796,27.8890935724,27.8010777713,27.7138714431,
598 27.6274736993,27.5418833035,27.4570986796,27.373117921,27.289938799,
599 27.2075587732,27.1259750009,27.0451843475,26.965183397,26.8859684628,
600 26.8075355984,26.7298806087,26.652999061,26.5768862962,26.5015374399,
601 26.426947414,26.3531109471,26.2800225865,26.2076767084,26.1360675291,
602 26.0651891153,25.9950353953,25.9256001685,25.8568771158,25.7888598095,
603 25.7215417227,25.6549162387,25.5889766601,25.5237162175,25.4591280777,
604 25.3952053525,25.331941106,25.2693283624,25.2073601134,25.1460293249,
605 25.0853289441,25.0252519052,24.9657911364,24.9069395648,24.8486901225,
606 24.7910357516,24.7339694092,24.677484072,24.6215727409,24.5662284448,
607 24.5114442449,24.4572132382,24.4035285609,24.3503833915,24.2977709541,
608 24.2456845208,24.1941174145,24.1430630113,24.0925147424,24.0424660964,
609 23.992910621,23.9438419248,23.8952536784,23.8471396162,23.7994935376,
610 23.7523093077,23.7055808586,23.6593021901,23.6134673704,23.5680705368,
611 23.5231058959,23.4785677245,23.4344503694,23.3907482481,23.3474558483,
612 23.3045677287,23.2620785186,23.2199829176,23.1782756959,23.1369516941,
613 23.0960058224,23.055433061,23.0152284591,22.9753871351,22.9359042758,
614 22.8967751359,22.8579950378,22.8195593706,22.7814635902,22.743703218,
615 22.7062738406,22.6691711094,22.6323907394,22.5959285091,22.5597802593,
616 22.5239418928,22.4884093734,22.4531787255,22.4182460329,22.3836074384,
617 22.3492591431,22.3151974054,22.2814185405,22.2479189191,22.2146949676,
618 22.1817431664,22.1490600496,22.1166422042,22.0844862693,22.0525889354,
619 22.0209469434,21.9895570842,21.9584161977,21.9275211724,21.896868944,
620 21.8664564954,21.8362808557,21.8063390992,21.7766283451,21.7471457566,
621 21.7178885402,21.6888539452,21.6600392626,21.631441825,21.6030590054,
622 21.5748882168,21.5469269116,21.5191725808,21.4916227535,21.4642749962,
623 21.4371269121,21.4101761408,21.3834203573,21.3568572718,21.3304846287,
624 21.3043002064,21.2783018166,21.2524873036,21.2268545441,21.2014014463,
625 21.1761259495,21.1510260236,21.1260996686,21.1013449141,21.0767598189,
626 21.0523424701,21.0280909831,21.004003501,20.9800781938,20.9563132586,
627 20.9327069183,20.9092574221,20.8859630443,20.8628220842,20.8398328657,
628 20.8169937368,20.7943030693,20.7717592581,20.7493607214,20.7271058996,
629 20.7049932554,20.6830212735,20.6611884598,20.6394933414,20.617934466,
630 20.5965104018,20.5752197372,20.5540610799,20.5330330574,20.512134316,
631 20.491363521,20.4707193559,20.4502005225,20.4298057403,20.4095337464,
632 20.3893832953,20.3693531584,20.3494421236,20.3296489955,20.3099725947,
633 20.2904117577,20.2709653368,20.2516321995,20.2324112284,20.2133013213,
634 20.1943013902,20.1754103619,20.1566271772,20.1379507909,20.1193801714,
635 20.1009143009,20.0825521747,20.0642928011,20.0461352015,20.0280784098,
636 20.0101214725,19.9922634483,19.9745034079,19.9568404342,19.9392736215,
637 19.9218020757,19.9044249141,19.8871412651,19.8699502683,19.8528510738,
638 19.8358428425,19.818924746,19.8020959659,19.7853556942,19.7687031328,
639 19.7521374934,19.7356579977,19.7192638768,19.702954371,19.6867287302,
640 19.6705862133,19.6545260883,19.6385476318,19.6226501296,19.6068328756,
641 19.5910951724,19.5754363311,19.5598556707,19.5443525186,19.5289262099,
642 19.5135760879,19.4983015033,19.4831018147,19.4679763881,19.4529245969,
643 19.4379458218,19.4230394509,19.4082048791,19.3934415084,19.3787487479,
644 19.3641260131,19.3495727265,19.3350883172,19.3206722206,19.3063238786,
645 19.2920427395,19.2778282577,19.263679894,19.2495971149,19.2355793932,
646 19.2216262073,19.2077370416,19.1939113861,19.1801487367,19.1664485945,
647 19.1528104664,19.1392338645,19.1257183064,19.1122633148,19.0988684177,
648 19.0855331483,19.0722570446,19.0590396499,19.0458805122,19.0327791844,
649 19.0197352243,19.0067481941,18.993817661,18.9809431967,18.9681243774,
650 18.9553607836,18.9426520006,18.9299976177,18.9173972287,18.9048504315,
651 18.8923568283,18.8799160254,18.8675276332,18.855191266,18.8429065421,
652 18.8306730839,18.8184905175,18.8063584728,18.7942765836,18.7822444873,
653 18.7702618249,18.7583282413,18.7464433847,18.734606907,18.7228184636,
654 18.7110777131,18.6993843177,18.6877379431,18.6761382579,18.6645849344,
655 18.6530776479,18.6416160769,18.6301999032,18.6188288114,18.6075024895,
656 18.5962206284,18.5849829221,18.5737890673,18.5626387639,18.5515317145,
657 18.5404676247,18.5294462029,18.5184671601,18.5075302104,18.4966350702,
658 18.4857814588,18.4749690983,18.4641977132,18.4534670307,18.4427767803,
659 18.4321266945,18.4215165079,18.4109459577,18.4004147836,18.3899227277,
660 18.3794695343,18.3690549502,18.3586787246,18.3483406089,18.3380403567,
661 18.327777724,18.3175524689,18.3073643518,18.2972131352,18.2870985837,
662 18.2770204641,18.2669785453,18.2569725982,18.2470023957,18.2370677129,
663 18.2271683268,18.2173040164,18.2074745625,18.1976797481,18.187919358,
664 18.1781931787,18.1685009989,18.1588426089,18.149217801,18.1396263691,
665 18.1300681091,18.1205428184,18.1110502966,18.1015903445,18.0921627649,
666 18.0827673623,18.0734039429,18.0640723142,18.0547722859,18.0455036688,
667 18.0362662756,18.0270599206,18.0178844194,18.0087395894,17.9996252494,
668 17.9905412198,17.9814873225,17.9724633808,17.9634692195,17.9545046649,
669 17.9455695447,17.9366636879,17.9277869252,17.9189390885,17.9101200109,
670 17.9013295273,17.8925674735,17.883833687,17.8751280064,17.8664502716,
671 17.857800324,17.849178006,17.8405831614,17.8320156354,17.8234752741,
672 17.8149619251,17.8064754372,17.7980156603,17.7895824455,17.7811756451,
673 17.7727951126,17.7644407026,17.7561122709,17.7478096744,17.7395327711,
674 17.7312814201,17.7230554816,17.714854817,17.7066792887,17.69852876,
675 17.6904030955,17.6823021608,17.6742258224,17.6661739479,17.6581464059,
676 17.6501430661,17.642163799,17.6342084763,17.6262769706,17.6183691553,
677 17.6104849049,17.6026240949,17.5947866017,17.5869723025,17.5791810756,
678 17.5714128001,17.5636673559,17.5559446241,17.5482444865,17.5405668256,
679 17.5329115251,17.5252784694,17.5176675436,17.510078634,17.5025116274,
680 17.4949664116,17.4874428751,17.4799409074,17.4724603986,17.4650012398,
681 17.4575633227,17.4501465398,17.4427507845,17.4353759509,17.4280219338,
682 17.4206886288,17.4133759324,17.4060837415,17.3988119541,17.3915604686,
683 17.3843291844,17.3771180014,17.3699268203,17.3627555424,17.35560407,
684 17.3484723057,17.341360153,17.3342675159,17.3271942994,17.3201404088,
685 17.3131057502,17.3060902305,17.2990937569,17.2921162377,17.2851575813,
686 17.2782176971,17.2712964951,17.2643938858,17.2575097803,17.2506440905,
687 17.2437967285,17.2369676075,17.2301566409,17.2233637429,17.2165888281,
688 17.2098318119,17.2030926101,17.1963711391,17.189667316,17.1829810581,
689 17.1763122836,17.1696609112,17.1630268599,17.1564100495,17.1498104003,
690 17.1432278329,17.1366622687,17.1301136294,17.1235818374,17.1170668156,
691 17.1105684871,17.1040867758,17.0976216062,17.0911729029,17.0847405913,
692 17.0783245972,17.0719248468,17.0655412669,17.0591737847,17.0528223279,
693 17.0464868247,17.0401672035,17.0338633936,17.0275753244,17.0213029259,
694 17.0150461285,17.008804863,17.0025790607,16.9963686535,16.9901735733,
695 16.9839937528,16.9778291251,16.9716796235,16.9655451818,16.9594257344,
696 16.9533212159,16.9472315614,16.9411567063,16.9350965866,16.9290511385,
697 16.9230202986,16.9170040041,16.9110021924,16.9050148013,16.8990417691,
698 16.8930830343,16.8871385358,16.8812082131,16.8752920059,16.8693898542,
699 16.8635016985,16.8576274795,16.8517671385,16.8459206169,16.8400878566,
700 16.8342687999,16.8284633893,16.8226715677,16.8168932783,16.8111284648,
701 16.8053770711,16.7996390414,16.7939143204,16.7882028529,16.7825045842,
702 16.7768194599,16.7711474258,16.7654884282,16.7598424137,16.7542093289,
703 16.7485891212,16.7429817379,16.7373871268,16.731805236,16.7262360139,
704 16.7206794092,16.7151353708,16.7096038479,16.7040847902,16.6985781476,
705 16.69308387,16.687601908,16.6821322124,16.676674734,16.6712294241,
706 16.6657962344,16.6603751165,16.6549660228,16.6495689054,16.6441837172,
707 16.6388104109,16.6334489397,16.6280992572,16.6227613169,16.617435073,
708 16.6121204796,16.6068174911,16.6015260624,16.5962461483,16.5909777043,
709 16.5857206857,16.5804750482,16.575240748,16.5700177411,16.5648059841,
710 16.5596054337,16.5544160468,16.5492377806,16.5440705926,16.5389144403,
711 16.5337692817,16.5286350749,16.5235117782,16.5183993502,16.5132977498,
712 16.5082069358,16.5031268677,16.4980575048,16.4929988068,16.4879507336,
713 16.4829132453,16.4778863024,16.4728698652,16.4678638946,16.4628683516,
714 16.4578831973,16.4529083931,16.4479439006,16.4429896815,16.438045698,
715 16.4331119121,16.4281882863,16.4232747832,16.4183713655,16.4134779963,
716 16.4085946388,16.4037212562,16.3988578123,16.3940042707,16.3891605954,
717 16.3843267505,16.3795027004,16.3746884096,16.3698838428,16.3650889649,
718 16.3603037408,16.3555281359,16.3507621156,16.3460056454,16.3412586913,
719 16.336521219,16.3317931948,16.3270745849,16.3223653558,16.3176654741,
720 16.3129749068,16.3082936207,16.303621583,16.298958761,16.2943051222,
721 16.2896606343,16.285025265,16.2803989824,16.2757817546,16.2711735499,
722 16.2665743366,16.2619840836,16.2574027594,16.2528303331,16.2482667737,
723 16.2437120505,16.2391661329,16.2346289903,16.2301005925,16.2255809094,
724 16.2210699108,16.2165675671,16.2120738484,16.2075887252,16.203112168,
725 16.1986441477,16.194184635,16.189733601,16.1852910168,16.1808568537,
726 16.1764310832,16.1720136768,16.1676046063,16.1632038434,16.1588113602,
727 16.1544271288,16.1500511214,16.1456833105,16.1413236685,16.1369721682,
728 16.1326287822,16.1282934836,16.1239662453,16.1196470405,16.1153358426,
729 16.1110326249,16.1067373611,16.1024500248,16.0981705898,16.0938990301,
730 16.0896353196,16.0853794327,16.0811313435,16.0768910266,16.0726584563,
731 16.0684336075,16.0642164549,16.0600069734,16.055805138,16.0516109239,
732 16.0474243062,16.0432452604,16.0390737619,16.0349097864,16.0307533095,
733 16.026604307,16.022462755,16.0183286294,16.0142019064,16.0100825622,
734 16.0059705733,16.0018659161,15.9977685672,15.9936785032,15.9895957011,
735 15.9855201377,15.98145179,15.9773906352,15.9733366504,15.9692898131,
736 15.9652501006,15.9612174904,15.9571919603,15.9531734879,15.949162051,
737 15.9451576277,15.941160196,15.9371697339,15.9331862197,15.9292096318,
738 15.9252399486,15.9212771486,15.9173212104,15.9133721128,15.9094298345,
739 15.9054943544,15.9015656517,15.8976437053,15.8937284944,15.8898199983,
740 15.8859181964,15.8820230682,15.8781345932,15.874252751,15.8703775214,
741 15.8665088841,15.8626468192,15.8587913065,15.8549423262,15.8510998585,
742 15.8472638835,15.8434343817,15.8396113335,15.8357947194,15.8319845199,
743 15.8281807158,15.8243832879,15.8205922169,15.8168074838,15.8130290697,
744 15.8092569556,15.8054911227,15.8017315522,15.7979782256,15.7942311241,
745 15.7904902294,15.7867555229,15.7830269864,15.7793046016,15.7755883502,
746 15.7718782142,15.7681741756,15.7644762164,15.7607843186,15.7570984646,
747 15.7534186365,15.7497448167,15.7460769876,15.7424151318,15.7387592317,
748 15.7351092701,15.7314652295,15.7278270929,15.7241948431,15.720568463,
749 15.7169479355,15.7133332439,15.7097243711,15.7061213004,15.7025240152,
750 15.6989324987,15.6953467343,15.6917667056,15.6881923961,15.6846237894,
751 15.6810608692,15.6775036193,15.6739520235,15.6704060657,15.6668657298,
752 15.6633309998,15.6598018599,15.6562782942,15.652760287,15.6492478224,
753 15.6457408848,15.6422394587,15.6387435286,15.6352530788,15.6317680941,
754 15.6282885592,15.6248144586,15.6213457773,15.6178825,15.6144246117,
755 15.6109720973,15.6075249419,15.6040831305,15.6006466483,15.5972154805,
756 15.5937896123,15.5903690291,15.5869537163,15.5835436592,15.5801388435,
757 15.5767392546,15.5733448782,15.5699556999,15.5665717054,15.5631928806,
758 15.5598192113,15.5564506833,15.5530872827,15.5497289954,15.5463758074,
759 15.543027705,15.5396846742,15.5363467014,15.5330137727,15.5296858744,
760 15.5263629931,15.5230451151,15.5197322269,15.5164243151,15.5131213662,
761 15.5098233669,15.5065303039,15.5032421639,15.4999589337,15.4966806003,
762 15.4934071504,15.4901385711,15.4868748494,15.4836159722,15.4803619267,
763 15.4771127001,15.4738682796,15.4706286523,15.4673938057,15.464163727,
764 15.4609384036,15.457717823,15.4545019727,15.4512908402,15.4480844132,
765 15.4448826791,15.4416856258,15.4384932409,15.4353055122,15.4321224276,
766 15.4289439748,15.4257701418,15.4226009166,15.4194362872,15.4162762415,
767 15.4131207678,15.409969854,15.4068234885,15.4036816594,15.400544355,
768 15.3974115636,15.3942832736,15.3911594733,15.3880401512,15.3849252958,
769 15.3818148956,15.3787089391,15.3756074151,15.3725103121,15.3694176188,
770 15.366329324,15.3632454164,15.3601658849,15.3570907183,15.3540199055,
771 15.3509534355,15.3478912972,15.3448334797,15.341779972,15.3387307632,
772 15.3356858425,15.3326451991,15.3296088221,15.3265767009,15.3235488246,
773 15.3205251828,15.3175057647,15.3144905597,15.3114795573,15.308472747,
774 15.3054701184,15.3024716609,15.2994773642,15.2964872179,15.2935012118,
775 15.2905193354,15.2875415787,15.2845679312,15.281598383,15.2786329238,
776 15.2756715436,15.2727142322,15.2697609796,15.2668117759,15.2638666111,
777 15.2609254752,15.2579883584,15.2550552508,15.2521261426,15.249201024,
778 15.2462798852,15.2433627166,15.2404495084,15.2375402511,15.2346349349,
779 15.2317335503,15.2288360878,15.2259425378,15.2230528908,15.2201671375,
780 15.2172852684,15.2144072741,15.2115331453,15.2086628726,15.2057964467,
781 15.2029338585,15.2000750986,15.197220158,15.1943690274,15.1915216977,
782 15.1886781598,15.1858384047,15.1830024233,15.1801702066,15.1773417457,
783 15.1745170316,15.1716960554,15.1688788083,15.1660652813,15.1632554657,
784 15.1604493526,15.1576469334,15.1548481993,15.1520531416,15.1492617516,
785 15.1464740206,15.1436899402,15.1409095017,15.1381326965,15.1353595161,
786 15.1325899521,15.1298239959,15.1270616392,15.1243028735,15.1215476904,
787 15.1187960816,15.1160480388,15.1133035537,15.1105626179,15.1078252234,
788 15.1050913618,15.1023610249,15.0996342047,15.0969108929,15.0941910815,
789 15.0914747624,15.0887619276,15.086052569,15.0833466786,15.0806442485,
790 15.0779452707,15.0752497372,15.0725576403,15.0698689721,15.0671837246,
791 15.0645018902,15.0618234609,15.0591484291,15.0564767869,15.0538085268,
792 15.051143641,15.0484821218,15.0458239617,15.0431691529,15.0405176879,
793 15.0378695592,15.0352247593,15.0325832805,15.0299451154,15.0273102566,
794 15.0246786966,15.022050428,15.0194254434,15.0168037355,15.0141852968,
795 15.0115701201,15.0089581981,15.0063495236,15.0037440891,15.0011418876,
796 14.9985429119,14.9959471547,14.9933546088,14.9907652673,14.9881791229,
797 14.9855961686,14.9830163972,14.9804398018,14.9778663754,14.9752961109,
798 14.9727290013,14.9701650398,14.9676042193,14.965046533,14.962491974,
799 14.9599405354,14.9573922104,14.9548469921,14.9523048738,14.9497658486,
800 14.9472299098,14.9446970507,14.9421672646,14.9396405447,14.9371168844,
801 14.9345962771,14.932078716,14.9295641947,14.9270527064,14.9245442447,
802 14.9220388029,14.9195363747,14.9170369533,14.9145405324,14.9120471055,
803 14.9095566662,14.9070692079,14.9045847244,14.9021032092,14.8996246559,
804 14.8971490582,14.8946764098,14.8922067044,14.8897399356,14.8872760973,
805 14.884815183,14.8823571867,14.8799021021,14.877449923,14.8750006433,
806 14.8725542567,14.8701107571,14.8676701385,14.8652323947,14.8627975196,
807 14.8603655072,14.8579363515,14.8555100463,14.8530865858,14.8506659638,
808 14.8482481745,14.8458332119,14.84342107,14.841011743,14.8386052248,
809 14.8362015098,14.8338005919,14.8314024654,14.8290071244,14.8266145631,
810 14.8242247756,14.8218377564,14.8194534995,14.8170719992,14.8146932498,
811 14.8123172457,14.809943981,14.8075734502,14.8052056476,14.8028405675,
812 14.8004782043,14.7981185525,14.7957616063,14.7934073604,14.791055809,
813 14.7887069467,14.7863607679,14.7840172671,14.7816764389,14.7793382777,
814 14.7770027781,14.7746699347,14.7723397421,14.7700121947,14.7676872873,
815 14.7653650145,14.7630453708,14.760728351,14.7584139497,14.7561021616,
816 14.7537929814,14.7514864038,14.7491824235,14.7468810354,14.7445822341,
817 14.7422860144,14.7399923711,14.7377012991,14.7354127931,14.733126848,
818 14.7308434587,14.72856262,14.7262843267,14.7240085739,14.7217353563,
819 14.719464669,14.7171965068,14.7149308648,14.7126677378,14.7104071209,
820 14.7081490091
821 }
822 }
823 };
0 /*
1 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
2 * Copyright (C) 2011 Pete Shorthose
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 * ---------------------------------------------------------------------------
18 *
19 * This is the 6V6 tube table
20 * This file is part of the Guitarix Audio Engine
21 *
22 * ----------------------------------------------------------------------------
23 */
24
25 table1d_imp<2001> tubetable_6V6[2] =
26 {
27 {
28 // Ri = 68k
29 -5,5,200,2001, {
30 239.919843376,239.854937108,239.789738489,239.724247218,239.658462996,
31 239.592385535,239.526014546,239.459349752,239.392390878,239.325137654,
32 239.257589818,239.189747112,239.121609284,239.053176087,238.984447281,
33 238.91542263,238.846101903,238.776484877,238.706571332,238.636361055,
34 238.565853836,238.495049475,238.423947772,238.352548536,238.280851579,
35 238.208856722,238.136563787,238.063972604,237.991083007,237.917894835,
36 237.844407935,237.770622155,237.696537352,237.622153385,237.54747012,
37 237.472487429,237.397205186,237.321623273,237.245741575,237.169559984,
38 237.093078396,237.016296711,236.939214835,236.86183268,236.78415016,
39 236.706167196,236.627883714,236.549299644,236.470414921,236.391229484,
40 236.311743279,236.231956253,236.151868362,236.071479563,235.99078982,
41 235.9097991,235.828507376,235.746914624,235.665020826,235.582825967,
42 235.500330038,235.417533033,235.334434951,235.251035796,235.167335575,
43 235.083334301,234.999031988,234.914428659,234.829524337,234.744319051,
44 234.658812834,234.573005723,234.48689776,234.400488988,234.313779459,
45 234.226769224,234.13945834,234.05184687,233.963934876,233.875722429,
46 233.7872096,233.698396466,233.609283107,233.519869606,233.430156051,
47 233.340142534,233.249829147,233.159215991,233.068303166,232.977090779,
48 232.885578937,232.793767753,232.701657342,232.609247824,232.516539321,
49 232.423531959,232.330225867,232.236621177,232.142718023,232.048516546,
50 231.954016887,231.85921919,231.764123605,231.66873028,231.573039372,
51 231.477051037,231.380765434,231.284182727,231.187303082,231.090126667,
52 230.992653654,230.894884217,230.796818534,230.698456783,230.599799147,
53 230.500845813,230.401596966,230.302052798,230.202213502,230.102079273,
54 230.001650309,229.900926811,229.799908981,229.698597024,229.596991149,
55 229.495091566,229.392898486,229.290412124,229.187632698,229.084560426,
56 228.98119553,228.877538233,228.77358876,228.66934734,228.564814202,
57 228.459989578,228.354873701,228.249466808,228.143769136,228.037780925,
58 227.931502416,227.824933853,227.718075481,227.610927548,227.503490301,
59 227.395763992,227.287748873,227.179445197,227.070853221,226.961973202,
60 226.852805398,226.743350071,226.633607482,226.523577894,226.413261574,
61 226.302658786,226.1917698,226.080594885,225.969134311,225.857388351,
62 225.745357278,225.633041366,225.520440893,225.407556135,225.294387371,
63 225.180934881,225.067198945,224.953179846,224.838877868,224.724293293,
64 224.609426409,224.494277501,224.378846857,224.263134765,224.147141516,
65 224.030867399,223.914312706,223.79747773,223.680362764,223.562968102,
66 223.445294038,223.32734087,223.209108892,223.090598404,222.971809703,
67 222.852743088,222.733398858,222.613777314,222.493878757,222.373703489,
68 222.253251812,222.132524028,222.011520442,221.890241357,221.768687078,
69 221.64685791,221.524754159,221.402376131,221.279724132,221.15679847,
70 221.033599452,220.910127386,220.78638258,220.662365343,220.538075983,
71 220.413514811,220.288682136,220.163578268,220.038203517,219.912558193,
72 219.786642608,219.660457072,219.534001897,219.407277394,219.280283874,
73 219.15302165,219.025491033,218.897692335,218.769625868,218.641291945,
74 218.512690877,218.383822977,218.254688558,218.125287932,217.995621411,
75 217.865689308,217.735491935,217.605029605,217.47430263,217.343311321,
76 217.212055993,217.080536955,216.948754521,216.816709003,216.684400712,
77 216.551829959,216.418997057,216.285902317,216.152546049,216.018928564,
78 215.885050174,215.750911189,215.616511919,215.481852673,215.346933762,
79 215.211755495,215.076318182,214.94062213,214.804667649,214.668455047,
80 214.531984632,214.395256711,214.258271591,214.121029579,213.983530982,
81 213.845776106,213.707765256,213.569498737,213.430976855,213.292199913,
82 213.153168215,213.013882065,212.874341767,212.734547621,212.594499931,
83 212.454198998,212.313645122,212.172838605,212.031779746,211.890468845,
84 211.748906201,211.607092111,211.465026874,211.322710786,211.180144145,
85 211.037327247,210.894260386,210.750943858,210.607377956,210.463562975,
86 210.319499207,210.175186945,210.03062648,209.885818102,209.740762104,
87 209.595458773,209.449908399,209.30411127,209.158067675,209.011777899,
88 208.865242228,208.718460949,208.571434346,208.424162703,208.276646303,
89 208.128885428,207.980880361,207.832631382,207.684138772,207.53540281,
90 207.386423774,207.237201943,207.087737593,206.938031001,206.788082442,
91 206.637892191,206.487460522,206.336787708,206.185874021,206.034719731,
92 205.883325111,205.73169043,205.579815955,205.427701956,205.275348699,
93 205.122756451,204.969925477,204.816856041,204.663548407,204.510002838,
94 204.356219595,204.20219894,204.047941132,203.893446431,203.738715095,
95 203.583747381,203.428543545,203.273103843,203.117428529,202.961517858,
96 202.80537208,202.648991449,202.492376215,202.335526628,202.178442936,
97 202.021125388,201.86357423,201.705789708,201.547772068,201.389521553,
98 201.231038406,201.072322869,200.913375184,200.75419559,200.594784326,
99 200.435141631,200.275267741,200.115162893,199.954827322,199.794261261,
100 199.633464944,199.472438602,199.311182467,199.149696769,198.987981736,
101 198.826037597,198.663864578,198.501462905,198.338832802,198.175974495,
102 198.012888205,197.849574154,197.686032562,197.52226365,197.358267635,
103 197.194044735,197.029595166,196.864919145,196.700016884,196.534888597,
104 196.369534496,196.203954793,196.038149697,195.872119417,195.70586416,
105 195.539384134,195.372679544,195.205750595,195.03859749,194.871220431,
106 194.703619619,194.535795255,194.367747539,194.199476666,194.030982836,
107 193.862266242,193.69332708,193.524165544,193.354781825,193.185176116,
108 193.015348605,192.845299483,192.675028937,192.504537154,192.333824319,
109 192.162890617,191.991736232,191.820361346,191.648766139,191.476950793,
110 191.304915485,191.132660394,190.960185696,190.787491567,190.61457818,
111 190.44144571,190.268094328,190.094524205,189.92073551,189.746728413,
112 189.572503081,189.398059679,189.223398374,189.048519329,188.873422706,
113 188.698108668,188.522577375,188.346828986,188.17086366,187.994681553,
114 187.818282821,187.641667619,187.4648361,187.287788416,187.110524719,
115 186.933045159,186.755349884,186.577439042,186.399312779,186.220971241,
116 186.042414571,185.863642913,185.684656407,185.505455195,185.326039416,
117 185.146409208,184.966564707,184.78650605,184.606233371,184.425746802,
118 184.245046478,184.064132527,183.88300508,183.701664266,183.520110212,
119 183.338343043,183.156362885,182.974169862,182.791764095,182.609145707,
120 182.426314816,182.243271543,182.060016004,181.876548316,181.692868595,
121 181.508976953,181.324873504,181.14055836,180.95603163,180.771293424,
122 180.58634385,180.401183013,180.215811021,180.030227975,179.844433981,
123 179.658429138,179.472213549,179.285787311,179.099150523,178.912303282,
124 178.725245682,178.537977819,178.350499785,178.162811672,177.974913571,
125 177.78680557,177.598487758,177.409960222,177.221223046,177.032276316,
126 176.843120113,176.653754521,176.464179619,176.274395486,176.084402201,
127 175.894199839,175.703788477,175.513168189,175.322339047,175.131301123,
128 174.940054487,174.748599208,174.556935354,174.365062992,174.172982186,
129 173.980693001,173.788195499,173.595489741,173.402575787,173.209453697,
130 173.016123528,172.822585335,172.628839174,172.434885098,172.240723159,
131 172.046353409,171.851775896,171.65699067,171.461997778,171.266797264,
132 171.071389174,170.87577355,170.679950435,170.483919869,170.28768189,
133 170.091236537,169.894583847,169.697723853,169.500656591,169.303382093,
134 169.105900389,168.90821151,168.710315484,168.512212338,168.313902098,
135 168.115384789,167.916660433,167.717729053,167.518590668,167.319245298,
136 167.11969296,166.919933671,166.719967446,166.519794298,166.31941424,
137 166.118827282,165.918033434,165.717032704,165.515825098,165.314410622,
138 165.112789281,164.910961076,164.708926008,164.506684078,164.304235284,
139 164.101579623,163.898717091,163.695647681,163.492371386,163.288888199,
140 163.085198108,162.881301103,162.67719717,162.472886295,162.268368463,
141 162.063643656,161.858711857,161.653573044,161.448227196,161.242674291,
142 161.036914304,160.83094721,160.62477298,160.418391588,160.211803002,
143 160.005007191,159.798004121,159.590793759,159.383376069,159.175751012,
144 158.967918551,158.759878644,158.551631251,158.343176326,158.134513827,
145 157.925643705,157.716565915,157.507280405,157.297787126,157.088086025,
146 156.878177048,156.66806014,156.457735244,156.247202301,156.036461253,
147 155.825512036,155.614354589,155.402988847,155.191414744,154.979632212,
148 154.767641183,154.555441585,154.343033346,154.130416393,153.91759065,
149 153.704556041,153.491312486,153.277859907,153.064198221,152.850327345,
150 152.636247195,152.421957684,152.207458725,151.992750227,151.7778321,
151 151.562704251,151.347366586,151.131819009,150.916061423,150.700093728,
152 150.483915823,150.267527608,150.050928976,149.834119824,149.617100043,
153 149.399869526,149.182428161,148.964775837,148.746912439,148.528837853,
154 148.310551961,148.092054646,147.873345786,147.65442526,147.435292944,
155 147.215948713,146.99639244,146.776623997,146.556643254,146.336450078,
156 146.116044336,145.895425893,145.674594613,145.453550356,145.232292983,
157 145.010822352,144.789138319,144.567240739,144.345129466,144.122804351,
158 143.900265243,143.677511992,143.454544443,143.231362442,143.007965832,
159 142.784354453,142.560528148,142.336486752,142.112230104,141.887758038,
160 141.663070388,141.438166985,141.213047659,140.987712238,140.762160551,
161 140.536392421,140.310407672,140.084206127,139.857787605,139.631151926,
162 139.404298906,139.177228362,138.949940108,138.722433955,138.494709716,
163 138.266767199,138.038606213,137.810226563,137.581628056,137.352810494,
164 137.12377368,136.894517415,136.665041496,136.435345723,136.205429892,
165 135.975293798,135.744937235,135.514359995,135.283561869,135.052542648,
166 134.82130212,134.589840073,134.358156292,134.126250564,133.894122672,
167 133.661772399,133.429199528,133.19640384,132.963385115,132.730143131,
168 132.496677668,132.262988503,132.029075413,131.794938175,131.560576562,
169 131.325990352,131.091179317,130.856143233,130.620881872,130.385395008,
170 130.149682414,129.913743863,129.677579128,129.441187981,129.204570195,
171 128.967725544,128.730653801,128.493354739,128.255828133,128.018073758,
172 127.780091388,127.541880801,127.303441774,127.064774085,126.825877513,
173 126.58675184,126.347396848,126.107812322,125.867998046,125.627953809,
174 125.387679402,125.147174616,124.906439246,124.665473091,124.424275951,
175 124.18284763,123.941187934,123.699296676,123.457173669,123.214818733,
176 122.97223169,122.729412369,122.486360602,122.243076228,121.99955909,
177 121.755809038,121.511825927,121.26760962,121.023159987,120.778476904,
178 120.533560256,120.288409935,120.043025842,119.797407887,119.551555992,
179 119.305470084,119.059150105,118.812596006,118.565807749,118.318785311,
180 118.071528678,117.824037853,117.57631285,117.328353699,117.080160446,
181 116.831733152,116.583071896,116.334176775,116.085047901,115.835685411,
182 115.586089457,115.336260215,115.086197883,114.835902681,114.585374855,
183 114.334614673,114.083622432,113.832398456,113.580943098,113.329256739,
184 113.077339793,112.825192708,112.572815961,112.320210071,112.067375588,
185 111.814313105,111.561023251,111.307506702,111.053764172,110.799796425,
186 110.545604269,110.291188564,110.036550219,109.781690197,109.526609517,
187 109.271309257,109.015790552,108.760054603,108.504102673,108.247936094,
188 107.99155627,107.734964676,107.478162863,107.221152462,106.963935187,
189 106.706512834,106.448887292,106.191060538,105.933034646,105.674811791,
190 105.416394248,105.157784399,104.89898474,104.639997879,104.380826542,
191 104.121473582,103.861941977,103.602234839,103.342355417,103.082307103,
192 102.822093435,102.561718104,102.30118496,102.040498015,101.779661449,
193 101.518679619,101.25755706,100.996298495,100.734908838,100.473393204,
194 100.211756913,99.9500054931,99.6881446953,99.4261804934,99.1641190935,
195 98.9019669409,98.6397307266,98.3774173951,98.115034151,97.8525884667,
196 97.5900880897,97.32754105,97.0649556675,96.8023405592,96.5397046474,
197 96.2770571663,96.01440767,95.7517660395,95.4891424902,95.226547579,
198 94.9639922112,94.7014876479,94.4390455122,94.1766777957,93.9143968652,
199 93.6522154685,93.39014674,93.1282042061,92.8664017902,92.6047538171,
200 92.3432750174,92.0819805307,91.820885909,91.5600071186,91.2993605427,
201 91.0389629817,90.7788316539,90.5189841954,90.2594386585,90.0002135096,
202 89.7413276266,89.4828002945,89.2246512005,88.9669004284,88.709568451,
203 88.4526761221,88.196244667,87.940295672,87.6848510727,87.4299331406,
204 87.1755644693,86.9217679583,86.6685667964,86.4159844438,86.1640446119,
205 85.9127712432,85.6621884888,85.4123206855,85.163192331,84.914828058,
206 84.6672526082,84.4204908033,84.1745675171,83.9295076449,83.6853360732,
207 83.4420776478,83.1997571419,82.9583992232,82.7180284205,82.4786690901,
208 82.2403453816,82.0030812043,81.7669001925,81.5318256718,81.2978806254,
209 81.0650876604,80.8334689751,80.6030463265,80.373840999,80.1458737738,
210 79.9191648987,79.6937340602,79.469600356,79.2467822688,79.025297642,
211 78.8051636567,78.5863968102,78.3690128963,78.1530269874,77.9384534185,
212 77.7253057722,77.5135968673,77.3033387471,77.0945426718,76.8872191109,
213 76.6813777391,76.4770274327,76.274176269,76.0728315269,75.8729996892,
214 75.674686447,75.4778967059,75.2826345928,75.0889034655,74.896705923,
215 74.7060438173,74.5169182664,74.3293296689,74.1432777192,73.958761424,
216 73.7757791196,73.5943284902,73.4144065864,73.2360098455,73.0591341108,
217 72.8837746527,72.7099261894,72.5375829084,72.3667384877,72.1973861174,
218 72.0295185219,71.8631279807,71.698206351,71.5347450886,71.3727352695,
219 71.2121676108,71.0530324916,70.895319974,70.7390198224,70.5841215239,
220 70.4306143075,70.2784871629,70.127728859,69.9783279618,69.8302728517,
221 69.6835517406,69.5381526878,69.3940636164,69.251272328,69.1097665175,
222 68.9695337873,68.8305616607,68.692837595,68.556348994,68.4210832195,
223 68.2870276031,68.1541694565,68.0224960825,67.8919947839,67.7626528733,
224 67.6344576819,67.5073965675,67.3814569225,67.2566261813,67.132891827,
225 67.0102413984,66.8886624955,66.7681427857,66.6486700089,66.5302319826,
226 66.4128166063,66.2964118658,66.1810058376,66.0665866919,65.9531426963,
227 65.8406622188,65.7291337307,65.6185458088,65.5088871381,65.4001465135,
228 65.2923128418,65.1853751436,65.0793225539,64.9741443241,64.869829823,
229 64.7663685372,64.6637500722,64.5619641527,64.4610006235,64.3608494493,
230 64.261500715,64.1629446261,64.0651715079,63.9681718061,63.8719360861,
231 63.776455033,63.6817194506,63.5877202614,63.4944485058,63.4018953417,
232 63.3100520431,63.2189100002,63.1284607182,63.038695816,62.9496070262,
233 62.8611861931,62.7734252727,62.6863163309,62.5998515428,62.5140231916,
234 62.4288236674,62.344245466,62.2602811881,62.1769235376,62.094165321,
235 62.0119994454,61.9304189184,61.8494168459,61.7689864313,61.6891209743,
236 61.6098138696,61.5310586057,61.4528487634,61.3751780152,61.2980401233,
237 61.2214289391,61.1453384013,61.0697625353,60.9946954515,60.9201313444,
238 60.8460644913,60.772489251,60.699400063,60.6267914458,60.554657996,
239 60.4829943874,60.4117953693,60.3410557658,60.2707704748,60.2009344661,
240 60.1315427815,60.0625905326,59.9940729003,59.9259851339,59.8583225495,
241 59.7910805294,59.724254521,59.6578400356,59.5918326476,59.5262279936,
242 59.4610217712,59.3962097382,59.3317877115,59.2677515663,59.2040972355,
243 59.140820708,59.0779180285,59.0153852966,58.9532186654,58.8914143412,
244 58.8299685825,58.768877699,58.708138051,58.6477460488,58.5876981511,
245 58.5279908653,58.4686207459,58.4095843943,58.3508784577,58.2924996285,
246 58.2344446436,58.1767102838,58.119293373,58.0621907773,58.005399405,
247 57.948916205,57.892738167,57.8368623204,57.7812857339,57.7260055146,
248 57.6710188078,57.616322796,57.5619146987,57.5077917713,57.4539513053,
249 57.4003906269,57.3471070972,57.2940981111,57.241361097,57.1888935166,
250 57.1366928636,57.084756664,57.0330824751,56.9816678854,56.9305105136,
251 56.8796080089,56.8289580495,56.7785583433,56.7284066266,56.6785006639,
252 56.6288382478,56.5794171979,56.5302353612,56.4812906111,56.432580847,
253 56.3841039945,56.3358580041,56.2878408518,56.2400505378,56.1924850868,
254 56.1451425476,56.0980209921,56.0511185157,56.0044332366,55.9579632956,
255 55.9117068555,55.8656621011,55.8198272387,55.7742004958,55.7287801209,
256 55.6835643831,55.6385515716,55.5937399958,55.5491279849,55.5047138872,
257 55.4604960706,55.4164729216,55.3726428452,55.3290042651,55.2855556227,
258 55.2422953775,55.1992220065,55.1563340038,55.1136298808,55.0711081657,
259 55.0287674032,54.9866061544,54.9446229966,54.9028165229,54.8611853421,
260 54.8197280785,54.7784433715,54.7373298757,54.6963862605,54.6556112098,
261 54.6150034221,54.5745616098,54.5342844997,54.4941708323,54.4542193616,
262 54.4144288551,54.3747980937,54.3353258713,54.2960109948,54.2568522837,
263 54.2178485702,54.1789986988,54.1403015262,54.1017559213,54.0633607649,
264 54.0251149495,53.9870173791,53.9490669694,53.9112626471,53.8736033501,
265 53.8360880275,53.7987156391,53.7614851554,53.7243955574,53.6874458368,
266 53.6506349953,53.6139620448,53.5774260075,53.5410259151,53.5047608095,
267 53.4686297419,53.4326317732,53.3967659736,53.3610314227,53.3254272092,
268 53.2899524309,53.2546061945,53.2193876154,53.184295818,53.149329935,
269 53.1144891078,53.079772486,53.0451792278,53.0107084993,52.9763594747,
270 52.9421313363,52.9080232742,52.8740344864,52.8401641783,52.8064115633,
271 52.772775862,52.7392563025,52.7058521203,52.672562558,52.6393868653,
272 52.6063242993,52.5733741236,52.5405356091,52.5078080332,52.4751906802,
273 52.442682841,52.4102838131,52.3779929004,52.3458094133,52.3137326685,
274 52.281761989,52.2498967038,52.2181361484,52.1864796639,52.1549265977,
275 52.123476303,52.0921281387,52.0608814697,52.0297356664,51.998690105,
276 51.9677441672,51.9368972401,51.9061487165,51.8754979942,51.8449444767,
277 51.8144875727,51.7841266957,51.7538612649,51.7236907043,51.6936144428,
278 51.6636319146,51.6337425585,51.6039458184,51.5742411427,51.544627985,
279 51.5151058032,51.4856740601,51.4563322228,51.4270797633,51.3979161578,
280 51.3688408872,51.3398534365,51.3109532954,51.2821399576,51.2534129212,
281 51.2247716884,51.1962157658,51.1677446638,51.1393578971,51.1110549843,
282 51.0828354481,51.0546988151,51.0266446158,50.9986723845,50.9707816593,
283 50.9429719823,50.9152428991,50.8875939591,50.8600247153,50.8325347244,
284 50.8051235466,50.7777907458,50.7505358892,50.7233585476,50.6962582952,
285 50.6692347097,50.6422873719,50.6154158663,50.5886197804,50.5618987051,
286 50.5352522345,50.5086799659,50.4821814997,50.4557564396,50.4294043921,
287 50.4031249672,50.3769177775,50.3507824389,50.3247185701,50.2987257929,
288 50.2728037319,50.2469520147,50.2211702716,50.1954581358,50.1698152434,
289 50.1442412332,50.1187357466,50.0932984281,50.0679289244,50.0426268854,
290 50.0173919631,49.9922238125,49.967122091,49.9420864588,49.9171165783,
291 49.8922121146,49.8673727353,49.8425981105,49.8178879127,49.7932418167,
292 49.7686594998,49.7441406417,49.7196849244,49.6952920323,49.670961652,
293 49.6466934725,49.622487185,49.5983424828,49.5742590617,49.5502366195,
294 49.5262748563,49.5023734741,49.4785321775,49.4547506727,49.4310286684,
295 49.4073658752,49.3837620058,49.3602167748,49.336729899,49.3133010971,
296 49.28993009,49.2666166002,49.2433603524,49.2201610732,49.197018491,
297 49.1739323363,49.1509023413,49.12792824,49.1050097686,49.0821466646,
298 49.0593386678,49.0365855194,49.0138869628,48.9912427428,48.968652606,
299 48.9461163009,48.9236335776,48.901204188,48.8788278855,48.8565044252,
300 48.8342335641,48.8120150606,48.7898486748,48.7677341684,48.7456713047,
301 48.7236598486,48.7016995666,48.6797902266,48.6579315983,48.6361234527,
302 48.6143655624,48.5926577015,48.5709996457,48.5493911719,48.5278320588,
303 48.5063220864,48.484861036,48.4634486905,48.4420848342,48.4207692528,
304 48.3995017333,48.3782820642,48.3571100353,48.3359854377,48.314908064,
305 48.2938777081,48.272894165,48.2519572313,48.2310667048,48.2102223845,
306 48.1894240707,48.1686715652,48.1479646707,48.1273031914,48.1066869326,
307 48.0861157009,48.0655893041,48.0451075513,48.0246702526,48.0042772194,
308 47.9839282643,47.963623201,47.9433618444,47.9231440105,47.9029695165,
309 47.8828381808,47.8627498227,47.8427042628,47.8227013227,47.8027408252,
310 47.7828225941,47.7629464542,47.7431122316,47.7233197533,47.7035688473,
311 47.6838593428,47.6641910699,47.6445638598,47.6249775446,47.6054319576,
312 47.5859269331,47.5664623061,47.5470379129,47.5276535906,47.5083091774,
313 47.4890045124,47.4697394356,47.450513788,47.4313274116,47.4121801493,
314 47.3930718448,47.3740023428,47.3549714891,47.3359791301,47.3170251133,
315 47.2981092869,47.2792315003,47.2603916035,47.2415894475,47.2228248841,
316 47.2040977659,47.1854079466,47.1667552804,47.1481396226,47.1295608293,
317 47.1110187573,47.0925132644,47.0740442089,47.0556114503,47.0372148487,
318 47.0188542649,47.0005295607,46.9822405986,46.9639872418,46.9457693543,
319 46.9275868009,46.9094394473,46.8913271597,46.8732498052,46.8552072516,
320 46.8371993674,46.8192260219,46.8012870852,46.7833824279,46.7655119216,
321 46.7476754383,46.7298728509,46.712104033,46.6943688588,46.6766672034,
322 46.6589989423,46.6413639518,46.6237621091,46.6061932917,46.5886573779,
323 46.5711542468,46.5536837781,46.5362458519,46.5188403494,46.501467152,
324 46.4841261421,46.4668172024,46.4495402166,46.4322950687,46.4150816434,
325 46.3978998262,46.3807495031,46.3636305605,46.3465428857,46.3294863665,
326 46.3124608912,46.2954663489,46.2785026291,46.261569622,46.2446672182,
327 46.2277953091,46.2109537865,46.1941425428,46.1773614712,46.1606104651,
328 46.1438894186,46.1271982264,46.1105367837,46.0939049864,46.0773027305,
329 46.0607299131,46.0441864315,46.0276721836,46.0111870677,45.9947309829,
330 45.9783038286,45.9619055047,45.9455359118,45.9291949509,45.9128825234,
331 45.8965985314,45.8803428774,45.8641154643,45.8479161957,45.8317449755,
332 45.8156017082,45.7994862988,45.7833986526,45.7673386755,45.751306274,
333 45.7353013548,45.7193238253,45.7033735933,45.6874505668,45.6715546547,
334 45.6556857661,45.6398438106,45.6240286981,45.6082403393,45.5924786449,
335 45.5767435264,45.5610348956,45.5453526646,45.5296967462,45.5140670535,
336 45.4984635,45.4828859995,45.4673344665,45.4518088158,45.4363089625,
337 45.4208348222,45.4053863109,45.3899633451,45.3745658416,45.3591937176,
338 45.3438468908,45.328525279,45.3132288009,45.297957375,45.2827109208,
339 45.2674893576,45.2522926056,45.2371205849,45.2219732164,45.2068504212,
340 45.1917521207,45.1766782368,45.1616286916,45.1466034078,45.1316023084,
341 45.1166253165,45.101672356,45.0867433507,45.0718382252,45.0569569041,
342 45.0420993126,45.027265376,45.0124550203,44.9976681714,44.9829047559,
343 44.9681647005,44.9534479326,44.9387543794,44.924083969,44.9094366294,
344 44.8948122891,44.8802108769,44.865632322,44.8510765539,44.8365435024,
345 44.8220330976,44.8075452698,44.7930799499,44.778637069,44.7642165583,
346 44.7498183497,44.735442375,44.7210885667,44.7067568573,44.6924471798,
347 44.6781594673,44.6638936534,44.6496496719,44.6354274569,44.6212269429,
348 44.6070480645,44.5928907568,44.578754955,44.5646405947,44.5505476118,
349 44.5364759423,44.5224255228,44.50839629,44.4943881808,44.4804011325,
350 44.4664350827,44.4524899692,44.43856573,44.4246623036,44.4107796285,
351 44.3969176438,44.3830762885,44.369255502,44.3554552242,44.341675395,
352 44.3279159545,44.3141768433,44.3004580021,44.2867593719,44.2730808939,
353 44.2594225098,44.2457841612,44.2321657901,44.2185673388,44.2049887499,
354 44.191429966,44.1778909302,44.1643715857,44.150871876,44.1373917448,
355 44.1239311362,44.1104899942,44.0970682634,44.0836658884,44.0702828141,
356 44.0569189857,44.0435743485,44.0302488482,44.0169424307,44.0036550418,
357 43.990386628,43.9771371358,43.9639065119,43.9506947033,43.9375016571,
358 43.9243273208,43.911171642,43.8980345685,43.8849160484,43.8718160299,
359 43.8587344616,43.8456712922,43.8326264705,43.8195999457,43.8065916671,
360 43.7936015843,43.780629647,43.7676758052,43.7547400091,43.7418222089,
361 43.7289223553,43.7160403991,43.7031762912,43.6903299827,43.6775014252,
362 43.66469057,43.6518973691,43.6391217743,43.6263637378,43.613623212,
363 43.6009001494,43.5881945027,43.5755062248,43.5628352689,43.5501815883,
364 43.5375451365,43.524925867,43.5123237339,43.499738691,43.4871706927,
365 43.4746196934,43.4620856476,43.4495685102,43.437068236,43.4245847802,
366 43.4121180981,43.3996681453,43.3872348772,43.3748182499,43.3624182192,
367 43.3500347414,43.3376677729,43.32531727,43.3129831897,43.3006654886,
368 43.2883641239,43.2760790527,43.2638102324,43.2515576206,43.2393211749,
369 43.2271008533,43.2148966136,43.2027084142,43.1905362133,43.1783799696,
370 43.1662396416,43.1541151882,43.1420065683,43.1299137412,43.1178366661,
371 43.1057753025,43.0937296101,43.0816995485,43.0696850777,43.0576861577,
372 43.0457027489,43.0337348116,43.0217823063,43.0098451938,42.9979234347,
373 42.9860169902,42.9741258213,42.9622498893,42.9503891557,42.938543582,
374 42.9267131299,42.9148977612,42.9030974381,42.8913121225,42.8795417768,
375 42.8677863635,42.856045845,42.8443201841,42.8326093436,42.8209132865,
376 42.809231976,42.7975653752,42.7859134476,42.7742761567,42.7626534662,
377 42.7510453398,42.7394517416,42.7278726355,42.7163079857,42.7047577566,
378 42.6932219127,42.6817004185,42.6701932388,42.6587003383,42.6472216822,
379 42.6357572354,42.6243069633,42.6128708311,42.6014488044,42.5900408488,
380 42.57864693,42.5672670139,42.5559010665,42.5445490538,42.5332109421,
381 42.5218866978,42.5105762873,42.4992796772,42.4879968343,42.4767277253,
382 42.4654723173,42.4542305773,42.4430024724,42.4317879701,42.4205870377,
383 42.4093996427,42.3982257529,42.3870653359,42.3759183598,42.3647847924,
384 42.3536646019,42.3425577565,42.3314642245,42.3203839745,42.309316975,
385 42.2982631946,42.2872226021,42.2761951665,42.2651808567,42.2541796418,
386 42.2431914911,42.2322163739,42.2212542596,42.2103051178,42.1993689181,
387 42.1884456302,42.1775352242,42.1666376698,42.1557529372,42.1448809965,
388 42.1340218181,42.1231753722,42.1123416295,42.1015205604,42.0907121357,
389 42.0799163261,42.0691331025,42.058362436,42.0476042976,42.0368586585,
390 42.0261254899,42.0154047634,42.0046964503,41.9940005222,41.9833169508,
391 41.972645708,41.9619867655,41.9513400953,41.9407056694,41.9300834602,
392 41.9194734397,41.9088755803,41.8982898545,41.8877162349,41.8771546939,
393 41.8666052044,41.8560677391,41.845542271,41.8350287731,41.8245272183,
394 41.81403758,41.8035598313,41.7930939457,41.7826398964,41.7721976572,
395 41.7617672016,41.7513485032,41.740941536,41.7305462738,41.7201626905,
396 41.7097907601,41.699430457,41.6890817552,41.6787446291,41.668419053,
397 41.6581050015,41.6478024491,41.6375113705,41.6272317404,41.6169635335,
398 41.6067067249,41.5964612895,41.5862272023,41.5760044385,41.5657929734,
399 41.5555927821,41.5454038401,41.535226123,41.5250596061,41.5149042652,
400 41.5047600759,41.4946270141,41.4845050556,41.4743941762,41.4642943522,
401 41.4542055595,41.4441277743,41.4340609729,41.4240051315,41.4139602267,
402 41.4039262349,41.3939031326,41.3838908964,41.3738895031,41.3638989294,
403 41.3539191523,41.3439501485,41.3339918952,41.3240443693,41.3141075481,
404 41.3041814088,41.2942659286,41.2843610849,41.2744668552,41.2645832169,
405 41.2547101477,41.2448476251,41.234995627,41.225154131,41.2153231151,
406 41.2055025572,41.1956924352,41.1858927273,41.1761034116,41.1663244663,
407 41.1565558696,41.1467976,41.1370496357,41.1273119554,41.1175845375,
408 41.1078673606,41.0981604035,41.0884636448,41.0787770634,41.0691006382,
409 41.059434348,41.049778172,41.0401320891,41.0304960786,41.0208701195,
410 41.0112541912,41.0016482731,40.9920523444,40.9824663846,40.9728903734,
411 40.9633242901,40.9537681146,40.9442218265,40.9346854055,40.9251588316,
412 40.9156420845,40.9061351443,40.8966379909,40.8871506045,40.8776729651,
413 40.868205053,40.8587468484,40.8492983317,40.8398594831,40.8304302833,
414 40.8210107125,40.8116007515,40.8022003807,40.792809581,40.7834283329,
415 40.7740566174,40.7646944152,40.7553417072,40.7459984744,40.7366646979,
416 40.7273403586,40.7180254378,40.7087199165,40.6994237762,40.6901369979,
417 40.6808595632,40.6715914533,40.6623326499,40.6530831343,40.6438428882,
418 40.6346118932,40.625390131,40.6161775833,40.6069742319,40.5977800587,
419 40.5885950455,40.5794191744,40.5702524272,40.5610947862,40.5519462333,
420 40.5428067507,40.5336763208,40.5245549257,40.5154425477,40.5063391692,
421 40.4972447727,40.4881593407,40.4790828555,40.4700152999,40.4609566565,
422 40.4519069079,40.4428660369,40.4338340262,40.4248108587,40.4157965172,
423 40.4067909847,40.3977942441,40.3888062786,40.3798270711,40.3708566047,
424 40.3618948628,40.3529418284,40.3439974848,40.3350618154,40.3261348035,
425 40.3172164326,40.3083066861,40.2994055475,40.2905130003,40.2816290283,
426 40.2727536149,40.2638867439,40.2550283991,40.2461785643,40.2373372232,
427 40.2285043598,40.219679958,40.2108640017,40.202056475,40.1932573619,
428 40.1844666466,40.1756843131,40.1669103458,40.1581447288,40.1493874464,
429 40.1406384829,40.1318978228,40.1231654504,40.1144413503,40.1057255068,
430 40.0970179046
431 }
432 },
433 {
434 // Ri = 250k
435 -5,5,200,2001, {
436 239.919843376,239.854937108,239.789738489,239.724247218,239.658462996,
437 239.592385535,239.526014546,239.459349752,239.392390878,239.325137654,
438 239.257589818,239.189747112,239.121609284,239.053176087,238.984447281,
439 238.91542263,238.846101903,238.776484877,238.706571332,238.636361055,
440 238.565853836,238.495049475,238.423947772,238.352548536,238.280851579,
441 238.208856722,238.136563787,238.063972604,237.991083007,237.917894835,
442 237.844407935,237.770622155,237.696537352,237.622153385,237.54747012,
443 237.472487429,237.397205186,237.321623273,237.245741575,237.169559984,
444 237.093078396,237.016296711,236.939214835,236.86183268,236.78415016,
445 236.706167196,236.627883714,236.549299644,236.470414921,236.391229484,
446 236.311743279,236.231956253,236.151868362,236.071479563,235.99078982,
447 235.9097991,235.828507376,235.746914624,235.665020826,235.582825967,
448 235.500330038,235.417533033,235.334434951,235.251035796,235.167335575,
449 235.083334301,234.999031988,234.914428659,234.829524337,234.744319051,
450 234.658812834,234.573005723,234.48689776,234.400488988,234.313779459,
451 234.226769224,234.13945834,234.05184687,233.963934876,233.875722429,
452 233.7872096,233.698396466,233.609283107,233.519869606,233.430156051,
453 233.340142534,233.249829147,233.159215991,233.068303166,232.977090779,
454 232.885578937,232.793767753,232.701657342,232.609247824,232.516539321,
455 232.423531959,232.330225867,232.236621177,232.142718023,232.048516546,
456 231.954016887,231.85921919,231.764123605,231.66873028,231.573039372,
457 231.477051037,231.380765434,231.284182727,231.187303082,231.090126667,
458 230.992653654,230.894884217,230.796818534,230.698456783,230.599799147,
459 230.500845813,230.401596966,230.302052798,230.202213502,230.102079273,
460 230.001650309,229.900926811,229.799908981,229.698597024,229.596991149,
461 229.495091566,229.392898486,229.290412124,229.187632698,229.084560426,
462 228.98119553,228.877538233,228.77358876,228.66934734,228.564814202,
463 228.459989578,228.354873701,228.249466808,228.143769136,228.037780925,
464 227.931502416,227.824933853,227.718075481,227.610927548,227.503490301,
465 227.395763992,227.287748873,227.179445197,227.070853221,226.961973202,
466 226.852805398,226.743350071,226.633607482,226.523577894,226.413261574,
467 226.302658786,226.1917698,226.080594885,225.969134311,225.857388351,
468 225.745357278,225.633041366,225.520440893,225.407556135,225.294387371,
469 225.180934881,225.067198945,224.953179846,224.838877868,224.724293293,
470 224.609426409,224.494277501,224.378846857,224.263134765,224.147141516,
471 224.030867399,223.914312706,223.79747773,223.680362764,223.562968102,
472 223.445294038,223.32734087,223.209108892,223.090598404,222.971809703,
473 222.852743088,222.733398858,222.613777314,222.493878757,222.373703489,
474 222.253251812,222.132524028,222.011520442,221.890241357,221.768687078,
475 221.64685791,221.524754159,221.402376131,221.279724132,221.15679847,
476 221.033599452,220.910127386,220.78638258,220.662365343,220.538075983,
477 220.413514811,220.288682136,220.163578268,220.038203517,219.912558193,
478 219.786642608,219.660457072,219.534001897,219.407277394,219.280283874,
479 219.15302165,219.025491033,218.897692335,218.769625868,218.641291945,
480 218.512690877,218.383822977,218.254688558,218.125287932,217.995621411,
481 217.865689308,217.735491935,217.605029605,217.47430263,217.343311321,
482 217.212055993,217.080536955,216.948754521,216.816709003,216.684400712,
483 216.551829959,216.418997057,216.285902317,216.152546049,216.018928564,
484 215.885050174,215.750911189,215.616511919,215.481852673,215.346933762,
485 215.211755495,215.076318182,214.94062213,214.804667649,214.668455047,
486 214.531984632,214.395256711,214.258271591,214.121029579,213.983530982,
487 213.845776106,213.707765256,213.569498737,213.430976855,213.292199913,
488 213.153168215,213.013882066,212.874341767,212.734547621,212.594499931,
489 212.454198998,212.313645123,212.172838605,212.031779747,211.890468845,
490 211.748906201,211.607092111,211.465026874,211.322710786,211.180144146,
491 211.037327247,210.894260386,210.750943858,210.607377956,210.463562975,
492 210.319499207,210.175186945,210.03062648,209.885818102,209.740762104,
493 209.595458773,209.449908399,209.304111271,209.158067675,209.011777899,
494 208.865242229,208.71846095,208.571434346,208.424162703,208.276646303,
495 208.128885429,207.980880362,207.832631383,207.684138772,207.53540281,
496 207.386423774,207.237201943,207.087737593,206.938031001,206.788082442,
497 206.637892192,206.487460523,206.336787708,206.185874021,206.034719732,
498 205.883325112,205.73169043,205.579815956,205.427701956,205.2753487,
499 205.122756451,204.969925477,204.816856041,204.663548407,204.510002838,
500 204.356219596,204.202198941,204.047941133,203.893446432,203.738715096,
501 203.583747382,203.428543546,203.273103844,203.11742853,202.961517859,
502 202.805372081,202.64899145,202.492376216,202.335526629,202.178442938,
503 202.021125389,201.863574231,201.70578971,201.547772069,201.389521554,
504 201.231038407,201.072322871,200.913375185,200.754195591,200.594784328,
505 200.435141633,200.275267743,200.115162895,199.954827324,199.794261263,
506 199.633464946,199.472438604,199.31118247,199.149696771,198.987981739,
507 198.826037599,198.66386458,198.501462908,198.338832806,198.175974498,
508 198.012888208,197.849574157,197.686032566,197.522263653,197.358267639,
509 197.194044739,197.029595171,196.864919149,196.700016888,196.534888602,
510 196.369534501,196.203954798,196.038149702,195.872119422,195.705864166,
511 195.53938414,195.372679551,195.205750602,195.038597496,194.871220438,
512 194.703619627,194.535795263,194.367747547,194.199476675,194.030982844,
513 193.862266251,193.69332709,193.524165554,193.354781836,193.185176127,
514 193.015348617,192.845299495,192.675028949,192.504537166,192.333824332,
515 192.162890631,191.991736246,191.820361361,191.648766155,191.476950809,
516 191.304915502,191.132660411,190.960185714,190.787491586,190.6145782,
517 190.441445731,190.268094349,190.094524227,189.920735533,189.746728437,
518 189.572503106,189.398059705,189.223398401,189.048519357,188.873422736,
519 188.698108699,188.522577407,188.34682902,188.170863695,187.994681589,
520 187.818282858,187.641667658,187.46483614,187.287788459,187.110524763,
521 186.933045205,186.755349932,186.577439092,186.399312831,186.220971295,
522 186.042414627,185.863642971,185.684656468,185.505455258,185.326039482,
523 185.146409276,184.966564778,184.786506124,184.606233447,184.425746882,
524 184.245046561,184.064132614,183.883005171,183.70166436,183.52011031,
525 183.338343145,183.156362991,182.974169972,182.79176421,182.609145826,
526 182.426314941,182.243271672,182.060016139,181.876548456,181.69286874,
527 181.508977105,181.324873662,181.140558524,180.956031801,180.771293602,
528 180.586344035,180.401183206,180.215811221,180.030228184,179.844434198,
529 179.658429365,179.472213784,179.285787556,179.099150778,178.912303547,
530 178.725245958,178.537978106,178.350500084,178.162811983,177.974913895,
531 177.786805907,177.598488109,177.409960587,177.221223426,177.032276711,
532 176.843120525,176.653754949,176.464180064,176.274395949,176.084402683,
533 175.894200341,175.703788999,175.513168732,175.322339612,175.131301711,
534 174.940055099,174.748599845,174.556936017,174.365063682,174.172982904,
535 173.980693748,173.788196276,173.59549055,173.402576629,173.209454574,
536 173.01612444,172.822586284,172.628840161,172.434886125,172.240724228,
537 172.046354521,171.851777054,171.656991875,171.461999032,171.266798569,
538 171.071390532,170.875774963,170.679951906,170.483921399,170.287683483,
539 170.091238194,169.894585571,169.697725648,169.500658458,169.303384036,
540 169.105902411,168.908213614,168.710317673,168.512214616,168.313904469,
541 168.115387256,167.916663,167.717731724,167.518593448,167.31924819,
542 167.11969597,166.919936804,166.719970706,166.51979769,166.319417769,
543 166.118830954,165.918037255,165.71703668,165.515829236,165.314414928,
544 165.112793761,164.910965738,164.70893086,164.506689127,164.304240538,
545 164.10158509,163.898722779,163.6956536,163.492377545,163.288894608,
546 163.085204777,162.881308042,162.677204391,162.472893809,162.268376282,
547 162.063651792,161.858720322,161.653581853,161.448236362,161.242683829,
548 161.036924229,160.830957537,160.624783727,160.41840277,160.211814637,
549 160.005019298,159.79801672,159.590806869,159.38338971,159.175765206,
550 158.967933321,158.759894013,158.551647242,158.343192966,158.134531141,
551 157.925661722,157.716584662,157.507299912,157.297807424,157.088107145,
552 156.878199025,156.668083008,156.457759039,156.247227061,156.036487016,
553 155.825538844,155.614382484,155.403017872,155.191444946,154.979663638,
554 154.767673882,154.55547561,154.34306875,154.130453232,153.917628982,
555 153.704595926,153.491353989,153.277903091,153.064243155,152.850374101,
556 152.636295846,152.422008306,152.207511398,151.992805035,151.777889129,
557 151.562763591,151.347428331,151.131883256,150.916128273,150.700163287,
558 150.483988202,150.267602919,150.051007339,149.834201362,149.617184885,
559 149.399957805,149.182520017,148.964871415,148.74701189,148.528941333,
560 148.310659634,148.092166681,147.873462361,147.654546557,147.435419156,
561 147.216080038,146.996529086,146.776766179,146.556791196,146.336604013,
562 146.116204508,145.895592554,145.674768025,145.453730794,145.23248073,
563 145.011017705,144.789341586,144.56745224,144.345349535,144.123033334,
564 143.900503503,143.677759903,143.454802397,143.231630845,143.008245106,
565 142.784645041,142.560830506,142.336801358,142.112557454,141.888098647,
566 141.663424793,141.438535745,141.213431356,140.988111477,140.76257596,
567 140.536824656,140.310857414,140.084674085,139.858274517,139.631658559,
568 139.40482606,139.177776866,138.950510827,138.72302779,138.495327601,
569 138.267410109,138.039275161,137.810922605,137.582352287,137.353564057,
570 137.124557761,136.89533325,136.665890372,136.436228977,136.206348916,
571 135.976250041,135.745932202,135.515395255,135.284639054,135.053663455,
572 134.822468314,134.591053492,134.359418849,134.127564247,133.895489551,
573 133.663194629,133.430679348,133.197943581,132.964987203,132.73181009,
574 132.498412124,132.264793187,132.030953168,131.796891958,131.562609451,
575 131.328105548,131.093380151,130.85843317,130.623264518,130.387874115,
576 130.152261884,129.916427758,129.680371672,129.444093571,129.207593404,
577 128.970871129,128.733926713,128.496760129,128.259371358,128.021760393,
578 127.783927234,127.545871891,127.307594385,127.069094748,126.830373023,
579 126.591429265,126.352263542,126.112875935,125.873266537,125.633435457,
580 125.393382821,125.153108766,124.91261345,124.671897045,124.430959742,
581 124.189801752,123.948423304,123.706824648,123.465006057,123.222967823,
582 122.980710263,122.738233721,122.495538562,122.252625181,122.009493998,
583 121.766145463,121.522580057,121.278798292,121.034800711,120.790587894,
584 120.546160453,120.30151904,120.056664344,119.811597095,119.566318064,
585 119.320828067,119.075127963,118.82921866,118.583101115,118.336776335,
586 118.090245381,117.84350937,117.596569475,117.349426929,117.102083029,
587 116.854539134,116.606796673,116.358857143,116.110722114,115.862393231,
588 115.613872218,115.365160881,115.116261108,114.867174879,114.61790426,
589 114.368451414,114.118818604,113.86900819,113.619022642,113.368864537,
590 113.118536565,112.868041535,112.617382378,112.366562149,112.115584036,
591 111.864451361,111.613167587,111.361736321,111.11016132,110.858446499,
592 110.60659593,110.354613852,110.102504677,109.850272992,109.597923569,
593 109.345461366,109.09289154,108.840219447,108.587450649,108.334590925,
594 108.081646272,107.828622915,107.575527312,107.322366164,107.069146415,
595 106.815875267,106.562560181,106.309208889,106.055829395,105.802429989,
596 105.549019247,105.295606044,105.042199559,104.78880928,104.535445014,
597 104.282116893,104.028835379,103.775611272,103.522455718,103.26938021,
598 103.016396602,102.763517107,102.510754307,102.258121157,102.00563099,
599 101.75329752,101.501134848,101.249157464,100.997380252,100.74581849,
600 100.494487852,100.243404412,99.9925846399,99.7420454065,99.4918039784,
601 99.2418780182,98.992285581,98.7430451111,98.4941754376,98.2456957684,
602 97.9976256841,97.7499851301,97.5027944079,97.2560741654,97.0098453854,
603 96.764129374,96.5189477467,96.2743224139,96.030275565,95.7868296514,
604 95.5440073677,95.3018316327,95.0603255681,94.8195124769,94.5794158196,
605 94.3400591904,94.1014662917,93.8636609074,93.6266668754,93.3905080596,
606 93.1552083202,92.9207914838,92.687281313,92.4547014744,92.2230755076,
607 91.9924267924,91.7627785162,91.5341536421,91.3065748752,91.0800646308,
608 90.8546450013,90.6303377244,90.4071641513,90.1851452154,89.9643014023,
609 89.7446527197,89.5262186689,89.309018217,89.0930697707,88.8783911506,
610 88.6649995678,88.452911601,88.2421431758,88.0327095454,87.8246252726,
611 87.6179042144,87.4125595073,87.2086035549,87.0060480178,86.8049038042,
612 86.6051810635,86.4068891809,86.2100367742,86.0146316924,85.820681016,
613 85.6281910588,85.4371673718,85.2476147483,85.059537231,84.8729381203,
614 84.6878199835,84.5041846669,84.3220333071,84.1413663453,83.9621835415,
615 83.78448399,83.6082661365,83.4335277947,83.2602661648,83.088477852,
616 82.918158886,82.7493047404,82.581910353,82.4159701465,82.2514780484,
617 82.0884275127,81.9268115401,81.7666226995,81.6078531484,81.450494654,
618 81.2945386136,81.1399760753,80.9867977578,80.8349940706,80.6845551334,
619 80.5354707951,80.387730653,80.2413240706,80.0962401958,79.9524679782,
620 79.8099961858,79.668813422,79.5289081407,79.3902686621,79.2528831875,
621 79.1167398133,78.9818265451,78.8481313104,78.7156419717,78.5843463383,
622 78.4542321781,78.3252872283,78.1974992063,78.0708558196,77.9453447751,
623 77.8209537885,77.6976705926,77.5754829453,77.4543786377,77.3343455008,
624 77.2153714125,77.097444304,76.9805521656,76.8646830525,76.7498250897,
625 76.6359664772,76.5230954944,76.411200504,76.3002699564,76.1902923926,
626 76.081256448,75.9731508553,75.865964447,75.7596861581,75.6543050282,
627 75.5498102036,75.446190939,75.3434365993,75.2415366608,75.1404807122,
628 75.0402584562,74.94085971,74.8422744057,74.7444925918,74.6475044324,
629 74.5513002088,74.4558703183,74.3612052756,74.2672957116,74.1741323741,
630 74.0817061269,73.9900079501,73.8990289392,73.8087603045,73.7191933711,
631 73.630319578,73.542130477,73.4546177327,73.3677731209,73.2815885286,
632 73.1960559524,73.1111674979,73.0269153786,72.943291915,72.8602895336,
633 72.7779007657,72.6961182464,72.6149347136,72.5343430066,72.4543360653,
634 72.3749069287,72.296048734,72.2177547155,72.140018203,72.062832621,
635 71.9861914875,71.9100884125,71.834517097,71.7594713319,71.6849449967,
636 71.6109320582,71.5374265695,71.4644226687,71.3919145776,71.3198966008,
637 71.2483631244,71.1773086147,71.1067276173,71.0366147558,70.9669647305,
638 70.8977723176,70.829032368,70.7607398058,70.692889628,70.6254769025,
639 70.5584967677,70.491944431,70.4258151681,70.3601043217,70.2948073007,
640 70.2299195789,70.1654366943,70.1013542477,70.0376679022,69.974373382,
641 69.9114664714,69.848943014,69.7867989115,69.7250301233,69.663632665,
642 69.6026026079,69.5419360781,69.4816292553,69.4216783727,69.3620797151,
643 69.302829619,69.2439244713,69.1853607088,69.127134817,69.0692433298,
644 69.0116828285,68.9544499408,68.8975413407,68.8409537471,68.7846839236,
645 68.7287286773,68.6730848588,68.6177493608,68.5627191177,68.5079911053,
646 68.4535623394,68.399429876,68.3455908099,68.2920422747,68.238781442,
647 68.1858055204,68.1331117557,68.0806974294,68.0285598591,67.9766963971,
648 67.9251044304,67.8737813799,67.8227247,67.7719318779,67.7214004334,
649 67.671127918,67.6211119148,67.5713500377,67.521839931,67.4725792692,
650 67.4235657562,67.3747971248,67.3262711367,67.2779855816,67.2299382769,
651 67.1821270675,67.1345498251,67.0872044479,67.0400888603,66.9932010121,
652 66.9465388788,66.9001004606,66.8538837821,66.8078868926,66.7621078646,
653 66.7165447945,66.6711958016,66.626059028,66.5811326384,66.5364148192,
654 66.491903779,66.4475977476,66.4034949759,66.3595937358,66.3158923195,
655 66.2723890395,66.2290822282,66.1859702377,66.1430514394,66.1003242235,
656 66.0577869994,66.0154381946,65.9732762552,65.9312996451,65.8895068457,
657 65.8478963563,65.806466693,65.7652163892,65.7241439947,65.6832480761,
658 65.642527216,65.6019800131,65.5616050819,65.5214010526,65.4813665705,
659 65.4415002962,65.4018009052,65.3622670877,65.3228975484,65.2836910063,
660 65.2446461946,65.2057618602,65.1670367641,65.1284696804,65.0900593968,
661 65.0518047142,65.0137044463,64.9757574197,64.9379624738,64.9003184602,
662 64.8628242429,64.825478698,64.7882807137,64.7512291898,64.7143230378,
663 64.6775611809,64.6409425534,64.6044661009,64.5681307798,64.5319355578,
664 64.4958794131,64.4599613344,64.4241803212,64.388535383,64.3530255396,
665 64.317649821,64.282407267,64.2472969272,64.2123178609,64.1774691369,
666 64.1427498335,64.1081590383,64.0736958481,64.0393593686,64.0051487146,
667 63.9710630098,63.9371013865,63.9032629857,63.8695469568,63.8359524576,
668 63.8024786545,63.7691247216,63.7358898415,63.7027732045,63.669774009,
669 63.636891461,63.6041247743,63.5714731704,63.5389358781,63.5065121337,
670 63.4742011808,63.4420022703,63.4099146602,63.3779376154,63.3460704081,
671 63.3143123171,63.2826626281,63.2511206336,63.2196856325,63.1883569306,
672 63.1571338399,63.1260156789,63.0950017724,63.0640914515,63.0332840535,
673 63.0025789217,62.9719754055,62.9414728602,62.9110706472,62.8807681334,
674 62.8505646917,62.8204597006,62.7904525442,62.7605426122,62.7307292997,
675 62.7010120074,62.6713901411,62.6418631122,62.6124303372,62.5830912378,
676 62.5538452407,62.5246917779,62.4956302862,62.4666602075,62.4377809884,
677 62.4089920806,62.3802929404,62.3516830289,62.3231618119,62.2947287596,
678 62.2663833472,62.238125054,62.2099533641,62.1818677657,62.1538677518,
679 62.1259528192,62.0981224695,62.0703762081,62.0427135449,62.0151339937,
680 61.9876370727,61.9602223038,61.9328892131,61.9056373307,61.8784661904,
681 61.8513753301,61.8243642916,61.7974326202,61.7705798651,61.7438055793,
682 61.7171093194,61.6904906456,61.6639491218,61.6374843153,61.6110957971,
683 61.5847831416,61.5585459265,61.5323837333,61.5062961465,61.4802827541,
684 61.4543431474,61.4284769208,61.4026836724,61.376963003,61.3513145168,
685 61.3257378211,61.3002325264,61.2747982461,61.2494345967,61.2241411979,
686 61.1989176721,61.1737636448,61.1486787445,61.1236626024,61.0987148526,
687 61.0738351323,61.049023081,61.0242783416,60.9996005592,60.9749893819,
688 60.9504444605,60.9259654483,60.9015520014,60.8772037785,60.8529204409,
689 60.8287016523,60.8045470791,60.7804563903,60.7564292571,60.7324653534,
690 60.7085643554,60.6847259419,60.660949794,60.637235595,60.6135830308,
691 60.5899917896,60.5664615617,60.5429920399,60.5195829191,60.4962338965,
692 60.4729446717,60.4497149461,60.4265444237,60.4034328102,60.3803798139,
693 60.357385145,60.3344485156,60.3115696402,60.2887482352,60.2659840191,
694 60.2432767122,60.2206260372,60.1980317183,60.1754934821,60.1530110568,
695 60.1305841728,60.1082125622,60.0858959592,60.0636340995,60.041426721,
696 60.0192735634,59.9971743681,59.9751288783,59.9531368392,59.9311979974,
697 59.9093121016,59.8874789021,59.865698151,59.8439696018,59.8222930102,
698 59.8006681332,59.7790947295,59.7575725597,59.7361013857,59.7146809713,
699 59.6933110816,59.6719914837,59.6507219459,59.6295022382,59.6083321322,
700 59.587211401,59.5661398192,59.5451171629,59.5241432098,59.5032177389,
701 59.4823405308,59.4615113675,59.4407300325,59.4199963107,59.3993099884,
702 59.3786708534,59.3580786947,59.3375333029,59.3170344698,59.2965819887,
703 59.2761756541,59.2558152619,59.2355006095,59.2152314953,59.1950077192,
704 59.1748290824,59.1546953873,59.1346064375,59.1145620381,59.0945619952,
705 59.0746061163,59.05469421,59.0348260863,59.0150015562,58.9952204321,
706 58.9754825273,58.9557876566,58.9361356358,58.9165262819,58.896959413,
707 58.8774348483,58.8579524084,58.8385119146,58.8191131897,58.7997560573,
708 58.7804403424,58.7611658707,58.7419324694,58.7227399664,58.7035881909,
709 58.684476973,58.665406144,58.6463755361,58.6273849825,58.6084343176,
710 58.5895233766,58.5706519958,58.5518200125,58.533027265,58.5142735925,
711 58.4955588353,58.4768828345,58.4582454322,58.4396464715,58.4210857965,
712 58.402563252,58.384078684,58.3656319393,58.3472228655,58.3288513112,
713 58.310517126,58.2922201602,58.2739602651,58.2557372929,58.2375510965,
714 58.2194015299,58.2012884478,58.1832117056,58.16517116,58.1471666681,
715 58.129198088,58.1112652786,58.0933680997,58.0755064118,58.0576800761,
716 58.039888955,58.0221329113,58.0044118086,57.9867255116,57.9690738855,
717 57.9514567963,57.9338741109,57.9163256968,57.8988114223,57.8813311564,
718 57.8638847691,57.8464721308,57.8290931127,57.8117475869,57.7944354261,
719 57.7771565037,57.7599106939,57.7426978714,57.7255179118,57.7083706914,
720 57.691256087,57.6741739762,57.6571242374,57.6401067494,57.6231213918,
721 57.6061680451,57.58924659,57.5723569081,57.5554988818,57.5386723939,
722 57.5218773279,57.505113568,57.488380999,57.4716795062,57.4550089757,
723 57.4383692942,57.4217603489,57.4051820278,57.3886342192,57.3721168123,
724 57.3556296967,57.3391727627,57.3227459011,57.3063490034,57.2899819617,
725 57.2736446684,57.2573370167,57.2410589004,57.2248102138,57.2085908517,
726 57.1924007095,57.1762396831,57.1601076691,57.1440045645,57.127930267,
727 57.1118846745,57.0958676858,57.0798792,57.063919117,57.0479873368,
728 57.0320837602,57.0162082886,57.0003608236,56.9845412676,56.9687495233,
729 56.952985494,56.9372490836,56.9215401962,56.9058587367,56.8902046103,
730 56.8745777228,56.8589779803,56.8434052895,56.8278595578,56.8123406926,
731 56.796848602,56.7813831948,56.7659443798,56.7505320667,56.7351461652,
732 56.719786586,56.7044532397,56.6891460378,56.6738648919,56.6586097143,
733 56.6433804175,56.6281769146,56.6129991191,56.597846945,56.5827203065,
734 56.5676191185,56.5525432961,56.537492755,56.5224674112,56.507467181,
735 56.4924919814,56.4775417297,56.4626163434,56.4477157406,56.4328398399,
736 56.41798856,56.4031618202,56.3883595402,56.37358164,56.35882804,
737 56.3440986611,56.3293934243,56.3147122514,56.3000550642,56.2854217851,
738 56.2708123367,56.2562266421,56.2416646249,56.2271262086,56.2126113176,
739 56.1981198764,56.1836518097,56.1692070429,56.1547855016,56.1403871117,
740 56.1260117995,56.1116594916,56.097330115,56.0830235971,56.0687398656,
741 56.0544788483,56.0402404738,56.0260246706,56.0118313678,55.9976604948,
742 55.9835119812,55.969385757,55.9552817525,55.9411998985,55.9271401258,
743 55.9131023657,55.89908655,55.8850926104,55.8711204792,55.8571700891,
744 55.8432413727,55.8293342633,55.8154486945,55.8015845998,55.7877419134,
745 55.7739205698,55.7601205035,55.7463416495,55.7325839431,55.7188473199,
746 55.7051317156,55.6914370665,55.677763309,55.6641103798,55.6504782158,
747 55.6368667544,55.6232759331,55.6097056897,55.5961559624,55.5826266896,
748 55.5691178099,55.5556292623,55.542160986,55.5287129205,55.5152850055,
749 55.501877181,55.4884893873,55.475121565,55.4617736549,55.448445598,
750 55.4351373357,55.4218488095,55.4085799613,55.3953307332,55.3821010675,
751 55.3688909069,55.3557001941,55.3425288723,55.3293768848,55.3162441752,
752 55.3031306873,55.2900363653,55.2769611534,55.2639049962,55.2508678385,
753 55.2378496253,55.2248503018,55.2118698137,55.1989081067,55.1859651266,
754 55.1730408198,55.1601351326,55.1472480117,55.134379404,55.1215292566,
755 55.1086975168,55.0958841322,55.0830890507,55.0703122201,55.0575535887,
756 55.0448131049,55.0320907175,55.0193863752,55.0067000272,54.9940316227,
757 54.9813811114,54.9687484428,54.956133567,54.943536434,54.9309569943,
758 54.9183951983,54.9058509969,54.893324341,54.8808151818,54.8683234706,
759 54.8558491591,54.8433921989,54.8309525421,54.8185301409,54.8061249475,
760 54.7937369146,54.7813659949,54.7690121413,54.7566753071,54.7443554455,
761 54.73205251,54.7197664544,54.7074972325,54.6952447985,54.6830091066,
762 54.6707901112,54.6585877671,54.646402029,54.634232852,54.6220801911,
763 54.6099440019,54.5978242398,54.5857208606,54.5736338202,54.5615630746,
764 54.5495085801,54.5374702932,54.5254481704,54.5134421685,54.5014522444,
765 54.4894783554,54.4775204586,54.4655785116,54.4536524719,54.4417422974,
766 54.429847946,54.4179693758,54.4061065451,54.3942594124,54.3824279364,
767 54.3706120757,54.3588117893,54.3470270364,54.3352577761,54.323503968,
768 54.3117655715,54.3000425465,54.2883348527,54.2766424504,54.2649652996,
769 54.2533033607,54.2416565943,54.2300249609,54.2184084215,54.206806937,
770 54.1952204684,54.1836489771,54.1720924245,54.1605507722,54.1490239817,
771 54.1375120151,54.1260148343,54.1145324014,54.1030646788,54.0916116288,
772 54.0801732141,54.0687493974,54.0573401415,54.0459454094,54.0345651643,
773 54.0231993694,54.0118479883,54.0005109843,53.9891883213,53.977879963,
774 53.9665858734,53.9553060167,53.944040357,53.9327888587,53.9215514863,
775 53.9103282045,53.8991189781,53.8879237718,53.8767425508,53.8655752802,
776 53.8544219253,53.8432824515,53.8321568244,53.8210450096,53.8099469729,
777 53.7988626803,53.7877920977,53.7767351915,53.7656919278,53.7546622731,
778 53.7436461939,53.7326436569,53.721654629,53.7106790769,53.6997169678,
779 53.6887682688,53.6778329471,53.6669109702,53.6560023055,53.6451069207,
780 53.6342247836,53.6233558619,53.6125001237,53.6016575371,53.5908280702,
781 53.5800116914,53.5692083692,53.558418072,53.5476407686,53.5368764276,
782 53.5261250181,53.5153865089,53.5046608693,53.4939480683,53.4832480754,
783 53.47256086,53.4618863916,53.4512246399,53.4405755746,53.4299391657,
784 53.419315383,53.4087041967,53.398105577,53.3875194941,53.3769459184,
785 53.3663848205,53.355836171,53.3452999404,53.3347760998,53.3242646199,
786 53.3137654719,53.3032786267,53.2928040557,53.2823417301,53.2718916214,
787 53.261453701,53.2510279406,53.240614312,53.2302127868,53.2198233371,
788 53.2094459348,53.1990805521,53.1887271611,53.1783857341,53.1680562435,
789 53.1577386619,53.1474329617,53.1371391157,53.1268570966,53.1165868773,
790 53.1063284308,53.09608173,53.0858467482,53.0756234586,53.0654118344,
791 53.0552118491,53.0450234762,53.0348466893,53.0246814621,53.0145277683,
792 53.0043855819,52.9942548766,52.9841356267,52.9740278062,52.9639313893,
793 52.9538463503,52.9437726636,52.9337103037,52.9236592451,52.9136194624,
794 52.9035909305,52.8935736241,52.883567518,52.8735725874,52.8635888072,
795 52.8536161525,52.8436545987,52.833704121,52.8237646948,52.8138362956,
796 52.8039188989,52.7940124804,52.7841170158,52.7742324808,52.7643588514,
797 52.7544961035,52.7446442132,52.7348031565,52.7249729097,52.7151534489,
798 52.7053447507,52.6955467913,52.6857595473,52.6759829952,52.6662171118,
799 52.6564618738,52.6467172578,52.636983241,52.6272598001,52.6175469122,
800 52.6078445544,52.598152704,52.5884713381,52.5788004341,52.5691399694,
801 52.5594899214,52.5498502678,52.5402209861,52.5306020539,52.5209934492,
802 52.5113951496,52.5018071332,52.4922293778,52.4826618616,52.4731045626,
803 52.463557459,52.4540205291,52.4444937512,52.4349771037,52.425470565,
804 52.4159741138,52.4064877284,52.3970113878,52.3875450705,52.3780887554,
805 52.3686424213,52.3592060472,52.3497796121,52.340363095,52.3309564751,
806 52.3215597316,52.3121728436,52.3027957907,52.293428552,52.2840711072,
807 52.2747234357,52.2653855171,52.2560573311,52.2467388573,52.2374300756,
808 52.2281309658,52.2188415077,52.2095616814,52.2002914668,52.1910308441,
809 52.1817797934,52.1725382949,52.1633063289,52.1540838757,52.1448709156,
810 52.1356674293,52.1264733971,52.1172887997,52.1081136176,52.0989478315,
811 52.0897914223,52.0806443707,52.0715066576,52.0623782639,52.0532591707,
812 52.0441493588,52.0350488095,52.0259575039,52.0168754232,52.0078025486,
813 51.9987388616,51.9896843435,51.9806389757,51.9716027398,51.9625756172,
814 51.9535575896,51.9445486387,51.9355487462,51.9265578938,51.9175760635,
815 51.908603237,51.8996393962,51.8906845233,51.8817386003,51.8728016091,
816 51.8638735321,51.8549543514,51.8460440492,51.8371426079,51.8282500099,
817 51.8193662375,51.8104912732,51.8016250996,51.7927676992,51.7839190547,
818 51.7750791486,51.7662479639,51.7574254831,51.7486116892,51.7398065651,
819 51.7310100936,51.7222222578,51.7134430406,51.7046724253,51.6959103948,
820 51.6871569323,51.6784120212,51.6696756447,51.660947786,51.6522284287,
821 51.643517556,51.6348151515,51.6261211987,51.6174356812,51.6087585825,
822 51.6000898864,51.5914295766,51.5827776367,51.5741340507,51.5654988023,
823 51.5568718755,51.5482532542,51.5396429225,51.5310408642,51.5224470636,
824 51.5138615047,51.5052841718,51.496715049,51.4881541206,51.4796013709,
825 51.4710567843,51.4625203452,51.453992038,51.4454718472,51.4369597573,
826 51.428455753,51.4199598188,51.4114719394,51.4029920995,51.3945202839,
827 51.3860564773,51.3776006646,51.3691528308,51.3607129606,51.352281039,
828 51.3438570512,51.3354409821,51.3270328167,51.3186325404,51.3102401382,
829 51.3018555953,51.293478897,51.2851100286,51.2767489755,51.268395723,
830 51.2600502566,51.2517125617,51.2433826238,51.2350604285,51.2267459613,
831 51.218439208,51.210140154,51.2018487853,51.1935650874,51.1852890462,
832 51.1770206476,51.1687598773,51.1605067213,51.1522611655,51.1440231959,
833 51.1357927985,51.1275699594,51.1193546647,51.1111469005,51.1029466529,
834 51.0947539083,51.0865686527,51.0783908726,51.0702205543,51.062057684,
835 51.0539022483,51.0457542335,51.0376136261,51.0294804127,51.0213545797,
836 51.0132361137
837 }
838 }
839 };
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18 #include <stdint.h>
19 // level 1 - 10
20 class Ampf
21 {
22 public:
23 inline void compute(int32_t count, float *input0, float *output0, float value) {
24 double fSlow0 = value*0.5;
25 double fSlow1 = (fSlow0 * pow(10,(0 - (0.1 * fSlow0))));
26 for (int i=0; i<count; i++) {
27 output0[i] = fSlow1 * input0[i];
28 }
29 };
30 Ampf() {};
31 ~Ampf() {};
32 };
33
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 struct CabDesc
21 {
22 int32_t ir_count;
23 uint32_t ir_sr;
24 float ir_data[];
25 };
26
27 template <int32_t tab_size>
28 struct CabDesc_imp
29 {
30 int32_t ir_count;
31 uint32_t ir_sr;
32 float ir_data[tab_size];
33 operator CabDesc&()
34 {
35 return *(CabDesc*)this;
36 }
37 };
38
39 /**----------------------------- cabinet impulse response data --------------------------------**/
40 CabDesc_imp<1000> cab_data_4x12 = {
41 1000, 48000,
42 { 0.0210554,0.0750885,0.139243,0.180713,0.184139,0.144903,0.0686037,-0.0185033,-0.0886042,-0.12552,
43 -0.121363,-0.0787852,-0.0213013,0.0229356,0.0411458,0.0370145,0.0195269,-0.00133213,-0.0152812,-0.0145159,
44 -0.00183383,0.0137818,0.0256187,0.0286779,0.0207782,0.0077942,-0.00120299,-0.0031918,-0.00206098,-0.00135227,
45 -0.00140983,-0.00497816,-0.0130377,-0.0218103,-0.0277226,-0.0286464,-0.0215221,-0.00951618,-0.00086607,0.0013951,
46 4.17435e-05,-0.00319773,-0.00740044,-0.00716618,-0.00255126,0.00219789,0.00519503,0.00521192,0.000273707,-0.00618929,
47 -0.00908,-0.010311,-0.0123735,-0.0142287,-0.017697,-0.0241029,-0.0284137,-0.0277091,-0.0227469,-0.0152625,
48 -0.00519387,0.00359817,0.00729039,0.00671523,0.00318916,-0.00156796,-0.0063908,-0.00976712,-0.0129904,-0.017544,
49 -0.022616,-0.0259348,-0.0261542,-0.0244839,-0.0203182,-0.0130093,-0.00603727,-0.0032797,-0.00488236,-0.00846209,
50 -0.0130562,-0.0172578,-0.019061,-0.0178728,-0.0150705,-0.0105603,-0.00434051,0.000776129,0.00313197,0.00289589,
51 0.00099021,-0.00304687,-0.00856731,-0.0134404,-0.0173033,-0.019982,-0.0200995,-0.0189035,-0.0176908,-0.0158077,
52 -0.0144982,-0.0144288,-0.0148401,-0.0143923,-0.0124568,-0.00914924,-0.00554664,-0.00161911,0.00204186,0.00466298,
53 0.00609433,0.00586043,0.00444049,0.00230369,-0.000460247,-0.00331487,-0.00620476,-0.00860464,-0.00977339,-0.0103904,
54 -0.010582,-0.010316,-0.00959965,-0.0079265,-0.00490751,-0.000773675,0.00326292,0.0060596,0.00712823,0.0062126,
55 0.00304346,-0.00120159,-0.00554078,-0.00940086,-0.0116814,-0.0115473,-0.00920741,-0.00570695,-0.00192381,0.00131636,
56 0.00313601,0.00310522,0.0019866,0.00024603,-0.00151895,-0.00254442,-0.00257635,-0.00162088,0.000189493,0.00233523,
57 0.00431406,0.00546426,0.00550678,0.00412306,0.00163322,-0.00135299,-0.00397516,-0.00564887,-0.00616138,-0.00556616,
58 -0.00411866,-0.00213908,-0.000414186,0.000858571,0.00146968,0.00134177,0.000706731,0.000101598,-2.74503e-05,0.000216126,
59 0.000921334,0.00170689,0.00206986,0.00178904,0.00108999,0.000418435,-0.000329494,-0.00108679,-0.00160318,-0.00186207,
60 -0.00184908,-0.00174925,-0.0017532,-0.00168678,-0.00128635,-0.000532894,0.000551346,0.00173037,0.00285549,0.00381329,
61 0.00444954,0.00483888,0.00505528,0.00517976,0.00536394,0.00566848,0.00582878,0.00582337,0.00573454,0.00568407,
62 0.005573,0.00543545,0.00536728,0.00536814,0.00553587,0.00596405,0.00663779,0.00725726,0.00749624,0.00707181,
63 0.00588561,0.00408059,0.00192134,3.47446e-05,-0.00100598,-0.000915017,4.2448e-05,0.00134795,0.00249509,0.00322568,
64 0.0035816,0.00386374,0.00451921,0.00540239,0.0062616,0.00694728,0.0072783,0.00703991,0.00629145,0.00535576,
65 0.00433242,0.0032916,0.00256128,0.00234155,0.00256369,0.00301814,0.00356167,0.00389767,0.00377937,0.00333664,
66 0.00305993,0.00308825,0.00323129,0.00347644,0.00368722,0.00369027,0.0035434,0.0033256,0.00313601,0.00318107,
67 0.00358381,0.00415188,0.00472327,0.00508203,0.00512893,0.00469563,0.00385072,0.00285837,0.00193384,0.0011745,
68 0.000625585,0.000444931,0.000447908,0.000509171,0.000766472,0.00131361,0.00198278,0.00252006,0.00288339,0.00305278,
69 0.00301612,0.00284385,0.0027595,0.0028841,0.00307673,0.00335143,0.00374592,0.00420453,0.00472283,0.00537605,
70 0.00605867,0.00667969,0.0071488,0.00726939,0.00694415,0.00626471,0.00550721,0.0049613,0.00471663,0.00477505,
71 0.00498066,0.00516581,0.00520946,0.00505574,0.00483425,0.00468391,0.00466834,0.00471656,0.00470018,0.00453961,
72 0.0042108,0.00375276,0.00315533,0.00236797,0.00148797,0.000770994,0.000356717,0.000263414,0.000411073,0.00065758,
73 0.000956942,0.00116598,0.00118259,0.0010794,0.00090411,0.000730068,0.000713639,0.00101561,0.00158903,0.0022272,
74 0.00269874,0.00283804,0.00266545,0.00230882,0.00195122,0.00177202,0.0018221,0.00198835,0.00219707,0.0024585,
75 0.00262623,0.00258478,0.00247114,0.00236725,0.00229178,0.00227378,0.00223327,0.0020942,0.0018775,0.00165049,
76 0.00145125,0.0013392,0.00133322,0.0013771,0.00146459,0.00154074,0.00148781,0.00131534,0.00115589,0.00110735,
77 0.00111562,0.00117102,0.0011977,0.00112514,0.000940195,0.000626312,0.000241008,-0.000110301,-0.000294454,-0.00026455,
78 -3.9153e-05,0.000364625,0.000848391,0.00124397,0.00133727,0.00111349,0.00081935,0.000737272,0.000979052,0.00152794,
79 0.00229764,0.00300549,0.00349459,0.00378848,0.00383738,0.00362037,0.00319689,0.00261696,0.00202673,0.00153753,
80 0.0010692,0.000529509,-3.48582e-05,-0.000518806,-0.000836461,-0.000893089,-0.000683757,-0.00041539,-0.000240531,-0.000199855,
81 -0.00040037,-0.000829803,-0.00130214,-0.00175941,-0.00214005,-0.00239538,-0.00255126,-0.00260319,-0.00258167,-0.00258312,
82 -0.00261625,-0.00257821,-0.00243703,-0.00224874,-0.002035,-0.0018443,-0.00177327,-0.00182376,-0.00196122,-0.00222559,
83 -0.00246046,-0.0023872,-0.00200267,-0.00146368,-0.000895475,-0.000426638,-0.000116391,8.54413e-05,0.000229487,0.000434546,
84 0.000783401,0.00125185,0.00170428,0.00195945,0.00191818,0.00165093,0.0013,0.000928947,0.00048422,-4.45158e-05,
85 -0.000552028,-0.000942422,-0.00123235,-0.00149559,-0.00177645,-0.00204586,-0.00228739,-0.00245312,-0.00249216,-0.00238563,
86 -0.00216864,-0.00195288,-0.00184076,-0.0018401,-0.00190445,-0.00195077,-0.0018578,-0.00162677,-0.00132209,-0.00103643,
87 -0.000946898,-0.00112221,-0.00150406,-0.00195615,-0.00229437,-0.00239499,-0.00218277,-0.0017268,-0.00124285,-0.00091104,
88 -0.000849391,-0.00104366,-0.00129184,-0.00138022,-0.00126944,-0.00107845,-0.000937854,-0.000922902,-0.00107965,-0.00139665,
89 -0.00174952,-0.00198203,-0.00202984,-0.00187962,-0.0015708,-0.00124176,-0.00109158,-0.00130834,-0.0019349,-0.00284735,
90 -0.00377169,-0.00432535,-0.00427272,-0.00367104,-0.00275803,-0.00184037,-0.00124326,-0.00112073,-0.00138117,-0.00175739,
91 -0.00199908,-0.00197451,-0.00163986,-0.00107954,-0.000508739,-0.000136274,-2.69049e-05,-0.000195924,-0.000604997,-0.00107277,
92 -0.00139074,-0.00147588,-0.00138458,-0.00119441,-0.00105561,-0.00112623,-0.00139983,-0.00174871,-0.00207738,-0.00232496,
93 -0.00235838,-0.00213469,-0.00182601,-0.00162957,-0.00156907,-0.00164833,-0.00185294,-0.00208449,-0.002181,-0.00207736,
94 -0.00181851,-0.00145291,-0.00105886,-0.000777402,-0.000693301,-0.000780538,-0.000966736,-0.00110846,-0.00100441,-0.000639605,
95 -0.000167997,0.000278684,0.000595589,0.000718707,0.000677736,0.000535644,0.000359331,0.000214058,0.000116118,-2.04741e-05,
96 -0.000248734,-0.000545983,-0.00088025,-0.00122061,-0.0015376,-0.00175523,-0.00175457,-0.00148886,-0.00107979,-0.000750293,
97 -0.000715752,-0.00112187,-0.0019394,-0.0029335,-0.00377016,-0.00421975,-0.00417837,-0.00370331,-0.00304405,-0.00245053,
98 -0.00210699,-0.00207797,-0.0022711,-0.00249086,-0.00253708,-0.00230403,-0.00181831,-0.00124433,-0.000780152,-0.000599361,
99 -0.00073175,-0.00104361,-0.00127435,-0.00119859,-0.000762859,-8.26917e-05,0.000629675,0.00112308,0.00126592,0.0011715,
100 0.00103854,0.000983915,0.00102964,0.00109781,0.00111035,0.000980961,0.000642923,0.000128366,-0.000457361,-0.000965123,
101 -0.00129109,-0.00143212,-0.00144318,-0.0014024,-0.00139796,-0.00148234,-0.00166874,-0.00191579,-0.00211699,-0.00215912,
102 -0.0020502,-0.00183696,-0.00155674,-0.00122281,-0.000867206,-0.000589227,-0.000474017,-0.000498718,-0.000541393,-0.000489083,
103 -0.000283456,6.39901e-05,0.000442908,0.000769699,0.000966486,0.000987869,0.000807193,0.000472449,6.91029e-05,-0.000300749,
104 -0.000520124,-0.000506989,-0.000277707,-7.49884e-07,0.000197924,0.000303067,0.000322268,0.000290614,0.000293023,0.000353695,
105 0.000410527,0.000420457,0.000342197,0.000133297,-0.000165088,-0.000453839,-0.000679258,-0.000834689,-0.000952602,-0.00110901,
106 -0.00138581,-0.00176734,-0.00213167,-0.00235534,-0.00238038,-0.0022105,-0.0018848,-0.00142392,-0.000878386,-0.000337561,
107 0.000124526,0.000442113,0.000576183,0.000579069,0.000590295,0.000704595,0.000887021,0.00101477,0.0010045,0.000847664,
108 0.000575138,0.000306771,0.000121299,3.08588e-05,9.36218e-06,-8.68729e-05,-0.000309611,-0.000568184,-0.000781879,-0.00090086,
109 -0.000816373,-0.000530804,-0.00015868,0.000212172,0.000470813,0.000541848,0.000420117,0.000213262,5.74002e-05,5.44461e-05,
110 0.000231169,0.000503149,0.000735295,0.000831939,0.000801057,0.00070564,0.000658602,0.000765108,0.00102202,0.00132866,
111 0.00158623,0.00171223,0.00161877,0.00138119,0.00109374,0.000773789,0.000429865,0.000119368,-0.000121345,-0.000232623,
112 -0.000125412,0.000170474,0.000515011,0.000714866,0.000659852,0.000381759,2.34736e-05,-0.000255279,-0.000353581,-0.00027348,
113 -8.40097e-05,0.000180108,0.000442772,0.000595703,0.00059443,0.000443181,0.00020006,-4.72427e-05,-0.000237849,-0.000336152,
114 -0.000260891,-1.77245e-06,0.000308816,0.000549233,0.000726773,0.000843596,0.000880568,0.000881363,0.000886135,0.000917471,
115 0.000981234,0.00105438,0.00110092,0.0011346,0.00116191,0.00120611,0.00130918,0.00150924,0.00173518,0.00188839,
116 0.0019312,0.00182619,0.00154596,0.00111546,0.000674054,0.000338175,0.000137615,6.37174e-05,9.953e-05,0.000188198,
117 0.000251211,0.000265322,0.000236736,0.000180904,0.000111483,2.96318e-05,-4.73336e-05,-8.53731e-05,-1.88834e-05,0.000190425,
118 0.000533576,0.000938581,0.00131834,0.00155549,0.00158925,0.00148725,0.0013572,0.00129875,0.00134022,0.00146789,
119 0.00163836,0.00174532,0.00169876,0.00147691,0.00111449,0.000735204,0.000492014,0.000435092,0.000515761,0.000663783,
120 0.000799262,0.00084905,0.000801557,0.000690779,0.000557527,0.000428524,0.000314815,0.00019497,5.04922e-05,-0.000104847,
121 -0.000234282,-0.000318564,-0.000372079,-0.000385258,-0.00035599,-0.0003227,-0.000303067,-0.000293341,-0.000320655,-0.000354127,
122 -0.000328881,-0.000232259,-0.000107938,1.18163e-05,0.000143091,0.000270049,0.000361626,0.000452498,0.00056314,0.000661147,
123 0.000724365,0.000744134,0.000727273,0.00072107,0.000736863,0.000779379,0.000855094,0.000962941,0.00110471,0.00125183,
124 0.001321,0.00125508,0.00107511,0.000815532,0.000494719,0.000180608,-4.70381e-05,-0.000147682,-0.000113164,2.06559e-05,
125 0.000179654,0.000301226,0.00036008,0.000352877,0.000314178,0.000264527,0.000197424,0.000127707,7.75789e-05,3.03816e-05,
126 -4.49248e-05,-0.000123981,-0.000188198,-0.000230032,-0.000205332,-9.22811e-05,8.61003e-05,0.000310111,0.000546188,0.00074752,
127 0.000886044,0.000967781,0.000983915,0.000906905,0.000743066,0.000538462,0.000377373,0.000343151,0.000430569,0.000540598,
128 0.000564958,0.000431751,0.000133502,-0.000251643,-0.000614836,-0.000844801,-0.00086966,-0.000704595,-0.000452021,-0.000232532,
129 -0.00011021,-9.40536e-05,-0.000144818,-0.000166747,-0.000102916,5.03785e-05,0.000256278,0.000434682,0.000496309,0.000419026,
130 0.000240804,4.47203e-05,-9.02133e-05,-0.000122117,-6.04452e-05,1.82926e-05,5.15602e-05,1.39297e-05,-0.00012089,-0.00033004,
131 -0.000557345,-0.000726751,-0.000759268,-0.000650285,-0.000450657,-0.00021608,3.68579e-05,0.000297704,0.000538644,0.000710049,
132 0.00077363,0.000723092,0.000614791,0.000532167,0.000514057,0.00058116,0.000682076,0.00072566,0.000673282,0.000508217,
133 0.000270299,6.37401e-05,-5.79001e-05,-0.000104257,-9.17585e-05,-6.15359e-05,-5.7741e-05,-7.34204e-05,-8.94407e-05,-0.000104779,
134 -0.00013891,-0.000166588,-0.000132638,-2.27237e-05,0.000174609,0.00045193,0.00072032,0.000864434,0.000871569,0.000768994,
135 0.00059284,0.00041948,0.000294795,0.000222579,0.000194515,0.000144409,-1.60202e-05,-0.000275753,-0.000566662,-0.00085005,
136 -0.00107913,-0.00119302,-0.00120593,-0.00115421,-0.00108797,-0.00107377,-0.00112567,-0.00117748,-0.00117754,-0.00112203,
137 -0.00103152,-0.000931128,-0.000873637,-0.000869274,-0.000861684,-0.000822599,-0.000761041,-0.000649717,-0.000460974,-0.000247598,
138 -6.14223e-05,9.10313e-05,0.000194265,0.000208968,0.000170814,0.000139069,0.000142114,0.000191107,0.000249529,0.000275162,
139 0.000279048,0.000277048,0.000268231,0.000283933,0.000336425,0.000397711,0.000432933,0.0004093,0.00032804,0.000203196,
140 6.06951e-05,-4.35841e-05,-8.5464e-05,-7.4602e-05,-3.88122e-05,-4.04483e-05,-0.000130343,-0.00030134,-0.000497514,-0.000679258,
141 -0.000815623,-0.000864775,-0.000821327,-0.000721615,-0.000589863,-0.000465223,-0.000387599,-0.000366648,-0.000385849,-0.000436
142 }
143 };
144
145 CabDesc_imp<256> cab_data_2x12 = {
146 256, 48000,
147 { 0.000143433, -0.00176392, -0.00148621, -0.000708008, -0.00242004, -0.00015564, -0.00227661, 0.00195923, -0.000411987, -0.0011322, 0.00241699, -0.00110779, 0.00299988,
148 -0.000100708, 0.000189209, 0.00255127, -0.00119019, 0.00362854, -0.000640869, 0.000799561, 0.00148926, -0.0009552, -0.000741577, 0.0017334, -0.00278931, -0.00083313,
149 0.000411987, -0.0014679, -0.00211182, -0.000662231, -0.00348206, -0.00157166, -0.00445557, -0.00551147, -0.00564575, -0.00552673, -0.00611267, -0.007901, -0.00586548,
150 -0.00760193, -0.00686646, -0.010202, -0.00746155, -0.00887146, -0.0119141, -0.0100189, -0.0115234, -0.0120728, -0.0124878, -0.0139679, -0.0155396, -0.0146942,
151 -0.0170868, -0.0169342, -0.0191925, -0.017276, -0.0189301, -0.0201874, -0.0189819, -0.0203156, -0.020752, -0.0187805, -0.019931, -0.0156586, -0.0159058,
152 -0.0126221, -0.0113953, -0.00873108, -0.00889282, -0.00210876, -0.0026825, 0.00179138, 0.00219421, 0.00495605, 0.00692444, 0.00840759, 0.0102356, 0.014975,
153 0.019455, 0.0266296, 0.0396606, 0.052948, 0.0664978, 0.0833435, 0.0918762, 0.0999908, 0.0972931, 0.0924927, 0.0758545, 0.054422, 0.0295898,
154 0.00602417, -0.0216614, -0.0355194, -0.0448547, -0.0399078, -0.0199615, 0.00698242, 0.0346191, 0.0591583, 0.0692841, 0.0647217, 0.0514526, 0.0332001,
155 0.0167999, 0.00681458, 0.00488281, 0.00647888, 0.0122345, 0.0148865, 0.0147125, 0.00926208, 0.00722961, 0.000537109, 0.00311279, 0.0019928, 0.00849304,
156 0.00611877, 0.00529175, 0.00500793, 0.00375671, 0.00472717, 0.00438538, 0.00638123, 0.0071991, 0.00927429, 0.0129761, 0.0149109, 0.0128357, 0.0157562,
157 0.0125854, 0.0104034, 0.00974121, 0.0106659, 0.0100616, 0.00920105, 0.0147186, 0.00974426, 0.0111176, 0.00884399, 0.00645752, 0.00431519, 0.00408325,
158 0.00221252, 0.000546265, 0.00363464, -0.00218201, 0.00339966, 0.00130615, 0.00484009, 0.002771, 0.00285339, 0.00342407, 0.00233765, 0.00296021, 0.00154114,
159 0.00496216, 0.00328369, 0.0069397, 0.00532227, 0.00668945, 0.00419006, 0.00760803, 0.00194397, 0.00585327, 0.00207825, 0.00577087, 0.00396423, 0.00489502,
160 0.00350037, 0.00200195, 0.00146179, 0.000360107, -0.00267944, -0.000491333, -0.00198975, -3.35693e-05, -0.00172119, -0.00174561, -0.00203552, -0.00316162, -0.00356445,
161 -0.00203552, -0.00137329, -0.000125122, -0.0014679, 0.00169983, -0.00302734, -0.000732422, -0.00154114, 0.00132141, 0.00317993, 0.00477905, 0.00530701, 0.00194397,
162 0.00465393, 0.00020752, -0.00163574, 0.00102844, 0.000671387, 0.00357056, 0.00527344, 0.00367432, 0.00550232, 0.000964355, 0.000823975, -0.0027832, -0.00310669,
163 -0.00472412, -0.00222473, -0.000158691, -0.00157166, 0.00230713, 0.00313721, 0.00281067, 0.0050415, 0.000247192, 0.00225525, 0.00065918, -0.00229492, -0.00158997,
164 -0.00288391, -0.00158081, -0.00151978, 0.000778198, -0.00110779, 0.0043457, 0.00118408, 0.00274353, 0.00305481, -0.00177917, 0.00302429, -0.00206604, -0.00274048,
165 -0.00111694, -0.00370483, -0.00282898, -0.00700989, -0.00551453, -0.00950012, -0.00652161, -0.00733643, -0.00209961, -0.00406799, -0.00316162, -0.00356445, -0.00203552,
166 -0.00137329, -0.000125122, -0.0014679, 0.00169983, -0.00302734, -0.000732422, -0.00154114, 0.00132141, 0.00317993
167 }
168 };
169
170 CabDesc_imp<768> cab_data_1x12 = {
171 768, 48000,
172 { -0.00323486, -0.0026062, -0.00215454, -0.00219116, -0.00232544, -0.00252686, -0.002948, -0.00360107, -0.00460205, -0.00614014, -0.00812988, -0.0102478, -0.0127991,
173 -0.0177124, -0.02771, -0.0431702, -0.0599945, -0.0708221, -0.0681854, -0.0474915, -0.0095398, 0.0378418, 0.0806122, 0.0999969, 0.0999969, 0.0800568,
174 0.0421997, -0.00293579, -0.0395203, -0.057785, -0.0583466, -0.0467346, -0.0289368, -0.0101624, 0.00603027, 0.0182739, 0.0267273, 0.0316956, 0.0329712,
175 0.0304016, 0.0247803, 0.017749, 0.0108948, 0.00513916, 0.000915527, -0.0013855, -0.00125732, 0.00157471, 0.00671997, 0.0129822, 0.0184143, 0.0207336,
176 0.0182556, 0.0109802, 0.000982666, -0.00841675, -0.0141663, -0.0147156, -0.0104309, -0.00318604, 0.00450439, 0.0104492, 0.013446, 0.0133362, 0.0107178,
177 0.00665894, 0.00249023, -0.000457764, -0.00115967, 0.000714111, 0.00458984, 0.00911255, 0.0126099, 0.0137512, 0.0121033, 0.00830078, 0.00375977, 8.54492e-05,
178 -0.0015564, -0.000823975, 0.00172729, 0.00490723, 0.00735474, 0.00796509, 0.00628052, 0.00263672, -0.00196533, -0.00614014, -0.00858765, -0.00855103, -0.0060852,
179 -0.00204468, 0.00221558, 0.00528564, 0.00625, 0.00495605, 0.00204468, -0.00131836, -0.00386353, -0.0046936, -0.00354004, -0.000854492, 0.00239258, 0.00506592,
180 0.0062561, 0.00559692, 0.00337524, 0.000402832, -0.00227051, -0.00375366, -0.00361328, -0.00202026, 0.00032959, 0.00247192, 0.00354004, 0.00303345, 0.00101929,
181 -0.00193481, -0.00493774, -0.00710449, -0.00784302, -0.00702515, -0.0050415, -0.0026123, -0.000579834, 0.000408936, 7.93457e-05, -0.00136108, -0.00332031, -0.00504761,
182 -0.00588989, -0.00551147, -0.0039978, -0.00186157, 0.000189209, 0.00145264, 0.00150757, 0.000341797, -0.00163574, -0.00372925, -0.0052124, -0.00556641, -0.00467529,
183 -0.00284424, -0.000726318, 0.000921631, 0.00150146, 0.000732422, -0.0012085, -0.00378418, -0.00626221, -0.00796509, -0.00845947, -0.00770874, -0.00604858, -0.00406494,
184 -0.00238647, -0.00150757, -0.00159912, -0.00249634, -0.00377808, -0.00490723, -0.00545044, -0.0052002, -0.00426025, -0.00296631, -0.00180054, -0.00115967, -0.00125122,
185 -0.00201416, -0.00314331, -0.00421143, -0.00482178, -0.00476074, -0.00404053, -0.00294189, -0.00186768, -0.00123291, -0.00127563, -0.00201416, -0.00321045, -0.00445557,
186 -0.00533447, -0.0055481, -0.00501099, -0.00392456, -0.00266113, -0.00166626, -0.00127563, -0.00162964, -0.0026062, -0.00388184, -0.0050354, -0.00567627, -0.00557861,
187 -0.00476685, -0.00348511, -0.00211182, -0.00106812, -0.000640869, -0.000897217, -0.00169067, -0.00269165, -0.00352173, -0.00388184, -0.0036499, -0.00292358, -0.00197754,
188 -0.00115356, -0.000726318, -0.000830078, -0.00140991, -0.00224609, -0.00305786, -0.00357056, -0.0036377, -0.00325928, -0.00257568, -0.00182495, -0.00125732, -0.0010498,
189 -0.00126343, -0.00178833, -0.0024292, -0.00292358, -0.00306396, -0.00276489, -0.0020752, -0.00120239, -0.000421143, 4.88281e-05, 7.32422e-05, -0.000317383, -0.000952148,
190 -0.00157471, -0.00195312, -0.00194702, -0.00155029, -0.000909424, -0.000244141, 0.000213623, 0.000305176, 1.2207e-05, -0.00055542, -0.00118408, -0.00163574, -0.00174561,
191 -0.00146484, -0.000878906, -0.000170898, 0.00043335, 0.000744629, 0.000683594, 0.000299072, -0.000256348, -0.000775146, -0.00106812, -0.00103149, -0.00067749, -0.00012207,
192 0.000445557, 0.000842285, 0.000958252, 0.00078125, 0.000396729, -3.66211e-05, -0.000341797, -0.000384521, -0.000134277, 0.000354004, 0.000927734, 0.00142212, 0.00168457,
193 0.00165405, 0.00136108, 0.000915527, 0.000482178, 0.000213623, 0.000189209, 0.000427246, 0.000836182, 0.00128174, 0.00162964, 0.00177612, 0.00169067, 0.00141602,
194 0.00106812, 0.000775146, 0.000634766, 0.000701904, 0.000952148, 0.00130005, 0.00164185, 0.00187988, 0.00195923, 0.00188599, 0.00172119, 0.00154419, 0.00145264,
195 0.00148926, 0.00164795, 0.00187988, 0.00209351, 0.00222778, 0.00223389, 0.00211182, 0.0019165, 0.00172729, 0.00162964, 0.00166626, 0.00184937, 0.00213013,
196 0.00241089, 0.0026123, 0.00265503, 0.00253296, 0.00227051, 0.00195923, 0.00169067, 0.0015625, 0.00160522, 0.00181885, 0.00213013, 0.00245972, 0.00270386,
197 0.00280762, 0.00275269, 0.00256958, 0.00234375, 0.00213623, 0.00202026, 0.00202637, 0.00213013, 0.00227661, 0.00241089, 0.00247803, 0.00245361, 0.00234375,
198 0.00219116, 0.00206299, 0.00201416, 0.00206909, 0.00221558, 0.00241699, 0.0026062, 0.00272217, 0.00272827, 0.00262451, 0.00244751, 0.0022522, 0.00209961,
199 0.00203857, 0.0020813, 0.00220947, 0.00236816, 0.00251465, 0.00259399, 0.00259399, 0.00252075, 0.00239868, 0.00229492, 0.00224609, 0.00227661, 0.00237427,
200 0.00251465, 0.00264282, 0.00272217, 0.00272217, 0.00263062, 0.00248413, 0.00231323, 0.00218506, 0.00211792, 0.00213013, 0.00219727, 0.00229492, 0.00238037,
201 0.00241089, 0.00238037, 0.00228271, 0.00216064, 0.00204468, 0.00197144, 0.00196533, 0.00202026, 0.00211182, 0.00219727, 0.0022522, 0.00223999, 0.00216675,
202 0.00205078, 0.0019165, 0.00181274, 0.00176392, 0.00176392, 0.00181885, 0.00188599, 0.00194702, 0.00196533, 0.00192871, 0.00184326, 0.0017395, 0.00164795,
203 0.00158691, 0.00158081, 0.00162354, 0.00169067, 0.00176392, 0.00180664, 0.00180664, 0.00175171, 0.00166626, 0.0015686, 0.00148926, 0.00145264, 0.00145264,
204 0.00148926, 0.00154419, 0.00158081, 0.00158081, 0.00154419, 0.00147095, 0.00137939, 0.00128784, 0.00122681, 0.00120239, 0.0012146, 0.00124512, 0.00128784,
205 0.00130005, 0.00128174, 0.00122681, 0.00114136, 0.0010498, 0.000976562, 0.000927734, 0.000915527, 0.000933838, 0.000964355, 0.000976562, 0.000970459, 0.000933838,
206 0.000860596, 0.000775146, 0.000689697, 0.000628662, 0.000598145, 0.000592041, 0.000610352, 0.000628662, 0.000628662, 0.000604248, 0.00055542, 0.000482178, 0.000402832,
207 0.000341797, 0.000299072, 0.000292969, 0.000299072, 0.000317383, 0.000323486, 0.000317383, 0.000286865, 0.000231934, 0.000164795, 9.76563e-05, 4.88281e-05, 2.44141e-05,
208 2.44141e-05, 3.66211e-05, 4.88281e-05, 4.88281e-05, 2.44141e-05, -1.83105e-05, -7.93457e-05, -0.000140381, -0.000195313, -0.000231934, -0.000244141, -0.000238037, -0.000231934,
209 -0.00022583, -0.000231934, -0.000262451, -0.000305176, -0.000360107, -0.000415039, -0.00045166, -0.000469971, -0.000469971, -0.000463867, -0.00045166, -0.00045166, -0.000463867,
210 -0.000500488, -0.000543213, -0.000598145, -0.000640869, -0.000665283, -0.00067749, -0.000683594, -0.00067749, -0.00067749, -0.000683594, -0.000714111, -0.000756836, -0.000805664,
211 -0.000848389, -0.000891113, -0.000915527, -0.000927734, -0.000927734, -0.000927734, -0.000933838, -0.000958252, -0.00098877, -0.0010376, -0.00108032, -0.00112305, -0.00114746,
212 -0.00116577, -0.00117188, -0.00117188, -0.00117188, -0.00118408, -0.0012085, -0.00124512, -0.00128174, -0.00132446, -0.00134888, -0.00136719, -0.00137329, -0.00137939,
213 -0.00137939, -0.0013855, -0.00139771, -0.00142212, -0.00145874, -0.00148926, -0.00151978, -0.00153809, -0.00155029, -0.00155029, -0.00155029, -0.00155029, -0.0015564,
214 -0.00157471, -0.00159302, -0.00162354, -0.00164795, -0.00166626, -0.00167847, -0.00167847, -0.00167236, -0.00166626, -0.00166016, -0.00166626, -0.00168457, -0.00170288,
215 -0.00172119, -0.0017334, -0.0017395, -0.00174561, -0.0017395, -0.00172729, -0.00172119, -0.00171509, -0.00171509, -0.0017334, -0.00174561, -0.00175781, -0.00176392,
216 -0.00176392, -0.00175781, -0.00175171, -0.0017395, -0.00172729, -0.00172729, -0.0017334, -0.0017395, -0.00174561, -0.00175171, -0.00175171, -0.00174561, -0.0017395,
217 -0.00172119, -0.00170898, -0.00170288, -0.00170288, -0.00170288, -0.00170898, -0.00170898, -0.00170898, -0.00170288, -0.00169678, -0.00167847, -0.00166626, -0.00165405,
218 -0.00164795, -0.00164185, -0.00164185, -0.00164795, -0.00164795, -0.00164185, -0.00162964, -0.00161743, -0.00160522, -0.00159302, -0.00158081, -0.00157471, -0.00157471,
219 -0.00157471, -0.00157471, -0.00157471, -0.0015625, -0.0015564, -0.00153809, -0.00152588, -0.00151367, -0.00150146, -0.00149536, -0.00149536, -0.00149536, -0.00148926,
220 -0.00148315, -0.00147095, -0.00145874, -0.00144653, -0.00143433, -0.00142212, -0.00141602, -0.00140991, -0.00140381, -0.00140381, -0.00139771, -0.0013916, -0.00137939,
221 -0.00136108, -0.00134888, -0.00133667, -0.00132446, -0.00131836, -0.00131836, -0.00131226, -0.00130615, -0.00129395, -0.00128784, -0.00127563, -0.00126343, -0.00125122,
222 -0.00123901, -0.00122681, -0.0012207, -0.0012146, -0.0012085, -0.00120239, -0.00119019, -0.00118408, -0.00116577, -0.00115356, -0.00114136, -0.00112915, -0.00112305,
223 -0.00111084, -0.00110474, -0.00109863, -0.00108643, -0.00107422, -0.00106201, -0.0010498, -0.0010376, -0.00102539, -0.00101318, -0.00100708, -0.000994873, -0.00098877,
224 -0.000976562, -0.000970459, -0.000952148, -0.000933838, -0.000921631, -0.000909424, -0.000897217, -0.00088501, -0.000872803, -0.000866699, -0.000854492, -0.000842285, -0.000830078,
225 -0.000817871, -0.000799561, -0.00078125, -0.000769043, -0.000756836, -0.000744629, -0.000738525, -0.000726318, -0.000708008, -0.000695801, -0.000683594, -0.000665283, -0.000646973,
226 -0.000634766, -0.000616455, -0.000604248, -0.000592041, -0.000579834, -0.000567627, -0.00055542, -0.000543213, -0.000524902, -0.000506592, -0.000488281, -0.000469971, -0.000457764,
227 -0.000445557, -0.000427246, -0.000415039, -0.0012085, -0.00120239, -0.00119019, -0.00118408, -0.00116577, -0.00115356, -0.00114136, -0.00112915, -0.00112305, -0.00111084,
228 -0.00110474, -0.00109863, -0.00108643, -0.00107422, -0.00106201, -0.0010498, -0.0010376, -0.00102539, -0.00101318, -0.00100708, -0.000994873, -0.00098877, -0.000976562,
229 -0.000970459, -0.000952148, -0.000933838, -0.000921631, -0.000909424, -0.000897217, -0.00088501, -0.000872803, -0.000866699, -0.000854492, -0.000842285, -0.000830078, -0.000817871,
230 -0.000799561, -0.00078125, -0.000769043, -0.000756836, -0.000744629, -0.000738525, -0.000726318, -0.000708008, -0.000695801, -0.000683594, -0.000665283, -0.000646973, -0.000634766,
231 -0.000616455
232 }
233 };
234
235 CabDesc_imp<192> cab_data_4x10 = {
236 192, 48000,
237 { -0.00127869, 0.00161743, 0.00407104, 0.00612183, 0.00762024, 0.00864563, 0.00959778, 0.0106781, 0.012323, 0.0140106, 0.0155396, 0.0171661, 0.0183319,
238 0.0191315, 0.0198395, 0.0205811, 0.0225037, 0.0254089, 0.0303925, 0.0372711, 0.0453613, 0.053598, 0.0605743, 0.0649933, 0.0650116, 0.0606659,
239 0.0507782, 0.0354889, 0.0160004, -0.00758972, -0.03237, -0.0576294, -0.0792542, -0.0948212, -0.0999908, -0.0914398, -0.068631, -0.0339661, 0.00720825,
240 0.0443512, 0.0698151, 0.0776123, 0.0687683, 0.0484406, 0.0240448, 0.00180359, -0.0130371, -0.0180328, -0.0166748, -0.0127258, -0.00917053, -0.0100311,
241 -0.012796, -0.0172699, -0.0201721, -0.0199005, -0.0164795, -0.0103485, -0.00448303, 0.00255737, 0.0116364, 0.0191681, 0.025708, 0.0295044, 0.02995,
242 0.0285522, 0.0245453, 0.0208923, 0.017215, 0.0149109, 0.0141632, 0.0138, 0.0138672, 0.011972, 0.0101074, 0.00586548, 0.000982666, -0.00349121,
243 -0.00653687, -0.00697937, -0.00524902, -0.00151367, 0.00343323, 0.00736694, 0.0103119, 0.0115204, 0.0104492, 0.00857239, 0.00618896, 0.00401306, 0.0024292,
244 0.00177307, 0.00161743, 0.00158081, 0.00184937, 0.00117493, 0.00020752, -0.00119629, -0.00360718, -0.00652771, -0.00944214, -0.0124268, -0.0143829, -0.0154663,
245 -0.0145752, -0.0119659, -0.00792542, -0.00200806, 0.00418396, 0.00961609, 0.0153625, 0.0190033, 0.0211456, 0.0216125, 0.0208405, 0.0193878, 0.017038,
246 0.0155701, 0.0131287, 0.0117371, 0.00980835, 0.00735779, 0.0049408, 0.00132751, -0.00110474, -0.00444031, -0.00651245, -0.00769653, -0.00765686, -0.00734558,
247 -0.00555115, -0.00413818, -0.00224304, -0.00125732, -5.79834e-05, -0.000350952, -0.00117188, -0.00144348, -0.0026062, -0.00310364, -0.00305481, -0.00302124, -0.00183411,
248 -0.000488281, 0.000585938, 0.00231934, 0.00340271, 0.00406494, 0.00453491, 0.00434265, 0.004245, 0.00285339, 0.00235901, 0.00172729, 0.00112305, 0.00126038,
249 0.00177307, 0.00145874, 0.0016449, 0.00185242, 0.000848389, -2.74658e-05, -0.000836182, -0.0020752, -0.0032196, -0.00380859, -0.00497742, -0.00567932, -0.00545349,
250 -0.00553589, -0.00474548, -0.00353088, -0.00265198, -0.000836182, 0.000234985, 0.0011322, 0.00188599, 0.00175476, 0.00196533, 0.000793457, 0.000292969, -0.000595093,
251 -0.00149841, -0.00177307, -0.00255737, -0.00216064, -0.00216675, -0.00181885, -0.000634766, -0.00444031, -0.00651245, -0.00769653
252 }
253 };
254
255 CabDesc_imp<896> cab_data_2x10 = {
256 896, 48000,
257 { 0.000701904, 0.000823975, 0.00101318, 0.0013916, 0.000299072, -0.00462647, -0.0127136, -0.0191956, -0.0182678, -0.00629272, 0.0156799, 0.041217, 0.0609344,
258 0.0665375, 0.0536774, 0.023584, -0.0168274, -0.0571197, -0.0869965, -0.0999969, -0.09534, -0.0768219, -0.0508453, -0.0246521, -0.0041687, 0.00806885,
259 0.0136108, 0.0166321, 0.0211365, 0.028302, 0.0363892, 0.0423523, 0.0434326, 0.0385742, 0.0293823, 0.0194702, 0.0121216, 0.00860596, 0.00822144,
260 0.00960693, 0.0114746, 0.0130127, 0.0138916, 0.0137878, 0.0119385, 0.00778198, 0.0020874, -0.00289307, -0.00475464, -0.00239258, 0.00332642, 0.0101624,
261 0.0153625, 0.0167786, 0.013739, 0.00699463, -0.00172729, -0.0103699, -0.0168518, -0.0196838, -0.0183411, -0.0133484, -0.00605469, 0.00200195, 0.00923462,
262 0.0139893, 0.0151001, 0.0125854, 0.00786743, 0.00292969, -0.000628662, -0.00247803, -0.00336304, -0.00439453, -0.00619507, -0.00830689, -0.00966187, -0.00929565,
263 -0.00700684, -0.00344238, 0.000524902, 0.00419312, 0.00692139, 0.00824585, 0.0081604, 0.00713501, 0.00574341, 0.00414429, 0.00217896, -0.000311279, -0.00321655,
264 -0.00609131, -0.00819702, -0.00891113, -0.00831909, -0.00726929, -0.00689697, -0.00792236, -0.0101624, -0.0124634, -0.0132263, -0.0112366, -0.00629272, 0.000640869,
265 0.00797119, 0.0139648, 0.0171448, 0.0166016, 0.0124878, 0.00604248, -0.00100098, -0.00710449, -0.011322, -0.0135254, -0.0142273, -0.0141541, -0.0136902,
266 -0.0127991, -0.0111633, -0.00863647, -0.00557861, -0.00278931, -0.00119019, -0.00130005, -0.00289307, -0.0052063, -0.00730591, -0.00861816, -0.00912476, -0.00928345,
267 -0.00953369, -0.00999756, -0.0102722, -0.00982056, -0.00823364, -0.00562744, -0.00252686, 0.000286865, 0.00222778, 0.00302734, 0.00269165, 0.0015625, 0.000164795,
268 -0.000964355, -0.00169067, -0.0022522, -0.00305176, -0.00438232, -0.00618286, -0.00800781, -0.00917358, -0.00906982, -0.00733032, -0.00408936, 0.00012207, 0.00445557,
269 0.00794678, 0.0098999, 0.010022, 0.00843506, 0.00561523, 0.0020752, -0.00162354, -0.00493164, -0.00724487, -0.00803223, -0.00710449, -0.00487671, -0.0022644,
270 -0.000372314, 6.10352e-05, -0.000927734, -0.00263062, -0.0039917, -0.00420532, -0.00299072, -0.000665283, 0.00198975, 0.00418091, 0.00532837, 0.00530396, 0.00439453,
271 0.00308838, 0.00186157, 0.00107422, 0.000836182, 0.00106201, 0.00157471, 0.00223999, 0.00307617, 0.00406494, 0.00514526, 0.00615845, 0.00682983, 0.00684204,
272 0.00596924, 0.00418091, 0.00161133, -0.0013916, -0.00432739, -0.00655518, -0.00755615, -0.00717163, -0.00557861, -0.00325317, -0.000726318, 0.00158691, 0.00351562,
273 0.00510254, 0.00646973, 0.00783081, 0.00927124, 0.0106628, 0.0116882, 0.0118774, 0.0109497, 0.00900879, 0.00653076, 0.00420532, 0.00264282, 0.00215454,
274 0.00262451, 0.00362549, 0.00461426, 0.00509033, 0.00480347, 0.00383911, 0.00262451, 0.00167847, 0.00132446, 0.00151367, 0.00186157, 0.00192871, 0.00146484,
275 0.000463867, -0.000787353, -0.00187378, -0.00234985, -0.00200195, -0.000811768, 0.000952148, 0.00287476, 0.00452881, 0.00567017, 0.00630493, 0.00655518, 0.0065918,
276 0.00655518, 0.00646973, 0.00637207, 0.0062439, 0.0060791, 0.00592041, 0.00579224, 0.00563355, 0.00536499, 0.00487671, 0.00414429, 0.00327759, 0.00240479,
277 0.00166626, 0.0012146, 0.00116577, 0.00162354, 0.00245361, 0.00321655, 0.00341797, 0.0027771, 0.00145264, -0.000109863, -0.00142822, -0.00228882, -0.00276489,
278 -0.00311279, -0.00361328, -0.00431519, -0.00496826, -0.00514526, -0.00450439, -0.00291748, -0.000610352, 0.00196533, 0.00422974, 0.00567017, 0.00617065, 0.00600586,
279 0.00562744, 0.00543213, 0.00563355, 0.00619507, 0.00686646, 0.00720825, 0.00698242, 0.00618286, 0.00507812, 0.00397949, 0.00303955, 0.0022522, 0.00150146,
280 0.000628662, -0.000402832, -0.00150146, -0.00232544, -0.00256348, -0.00211182, -0.00116577, -9.76563e-05, 0.000653076, 0.000848389, 0.000476074, -0.000152588, -0.000622559,
281 -0.000598145, -8.54492e-05, 0.000628662, 0.00119019, 0.00123901, 0.000665283, -0.000335693, -0.00137939, -0.00212402, -0.0024292, -0.00246582, -0.00240479, -0.00237427,
282 -0.00233765, -0.00222778, -0.00198975, -0.00162354, -0.00114136, -0.000640869, -0.000152588, 0.000274658, 0.000628662, 0.000915527, 0.00107422, 0.00111084, 0.00101318,
283 0.000811768, 0.000585938, 0.000390625, 0.000286865, 0.000262451, 0.000250244, 0.000213623, 0.00022583, 0.000299072, 0.0003479, 0.000177002, -0.000335693, -0.00122681,
284 -0.00233765, -0.00340576, -0.0041687, -0.00438232, -0.0039917, -0.00315552, -0.00221558, -0.00153809, -0.0013916, -0.00182495, -0.00266724, -0.00366821, -0.00457764,
285 -0.00526733, -0.00568237, -0.00579224, -0.00549316, -0.00475464, -0.00362549, -0.0022644, -0.00098877, -0.000128174, 9.76563e-05, -0.000189209, -0.000750732, -0.00117798,
286 -0.00123901, -0.000836182, -0.000128174, 0.000561523, 0.000915527, 0.000689697, -0.000201416, -0.00157471, -0.0029541, -0.00390625, -0.00412598, -0.00360107, -0.00265503,
287 -0.0017395, -0.00131226, -0.00158691, -0.00253906, -0.00380249, -0.00488281, -0.00540771, -0.00534058, -0.00494385, -0.00462647, -0.00460205, -0.00484009, -0.0050293,
288 -0.00484009, -0.00412598, -0.00302734, -0.0019165, -0.00116577, -0.000939941, -0.00112305, -0.00144043, -0.00164185, -0.00161133, -0.00137329, -0.00111084, -0.000976562,
289 -0.00107422, -0.00136108, -0.00169067, -0.0019043, -0.00196533, -0.00200195, -0.00220337, -0.00271606, -0.003479, -0.00425415, -0.00471802, -0.00460205, -0.00389404,
290 -0.00282593, -0.00178833, -0.00116577, -0.00109863, -0.00146484, -0.00198975, -0.00236206, -0.00233765, -0.00187988, -0.00107422, -0.000177002, 0.000512695, 0.000811768,
291 0.000622559, 3.66211e-05, -0.000775146, -0.00158691, -0.00219116, -0.00252686, -0.00263062, -0.00267944, -0.00278931, -0.00302734, -0.00340576, -0.00388184, -0.00431519,
292 -0.00454102, -0.00436401, -0.00375366, -0.00283813, -0.00186157, -0.00112305, -0.000799561, -0.000872803, -0.00116577, -0.00144043, -0.00153809, -0.00140381, -0.00111084,
293 -0.000750732, -0.000378418, -8.54492e-05, 9.76563e-05, 0.000201416, 0.000213623, 0.000140381, -1.2207e-05, -0.000274658, -0.00057373, -0.000836182, -0.00101318, -0.00112305,
294 -0.0012146, -0.00141602, -0.00182495, -0.0024292, -0.00307617, -0.00360107, -0.0038269, -0.00372925, -0.00338135, -0.00303955, -0.00287476, -0.00297852, -0.00326538,
295 -0.003479, -0.00336304, -0.00272827, -0.00165405, -0.000378418, 0.000787353, 0.00167847, 0.0022522, 0.0026123, 0.00287476, 0.00305176, 0.0031311, 0.00303955,
296 0.0027771, 0.00239258, 0.00202637, 0.00178833, 0.00176392, 0.0019043, 0.0020752, 0.0020874, 0.00180054, 0.00115356, 0.000250244, -0.000714111, -0.00148926,
297 -0.00184937, -0.0017395, -0.00127563, -0.00067749, -0.000152588, 0.000189209, 0.000427246, 0.000653076, 0.000927734, 0.00126343, 0.00157471, 0.00181274, 0.00194092,
298 0.00196533, 0.00189209, 0.00180054, 0.00176392, 0.00186157, 0.00209961, 0.00238037, 0.00257568, 0.00258789, 0.00241699, 0.00216675, 0.00197754, 0.00194092,
299 0.00203857, 0.00220337, 0.00230103, 0.00221558, 0.00192871, 0.00151367, 0.00112305, 0.000878906, 0.000811768, 0.000775146, 0.000610352, 0.000262451, -0.000164795,
300 -0.000439453, -0.000274658, 0.000488281, 0.00180054, 0.00331421, 0.00461426, 0.00534058, 0.00536499, 0.00480347, 0.00394287, 0.00307617, 0.00244141, 0.00211182,
301 0.00200195, 0.00198975, 0.00200195, 0.00201416, 0.00206299, 0.00217896, 0.00238037, 0.00258789, 0.00266724, 0.00253906, 0.00214233, 0.00162354, 0.00111084,
302 0.000714111, 0.000500488, 0.000463867, 0.000585938, 0.000836182, 0.00114136, 0.00146484, 0.00171509, 0.00183716, 0.00177612, 0.00151367, 0.00109863, 0.000640869,
303 0.000427246, 0.000653076, 0.00137939, 0.00244141, 0.00351562, 0.00427856, 0.00458984, 0.00449219, 0.00413208, 0.00372925, 0.00341797, 0.00317993, 0.00290527,
304 0.00249023, 0.0019043, 0.00127563, 0.000726318, 0.000390625, 0.000311279, 0.000415039, 0.000585938, 0.000665283, 0.000598145, 0.000378418, 9.76563e-05, -9.76563e-05,
305 -0.000189209, -0.000164795, -0.00012207, -9.76563e-05, -0.000140381, -0.00022583, -0.000262451, -0.000177002, 1.2207e-05, 0.000274658, 0.000476074, 0.000500488, 0.000323486,
306 -2.44141e-05, -0.000390625, -0.000598145, -0.000488281, -1.2207e-05, 0.000738525, 0.00159912, 0.00231323, 0.00271606, 0.00272827, 0.00240479, 0.00189209, 0.0013916,
307 0.00108643, 0.00102539, 0.00115356, 0.00134888, 0.00146484, 0.00146484, 0.00136108, 0.00126343, 0.00126343, 0.00133667, 0.00137329, 0.00123901, 0.000915527,
308 0.000463867, 0, -0.0003479, -0.000549316, -0.000610352, -0.000610352, -0.000640869, -0.000775146, -0.000952148, -0.00108643, -0.00108643, -0.000915527, -0.000610352,
309 -0.000238037, 9.76563e-05, 0.000372314, 0.000585938, 0.000762939, 0.000915527, 0.0010498, 0.00114136, 0.0012146, 0.00128784, 0.00134888, 0.00134888, 0.00122681,
310 0.000927734, 0.000488281, 2.44141e-05, -0.000335693, -0.000561523, -0.000628662, -0.000628662, -0.000610352, -0.000622559, -0.000665283, -0.000701904, -0.000689697, -0.000628662,
311 -0.000610352, -0.00067749, -0.000891113, -0.00119019, -0.00144043, -0.00153809, -0.00137939, -0.0010498, -0.000640869, -0.000299072, -8.54492e-05, 4.88281e-05, 0.000152588,
312 0.000262451, 0.000360107, 0.000390625, 0.000311279, 0.000109863, -0.000152588, -0.000372314, -0.000402832, -0.000213623, 0.000152588, 0.000610352, 0.0010498, 0.0013916,
313 0.00161133, 0.00171509, 0.00172729, 0.00169067, 0.00161133, 0.00147705, 0.00133667, 0.0012146, 0.00109863, 0.000939941, 0.000714111, 0.000372314, -6.10352e-05,
314 -0.000561523, -0.0010498, -0.00147705, -0.00178833, -0.00198975, -0.0020874, -0.00211182, -0.00206299, -0.00195312, -0.00181274, -0.00162964, -0.00145264, -0.00131226,
315 -0.00122681, -0.00117798, -0.00114136, -0.00106201, -0.00090332, -0.000689697, -0.000488281, -0.000323486, -0.000201416, -0.00012207, -4.88281e-05, 1.2207e-05, 9.76563e-05,
316 0.000164795, 0.000201416, 0.000140381, 0, -0.000164795, -0.000323486, -0.000427246, -0.000476074, -0.000500488, -0.000549316, -0.000640869, -0.000762939, -0.000860596,
317 -0.000878906, -0.000823975, -0.000689697, -0.000585938, -0.000537109, -0.000585938, -0.000689697, -0.000811768, -0.000915527, -0.00101318, -0.00109863, -0.00114136, -0.00114136,
318 -0.00108643, -0.000939941, -0.000726318, -0.000476074, -0.000238037, -6.10352e-05, 1.2207e-05, -2.44141e-05, -0.000189209, -0.000439453, -0.000689697, -0.000811768, -0.000738525,
319 -0.000500488, -0.000152588, 0.00012207, 0.000250244, 0.000164795, -4.88281e-05, -0.000335693, -0.000561523, -0.000738525, -0.000891113, -0.00106201, -0.00126343, -0.00142822,
320 -0.00150146, -0.00147705, -0.00142822, -0.00146484, -0.00162964, -0.00186157, -0.00205078, -0.0020874, -0.00192871, -0.00159912, -0.00115356, -0.000726318, -0.000378418,
321 -0.000128174, 0, 6.10352e-05, 8.54492e-05, 6.10352e-05, -2.44141e-05, -0.000189209, -0.000427246, -0.00067749, -0.000848389, -0.00090332, -0.000872803, -0.000860596,
322 -0.000915527, -0.00108643, -0.00128784, -0.0013916, -0.00132446, -0.0010498, -0.000665283, -0.000299072, -3.66211e-05, 1.2207e-05, -0.000109863, -0.000311279, -0.000439453,
323 -0.00045166, -0.000372314, -0.0003479, -0.000488281, -0.000799561, -0.00117798, -0.00147705, -0.00153809, -0.00131226, -0.000823975, -0.000262451, 0.000189209, 0.000427246,
324 -0.000152588, 0.00012207, 0.000250244, 0.000164795, -4.88281e-05, -0.000335693, -0.000561523, -0.000738525, -0.000891113, -0.00106201, -0.00126343, -0.00142822, -0.00150146,
325 -0.00147705, -0.00142822, -0.00146484, -0.00162964, -0.00186157, -0.00205078, -0.0020874, -0.00192871, -0.00159912, -0.00115356, -0.000726318, -0.000378418
326 }
327 };
328
329 CabDesc_imp<192> cab_data_HighGain = {
330 192, 48000,
331 { 0.00032959, 0.00110474, 0.00174866, 0.00374451, 0.00339966, 0.00570374, 0.00650635, 0.007901, 0.00887451, 0.00844727, 0.00891724, 0.0078064, 0.00594177,
332 0.0055481, 0.0041687, 0.00488892, 0.00620117, 0.0124329, 0.0188995, 0.0307892, 0.0434265, 0.0538727, 0.0629425, 0.0670319, 0.0642609, 0.0613708,
333 0.0476685, 0.0340912, 0.0156799, -0.00499878, -0.0286621, -0.0470245, -0.0614594, -0.0639069, -0.050943, -0.0213898, 0.0180359, 0.0591553, 0.0882782,
334 0.0999878, 0.0933716, 0.0748993, 0.0485596, 0.0243927, 0.00559082, -0.00264282, -0.00406189, -0.00350952, -0.000479126, -0.00288696, -0.00631104, -0.0085022,
335 -0.00808411, -0.00162659, 0.0054718, 0.0124481, 0.016925, 0.018985, 0.021817, 0.0227966, 0.0195587, 0.0171906, 0.0145905, 0.0119293, 0.0100006,
336 0.0102203, 0.0121643, 0.0122253, 0.0153259, 0.0164856, 0.0168152, 0.0190826, 0.0167175, 0.017569, 0.0177979, 0.0159973, 0.0181549, 0.0170044,
337 0.017804, 0.0166077, 0.0160339, 0.0148193, 0.0127563, 0.0115234, 0.010498, 0.00991211, 0.00990906, 0.0108978, 0.0107941, 0.0128723, 0.0131317,
338 0.0149048, 0.0146576, 0.0157776, 0.0161285, 0.0144958, 0.01427, 0.013147, 0.013031, 0.0113892, 0.0124176, 0.0117218, 0.0116425, 0.0126251,
339 0.0116333, 0.0139832, 0.0114685, 0.0122986, 0.0123199, 0.0116974, 0.0128113, 0.0123077, 0.0133728, 0.0128326, 0.013092, 0.011087, 0.0111206,
340 0.0101166, 0.00730591, 0.00813904, 0.006604, 0.00711975, 0.00916138, 0.00787659, 0.0107483, 0.0104248, 0.0112549, 0.0108429, 0.0116791, 0.0100769,
341 0.00967102, 0.00880432, 0.00714722, 0.00682373, 0.00731201, 0.00651855, 0.00796509, 0.00784302, 0.00800171, 0.00681763, 0.00851746, 0.00774231, 0.00804443,
342 0.00783997, 0.00748291, 0.00765991, 0.00597534, 0.00496826, 0.00350037, 0.00386353, 0.00370178, 0.00481873, 0.00638123, 0.00687561, 0.00679626, 0.00562439,
343 0.00476074, 0.00483093, 0.00283203, 0.00483093, 0.0037323, 0.00445862, 0.00479431, 0.00435486, 0.00232544, 0.00246887, 0.00234375, 0.00329285, 0.00221863,
344 0.00398865, 0.00241394, 0.00315552, 0.00190735, 0.00125427, 0.00116882, 1.52588e-05, 0.00204468, 0.0020752, 0.00277405, 0.00267334, 0.00133972, 0.00083313,
345 -0.00125122, -0.00235596, -0.00281372, -0.00326233, -0.00215759, -0.000927734, 0.0107483, 0.0104248, 0.0112549, 0.0108429
346 }
347 };
348
349 CabDesc_imp<192> cab_data_Twin = {
350 192, 48000,
351 { -0.00248718, 0.00213013, 0.00604248, 0.0112091, 0.0163269, 0.021521, 0.0275574, 0.0338104, 0.0412903, 0.0489868, 0.0579742, 0.0658875, 0.0735504,
352 0.0774078, 0.0771973, 0.07229, 0.0630219, 0.051239, 0.0374146, 0.021994, 0.00320129, -0.0183258, -0.0423828, -0.0672119, -0.0882599, -0.0995728,
353 -0.0971954, -0.0775452, -0.0434357, 0.000286865, 0.0402557, 0.0653076, 0.0661804, 0.0455444, 0.0165436, -0.0072052, -0.0144287, -0.00848083, 0.00375977,
354 0.0146698, 0.0196289, 0.0180511, 0.011264, 0.00258789, -0.00515747, -0.00702209, -0.00657959, -0.00658569, -0.0059082, -0.0061554, -0.00519714, -0.00263672,
355 -0.000387573, -0.000177002, -0.000402832, -0.0019165, -0.00285645, -0.002771, -0.00153198, 0.000860596, 0.00449524, 0.00925903, 0.0124573, 0.0158722, 0.0168488,
356 0.01828, 0.0172485, 0.0160065, 0.015097, 0.0136658, 0.0133423, 0.0126892, 0.0120972, 0.0106384, 0.00811462, 0.00519104, 0.00170593, -0.00169983,
357 -0.00419006, -0.00576782, -0.00625916, -0.00639343, -0.00591431, -0.00499573, -0.00469971, -0.00328674, -0.00227661, -0.00125732, -0.0006073, -0.000317383, -0.00134888,
358 -0.00276184, -0.00381775, -0.00519714, -0.00510254, -0.00422974, -0.00214844, 0.000784302, 0.00391541, 0.00646362, 0.00923157, 0.0100983, 0.0102875, 0.0102692,
359 0.00893555, 0.00744934, 0.006427, 0.00488892, 0.0039093, 0.00360718, 0.00300903, 0.00233154, 0.00245972, 0.00163574, 0.00125732, 0.000762939, 0.000540161,
360 0.000210571, -0.000256348, 0.000112915, -0.000436401, 0.000650024, 0.000924683, 0.00168457, 0.00215454, 0.00183105, 0.00153809, 0.000708008, -0.000939941, -0.000753784,
361 -0.00201416, -0.000750732, -0.000592041, 0.000344849, 0.00183105, 0.00214233, 0.00311279, 0.0032074, 0.0024231, 0.00189209, 0.000485229, -0.00122375, -0.00232239,
362 -0.003479, -0.00364075, -0.00359192, -0.00312195, -0.00229492, -0.00212708, -0.000912476, -0.00114746, -0.00125732, -0.0006073, -0.000317383, -0.00134888, -0.00276184,
363 -0.00381775, -0.00519714, -0.00510254, -0.00422974, -0.00214844, 0.000784302, 0.00391541, 0.00646362, 0.00923157, 0.0100983, 0.0102875, 0.0102692, 0.00893555,
364 0.00744934, 0.006427, 0.00488892, 0.0039093, 0.00360718, 0.00300903, 0.00233154, 0.00245972, 0.00163574, 0.00125732, 0.000762939, 0.000540161, 0.000210571,
365 -0.000256348, 0.000112915, -0.000436401, 0.000650024, 0.000924683, 0.00168457, 0.00215454, 0.00183105, 0.00153809, 0.000708008
366 }
367 };
368
369 CabDesc_imp<192> cab_data_Bassman = {
370 192, 48000,
371 { -0.0135193, -0.0170654, -0.0122955, -0.0142334, -0.0131775, -0.0132965, -0.0127258, -0.0152039, -0.01138, -0.016806, -0.011557, -0.0141876, -0.00864258,
372 -0.0124908, -0.0108978, -0.00955811, -0.0157318, -0.0183807, -0.0201386, -0.0251465, -0.0209259, -0.0262756, -0.0199371, -0.0149078, -0.00731201, 0.00153503,
373 0.0135101, 0.0243683, 0.0322968, 0.0433075, 0.0503571, 0.0568634, 0.0703674, 0.0783051, 0.0914154, 0.0999908, 0.0980591, 0.0955383, 0.0794281,
374 0.0597534, 0.031485, -0.00279541, -0.0304779, -0.0540436, -0.0625885, -0.0501495, -0.0274353, 0.0180267, 0.0631134, 0.0926331, 0.098819, 0.0706421,
375 0.0196289, -0.0225616, -0.0428589, -0.0351105, -0.0119171, 0.0210815, 0.0415833, 0.0480377, 0.0494293, 0.0368988, 0.0178253, 0.000698853, -0.0044281,
376 -0.00349731, 0.00496216, 0.0109161, 0.0185181, 0.0168701, 0.0179718, 0.0142792, 0.0111298, 0.0111786, 0.00481567, 0.00551453, 0.00521545, 0.00835266,
377 0.00484619, 0.0102722, 0.0072998, 0.0072937, 0.00602112, 0.00800476, 0.000827026, 0.00921326, 0.00395813, 0.00715942, 0.00660706, 0.00912476, 0.00556641,
378 0.00999451, 0.0117157, 0.00827637, 0.00951843, 0.00418091, 0.00426025, 0.00639343, 0.00884705, 0.0105438, 0.0115021, 0.0123657, 0.011795, 0.00934143,
379 0.00721741, 0.0111633, 0.00832214, 0.0115936, 0.0131409, 0.0116516, 0.0109802, 0.00982666, 0.0116791, 0.00919495, 0.010733, 0.00323791, 0.00908508,
380 0.00430908, 0.00735168, 0.00718994, 0.00866394, 0.00606079, 0.0063324, 0.00391541, 0.00143738, 0.00595398, 0.00281677, 0.00145569, 0.00218201, -0.0025238,
381 0.00496216, 0.0109161, 0.0185181, 0.0168701, 0.0179718, 0.0142792, 0.0111298, 0.0111786, 0.00481567, 0.00551453, 0.00521545, 0.00835266, 0.00484619,
382 0.0102722, 0.0072998, 0.0072937, 0.00602112, 0.00800476, 0.000827026, 0.00921326, 0.00395813, 0.00715942, 0.00660706, 0.00912476, 0.00556641, 0.00999451,
383 0.0117157, 0.00827637, 0.00951843, 0.00418091, 0.00426025, 0.00639343, 0.00884705, 0.0105438, 0.0115021, 0.0123657, 0.011795, 0.00934143, 0.00721741,
384 0.0111633, 0.00832214, 0.0115936, 0.0131409, 0.0116516, 0.0109802, 0.00982666, 0.0116791, 0.00919495, 0.010733, 0.00323791, 0.00908508, 0.00430908,
385 0.00735168, 0.00718994, 0.00866394, 0.00606079, 0.0063324, 0.00391541, 0.00143738, 0.00595398, 0.00281677, 0.00145569
386 }
387 };
388
389 CabDesc_imp<128> cab_data_Marshall = {
390 128, 48000,
391 { -0.00922852, -0.000869751, -0.00532837, -0.00475159, -0.00434875, -0.00599976, -0.0036438, -0.00747681, -0.00713806, -0.00734558, -0.00646667, -0.00988159, -0.00717163,
392 -0.00905151, -0.00700378, -0.011731, -0.00480042, -0.0109528, -0.0086792, -0.0108398, -0.00987549, -0.0137299, -0.0147949, -0.0119843, -0.0141663, -0.0177155,
393 -0.0137268, -0.0164459, -0.0175385, -0.0167175, -0.019162, -0.0172638, -0.0205505, -0.018927, -0.0181885, -0.0179016, -0.0175201, -0.0201355, -0.0151581,
394 -0.0188446, -0.0123016, -0.0148804, -0.0123779, -0.0107971, -0.00960693, -0.00480652, -0.0113129, -0.00471497, -0.00960999, -0.00814209, -0.00911865, -0.0100708,
395 -0.00626221, -0.00363464, -0.000796509, 0.00978088, 0.0198669, 0.0354034, 0.0467163, 0.0613586, 0.0724426, 0.0775299, 0.0783203, 0.0739441, 0.0577087,
396 0.0450623, 0.0213287, -0.00122681, -0.0259857, -0.0394531, -0.0557007, -0.0592163, -0.0440796, -0.0175262, 0.0151337, 0.0574036, 0.0825256, 0.0999908,
397 0.0945892, 0.0780121, 0.0545349, 0.0327698, 0.0138306, 0.00717773, 0.00252686, 0.0059906, 0.00020752, 0.00678711, -0.00795288, -0.0052002, -0.0121521,
398 -0.00639038, -0.000817871, 0.00512085, 0.0132019, 0.0107941, 0.0124298, 0.0182343, 0.0077301, 0.00911865, 0.00447083, 0.00140686, 0.0047699, -0.00120239,
399 0.00215454, 0.00669556, 0.00773926, 0.00705566, 0.0143951, 0.00919189, 0.0128448, 0.0135773, 0.0109131, 0.0156006, 0.0113739, 0.0148926, 0.0125732,
400 0.0139496, 0.0113159, 0.00896912, 0.00815125, 0.0354034, 0.0467163, 0.0613586, 0.0724426, 0.0775299, 0.0783203, 0.0739441
401 }
402 };
403
404 CabDesc_imp<192> cab_data_AC30 = {
405 192, 48000,
406 { 7.32422e-05, 0.00015564, 0.00302429, 0.0057251, 0.00652466, 0.00614014, 0.00662537, 0.00419922, 0.00424194, -0.00379334, -0.00308838, -0.0103577, -0.0165436,
407 -0.0208832, -0.0206482, -0.027774, -0.0240204, -0.0231415, -0.0195801, -0.0178253, -0.015921, -0.0149628, -0.0164642, -0.0195465, -0.0218109, -0.0230652,
408 -0.0246216, -0.0256104, -0.0260925, -0.0210358, -0.0207489, -0.015863, -0.0106201, -0.0106628, -0.00259705, 0.00690613, 0.0146484, 0.026236, 0.0348633,
409 0.0506409, 0.0615387, 0.0747467, 0.0847351, 0.0917419, 0.0999908, 0.0957062, 0.093335, 0.0774262, 0.0564789, 0.0312073, 0.00177002, -0.0296539,
410 -0.047522, -0.0584259, -0.0557098, -0.0279785, 0.00585632, 0.0454926, 0.0777039, 0.0871948, 0.0838074, 0.0664886, 0.039389, 0.0180054, 0.00166931,
411 -0.00537415, 0.00290527, 0.00549622, 0.0210938, 0.0162201, 0.0135376, 0.00706482, 0.00458679, -0.00133667, 0.00446777, 0.00727539, 0.0085144, 0.00765076,
412 0.00744324, 0.00810852, 0.011911, 0.0117432, 0.00995789, 0.0141144, 0.0146301, 0.01651, 0.0221497, 0.0218842, 0.0201477, 0.0221466, 0.0210632,
413 0.0162018, 0.0183746, 0.0163727, 0.0168152, 0.0135895, 0.013208, 0.013208, 0.0101379, 0.0105713, 0.0109039, 0.0103699, 0.00718689, 0.0068634,
414 0.00429993, 0.0033844, 0.00050354, -9.15527e-05, 0.00460815, 0.00307617, 0.00213318, 0.00421143, 0.00546875, 0.00121155, 0.00124817, 0.0053894, 0.00281677,
415 0.0017395, 0.00368652, 0.00334778, 0.00233459, 0.00368347, 0.000366211, 0.00219727, 0.00175476, -0.00145874, 0.0006073, -0.000961304, -0.000509644, 0.00078125,
416 -0.00332336, 0.00331726, 0.000183105, -0.000747681, 0.00293274, -0.000637817, 0.000924683, -0.00149231, -0.00195312, -0.000564575, -0.00177917, 0.000491333, 0.00137024,
417 0.00274353, -0.000256348, 0.0024353, -0.00281372, -0.00131531, -0.00141602, -0.00289307, 0.000964355, 0.00017395, 0.00233765, -0.000726318, -0.000454712, -0.00398254,
418 -0.00518494, 0.000839233, 0.0168152, 0.0135895, 0.013208, 0.013208, 0.0101379, 0.0105713, 0.0109039, 0.0103699, 0.00718689, 0.0068634, 0.00429993,
419 0.0033844, 0.00050354, -9.15527e-05, 0.00460815, 0.00307617, 0.00213318, 0.00421143, 0.00546875, 0.00121155, 0.00124817, 0.0053894, 0.00281677, 0.0017395,
420 0.00368652, 0.00334778, 0.00233459, 0.00368347, 0.000366211, 0.00219727, 0.00175476, -0.00145874, 0.0006073, -0.000961304
421 }
422 };
423
424 CabDesc_imp<768> cab_data_Princeton = {
425 768, 48000,
426 { -0.00309448, -0.00641479, -0.0076355, -0.00684204, -0.0046814, -0.00162964, 0.0022644, 0.00679321, 0.0110474, 0.0140808, 0.0159912, 0.0153442, 0.0124268,
427 0.00848389, 0.00452881, 0.00045166, -0.00389404, -0.00841675, -0.0115479, -0.0121704, -0.0108582, -0.00772095, -0.00272827, 0.00341187, 0.00960693, 0.0144775,
428 0.0154358, 0.0115173, 0.00429688, -0.00339355, -0.00940552, -0.0124878, -0.0122437, -0.00877686, -0.00349731, 0.0017395, 0.00515137, 0.00681152, 0.00726929,
429 0.00681152, 0.00482788, 0.00195312, -0.00167847, -0.00560913, -0.00799561, -0.00747681, -0.00460205, -0.000897217, 0.00301514, 0.00552368, 0.00639038, 0.00568848,
430 0.00362549, 1.83105e-05, -0.00333862, -0.00494995, -0.00473022, -0.00341797, -0.00162964, 0.00032959, 0.00178223, 0.00244751, 0.00177612, -0.000164795, -0.00247192,
431 -0.00488892, -0.00692139, -0.00699463, -0.00483398, -0.00162964, 0.00135498, 0.00333862, 0.00326538, 0.00117798, -0.00202026, -0.00481567, -0.00576782, -0.00505371,
432 -0.00369873, -0.00270996, -0.00230103, -0.00228271, -0.00197144, -0.00152588, -0.00117188, -0.000958252, -0.000878906, -0.000891113, -0.000952148, -0.000708008, -0.00043335,
433 -0.000598145, -0.00152588, -0.00267944, -0.00366821, -0.00380859, -0.00317383, -0.00262451, -0.00256958, -0.0020813, -0.0017334, -0.00195923, -0.00197754, -0.00133667,
434 -0.0003479, 0.00045166, 0.000518799, -0.000701904, -0.00256348, -0.00449219, -0.00578613, -0.00565796, -0.00393066, -0.0015686, 4.27246e-05, 0.000262451, -0.000518799,
435 -0.00183105, -0.00301514, -0.00285645, -0.00114746, 0.000854492, 0.00175781, 0.00129395, -0.00043335, -0.00250854, -0.00425415, -0.0048645, -0.00410156, -0.00268555,
436 -0.00133057, -6.71387e-05, 0.000872803, 0.000848389, 4.88281e-05, -0.00067749, -0.000701904, -0.000262451, 1.2207e-05, -0.000140381, -0.000262451, -0.000720215, -0.000854492,
437 -0.000396729, 0.000634766, 0.00177612, 0.00266724, 0.00252686, 0.000854492, -0.00150146, -0.00365601, -0.00440063, -0.00342407, -0.00135498, 0.000665283, 0.00183716,
438 0.00183716, 0.000952148, -0.000506592, -0.00196533, -0.00281372, -0.00274048, -0.00161133, -1.2207e-05, 0.00133057, 0.00203247, 0.00227051, 0.00213013, 0.00145264,
439 0.000512695, -0.00045166, -0.00119629, -0.00192261, -0.0024353, -0.00222778, -0.00145874, -0.000915527, -0.00067749, -6.10352e-05, 0.000689697, 0.0010437, 0.0010376,
440 0.0013855, 0.00198975, 0.00247803, 0.0020752, 0.00117798, 0.000140381, -0.000598145, -0.00122681, -0.00144043, -0.00106812, -0.000292969, 0.000402832, 0.0010376,
441 0.00160522, 0.00194092, 0.0019043, 0.00161743, 0.00126953, 0.00118408, 0.00101929, 0.000561523, -6.10352e-06, -0.000408936, -0.000531006, -0.000152588, 0.00043335,
442 0.00126953, 0.00234985, 0.00358887, 0.00419312, 0.00410156, 0.00321655, 0.00201416, 0.000610352, -0.000274658, -0.000585938, -0.000299072, 0.000299072, 0.00106201,
443 0.00162354, 0.00160522, 0.00123901, 0.00067749, 0.000134277, -6.71387e-05, 0.000274658, 0.00106812, 0.00177002, 0.00203247, 0.00174561, 0.00164795, 0.0017395,
444 0.0020874, 0.00219116, 0.00220947, 0.0020752, 0.00170898, 0.000762939, -0.000164795, -0.00043335, -7.93457e-05, 0.00043335, 0.00123901, 0.00217285, 0.00265503,
445 0.00253906, 0.00205078, 0.00184937, 0.0015686, 0.00147705, 0.00136108, 0.00152588, 0.00189209, 0.00239258, 0.00265503, 0.0026062, 0.0024292, 0.00214844,
446 0.00180664, 0.00134277, 0.00088501, 0.000769043, 0.000982666, 0.00114746, 0.0010437, 0.000787353, 0.000415039, 0.000219727, 0.000128174, -9.15527e-05, -0.000360107,
447 -0.000408936, -3.05176e-05, 0.000390625, 0.00090332, 0.00110474, 0.00115356, 0.00111694, 0.00123291, 0.00146484, 0.0015564, 0.00122681, 0.000793457, 0.000384521,
448 0.000213623, 0.000244141, 0.000244141, 0.000500488, 0.0010498, 0.00174561, 0.00201416, 0.00170288, 0.000970459, 0.000305176, 3.05176e-05, -0.000231934, -0.000469971,
449 -0.000531006, -0.000109863, 0.000311279, 0.000640869, 0.000671387, 0.000762939, 0.000964355, 0.00106812, 0.00119629, 0.0010437, 0.00065918, 5.49316e-05, -0.000286865,
450 -0.000177002, 0.00020752, 0.000488281, 0.000469971, 0.000311279, 0.00010376, -0.000262451, -0.000476074, -0.000604248, -0.000390625, -6.10352e-05, 0.000305176, 0.000567627,
451 0.000640869, 0.000640869, 0.000341797, 8.54492e-05, -0.000292969, -0.000585938, -0.00100708, -0.00115967, -0.00115356, -0.00078125, -0.000372314, 0.000128174, 0.000494385,
452 0.000823975, 0.000842285, 0.000585938, -3.05176e-05, -0.000714111, -0.00133057, -0.00147705, -0.00137329, -0.0010437, -0.000836182, -0.000592041, -0.000372314, -0.000115967,
453 3.66211e-05, -7.93457e-05, -0.000262451, -0.000378418, -0.000469971, -0.000793457, -0.00107422, -0.00128784, -0.00113525, -0.000823975, -0.000488281, -0.000262451, -0.000201416,
454 -0.000286865, -0.000372314, -0.000469971, -0.000592041, -0.000726318, -0.000726318, -0.000701904, -0.000634766, -0.000683594, -0.000701904, -0.000775146, -0.000708008, -0.000537109,
455 -0.00045166, -0.000543213, -0.000823975, -0.00105591, -0.00108643, -0.000915527, -0.000708008, -0.00055542, -0.000305176, 8.54492e-05, 0.000244141, 0.000170898, -0.000213623,
456 -0.000543213, -0.000762939, -0.000811768, -0.000830078, -0.000805664, -0.000866699, -0.000878906, -0.000769043, -0.000634766, -0.000738525, -0.0010498, -0.00131836, -0.00134888,
457 -0.0010498, -0.000726318, -0.000378418, -0.000140381, 9.15527e-05, 0.000146484, -2.44141e-05, -0.000494385, -0.000897217, -0.0012146, -0.00129395, -0.00133667, -0.00139771,
458 -0.00147095, -0.00153809, -0.00137939, -0.00119629, -0.00088501, -0.000817871, -0.000732422, -0.000628662, -0.000512695, -0.000469971, -0.00055542, -0.000622559, -0.000628662,
459 -0.00043335, -0.000134277, -0.00010376, -0.000262451, -0.00057373, -0.000750732, -0.00090332, -0.000964355, -0.000939941, -0.000817871, -0.000616455, -0.000543213, -0.000628662,
460 -0.000854492, -0.0010376, -0.00101318, -0.000946045, -0.000750732, -0.000701904, -0.000592041, -0.000543213, -0.000341797, -9.76563e-05, 0.000189209, 0.000323486, 0.00043335,
461 0.000311279, 9.15527e-05, -0.000384521, -0.000909424, -0.00137939, -0.00145264, -0.00130615, -0.000921631, -0.000585938, -0.000286865, -0.000177002, -6.10352e-05, 1.2207e-05,
462 7.93457e-05, 6.71387e-05, 4.88281e-05, -1.2207e-05, -7.32422e-05, -0.000231934, -0.000402832, -0.000683594, -0.000726318, -0.000634766, -0.000457764, -0.000311279, -0.000201416,
463 -0.000109863, -4.88281e-05, 4.27246e-05, 0.000115967, 0.000140381, 9.76563e-05, 6.10352e-05, 4.27246e-05, 2.44141e-05, -6.10352e-06, -0.000140381, -0.000177002, 0,
464 9.76563e-05, 0.000213623, 0.000170898, 0.000274658, 0.000317383, 0.000390625, 0.000274658, 0.000109863, -6.10352e-06, -6.10352e-06, 8.54492e-05, 0.000299072, 0.000421143,
465 0.000488281, 0.000372314, 0.000292969, 4.88281e-05, -9.15527e-05, -0.000354004, -0.000341797, -0.000256348, -2.44141e-05, 5.49316e-05, 7.93457e-05, -6.10352e-06, -6.10352e-05,
466 7.93457e-05, 0.000219727, 0.00045166, 0.000628662, 0.000854492, 0.00098877, 0.00101318, 0.000836182, 0.000500488, 0.000250244, 0.000115967, 0.000201416, 0.000317383,
467 0.000469971, 0.000653076, 0.00090332, 0.000976562, 0.000891113, 0.000683594, 0.000415039, 0.00022583, 0.000177002, 0.000292969, 0.000384521, 0.000488281, 0.000402832,
468 0.000335693, 0.000305176, 0.000268555, 0.000280762, 0.000262451, 0.000286865, 0.000372314, 0.000384521, 0.000250244, 0.000146484, 0.000183105, 0.000274658, 0.000274658,
469 0.000158691, 0.000134277, 0.000152588, 0.000256348, 0.000390625, 0.000427246, 0.000366211, 0.000268555, 0.000219727, 0.000231934, 0.000311279, 0.000390625, 0.00045166,
470 0.00045166, 0.000457764, 0.000408936, 0.000299072, 0.000262451, 0.000384521, 0.000585938, 0.000799561, 0.000952148, 0.000915527, 0.000836182, 0.000634766, 0.000531006,
471 0.000311279, 0.000201416, 0.00012207, 9.15527e-05, 9.15527e-05, 8.54492e-05, 4.88281e-05, 7.93457e-05, 0.000195313, 0.000439453, 0.000665283, 0.000805664, 0.000769043,
472 0.000653076, 0.000524902, 0.000274658, 0.000170898, 1.83105e-05, -1.83105e-05, -6.10352e-05, 7.32422e-05, 0.000244141, 0.000469971, 0.000634766, 0.000750732, 0.000848389,
473 0.000860596, 0.000683594, 0.000421143, 0.000128174, -1.83105e-05, -0.000170898, -0.000292969, -0.000390625, -0.000390625, -0.000231934, -0.00010376, 0.000152588, 0.000323486,
474 0.000506592, 0.000512695, 0.000256348, 0.000390625, 0.000427246, 0.000366211, 0.000268555, 0.000219727, 0.000231934, 0.000311279, 0.000390625, 0.00045166, 0.00045166,
475 0.000457764, 0.000408936, 0.000299072, 0.000262451, 0.000384521, 0.000585938, 0.000799561, 0.000952148, 0.000915527, 0.000836182, 0.000634766, 0.000531006, 0.000311279,
476 0.000201416, 0.00012207, 9.15527e-05, 9.15527e-05, 8.54492e-05, 4.88281e-05, 7.93457e-05, 0.000195313, 0.000439453, 0.000665283, 0.000805664, 0.000769043, 0.000653076,
477 0.000524902, 0.000274658, 0.000170898, 1.83105e-05, -1.83105e-05, -6.10352e-05, 7.32422e-05, 0.000244141, 0.000469971, 0.000634766, 0.000750732, 0.000848389, 0.000860596,
478 0.000683594
479 }
480 };
481
482
483 CabDesc_imp<896> cab_data_A2 = {
484 896, 48000,
485 { -0.0529144, -0.0479034, -0.0443909, -0.0402527, -0.0356598, -0.0326569, -0.0296112, -0.027478, -0.0252869, -0.0243713, -0.0245483, -0.0250519, -0.0316956,
486 -0.0375, -0.0475891, -0.054834, -0.0614899, -0.0598389, -0.0492432, -0.031076, -0.00463562, 0.0245972, 0.0523651, 0.0742096, 0.0906158, 0.0986084,
487 0.0998169, 0.0968109, 0.0876556, 0.073114, 0.0524231, 0.0241486, -0.0106567, -0.0450958, -0.074826, -0.0859497, -0.0783478, -0.0476959, -0.00476685,
488 0.0396454, 0.0748657, 0.0915741, 0.0869782, 0.0698364, 0.0443329, 0.0224701, 0.0104736, 0.0111023, 0.0213318, 0.0341736, 0.0478607, 0.0530609,
489 0.0539948, 0.0461121, 0.0386505, 0.0266724, 0.0157532, 0.00790405, 0.00315247, 0.00385742, 0.00796204, 0.0162231, 0.025296, 0.0306305, 0.0341583,
490 0.032486, 0.027005, 0.0206573, 0.0136871, 0.010434, 0.00934753, 0.0117798, 0.0170197, 0.0238831, 0.0290863, 0.0350616, 0.0365356, 0.0372101,
491 0.0332214, 0.0315613, 0.0275024, 0.0247528, 0.0232635, 0.0236572, 0.0259705, 0.0284668, 0.030603, 0.0323486, 0.0328583, 0.0320679, 0.0320465,
492 0.0298767, 0.028064, 0.0275421, 0.0267883, 0.02836, 0.0295868, 0.0299622, 0.0310699, 0.0302277, 0.0294617, 0.0279388, 0.0251892, 0.0236664,
493 0.0224976, 0.0215881, 0.0242401, 0.0265137, 0.0285675, 0.0320282, 0.0341431, 0.033963, 0.0343628, 0.033551, 0.0312256, 0.0286102, 0.0273499,
494 0.025174, 0.0240295, 0.0246643, 0.0255219, 0.0254639, 0.0282379, 0.0270447, 0.0291656, 0.0298737, 0.0294098, 0.0306946, 0.0306793, 0.0294708,
495 0.0314697, 0.0287659, 0.0296326, 0.029248, 0.0274231, 0.0282806, 0.0250031, 0.026355, 0.024527, 0.0249908, 0.0267944, 0.0259766, 0.0289978,
496 0.0292084, 0.0299225, 0.0305664, 0.029895, 0.0294006, 0.0276978, 0.0268372, 0.0244751, 0.0237549, 0.0233612, 0.0215912, 0.0229034, 0.0222595,
497 0.0237579, 0.0240692, 0.0244843, 0.0260498, 0.025351, 0.0255707, 0.0264252, 0.0249664, 0.0260742, 0.0249573, 0.0254272, 0.0250488, 0.0253021,
498 0.024704, 0.0244568, 0.0238892, 0.0225952, 0.0227386, 0.0219788, 0.0209106, 0.0211761, 0.0206909, 0.0202667, 0.0208862, 0.020752, 0.0207489,
499 0.0204803, 0.0209015, 0.0211609, 0.020752, 0.021347, 0.0219574, 0.0220947, 0.0223267, 0.0230286, 0.0234741, 0.023291, 0.0236664, 0.0232819,
500 0.0226013, 0.0224518, 0.0214294, 0.0208282, 0.0196045, 0.0183136, 0.0183411, 0.0162109, 0.0165375, 0.0154266, 0.015033, 0.0162201, 0.0157043,
501 0.01633, 0.0170349, 0.0174377, 0.0192993, 0.0185577, 0.019812, 0.0210022, 0.0193665, 0.0211151, 0.0203613, 0.0192688, 0.0202515, 0.0180481,
502 0.0181213, 0.0177551, 0.0170502, 0.0158295, 0.0163635, 0.0157715, 0.0146362, 0.0152283, 0.0148773, 0.0144073, 0.0142456, 0.014447, 0.0135223,
503 0.0142914, 0.0139069, 0.0137085, 0.0135712, 0.0133514, 0.0139191, 0.0133026, 0.0133484, 0.0124786, 0.0126434, 0.013562, 0.0123688, 0.0123962,
504 0.0119141, 0.0123077, 0.0109009, 0.0125153, 0.0108459, 0.0108429, 0.0121002, 0.0100281, 0.0108154, 0.0100311, 0.0104431, 0.00927124, 0.0097229,
505 0.00894775, 0.00927429, 0.00845337, 0.00889282, 0.00801392, 0.00801392, 0.00853272, 0.00733032, 0.00804138, 0.00750122, 0.00792847, 0.0078949, 0.0072052,
506 0.00724792, 0.0080719, 0.00771179, 0.00656738, 0.00707703, 0.00711975, 0.00601501, 0.00680542, 0.00595093, 0.00546875, 0.00603333, 0.00518188, 0.00521851,
507 0.0058136, 0.00343323, 0.00556946, 0.00406189, 0.00440369, 0.004599, 0.00409851, 0.00404968, 0.00427246, 0.00317993, 0.00413818, 0.00297852, 0.00404663,
508 0.00250244, 0.00359802, 0.00262451, 0.00320435, 0.00259705, 0.00259399, 0.00205078, 0.00288086, 0.00170593, 0.00252075, 0.00186462, 0.00166626, 0.00179443,
509 0.00112305, 0.00148926, 0.00123901, 0.000543213, 0.000991821, 0.00103455, -0.000622559, 0.000445557, 0.000344849, -0.000375366, -0.000921631, -0.000119019, -0.00141907,
510 -0.00157471, -0.00127563, -0.00145874, -0.00209045, -0.00232544, -0.00178833, -0.00217896, -0.0020874, -0.00308533, -0.00164185, -0.00281067, -0.0024292, -0.00241699,
511 -0.00281982, -0.00231628, -0.00263367, -0.0028595, -0.00203247, -0.00267639, -0.00242004, -0.00263062, -0.0027771, -0.00229797, -0.00282593, -0.00250549, -0.00267944,
512 -0.00236816, -0.00252686, -0.00345764, -0.00202026, -0.00357361, -0.00281067, -0.00358582, -0.00300598, -0.00319519, -0.00390015, -0.00323791, -0.00479736, -0.00389099,
513 -0.00461426, -0.00447388, -0.00520935, -0.00515442, -0.00564575, -0.00582275, -0.00641174, -0.00584412, -0.00709839, -0.00662537, -0.00800171, -0.00722656, -0.00827026,
514 -0.00877991, -0.00858154, -0.00940552, -0.00977478, -0.00999145, -0.0107666, -0.0108704, -0.0113251, -0.0119659, -0.0117432, -0.0128754, -0.0129791, -0.0127625,
515 -0.0137848, -0.0142517, -0.0140839, -0.0148437, -0.0146057, -0.0148163, -0.0158417, -0.0154694, -0.015448, -0.0159851, -0.0161133, -0.0160217, -0.016217,
516 -0.0162781, -0.0159485, -0.0171326, -0.0157166, -0.0169403, -0.0160461, -0.0164703, -0.0164185, -0.0160095, -0.0160645, -0.0160858, -0.0164093, -0.0152191,
517 -0.0164886, -0.0151093, -0.0154968, -0.0154938, -0.0155151, -0.0143921, -0.0155151, -0.0141724, -0.0155151, -0.0134735, -0.0150238, -0.0146545, -0.0129944,
518 -0.015329, -0.0133484, -0.0137482, -0.0146027, -0.0132294, -0.0142151, -0.0138397, -0.0142059, -0.0138092, -0.0138947, -0.0140686, -0.0138763, -0.0148499,
519 -0.0134979, -0.0143219, -0.014798, -0.013855, -0.0151398, -0.0137909, -0.0160828, -0.0138245, -0.0164886, -0.0144775, -0.0163696, -0.0154266, -0.0161621,
520 -0.0162598, -0.0162537, -0.0166504, -0.0166809, -0.0172241, -0.0173462, -0.0174561, -0.017691, -0.0177521, -0.0187469, -0.0179474, -0.0189636, -0.0188995,
521 -0.0187897, -0.0196259, -0.019931, -0.0191498, -0.019989, -0.0206665, -0.0200256, -0.0210602, -0.0203705, -0.0206268, -0.0216705, -0.0211761, -0.0207367,
522 -0.022467, -0.0210968, -0.0216644, -0.0223053, -0.0217224, -0.0225677, -0.0221924, -0.0222198, -0.0221497, -0.0228607, -0.0222839, -0.0222961, -0.0228333,
523 -0.0224121, -0.02211, -0.0225311, -0.0226898, -0.0221771, -0.0224426, -0.0221924, -0.022467, -0.0215393, -0.0226563, -0.0212494, -0.0224213, -0.0214966,
524 -0.0217743, -0.0212158, -0.0209595, -0.0216644, -0.0201111, -0.0213074, -0.0201386, -0.0203735, -0.0195312, -0.0198486, -0.0194397, -0.0192261, -0.0195129,
525 -0.0185547, -0.0181, -0.0187256, -0.0177155, -0.0178223, -0.0170929, -0.0171448, -0.0166595, -0.016748, -0.016214, -0.0157806, -0.015625, -0.0154236,
526 -0.0148437, -0.0142029, -0.0144989, -0.0140594, -0.0136505, -0.012915, -0.0129883, -0.0129181, -0.0121765, -0.0127411, -0.0111694, -0.0120392, -0.0101746,
527 -0.011084, -0.0107819, -0.00974426, -0.0102814, -0.0097168, -0.00907593, -0.00925903, -0.00843506, -0.00874329, -0.00804749, -0.0083313, -0.00707092, -0.00776062,
528 -0.00654602, -0.00692444, -0.0065033, -0.00602112, -0.00585022, -0.00679016, -0.00492859, -0.00537109, -0.00489197, -0.0050293, -0.00384521, -0.00466919, -0.00414124,
529 -0.00358887, -0.00398865, -0.00309753, -0.00323181, -0.00274963, -0.00351868, -0.00221558, -0.00262146, -0.00177917, -0.00304871, -0.00111389, -0.0019928, -0.00140381,
530 -0.00163574, -0.000762939, -0.00186768, -0.000765991, -0.0011261, -0.000460815, -0.000610352, -0.000253296, -0.000527954, -5.49316e-05, -7.32422e-05, -0.000308228, 0.000402832,
531 0.000131226, 0.000561523, 0.000674438, 0.000219727, 0.000473022, 0.00139465, 0.000497437, 0.000439453, 0.00133057, 0.000595093, 0.00108948, 0.000759888, 0.00157776,
532 0.000561523, 0.00187988, 0.00144043, 0.000976562, 0.00134277, 0.00134888, 0.00142517, 0.00111694, 0.0019165, 0.000650024, 0.00181274, 0.00108337, 0.00181885,
533 0.000964355, 0.00148926, 0.00209045, 0.000595093, 0.00195618, 0.00113831, 0.00119019, 0.00160522, 0.00088501, 0.000985718, 0.00184326, 0.00065918, 0.001828,
534 0.000204468, 0.00169678, 0.000622559, 0.00128479, 0.000857544, 0.000714111, 0.00100098, 0.000457764, 0.001297, 0.000582886, 0.000198364, 0.000494385, 0.000515747,
535 0.00078125, 0.000454712, -0.000323486, 2.44141e-05, 0.000262451, 0.000234985, 0.000100708, -0.000592041, 0.000241089, -0.000964355, 0.000210571, -0.000253296, -0.000811768,
536 0.00027771, -0.00175171, -0.00010376, -0.00115051, -0.000558472, -0.000958252, -0.000909424, -0.00159607, -0.000967407, -0.000979614, -0.00145264, -0.000759888, -0.00224304,
537 -0.00124817, -0.0020813, -0.00142517, -0.00115662, -0.00259094, -0.00107727, -0.00309448, -0.00182495, -0.00234375, -0.00194092, -0.00209351, -0.00295715, -0.00179749,
538 -0.0027771, -0.00310364, -0.00252686, -0.00259094, -0.00271912, -0.00289917, -0.00324097, -0.00242615, -0.00427551, -0.00278015, -0.00322876, -0.00387878, -0.00259094,
539 -0.00414734, -0.0035675, -0.00411072, -0.00362854, -0.00419006, -0.00325928, -0.00406494, -0.00432434, -0.00355835, -0.00458374, -0.00379334, -0.00516968, -0.00374146,
540 -0.00458679, -0.00444641, -0.0045105, -0.00450439, -0.00531006, -0.00496216, -0.00504456, -0.00452881, -0.00476685, -0.00530701, -0.00492554, -0.00472717, -0.00536499,
541 -0.0053772, -0.00533142, -0.00585022, -0.00506287, -0.0053009, -0.00613403, -0.00461121, -0.00552063, -0.00648193, -0.00557861, -0.00544739, -0.00595703, -0.00599365,
542 -0.00575562, -0.00596313, -0.00621338, -0.00548096, -0.00636292, -0.00589905, -0.00645142, -0.00596008, -0.00639038, -0.00620422, -0.0060852, -0.00692139, -0.0059082,
543 -0.00614624, -0.00646057, -0.00671997, -0.00586243, -0.0071106, -0.00628662, -0.00688782, -0.00625305, -0.00632935, -0.00701599, -0.00573425, -0.00686646, -0.00613098,
544 -0.00646362, -0.00684204, -0.00596924, -0.0066925, -0.00647583, -0.00724182, -0.00605164, -0.00651245, -0.00662231, -0.00670776, -0.00567627, -0.00691528, -0.00636292,
545 -0.00577087, -0.00639343, -0.00601501, -0.00705261, -0.00613709, -0.00581055, -0.00655823, -0.00646057, -0.0063324, -0.00587463, -0.00585632, -0.00609131, -0.00537109,
546 -0.00675964, -0.00549316, -0.00585632, -0.00619812, -0.00517578, -0.00635071, -0.00561523, -0.00570984, -0.00603027, -0.00499268, -0.00581665, -0.00520325, -0.00509338,
547 -0.00570068, -0.004599, -0.00605774, -0.00427246, -0.00534668, -0.00588074, -0.00450134, -0.0052063, -0.00545349, -0.00462647, -0.00487671, -0.00500488, -0.00424805,
548 -0.00521545, -0.00376282, -0.00480042, -0.00346985, -0.00529785, -0.00290833, -0.004599, -0.00418701, -0.00404053, -0.0041687, -0.00411377, -0.00405273, -0.00403442,
549 -0.00378418, -0.00343018, -0.00403748, -0.00315857, -0.00348206, -0.00335083, -0.00279541, -0.00335083, -0.00300293, -0.00249023, -0.00306702, -0.00220947, -0.00322571,
550 -0.00209961, -0.00278625, -0.00257263, -0.00223999, -0.002771, -0.00263672, -0.00133057, -0.00270081, -0.00180969, -0.00234985, -0.000891113, -0.00273743, -0.000973511,
551 -0.00144043, -0.000881958, -0.00140686, -0.00090332, -0.00039978, -0.00139465, -0.000735474, -0.000930786, -0.000427246, -0.000756836, -0.00100403, -0.00017395, -0.000366211,
552 -0.000180054, -0.00039978, -3.05176e-06, -7.01904e-05, 0.000299072, -0.00450134, -0.0052063, -0.00545349, -0.00462647, -0.00487671, -0.00500488, -0.00424805, -0.00521545,
553 -0.00376282, -0.00480042, -0.00346985, -0.00529785, -0.00290833, -0.004599, -0.00418701, -0.00404053, -0.0041687, -0.00411377, -0.00405273, -0.00403442
554 }
555 };
556
557 CabDesc_imp<511> cab_data_1x15 = {
558 511, 48000,
559 { 0.000134277, 0.000299072, 0.000500488, 0.000701904, 0.000897217, 0.00107422, 0.0012207, 0.00134277, 0.00166016, 0.00279541, 0.00596924, 0.0129211, 0.0255066,
560 0.0450439, 0.0717041, 0.103967, 0.138361, 0.169751, 0.192133, 0.199994, 0.189673, 0.160516, 0.115253, 0.0595947, 0.00111084, -0.0523376,
561 -0.09422, -0.120544, -0.130334, -0.125336, -0.109198, -0.0863647, -0.0610535, -0.036554, -0.015033, 0.00230103, 0.0147949, 0.0221741, 0.0244629,
562 0.0220886, 0.015863, 0.00692749, -0.00336914, -0.0137573, -0.0232178, -0.0311218, -0.0372253, -0.041571, -0.0443298, -0.0456299, -0.0454651, -0.0437683,
563 -0.0405396, -0.0360168, -0.0307495, -0.0255127, -0.0211731, -0.018396, -0.0174988, -0.0183716, -0.0206116, -0.0236694, -0.0270508, 0, -0.0337097,
564 -0.0368042, -0.0396301, -0.0419495, -0.0433411, -0.0432739, -0.0412781, -0.0371643, -0.0311523, -0.0238831, -0.016272, -0.00932617, -0.00390625, -0.000634766,
565 0.000219727, -0.00123291, -0.0045166, -0.00890503, -0.013562, -0.0176819, -0.0205872, -0.021814, -0.0211914, -0.0188721, -0.0152954, -0.0111328, -0.00716553,
566 -0.00413818, -0.00258789, -0.00273437, -0.00445557, -0.00733032, -0.0107849, -0.0142944, -0.0174927, -0.0202332, -0.0226074, -0.0248291, -0.027124, -0.0295776,
567 -0.0320679, -0.0342712, -0.0357727, -0.0361938, -0.0352844, -0.0329712, -0.0293701, -0.0247498, -0.0194946, -0.0140198, -0.00877075, -0.00415649, -0.00057373,
568 0.00169678, 0.00249634, 0.00189209, 0.000170898, -0.00219727, -0.0046814, -0.0067749, -0.00814209, -0.0086731, -0.00847778, 0, -0.00687866, -0.00581055,
569 -0.0045227, -0.0027832, -0.000341797, 0.00289307, 0.0067627, 0.0108215, 0.0144226, 0.0168823, 0.017688, 0.0166565, 0.0139832, 0.010199, 0.00598755,
570 0.00205688, -0.0010376, -0.00300293, -0.00379028, -0.00352173, -0.00244141, -0.000805664, 0.00119019, 0.00338745, 0.00569458, 0.00802002, 0.0102478, 0.0122314,
571 0.0138184, 0.0148865, 0.0153687, 0.0152466, 0.014563, 0.0133667, 0.0117493, 0.00982056, 0.00775146, 0.00578003, 0.00420532, 0.003302, 0.00330811,
572 0.00438232, 0.00649414, 0.00944214, 0.0127869, 0.0159607, 0.0184021, 0.0197144, 0.0197632, 0.0186768, 0.0167664, 0.0143921, 0.0118164, 0.00919189,
573 0.00656738, 0.00415039, 0.00236816, 0.00170288, 0.00239258, 0.00419922, 0.00649414, 0.00848999, 0.00963135, 0, 0.00950928, 0.00913696, 0.00916748,
574 0.00994873, 0.0114441, 0.0129517, 0.0133057, 0.0118164, 0.00891113, 0.00587769, 0.00390625, 0.00344238, 0.00426636, 0.00597534, 0.00808716, 0.0100098,
575 0.011261, 0.0118774, 0.0124756, 0.0137451, 0.0159851, 0.0189636, 0.0220642, 0.0245972, 0.0260681, 0.0262634, 0.0252197, 0.0232483, 0.0209595,
576 0.0191345, 0.018335, 0.0185791, 0.0194336, 0.0203552, 0.0208679, 0.0206482, 0.0198303, 0.0189514, 0.0185608, 0.0187256, 0.0190613, 0.0190186,
577 0.0180847, 0.0159729, 0.0129333, 0.00982666, 0.00770264, 0.00709839, 0.00768433, 0.00869141, 0.009552, 0.0102844, 0.0112671, 0.0126709, 0.0141357,
578 0.0149963, 0.0149658, 0.0143555, 0.0136536, 0.0131897, 0.0129456, 0.0123962, 0.01073, 0, 0.003302, -0.00055542, -0.00249023, -0.00183716,
579 0.000653076, 0.00330811, 0.00470581, 0.00438232, 0.00276489, 0.000653076, -0.00116577, -0.00214233, -0.00214233, -0.00164795, -0.00159912, -0.00278931, -0.00516357,
580 -0.0078186, -0.00956421, -0.00946655, -0.00714111, -0.00299683, 0.00181885, 0.00605469, 0.00899658, 0.010614, 0.0112976, 0.0117004, 0.0124268, 0.0136475,
581 0.0148865, 0.0155334, 0.0153259, 0.0143738, 0.0128174, 0.0107178, 0.00843506, 0.00675659, 0.00626831, 0.00688477, 0.00808716, 0.00939941, 0.0105408,
582 0.0111877, 0.0109558, 0.00969238, 0.00762939, 0.00519409, 0.00283203, 0.000946045, -0.000274658, -0.00098877, -0.00159302, -0.00229492, -0.00292969, -0.00309448,
583 -0.00252686, -0.00139771, -0.000219727, 0.000463867, 0.000421143, -0.000146484, -0.000793457, 0, -0.00114136, -0.000982666, -0.000830078, -0.000634766, -0.000286865,
584 0.000250244, 0.00090332, 0.00143433, 0.00161133, 0.00128174, 0.000592041, -0.000128174, -0.000628662, -0.00098877, -0.00145874, -0.00221558, -0.0032898, -0.00459595,
585 -0.00594482, -0.00700684, -0.00742798, -0.0071106, -0.00638428, -0.00586548, -0.00601807, -0.00681152, -0.00780029, -0.00846558, -0.00839844, -0.00752563, -0.00609741,
586 -0.00449829, -0.00308838, -0.00220947, -0.00217285, -0.00292969, -0.0039978, -0.00477905, -0.00494995, -0.0045105, -0.0036377, -0.00254517, -0.00152588, -0.000872803,
587 -0.000720215, -0.000958252, -0.00129395, -0.00142212, -0.00125122, -0.00102539, -0.00112915, -0.00167236, -0.00245972, -0.00327759, -0.00406494, -0.00474854, -0.00515747,
588 -0.00513916, -0.00465698, -0.00377808, -0.00269775, -0.00169678, -0.0010437, 0, -0.00129395, -0.00206299, -0.00284424, -0.00324097, -0.00306396, -0.0024292,
589 -0.00175171, -0.0015686, -0.00222778, -0.00378418, -0.00597534, -0.00823975, -0.00977173, -0.00990601, -0.00860596, -0.00648804, -0.00442505, -0.00300903, -0.0024292,
590 -0.00257568, -0.00314331, -0.00378418, -0.00437622, -0.0050293, -0.00586548, -0.00681763, -0.00765991, -0.0081604, -0.00825195, -0.00813599, -0.00806274, -0.00805664,
591 -0.00791626, -0.00751343, -0.00697632, -0.006604, -0.00667725, -0.00727539, -0.00825195, -0.00933228, -0.0102417, -0.01073, -0.0106934, -0.0101929, -0.00941772,
592 -0.00853272, -0.00772705, -0.00722046, -0.0071167, -0.00734253, -0.00775757, -0.00819702, -0.00848389, -0.0085022, -0.00836792, -0.00825806, -0.00820312, -0.00802002,
593 -0.00759277, -0.00710449, -0.00682373, -0.00691528, -0.00737305, 0, -0.00810547, -0.00736694, -0.00585938, -0.00427246, -0.00317993, -0.00258789, -0.00221558,
594 -0.00192871, -0.00171509, -0.00146484, -0.00110474, -0.000738525, -0.00057373, -0.000805664, -0.0015564, -0.00251465, -0.00287476, -0.00202026, -0.000274658, 0.00140381,
595 0.00223389, 0.00211182, 0.00143433, 0.000683594, 7.93457e-05, -0.000537109, -0.00145874, -0.00272217, -0.00408325, -0.00528564, -0.00620117, -0.00673828, -0.00682373,
596 -0.006427, -0.00548706, -0.0039917, -0.00223999, -0.000958252, -0.000842285, -0.00187988, -0.00343628, -0.00494385, -0.00612793, -0.00692139, -0.00733032, -0.00742798,
597 -0.00737305, -0.00731201, -0.00737305, -0.00758667, -0.00773926, -0.00747681, -0.00657959, -0.0052002, -0.00383911, -0.00291748, -0.00247192, -0.00231934, -0.00227661,
598 -0.00219116, -0.00198364, -0.00184937, -0.0019043
599 }
600 };
601
602 CabDesc_imp<998> cab_data_mesa = {
603 998, 48000,
604 { 0.00020752, 0.000354004, 0.000421143, 0.000354004, 0.000213623, 3.05176e-05, 0.00010376, 0.00178223, 0.00993652, 0.0342224, 0.0856934, 0.154669, 0.199994,
605 0.186456, 0.115784, 0.0149719, -0.0793213, -0.134674, -0.144513, -0.121069, -0.0771423, -0.0290222, 0.00469971, 0.0174072, 0.0143616, 0.00430908,
606 -0.00318604, -0.00372925, 0.00308228, 0.014386, 0.0227295, 0.0225159, 0.0127075, -0.000439453, -0.00760498, -0.00966797, -0.0125916, -0.015387, -0.0153625,
607 -0.0173401, -0.0275513, -0.0406067, -0.044635, -0.0366638, -0.0249084, -0.0157288, -0.00880737, -0.00385742, 0.000500488, 0.00552368, 0.0072937, 0.00379639,
608 -0.000646973, -0.00421143, -0.011554, -0.0231873, -0.0317993, -0.0343262, -0.0347473, -0.0345398, -0.0317749, -0.0270691, -0.0201294, 0, 0.00819702,
609 0.0214722, 0.0278442, 0.0240112, 0.010791, -0.00495605, -0.0165405, -0.0211426, -0.0202087, -0.0174377, -0.0157532, -0.0155273, -0.0153198, -0.0130981,
610 -0.00821533, -0.00350952, -0.00205688, -0.00298462, -0.00479736, -0.00900879, -0.0153992, -0.0206055, -0.0214661, -0.0169678, -0.00876465, 0.000488281, 0.00910034,
611 0.0159668, 0.0195923, 0.0187073, 0.0139221, 0.0071228, -0.000280762, -0.00716553, -0.012561, -0.0164307, -0.0199951, -0.0237122, -0.0257385, -0.0239319,
612 -0.0181946, -0.00994263, -0.00133057, 0.00576782, 0.010498, 0.0131409, 0.0147278, 0.0158875, 0.0163879, 0.0148132, 0.00995483, 0.00288696, -0.00346069,
613 -0.00641479, -0.00625, -0.00564575, -0.00671997, -0.00940552, -0.0114258, -0.01026, -0.00533447, 0.00151367, 0.0074646, 0, 0.0127625, 0.0132996,
614 0.0135132, 0.0130554, 0.0112, 0.00772705, 0.00321655, -0.00134888, -0.00551147, -0.00891724, -0.0106873, -0.0100708, -0.00715332, -0.00227051, 0.00411987,
615 0.0107239, 0.016272, 0.0203125, 0.022467, 0.0223083, 0.0198242, 0.0156982, 0.0109863, 0.00653687, 0.00307007, 0.000872803, -0.000744629, -0.00249634,
616 -0.00411987, -0.00512085, -0.00524902, -0.00421753, -0.00172119, 0.00222168, 0.00689087, 0.010907, 0.0132263, 0.0137146, 0.0125244, 0.0100891, 0.00727539,
617 0.00509033, 0.00405273, 0.00396118, 0.0043396, 0.00493164, 0.00542603, 0.00534058, 0.00458984, 0.00357666, 0.00273437, 0.0024231, 0.00309448, 0.00482178,
618 0.00687866, 0.00841064, 0.00910645, 0.00899658, 0.00805054, 0.006427, 0.00455933, 0.00275269, 0.00125732, 0, 0.000964355, 0.00222168, 0.00396729,
619 0.0059021, 0.0078064, 0.009552, 0.0110535, 0.0121948, 0.0128662, 0.0129578, 0.012384, 0.0112732, 0.00984497, 0.00819092, 0.00645752, 0.00488892,
620 0.00383301, 0.00350952, 0.00369263, 0.00373535, 0.0032898, 0.00265503, 0.00245361, 0.00301514, 0.00424194, 0.0057251, 0.00699463, 0.00770874, 0.00772095,
621 0.00706177, 0.00592041, 0.00457764, 0.00320435, 0.00202026, 0.0015625, 0.00206299, 0.00321655, 0.00463257, 0.00596924, 0.00702515, 0.00765381, 0.00772705,
622 0.0072937, 0.00652466, 0.00553589, 0.00446167, 0.0034668, 0.00252686, 0.00158691, 0.000775146, 0.000366211, 0.000671387, 0.00159912, 0.00280151, 0.00404663,
623 0.00512695, 0.00581055, 0.00594482, 0.00556641, 0.00476074, 0.00366211, 0.00255737, 0.00169678, 0, 1.83105e-05, -0.00131226, -0.00247803, -0.00265503,
624 -0.00128174, 0.00134277, 0.00421143, 0.00625, 0.00690918, 0.00640869, 0.00543823, 0.00447388, 0.00372314, 0.00337524, 0.00349121, 0.00390015, 0.00432129,
625 0.00459595, 0.00484009, 0.0052002, 0.00544434, 0.00530396, 0.00480957, 0.00409546, 0.00325317, 0.00251465, 0.00203857, 0.00178833, 0.00170288, 0.00159302,
626 0.000994873, -0.000476074, -0.0026123, -0.00474854, -0.00640259, -0.00733032, -0.00740356, -0.00665894, -0.00523682, -0.00335083, -0.00142822, -6.71387e-05, 0.000408936,
627 0.000183105, -0.0003479, -0.000793457, -0.000964355, -0.000891113, -0.000732422, -0.000738525, -0.000964355, -0.00133057, -0.00180054, -0.00220337, -0.00218506, -0.00158081,
628 -0.000720215, -7.93457e-05, 0.000146484, -6.71387e-05, -0.000610352, -0.00110474, -0.00126953, 0, -0.00128784, -0.0015564, -0.00216064, -0.00307617, -0.00404053,
629 -0.00465088, -0.00470581, -0.00445557, -0.00430298, -0.00430908, -0.00435791, -0.00424805, -0.00397339, -0.00395508, -0.00460815, -0.00584717, -0.00720825, -0.00813599,
630 -0.00832519, -0.00797729, -0.00750732, -0.00708618, -0.00664063, -0.00593872, -0.00474854, -0.0031311, -0.00148315, -0.000238037, 0.000390625, 0.000585938, 0.000726318,
631 0.000933838, 0.000982666, 0.000683594, 0.000134277, -0.000610352, -0.00168457, -0.00303955, -0.00440063, -0.00553589, -0.00634155, -0.00675659, -0.0067749, -0.00652466,
632 -0.00618896, -0.00598755, -0.00613403, -0.00653687, -0.00679932, -0.00665283, -0.00618896, -0.00574951, -0.00565186, -0.00585327, -0.00618286, -0.0065979, -0.0069519,
633 -0.00705566, -0.00687866, -0.0065979, -0.00651245, -0.0067688, -0.00722046, 0, -0.0078064, -0.00776367, -0.00752563, -0.00704346, -0.00639648, -0.00576782,
634 -0.00524292, -0.00474243, -0.0041748, -0.0034729, -0.00264282, -0.00183716, -0.00136108, -0.00144043, -0.00202637, -0.00288086, -0.0036438, -0.00405884, -0.00415649,
635 -0.00408325, -0.00391846, -0.00388184, -0.00430298, -0.00526123, -0.00645142, -0.00740356, -0.00783691, -0.0078186, -0.00752563, -0.0071228, -0.0067749, -0.00652466,
636 -0.00638428, -0.00629883, -0.00604248, -0.00536499, -0.00426025, -0.00298462, -0.00195312, -0.00154419, -0.00193481, -0.00302734, -0.00447388, -0.00574341, -0.00636597,
637 -0.00614014, -0.00529175, -0.00437622, -0.00377197, -0.003479, -0.00327759, -0.00300903, -0.00270386, -0.00245972, -0.00234985, -0.0024353, -0.00270996, -0.00309448,
638 -0.00352173, -0.00393677, -0.00419312, -0.00418701, -0.0039978, 0, -0.00402832, -0.00458374, -0.00532837, -0.005896, -0.00601807, -0.0057312, -0.00526123,
639 -0.00478516, -0.00427246, -0.00363159, -0.00289917, -0.00217896, -0.00143433, -0.000671387, -0.000115967, 4.88281e-05, -0.000170898, -0.000628662, -0.00112305, -0.00148315,
640 -0.00166016, -0.00158691, -0.00130005, -0.0010498, -0.00102539, -0.00118408, -0.00130615, -0.00123901, -0.0010376, -0.000842285, -0.000750732, -0.000866699, -0.00122681,
641 -0.00176392, -0.00228882, -0.00263062, -0.00264893, -0.00224609, -0.00150757, -0.000787353, -0.000402832, -0.00032959, -0.000372314, -0.000372314, -0.000292969, -0.000256348,
642 -0.000335693, -0.000579834, -0.00102539, -0.00154419, -0.00183105, -0.00153809, -0.000518799, 0.000946045, 0.00230713, 0.00316162, 0.00335693, 0.00296631, 0.00222778,
643 0.00140381, 0.000646973, 7.93457e-05, -0.000170898, 0, 0.000274658, 0.000653076, 0.000897217, 0.000958252, 0.000909424, 0.000769043, 0.000439453, -6.71387e-05,
644 -0.000585938, -0.00101318, -0.00117798, -0.00098877, -0.000537109, 7.93457e-05, 0.000738525, 0.00130615, 0.00176392, 0.00203247, 0.0020874, 0.00213623, 0.00238037,
645 0.00283203, 0.00335083, 0.00372314, 0.00384521, 0.00388184, 0.00405884, 0.00445557, 0.0050293, 0.00566406, 0.00620117, 0.00649414, 0.00648804, 0.00636597,
646 0.00634155, 0.00631714, 0.00599976, 0.00523071, 0.00402832, 0.00261841, 0.00146484, 0.000964355, 0.00115967, 0.00184937, 0.00275269, 0.00346069, 0.00374146,
647 0.00368042, 0.00341187, 0.00301514, 0.00268555, 0.00259399, 0.00274658, 0.0031189, 0.00361328, 0.00412598, 0.00467529, 0.00530396, 0.00591431, 0.00632935,
648 0.00639038, 0.00603027, 0.0053772, 0, 0.00407715, 0.00383301, 0.00391846, 0.00430908, 0.00491943, 0.00549927, 0.00586548, 0.00602417, 0.00604858,
649 0.00595703, 0.00576782, 0.00549927, 0.00517578, 0.00482178, 0.00442505, 0.00401001, 0.00368042, 0.00354004, 0.00357666, 0.00366821, 0.00357666, 0.00313721,
650 0.00250244, 0.00204468, 0.00209961, 0.00266724, 0.00348511, 0.00422363, 0.00466309, 0.00472412, 0.00450439, 0.00418701, 0.00392456, 0.00380249, 0.00386353,
651 0.00403442, 0.00414429, 0.00406494, 0.00377197, 0.00343018, 0.00335083, 0.00368042, 0.00422363, 0.00473022, 0.00508423, 0.00529175, 0.00541992, 0.00542603,
652 0.00516357, 0.00466309, 0.00414429, 0.00379639, 0.00368042, 0.00370483, 0.0036377, 0.00335693, 0.00293579, 0.00256958, 0.00245972, 0.00263672, 0.00300903,
653 0.00341797, 0.00365601, 0, 0.00307617, 0.00255127, 0.00218506, 0.00219727, 0.00264893, 0.00332031, 0.00391846, 0.0041687, 0.00391235, 0.003125,
654 0.00195923, 0.000811768, 4.27246e-05, -0.00020752, -1.2207e-05, 0.000360107, 0.000640869, 0.000836182, 0.00111694, 0.00157471, 0.00203857, 0.00219116, 0.00186157,
655 0.00125732, 0.000714111, 0.000439453, 0.000439453, 0.000628662, 0.000939941, 0.00133057, 0.00170288, 0.00184326, 0.00162354, 0.00111084, 0.000567627, 0.000268555,
656 0.000402832, 0.00100708, 0.00194702, 0.00292969, 0.00361328, 0.00385132, 0.00372925, 0.00351562, 0.00337524, 0.00336304, 0.00350952, 0.00374146, 0.00383301,
657 0.00354614, 0.00275879, 0.00159302, 0.000384521, -0.000482178, -0.000805664, -0.000689697, -0.000463867, -0.000354004, -0.000396729, -0.000531006, -0.00057373, -0.000396729,
658 -5.49316e-05, 0, 0.000469971, 0.000543213, 0.000585938, 0.00057373, 0.000549316, 0.000640869, 0.000933838, 0.00141602, 0.00189819, 0.0020752, 0.00189209,
659 0.00155029, 0.00125122, 0.00108643, 0.000970459, 0.000750732, 0.000415039, -2.44141e-05, -0.000592041, -0.00117188, -0.00150146, -0.00147095, -0.0012146, -0.000878906,
660 -0.000488281, -0.00012207, 0, -0.000292969, -0.000915527, -0.00164185, -0.00223389, -0.00253296, -0.00244141, -0.00209351, -0.00177002, -0.00170288, -0.00192261,
661 -0.0022644, -0.00248413, -0.00239868, -0.00198975, -0.00142212, -0.000860596, -0.000415039, -0.000158691, -0.00012207, -0.000256348, -0.000482178, -0.000695801, -0.000848389,
662 -0.000927734, -0.000946045, -0.000939941, -0.0010437, -0.00131836, -0.00169067, -0.00202637, -0.00227051, -0.00241699, -0.00246582, -0.00250244, -0.00266724, -0.00296021,
663 0, -0.00341187, -0.00338745, -0.00332642, -0.00344849, -0.00390015, -0.00459595, -0.00522461, -0.00548096, -0.00523682, -0.0045227, -0.0034668, -0.00231934,
664 -0.00135498, -0.000799561, -0.000775146, -0.00130615, -0.0022522, -0.00331421, -0.00413818, -0.00449829, -0.00435791, -0.00378418, -0.00299072, -0.00223389, -0.00169678,
665 -0.00142822, -0.00144043, -0.00167236, -0.00197754, -0.00217285, -0.00220337, -0.00216064, -0.00215454, -0.00221558, -0.00228882, -0.00228882, -0.00217896, -0.00213623,
666 -0.00233765, -0.00270996, -0.00301514, -0.00308228, -0.00292358, -0.00275269, -0.0027771, -0.00298462, -0.003302, -0.00374756, -0.00420532, -0.00446777, -0.00442505,
667 -0.00404663, -0.0034668, -0.00297852, -0.00267334, -0.00245361, -0.00227051, -0.00206299, -0.00181885, -0.00161133, -0.00145874, -0.00135498, -0.00132446, 0,
668 -0.00187378, -0.00247803, -0.00302734, -0.003302, -0.00321045, -0.00291138, -0.00266724, -0.00250244, -0.00241089, -0.00245972, -0.00256958, -0.00256348, -0.00234985,
669 -0.00192261, -0.00144043, -0.00112305, -0.00112915, -0.00136108, -0.00153809, -0.00159302, -0.00164795, -0.0017395, -0.00180664, -0.00184937, -0.00197754, -0.00223999,
670 -0.00251465, -0.00269165, -0.00288086, -0.00316772, -0.00349121, -0.00375977, -0.00385742, -0.00371094, -0.00339966, -0.00303955, -0.00262451, -0.00217896, -0.00176392,
671 -0.00141602, -0.00116577, -0.00111084, -0.00134888, -0.00174561, -0.0020752, -0.00227661, -0.00241699, -0.00247192, -0.00234985, -0.0020752, -0.00184326, -0.00172119,
672 -0.00158691, -0.0013855, -0.0012085, -0.00117188, -0.00127563, -0.00143433, -0.00153198, -0.00150146, -0.0013855, -0.00123901, -0.00100708, 0, -0.000286865,
673 -1.83105e-05, 2.44141e-05, -9.15527e-05, -0.000158691, 1.2207e-05, 0.000415039, 0.000878906, 0.00119019, 0.00124512, 0.00113525, 0.000933838, 0.000610352, 0.000189209,
674 -0.00020752, -0.000457764, -0.00055542, -0.000561523, -0.000488281, -0.0003479, -0.000152588, 4.88281e-05, 0.000201416, 0.000262451, 0.000250244, 0.000189209, 0.000140381,
675 0.00010376, 7.32422e-05, 4.88281e-05, 6.71387e-05, 0.000146484, 0.000262451, 0.000323486, 0.000262451, 0.000115967, -5.49316e-05, -0.000201416, -0.000244141, -0.000146484,
676 -1.83105e-05, 1.83105e-05, -2.44141e-05, -4.27246e-05, -4.27246e-05, -5.49316e-05, -3.05176e-05, 0.00010376, 0.000335693, 0.000592041, 0.000823975, 0.0010437, 0.00131836,
677 0.00168457, 0.0020874, 0.00249634, 0.00282593, 0.00292358, 0.0027771, 0.00250854, 0.00221558, 0.00195923, 0.00170288, 0, 0.000933838, 0.000415039,
678 -1.83105e-05, -0.000213623, -0.000146484, 0.00012207, 0.000463867, 0.000720215, 0.000805664, 0.000756836, 0.00065918, 0.000561523, 0.000506592, 0.000500488, 0.00055542,
679 0.000683594, 0.000848389, 0.00103149, 0.0012207, 0.00142212, 0.00163574, 0.0019104, 0.00223389, 0.00251465, 0.00263062, 0.00249634, 0.00221558, 0.00200806,
680 0.00203247, 0.00227051, 0.00252686, 0.00252686, 0.00219116, 0.00170898, 0.00132446, 0.00119019, 0.00130615, 0.00154419
681 }
682 };
683
684 CabDesc_imp<841> cab_data_briliant = {
685 841, 48000,
686 { 0.000482178, 0.00043335, 0.000439453, 0.000421143, 0.000463867, 0.000500488, 0.000640869, 0.000683594, 0.000811768, 0.000793457, 0.00088501, 0.000787353, 0.000811768,
687 0.000982666, 0.00252075, 0.00623779, 0.0139893, 0.0277832, 0.0537781, 0.093512, 0.146436, 0.178247, 0.117297, -0.0167236, -0.115887, -0.14679,
688 -0.142633, -0.116064, -0.0726257, -0.0275269, 0.00512695, 0.0515442, 0.072113, 0.0563171, 0, 0.0566284, 0.0562561, 0.0503174, 0.0129578,
689 -0.0316345, -0.0648743, -0.0805237, -0.0483643, -0.0144958, 0.00458984, 0.00944824, 0.014856, 0.0198914, 0.00804443, -0.0026062, -0.0223633, -0.0235962,
690 0.00594482, 0.0248108, 0.0348694, 0.0258179, -0.00292969, -0.0217041, -0.0262939, -0.0175049, -0.00540771, -0.00526123, -0.00762939, -0.0148499, -0.0190247,
691 -0.0238525, -0.027417, -0.0233521, -0.00477905, 0.0248596, 0.039032, 0.0333923, 0.0225159, 0.00825195, -0.00351562, -0.0138855, -0.0213684, -0.0242859,
692 -0.0281677, -0.0273193, -0.0261353, -0.0251953, -0.019989, -0.00855103, 0.00524902, 0.0155762, 0.0175964, 0.0115051, 0.000958252, -0.00958252, -0.0187195,
693 -0.0190308, -0.0161255, -0.0147461, -0.0102844, -0.00829468, -0.00565796, -0.00269165, 0, 0.00249023, 0.00302734, 0.00223999, -0.00163574, -0.00375366,
694 -0.00883179, -0.0200806, -0.0300903, -0.0328064, -0.0301819, -0.0252625, -0.018396, -0.00964355, 1.2207e-05, 0.0085022, 0.0127197, 0.0113403, 0.00792847,
695 0.00335693, -0.00170288, -0.00737305, -0.0113586, -0.0134766, -0.0163574, -0.0159851, -0.0112915, -0.00338135, 0.00411377, 0.00782471, 0.00733643, 0.00357056,
696 -0.00240479, -0.00739746, -0.00960693, -0.0105652, -0.00952148, -0.00513306, -0.00196533, -0.0019043, -0.00330811, -0.00599976, -0.010144, -0.0137268, -0.0151672,
697 -0.0133728, -0.00734253, 0.000292969, 0.00736694, 0.0119507, 0.0138428, 0.0126465, 0.00895996, 0.00510864, 0.00193481, -0.00162964, -0.00593262, -0.00997314,
698 -0.0123901, -0.0121277, -0.00897217, -0.00412598, 0.000640869, 0.00338135, 0, 0.00311279, 0.00162964, 0.000701904, 0.000842285, 0.00146484, 0.00219727,
699 0.00212402, 7.93457e-05, -0.00328369, -0.00634155, -0.00761719, -0.0072937, -0.00584106, -0.00375977, -0.00124512, 0.00134888, 0.00351562, 0.00368042, 0.00163574,
700 -0.000854492, -0.00252075, -0.00349121, -0.00348511, -0.00258179, -0.00126953, 0.000512695, 0.00236816, 0.00263672, 0.00159302, 0.00108032, 0.00145264, 0.00215454,
701 0.00270996, 0.00305176, 0.00326538, 0.0038208, 0.00461426, 0.00512085, 0.00541382, 0.00565186, 0.00577393, 0.00552979, 0.00476685, 0.00344849, 0.00185547,
702 0.00043335, -0.000720215, -0.00119019, -0.00100098, -0.000585938, -3.66211e-05, 0.000854492, 0.00212402, 0.00379028, 0.00557861, 0.00741577, 0.00864868, 0.00892944,
703 0.00809937, 0.00599976, 0.00393677, 0.00253296, 0.0017395, 0, 0.00230713, 0.00323486, 0.0041626, 0.00544434, 0.006427, 0.0064209, 0.00609131,
704 0.00587158, 0.0057251, 0.00584106, 0.00626221, 0.00634155, 0.00559082, 0.00437012, 0.00283203, 0.00137939, 0.000549316, -9.15527e-05, -0.000640869, -0.000848389,
705 -0.000427246, 0.000592041, 0.00215454, 0.00371094, 0.00456543, 0.00495605, 0.00524902, 0.00523071, 0.00488892, 0.00448608, 0.00412598, 0.00410156, 0.0043396,
706 0.00447388, 0.00420532, 0.00383911, 0.00350952, 0.00331421, 0.00338745, 0.00367432, 0.00415039, 0.00480957, 0.00551147, 0.00626221, 0.00689087, 0.00742798,
707 0.00778198, 0.00771484, 0.00737305, 0.00680542, 0.0059082, 0.00482178, 0.0039978, 0.00397339, 0.00461426, 0.00521851, 0.00548706, 0.00566406, 0.00592651,
708 0.00613403, 0.00617065, 0.00601807, 0.00565796, 0, 0.00448608, 0.00404053, 0.00389404, 0.00391846, 0.00363159, 0.00259399, 0.00152588, 0.00103149,
709 0.00100708, 0.00172729, 0.00325317, 0.00502319, 0.00634155, 0.0071228, 0.00752563, 0.00719605, 0.00609131, 0.00492554, 0.00449829, 0.00479736, 0.00510864,
710 0.0048584, 0.00404663, 0.00308228, 0.00206909, 0.00112305, 0.000640869, 0.000665283, 0.000933838, 0.00111694, 0.00130615, 0.00166626, 0.00195923, 0.00215454,
711 0.00236816, 0.00263672, 0.00284424, 0.00288086, 0.00256348, 0.00175781, 0.000811768, 0.000292969, 0.00022583, 0.000256348, 0.000201416, 0.000189209, 0.000469971,
712 0.0010498, 0.00171509, 0.00219727, 0.00270386, 0.00330811, 0.00360107, 0.00326538, 0.00249023, 0.00153198, 0.000616455, 0.00020752, 0.000311279, 0.000653076,
713 0.00111694, 0.00177612, 0.00239258, 0, 0.00216064, 0.00164795, 0.00126343, 0.00153198, 0.00227051, 0.00250244, 0.00203857, 0.0013855, 0.000653076,
714 -0.000164795, -0.000646973, -0.000567627, -0.000244141, 6.10352e-05, 6.10352e-06, -0.00067749, -0.00144043, -0.00168457, -0.00144653, -0.000878906, -0.00022583, 0.000140381,
715 0.00012207, -0.000140381, -0.00057373, -0.00078125, -0.00045166, 0.000250244, 0.000958252, 0.00134888, 0.00112305, 3.05176e-05, -0.00161743, -0.00317383, -0.0041748,
716 -0.00452881, -0.00431519, -0.00375977, -0.00314941, -0.00269775, -0.00262451, -0.00281372, -0.00283813, -0.00247803, -0.0020752, -0.00178833, -0.00176392, -0.00219116,
717 -0.0026001, -0.00245972, -0.00196533, -0.00153198, -0.00117798, -0.00114746, -0.00135498, -0.00152588, -0.00187988, -0.00263062, -0.00344238, -0.00397339, -0.00419312,
718 -0.00409546, -0.00386353, 0, -0.00374146, -0.00299072, -0.00170898, -0.000506592, 0.000396729, 0.000891113, 0.000872803, 0.00055542, 0.000177002, -0.000396729,
719 -0.0012146, -0.00200806, -0.0026062, -0.00285034, -0.0027771, -0.00255737, -0.00237427, -0.00220947, -0.00218506, -0.00228271, -0.00235596, -0.00250854, -0.00290527,
720 -0.00339966, -0.00370483, -0.00373535, -0.00338135, -0.00292358, -0.00267944, -0.00256958, -0.00245972, -0.00227051, -0.00194092, -0.00142822, -0.00100708, -0.000756836,
721 -0.000714111, -0.000860596, -0.00129395, -0.00187378, -0.00248413, -0.00317383, -0.0036499, -0.0038208, -0.00387573, -0.00408325, -0.00444946, -0.00476074, -0.00471802,
722 -0.00430908, -0.00405884, -0.00401611, -0.00378418, -0.003302, -0.00283203, -0.00239868, -0.00197144, -0.00177612, -0.00175781, -0.00175781, -0.00185547, -0.00220337,
723 -0.00263062, 0, -0.00299072, -0.00247803, -0.00155029, -0.000769043, -0.000634766, -0.00108643, -0.00169067, -0.00222778, -0.00244141, -0.00245361, -0.00250244,
724 -0.00247192, -0.00252075, -0.00255127, -0.00237427, -0.00209351, -0.00177002, -0.00159302, -0.00153809, -0.00166626, -0.00186768, -0.00151367, -0.000689697, 0.00010376,
725 0.000549316, 0.000592041, 0.000238037, -0.000628662, -0.00166016, -0.00244141, -0.00296021, -0.00327759, -0.0034729, -0.00334473, -0.00282593, -0.00227661, -0.00164795,
726 -0.00115356, -0.000860596, -0.000476074, -4.88281e-05, 0.000262451, 0.000219727, -9.15527e-05, -0.000256348, -0.000311279, -0.000494385, -0.000915527, -0.00154419, -0.0020813,
727 -0.00223999, -0.00210571, -0.00193481, -0.00155029, -0.00102539, -0.000634766, -0.000482178, -0.000701904, -0.00108032, -0.0013855, -0.00153198, -0.00147705, -0.00131226,
728 0, -0.00130615, -0.00145874, -0.00144653, -0.00119629, -0.000915527, -0.000701904, -0.000610352, -0.000762939, -0.00115967, -0.00167847, -0.00198364, -0.00172119,
729 -0.00116577, -0.000506592, 0.000238037, 0.000811768, 0.00116577, 0.00134277, 0.0012085, 0.000830078, 0.000439453, 0.000109863, 1.83105e-05, 0.000201416, 0.000402832,
730 0.000366211, 8.54492e-05, -2.44141e-05, 0.000170898, 0.000360107, 0.000628662, 0.00110474, 0.00145264, 0.00141602, 0.00111694, 0.000708008, 0.00032959, 0.000250244,
731 0.00055542, 0.00101318, 0.00145874, 0.0015564, 0.00131226, 0.00103149, 0.00067749, 0.000292969, 0.00020752, 0.00045166, 0.000634766, 0.000457764, 1.2207e-05,
732 -0.000366211, -0.000280762, 0.000177002, 0.000744629, 0.0013916, 0.00209961, 0.00267944, 0.00300903, 0.00310669, 0.00286255, 0.00241699, 0.0019165, 0,
733 0.00117188, 0.000909424, 0.000506592, -5.49316e-05, -0.000482178, -0.000720215, -0.000756836, -0.000439453, 0.000109863, 0.000482178, 0.00067749, 0.000854492, 0.000952148,
734 0.000964355, 0.000976562, 0.00102539, 0.00112305, 0.00130615, 0.00141602, 0.0012146, 0.000811768, 0.000549316, 0.000671387, 0.00107422, 0.00160522, 0.00203247,
735 0.00216064, 0.00215454, 0.00187988, 0.00133057, 0.00098877, 0.00112915, 0.00161133, 0.0022583, 0.00281982, 0.00283203, 0.00223999, 0.00167236, 0.00162354,
736 0.00188599, 0.00221558, 0.00249634, 0.00253906, 0.00231934, 0.00205688, 0.0017334, 0.00137939, 0.00131836, 0.00165405, 0.00202637, 0.00205688, 0.00184326,
737 0.00143433, 0.000909424, 0.000457764, 0.000213623, 0.00020752, 0.000488281, 0.00108032, 0.00169678, 0.00205688, 0.00215454, 0.00223389, 0, 0.00264282,
738 0.00270996, 0.00250854, 0.00199585, 0.00134277, 0.000744629, 0.000299072, 0.000134277, 0.000372314, 0.000842285, 0.00119629, 0.0012085, 0.000793457, 2.44141e-05,
739 -0.000738525, -0.00114136, -0.00111694, -0.000927734, -0.000689697, -0.000299072, 0.000201416, 0.00057373, 0.000732422, 0.000811768, 0.000976562, 0.00123901, 0.00149536,
740 0.00159912, 0.00142212, 0.00114746, 0.000958252, 0.000744629, 0.000335693, -7.32422e-05, -0.000177002, 9.15527e-05, 0.00055542, 0.000976562, 0.00117798, 0.00126953,
741 0.00136719, 0.0015625, 0.00187988, 0.00210571, 0.00220337, 0.00209351, 0.00166016, 0.00102539, 0.000415039, 8.54492e-05, 0.000164795, 0.000494385, 0.000775146,
742 0.000915527, 0.00100098, 0.000854492, 0.000408936, -0.000170898, -0.000714111, -0.000976562, -0.000866699, -0.000585938, -0.000482178, 0, -0.000482178, -0.000323486,
743 -0.000201416, -8.54492e-05, 5.49316e-05, 0.000317383, 0.000708008, 0.00098877, 0.00115356, 0.00133667, 0.00150757, 0.00152588, 0.00137939, 0.0010498, 0.000549316,
744 -0.000134277, -0.000854492, -0.00147095, -0.00196533, -0.0022522, -0.00210571, -0.00146484, -0.000732422, -0.000317383, -0.000183105, -0.000177002, -0.000262451, -0.000384521,
745 -0.000500488, -0.000646973, -0.000854492, -0.00106812, -0.00122681, -0.00135498, -0.00153809, -0.00172729, -0.00181885, -0.00164185, -0.00109863, -0.000372314, 0.00022583,
746 0.000421143, 0.000360107, 0.000262451, 0.000256348, 0.0003479, 0.000390625, 0.000213623, -0.000189209, -0.000628662, -0.000927734, -0.0010437, -0.000952148, -0.000701904,
747 -0.000195313, 0.000439453, 0.000958252, 0.00123291, 0.00117798, 0.000817871, 0.000317383, -0.000292969, -0.00090332, 0, -0.00168457, -0.00196533, -0.00211792,
748 -0.0019043, -0.00154419, -0.00119019, -0.000756836, -0.000189209, 0.0003479, 0.00065918, 0.000585938, 0.000140381, -0.000500488, -0.00117188, -0.00176392, -0.00214233,
749 -0.00227661, -0.00214233, -0.00175171, -0.00117188, -0.000537109, -3.66211e-05, 0.000189209, 0.000128174, -7.93457e-05, -0.00032959, -0.000561523, -0.000805664, -0.00107422,
750 -0.00133057, -0.00152588, -0.00159302, -0.00145874, -0.00111694, -0.00078125, -0.000689697, -0.000866699, -0.00108643
751 }
752 };
753
754 CabDesc_imp<133> cab_data_vitalize = {
755 133, 48000,
756 {0.000488281, -0.0020752, 0.000561523, -0.00231934, 0.000634766, -0.00247803, 0.000512695, -0.00247803, 0.000146484, -0.00219727, -0.000622559, -0.00145264, -0.00202637,
757 -2.44141e-05, -0.00438232, 0.00247803, -0.00822754, 0.00706787, -0.0159546, 0.0202148, -0.0471558, 0.0953003, -0.208582, 0.312427, 0.75, -0.26803,
758 0.399963, 0.200696, -0.146655, -0.29303, -0.222168, -0.113098, 0.0267334, 0.0312134, 0.164685, 0.0443481, 0.186621, 0.0540039, 0.123303,
759 0.0805054, 0.0739868, 0.0591797, 0.0661743, 0.0400391, 0.0429932, 0.0339844, 0.0320557, 0.02323, 0.0217285, 0.0182007, 0.0157227, 0.0130005,
760 0.0103882, 0.00942383, 0.00718994, 0.0067749, 0.00458984, 0.00455322, 0.00272217, 0.00294189, 0.00140381, 0.00170898, 0.000402832, 0.000720215, -0.000354004,
761 -2.44141e-05, -0.000915527, -0.000610352, -0.00134277, -0.0010498, -0.00166016, -0.0013916, -0.0019043, -0.00166016, -0.0020874, -0.00187988, -0.00224609, -0.00203857,
762 -0.00235596, -0.00217285, -0.0024292, -0.0022583, -0.00247803, -0.00233154, -0.00252686, -0.00238037, -0.00256348, -0.0024292, 0.75, -0.00246582, -0.0026001,
763 -0.00247803, -0.0026001, -0.00249023, -0.0026001, -0.00250244, -0.0026001, -0.00251465, -0.0026001, -0.00251465, -0.0026001, -0.00251465, -0.0026001, -0.00252686,
764 -0.00258789, -0.00252686, -0.00258789, -0.00251465, -0.00257568, -0.00251465, -0.00256348, -0.00251465, -0.00256348, -0.00251465, -0.00256348, -0.00251465, -0.00256348,
765 -0.00251465, -0.00256348, -0.00251465, -0.00256348, -0.00252686, -0.00256348, -0.00252686, -0.00255127, -0.00252686, -0.00255127, -0.00252686, -0.00255127, -0.00252686,
766 -0.00255127, -0.00252686, -0.00256348
767 }
768 };
769
770 CabDesc_imp<68> cab_data_charisma = {
771 68, 48000,
772 {-0.0041626, 0.000817871, -0.00541992, 0.00203857, -0.00721436, 0.00386963, -0.00977783, 0.00655518, -0.0135254, 0.0107056, -0.019397, 0.0179687, -0.0306763,
773 0.0349365, -0.060791, 0.0839355, -0.121387, 0.0738403, 0, -0.399963, 0.177356, 0.284045, 0.041626, -0.2479, -0.224634, -0.212317,
774 -0.0146851, -0.028186, 0.13606, 0.0628052, 0.142847, 0.111206, 0.0892456, 0.113098, 0.0713745, 0.0726318, 0.0624023, 0.0565918, 0.0397461,
775 0.0431152, 0.0320679, 0.0316284, 0.0222412, 0.0241821, 0.0174805, 0.0184692, 0.0128052, 0.0139893, 0.0098999, 0.0109619, 0.00759277, 0.00843506,
776 0.00577393, 0.00654297, 0.00443115, 0.00511475, 0.00335693, 0.00395508, 0.00250244, 0.00305176, 0.00181885, 0.00230713, 0.00124512, 0.00170898, 0.000805664,
777 0.0012207, 0.000427246, 0.000805664
778 }
779 };
780
781
782 CabDesc_imp<244> cab_data_1x8 = {
783 244,44100,
784 {0.001984, 0.002991, 0.002503, 0.001404, 0.002075, 0.000580, -0.000488, 0.003693, -0.003723, 0.001892, 0.139683, 0.468245, 0.796930, 0.837855, 0.536576
785 , 0.106235, -0.233131, -0.408521, -0.435896, -0.359020, -0.234901, -0.112644, -0.021912, 0.025178, 0.031861, 0.010681, -0.025025, -0.062380, -0.092380
786 , -0.110141, -0.114505, -0.107700, -0.094668, -0.079287, -0.065859, -0.055635, -0.050478, -0.049471, -0.051485, -0.055086, -0.058473, -0.060213, -0.059450
787 , -0.056032, -0.050600, -0.043977, -0.036927, -0.030732, -0.025666, -0.022248, -0.020356, -0.019562, -0.019105, -0.018586, -0.017701, -0.016205, -0.013947
788 , -0.011597, -0.008820, -0.006348, -0.004608, -0.003296, -0.002869, -0.003143, -0.003601, -0.004364, -0.005188, -0.005371, -0.005402, -0.005432, -0.005097
789 , -0.004913, -0.004822, -0.005219, -0.005676, -0.006317, -0.007630, -0.008789, -0.009644, -0.009613, -0.008942, -0.008240, -0.007477, -0.006836, -0.006958
790 , -0.006928, -0.006531, -0.006958, -0.006592, -0.004517, -0.008576, 0.000305, 0.085299, 0.262825, 0.417463, 0.409803, 0.238472, 0.023530, -0.134831, -0.210211
791 , -0.213385, -0.168035, -0.103305, -0.042604, 0.000671, 0.021760, 0.023194, 0.011811, -0.006378, -0.024659, -0.038881, -0.046266, -0.046480, -0.041139, -0.033753
792 , -0.025330, -0.018555, -0.014222, -0.011780, -0.011567, -0.013977, -0.014252, -0.017212, -0.021699, 0.019959, 0.162481, 0.349803, 0.429304, 0.324412, 0.114750
793 , -0.075564, -0.188299, -0.222541, -0.196539, -0.138096, -0.074404, -0.022889, 0.008148, 0.018067, 0.012329, -0.002564, -0.020386, -0.036225, -0.046632, -0.050996
794 , -0.049043, -0.043519, -0.036225, -0.029328, -0.023560, -0.020325, -0.019074, -0.019471, -0.021058, -0.022980, -0.024110, -0.024293, -0.023438, -0.021180
795 , -0.018067, -0.014893, -0.011628, -0.008942, -0.006958, -0.005676, -0.005005, -0.004578, -0.004212, -0.003845, -0.003113, -0.002075, -0.000702, 0.000855
796 , 0.002472, 0.003540, 0.004578, 0.005097, 0.005158, 0.005341, 0.005219, 0.005310, 0.005341, 0.005280, 0.005524, 0.005707, 0.006165, 0.006317, 0.006378, 0.006348
797 , 0.006348, 0.006134, 0.005615, 0.005341, 0.005219, 0.005310, 0.005219, 0.005371, 0.005310, 0.005524, 0.005554, 0.005615, 0.005707, 0.005524, 0.005493, 0.005585
798 , 0.005707, 0.005768, 0.006104, 0.006287, 0.006531, 0.006623, 0.007172, 0.007263, 0.007538, 0.007752, 0.007935, 0.008209, 0.008271, 0.008637, 0.008881, 0.009217
799 , 0.009522, 0.009827, 0.009796, 0.010071, 0.010132, 0.010132, 0.010163, 0.010254, 0.010224, 0.010346, 0.010468, 0.010407, 0.010468, 0.010498, 0.010376, 0.010224
800 , 0.009888, 0.009735, 0.009491, 0.009217, 0.009278, 0.009003, 0.000000
801 }
802 };
803
804
805 CabDesc_imp<192> contrast_ir_desc = {
806 192, 48000,
807 { 0.147081, 0.208808, 0.208996, 0.163228, 0.0858905, -0.0119104, -0.0932825, -0.121011, -0.0999426, -0.071073, -0.0403973, -0.00214844, 0.0287018,
808 0.0381079, 0.0372284, 0.0330389, 0.0252979, 0.0141394, 0.00118835, -0.00764709, -0.00751953, 0.00262512, 0.0143475, 0.0174762, 0.0168384, 0.0179126,
809 0.00738525, -0.0114069, -0.0192352, -0.0145825, -0.0179932, -0.0244049, -0.0173956, -0.00357178, 0.00643188, 0.0108966, 0.0132935, 0.0123737, 0.00680786,
810 -0.000214844, -0.0040686, -0.00533752, -0.00738525, -0.00539124, -0.00171875, 0.00156433, 0.00481384, 0.0038739, -0.00666016, -0.018866, -0.0216522, -0.0171606,
811 -0.00717712, 0.00770081, 0.0209003, 0.0251971, 0.0221222, 0.0157977, 0.00453857, -0.0107892, -0.022478, -0.029165, -0.0303467, 0, -0.0169592,
812 -0.00966125, -0.00163147, 0.00273254, 0.000436401, -0.00282654, -0.00791565, -0.0136493, -0.0128436, -0.00564636, 0.00298096, 0.0090033, 0.00841248, 0.00201416,
813 -0.00579407, -0.0119171, -0.0145624, -0.0128436, -0.00741211, 0.000543823, 0.00414917, 0.00414917, 0.00114136, -0.00778809, -0.021377, -0.0325623, -0.0386584,
814 -0.038974, -0.0333679, -0.0221289, -0.0107825, -0.00453186, -0.00127563, -0.000261841, 0.000631104, 0.000537109, 0.000355835, 0.00114136, 0.00174561, 0.00104065,
815 -0.000100708, -0.00128906, -0.00083252, 0.00146362, 0.00234314, 0.000443115, -0.00245056, -0.00782165, -0.0164423, -0.0250092, -0.0309644, -0.0314343, -0.0265063,
816 -0.0176508, -0.00496155, 0.00805664, 0.0157843, 0.0171069, 0.0131055, 0.00613647, -0.00216187, -0.00804321, -0.0117157, 0, -0.015321, -0.0154352,
817 -0.013374, -0.00994995, -0.00672058, -0.00353821, -0.00110779, 0.000678101, 0.00250427, -0.00564636, 0.00298096, 0.0090033, 0.00841248, 0.00201416, -0.00579407,
818 -0.0119171, -0.0145624, -0.0128436, -0.00741211, 0.000543823, 0.00414917, 0.00414917, 0.00114136, -0.00778809, -0.021377, -0.0325623, -0.0386584, -0.038974,
819 -0.0333679, -0.0221289, -0.0107825, -0.00453186, -0.00127563, -0.000261841, 0.000631104, 0.000537109, 0.000355835, 0.00114136, 0.00174561, 0.00104065, -0.000100708,
820 -0.00128906, -0.00083252, 0.00146362, 0.00234314, 0.000443115, -0.00245056, -0.00782165, -0.0164423, -0.0250092, -0.0309644, -0.0314343, -0.0265063, -0.0176508,
821 -0.00496155, 0.00805664, 0.0157843, 0.0171069, 0.0131055, 0.00613647, -0.00216187, -0.00804321, -0.0117157, 0
822 }
823 };
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include "cab_data.cc"
20
21
22 struct CabEntry {
23 CabDesc *data;
24 } cab_table[] = {
25 { &static_cast<CabDesc&>(cab_data_4x12) },
26 { &static_cast<CabDesc&>(cab_data_2x12) },
27 { &static_cast<CabDesc&>(cab_data_1x12) },
28 { &static_cast<CabDesc&>(cab_data_4x10) },
29 { &static_cast<CabDesc&>(cab_data_2x10) },
30 { &static_cast<CabDesc&>(cab_data_HighGain) },
31 { &static_cast<CabDesc&>(cab_data_Twin) },
32 { &static_cast<CabDesc&>(cab_data_Bassman) },
33 { &static_cast<CabDesc&>(cab_data_Marshall) },
34 { &static_cast<CabDesc&>(cab_data_AC30) },
35 { &static_cast<CabDesc&>(cab_data_Princeton) },
36 { &static_cast<CabDesc&>(cab_data_A2) },
37 { &static_cast<CabDesc&>(cab_data_1x15) },
38 { &static_cast<CabDesc&>(cab_data_mesa) },
39 { &static_cast<CabDesc&>(cab_data_briliant) },
40 { &static_cast<CabDesc&>(cab_data_vitalize) },
41 { &static_cast<CabDesc&>(cab_data_charisma) },
42 { &static_cast<CabDesc&>(cab_data_1x8) },
43 };
44 static const size_t cab_table_size = sizeof(cab_table) / sizeof(cab_table[0]);
45
46 static inline CabEntry& getCabEntry(uint32_t n) {
47 if (n >= cab_table_size) {
48 n = cab_table_size - 1;
49 }
50 return cab_table[n];
51 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_AMP_H_
22 #define SRC_HEADERS_GX_AMP_H_
23
24 #include "gx_pluginlv2.h"
25
26 #include "gxamp.cc"
27 #include "gxamp2.cc"
28 #include "gxamp3.cc"
29 #include "gxamp4.cc"
30 #include "gxamp5.cc"
31 #include "gxamp6.cc"
32 #include "gxamp7.cc"
33 #include "gxamp8.cc"
34 #include "gxamp9.cc"
35 #include "gxamp10.cc"
36 #include "gxamp11.cc"
37 #include "gxamp12.cc"
38 #include "gxamp13.cc"
39 #include "gxamp14.cc"
40 #include "gxamp15.cc"
41 #include "gxamp16.cc"
42 #include "gxamp17.cc"
43 #include "gxamp18.cc"
44
45
46 static plug amp_model [] = {
47 gxamp::plugin, //0
48 gxamp3::plugin, //1
49 gxamp14::plugin, //2
50 gxamp10::plugin, //3
51 gxamp18::plugin, //4
52
53 gxamp2::plugin, //5
54
55 gxamp9::plugin, //6
56 gxamp11::plugin, //7
57 gxamp17::plugin, //8
58 gxamp13::plugin, //9
59
60 gxamp5::plugin, //10
61 gxamp4::plugin, //11
62 gxamp15::plugin, //12
63 gxamp12::plugin, //13
64
65 gxamp7::plugin, //14
66 gxamp8::plugin, //15
67 gxamp16::plugin, //16
68 gxamp6::plugin, //17
69 };
70
71 static const size_t AMP_COUNT = sizeof(amp_model) / sizeof(amp_model[0]);
72
73
74 #endif //SRC_HEADERS_GX_AMP_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_AMP_H_
22 #define SRC_HEADERS_GX_AMP_H_
23
24 #include "gx_pluginlv2.h"
25
26 #include "gxamp_stereo.cc"
27 #include "gxamp2_stereo.cc"
28 #include "gxamp3_stereo.cc"
29 #include "gxamp4_stereo.cc"
30 #include "gxamp5_stereo.cc"
31 #include "gxamp6_stereo.cc"
32 #include "gxamp7_stereo.cc"
33 #include "gxamp8_stereo.cc"
34 #include "gxamp9_stereo.cc"
35 #include "gxamp10_stereo.cc"
36 #include "gxamp11_stereo.cc"
37 #include "gxamp12_stereo.cc"
38 #include "gxamp13_stereo.cc"
39 #include "gxamp14_stereo.cc"
40 #include "gxamp15_stereo.cc"
41 #include "gxamp16_stereo.cc"
42 #include "gxamp17_stereo.cc"
43 #include "gxamp18_stereo.cc"
44
45
46 static plug amp_model [] = {
47 gxamp_stereo::plugin, //0
48 gxamp3_stereo::plugin, //1
49 gxamp14_stereo::plugin, //2
50 gxamp10_stereo::plugin, //3
51 gxamp18_stereo::plugin, //4
52
53 gxamp2_stereo::plugin, //5
54
55 gxamp9_stereo::plugin, //6
56 gxamp11_stereo::plugin, //7
57 gxamp17_stereo::plugin, //8
58 gxamp13_stereo::plugin, //9
59
60 gxamp5_stereo::plugin, //10
61 gxamp4_stereo::plugin, //11
62 gxamp15_stereo::plugin, //12
63 gxamp12_stereo::plugin, //13
64
65 gxamp7_stereo::plugin, //14
66 gxamp8_stereo::plugin, //15
67 gxamp16_stereo::plugin, //16
68 gxamp6_stereo::plugin, //17
69 };
70
71 static const size_t AMP_COUNT = sizeof(amp_model) / sizeof(amp_model[0]);
72
73
74 #endif //SRC_HEADERS_GX_AMP_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_COMMON_H_
22 #define SRC_HEADERS_GX_COMMON_H_
23
24
25 #include <cstdlib>
26 #include <cmath>
27 #include <iostream>
28 #include <cstring>
29 #include <unistd.h>
30
31 ///////////////////////// DENORMAL PROTECTION WITH SSE /////////////////
32
33 #ifdef __SSE__
34 /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
35 flags to avoid costly denormals */
36 #ifdef __SSE3__
37 #include <pmmintrin.h>
38 inline void AVOIDDENORMALS()
39 {
40 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
41 _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
42 }
43 #else
44 #include <xmmintrin.h>
45 inline void AVOIDDENORMALS()
46 {
47 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
48 }
49 #endif //__SSE3__
50
51 #else
52 inline void AVOIDDENORMALS() {}
53 #endif //__SSE__
54
55 ///////////////////////// FAUST SUPPORT ////////////////////////////////
56
57 #define FAUSTFLOAT float
58 #ifndef N_
59 #define N_(String) (String)
60 #endif
61 #define max(x, y) (((x) > (y)) ? (x) : (y))
62 #define min(x, y) (((x) < (y)) ? (x) : (y))
63 template <int32_t N> inline float faustpower(float x)
64 {
65 return powf(x, N);
66 }
67 template <int32_t N> inline double faustpower(double x)
68 {
69 return pow(x, N);
70 }
71 template <int32_t N> inline int32_t faustpower(int32_t x)
72 {
73 return faustpower<N/2>(x) * faustpower<N-N/2>(x);
74 }
75 template <> inline int32_t faustpower<0>(int32_t x)
76 {
77 return 1;
78 }
79 template <> inline int32_t faustpower<1>(int32_t x)
80 {
81 return x;
82 }
83
84 #endif //SRC_HEADERS_GX_COMMON_H_
85
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include "gx_convolver.h"
20 #include <string.h>
21 /****************************************************************
22 ** some pieces in this file are copied from jconvolver
23 */
24
25 #define max(x, y) (((x) > (y)) ? (x) : (y))
26 /****************************************************************
27 ** GxConvolverBase
28 */
29
30 GxConvolverBase::~GxConvolverBase()
31 {
32 if (is_runnable())
33 {
34 stop_process();
35 }
36 }
37
38 void GxConvolverBase::adjust_values(
39 uint32_t audio_size, uint32_t& count, uint32_t& offset,
40 uint32_t& delay, uint32_t& ldelay, uint32_t& length,
41 uint32_t& size, uint32_t& bufsize)
42 {
43
44 if (bufsize < count)
45 {
46 bufsize = count;
47 }
48 if (bufsize < Convproc::MINPART)
49 {
50 bufsize = Convproc::MINPART;
51 }
52 if (offset > audio_size)
53 {
54 offset = audio_size;
55 }
56 if (!size)
57 {
58 if (offset + length > audio_size)
59 {
60
61 length = audio_size - offset;
62 }
63 if (!length)
64 {
65 length = audio_size - offset;
66 }
67 size = max(delay, ldelay) + offset + length;
68 }
69 else
70 {
71 if (delay > size)
72 {
73 delay = size;
74 }
75 if (ldelay > size)
76 {
77 ldelay = size;
78 }
79 if (offset > size - max(delay, ldelay))
80 {
81 offset = size - max(delay, ldelay);
82 }
83 if (length > size - max(delay, ldelay) - offset)
84 {
85 length = size - max(delay, ldelay) - offset;
86
87 }
88 if (!length)
89 {
90 length = size - max(delay, ldelay) - offset;
91 }
92 }
93 }
94
95 bool GxConvolverBase::start(int32_t policy, int32_t priority)
96 {
97 int32_t rc = start_process(priority, policy);
98 if (rc != 0)
99 {
100
101 return false;
102 }
103 ready = true;
104 return true;
105 }
106
107 bool GxConvolverBase::checkstate()
108 {
109 if (state() == Convproc::ST_WAIT)
110 {
111 if (check_stop())
112 {
113 ready = false;
114 }
115 else
116 {
117 return false;
118 }
119 }
120 else if (state() == ST_STOP)
121 {
122 ready = false;
123 }
124 return true;
125 }
126
127 /****************************************************************
128 ** GxSimpleConvolver
129 */
130
131 class CheckResample
132 {
133 private:
134 float *vec;
135 gx_resample::BufferResampler& resamp;
136 public:
137 CheckResample(gx_resample::BufferResampler& resamp_): vec(0), resamp(resamp_) {}
138 float *resample(int32_t *count, float *impresp, uint32_t imprate, uint32_t samplerate)
139 {
140 if (imprate != samplerate)
141 {
142 vec = resamp.process(imprate, *count, impresp, samplerate, count);
143 if (!vec)
144 {
145 if (samplerate)
146 {
147 }
148 else
149 {
150 }
151 return 0;
152 }
153 return vec;
154 }
155 return impresp;
156 }
157 ~CheckResample()
158 {
159 if (vec)
160 {
161 delete vec;
162 }
163 }
164 };
165
166 bool GxSimpleConvolver::configure(int32_t count, float *impresp, uint32_t imprate)
167 {
168 //printf("try configure()\n");
169 CheckResample r(resamp);
170 impresp = r.resample(&count, impresp, imprate, samplerate);
171 if (!impresp)
172 {
173 printf("no impresp\n");
174 return false;
175 }
176 cleanup();
177 uint32_t bufsize = buffersize;
178 if (bufsize < Convproc::MINPART)
179 {
180 bufsize = Convproc::MINPART;
181 }
182 if (Convproc::configure(1, 1, count, buffersize,
183 bufsize, bufsize)) // Convproc::MAXPART
184 {
185 printf("no configure\n");
186 return false;
187 }
188 if (impdata_create(0, 0, 1, impresp, 0, count))
189 {
190 printf("no impdata_create()\n");
191 return false;
192 }
193 //printf("configure()\n");
194
195 return true;
196 }
197
198 bool GxSimpleConvolver::update(int32_t count, float *impresp, uint32_t imprate)
199 {
200 CheckResample r(resamp);
201 impresp = r.resample(&count, impresp, imprate, samplerate);
202 if (!impresp)
203 {
204 return false;
205 }
206 if (impdata_update(0, 0, 1, impresp, 0, count))
207 {
208 return false;
209 }
210 return true;
211 }
212
213 bool GxSimpleConvolver::compute(int32_t count, float* input, float *output)
214 {
215 // printf("try run\n");
216 if (state() != Convproc::ST_PROC)
217 {
218 //printf("state() != ST_PROC\n");
219 if (input != output)
220 {
221 memcpy(output, input, count * sizeof(float));
222 }
223 if (state() == Convproc::ST_WAIT)
224 {
225 //printf("state() == ST_WAIT\n");
226 check_stop();
227 }
228 if (state() == ST_STOP)
229 {
230 //printf("state() == ST_STOP\n");
231 ready = false;
232 }
233 return true;
234 }
235 int32_t flags = 0;
236 if (static_cast<uint32_t>(count) == buffersize)
237 {
238 memcpy(inpdata(0), input, count * sizeof(float));
239
240 flags = process(sync);
241
242 memcpy(output, outdata(0), count * sizeof(float));
243 } else {
244 float *in, *out;
245 in = inpdata(0);
246 out = outdata(0);
247 uint32_t b = 0;
248 uint32_t c = 1;
249 for(int32_t i = 0; i<count; ++i){
250 in[b] = input[i];
251 if(++b == buffersize) {
252 b=0;
253 flags = process();
254 for(uint32_t d = 0; d<buffersize; ++d) {
255 output[d*c] = out[d];
256 }
257 ++c;
258 }
259 }
260 }
261 return flags == 0;
262 }
263
264 void GxSimpleConvolver::run_static(uint32_t n_samples, GxSimpleConvolver *p, float *output)
265 {
266 if (!p->compute((int32_t)n_samples, output))
267 printf("convolver didn't run\n");
268 }
269
270 //////////////stero/////////////////
271
272 bool GxSimpleConvolver::configure_stereo(int32_t count, float *impresp, uint32_t imprate)
273 {
274 //printf("try configure()\n");
275 CheckResample r(resamp);
276 impresp = r.resample(&count, impresp, imprate, samplerate);
277 if (!impresp)
278 {
279 printf("no impresp\n");
280 return false;
281 }
282 cleanup();
283 uint32_t bufsize = buffersize;
284 if (bufsize < Convproc::MINPART)
285 {
286 bufsize = Convproc::MINPART;
287 }
288 if (Convproc::configure(2, 2, count, buffersize,
289 bufsize, bufsize)) // Convproc::MAXPART
290 {
291 printf("no configure\n");
292 return false;
293 }
294 if (impdata_create(0, 0, 1, impresp, 0, count) & impdata_create(1, 1, 1, impresp, 0, count))
295 {
296 printf("no impdata_create()\n");
297 return false;
298 }
299 //printf("configure()\n");
300
301 return true;
302 }
303
304 bool GxSimpleConvolver::update_stereo(int32_t count, float *impresp, uint32_t imprate)
305 {
306 CheckResample r(resamp);
307 impresp = r.resample(&count, impresp, imprate, samplerate);
308 if (!impresp)
309 {
310 return false;
311 }
312 if (impdata_update(0, 0, 1, impresp, 0, count) & impdata_update(1, 1, 1, impresp, 0, count))
313 {
314 return false;
315 }
316 return true;
317 }
318
319 bool GxSimpleConvolver::compute_stereo(int32_t count, float* input, float* input1, float *output, float *output1)
320 {
321 // printf("try run\n");
322 if (state() != Convproc::ST_PROC)
323 {
324 //printf("state() != ST_PROC\n");
325 if (input != output)
326 {
327 memcpy(output, input, count * sizeof(float));
328 memcpy(output1, input1, count * sizeof(float));
329 }
330 if (state() == Convproc::ST_WAIT)
331 {
332 //printf("state() == ST_WAIT\n");
333 check_stop();
334 }
335 if (state() == ST_STOP)
336 {
337 //printf("state() == ST_STOP\n");
338 ready = false;
339 }
340 return true;
341 }
342 int32_t flags = 0;
343 if (static_cast<uint32_t>(count) == buffersize)
344 {
345 memcpy(inpdata(0), input, count * sizeof(float));
346 memcpy(inpdata(1), input1, count * sizeof(float));
347
348 flags = process(sync);
349
350 memcpy(output, outdata(0), count * sizeof(float));
351 memcpy(output1, outdata(1), count * sizeof(float));
352 } else {
353 float *in, *in1, *out, *out1;
354 in = inpdata(0);
355 in1 = inpdata(1);
356 out = outdata(0);
357 out1 = outdata(1);
358 uint32_t b = 0;
359 uint32_t c = 1;
360 for(int32_t i = 0; i<count; ++i){
361 in[b] = input[i];
362 in1[b] = input1[i];
363 if(++b == buffersize) {
364 b=0;
365 flags = process();
366 for(uint32_t d = 0; d<buffersize; ++d) {
367 output[d*c] = out[d];
368 output1[d*c] = out1[d];
369 }
370 ++c;
371 }
372 }
373 }
374 //printf("run\n");
375 return flags == 0;
376 }
377
378 void GxSimpleConvolver::run_static_stereo(uint32_t n_samples, GxSimpleConvolver *p, float *output, float *output1)
379 {
380 if (!p->compute_stereo((int32_t)n_samples, output, output1))
381 printf("convolver didn't run\n");
382 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #pragma once
21
22 #ifndef SRC_HEADERS_GX_CONVOLVER_H_
23 #define SRC_HEADERS_GX_CONVOLVER_H_
24
25 #include <zita-convolver.h>
26 #include <stdint.h>
27 #include "gx_resampler.h"
28 /* GxConvolver */
29
30
31 class GxConvolverBase: protected Convproc
32 {
33 protected:
34 volatile bool ready;
35 bool sync;
36 void adjust_values(uint32_t audio_size, uint32_t& count, uint32_t& offset,
37 uint32_t& delay, uint32_t& ldelay, uint32_t& length,
38 uint32_t& size, uint32_t& bufsize);
39 uint32_t buffersize;
40 uint32_t samplerate;
41 GxConvolverBase(): ready(false), sync(false), buffersize(), samplerate() {}
42 ~GxConvolverBase();
43 public:
44 inline void set_buffersize(uint32_t sz)
45 {
46 buffersize = sz;
47 }
48 inline uint32_t get_buffersize()
49 {
50 return buffersize;
51 }
52 inline void set_samplerate(uint32_t sr)
53 {
54 samplerate = sr;
55 }
56 inline uint32_t get_samplerate()
57 {
58 return samplerate;
59 }
60 bool checkstate();
61 using Convproc::state;
62 inline void set_not_runnable()
63 {
64 ready = false;
65 }
66 inline bool is_runnable()
67 {
68 return ready;
69 }
70 bool start(int32_t policy, int32_t priority);
71 using Convproc::stop_process;
72 using Convproc::cleanup;
73 inline void set_sync(bool val)
74 {
75 sync = val;
76 }
77 };
78
79
80 class GxSimpleConvolver: public GxConvolverBase
81 {
82 private:
83 gx_resample::BufferResampler& resamp;
84 public:
85 int32_t cab_count;
86 uint32_t cab_sr;
87 float *cab_data;
88 float *cab_data_new;
89 GxSimpleConvolver(gx_resample::BufferResampler& resamp_)
90 : GxConvolverBase(), resamp(resamp_), cab_count(0), cab_sr(0),
91 cab_data(NULL), cab_data_new(NULL) {}
92 bool configure(int32_t count, float *impresp, uint32_t imprate);
93 bool update(int32_t count, float *impresp, uint32_t imprate);
94 bool compute(int32_t count, float* input, float *output);
95 bool compute(int32_t count, float* buffer)
96 {
97 return is_runnable() ? compute(count, buffer, buffer) : true;
98 }
99
100 bool configure_stereo(int32_t count, float *impresp, uint32_t imprate);
101 bool update_stereo(int32_t count, float *impresp, uint32_t imprate);
102 bool compute_stereo(int32_t count, float* input, float* input1, float *output, float *output1);
103 bool compute_stereo(int32_t count, float* buffer, float* buffer1)
104 {
105 return is_runnable() ? compute_stereo(count, buffer, buffer1, buffer, buffer1) : true;
106 }
107 static void run_static(uint32_t n_samples, GxSimpleConvolver *p, float *output);
108 static void run_static_stereo(uint32_t n_samples, GxSimpleConvolver *p, float *output, float *output1);
109 };
110
111
112 #endif // SRC_HEADERS_GX_CONVOLVER_H_
0 /*
1 * Copyright (C) 2011 Hermann Meyer, James Warden, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 *
18 *
19 *
20 *
21 * ----------------------------------------------------------------------------
22 */
23
24 #pragma once
25
26 #ifndef _GX_PLUGINLV2_H
27 #define _GX_PLUGINLV2_H
28
29 // forward declarations (need not be resolved for plugin definition)
30 struct PluginLV2;
31
32 struct value_pair {
33 const char *value_id;
34 const char *value_label;
35 };
36
37 /*
38 ** structure for plugin definition
39 */
40
41 typedef void (*inifunc)(uint32_t samplingFreq, PluginLV2 *plugin);
42 typedef int (*activatefunc)(bool start, PluginLV2 *plugin);
43 typedef void (*clearstatefunc)(PluginLV2 *plugin);
44 typedef void (*process_mono_audio) (int count, float *input, float *output, PluginLV2 *plugin);
45 typedef void (*process_stereo_audio) (int count, float *input1, float *input2,
46 float *output1, float *output2, PluginLV2 *plugin);
47 typedef void (*registerfunc)(uint32_t port,void* data, PluginLV2 *plugin);
48 typedef void (*deletefunc)(PluginLV2 *plugin);
49
50 typedef PluginLV2 *(*plug) ();
51
52 #define PLUGINLV2_VERMAJOR_MASK 0xff00
53 #define PLUGINLV2_VERSION 0x0500
54
55 struct PluginLV2 {
56 int version; // = PLUGINLV2_VERSION
57
58 const char* id; // must be unique
59 const char* name; // displayed name (not translated) (may be 0)
60 // maximal one of mono_audio, stereo_audio must be set
61 // all function pointers in PluginLV2 can be independently set to 0
62 process_mono_audio mono_audio; // function for mono audio processing
63 process_stereo_audio stereo_audio; //function for stereo audio processing
64
65 inifunc set_samplerate; // called before audio processing and when rate changes
66 activatefunc activate_plugin; // called when taking in / out of pressing chain
67 registerfunc connect_ports; // called once after module loading (register parameter ids)
68 clearstatefunc clear_state; // clear internal audio state; may be called
69 // before calling the process function
70 deletefunc delete_instance; // delete this plugin instance
71 };
72
73 #endif /* !_GX_PLUGINLV2_H */
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 inline void GxPreAmpMono::clear_state_f()
21 {
22 for (int i=0; i<2; i++) fRec0[i] = 0;
23 for (int i=0; i<2; i++) fRec7[i] = 0;
24 for (int i=0; i<2; i++) fRec10[i] = 0;
25 for (int i=0; i<2; i++) fRec12[i] = 0;
26 for (int i=0; i<3; i++) fRec11[i] = 0;
27 for (int i=0; i<2; i++) fVec0[i] = 0;
28 for (int i=0; i<2; i++) fRec9[i] = 0;
29 for (int i=0; i<3; i++) fRec8[i] = 0;
30 for (int i=0; i<2; i++) fRec13[i] = 0;
31 for (int i=0; i<2; i++) fRec14[i] = 0;
32 for (int i=0; i<2; i++) fRec15[i] = 0;
33 for (int i=0; i<2; i++) fRec16[i] = 0;
34 for (int i=0; i<3; i++) fRec6[i] = 0;
35 for (int i=0; i<2; i++) fRec5[i] = 0;
36 for (int i=0; i<2; i++) fRec17[i] = 0;
37 for (int i=0; i<3; i++) fRec4[i] = 0;
38 for (int i=0; i<2; i++) fRec3[i] = 0;
39 for (int i=0; i<3; i++) fRec2[i] = 0;
40 for (int i=0; i<2; i++) fRec1[i] = 0;}
41
42 inline void GxPreAmpMono::init(uint32_t samplingFreq)
43 {
44 fSamplingFreq = samplingFreq;
45 iConst0 = min(192000, max(1, fSamplingFreq));
46 fConst1 = (1.0f / tanf((56548.66776461628f / iConst0)));
47 fConst2 = (1 + fConst1);
48 fConst3 = (0 - ((1 - fConst1) / fConst2));
49 fConst4 = (1.0f / tanf((97.38937226128358f / iConst0)));
50 fConst5 = (1 + fConst4);
51 fConst6 = (0 - ((1 - fConst4) / fConst5));
52 fConst7 = tanf((4712.38898038469f / iConst0));
53 fConst8 = (1.0f / faustpower<2>(fConst7));
54 fConst9 = (2 * (1 - fConst8));
55 fConst10 = (1.0f / fConst7);
56 fConst11 = (1 + ((fConst10 - 1.0000000000000004f) / fConst7));
57 fConst12 = (1.0f / (1 + ((1.0000000000000004f + fConst10) / fConst7)));
58 fConst13 = (1 + fConst10);
59 fConst14 = (0 - ((1 - fConst10) / fConst13));
60 fConst15 = tanf((2356.194490192345f / iConst0));
61 fConst16 = (2 * (1 - (1.0f / faustpower<2>(fConst15))));
62 fConst17 = (1.0f / fConst15);
63 fConst18 = (1 + ((fConst17 - 1.0000000000000004f) / fConst15));
64 fConst19 = (1.0f / (1 + ((1.0000000000000004f + fConst17) / fConst15)));
65 fConst20 = (1 + fConst17);
66 fConst21 = (0 - ((1 - fConst17) / fConst20));
67 fConst22 = (1.0f / fConst20);
68 fConst23 = (0 - fConst10);
69 fConst24 = (1.0f / fConst13);
70 fConst25 = (2 * (0 - fConst8));
71 fConst26 = (1.0f / tanf((125.66370614359172f / iConst0)));
72 fConst27 = (1 + fConst26);
73 fConst28 = (0 - ((1 - fConst26) / fConst27));
74 fConst29 = (0.015f / fConst27);
75 fConst30 = (0 - fConst4);
76 fConst31 = (0.025f / fConst5);
77 fConst32 = (1.0f / tanf((62.83185307179586f / iConst0)));
78 fConst33 = (1 + fConst32);
79 fConst34 = (0 - ((1 - fConst32) / fConst33));
80 fConst35 = (0.015f / fConst33);
81 fConst36 = (1.0f / fConst2);
82 clear_state_f();
83 }
84
85 void GxPreAmpMono::connect(uint32_t port,void* data)
86 {
87 switch ((PortIndex)port)
88 {
89 case OUTPUT_LEVEL:
90 fslider0_ = (float*)data;
91 break;
92 case PRESENCE:
93 fslider1_ = (float*)data;
94 break ;
95 case RESONANCE:
96 fslider2_ = (float*)data;
97 break;
98 case FEEDBACK:
99 fslider3_ = (float*)data;
100 break;
101 case DRIVE:
102 fslider4_ = (float*)data;
103 break;
104 case INPUT_LEVEL:
105 fslider5_ = (float*)data;
106 break;
107 default:
108 break;
109 }
110 }
111
112 void GxPreAmpMono::run(uint32_t count, float* input0, float* output0)
113 {
114 fslider0 = (*fslider0_);
115 fslider1 = (*fslider1_);
116 fslider2 = (*fslider2_);
117 fslider3 = (*fslider3_);
118 fslider4 = (*fslider4_);
119 fslider5 = (*fslider5_);
120
121
122 float fSlow0 = (0.0010000000000000009f * powf(10,(0.05f * fslider0)));
123 float fSlow1 = (0.0001000000000000001f * fslider1);
124 float fSlow2 = (0.0001000000000000001f * fslider2);
125 float fSlow3 = (0.0010000000000000009f * powf(10,(0.05f * fslider3)));
126 float fSlow4 = (0.0010000000000000009f * powf(10,(0.05f * fslider4)));
127 float fSlow5 = (0.0010000000000000009f * powf(10,(0.05f * fslider5)));
128 for (uint32_t i=0; i<count; i++) {
129 fRec0[0] = (fSlow0 + (0.999f * fRec0[1]));
130 fRec7[0] = (fSlow1 + (0.999f * fRec7[1]));
131 fRec10[0] = (fSlow2 + (0.999f * fRec10[1]));
132 fRec12[0] = ((fConst22 * (fRec2[1] + fRec2[2])) + (fConst21 * fRec12[1]));
133 fRec11[0] = (fRec12[0] - (fConst19 * ((fConst18 * fRec11[2]) + (fConst16 * fRec11[1]))));
134 float fTemp0 = (fRec2[1] + (fConst19 * ((fRec11[2] + (fRec11[0] + (2 * fRec11[1]))) * (powf(10,(0.05f * (0 - (24 * fRec10[0])))) - 1))));
135 fVec0[0] = fTemp0;
136 fRec9[0] = ((fConst24 * ((fConst23 * fVec0[1]) + (fConst10 * fVec0[0]))) + (fConst14 * fRec9[1]));
137 fRec8[0] = (fRec9[0] - (fConst12 * ((fConst11 * fRec8[2]) + (fConst9 * fRec8[1]))));
138 fRec13[0] = (fSlow3 + (0.999f * fRec13[1]));
139 fRec14[0] = (fSlow4 + (0.999f * fRec14[1]));
140 fRec15[0] = (fSlow5 + (0.999f * fRec15[1]));
141 fRec16[0] = ((fConst29 * (fRec6[1] + fRec6[2])) + (fConst28 * fRec16[1]));
142 fRec6[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec16[0] + (((float)input0[i] * fRec15[0]) * fRec14[0])) - (1.5025f + (fRec13[0] * (fVec0[0] + (fConst12 * ((((fConst8 * fRec8[0]) + (fConst25 * fRec8[1])) + (fConst8 * fRec8[2])) * (powf(10,(0.05f * (0 - (24 * fRec7[0])))) - 1)))))))) - 149.83333333333331f);
143 fRec5[0] = ((fConst31 * ((fConst30 * fRec6[1]) + (fConst4 * fRec6[0]))) + (fConst6 * fRec5[1]));
144 fRec17[0] = ((fConst35 * (fRec4[1] + fRec4[2])) + (fConst34 * fRec17[1]));
145 fRec4[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec17[0] + (0.6918309709189365f * fRec5[0])) - 1.4925f)) - 150.5f);
146 fRec3[0] = ((fConst31 * ((fConst30 * fRec4[1]) + (fConst4 * fRec4[0]))) + (fConst6 * fRec3[1]));
147 fRec2[0] = (0.6918309709189365f * fRec3[0]);
148 fRec1[0] = ((fConst36 * (fRec2[0] + fRec2[1])) + (fConst3 * fRec1[1]));
149 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
150 // post processing
151 fRec1[1] = fRec1[0];
152 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
153 fRec3[1] = fRec3[0];
154 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
155 fRec17[1] = fRec17[0];
156 fRec5[1] = fRec5[0];
157 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
158 fRec16[1] = fRec16[0];
159 fRec15[1] = fRec15[0];
160 fRec14[1] = fRec14[0];
161 fRec13[1] = fRec13[0];
162 fRec8[2] = fRec8[1]; fRec8[1] = fRec8[0];
163 fRec9[1] = fRec9[0];
164 fVec0[1] = fVec0[0];
165 fRec11[2] = fRec11[1]; fRec11[1] = fRec11[0];
166 fRec12[1] = fRec12[0];
167 fRec10[1] = fRec10[0];
168 fRec7[1] = fRec7[0];
169 fRec0[1] = fRec0[0];
170 }
171 }
172
173
174
175 // static wrappers
176 void GxPreAmpMono::init_static(uint32_t samplingFreq, GxPreAmpMono *p)
177 {
178 p->init(samplingFreq);
179 }
180
181 void GxPreAmpMono::connect_static(uint32_t port,void* data, GxPreAmpMono *p)
182 {
183 p->connect(port, data);
184 }
185
186
187 /////////////////////////////// STEREO /////////////////////////////////
188
189
190 inline void GxPreAmpStereo::clear_state_f()
191 {
192 for (int i=0; i<2; i++) fRec0[i] = 0;
193 for (int i=0; i<2; i++) fRec10[i] = 0;
194 for (int i=0; i<3; i++) fRec9[i] = 0;
195 for (int i=0; i<2; i++) fRec11[i] = 0;
196 for (int i=0; i<2; i++) fVec0[i] = 0;
197 for (int i=0; i<2; i++) fRec8[i] = 0;
198 for (int i=0; i<3; i++) fRec7[i] = 0;
199 for (int i=0; i<2; i++) fRec12[i] = 0;
200 for (int i=0; i<2; i++) fRec13[i] = 0;
201 for (int i=0; i<2; i++) fRec14[i] = 0;
202 for (int i=0; i<2; i++) fRec15[i] = 0;
203 for (int i=0; i<2; i++) fRec16[i] = 0;
204 for (int i=0; i<3; i++) fRec6[i] = 0;
205 for (int i=0; i<2; i++) fRec5[i] = 0;
206 for (int i=0; i<2; i++) fRec17[i] = 0;
207 for (int i=0; i<3; i++) fRec4[i] = 0;
208 for (int i=0; i<2; i++) fRec3[i] = 0;
209 for (int i=0; i<3; i++) fRec2[i] = 0;
210 for (int i=0; i<2; i++) fRec1[i] = 0;
211 for (int i=0; i<2; i++) fRec27[i] = 0;
212 for (int i=0; i<3; i++) fRec26[i] = 0;
213 for (int i=0; i<2; i++) fVec1[i] = 0;
214 for (int i=0; i<2; i++) fRec25[i] = 0;
215 for (int i=0; i<3; i++) fRec24[i] = 0;
216 for (int i=0; i<2; i++) fRec28[i] = 0;
217 for (int i=0; i<3; i++) fRec23[i] = 0;
218 for (int i=0; i<2; i++) fRec22[i] = 0;
219 for (int i=0; i<2; i++) fRec29[i] = 0;
220 for (int i=0; i<3; i++) fRec21[i] = 0;
221 for (int i=0; i<2; i++) fRec20[i] = 0;
222 for (int i=0; i<3; i++) fRec19[i] = 0;
223 for (int i=0; i<2; i++) fRec18[i] = 0;
224 }
225
226
227 inline void GxPreAmpStereo::init(uint32_t samplingFreq)
228 {
229 fSamplingFreq = samplingFreq;
230 iConst0 = min(192000, max(1, fSamplingFreq));
231 fConst1 = (1.0f / tanf((56548.66776461628f / iConst0)));
232 fConst2 = (1 + fConst1);
233 fConst3 = (0 - ((1 - fConst1) / fConst2));
234 fConst4 = (1.0f / tanf((97.38937226128358f / iConst0)));
235 fConst5 = (1 + fConst4);
236 fConst6 = (0 - ((1 - fConst4) / fConst5));
237 fConst7 = tanf((4712.38898038469f / iConst0));
238 fConst8 = (1.0f / faustpower<2>(fConst7));
239 fConst9 = (2 * (1 - fConst8));
240 fConst10 = (1.0f / fConst7);
241 fConst11 = (1 + ((fConst10 - 1.0000000000000004f) / fConst7));
242 fConst12 = (1.0f / (1 + ((1.0000000000000004f + fConst10) / fConst7)));
243 fConst13 = (1 + fConst10);
244 fConst14 = (0 - ((1 - fConst10) / fConst13));
245 fConst15 = tanf((2356.194490192345f / iConst0));
246 fConst16 = (2 * (1 - (1.0f / faustpower<2>(fConst15))));
247 fConst17 = (1.0f / fConst15);
248 fConst18 = (1 + ((fConst17 - 1.0000000000000004f) / fConst15));
249 fConst19 = (1.0f / (1 + ((1.0000000000000004f + fConst17) / fConst15)));
250 fConst20 = (1 + fConst17);
251 fConst21 = (0 - ((1 - fConst17) / fConst20));
252 fConst22 = (1.0f / fConst20);
253 fConst23 = (0 - fConst10);
254 fConst24 = (1.0f / fConst13);
255 fConst25 = (2 * (0 - fConst8));
256 fConst26 = (1.0f / tanf((125.66370614359172f / iConst0)));
257 fConst27 = (1 + fConst26);
258 fConst28 = (0 - ((1 - fConst26) / fConst27));
259 fConst29 = (0.015f / fConst27);
260 fConst30 = (0 - fConst4);
261 fConst31 = (0.025f / fConst5);
262 fConst32 = (1.0f / tanf((62.83185307179586f / iConst0)));
263 fConst33 = (1 + fConst32);
264 fConst34 = (0 - ((1 - fConst32) / fConst33));
265 fConst35 = (0.015f / fConst33);
266 fConst36 = (1.0f / fConst2);
267 clear_state_f();
268 }
269
270 void GxPreAmpStereo::connect(uint32_t port,void* data)
271 {
272 switch ((PortIndex)port)
273 {
274 case OUTPUT_LEVEL:
275 fslider0_ = (float*)data;
276 break;
277 case RESONANCE:
278 fslider1_ = (float*)data;
279 break;
280 case PRESENCE:
281 fslider2_ = (float*)data;
282 break;
283 case FEEDBACK:
284 fslider3_ = (float*)data;
285 break;
286 case DRIVE:
287 fslider4_ = (float*)data;
288 break;
289 case INPUT_LEVEL:
290 fslider5_ = (float*)data;
291 break;
292 default:
293 break;
294 }
295 }
296
297 inline void GxPreAmpStereo::run(uint32_t count, float *input0, float *input1, float *output0, float *output1)
298 {
299 fslider0 = (*fslider0_);
300 fslider1 = (*fslider1_);
301 fslider2 = (*fslider2_);
302 fslider3 = (*fslider3_);
303 fslider4 = (*fslider4_);
304 fslider5 = (*fslider5_);
305 float fSlow0 = (0.0010000000000000009f * powf(10,(0.05f * fslider0)));
306 float fSlow1 = (0.0001000000000000001f * fslider1);
307 float fSlow2 = (0.0001000000000000001f * fslider2);
308 float fSlow3 = (0.0010000000000000009f * powf(10,(0.05f * fslider3)));
309 float fSlow4 = (0.0010000000000000009f * powf(10,(0.05f * fslider4)));
310 float fSlow5 = (0.0010000000000000009f * powf(10,(0.05f * fslider5)));
311 for (uint32_t i=0; i<count; i++) {
312 fRec0[0] = (fSlow0 + (0.999f * fRec0[1]));
313 fRec10[0] = ((fConst22 * (fRec2[1] + fRec2[2])) + (fConst21 * fRec10[1]));
314 fRec9[0] = (fRec10[0] - (fConst19 * ((fConst18 * fRec9[2]) + (fConst16 * fRec9[1]))));
315 fRec11[0] = (fSlow1 + (0.999f * fRec11[1]));
316 float fTemp0 = (powf(10,(0.05f * (0 - (24 * fRec11[0])))) - 1);
317 float fTemp1 = (fRec2[1] + (fConst19 * (fTemp0 * (fRec9[2] + (fRec9[0] + (2 * fRec9[1]))))));
318 fVec0[0] = fTemp1;
319 fRec8[0] = ((fConst24 * ((fConst23 * fVec0[1]) + (fConst10 * fVec0[0]))) + (fConst14 * fRec8[1]));
320 fRec7[0] = (fRec8[0] - (fConst12 * ((fConst11 * fRec7[2]) + (fConst9 * fRec7[1]))));
321 fRec12[0] = (fSlow2 + (0.999f * fRec12[1]));
322 float fTemp2 = (powf(10,(0.05f * (0 - (24 * fRec12[0])))) - 1);
323 fRec13[0] = (fSlow3 + (0.999f * fRec13[1]));
324 fRec14[0] = (fSlow4 + (0.999f * fRec14[1]));
325 fRec15[0] = (fSlow5 + (0.999f * fRec15[1]));
326 fRec16[0] = ((fConst29 * (fRec6[1] + fRec6[2])) + (fConst28 * fRec16[1]));
327 fRec6[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec16[0] + (((float)input0[i] * fRec15[0]) * fRec14[0])) - (1.5025f + (fRec13[0] * (fVec0[0] + (fConst12 * (fTemp2 * (((fConst8 * fRec7[0]) + (fConst25 * fRec7[1])) + (fConst8 * fRec7[2]))))))))) - 149.83333333333331f);
328 fRec5[0] = ((fConst31 * ((fConst30 * fRec6[1]) + (fConst4 * fRec6[0]))) + (fConst6 * fRec5[1]));
329 fRec17[0] = ((fConst35 * (fRec4[1] + fRec4[2])) + (fConst34 * fRec17[1]));
330 fRec4[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec17[0] + (0.6918309709189365f * fRec5[0])) - 1.4925f)) - 150.5f);
331 fRec3[0] = ((fConst31 * ((fConst30 * fRec4[1]) + (fConst4 * fRec4[0]))) + (fConst6 * fRec3[1]));
332 fRec2[0] = (0.6918309709189365f * fRec3[0]);
333 fRec1[0] = ((fConst36 * (fRec2[0] + fRec2[1])) + (fConst3 * fRec1[1]));
334 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
335 fRec27[0] = ((fConst22 * (fRec19[1] + fRec19[2])) + (fConst21 * fRec27[1]));
336 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst18 * fRec26[2]) + (fConst16 * fRec26[1]))));
337 float fTemp3 = (fRec19[1] + (fConst19 * ((fRec26[2] + (fRec26[0] + (2 * fRec26[1]))) * fTemp0)));
338 fVec1[0] = fTemp3;
339 fRec25[0] = ((fConst24 * ((fConst23 * fVec1[1]) + (fConst10 * fVec1[0]))) + (fConst14 * fRec25[1]));
340 fRec24[0] = (fRec25[0] - (fConst12 * ((fConst11 * fRec24[2]) + (fConst9 * fRec24[1]))));
341 fRec28[0] = ((fConst29 * (fRec23[1] + fRec23[2])) + (fConst28 * fRec28[1]));
342 fRec23[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec28[0] + (((float)input1[i] * fRec15[0]) * fRec14[0])) - (1.5025f + (fRec13[0] * (fVec1[0] + (fConst12 * ((((fConst8 * fRec24[0]) + (fConst25 * fRec24[1])) + (fConst8 * fRec24[2])) * fTemp2))))))) - 149.83333333333331f);
343 fRec22[0] = ((fConst31 * ((fConst30 * fRec23[1]) + (fConst4 * fRec23[0]))) + (fConst6 * fRec22[1]));
344 fRec29[0] = ((fConst35 * (fRec21[1] + fRec21[2])) + (fConst34 * fRec29[1]));
345 fRec21[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec29[0] + (0.6918309709189365f * fRec22[0])) - 1.4925f)) - 150.5f);
346 fRec20[0] = ((fConst31 * ((fConst30 * fRec21[1]) + (fConst4 * fRec21[0]))) + (fConst6 * fRec20[1]));
347 fRec19[0] = (0.6918309709189365f * fRec20[0]);
348 fRec18[0] = ((fConst36 * (fRec19[0] + fRec19[1])) + (fConst3 * fRec18[1]));
349 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec18[0]);
350 // post processing
351 fRec18[1] = fRec18[0];
352 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
353 fRec20[1] = fRec20[0];
354 fRec21[2] = fRec21[1]; fRec21[1] = fRec21[0];
355 fRec29[1] = fRec29[0];
356 fRec22[1] = fRec22[0];
357 fRec23[2] = fRec23[1]; fRec23[1] = fRec23[0];
358 fRec28[1] = fRec28[0];
359 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
360 fRec25[1] = fRec25[0];
361 fVec1[1] = fVec1[0];
362 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
363 fRec27[1] = fRec27[0];
364 fRec1[1] = fRec1[0];
365 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
366 fRec3[1] = fRec3[0];
367 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
368 fRec17[1] = fRec17[0];
369 fRec5[1] = fRec5[0];
370 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
371 fRec16[1] = fRec16[0];
372 fRec15[1] = fRec15[0];
373 fRec14[1] = fRec14[0];
374 fRec13[1] = fRec13[0];
375 fRec12[1] = fRec12[0];
376 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
377 fRec8[1] = fRec8[0];
378 fVec0[1] = fVec0[0];
379 fRec11[1] = fRec11[0];
380 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
381 fRec10[1] = fRec10[0];
382 fRec0[1] = fRec0[0];
383 }
384 }
385
386
387 // static wrappers
388 void GxPreAmpStereo::init_static(uint32_t samplingFreq, GxPreAmpStereo *p)
389 {
390 p->init(samplingFreq);
391 }
392
393 void GxPreAmpStereo::connect_static(uint32_t port,void* data, GxPreAmpStereo *p)
394 {
395 p->connect(port, data);
396 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_PREAMP_H_
22 #define SRC_HEADERS_GX_PREAMP_H_
23
24 #include "valve.h"
25
26 // plugin class
27 class GxPreAmpMono
28 {
29 private:
30 int fSamplingFreq;
31 FAUSTFLOAT fslider0;
32 FAUSTFLOAT *fslider0_;
33 float fRec0[2];
34 int iConst0;
35 float fConst1;
36 float fConst2;
37 float fConst3;
38 float fConst4;
39 float fConst5;
40 float fConst6;
41 FAUSTFLOAT fslider1;
42 FAUSTFLOAT *fslider1_;
43 float fRec7[2];
44 float fConst7;
45 float fConst8;
46 float fConst9;
47 float fConst10;
48 float fConst11;
49 float fConst12;
50 float fConst13;
51 float fConst14;
52 FAUSTFLOAT fslider2;
53 FAUSTFLOAT *fslider2_;
54 float fRec10[2];
55 float fConst15;
56 float fConst16;
57 float fConst17;
58 float fConst18;
59 float fConst19;
60 float fConst20;
61 float fConst21;
62 float fConst22;
63 float fRec12[2];
64 float fRec11[3];
65 float fVec0[2];
66 float fConst23;
67 float fConst24;
68 float fRec9[2];
69 float fRec8[3];
70 float fConst25;
71 FAUSTFLOAT fslider3;
72 FAUSTFLOAT *fslider3_;
73 float fRec13[2];
74 FAUSTFLOAT fslider4;
75 FAUSTFLOAT *fslider4_;
76 float fRec14[2];
77 FAUSTFLOAT fslider5;
78 FAUSTFLOAT *fslider5_;
79 float fRec15[2];
80 float fConst26;
81 float fConst27;
82 float fConst28;
83 float fConst29;
84 float fRec16[2];
85 float fRec6[3];
86 float fConst30;
87 float fConst31;
88 float fRec5[2];
89 float fConst32;
90 float fConst33;
91 float fConst34;
92 float fConst35;
93 float fRec17[2];
94 float fRec4[3];
95 float fRec3[2];
96 float fRec2[3];
97 float fConst36;
98 float fRec1[2];
99 void clear_state_f();
100 void init(uint32_t samplingFreq);
101 void connect(uint32_t port,void* data);
102
103 public:
104 void run(uint32_t n_samples,float* input0, float* output0);
105 static void init_static(uint32_t samplingFreq, GxPreAmpMono *p);
106 static void connect_static(uint32_t port,void* data, GxPreAmpMono *p);
107 //static void run_static(uint32_t n_samples, float* input, float* output, GxPreAmpMono *p);
108 GxPreAmpMono() {};
109 ~GxPreAmpMono() {};
110 };
111
112
113 class GxPreAmpStereo
114 {
115 private:
116 int fSamplingFreq;
117 FAUSTFLOAT fslider0;
118 FAUSTFLOAT *fslider0_;
119 float fRec0[2];
120 int iConst0;
121 float fConst1;
122 float fConst2;
123 float fConst3;
124 float fConst4;
125 float fConst5;
126 float fConst6;
127 float fConst7;
128 float fConst8;
129 float fConst9;
130 float fConst10;
131 float fConst11;
132 float fConst12;
133 float fConst13;
134 float fConst14;
135 float fConst15;
136 float fConst16;
137 float fConst17;
138 float fConst18;
139 float fConst19;
140 float fConst20;
141 float fConst21;
142 float fConst22;
143 float fRec10[2];
144 float fRec9[3];
145 FAUSTFLOAT fslider1;
146 FAUSTFLOAT *fslider1_;
147 float fRec11[2];
148 float fVec0[2];
149 float fConst23;
150 float fConst24;
151 float fRec8[2];
152 float fRec7[3];
153 float fConst25;
154 FAUSTFLOAT fslider2;
155 FAUSTFLOAT *fslider2_;
156 float fRec12[2];
157 FAUSTFLOAT fslider3;
158 FAUSTFLOAT *fslider3_;
159 float fRec13[2];
160 FAUSTFLOAT fslider4;
161 FAUSTFLOAT *fslider4_;
162 float fRec14[2];
163 FAUSTFLOAT fslider5;
164 FAUSTFLOAT *fslider5_;
165 float fRec15[2];
166 float fConst26;
167 float fConst27;
168 float fConst28;
169 float fConst29;
170 float fRec16[2];
171 float fRec6[3];
172 float fConst30;
173 float fConst31;
174 float fRec5[2];
175 float fConst32;
176 float fConst33;
177 float fConst34;
178 float fConst35;
179 float fRec17[2];
180 float fRec4[3];
181 float fRec3[2];
182 float fRec2[3];
183 float fConst36;
184 float fRec1[2];
185 float fRec27[2];
186 float fRec26[3];
187 float fVec1[2];
188 float fRec25[2];
189 float fRec24[3];
190 float fRec28[2];
191 float fRec23[3];
192 float fRec22[2];
193 float fRec29[2];
194 float fRec21[3];
195 float fRec20[2];
196 float fRec19[3];
197 float fRec18[2];
198 void clear_state_f();
199 void init(uint32_t samplingFreq);
200 void connect(uint32_t port,void* data);
201
202
203 public:
204 void run(uint32_t n_samples,float* input,float* input1, float* output, float* output1);
205 static void init_static(uint32_t samplingFreq, GxPreAmpStereo *p);
206 static void connect_static(uint32_t port,void* data, GxPreAmpStereo *p);
207 //static void run_static(uint32_t n_samples, float* input,float* input1, float* output, float* output1, GxPreAmpStereo *p);
208 GxPreAmpStereo() {};
209 ~GxPreAmpStereo() {};
210 };
211
212
213
214 #endif //SRC_HEADERS_GX_PREAMP_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_REDEYE_H_
22 #define SRC_HEADERS_GX_REDEYE_H_
23
24 #include "gx_pluginlv2.h"
25
26 #include "gx_chump.cc"
27 #include "gx_bigchump.cc"
28 #include "gx_vibrochump.cc"
29
30 static plug amp_model [] = {
31 gx_chump::plugin, //0
32 gx_bigchump::plugin, //1
33 gx_vibrochump::plugin, //2
34 };
35
36 static const size_t AMP_COUNT = sizeof(amp_model) / sizeof(amp_model[0]);
37
38
39 #endif //SRC_HEADERS_GX_REDEYE_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include "gx_resampler.h"
20
21 namespace gx_resample
22 {
23
24 // copyed gcd from (zita) resampler.cc to get ratio_a and ratio_b for
25 // calculate the correct buffer size resulting from resample
26 static uint32_t gcd (uint32_t a, uint32_t b)
27 {
28 if (a == 0) return b;
29 if (b == 0) return a;
30 while (1)
31 {
32 if (a > b)
33 {
34 a = a % b;
35 if (a == 0) return b;
36 if (a == 1) return 1;
37 }
38 else
39 {
40 b = b % a;
41 if (b == 0) return a;
42 if (b == 1) return 1;
43 }
44 }
45 return 1;
46 }
47
48 void SimpleResampler::setup(int32_t sampleRate, uint32_t fact)
49 {
50 assert(fact <= MAX_UPSAMPLE);
51 m_fact = fact;
52 const int32_t qual = 16; // resulting in a total delay of 2*qual (0.7ms @44100)
53 // upsampler
54 r_up.setup(sampleRate, sampleRate*fact, 1, qual);
55 // k == inpsize() == 2 * qual
56 // pre-fill with k-1 zeros
57 r_up.inp_count = r_up.inpsize() - 1;
58 r_up.out_count = 1;
59 r_up.inp_data = r_up.out_data = 0;
60 r_up.process();
61 // downsampler
62 r_down.setup(sampleRate*fact, sampleRate, 1, qual);
63 // k == inpsize() == 2 * qual * fact
64 // pre-fill with k-1 zeros
65 r_down.inp_count = r_down.inpsize() - 1;
66 r_down.out_count = 1;
67 r_down.inp_data = r_down.out_data = 0;
68 r_down.process();
69 }
70
71 void SimpleResampler::up(int32_t count, float *input, float *output)
72 {
73 r_up.inp_count = count;
74 r_up.inp_data = input;
75 r_up.out_count = count * m_fact;
76 r_up.out_data = output;
77 r_up.process();
78 assert(r_up.inp_count == 0);
79 assert(r_up.out_count == 0);
80 }
81
82 void SimpleResampler::down(int32_t count, float *input, float *output)
83 {
84 r_down.inp_count = count * m_fact;
85 r_down.inp_data = input;
86 r_down.out_count = count+1; // +1 == trick to drain input
87 r_down.out_data = output;
88 r_down.process();
89 assert(r_down.inp_count == 0);
90 assert(r_down.out_count == 1);
91 }
92
93 float *BufferResampler::process(int32_t fs_inp, int32_t ilen, float *input, int32_t fs_outp, int32_t *olen)
94 {
95 int32_t d = gcd(fs_inp, fs_outp);
96 int32_t ratio_a = fs_inp / d;
97 int32_t ratio_b = fs_outp / d;
98
99 const int32_t qual = 32;
100 if (setup(fs_inp, fs_outp, 1, qual) != 0)
101 {
102 return 0;
103 }
104 // pre-fill with k/2-1 zeros
105 int32_t k = inpsize();
106 inp_count = k/2-1;
107 inp_data = 0;
108 out_count = 1; // must be at least 1 to get going
109 out_data = 0;
110 if (Resampler::process() != 0)
111 {
112 return 0;
113 }
114 inp_count = ilen;
115 int32_t nout = out_count = (ilen * ratio_b + ratio_a - 1) / ratio_a;
116 inp_data = input;
117 float *p = out_data = new float[out_count];
118 if (Resampler::process() != 0)
119 {
120 delete p;
121 return 0;
122 }
123 inp_data = 0;
124 inp_count = k/2;
125 if (Resampler::process() != 0)
126 {
127 delete p;
128 return 0;
129 }
130 assert(inp_count == 0);
131 assert(out_count <= 1);
132 *olen = nout - out_count;
133 //printf("resampled from %i to: %i\n",fs_inp, fs_outp );
134 return p;
135 }
136
137 bool StreamingResampler::setup(int32_t srcRate, int32_t dstRate, int32_t nchan)
138 {
139 int32_t d = gcd(srcRate, dstRate);
140 ratio_a = srcRate / d;
141 ratio_b = dstRate / d;
142
143 const int32_t qual = 32;
144 if (Resampler::setup(srcRate, dstRate, nchan, qual) != 0)
145 {
146 return false;
147 }
148 inp_count = inpsize()/2-1;
149 inp_data = 0;
150 out_count = 1; // must be at least 1 to get going
151 out_data = 0;
152 if (Resampler::process() != 0)
153 {
154 return false;
155 }
156 assert(inp_count == 0);
157 assert(out_count == 1);
158 return true;
159 }
160
161 int32_t StreamingResampler::process(int32_t count, float *input, float *output)
162 {
163 inp_count = count;
164 int32_t olen = out_count = get_max_out_size(count);
165 inp_data = input;
166 out_data = output;
167 if (Resampler::process() != 0)
168 {
169 return 0;
170 }
171 assert(inp_count == 0);
172 return olen - out_count;
173 }
174
175 int32_t StreamingResampler::flush(float *output)
176 {
177 // maximum data written to output:
178 // srcRate > dstRate: ~ 2 * qual
179 // srcRate < dstRate: ~ 2 * qual * dstRate/srcRate
180 inp_data = 0;
181 inp_count = inpsize()/2;
182 out_data = output;
183 int32_t olen = out_count = get_max_out_size(inp_count);
184 if (Resampler::process() != 0)
185 {
186 return 0;
187 }
188 assert(inp_count == 0);
189 return olen - out_count;
190 }
191
192 } // namespace gx_resample
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #pragma once
21
22 #ifndef SRC_HEADERS_GX_RESAMPLER_H_
23 #define SRC_HEADERS_GX_RESAMPLER_H_
24
25 #include <zita-resampler/resampler.h>
26 #include <stdint.h>
27 #include <assert.h>
28
29 namespace gx_resample
30 {
31
32 #define MAX_UPSAMPLE 8
33
34 class SimpleResampler
35 {
36 private:
37 Resampler r_up, r_down;
38 int32_t m_fact;
39 public:
40 SimpleResampler(): r_up(), r_down(), m_fact() {}
41 void setup(int32_t sampleRate, uint32_t fact);
42 void up(int32_t count, float *input, float *output);
43 void down(int32_t count, float *input, float *output);
44 };
45
46 class BufferResampler: Resampler
47 {
48 public:
49 float *process(int32_t fs_inp, int32_t ilen, float *input, int32_t fs_outp, int32_t* olen);
50 };
51
52 class StreamingResampler: Resampler
53 {
54 private:
55 int32_t ratio_a;
56 int32_t ratio_b;
57 public:
58 bool setup(int32_t srcRate, int32_t dstRate, int32_t nchan);
59 int32_t get_max_out_size(int32_t i_size)
60 {
61 return (i_size * ratio_b) / ratio_a + 1;
62 }
63 int32_t process(int32_t count, float *input, float *output);
64 int32_t flush(float *output); // check source for max. output size
65 };
66
67 }
68 #endif // SRC_HEADERS_GX_RESAMPLER_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_TONESTACK_H_
22 #define SRC_HEADERS_GX_TONESTACK_H_
23
24 #include "gx_pluginlv2.h"
25
26 #include "tonestack_default.cc"
27 #include "tonestack_bassman.cc"
28 #include "tonestack_twin.cc"
29 #include "tonestack_princeton.cc"
30 #include "tonestack_jcm800.cc"
31 #include "tonestack_jcm2000.cc"
32 #include "tonestack_mlead.cc"
33 #include "tonestack_m2199.cc"
34 #include "tonestack_ac30.cc"
35 #include "tonestack_mesa.cc"
36 #include "tonestack_soldano.cc"
37 #include "tonestack_jtm45.cc"
38 #include "tonestack_ac15.cc"
39 #include "tonestack_peavey.cc"
40 #include "tonestack_ibanez.cc"
41 #include "tonestack_roland.cc"
42 #include "tonestack_ampeg.cc"
43 #include "tonestack_ampeg_rev.cc"
44 #include "tonestack_sovtek.cc"
45 #include "tonestack_bogner.cc"
46 #include "tonestack_groove.cc"
47 #include "tonestack_crunch.cc"
48 #include "tonestack_fender_blues.cc"
49 #include "tonestack_fender_default.cc"
50 #include "tonestack_fender_deville.cc"
51 #include "tonestack_gibsen.cc"
52
53
54 static plug tonestack_model[] = {
55 tonestack_default::plugin,
56 tonestack_bassman::plugin,
57 tonestack_twin::plugin,
58 tonestack_princeton::plugin,
59 tonestack_jcm800::plugin,
60 tonestack_jcm2000::plugin,
61 tonestack_mlead::plugin,
62 tonestack_m2199::plugin,
63 tonestack_ac30::plugin,
64 tonestack_soldano::plugin,
65 tonestack_mesa::plugin,
66 tonestack_jtm45::plugin,
67 tonestack_ac15::plugin,
68 tonestack_peavey::plugin,
69 tonestack_ibanez::plugin,
70 tonestack_roland::plugin,
71 tonestack_ampeg::plugin,
72 tonestack_ampeg_rev::plugin,
73 tonestack_sovtek::plugin,
74 tonestack_bogner::plugin,
75 tonestack_groove::plugin,
76 tonestack_crunch::plugin,
77 tonestack_fender_blues::plugin,
78 tonestack_fender_default::plugin,
79 tonestack_fender_deville::plugin,
80 tonestack_gibsen::plugin,
81 };
82
83 static const size_t TS_COUNT = sizeof(tonestack_model) / sizeof(tonestack_model[0]);
84
85
86 #endif //SRC_HEADERS_GX_TONESTACK_H_
87
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_TONESTACK_H_
22 #define SRC_HEADERS_GX_TONESTACK_H_
23
24 #include "gx_pluginlv2.h"
25
26 #include "tonestack_default_stereo.cc"
27 #include "tonestack_bassman_stereo.cc"
28 #include "tonestack_twin_stereo.cc"
29 #include "tonestack_princeton_stereo.cc"
30 #include "tonestack_jcm800_stereo.cc"
31 #include "tonestack_jcm2000_stereo.cc"
32 #include "tonestack_mlead_stereo.cc"
33 #include "tonestack_m2199_stereo.cc"
34 #include "tonestack_ac30_stereo.cc"
35 #include "tonestack_mesa_stereo.cc"
36 #include "tonestack_soldano_stereo.cc"
37 #include "tonestack_jtm45_stereo.cc"
38 #include "tonestack_ac15_stereo.cc"
39 #include "tonestack_peavey_stereo.cc"
40 #include "tonestack_ibanez_stereo.cc"
41 #include "tonestack_roland_stereo.cc"
42 #include "tonestack_ampeg_stereo.cc"
43 #include "tonestack_ampeg_rev_stereo.cc"
44 #include "tonestack_sovtek_stereo.cc"
45 #include "tonestack_bogner_stereo.cc"
46 #include "tonestack_groove_stereo.cc"
47 #include "tonestack_crunch_stereo.cc"
48 #include "tonestack_fender_blues_stereo.cc"
49 #include "tonestack_fender_default_stereo.cc"
50 #include "tonestack_fender_deville_stereo.cc"
51 #include "tonestack_gibsen_stereo.cc"
52
53
54 static plug tonestack_model[] = {
55 tonestack_default_stereo::plugin,
56 tonestack_bassman_stereo::plugin,
57 tonestack_twin_stereo::plugin,
58 tonestack_princeton_stereo::plugin,
59 tonestack_jcm800_stereo::plugin,
60 tonestack_jcm2000_stereo::plugin,
61 tonestack_mlead_stereo::plugin,
62 tonestack_m2199_stereo::plugin,
63 tonestack_ac30_stereo::plugin,
64 tonestack_soldano_stereo::plugin,
65 tonestack_mesa_stereo::plugin,
66 tonestack_jtm45_stereo::plugin,
67 tonestack_ac15_stereo::plugin,
68 tonestack_peavey_stereo::plugin,
69 tonestack_ibanez_stereo::plugin,
70 tonestack_roland_stereo::plugin,
71 tonestack_ampeg_stereo::plugin,
72 tonestack_ampeg_rev_stereo::plugin,
73 tonestack_sovtek_stereo::plugin,
74 tonestack_bogner_stereo::plugin,
75 tonestack_groove_stereo::plugin,
76 tonestack_crunch_stereo::plugin,
77 tonestack_fender_blues_stereo::plugin,
78 tonestack_fender_default_stereo::plugin,
79 tonestack_fender_deville_stereo::plugin,
80 tonestack_gibsen_stereo::plugin,
81 };
82
83 static const size_t TS_COUNT = sizeof(tonestack_model) / sizeof(tonestack_model[0]);
84
85
86 #endif //SRC_HEADERS_GX_TONESTACK_H_
87
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <stdint.h>
20
21 class Impf
22 {
23 public:
24 inline void compute(int32_t count, float *input0, float *output0, float value) {
25 double fSlow0 = value* value * 0.01;
26 for (int32_t i=0; i<count; i++) {
27 output0[i] = fSlow0 * input0[i];
28 }
29 };
30 Impf() {};
31 ~Impf() {};
32 };
33
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #pragma once
21
22 #ifndef SRC_HEADERS_VALVE_H_
23 #define SRC_HEADERS_VALVE_H_
24
25 /****************************************************************
26 * 1-dimensional function tables for linear interpolation
27 *
28 * table1d and table1d_imp<size> must only differ in the last
29 * element, so that the typecast for tubetab below will work.
30 * Can't use inheritance because then C initializers will not
31 * work and initialization will be more awkward or less efficient.
32 */
33
34 struct table1d // 1-dimensional function table
35 {
36 float low;
37 float high;
38 float istep;
39 int32_t size;
40 float data[];
41 };
42
43 template <int32_t tab_size>
44 struct table1d_imp
45 {
46 float low;
47 float high;
48 float istep;
49 int32_t size;
50 float data[tab_size];
51 operator table1d&() const
52 {
53 return *(table1d*)this;
54 }
55 };
56
57 /*
58 * data tables generated by tools/tube_transfer.py
59 */
60 #include "12ax7.cc"
61 #include "12AU7.cc"
62 #include "12AT7.cc"
63 #include "6V6.cc"
64 #include "6DJ8.cc"
65 #include "6C16.cc"
66
67 enum {
68 TUBE_TABLE_12AX7_68k,
69 TUBE_TABLE_12AX7_250k,
70 TUBE_TABLE_6V6_68k,
71 TUBE_TABLE_6V6_250k,
72 TUBE_TABLE_12AU7_68k,
73 TUBE_TABLE_12AU7_250k,
74 TUBE_TABLE_6DJ8_68k,
75 TUBE_TABLE_6DJ8_250k,
76 TUBE_TABLE_12AT7_68k,
77 TUBE_TABLE_12AT7_250k,
78 TUBE_TABLE_6C16_68k,
79 TUBE_TABLE_6C16_250k,
80 TUBE_TABLE_SIZE
81 };
82
83 table1d *tubetab[TUBE_TABLE_SIZE] = {
84 &static_cast<table1d&>(tubetable_12AX7[0]),
85 &static_cast<table1d&>(tubetable_12AX7[1]),
86 &static_cast<table1d&>(tubetable_6V6[0]),
87 &static_cast<table1d&>(tubetable_6V6[1]),
88 &static_cast<table1d&>(tubetable_12AU7[0]),
89 &static_cast<table1d&>(tubetable_12AU7[1]),
90 &static_cast<table1d&>(tubetable_6DJ8[0]),
91 &static_cast<table1d&>(tubetable_6DJ8[1]),
92 &static_cast<table1d&>(tubetable_12AT7[0]),
93 &static_cast<table1d&>(tubetable_12AT7[1]),
94 &static_cast<table1d&>(tubetable_6C16[0]),
95 &static_cast<table1d&>(tubetable_6C16[1]),
96 };
97
98 /*
99 * definitions for ffunction(float Ftube(int32_t,float), "valve.h", "");
100 * in gx_amp.dsp - gx_ampmodul.dsp
101 */
102
103 static inline double Ftube(int32_t table, double Vgk)
104 {
105 const table1d& tab = *tubetab[table];
106 double f = (Vgk - tab.low) * tab.istep;
107 int32_t i = static_cast<int32_t>(f);
108 if (i < 0)
109 return tab.data[0];
110 if (i >= tab.size-1)
111 return tab.data[tab.size-1];
112 f -= i;
113 return tab.data[i]*(1-f) + tab.data[i+1]*f;
114 }
115
116 #endif
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0
1 amp21.png -> amp37.png are created by Richard Dalton,
2
3 he gives us permission to distribute it under the terms of the
4 GNU General Public License either version 2 of the License,
5 or (at your option) any later version.
6
7 see: http://www.Ampskindesigns.com
8 for more information
9
10 You should have received a copy of the GNU General Public License
11 If not, see <http://www.gnu.org/licenses/>.
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 #"12ax7"
1 style "gx_lv2-0"
2 {
3 stock["bigknob"] = {{"tactile_knob_large_151f.png"}}
4 stock["smallknob"] = {{"tactile_knob_small_99f.png"}}
5 stock["smallknobr"] = {{"tactile_knob_medium_151f.png"}}
6 stock["amp_skin"] = {{"amp21.png"}}
7 GxPaintBox::icon-set =0
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-0"
11
0 #"12AU7"
1 style "gx_lv2-1"
2 {
3 stock["bigknob"] = {{"knob.png"}}
4 stock["smallknob"] = {{"knob-small.png"}}
5 stock["smallknobr"] = {{"knob-middle.png"}}
6 stock["amp_skin"] = {{"amp22.png"}}
7 GxPaintBox::icon-set =1
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-1"
11
0 #"pre 12ax7/ master 6V6"
1 style "gx_lv2-10"
2 {
3 stock["bigknob"] = {{"nk-knob.png"}}
4 stock["smallknob"] = {{"nk-knob-small.png"}}
5 stock["smallknobr"] = {{"nk-knob-middle.png"}}
6 stock["amp_skin"] = {{"amp30.png"}}
7 GxPaintBox::icon-set =10
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-10"
11
0 #"pre 12AU7/ master 6V6"
1 style "gx_lv2-11"
2 {
3 stock["bigknob"] = {{"black-knob.png"}}
4 stock["smallknob"] = {{"black-knob-small.png"}}
5 stock["smallknobr"] = {{"black-knob-middle.png"}}
6 stock["amp_skin"] = {{"amp31.png"}}
7 GxPaintBox::icon-set =11
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-11"
11
0 #"pre 12AT7/ master 6V6"
1 style "gx_lv2-12"
2 {
3 stock["bigknob"] = {{"tactile_knob_large_151f.png"}}
4 stock["smallknob"] = {{"tactile_knob_small_99f.png"}}
5 stock["smallknobr"] = {{"tactile_knob_medium_151f.png"}}
6 stock["amp_skin"] = {{"amp32.png"}}
7 GxPaintBox::icon-set =12
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-12"
11
0 #"pre 6DJ8/ master 6V6"
1 style "gx_lv2-13"
2 {
3 stock["bigknob"] = {{"knob.png"}}
4 stock["smallknob"] = {{"knob-small.png"}}
5 stock["smallknobr"] = {{"knob-middle.png"}}
6 stock["amp_skin"] = {{"amp33.png"}}
7 GxPaintBox::icon-set =13
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-13"
11
0 #"pre 12ax7/ push-pull 6V6"
1 style "gx_lv2-14"
2 {
3 stock["bigknob"] = {{"ac30-knob.png"}}
4 stock["smallknob"] = {{"ac30-knob-small.png"}}
5 stock["smallknobr"] = {{"ac30-knob-middle.png"}}
6 stock["amp_skin"] = {{"amp34.png"}}
7 GxPaintBox::icon-set =14
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-14"
11
0 #"pre 12AU7/ push-pull 6V6"
1 style "gx_lv2-15"
2 {
3 stock["bigknob"] = {{"mc-knob-middle.png"}}
4 stock["smallknob"] = {{"mc-knob-small.png"}}
5 stock["smallknobr"] = {{"mc-knob-small.png"}}
6 stock["amp_skin"] = {{"amp35.png"}}
7 GxPaintBox::icon-set =15
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-15"
11
0 #"pre 12AT7/ push pull 6V6"
1 style "gx_lv2-16"
2 {
3 stock["bigknob"] = {{"black-knob-middle.png"}}
4 stock["smallknob"] = {{"black-knob-small.png"}}
5 stock["smallknobr"] = {{"black-knob-small.png"}}
6 stock["amp_skin"] = {{"amp36.png"}}
7 GxPaintBox::icon-set =16
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-16"
11
0 #"pre 6DJ8/ push-pull 6V6"
1 style "gx_lv2-17"
2 {
3 stock["bigknob"] = {{"ac30-knob.png"}}
4 stock["smallknob"] = {{"ac30-knob-small.png"}}
5 stock["smallknobr"] = {{"ac30-knob-middle.png"}}
6 stock["amp_skin"] = {{"amp37.png"}}
7 GxPaintBox::icon-set =17
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-17"
11
0 #"12AT7"
1 style "gx_lv2-2"
2 {
3 stock["bigknob"] = {{"black-knob.png"}}
4 stock["smallknob"] = {{"black-knob-small.png"}}
5 stock["smallknobr"] = {{"black-knob-middle.png"}}
6 stock["amp_skin"] = {{"amp23.png"}}
7 GxPaintBox::icon-set =2
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-2"
11
0 #"6DJ8"
1 style "gx_lv2-3"
2 {
3 stock["bigknob"] = {{"ac30-knob.png"}}
4 stock["smallknob"] = {{"ac30-knob-small.png"}}
5 stock["smallknobr"] = {{"ac30-knob-middle.png"}}
6 stock["amp_skin"] = {{"amp24.png"}}
7 GxPaintBox::icon-set =3
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-3"
11
0 #"6C16"
1 style "gx_lv2-4"
2 {
3 stock["bigknob"] = {{"mc-knob-middle.png"}}
4 stock["smallknob"] = {{"mc-knob-small.png"}}
5 stock["smallknobr"] = {{"mc-knob-small.png"}}
6 stock["amp_skin"] = {{"amp25.png"}}
7 GxPaintBox::icon-set =4
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-4"
11
0 #"6V6"
1 style "gx_lv2-5"
2 {
3 stock["bigknob"] = {{"metal-knob.png"}}
4 stock["smallknob"] = {{"metal-knob-small.png"}}
5 stock["smallknobr"] = {{"metal-knob-middle.png"}}
6 stock["amp_skin"] = {{"ac30.png"}}
7 GxPaintBox::icon-set =5
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-5"
11
0 #"12ax7 feedback"
1 style "gx_lv2-6"
2 {
3 stock["bigknob"] = {{"nm1-knob.png"}}
4 stock["smallknob"] = {{"nm1-knob-small.png"}}
5 stock["smallknobr"] = {{"nm1-knob-middle.png"}}
6 stock["amp_skin"] = {{"ga15.png"}}
7 GxPaintBox::icon-set =6
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-6"
11
0 #"12AU7 feedback"
1 style "gx_lv2-7"
2 {
3 stock["bigknob"] = {{"m3-knob-middle.png"}}
4 stock["smallknob"] = {{"m3-knob-small.png"}}
5 stock["smallknobr"] = {{"m3-knob-small.png"}}
6 stock["amp_skin"] = {{"champ.png"}}
7 GxPaintBox::icon-set =7
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-7"
11
0 #"12AT7 feedback"
1 style "gx_lv2-8"
2 {
3 stock["bigknob"] = {{"nm-knob.png"}}
4 stock["smallknob"] = {{"nm-knob-small.png"}}
5 stock["smallknobr"] = {{"nm-knob-middle.png"}}
6 stock["amp_skin"] = {{"gx_dark.png"}}
7 GxPaintBox::icon-set =8
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-8"
11
0 #"6DJ8 feedback"
1 style "gx_lv2-9"
2 {
3 stock["bigknob"] = {{"ac30-knob.png"}}
4 stock["smallknob"] = {{"ac30-knob-small.png"}}
5 stock["smallknobr"] = {{"ac30-knob-middle.png"}}
6 stock["amp_skin"] = {{"princeton.png"}}
7 GxPaintBox::icon-set =9
8 }
9
10 widget "*.GUITARIXLV2" style:highest "gx_lv2-9"
11
0 #"bigchump"
1 style "gx_redeye-bigchump"
2 {
3 stock["bigknob"] = {{"chump-knob.png"}}
4 stock["amp_skin"] = {{"bigchump.png"}}
5 stock["switchit_on"] = {{"chump-switch_on.png"}}
6 stock["switchit_off"] = {{"chump-switch_off.png"}}
7 GxPaintBox::icon-set =1
8 }
9
10 widget "*.bigchump" style:highest "gx_redeye-bigchump"
11 class "*GxToggleImage" style "gx_redeye-bigchump"
12
0 #"chump"
1 style "gx_redeye-chump"
2 {
3 stock["bigknob"] = {{"chump-knob.png"}}
4 stock["amp_skin"] = {{"chump.png"}}
5 stock["switchit_on"] = {{"chump-switch_on.png"}}
6 stock["switchit_off"] = {{"chump-switch_off.png"}}
7 GxPaintBox::icon-set =1
8 }
9
10 widget "*.chump" style:highest "gx_redeye-chump"
11 class "*GxToggleImage" style "gx_redeye-chump"
12
0 #"vibrochump"
1 style "gx_redeye-vibrochump"
2 {
3 stock["bigknob"] = {{"vibrochump-knob.png"}}
4 stock["amp_skin"] = {{"vibrochump.png"}}
5 stock["switchit_on"] = {{"chump-switch_on.png"}}
6 stock["switchit_off"] = {{"chump-switch_off.png"}}
7 GxPaintBox::icon-set =2
8 }
9
10 widget "*.vibrochump" style:highest "gx_redeye-vibrochump"
11 class "*GxToggleImage" style "gx_redeye-vibrochump"
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 import("guitarix.lib");
1
2 faas1 = vgroup("anti_aliase", vslider("feedback[name:Feedback]", 0.3, 0.3, 0.9, 0.01));
3 process = add_dc : +~_''*faas1;
0 import("music.lib");
1 import("filter.lib");
2 import("effect.lib");
3 import("guitarix.lib");
4
5 /****************************************************************
6 ** unused
7 */
8
9 /*
10 distort(x) = x : *(pregain) : (+ : flt : BP(vtu) : flt) ~ *(back) : gain with
11 {
12 back = vslider("FB",0.95,0.6,0.99,0.001);
13 mapper(v) = 1 - 19.7 * v * v;
14 flt(x) = +(x - x') ~ *(mapper(vslider("FreqT", 1250, 200, 3000, 1)/SR));
15 vtu(x) = valve.vtu_(dist, q, g, x);
16 g = vslider("Duty", 0, -1.0, 1.0, 0.01) : *(1-log(2)) : +(1);
17 q = vslider("Qual", 0.5, 0, 1, 0.01)*1.75 - 1.04 : pow(_, 9);
18 dist = pow(10, 4*(vslider("Dist", 0.5, 0, 1, 0.01)));
19 pregain = 0.7*sqrt(1-back);
20 gain = BP(*(0.4/(vtu(0.2)-vtu(-0.2))));
21 };
22 */
23
24 /*
25 process = hgroup("Tube [option : detachable]", BP(
26 hgroup("1 Amp",distort) :
27 vgroup("2 Highpass",BP(highpass1(fch))) :
28 vgroup("3 Lowpass",BP(lowpass1(fcl)))
29 )) with
30 {
31 fch = vslider("freq",130,50,200,1);
32 fcl = vslider("freq",200,1400,8000,10);
33 };
34 */
35
36 /*
37 process = hgroup("2 Tube",
38 hgroup("1a Distortion", BP(vtu)):
39 hgroup("1b Distortion", BP(vtu)):
40 hgroup("1c Distortion", BP(vtu)):
41 hgroup("1d Distortion", BP(vtu)):
42 hgroup("2 Highpass",BP(highpass2(fch))) :
43 hgroup("3 Lowpass",BP(lowpass1(fcl)))
44 ) with
45 {
46 vtu = valve.vtu(dist, q, g) : *(0.1/(valve.vtu(dist, q, g, 0.05)-valve.vtu(dist, q, g, -0.05)));
47 dist = pow(10, 4*vslider("dist", 0.5, 0, 1, 0.01));
48 q = vslider("qual", 0.5, 0, 1, 0.01) : -(0.9) : /(10);
49 g = vslider("duty", 0, -1.0, 1.0, 0.01) : *(1-log(2)) : +(1);
50 fch = vslider("freq",130,50,200,1);
51 fcl = vslider("freq",200,1400,8000,10);
52 };
53 */
54
55 // envelope meter for insertion
56 // the log10 function might be slow, with execution
57 // time depending on input
58 meter = _ <: (graph*1e-50,_) :> _ with {
59 t = 0.05;
60 g = exp(-1/(SR*t));
61 env = abs : *(1-g) : + ~ *(g);
62 graph = env : 20*log10 : clip(-20,20) : vbargraph("ENV",-20,20);
63 };
64
65 wet_dry = vslider("wet_dry[name:wet/dry]", 0, -1, 1, 0.1);
66
67 process = hgroup("test", hgroup("tremolo",wet_dry_mix(wet_dry, BP(component("tremolo.dsp")))));
0 import("music.lib");
1 import("filter.lib");
2 import("guitarix.lib");
3
4 filter = tf2(b0,b1,b2,a1,a2) with
5 {
6 c = 1.059;
7 R = 0.9221;
8 lc0 = 0.00506158;
9 lc1 = 0.06446806;
10 lc2 = 0.27547621;
11 lc3 = 0.43359433;
12 lc4 = 1.31282248;
13 lc5 = 0.07238887;
14 fc = vslider("Freq",1200,300,3000,5) : *(2*PI/SR) : log;
15 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
16 //b0 = 1;
17 //b1 = -1.01;
18 //b2 = 0;
19 //a1 = -1.84;
20 //a2 = 0.846416;
21 b0 = 1;
22 b1 = -c;
23 b2 = 0;
24 a1 = -2*R*cos(p);
25 a2 = R*R;
26 };
27
28 process = hgroup("1 Filter",BP(filter : *(db2linear(-10))));
0 declare id "HighShelf";
1
2 import("maxmsp.lib");
3 import("guitarix.lib");
4
5 hs(x) = highShelf(x,F,G,Q)
6 with {
7 G = -20.;
8 F = SR/2 -100.;
9 Q = 100.;
10 };
11
12 process = +(anti_denormal_ac) : hs;
0 import("music.lib");
1 import("filter.lib");
2 import("effect.lib");
3 import("guitarix.lib");
4
5
6 /****************************************************************
7 ** Tube Preamp Emulation stage 1 - 2
8 */
9
10
11 process = hgroup("amp2", hgroup("preamp",(BP(preamp))) :
12 hgroup("stage1", BP(stage1)) :
13 hgroup("stage2", BP(stage2))
14 ) with {
15 preamp = *(vslider("Pregain",30,-10,80,0.1):db2linear : smoothi(0.999));
16 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : *(gain1) with {
17 gain1 = vslider("gain1", 6, -10.0, 20.0, 0.1) : db2linear : smoothi(0.999);
18 };
19 stage2 = lowpass1(6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285) : *(gain2) with {
20 gain2 = vslider("gain2", 6, -10.0, 20.0, 0.1) : db2linear : smoothi(0.999);
21 };
22 };
0 declare id "auto"; // selector crybaby / autowah
1 declare name "auto";
2
3 //-----------------------------------------------
4 // Auto-Wah
5 //-----------------------------------------------
6
7 import("effect.lib"); //for crybaby definition
8 import("guitarix.lib");
9
10 l = crybaby_ctrl.level;
11 a = crybaby_ctrl.wah;
12 w = crybaby_ctrl.wet_dry;
13 /*
14 a = 20 * vslider(".crybaby.wah[alias]", 0, 0, 1, 0.01);
15 w = vslider(".crybaby.wet_dry[alias]", 100, 0, 100, 0.1):/(100);
16 l = vslider(".crybaby.level[alias]", 0, -1, 1, 0.1);
17 */
18
19 d = 1-w;
20 Sum(n,x) = +(x - (x @ n)) ~_ ;
21
22 Average(n,x) = x * (1<<22) : int : abs : Sum(n) : float : /(1<<22)
23 : /(n);
24
25 Map(x) = x * a : max(0) : min(1) ;
26
27
28 process(x) = x : _<:*(d),(*(w):*(l) :crybaby(x : Average(1000) : Map)):>_ ;
0 import("guitarix.lib");
1
2 process = balance(balance_ctrl.bal);
0 import("guitarix.lib");
1
2 process = _ <: balance(balance_ctrl.bal);
0 declare id "amp.bass_boost";
1 declare name "Bassbooster";
2 declare groups ".bassbooster[Bassbooster]";
3
4 import("filter.lib");
5
6 //------------------------------------------------------------------
7 // DAFX, Digital Audio Effects (Wiley ed.)
8 // chapter 2 : filters
9 // section 2.3 : Equalizers
10 // page 53 : second order shelving filter design
11 //------------------------------------------------------------------
12
13 lfboost(F,G) = tf2(b0,b1,b2,a0,a1)
14 with {
15 V = db2linear(G);
16 K = tan(PI*F/SR);
17 D = 1 + sqrt(2)*K + K*K;
18
19 b0 = (1 + sqrt(2*V)*K + V*K*K) / D;
20 b1 = 2 * (V*K*K - 1) / D;
21 b2 = (1 - sqrt(2*V)*K + V*K*K) / D;
22 a0 = 2 * (K*K - 1) / D;
23 a1 = (1 - sqrt(2)*K + K*K) / D;
24 };
25 level = vslider(".bassbooster.Level", 10, 0.5, 20, 0.5) ;
26 process = lfboost(120, level);
0 // Big Muff tone model
1 //
2
3 import("music.lib");
4 import("filter.lib");
5
6
7 // Is basically 2 filters mixed together with a knob.
8
9 //Top filter is 39K( R1 ) -> 0.01u( C2 ) to ground - 408Hz lowpass
10 // Bottom filter is 3900pF( C1 ) -> 22k( R2 ) to ground - 1855.9Hz
11
12 // Seems OK but does not create the 1K dip seen on real thing
13 // assume that the tone pot needs better model as must intercat with the
14 // other 2 filters such that at mid point both filters are still working
15 // There shgould be interaction between the pot ( R3 ) and both of thge other RC filters
16 // Also as pot changes so do cutoff frequencies
17 // Reduction moves both frequencies up by roughly 400Hz max
18 // Increase moves both down by around same
19 // So need +-400Hz calculated by curent tone position
20 // pot = 0 -> +400
21 // pot = 1 -> -400
22
23 bigmuff = _<: filter1,filter2:>_ with {
24 tone = vslider("tone[style:knob]",0.5,0,1,0.01);
25 filter1 = highpass( 1, 1856):*(tone) ;
26 filter2 = lowpass( 1, 408 ) :*(1-tone ) ;
27 };
28 process = bigmuff ;
29
0 declare name "BiQuad Filter";
1 declare category "Tone control";
2
3 import("music.lib");
4 import("filter.lib");
5 import("guitarix.lib");
6
7 filter = tf2(b0,b1,b2,a1,a2) with
8 {
9 c = 1.059;
10 R = 0.9221;
11 lc0 = 0.00506158;
12 lc1 = 0.06446806;
13 lc2 = 0.27547621;
14 lc3 = 0.43359433;
15 lc4 = 1.31282248;
16 lc5 = 0.07238887;
17 fc = vslider("Freq",1200,300,3000,5) : *(2*PI/SR) : log;
18 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
19 //b0 = 1;
20 //b1 = -1.01;
21 //b2 = 0;
22 //a1 = -1.84;
23 //a2 = 0.846416;
24 b0 = 1;
25 b1 = -c;
26 b2 = 0;
27 a1 = -2*R*cos(p);
28 a2 = R*R;
29 };
30
31 process = filter : *(db2linear(-10));
0 //declare name "Cabinet Impulse Former";
1 declare id "cab";
2
3 import("music.lib");
4 import("guitarix.lib");
5
6 gain = vslider("Level[alias]", 1, 0.5, 5, 0.5) ;
7
8 bass_gain = vslider("bass[name:bass][alias]", 0, -10, 10, 0.5);
9
10 treble_gain = vslider("treble[name:treble][alias]", 0, -10, 10, 0.5);
11
12 tone = component("tone.dsp").gxlow_shelf(300,bass_gain):
13 component("tone.dsp").gxhigh_shelf(2400,treble_gain);
14
15 process = tone : *(gain * pow(10, -0.1 * gain)); // FIXME
0 declare name "Chorus";
1 declare category "Modulation";
2
3 /* Stereo chorus. */
4
5 // declare name "chorus -- stereo chorus effect";
6 declare author "Albert Graef";
7 declare version "1.0";
8
9 import("music.lib");
10
11 level = hslider("level", 0.5, 0, 1, 0.01);
12 freq = hslider("freq", 3, 0, 10, 0.01);
13 dtime = hslider("delay", 0.02, 0, 0.2, 0.01);
14 depth = hslider("depth", 0.02, 0, 1, 0.01);
15
16 tblosc(n,f,freq,mod) = (1-d)*rdtable(n,waveform,i&(n-1)) +
17 d*rdtable(n,waveform,(i+1)&(n-1))
18 with {
19 waveform = time*(2.0*PI)/n : f;
20 phase = freq/SR : (+ : decimal) ~ _;
21 modphase = decimal(phase+mod/(2*PI))*n;
22 i = int(floor(modphase));
23 d = decimal(modphase);
24 };
25
26 chorus(dtime,freq,depth,phase,x)
27 = x+level*fdelay(1<<16, t, x)
28 with {
29 t = SR*dtime/2*(1+depth*tblosc(1<<16, sin, freq, phase));
30 };
31
32 process = vgroup("chorus", (left, right))
33 with {
34 left = chorus(dtime,freq,depth,0);
35 right = chorus(dtime,freq,depth,PI/2);
36 };
0 declare name "Chorus Mono";
1 declare category "Modulation";
2
3 declare author "Albert Graef";
4 declare version "1.0";
5
6 import("music.lib");
7
8 level = hslider("level", 0.5, 0, 1, 0.01);
9 freq = hslider("freq", 2, 0, 10, 0.01);
10 dtime = 0.02 ;//hslider("delay", 0.02, 0, 0.2, 0.01);
11
12 depth = 0.02 ;//hslider("depth", 0.02, 0, 1, 0.01);
13 wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
14 dry = 1 - wet;
15
16 process = _<:*(dry),(*(wet): component("chorus.dsp").chorus(dtime,freq,depth,0)):>_;
0 declare name "Compressor";
1 declare category "Guitar Effects";
2
3 /* Compressor unit. */
4
5 //declare name "compressor -- compressor/limiter unit";
6 declare author "Albert Graef";
7 declare version "1.0";
8
9 import("music.lib");
10 import("guitarix.lib");
11
12 /* Controls. */
13
14 // partition the controls into these three groups
15 comp_group(x) = hgroup("1-compression", x);
16 env_group(x) = vgroup("2-envelop", x);
17 gain_group(x) = vgroup("3-gain", x);
18
19 // compressor controls: ratio, threshold and knee size
20 ratio = nentry("ratio", 2, 1, 20, 0.1);
21 threshold = nentry("threshold", -20, -96, 10, 0.1);
22 knee = nentry("knee", 3, 0, 20, 0.1);
23
24 // attack and release controls; clamped to a minimum of 1 sample
25 attack = hslider("attack", 0.002, 0, 1, 0.001) : max(1/SR);
26 release = hslider("release", 0.5, 0, 10, 0.01) : max(1/SR);
27
28 // gain controls: make-up gain, compression gain meter
29 makeup_gain = gain_group(hslider("makeup gain", 0, -96, 96, 0.1));
30 gain(x) = attach(x, x : gain_group(hbargraph("gain", -96, 0)));
31
32
33
34 t = 0.1;
35 g = exp(-1/(SR*t));
36 env = abs : *(1-g) : + ~ *(g);
37 rms = sqr : *(1-g) : + ~ *(g) : sqrt;
38 sqr(x) = x*x;
39
40 /* Compute the envelop of a stereo signal. Replace env with rms if you want to
41 use the RMS value instead. */
42
43 //env2(x,y) = max(env(x),env(y));
44 env2(x) = max(env(x));
45
46 /* Compute the compression factor for the current input level. The gain is
47 always 0 dB if we're below the reduced threshold, threshold-knee. Beyond
48 the real threshold value the level is scaled by 1/ratio. Between these two
49 extremes we return a convex combination of those factors. This is also
50 known as "soft-knee" compression: the compression kicks in gradually at
51 threshold-knee and reaches its full value at threshold. For special
52 effects, you can also achieve old-school "hard-knee" compression by setting
53 the knee value to zero. Also note that, before computing the gain, the
54 input level is first smoothed out using a 1 pole IIR to prevent clicks when
55 the input level changes abruptly. The attack and release times of this
56 filter are configured with the corresponding envelop controls of the
57 compressor. */
58
59 compress(env) = level*(1-r)/r
60 with {
61 // the (filtered) input level above the threshold
62 level = env : h ~ _ : linear2db : (_-threshold+knee) : max(0)
63 with {
64 h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
65 ga = exp(-1/(SR*attack));
66 gr = exp(-1/(SR*release));
67 };
68 // the knee factor, clamped to 0..1; we add a small perturbation in
69 // the denominator to prevent infinities and nan when knee<<1
70 p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
71 // the actual compression ratio
72 r = 1-p+p*ratio;
73 };
74
75 process(x) = g(x)*x
76 with {
77 //g = env2(x) : compress : gain : +(makeup_gain) : db2linear ;
78 g = add_dc : env : compress : db2linear ;
79 };
0 declare id "manual";
1 declare name "manual"; // selector crybaby / autowah
2
3 import("effect.lib");
4 import("guitarix.lib");
5
6 _crybaby(wah) = *(gs(s)) : tf2(1,-1*0.996,0,a1s(s)*0.996,a2s(s)*0.996)
7 with {
8 s = 0.999; // smoothing parameter (one-pole pole location)
9 Q = pow(2.0,(2.0*(1.0-wah)+1.0)); // Resonance "quality factor"
10 fr = 450.0*pow(2.0,2.3*wah); // Resonance tuning
11 g = 0.1*pow(4.0,wah); // gain (optional)
12
13 // Biquad fit using z = exp(s T) ~ 1 + sT for low frequencies:
14 frn = fr/SR; // Normalized pole frequency (cycles per sample)
15 R = 1 - PI*frn/Q; // pole radius
16 theta = 2*PI*frn; // pole angle
17 a1 = 0-2.0*R*cos(theta); // biquad coeff
18 a2 = R*R; // biquad coeff
19
20 // dezippering of slider-driven signals:
21 a1s(s) = a1 : smooth(s);
22 a2s(s) = a2 : smooth(s);
23 gs(s) = g : smooth(s);
24 };
25
26 level = crybaby_ctrl.level;
27 wah = crybaby_ctrl.wah;
28 wet_dry = crybaby_ctrl.wet_dry;
29
30 dry = 1 - wet_dry;
31
32 process = _<:*(dry),(*(wet_dry): *(level) : _crybaby(wah)):>_;
0 declare name "Delay";
1 declare category "Echo / Delay";
2
3 import("music.lib");
4 import("guitarix.lib");
5 msec = SR/1000.0;
6 gain = vslider("gain", 0, -20, 20, 0.1) : db2linear : smoothi(0.999);
7 d = vslider("delay", 0, 0, 5000, 10)*msec;
8 process = _ <: _ + gain * fdelay5s(d) :> _;
0 //declare name "distortion";
1 declare version "0.01";
2 declare author "brummer";
3 declare license "BSD";
4 declare copyright "(c)brummer 2008";
5
6 import("math.lib");
7 import("music.lib");
8 import("effect.lib");
9 import("filter.lib");
10 import("guitarix.lib");
11 import("maxmsp.lib");
12
13 F = nentry("split_low_freq", 250, 20, 600, 10);
14 F1 = nentry("split_middle_freq", 650, 600, 1250, 10);
15 F2 = nentry("split_high_freq", 1250, 1250, 12000, 10);
16
17 /**********************************************************************
18 *** this part is included here for backward compatibility from 0.9.27 to
19 *** 0.9.24
20 ***********************************************************************/
21
22 //------------------------------ count and take --------------------------------------
23
24 countN ((xs, xxs)) = 1 + countN(xxs);
25 countN (xx) = 1;
26
27 takeN (1, (xs, xxs)) = xs;
28 takeN (1, xs) = xs;
29 takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
30
31 //------------------------------ low/high-passfilters --------------------------------------
32
33 tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
34
35 tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
36 with {
37 conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
38 conv2(k0,k1,x) = k0*x + k1*x';
39 sub(x,y) = y-x;
40 };
41
42 tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
43 with {
44 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
45 d = a0 + c;
46 b1d = (b0 - b1*c) / d;
47 b0d = (b0 + b1*c) / d;
48 a1d = (a0 - c) / d;
49 };
50
51 tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
52 with {
53 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
54 csq = c*c;
55 d = a0 + a1 * c + csq;
56 b0d = (b0 + b1 * c + b2 * csq)/d;
57 b1d = 2 * (b0 - b2 * csq)/d;
58 b2d = (b0 - b1 * c + b2 * csq)/d;
59 a1d = 2 * (a0 - csq)/d;
60 a2d = (a0 - a1*c + csq)/d;
61 };
62
63 lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
64 highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
65 lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
66 with {
67 lphpr(s,0,N,fc) = _;
68 lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
69 lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
70 parity = N % 2;
71 S = (O-parity)/2; // current section number
72 a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
73 w1 = 2*PI*fc;
74 };
75 };
76
77 //------------------------------ analyzer --------------------------------------
78 analyzern(O,lfreqs) = _ <: bsplit(nb) with
79 {
80 nb = countN(lfreqs);
81 fc(n) = takeN(n, lfreqs);
82 lp(n) = lowpassN(O,fc(n));
83 hp(n) = highpassN(O,fc(n));
84 bsplit(0) = _;
85 bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
86 };
87
88 analyzerN(lfreqs) = analyzern(3,lfreqs);
89
90 /**********************************************************************
91 *** end for backward compatibility from 0.9.27 to
92 *** 0.9.24 , it could removed when switch completly to > 0.9.27
93 ***********************************************************************/
94
95 //----------distortion---------
96
97 //-speaker emulation
98 sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
99 sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
100 switch1 = checkbox("on_off[name:low highcutoff]");
101 sbp = hgroup("low_highcutoff", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
102
103 //-low and highpass
104 lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
105 highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
106 switch = checkbox("on_off[name:low highpass]");
107 passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
108 pass = hgroup("low_highpass", bypass(switch, passo));
109
110 //-distortion
111 drivelevel = vslider("level", 0.01, 0, 0.5, 0.01);
112 drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
113 low_gain = vslider("low_gain", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
114 high_gain = vslider("high_gain", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
115 middle_gain_l = vslider("middle_l_gain", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
116 middle_gain_h = vslider("middle_h_gain", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
117 drive = vslider("drive", 0.64, 0, 1, 0.01);
118 drive1 = vslider("low_drive", 1, 0, 1, 0.01)*drive;
119 drive2 = vslider("high_drive", 1, 0, 1, 0.01)*drive;
120 drive3 = vslider("middle_l_drive", 1, 0, 1, 0.01)*drive;
121 drive4 = vslider("middle_h_drive", 1, 0, 1, 0.01)*drive;
122 distortion1 = _:cubicnl(drive1,drivelevel): *(low_gain);
123 distortion2 = _:cubicnl(drive2,drivelevel) : *(high_gain);
124 distortion3 = _:cubicnl(drive3,drivelevel) : *(middle_gain_l);
125 distortion4 = _:cubicnl(drive4,drivelevel) : *(middle_gain_h);
126 distortion = _ : analyzerN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>_;
127
128 //-resonator
129 resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
130 with {
131 d = vslider("vibrato", 1, 0, 1, 0.01);
132 a = vslider("trigger", 0.12, 0, 1, 0.01);
133 };
134
135 switch2 = checkbox("resonator.on_off[name:resonat]");
136 //reso = hgroup("resonator", bypass(switch2, resonator));
137
138 hs = component("HighShelf.dsp").hs;
139 process = bypass(switch2, resonator) : +(anti_denormal_ac) : pass : sbp : hs : distortion : *(drivegain1) : hs : sbp;
0 declare id "distortion1";
1 declare version "0.01";
2 declare author "brummer";
3 declare license "BSD";
4 declare copyright "(c)brummer 2008";
5
6 import("math.lib");
7 import("music.lib");
8 import("effect.lib");
9 import("filter.lib");
10 import("guitarix.lib");
11
12 //----------distortion---------
13
14 //-speaker emulation
15 sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
16 sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
17 switch1 = checkbox("on_off[name:low highcutoff]");
18 sbp = hgroup("low_highcutoff", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
19
20 //-low and highpass
21 lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
22 highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
23 switch = checkbox("on_off[name:low highpass]");
24 passo = +(anti_denormal_ac) : lowpass1(lowpassfreq) : highpass1(highpassfreq );
25 pass = hgroup("low_highpass", bypass(switch, passo));
26
27 //-distortion
28 drivelevel = vslider("level", 0.01, 0, 0.5, 0.01);
29 drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
30 drive = vslider("drive", 0.64, 0, 1, 0.01);
31 distortion = cubicnl(drive,drivelevel);
32
33 //-resonator
34 switch2 = checkbox("resonator.on_off[name:resonat]");
35 resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
36 with {
37 d = vslider("vibrato", 1, 0, 1, 0.01);
38 a = vslider("trigger", 0.12, 0, 1, 0.01);
39 };
40
41 process = bypass(switch2, resonator) : +(anti_denormal_ac) : pass : add_dc : sbp : component("HighShelf.dsp").hs : distortion : *(drivegain1) : component("HighShelf.dsp").hs : sbp;
0 import("guitarix.lib");
1
2 fuzzy = vslider("value[name:drive]", 1, 1, 10, 1);
3 process = fuzzy_tube(a,b,c,fuzzy)
4 with {
5 a = 4;
6 b = 4;
7 c = 0.125;
8 };
0 declare name "Echo";
1 declare category "Echo / Delay";
2
3 declare version "0.01";
4 declare author "brummer";
5 declare license "BSD";
6 declare copyright "(c)brummer 2008";
7
8 import("math.lib");
9 import("music.lib");
10 import("effect.lib");
11 import("filter.lib");
12
13 t = vslider("time", 1, 1, 2000, 1);
14 release = vslider("percent", 0, 0, 100, 0.1);
15
16 echo1 = +~(delay(131072, int(t*millisec)-1) * (release/100.0));
17 process = echo1;
0 declare id "eq";
1 declare license "BSD";
2 declare copyright "(c)GRAME 2006";
3
4 import("math.lib");
5 import("music.lib");
6 import("guitarix.lib");
7
8 //------------------------- Process --------------------------------
9
10
11 process = ifilter(vslider("Q31_25", 50, 1, 100, 1), 31.25, vslider("f31_25[tooltip:gain (dB) at 31.25 Hz]", 0, -50, 10, 0.1))
12 : ifilter(vslider("Q62_5", 50, 1, 100, 1), 62.5, vslider("f62_5 [tooltip:gain (dB) at 62.5 Hz]", 0, -50, 10, 0.1))
13 : ifilter(vslider("Q125", 50, 1, 100, 1), 125, vslider("f125 [tooltip:gain (dB) at 125 Hz]", 0, -50, 10, 0.1))
14 : ifilter(vslider("Q250", 50, 1, 100, 1), 250, vslider("f250 [tooltip:gain (dB) at 250 Hz]", 0, -50, 10, 0.1))
15 : ifilter(vslider("Q500", 50, 1, 100, 1), 500, vslider("f500 [tooltip:gain (dB) at 500 Hz]", 0, -50, 10, 0.1))
16 : ifilter(vslider("Q1k", 50, 1, 100, 1), 1000, vslider("f1k [tooltip:gain (dB) at 1 kHz]", 0, -50, 10, 0.1))
17 : ifilter(vslider("Q2k", 50, 1, 100, 1), 2000, vslider("f2k [tooltip:gain (dB) at 2 kHz]", 0, -50, 10, 0.1))
18 : ifilter(vslider("Q4k", 50, 1, 100, 1), 4000, vslider("f4k [tooltip:gain (dB) at 4 kHz]", 0, -50, 10, 0.1))
19 : ifilter(vslider("Q8k", 50, 1, 100, 1), 8000, vslider("f8k [tooltip:gain (dB) at 8 kHz]", 0, -50, 10, 0.1))
20 : ifilter(vslider("Q16k", 50, 1, 100, 1),16000, vslider("f16k [tooltip:gain (dB) at 16 kHz]", 0, -50, 10, 0.1))
21 ;
0
1 /* Expander unit. */
2
3 /* This is pretty much the same as compressor.dsp, but here the given ratio is
4 applied to *attenuate* levels *below* the threshold. */
5
6 declare name "Expander";
7 declare category "Guitar Effects";
8
9 declare description "expander unit";
10 declare author "Albert Graef";
11 declare version "1.0";
12
13 import("music.lib");
14
15 /* Controls. */
16
17 ratio = nentry("ratio", 2, 1, 20, 0.1);
18 threshold = nentry("threshold", -40, -96, 10, 0.1);
19 knee = nentry("knee", 3, 0, 20, 0.1);
20
21 attack = hslider("attack", 0.001, 0, 1, 0.001) : max(1/SR);
22 release = hslider("release", 0.1, 0, 10, 0.01) : max(1/SR);
23
24 t = 0.1;
25 g = exp(-1/(SR*t));
26 env = abs : *(1-g) : + ~ *(g);
27 rms = sqr : *(1-g) : + ~ *(g) : sqrt;
28 sqr(x) = x*x;
29
30 env2(x) = max(env(x));
31
32 expand(env) = level*(1-r)
33 with {
34 level = env : h ~ _ : linear2db : (threshold+knee-_) : max(0)
35 with {
36 h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
37 ga = exp(-1/(SR*attack));
38 gr = exp(-1/(SR*release));
39 };
40 p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
41 r = 1-p+p*ratio;
42 };
43
44 process(x) = (g(x)*x)
45 with {
46 g = env2(x) : expand : db2linear;
47 };
0 import("math.lib");
1
2 fold = ffunction(float fold(float,float), <math.h>, "");
3 ngate = fvariable(float ngate, <math.h>);
4
5 feedback = hslider("amp.feedback[name:Feedback]", 0, -1, 1, 0.01);
6 feedforward = hslider("amp.feedforward[name:Feedforward]", 0, -1, 1, 0.01);
7 threshold = hslider("amp.fuzz[name:fuzz]", 1, 0, 1, 0.01);
8 tmax = 1-pow(10,-6); // 0 is bad value when using sigmoid in fold
9
10 fforw(x) = x + feedforward * x''';
11 fbackw = (- : neg : *(ngate) : fold(min(tmax,threshold))) ~ (feedback * _'''');
12
13 process = fforw : fbackw <: _,_;
0 declare id "flanger";
1 declare name "Flanger";
2 declare category "Modulation";
3 declare license "BSD";
4
5 import("effect.lib");
6 import("guitarix.lib");
7 import("oscillator.lib");
8
9 flangerstereogx = *(level),*(level) : flangerstereoN(dmax,curdel1,curdel2,depth,fb,invert) // change to flanger_stereo for faust >= 0.9.27
10 with {
11 lfol = component("oscillator.lib").oscrs; // sine for left channel
12 lfor = component("oscillator.lib").oscrc; // cosine for right channel
13 dmax = 2048;
14 dflange = 0.001 * SR * hslider("flange delay [unit:ms]", 10, 0, 20, 0.01);
15 odflange = 0.001 * SR * hslider("flange delay offset [unit:ms]", 1, 0, 20, 0.01);
16 freq = hslider("LFO freq [unit:Hz]", 0.2, 0, 5, 0.01);
17 depth = hslider("depth", 1, 0, 1, 0.01);
18 fb = hslider("feedback gain", 0, 0, 1, 0.01);
19 invert = checkbox("invert[enum:linear|invert]");
20 level = hslider("level [unit:dB]", 0, -60, 10, 0.1) : db2linear;
21 curdel1 = odflange+dflange*(1 + lfol(freq))/2;
22 curdel2 = odflange+dflange*(1 + lfor(freq))/2;
23 };
24
25 process = flangerstereogx;
0 declare id "flanger_mono";
1 declare name "Flanger Mono";
2 declare category "Modulation";
3 declare license "BSD";
4
5 import("effect.lib");
6 import("guitarix.lib");
7 import("oscillator.lib");
8
9 flangermono(curdel)
10 = _<: _, (-:fdelay(2048,curdel)) ~ *(0.5) : _,
11 *(-1) : + : *(0.5);
12
13
14 flangermonogx = *(level):flangermono(curdel)
15 with {
16 lfol = component("oscillator.lib").oscrs;
17 dflange = 0.001 * SR * 10.0;
18 odflange = 0.001 * SR * 1.0;
19 freq = hslider("freq [unit:Hz]", 0.2, 0, 5, 0.01);
20 level = hslider("level [unit:dB]", 0, -60, 10, 0.1) : db2linear;
21 curdel = odflange+dflange*(1 + lfol(freq))/2;
22 };
23
24 wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
25 dry = 1 - wet;
26
27 process = _<:*(dry),(*(wet): flangermonogx ):>_;
0 declare name "Freeverb";
1 declare category "Reverb";
2
3 declare version "0.01";
4 declare author "brummer";
5 declare license "BSD";
6 declare copyright "(c)brummer 2008";
7
8 import("math.lib");
9 import("music.lib");
10 import("effect.lib");
11 import("filter.lib");
12
13 /*-----------------------------------------------
14 freeverb by "Grame"
15 -----------------------------------------------*/
16
17 // Filter Parameters
18
19 combtuningL1 = 1116;
20 combtuningL2 = 1188;
21 combtuningL3 = 1277;
22 combtuningL4 = 1356;
23 combtuningL5 = 1422;
24 combtuningL6 = 1491;
25 combtuningL7 = 1557;
26 combtuningL8 = 1617;
27
28 allpasstuningL1 = 556;
29 allpasstuningL2 = 441;
30 allpasstuningL3 = 341;
31 allpasstuningL4 = 225;
32
33 roomsizeSlider = vslider("RoomSize", 0.5, 0, 1, 0.025)*0.28 + 0.7;
34 dampslider = vslider("damp",0.5, 0, 1, 0.025);
35 combfeed = roomsizeSlider;
36 //wetslider = 0.5 + vslider("wet_dry[name:wet/dry]", 0, -0.5, 0.5, 0.1);
37 wet_dry = vslider("wet_dry[name:wet/dry]", 50, 0, 100, 1) : /(100);
38 dry = 1 - wet_dry;
39
40 // Comb and Allpass filters
41
42 allpass(dt,fb) = (_,_ <: (*(fb),_:+:@(dt)), -) ~ _ : (!,_);
43 comb(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb));
44
45 // Reverb components
46
47 monoReverb(fb1, fb2, damp, spread)
48 = _ <: comb(combtuningL1+spread, fb1, damp),
49 comb(combtuningL2+spread, fb1, damp),
50 comb(combtuningL3+spread, fb1, damp),
51 comb(combtuningL4+spread, fb1, damp),
52 comb(combtuningL5+spread, fb1, damp),
53 comb(combtuningL6+spread, fb1, damp),
54 comb(combtuningL7+spread, fb1, damp),
55 comb(combtuningL8+spread, fb1, damp)
56 +>
57 allpass (allpasstuningL1+spread, fb2)
58 : allpass (allpasstuningL2+spread, fb2)
59 : allpass (allpasstuningL3+spread, fb2)
60 : allpass (allpasstuningL4+spread, fb2)
61 ;
62
63 //----------------------------------------------------------------
64
65 fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
66 process = _<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))):>_;
0 /****************************************************************
1 ** helper definitions
2 */
3 bypass(switch, block) = _ <: select2(switch, _, block);
4 BP(block) = bypass(checkbox("ON"), block);
5
6 copysign = ffunction(float copysign(float,float), <math.h>, "");
7
8 anti_denormal = pow(10,-20);
9 no_denormal = pow(10,-15);
10 //add_dc = +(anti_denormal);
11 add_dc = +(anti_denormal);
12 anti_denormal_ac = 1 - 1' : *(anti_denormal) : + ~ *(-1);
13
14 smoothi(c) = *(1-c) : +~*(c);
15
16 clip(lo,hi) = min(hi) : max(lo);
17 sym_clip(thr) = clip(-thr,thr);
18
19 balance(b) = *(1 - max(0, b)), *(1 - max(0, -b));
20 wet_dry_mix(w, Fx) = _ <: _, Fx : balance(w) : +;
21
22
23 /****************************************************************
24 ** nonlinear functions
25 */
26
27 // from thesis of Ragnar Bendiksen (used in swh ladspa valve plugin)
28
29 valve = environment {
30 ex(x) = (1 - exp(-x));
31 nlim = 50; // exp(-nlim)+1 == 1, exp(nlim)/(exp(nlim)+1) == 1
32
33 tr(x) = select2(abs(x) > eps, tr_taylor(x), tr_func(max(-600,x))) with
34 {
35 eps = pow(10,-4);
36 tr_func(x) = select2(x < -nlim, x / ex(x), -x*exp(x));
37 tr_taylor(x) = 1 + x/2 + x*x/12;
38 };
39 df(x) = select2(abs(x) > eps, df_taylor(x), df_func(max(-600,x))) with
40 {
41 eps = pow(10,-4);
42 df_func(x) = select2(x < -nlim, 1/ex(x) - (x * exp(-x)) / (ex(x)*ex(x)), -x*exp(x));
43 df_taylor(x) = 0.5 + x/6 - x*x*x/180;
44 };
45 qd(dist, q, x) = dist * (x - q);
46 vt(dist, q, x) = (tr(qd(dist, q, x)) - tr(qd(dist, q, 0))) / dist;
47 vt_scaled(dist, q, x) = select2(dist*q > nlim, vt(dist, q, x) / df(qd(dist, q, 0)), vt_lim(dist, q, x)) with
48 {
49 bigval = pow(10,10);
50 f(dist, q, x) = (qd(dist, q, x)/(1 - exp(-qd(dist, q, x)))*exp(dist*q) - dist*q)/(dist*dist*q);
51 vt_lim(dist, q, x) = select2(dist*x > nlim, select2(dist*x < -nlim, f(dist, q, x), -1/dist), bigval);
52 };
53 vts(dist, q, x) = abs(x) : neg : vt_scaled(dist, q) : copysign(_, x);
54 vtu(dist, q, g) = vt_scaled(dist, q) : *(g) : neg : vt(dist, q) : neg;
55 vtu_(dist, q, g) = vt_scaled(dist, q) :neg : *(g) : vt_scaled(dist, q) : /(g) : neg;
56 };
57
58 saturate(t, x) = select2(abs(x) < t, x, v)
59 with {
60 sigmoid(x) = x * (1.5 - 0.5 * x * x);
61 sat(x) = t + (1 - t)*sigmoid((abs(x)-t)/((1-t)*1.5));
62 v = copysign(x, sat(x));
63 };
64
65 nonlin(a,b,c,x) = ((a * x - b * abs(x) * x) - x) * c;
66 nonlin1 = nonlin(2,1,0.5);
67
68
69 // simple triode circuit emulation
70
71 Ftube = ffunction(float Ftube(int,float), "valve.h", "");
72
73 TB_12AX7_68k = fconstant(int TUBE_TABLE_12AX7_68k, "valve.h");
74 TB_12AX7_250k = fconstant(int TUBE_TABLE_12AX7_250k, "valve.h");
75 TB_6V6_68k = fconstant(int TUBE_TABLE_6V6_68k, "valve.h");
76 TB_6V6_250k = fconstant(int TUBE_TABLE_6V6_250k, "valve.h");
77 TB_12AU7_68k = fconstant(int TUBE_TABLE_12AU7_68k, "valve.h");
78 TB_12AU7_250k = fconstant(int TUBE_TABLE_12AU7_250k, "valve.h");
79 TB_6DJ8_68k = fconstant(int TUBE_TABLE_6DJ8_68k, "valve.h");
80 TB_6DJ8_250k = fconstant(int TUBE_TABLE_6DJ8_250k, "valve.h");
81 TB_12AT7_68k = fconstant(int TUBE_TABLE_12AT7_68k, "valve.h");
82 TB_12AT7_250k = fconstant(int TUBE_TABLE_12AT7_250k, "valve.h");
83 TB_6C16_68k = fconstant(int TUBE_TABLE_6C16_68k, "valve.h");
84 TB_6C16_250k = fconstant(int TUBE_TABLE_6C16_250k, "valve.h");
85
86 tubestageF(tb,vplus,divider,fck,Rk,Vk0) = +(no_denormal) : tube : hpf with {
87 lpfk = lowpass(1,fck);
88 Rp = 100.0e3;
89 VkC = Vk0 * (Rp/Rk);
90 tube = (+ : -(Vk0) : Ftube(tb) : +(VkC-vplus)) ~ (*(Rk/Rp) :+(no_denormal) : lpfk) : /(divider);
91 hpf = highpass(1,31.0);
92 };
93
94 tubestage(tb,fck,Rk,Vk0) = tubestageF(tb,250.0,40.0,fck,Rk,Vk0);
95 tubestage130_10(tb,fck,Rk,Vk0) = tubestageF(tb,130.0,10.0,fck,Rk,Vk0);
96 tubestage130_20(tb,fck,Rk,Vk0) = tubestageF(tb,130.0,20.0,fck,Rk,Vk0);
97
98 /****************************************************************
99 ** Guitar tone stacks
100 ** values from CAPS plugin tonestack (based on work from D.T. Yeh
101 */
102 ts = environment {
103 k = *(1e3);
104 M = *(1e6);
105 nF = *(1e-9);
106 pF = *(1e-12);
107
108 /* Fender */
109
110 bassman = environment { /* 59 Bassman 5F6-A */
111 R1 = 250:k;
112 R2 = 1:M;
113 R3 = 25:k;
114 R4 = 56:k;
115 C1 = 250:pF;
116 C2 = 20:nF;
117 C3 = 20:nF;
118 };
119
120 twin = environment { /* 69 Twin Reverb AA270 */
121 R1 = 250:k;
122 R2 = 250:k;
123 R3 = 10:k;
124 R4 = 100:k;
125 C1 = 120:pF;
126 C2 = 100:nF;
127 C3 = 47:nF;
128 };
129
130 princeton = environment { /* 64 Princeton AA1164 */
131 R1 = 250:k;
132 R2 = 250:k;
133 R3 = 4.8:k;
134 R4 = 100:k;
135 C1 = 250:pF;
136 C2 = 100:nF;
137 C3 = 47:nF;
138 };
139
140 /* Marshall */
141
142 jcm800 = environment { /* 59/81 JCM-800 Lead 100 2203 */
143 R1 = 220:k;
144 R2 = 1:M;
145 R3 = 22:k;
146 R4 = 33:k;
147 C1 = 470:pF;
148 C2 = 22:nF;
149 C3 = 22:nF;
150 };
151 /* 90 JCM-900 Master 2100: same as JCM-800 */
152
153 jcm2000 = environment { /* 81 2000 Lead */
154 R1 = 250:k;
155 R2 = 1:M;
156 R3 = 25:k;
157 R4 = 56:k; /* a 10 k fixed + 100 k pot in series actually */
158 C1 = 500:pF;
159 C2 = 22:nF;
160 C3 = 22:nF;
161 };
162
163 /* parameter order is R1 - R4, C1 - C3 */
164 mlead = environment { /* 67 Major Lead 200 */
165 R1 = 250:k;
166 R2 = 1:M;
167 R3 = 25:k;
168 R4 = 33:k;
169 C1 = 500:pF;
170 C2 = 22:nF;
171 C3 = 22:nF;
172 };
173
174 m2199 = environment { /* undated M2199 30W solid state */
175 R1 = 250:k;
176 R2 = 250:k;
177 R3 = 25:k;
178 R4 = 56:k;
179 C1 = 250:pF;
180 C2 = 47:nF;
181 C3 = 47:nF;
182 };
183
184 /* Vox */
185 ac30 = environment { /* 59/86 AC-30 */
186 /* R3 is fixed (circuit differs anyway) */
187 R1 = 1:M;
188 R2 = 1:M;
189 R3 = 10:k;
190 R4 = 100:k;
191 C1 = 50:pF;
192 C2 = 22:nF;
193 C3 = 22:nF;
194 };
195 };
196
197 tonestack(tse) = 1/A0*iir((B0,B1,B2,B3),(A1/A0,A2/A0,A3/A0)) with {
198 C1 = tse.C1;
199 C2 = tse.C2;
200 C3 = tse.C3;
201 R1 = tse.R1;
202 R2 = tse.R2;
203 R3 = tse.R3;
204 R4 = tse.R4;
205
206 t = vslider("Treble", 0.5, 0, 1, 0.01);
207 m = vslider("Middle", 0.5, 0, 1, 0.01);
208 l = vslider("Bass", 0.5, 0, 1, 0.01) : (_-1)*3.4 : exp;
209
210 b1 = t*C1*R1 + m*C3*R3 + l*(C1*R2 + C2*R2) + (C1*R3 + C2*R3);
211
212 b2 = t*(C1*C2*R1*R4 + C1*C3*R1*R4) - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
213 + m*(C1*C3*R1*R3 + C1*C3*R3*R3 + C2*C3*R3*R3)
214 + l*(C1*C2*R1*R2 + C1*C2*R2*R4 + C1*C3*R2*R4)
215 + l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
216 + (C1*C2*R1*R3 + C1*C2*R3*R4 + C1*C3*R3*R4);
217
218 b3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
219 - m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
220 + m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
221 + t*C1*C2*C3*R1*R3*R4 - t*m*C1*C2*C3*R1*R3*R4
222 + t*l*C1*C2*C3*R1*R2*R4;
223
224 a0 = 1;
225
226 a1 = (C1*R1 + C1*R3 + C2*R3 + C2*R4 + C3*R4)
227 + m*C3*R3 + l*(C1*R2 + C2*R2);
228
229 a2 = m*(C1*C3*R1*R3 - C2*C3*R3*R4 + C1*C3*R3*R3 + C2*C3*R3*R3)
230 + l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
231 - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
232 + l*(C1*C2*R2*R4 + C1*C2*R1*R2 + C1*C3*R2*R4 + C2*C3*R2*R4)
233 + (C1*C2*R1*R4 + C1*C3*R1*R4 + C1*C2*R3*R4 + C1*C2*R1*R3 + C1*C3*R3*R4 + C2*C3*R3*R4);
234
235 a3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
236 - m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
237 + m*(C1*C2*C3*R3*R3*R4 + C1*C2*C3*R1*R3*R3 - C1*C2*C3*R1*R3*R4)
238 + l*C1*C2*C3*R1*R2*R4
239 + C1*C2*C3*R1*R3*R4;
240
241 c = 2*float(SR);
242
243 B0 = -b1*c - b2*pow(c,2) - b3*pow(c,3);
244 B1 = -b1*c + b2*pow(c,2) + 3*b3*pow(c,3);
245 B2 = b1*c + b2*pow(c,2) - 3*b3*pow(c,3);
246 B3 = b1*c - b2*pow(c,2) + b3*pow(c,3);
247 A0 = -a0 - a1*c - a2*pow(c,2) - a3*pow(c,3);
248 A1 = -3*a0 - a1*c + a2*pow(c,2) + 3*a3*pow(c,3);
249 A2 = -3*a0 + a1*c + a2*pow(c,2) - 3*a3*pow(c,3);
250 A3 = -a0 + a1*c - a2*pow(c,2) + a3*pow(c,3);
251 };
252
253 /****************************************************************
254 ** filter
255 */
256
257 //---------------------second order Parametric Equalizer---------
258 // filter(Q,F,G)
259 // Q : quality factor [1..100]
260 // F : frequency (Hz)
261 // G : gain [0..1]
262 //---------------------------------------------------------------
263 // from "bandfilter.dsp" in the faust2pd distribution
264 // which was released under the BSD license.
265
266 eqfilter(Q,F,G) = TF2( (1 + K/Q + K*K) / D,
267 2 * (K*K - 1) / D,
268 (1 - K/Q + K*K) / D,
269 2 * (K*K - 1) / D,
270 (1 - V*K/Q + K*K) / D
271 )
272 with {
273 V = db2linear(G);
274 K = tan(PI*F/SR);
275 D = 1 + V*K/Q + K*K;
276 };
277
278
279 ifilter(Q,F,G) = eqfilter(Q,F,-G);
280
281
282 /****************************************************************
283 ** backward compatible faust library definitions, may removed when
284 ** the good versions in wafscript where updated
285 */
286
287
288 //----- Flanging effect renamed in faust-0.9.27 from
289 //----- flangermono -> flanger_mono
290 //----- flangerstereo -> flanger_stereo
291
292 flangermonoN(dmax,curdel,depth,fb,invert)
293 = _ <: _, (-:fdelay(dmax,curdel)) ~ *(fb) : _,
294 *(select2(invert,depth,0-depth))
295 : + : *(0.5);
296
297 flangerstereoN(dmax,curdel1,curdel2,depth,fb,invert)
298 = flangermonoN(dmax,curdel1,depth,fb,invert),
299 flangermonoN(dmax,curdel2,depth,fb,invert);
300
301 //----- Moog "Voltage Controlled Filter" (VCF)
302 //----- filter renamed in faust-0.9.27 from
303 //----- moogvcf -> moog_vcf
304
305 import("filter.lib");
306
307 moogvcfN(Q,fr) = (+ : pole(p) : pole(p)
308 : pole(p) : pole(p) : *(scale(p))) ~ *(mk)
309 with {
310 p = 1.0 - fr * 2.0 * PI / SR; // approx for fr << SR
311 scale(p) = pow(1-p,4);
312 mk = 0-Q;
313 };
314
315
316 /****************************************************************
317 ** building blocks
318 */
319 fuzzy_tube(a,b,c,fuzzy) = _ <: _ + nonlin(a,b,c) * fuzzy * 0.5 : sym_clip(0.7);
320
321
322 /****************************************************************
323 ** parameter definitions for use in alternative module
324 */
325
326 ampctrl = environment {
327 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
328 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
329 preamp = vslider(".amp2.stage1.Pregain[alias]",-6,-20,20,0.1) : db2linear : smoothi(0.999);
330 gain1 = vslider(".amp2.stage2.gain1[alias]", -6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
331 };
332
333 crybaby_ctrl = environment {
334 level = vslider(".crybaby.level[alias]", 0.1, 0, 1, 0.01);
335 wah = vslider(".crybaby.wah[alias]", 0, 0, 1, 0.01);
336 wet_dry = vslider(".crybaby.wet_dry[name:wet/dry][alias]", 100, 0, 100, 1) : /(100);
337 };
338
339 balance_ctrl = environment {
340 bal = vslider(".amp.balance[name:Balance][alias]", 0, -1, 1, 0.1) : smoothi(0.999);
341 };
342
343 vibe_lfo_ctrl = environment {
344 freq = vslider(".univibe.freq[name:Tempo][tooltip:LFO frequency (Hz)][alias]", 4.4, 0.1, 10, 0.1) * 16;
345 phase = vslider(".univibe.stereo[name:St.df][tooltip:LFO phase shift between left and right channels][alias]", 0.11, -0.5, 0.5, 0.01) * 2 * PI;
346 };
347
348 vibe_mono_lfo_ctrl = environment {
349 freq = vslider(".univibe_mono.freq[name:Tempo][tooltip:LFO frequency (Hz)][alias]", 4.4, 0.1, 10, 0.1) * 16;
350 };
0 declare id "ampmodul";
1 declare name "Postamp";
2 declare category "Distortion";
3 declare groups "amp2.stage1[Postamp Tube1], amp2.stage2[Postamp Tube2]";
4
5 import("guitarix.lib");
6
7 feedback = hslider("feedback", 0, -1, 1, 0.01);
8 fbackw = (- : neg ) ~ (feedback * _'''');
9
10 feedbac = hslider("feedbac", 0, -1, 1, 0.01);
11 fback = (- : neg ) ~ (feedbac * _'''');
12
13 preamp = (vslider(".ampmodul.amp2.stage1.tube1",6,-20,20,0.1):db2linear : smoothi(0.999));
14 gain1 = vslider(".ampmodul.amp2.stage2.tube2", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
15 gain = vslider("level", -20, -40, 4, 0.1) : db2linear : smoothi(0.999);
16
17 wet_dry = vslider("wet_dry", 0, -1, 1, 0.1);
18 balanc(b) = *(1 - max(0, b)), *(1 - max(0, -b));
19 wet_dry_mx(w, Fx) = _ <: (_:fback), Fx : balanc(w) : +;
20
21 process = wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw)), wet_dry_mx(wet_dry, _:(*(gain) : component("gxamp2.dsp").tubec(preamp,gain1):fbackw));
0 declare id "amp";
1 declare name "Amplifier";
2
3 import("music.lib");
4 import("guitarix.lib");
5
6 gain = vslider(".amp.out_amp[name:Level]", 0, -20, 4, 0.1) : db2linear : smoothi(0.999);
7 process = *(gain);
0 // Alternate ampout definion for ladspa mono plugin
1 // This plugin is included instead of gx_ampout, and without
2 // the PGN_GUI flag. This means no automatic creation of
3 // the on_off parameter (its always on), so we can define
4 // it here. It will be of type float instead of bool, but
5 // this doesn't matter for data read from preset files.
6
7 declare groups ".amp";
8
9 import("music.lib");
10 import("guitarix.lib");
11
12 gain = value : db2linear : smoothi(0.999) with {
13 slider1 = vslider(".amp.out_amp[name:Level]", 0, -20, 4, 0.1);
14 on_off = checkbox(".amp.on_off[name:use Level]");
15 slider2 = vslider(".amp.out_ladspa[name:Ladspa Level]", 0, -20, 20, 0.1);
16 value = select2(on_off, slider2, slider1 + slider2);
17 };
18
19 process = *(gain);
0 declare name "Redeye Big Chump";
1 declare category "Amplifier";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8
9 //Try this for transformer
10 // Dual channels has lowpass/hipass each channel with slightly different values
11 // and a balance control so that can dial in some form of imbalance
12
13 trannie = coil1,coil2:>_ with {
14 coil1 = lowpass( 1, ( 8075 ) ):highpass( 1, 84):*(0.98) ;
15 coil2 = lowpass( 1, 8925 ):highpass( 1, 76) ;
16 };
17 //tubestage(TB_12AX7_250k,194.0,820.0,0.840703)
18 //(TB_12AX7_68k,86.0,2700.0,1.581656)
19 // Now need a transformer emulation
20 // 2 parts - transformer/tube interaction and transformer/speaker interaction
21
22 // Note that we seem to have far too much gain for use as a plugin
23 // Well before we get decent guitar sounds Ardour has run out of headroom
24 // Have to set track fader to very low level....
25
26 process = stage1:tone:*(gain):stage2:*(volume):amp with{
27 //process = stage1:tone:*(gain):stage2:*(volume):amp:*(atten) with{
28
29 gain = vslider("Gain[0][alias][style:knob]",0,-24,10,0.1) : db2linear : smoothi(0.999);
30
31 tone = component("bigmuff.dsp").bigmuff ;
32 volume = vslider("Volume[2][alias][style:knob]",0,-24,6,0.1) : db2linear :smoothi(0.999);
33 // Look into these so we can more accurately copy PP 6V6 design
34 pp1 = tubestage(TB_6V6_250k,60.0,822.0,1.130462);
35 pp2 = tubestage(TB_6V6_250k,60.0,818.0,1.130462);
36 // This splits positive and negative signals and sends each to different valves
37 positive(x) = x * ( x >= 0.0 ) ;
38 negative(x) = x * ( x <= 0.0 ) ;
39 stage1 = tubestage(TB_12AX7_68k,40.0,2700.0,1.83);
40 stage2 = lowpass( 1, 6531):tubestage(TB_12AX7_250k,40.0,2700.0,1.83) ;
41 driver1 = lowpass( 1, 6531):tubestage(TB_12AU7_250k,132.0,1525.0,1.214285);
42 driver2 = lowpass( 1, 6531):tubestage(TB_12AU7_250k,132.0,1475.0,1.204285);
43
44 feedback = *(checkbox("feedback") ):*(0.5);
45
46 // This is bodge for transformer simple low and high pass roll off
47
48 // pushpull = (driver1:positive:pp1),(driver1:negative:pp2) ;
49 pushpull = (positive:pp1),(negative:pp2) ;
50
51 amp = (+:_<:pushpull:trannie:>_)~feedback ;
52 atten = 0.5;
53 cabinet = lowpass(2,5500):peak_eq(-15.0,400.0,600):highpass(2,80);
54
55 };
0 declare id "Redeye Chump"; // in amp tube selector
1 declare name "Redeye Chumo";
2 declare category "Amplifier";
3
4 import("music.lib");
5 import("filter.lib");
6 import("effect.lib");
7 import("guitarix.lib");
8
9
10
11 /****************************************************************
12 ** Tube Preamp Emulation stage 1 - 2
13 **
14 ** SHP : Experiment with the presence control as a feedback loop
15 ** Created a loop with high shelf filter cutting around 1khz and up
16 ** pot controls the amount of cut 0 > -70dB
17 ** If feedback loop is inverted get mad distortion and feedback!
18 ** With no inversion get required effect so guess the combination
19 ** of filter and processing delay may be shifting phase some
20 **
21 ** To do :
22 ** Play with amp structure say a champ clone
23 ** tube:eq:tube:tube
24 ** 12AX7:??:12AX7:6V6
25 **
26 ** Move feedback loop in more complex amp around driver and power tube
27 ** 12AX7:EQ:(12AX7:6V6)~FEEDBACK
28 */
29
30 // Note that we seem to have far too much gain for use as a plugin
31 // Well before we get decent guitar sounds Ardour has run out of headroom
32 // Have to set track fader to very low level....
33
34 process = stage1:tone:*(preamp):( + : stage2:transformer )~feedback with {
35 preamp = vslider("Gain[alias][style:knob]",0,-20,20,0.1):db2linear: smoothi(0.999);
36 stage1= tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) ;
37 tone = component("bigmuff.dsp").bigmuff ;
38 // This range 0.1 -> 10
39 volume = vslider("Volume[alias][style:knob]",0,-20,10,0.1):db2linear:smoothi(0.999);
40 // Ideally attenuation should be proportional to the volume so that we achieve
41 // a kind of compression if volume > 0dB
42 //atten = 0.5; // Seems to need at least this much!
43 atten = 1-( volume/20);
44
45 stage2 = lowpass(1,6531.0):tubestage(TB_12AX7_250k,100.0,1500.0,1.204285):*(volume):lowpass(1,6531.0):tubestage(TB_6V6_250k,120.0,820.0,1.130462):*(atten);
46 transformer = lowpass( 1, 6531 ):highpass( 1, 120) ;
47 feedback = *(checkbox("feedback") ):high_shelf( 3, 6531 ): *(-0.5);
48 cabinet = lowpass(2,5500):peak_eq(-15.0,400.0,400):highpass(2,120);
49
50 };
51
0 declare name "Multi Band Distortion";
1 declare shortname "Distortion";
2 declare category "Distortion";
3 declare groups "resonator[Distortion resonator]";
4 declare version "0.01";
5 declare author "brummer";
6 declare license "BSD";
7 declare copyright "(c)brummer 2008";
8
9 import("math.lib");
10 import("music.lib");
11 import("effect.lib");
12 import("filter.lib");
13 import("guitarix.lib");
14 import("maxmsp.lib");
15
16 F = nentry("split_low_freq", 250, 20, 600, 10);
17 F1 = nentry("split_middle_freq", 650, 600, 1250, 10);
18 F2 = nentry("split_high_freq", 1250, 1250, 12000, 10);
19
20 /**********************************************************************
21 *** this part is included here for backward compatibility from 0.9.27 to
22 *** 0.9.24
23 ***********************************************************************/
24
25 //------------------------------ count and take --------------------------------------
26
27 countN ((xs, xxs)) = 1 + countN(xxs);
28 countN (xx) = 1;
29
30 takeN (1, (xs, xxs)) = xs;
31 takeN (1, xs) = xs;
32 takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
33
34 //------------------------------ low/high-passfilters --------------------------------------
35
36 tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
37
38 tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
39 with {
40 conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
41 conv2(k0,k1,x) = k0*x + k1*x';
42 sub(x,y) = y-x;
43 };
44
45 tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
46 with {
47 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
48 d = a0 + c;
49 b1d = (b0 - b1*c) / d;
50 b0d = (b0 + b1*c) / d;
51 a1d = (a0 - c) / d;
52 };
53
54 tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
55 with {
56 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
57 csq = c*c;
58 d = a0 + a1 * c + csq;
59 b0d = (b0 + b1 * c + b2 * csq)/d;
60 b1d = 2 * (b0 - b2 * csq)/d;
61 b2d = (b0 - b1 * c + b2 * csq)/d;
62 a1d = 2 * (a0 - csq)/d;
63 a2d = (a0 - a1*c + csq)/d;
64 };
65
66 lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
67 highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
68 lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
69 with {
70 lphpr(s,0,N,fc) = _;
71 lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
72 lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
73 parity = N % 2;
74 S = (O-parity)/2; // current section number
75 a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
76 w1 = 2*PI*fc;
77 };
78 };
79
80 //------------------------------ analyzer --------------------------------------
81 analyzern(O,lfreqs) = _ <: bsplit(nb) with
82 {
83 nb = countN(lfreqs);
84 fc(n) = takeN(n, lfreqs);
85 lp(n) = lowpassN(O,fc(n));
86 hp(n) = highpassN(O,fc(n));
87 bsplit(0) = _;
88 bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
89 };
90
91 analyzerN(lfreqs) = analyzern(3,lfreqs);
92
93 filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
94 {
95 nb = count(lfreqs);
96 fc(n) = take(n, lfreqs);
97 ap(n) = highpass_plus_lowpass(O,fc(n));
98 delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
99 apchain(0) = _;
100 apchain(i) = ap(i) : apchain(i-1);
101 };
102
103 filterbankN(lfreqs) = filterbankn(3,lfreqs);
104
105 /**********************************************************************
106 *** end for backward compatibility from 0.9.27 to
107 *** 0.9.24 , it could removed when switch completly to > 0.9.27
108 ***********************************************************************/
109
110 //----------distortion---------
111
112 //-distortion
113 drivelevel = vslider("level", 0.0, 0, 0.5, 0.01);
114 drivegain1 = vslider("gain", 2, -10, 10, 0.1)-10 : db2linear : smoothi(0.999);
115 low_gain = vslider("low_gain[name:low]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
116 high_gain = vslider("high_gain[name:high]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
117 middle_gain_l = vslider("middle_l_gain[name:middle l.]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
118 middle_gain_h = vslider("middle_h_gain[name:middle h.]", 10, -10, 20, 0.1)-10 : db2linear : smoothi(0.999);
119 drive = vslider("drive", 0.64, 0, 1, 0.01);
120 drive1 = vslider("low_drive[name:low]", 1, 0, 1, 0.01)*drive;
121 drive2 = vslider("high_drive[name:high]", 1, 0, 1, 0.01)*drive;
122 drive3 = vslider("middle_l_drive[name:middle l.]", 1, 0, 1, 0.01)*drive;
123 drive4 = vslider("middle_h_drive[name:middle h.]", 1, 0, 1, 0.01)*drive;
124 distortion1 = _:cubicnl(drive1,drivelevel): *(low_gain);
125 distortion2 = _:cubicnl(drive2,drivelevel) : *(high_gain);
126 distortion3 = _:cubicnl(drive3,drivelevel) : *(middle_gain_l);
127 distortion4 = _:cubicnl(drive4,drivelevel) : *(middle_gain_h);
128 distortion = lowpassN(2,15000.0): highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>lowpass(1,6531.0);
129
130 //-resonator
131 resonator = (+ <: (delay(4096, d-1) + delay(4096, d)) / 2) ~ *(1.0-a)
132 with {
133 d = vslider("vibrato", 1, 0, 1, 0.01);
134 a = vslider("trigger", 0.12, 0, 1, 0.01);
135 };
136
137 switch2 = checkbox("resonator.on_off[name:resonat]");
138 //reso = hgroup("resonator", bypass(switch2, resonator));
139 moving_filter(x) = (x+x'+x'')/3;
140
141 wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
142 dry = 1 - wet;
143
144 process_dist = bypass(switch2, resonator) : +(anti_denormal_ac) : distortion : *(drivegain1) ;
145
146 process = _<:*(dry),(*(wet): process_dist):>_;
0 declare id "feedback";
1 declare name "Feedback";
2 declare category "Tone control";
3
4 import("guitarix.lib");
5
6 feedback = hslider("feedback", 0, -1, 1, 0.01);
7 fbackw = (- : neg ) ~ (feedback * _'''');
8
9
10 wet = vslider("wet_dry", 100, 0, 100, 1) : /(100);
11 dry = 1 - wet;
12
13 process = _<:*(dry),(*(wet): fbackw ):>_;
14
15
0 declare id "flanger_mono_gx";
1 declare name "Flanger GX";
2 declare category "Modulation";
3
4 h_flanger(dmax, curdel, fb, wet) = _ <: _, (dly : (+:dly)~*(fb)) : mix with {
5 dly = component("music.lib").fdelay(dmax/2, curdel/2);
6 mix = *(2-wet), _*(wet) : +;
7 };
8
9 flanger(dmax, curdel, fb, wet) = _ <: _, (+:dly)~*(fb) : mix with {
10 dly = component("music.lib").fdelay(dmax, curdel);
11 mix = *(2-wet), _*(wet) : +;
12 };
13
14 process = h_flanger(dmax, curdel, fb, wet1) :
15 flanger( dmax, curdel, -fb, wet2) :
16 *(0.25) with {
17 SR = component("math.lib").SR;
18 dflange = 0.001 * SR * hslider("width[name:Width]", 5.0, 0, 10, 0.01);
19 odflange = 0.001 * SR * hslider("depth[name:Depth]", 0.5, 0, 5, 0.01);
20 dmax = 2048; // > max(dflange+odflange) at rate 96000
21 freq = hslider("freq[log][name:Speed][unit:Hz]", 0.2, 0.05, 10, 1.06);
22 fb = hslider("feedback[name:Feedback]", -0.707, -0.99, 0.99, 0.01) * (2+abs(mix))/3;
23 lfo = component("oscillator.lib").oscrs;
24 curdel = odflange+dflange*(1+lfo(freq))/2;
25 //curdel = hslider("delay", 20, 0, 400, 0.1);
26 wet = hslider("wet[name:Wet]", 100, 0, 100, 1)/100;
27 mix = hslider("mix[name:Mix]", 0, -1, 1, 0.1);
28 wet1 = wet*min(1,1+mix);
29 wet2 = wet*min(1,1-mix);
30 };
0 import("music.lib");
1 import("guitarix.lib");
2
3 gain = vslider(".amp.out_master[name:Level]", 0, -50, 4, 0.1) : db2linear : smoothi(0.999);
4 process = *(gain), *(gain);
0 // Alternate gx_outputlevel definion for ladspa stereo plugin
1
2 declare groups ".amp";
3
4 import("music.lib");
5 import("guitarix.lib");
6
7 gain = (slider1 + slider2) : db2linear : smoothi(0.999) with {
8 slider1 = vslider(".amp.out_master[name:Level]", 0, -50, 4, 0.1);
9 slider2 = vslider(".amp.out_master_ladspa[name:Ladspa Level]", 0, -20, 20, 0.1);
10 };
11
12 process = *(gain), *(gain);
0 // Yet another tube preamp experiment
1 // So far so good :
2 // Bright bypass must not do zero division
3 // Look at actual gain of tube stages in real preamp
4 // and maybe adjust stage1 outpu to reflect as at present with gain at 0dB get very
5 // little distortion/overload
6 // Also look at relative loss in tonestack
7 // stage1 gain is 30dB-35dB in reality
8 // tonestack takes around 12dB off in central position
9 // So stage1 effectively should boost by 18-23dB but in effect does only 3dB
10 // So to accuratley model the overload of next stage would need a boost of around
11 // 15-20dB at this point x 5.6 -> x10
12 // Would then need to attenuate final output to compensate ( actual preamp has 60dB gain! )
13 import("music.lib");
14 import("filter.lib");
15 import("effect.lib");
16 import("guitarix.lib");
17
18 // Based on simple Alembic F-2B vstudio preamp
19 // 2 sectionos of 12AX7 together with tonestack and volume
20 // This is an identical circuit apart from coupling caps whcih could do with filters
21 // 1st cathode cap gives aroudn 2Hz !
22 // Coupling cap sat end gives cutoff 1.6Hz!
23 // So only reason to do is to eliminate low frequency rubbish
24
25
26 studiopre( tone, gain ) = stage1:*(10):tone:gain:stage2 with{
27 //studiopre = volume with{
28 stage1 = tubestage(TB_12AX7_68k,2.1,1500.0,1.204541) ; // Gain 2.9 2nd -29.8 3rd -26.24
29 stage2 = tubestage(TB_12AX7_250k,2.1,1500.0,1.204285) ; // Gain 2.41 2nd -34.34 3rd -23.36
30
31 };
32
33 process =studiopre( tone_l,gain_l) with{
34 volume_l = vslider("Volume_L[alias][style:knob]",5,0,10,0.1)/10;
35 // In actuall amp is Fender/marshall type B/M/T tone set
36 // Look at adding tonestack in dsp.
37 // Does not work for stereo as the slider are predefined
38 // need to find a way of loadin 2
39 tstack_l = component("tonestack.dsp");
40 tone_l = tstack_l[tse=tstack_l.ts.fender_default;
41 t = vslider("Treble_L[alias]", 0.5, 0, 1, 0.01);
42 m = vslider("Middle_L[alias]", 0.5, 0, 1, 0.01);
43 l = vslider("Bass_L[alias]", 0.5, 0, 1, 0.01) : (_-1)*3.4 : exp;
44 ] ;
45 // Attempt bright switch - bypass high frequencies around gain control
46 // Important that this may only work up to 0dB
47 // Note tried to emulate actual circuit so cutoff frequency varies with volume pot
48 // In effect -3dB is when reactance of capacitor equals pot value
49 // use equation freq = 160/( gain * 0.12 ) yo get -3dB cutoff
50 // Assuming 1M pot and 120pF cap
51 // Must avoid div by zero
52 // Seems to cause pros when gain less than 0.1
53 freq_l = 160/(0.12 * ( volume_l+0.1) );
54 bright_l = *(checkbox("bright_l")):highpass( 1, freq_l ) ;
55 gain_l = _<:bright_l,*(volume_l):>_ ;
56 };
0 // Yet another tube preamp experiment
1 // So far so good :
2 // Bright bypass must not do zero division
3 // Look at actual gain of tube stages in real preamp
4 // and maybe adjust stage1 outpu to reflect as at present with gain at 0dB get very
5 // little distortion/overload
6 // Also look at relative loss in tonestack
7 // stage1 gain is 30dB-35dB in reality
8 // tonestack takes around 12dB off in central position
9 // So stage1 effectively should boost by 18-23dB but in effect does only 3dB
10 // So to accuratley model the overload of next stage would need a boost of around
11 // 15-20dB at this point x 5.6 -> x10
12 // Would then need to attenuate final output to compensate ( actual preamp has 60dB gain! )
13 import("music.lib");
14 import("filter.lib");
15 import("effect.lib");
16 import("guitarix.lib");
17
18 // Based on simple Alembic F-2B vstudio preamp
19 // 2 sectionos of 12AX7 together with tonestack and volume
20 // This is an identical circuit apart from coupling caps whcih could do with filters
21 // 1st cathode cap gives aroudn 2Hz !
22 // Coupling cap sat end gives cutoff 1.6Hz!
23 // So only reason to do is to eliminate low frequency rubbish
24
25 //studiopre = stage1:*(10):tone:volume:*(0.1) with{
26 studiopre( tone, gain ) = stage1:*(10):tone:gain:stage2 with{
27 //studiopre = volume with{
28 stage1 = tubestage(TB_12AX7_68k,2.1,1500.0,1.204541) ; // Gain 2.9 2nd -29.8 3rd -26.24
29 stage2 = tubestage(TB_12AX7_250k,2.1,1500.0,1.204285) ; // Gain 2.41 2nd -34.34 3rd -23.36
30
31 };
32
33 process =studiopre( tone_l,gain_l),studiopre(tone_r, gain_r) with{
34 //process =studiopre( tone_l,volume_l) with{
35 volume_l = vslider("Volume_L[alias][style:knob]",5,0,10,0.1)/10;
36 volume_r = vslider("Volume_R[alias][style:knob]",5,0,10,0.1)/10;
37 // In actuall amp is Fender/marshall type B/M/T tone set
38 // Look at adding tonestack in dsp.
39 // Does not work for stereo as the slider are predefined
40 // need to find a way of loadin 2
41 tstack_l = component("tonestack.dsp");
42 tone_l = tstack_l[tse=tstack_l.ts.fender_default;
43 t = vslider("Treble_L[alias]", 0.5, 0, 1, 0.01);
44 m = vslider("Middle_L[alias]", 0.5, 0, 1, 0.01);
45 l = vslider("Bass_L[alias]", 0.5, 0, 1, 0.01) : (_-1)*3.4 : exp;
46 ] ;
47 tstack_r = component("tonestack.dsp");
48 tone_r = tstack_r[tse=tstack_r.ts.fender_default;
49 t = vslider("Treble_R[alias]", 0.5, 0, 1, 0.01);
50 m = vslider("Middle_R[alias]", 0.5, 0, 1, 0.01);
51 l = vslider("Bass_R[alias]", 0.5, 0, 1, 0.01) : (_-1)*3.4 : exp;
52 ] ;
53 // Attempt bright switch - bypass high frequencies around gain control
54 // Important that this may only work up to 0dB
55 // Note tried to emulate actual circuit so cutoff frequency varies with volume pot
56 // In effect -3dB is when reactance of capacitor equals pot value
57 // use equation freq = 160/( gain * 0.12 ) yo get -3dB cutoff
58 // Assuming 1M pot and 120pF cap
59 // Must avoid div by zero
60 // Seems to cause pros when gain less than 0.1
61 freq_l = 160/(0.12 * ( volume_l+0.1) );
62 bright_l = *(checkbox("bright_l")):highpass( 1, freq_l ) ;
63 gain_l = _<:bright_l,*(volume_l):>_ ;
64 freq_r = 160/(0.12 * ( volume_r+0.1) );
65 bright_r = *(checkbox("bright_r")):highpass( 1, freq_r ) ;
66 gain_r = _<:bright_r,*(volume_r):>_ ;
67 };
0 declare id "Redeye Vibro Chump"; // in amp tube selector
1 declare name "Redeye Vibro Chumo";
2 declare category "Amplifier";
3
4 import("music.lib");
5 import("filter.lib");
6 import("oscillator.lib");
7 import("effect.lib");
8 import("guitarix.lib");
9
10
11
12 /****************************************************************
13 ** Tube Preamp Emulation stage 1 - 2
14 **
15 ** SHP : Experiment with the presence control as a feedback loop
16 ** Created a loop with high shelf filter cutting around 1khz and up
17 ** pot controls the amount of cut 0 > -70dB
18 ** If feedback loop is inverted get mad distortion and feedback!
19 ** With no inversion get required effect so guess the combination
20 ** of filter and processing delay may be shifting phase some
21 **
22 ** To do :
23 ** Play with amp structure say a champ clone
24 ** tube:eq:tube:tube
25 ** 12AX7:??:12AX7:6V6
26 **
27 ** Move feedback loop in more complex amp around driver and power tube
28 ** 12AX7:EQ:(12AX7:6V6)~FEEDBACK
29 */
30
31 /*
32 ** Model of a vactrol tremolo unit by "transmogrify"
33 ** c.f. http://sourceforge.net/apps/phpbb/guitarix/viewtopic.php?f=7&t=44&p=233&hilit=transmogrifox#p233
34 ** http://transmogrifox.webs.com/vactrol.m
35 */
36 /* vactrol model */
37
38 R1 = 2700;
39 Ra = 1e6;
40 Rb = 300;
41 b = exp(log(Ra)/log(Rb)) - exp(1);
42 dTC = 0.06;
43 minTC = log(0.005/dTC);
44
45 cds = ((_ <: _,_),_ : _+(1-alpha)*_) ~ (_<:*(alpha)) with {
46 iSR = 1/SR;
47 dRC = dTC * exp(*(minTC));
48 alpha = 1 - iSR / (dRC + iSR);
49 };
50
51 vactrol = pow(_,1.9) : cds : *(b) + exp(1) : exp(log(Ra)/log) : R1/(_ + R1);
52
53
54 /* triangle oscillator (not bandlimited, frequency is approximate) */
55
56 trianglewave(freq) = _ ~ (_ <: _ + hyst) : /(periodsamps) with {
57 if(c,t,e) = select2(c,e,t);
58 hyst(x) = if(_ > 0, 2 * (x < periodsamps) - 1, 1 - 2 * (x > 0)) ~ _;
59 periodsamps = int(SR / (2*float(freq)));
60 };
61
62 /* tremolo unit, using triangle or sine oscillator as lfo */
63
64 tremolo(freq, depth) = lfo * depth + 1 - depth : vactrol with {
65 sine(freq) = (oscs(freq) + 1) / 2 : max(0); // max(0) because of numerical inaccuracy
66 SINE=checkbox("SINEWAVE[enum:triangle|sine]");
67 lfo = select2(SINE, trianglewave(freq), sine(freq));
68 };
69
70 effect = (tremolo(vslider("speed[style:knob]",5,0.1,10,0.1),vslider("intensity[style:knob]",5,0,10,0.1)/10));
71
72
73 // After some playing it seems that tubestage() phase inverts
74 // so if presence is wrapped around odd number of tubestages no need to reverse
75 // if even then we need to reverse
76
77 process = stage1:tone:*(preamp):( + : stage2:transformer )~feedback with {
78 preamp = vslider("Gain[alias][style:knob]",0,-20,20,0.1):db2linear: smoothi(0.999);
79 stage1= tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) ;
80 tone = component("bigmuff.dsp").bigmuff ;
81 // This range 0.1 -> 10
82 volume = vslider("Volume[alias][style:knob]",0,-20,10,0.1):db2linear:smoothi(0.999);
83 // Ideal attenuation is :
84 // master -20 -> 0 NONE
85 // master 0 - > 20 Either 0.75 or 0.5
86 // How to do in Faust!
87 atten = 0.5; // Seems to need at least this much!
88 stage2 = lowpass(1,6531.0):tubestage(TB_12AX7_250k,100.0,1500.0,1.204285):*(volume):lowpass(1,6531.0):*(effect):tubestage(TB_6V6_250k,120.0,820.0,1.130462):*(atten);
89 transformer = lowpass( 1, 6531 ):highpass( 1, 120) ;
90 feedback = *(checkbox("feedback") ):high_shelf( 3, 6531 ): *(-0.5);
91 cabinet = lowpass(2,5500):peak_eq(-15.0,400.0,400):highpass(2,120);
92
93 };
94
95
0 // this code is copied from faust effect.lib and
1 // some parameter texts and defaults changed
2
3 declare id "zita_rev1";
4 declare name "Zita Rev1";
5 declare category "Reverb";
6
7 import("filter.lib");
8
9 process(x,y) = component("effect.lib").zita_rev1_stereo(rdel,f1,f2,t60dc,t60m,fsmax,x,y)
10 : out_eq : dry_wet(x,y) : out_level
11 with {
12
13 fsmax = 48000.0; // highest sampling rate that will be used
14
15 fdn_group(x) = hgroup(
16 "zita_rev1[name:Zita_Rev1] [tooltip: ~ ZITA REV1 FEEDBACK DELAY NETWORK (FDN) & SCHROEDER ALLPASS-COMB REVERBERATOR (8x8). See Faust's effect.lib for documentation and references]", x);
17
18 in_group(x) = fdn_group(hgroup("input[name:Input]", x));
19
20 rdel = in_group(vslider("in_delay[name:In Delay] [unit:ms] [style:knob]
21 [tooltip: Delay in ms before reverberation begins]",
22 60,20,100,1));
23
24 freq_group(x) = fdn_group(hgroup("decay_times[name:Decay Times in Bands]", x));
25
26 f1 = freq_group(vslider("lf_x[name:Freq X] [unit:Hz] [style:knob]
27 [tooltip: Crossover frequency (Hz) separating low and middle frequencies]",
28 200, 50, 1000, 1));
29
30 t60dc = freq_group(vslider("low_rt60[name:Low] [unit:s] [style:knob]
31 [style:knob] [tooltip: T60 = time (in seconds) to decay 60dB in low-frequency band]",
32 3, 1, 8, 0.1));
33
34 t60m = freq_group(vslider("mid_rt60[name:Mid] [unit:s] [style:knob]
35 [tooltip: T60 = time (in seconds) to decay 60dB in middle band]",
36 2, 1, 8, 0.1));
37
38 f2 = freq_group(vslider("hf_damping[name:HF Damping] [unit:Hz] [style:knob]
39 [tooltip: Frequency (Hz) at which the high-frequency T60 is half the middle-band's T60]",
40 6000, 1500, 0.49*fsmax, 1));
41
42 out_eq = pareq_stereo(eq1f,eq1l,eq1q) : pareq_stereo(eq2f,eq2l,eq2q);
43 // Zolzer style peaking eq (not used in zita-rev1) (filter.lib):
44 // pareq_stereo(eqf,eql,Q) = peak_eq(eql,eqf,eqf/Q), peak_eq(eql,eqf,eqf/Q);
45 // Regalia-Mitra peaking eq with "Q" hard-wired near sqrt(g)/2 (filter.lib):
46 pareq_stereo(eqf,eql,Q) = peak_eq_rm(eql,eqf,tpbt), peak_eq_rm(eql,eqf,tpbt)
47 with {
48 tpbt = wcT/sqrt(g); // tan(PI*B/SR) where B bandwidth in Hz (Q^2 ~ g/4)
49 wcT = 2*PI*eqf/SR; // peak frequency in rad/sample
50 g = db2linear(eql); // peak gain
51 };
52
53 eq1_group(x) = fdn_group(hgroup("equalizer1[name:RM Peaking Equalizer 1]", x));
54
55 eq1f = eq1_group(vslider("eq1_freq[name:Freq] [unit:Hz] [style:knob]
56 [tooltip: Center-frequency of second-order Regalia-Mitra peaking equalizer section 1]",
57 315, 40, 2500, 1));
58
59 eq1l = eq1_group(vslider("eq1_level[name:Level] [unit:dB] [style:knob]
60 [tooltip: Peak level in dB of second-order Regalia-Mitra peaking equalizer section 1]",
61 0, -15, 15, 0.1));
62
63 eq1q = eq1_group(vslider("eq1_q[name:Q] [style:knob]
64 [tooltip: Q = centerFrequency/bandwidth of second-order peaking equalizer section 1]",
65 3, 0.1, 10, 0.1));
66
67 eq2_group(x) = fdn_group(hgroup("equalizer2[name:RM Peaking Equalizer 2]", x));
68
69 eq2f = eq2_group(vslider("eq2_freq[name:Freq] [unit:Hz] [style:knob]
70 [tooltip: Center-frequency of second-order Regalia-Mitra peaking equalizer section 2]",
71 315, 40, 2500, 1));
72
73 eq2l = eq2_group(vslider("eq2_level[name:Level] [unit:dB] [style:knob]
74 [tooltip: Peak level in dB of second-order Regalia-Mitra peaking equalizer section 2]",
75 0, -15, 15, 0.1));
76
77 eq2q = eq2_group(vslider("eq2_q[name:Q] [style:knob]
78 [tooltip: Q = centerFrequency/bandwidth of second-order peaking equalizer section 2]",
79 3, 0.1, 10, 0.1));
80
81 out_group(x) = fdn_group(hgroup("output[name:Output]", x));
82
83 dry_wet(x,y) = *(wet) + dry*x, *(wet) + dry*y with {
84 wet = 0.5*(drywet+1.0);
85 dry = 1.0-wet;
86 };
87
88 drywet = out_group(vslider("dry_wet_mix[name:Dry/Wet] [style:knob]
89 [tooltip: -1 = dry, 1 = wet]",
90 0, -1.0, 1.0, 0.01)) : smooth(0.999);
91
92 out_level = *(gain),*(gain);
93
94 gain = out_group(vslider("level[name:Level] [unit:dB] [style:knob]
95 [tooltip: Output scale factor]", 0, -70, 40, 0.1))
96 : smooth(0.999) : db2linear;
97
98 };
0 declare id "12ax7"; // in amp tube selector
1 declare name "12ax7";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
13 hgroup("stage2", stage2)
14 with {
15 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : *(preamp):
16 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285) : *(preamp);
17 stage2 = lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840703) : *(gain1);
18 };
19
20
21 process = component("gxdistortion.dsp").dist(drive,wet_dry) : tubeax(preamp,gain1) with {
22 drive = ampctrl.drive;
23 wet_dry = ampctrl.wet_dry;
24 preamp = ampctrl.preamp;
25 gain1 = ampctrl.gain1;
26 };
0 declare id "6DJ8"; // in amp tube selector
1 declare name "6DJ8";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
13 hgroup("stage2", stage2)
14 with {
15 stage1 = tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : *(preamp):
16 lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609) : *(preamp) ;
17 stage2 = lowpass(1,6531.0) <: ( tubestage130_20(TB_6DJ8_68k,194.0,820.0,0.799031), tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043)) :> *(gain1);
18
19 } ;
20
21 process = component("gxdistortion.dsp").dist(drive,wet_dry): tubeax(preamp,gain1) with {
22 drive = ampctrl.drive;
23 wet_dry = ampctrl.wet_dry;
24 preamp = ampctrl.preamp;
25 gain1 = ampctrl.gain1;
26 /*
27 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
28 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
29 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
30 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
31 */
32 };
0 declare id "6DJ8"; // in amp tube selector
1 declare name "6DJ8";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
13 hgroup("stage2", stage2)
14 with {
15 stage1 = tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : *(preamp):
16 lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609) : *(preamp) ;
17 stage2 = lowpass(1,6531.0) <: ( tubestage130_20(TB_6DJ8_68k,194.0,820.0,0.799031), tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043)) :> *(gain1);
18
19 } ;
20
21 amp = component("gxdistortion.dsp").dist(drive,wet_dry): tubeax(preamp,gain1) with {
22 drive = ampctrl.drive;
23 wet_dry = ampctrl.wet_dry;
24 preamp = ampctrl.preamp;
25 gain1 = ampctrl.gain1;
26 /*
27 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
28 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
29 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
30 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
31 */
32 };
33
34 process = amp,amp;
0 declare id "12AU7 feedback"; // in amp tube selector
1 declare name "12AU7 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12AU7 feedback
11 */
12
13 val(x) = valve.vt(dist, q(x), x)
14 with {
15 dist = 40.1;
16 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
17 lp(a) = *(1 - a) : + ~ *(a);
18 lp1tm1 = abs <: lp(0.9999), _ : max;
19 avgs = lp1tm1 : avg;
20 avg_size = SR/9;
21 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
22 lp2tm1 = avgs : lp(0.999);
23 };
24
25
26 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
27 hgroup("stage2", stage2)
28 with {
29
30 stage1 = tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) : - ~ tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162) : *(preamp):
31 lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162): + ~ tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) ;
32 stage2 = lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) : *(gain1);
33
34 } ;
35
36
37 process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
38 drive = ampctrl.drive;
39 wet_dry = ampctrl.wet_dry;
40 preamp = ampctrl.preamp;
41 gain1 = ampctrl.gain1;
42 /*
43 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
44 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
45 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
46 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
47 */
48 } ;
49
0 declare id "12AU7 feedback"; // in amp tube selector
1 declare name "12AU7 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12AU7 feedback
11 */
12
13 val(x) = valve.vt(dist, q(x), x)
14 with {
15 dist = 40.1;
16 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
17 lp(a) = *(1 - a) : + ~ *(a);
18 lp1tm1 = abs <: lp(0.9999), _ : max;
19 avgs = lp1tm1 : avg;
20 avg_size = SR/9;
21 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
22 lp2tm1 = avgs : lp(0.999);
23 };
24
25
26 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
27 hgroup("stage2", stage2)
28 with {
29
30 stage1 = tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) : - ~ tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162) : *(preamp):
31 lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162): + ~ tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) ;
32 stage2 = lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487) : *(gain1);
33
34 } ;
35
36
37 amp = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
38 drive = ampctrl.drive;
39 wet_dry = ampctrl.wet_dry;
40 preamp = ampctrl.preamp;
41 gain1 = ampctrl.gain1;
42 /*
43 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
44 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
45 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
46 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
47 */
48 } ;
49
50 process = amp,amp;
51
0 declare id "pre 6DJ8/ master 6V6"; // in amp tube selector
1 declare name "pre 6DJ8/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 a = 0.75;
13 r(x) = x-sym_clip(a*0.88);
14 soft_clip(x) = x:sym_clip(a*0.75) <:+(r(x)*0.333);
15 hard_clip = sym_clip(0.88);
16
17 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
18
19 process = hgroup("stage1", stage1) : component("gxdistortion.dsp").dist(drive,wet_dry) :
20 hgroup("stage2", stage2)
21 with {
22 drive = ampctrl.drive;
23 wet_dry = ampctrl.wet_dry;
24 preamp = ampctrl.preamp;
25 /*
26 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
27 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
28 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
29 */
30 stage1 = *(preamp): tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) :
31 lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609) :tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043);
32 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :> _
33 with {
34 gain1 = ampctrl.gain1;
35 /*
36 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
37 */
38 } ;
39 };
40
0 declare id "pre 6DJ8/ master 6V6"; // in amp tube selector
1 declare name "pre 6DJ8/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 a = 0.75;
13 r(x) = x-sym_clip(a*0.88);
14 soft_clip(x) = x:sym_clip(a*0.75) <:+(r(x)*0.333);
15 hard_clip = sym_clip(0.88);
16
17 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
18
19 amp = hgroup("stage1", stage1) : component("gxdistortion.dsp").dist(drive,wet_dry) :
20 hgroup("stage2", stage2)
21 with {
22 drive = ampctrl.drive;
23 wet_dry = ampctrl.wet_dry;
24 preamp = ampctrl.preamp;
25 /*
26 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
27 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
28 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
29 */
30 stage1 = *(preamp): tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) :
31 lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609) :tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043);
32 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :> _
33 with {
34 gain1 = ampctrl.gain1;
35 /*
36 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
37 */
38 } ;
39 };
40
41 process = amp,amp;
42
0 declare id "6DJ8 feedback"; // in amp tube selector
1 declare name "6DJ8 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 val(x) = valve.vt(dist, q(x), x)
13 with {
14 dist = 40.1;
15 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
16 lp(a) = *(1 - a) : + ~ *(a);
17 lp1tm1 = abs <: lp(0.9999), _ : max;
18 avgs = lp1tm1 : avg;
19 avg_size = SR/9;
20 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
21 lp2tm1 = avgs : lp(0.999);
22 };
23
24
25 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
26 hgroup("stage2", stage2)
27 with {
28
29 atten = 0.6;
30 stage1 = tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : - ~ (atten*tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609)) : *(preamp):
31 lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609): + ~ (atten*tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043));
32 stage2 = lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043) : *(gain1);
33
34 };
35
36
37 process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
38 drive = ampctrl.drive;
39 wet_dry = ampctrl.wet_dry;
40 preamp = ampctrl.preamp;
41 gain1 = ampctrl.gain1;
42 /*
43 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
44 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
45 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
46 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
47 */
48 };
49
0 declare id "6DJ8 feedback"; // in amp tube selector
1 declare name "6DJ8 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 val(x) = valve.vt(dist, q(x), x)
13 with {
14 dist = 40.1;
15 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
16 lp(a) = *(1 - a) : + ~ *(a);
17 lp1tm1 = abs <: lp(0.9999), _ : max;
18 avgs = lp1tm1 : avg;
19 avg_size = SR/9;
20 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
21 lp2tm1 = avgs : lp(0.999);
22 };
23
24
25 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
26 hgroup("stage2", stage2)
27 with {
28
29 atten = 0.6;
30 stage1 = tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : - ~ (atten*tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609)) : *(preamp):
31 lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609): + ~ (atten*tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043));
32 stage2 = lowpass(1,6531.0) : tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043) : *(gain1);
33
34 };
35
36
37 amp = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
38 drive = ampctrl.drive;
39 wet_dry = ampctrl.wet_dry;
40 preamp = ampctrl.preamp;
41 gain1 = ampctrl.gain1;
42 /*
43 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
44 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
45 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
46 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
47 */
48 };
49
50 process = amp,amp;
51
0 declare id "12AT7"; // in amp tube selector
1 declare name "12AT7";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12AT7
11 */
12
13
14 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
15 hgroup("stage2", stage2)
16 with {
17
18 stage1 = tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : *(preamp):
19 lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332) : *(preamp);
20 stage2 = lowpass(1,6531.0) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962) : *(gain1);
21
22 } ;
23
24 process = component("gxdistortion.dsp").dist(drive,wet_dry): tubeax(preamp,gain1) with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 gain1 = ampctrl.gain1;
29 /*
30 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
31 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
32 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
33 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
34 */
35 };
0 declare id "12AT7"; // in amp tube selector
1 declare name "12AT7";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12AT7
11 */
12
13
14 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
15 hgroup("stage2", stage2)
16 with {
17
18 stage1 = tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : *(preamp):
19 lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332) : *(preamp);
20 stage2 = lowpass(1,6531.0) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962) : *(gain1);
21
22 } ;
23
24 amp = component("gxdistortion.dsp").dist(drive,wet_dry): tubeax(preamp,gain1) with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 gain1 = ampctrl.gain1;
29 /*
30 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
31 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
32 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
33 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
34 */
35 };
36
37 process = amp,amp;
0 declare id "pre 12AT7/ master 6V6"; // in amp tube selector
1 declare name "pre 12AT7/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube amp Emulation stage 1 - 2 - 3
10 * 12AT7 -> master 6V6
11 */
12
13 a = 0.75;
14 r(x) = x-sym_clip(a*0.88);
15 soft_clip(x) = x:sym_clip(a*0.75) <:+(r(x)*0.333);
16 hard_clip = sym_clip(0.88);
17
18 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
19
20 process = hgroup("stage1", stage1) : component("gxdistortion.dsp").dist(drive,wet_dry) :
21 hgroup("stage2", stage2)
22 with {
23 drive = ampctrl.drive;
24 wet_dry = ampctrl.wet_dry;
25 preamp = ampctrl.preamp;
26 /*
27 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
28 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
29 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
30 */
31 stage1 = *(preamp): tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) :
32 lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332) :tubestage(TB_12AT7_250k,194.0,820.0,1.256962);
33 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :> _
34 with {
35 gain1 = ampctrl.gain1;
36 /*
37 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
38 */
39 } ;
40 };
41
0 declare id "pre 12AT7/ master 6V6"; // in amp tube selector
1 declare name "pre 12AT7/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube amp Emulation stage 1 - 2 - 3
10 * 12AT7 -> master 6V6
11 */
12
13 a = 0.75;
14 r(x) = x-sym_clip(a*0.88);
15 soft_clip(x) = x:sym_clip(a*0.75) <:+(r(x)*0.333);
16 hard_clip = sym_clip(0.88);
17
18 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
19
20 amp = hgroup("stage1", stage1) : component("gxdistortion.dsp").dist(drive,wet_dry) :
21 hgroup("stage2", stage2)
22 with {
23 drive = ampctrl.drive;
24 wet_dry = ampctrl.wet_dry;
25 preamp = ampctrl.preamp;
26 /*
27 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
28 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
29 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
30 */
31 stage1 = *(preamp): tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) :
32 lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332) :tubestage(TB_12AT7_250k,194.0,820.0,1.256962);
33 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :> _
34 with {
35 gain1 = ampctrl.gain1;
36 /*
37 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
38 */
39 } ;
40 };
41
42 process = amp,amp;
43
0 declare id "pre 12AT7/ push pull 6V6"; // in amp tube selector
1 declare name "pre 12AT7/ push pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube amp Emulation stage 1 - 2 - 3
11 * 12AT7 -> push pull 6V6
12 */
13
14
15 notch1(x) = notch(x,9645.,-12.,14.1);
16 notch2(x) = notch(x,7890.,-17.,7.1);
17 notch3(x) = notch(x,5046.,-12.,19.1);
18
19 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
20
21 process = hgroup("stage1", stage1) :
22 component("gxdistortion.dsp").dist2(drive,wet_dry) :
23 hgroup("stage2", stage2)
24 with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 /*
29 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
30 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
31 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
32 */
33 atten = 0.6;
34 stage1 = speakerbp(310.0, 12000.0) :
35 *(preamp) : (tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : + ~ (atten*tubestage(TB_12AT7_250k,132.0,1500.0,1.887333))):
36 lowpass(1,6531.0) : (tubestage(TB_12AT7_250k,132.0,1500.0,1.887333) : + ~ (atten*tubestage(TB_12AT7_250k,194.0,820.0,1.256962))) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962);
37 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
38 notch1 : notch2 : notch3
39 with {
40 gain1 = ampctrl.gain1;
41 /*
42 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
43 */
44 };
45 };
46
0 declare id "pre 12AT7/ push pull 6V6"; // in amp tube selector
1 declare name "pre 12AT7/ push pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube amp Emulation stage 1 - 2 - 3
11 * 12AT7 -> push pull 6V6
12 */
13
14
15 notch1(x) = notch(x,9645.,-12.,14.1);
16 notch2(x) = notch(x,7890.,-17.,7.1);
17 notch3(x) = notch(x,5046.,-12.,19.1);
18
19 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
20
21 amp = hgroup("stage1", stage1) :
22 component("gxdistortion.dsp").dist2(drive,wet_dry) :
23 hgroup("stage2", stage2)
24 with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 /*
29 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
30 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
31 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
32 */
33 atten = 0.6;
34 stage1 = speakerbp(310.0, 12000.0) :
35 *(preamp) : (tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : + ~ (atten*tubestage(TB_12AT7_250k,132.0,1500.0,1.887333))):
36 lowpass(1,6531.0) : (tubestage(TB_12AT7_250k,132.0,1500.0,1.887333) : + ~ (atten*tubestage(TB_12AT7_250k,194.0,820.0,1.256962))) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962);
37 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
38 notch1 : notch2 : notch3
39 with {
40 gain1 = ampctrl.gain1;
41 /*
42 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
43 */
44 };
45 };
46
47 process = amp,amp;
48
0 declare id "12AT7 feedback"; // in amp tube selector
1 declare name "12AT7 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12AT7 feedback
11 */
12
13 val(x) = valve.vt(dist, q(x), x)
14 with {
15 dist = 40.1;
16 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
17 lp(a) = *(1 - a) : + ~ *(a);
18 lp1tm1 = abs <: lp(0.9999), _ : max;
19 avgs = lp1tm1 : avg;
20 avg_size = SR/9;
21 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
22 lp2tm1 = avgs : lp(0.999);
23 };
24
25
26 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
27 hgroup("stage2", stage2)
28 with {
29
30 atten = 0.6;
31 stage1 = tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : - ~ (atten*tubestage(TB_12AT7_250k,132.0,1500.0,1.887332)) : *(preamp):
32 lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332): + ~ (atten*tubestage(TB_12AT7_250k,194.0,820.0,1.256962));
33 stage2 = lowpass(1,6531.0) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962) : *(gain1);
34
35 } ;
36
37
38 process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
39 drive = ampctrl.drive;
40 wet_dry = ampctrl.wet_dry;
41 preamp = ampctrl.preamp;
42 gain1 = ampctrl.gain1;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
48 */
49 };
50
0 declare id "12AT7 feedback"; // in amp tube selector
1 declare name "12AT7 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12AT7 feedback
11 */
12
13 val(x) = valve.vt(dist, q(x), x)
14 with {
15 dist = 40.1;
16 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
17 lp(a) = *(1 - a) : + ~ *(a);
18 lp1tm1 = abs <: lp(0.9999), _ : max;
19 avgs = lp1tm1 : avg;
20 avg_size = SR/9;
21 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
22 lp2tm1 = avgs : lp(0.999);
23 };
24
25
26 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
27 hgroup("stage2", stage2)
28 with {
29
30 atten = 0.6;
31 stage1 = tubestage(TB_12AT7_68k,86.0,2700.0,2.617753) : - ~ (atten*tubestage(TB_12AT7_250k,132.0,1500.0,1.887332)) : *(preamp):
32 lowpass(1,6531.0) : tubestage(TB_12AT7_250k,132.0,1500.0,1.887332): + ~ (atten*tubestage(TB_12AT7_250k,194.0,820.0,1.256962));
33 stage2 = lowpass(1,6531.0) : tubestage(TB_12AT7_250k,194.0,820.0,1.256962) : *(gain1);
34
35 } ;
36
37
38 amp = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
39 drive = ampctrl.drive;
40 wet_dry = ampctrl.wet_dry;
41 preamp = ampctrl.preamp;
42 gain1 = ampctrl.gain1;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
48 */
49 };
50
51 process = amp,amp;
52
0 declare id "6C16"; // in amp tube selector
1 declare name "6C16";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12
13 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
14 hgroup("stage2", stage2)
15 with {
16 stage1 = tubestage(TB_6C16_68k,86.0,2700.0,2.921806) : *(preamp):
17 lowpass(1,6531.0) : tubestage(TB_6C16_250k,132.0,1500.0,2.097743) : *(preamp);
18 stage2 = lowpass(1,6531.0) : tubestage(TB_6C16_250k,194.0,820.0,1.378742) : *(gain1);
19 };
20
21
22 process = component("gxdistortion.dsp").dist(drive,wet_dry) : tubeax(preamp,gain1) with {
23 drive = ampctrl.drive;
24 wet_dry = ampctrl.wet_dry;
25 preamp = ampctrl.preamp;
26 gain1 = ampctrl.gain1;
27 };
0 declare id "6C16"; // in amp tube selector
1 declare name "6C16";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12
13 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
14 hgroup("stage2", stage2)
15 with {
16 stage1 = tubestage(TB_6C16_68k,86.0,2700.0,2.921806) : *(preamp):
17 lowpass(1,6531.0) : tubestage(TB_6C16_250k,132.0,1500.0,2.097743) : *(preamp);
18 stage2 = lowpass(1,6531.0) : tubestage(TB_6C16_250k,194.0,820.0,1.378742) : *(gain1);
19 };
20
21
22 amp = component("gxdistortion.dsp").dist(drive,wet_dry) : tubeax(preamp,gain1) with {
23 drive = ampctrl.drive;
24 wet_dry = ampctrl.wet_dry;
25 preamp = ampctrl.preamp;
26 gain1 = ampctrl.gain1;
27 };
28
29 process = amp,amp;
0 declare id "6V6"; // in amp tube selector
1 declare name "6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 bifilter = tf2(b0,b1,b2,a1,a2) with
13 {
14 c = 1.059;
15 R = 0.9221;
16 lc0 = 0.00506158;
17 lc1 = 0.06446806;
18 lc2 = 0.27547621;
19 lc3 = 0.43359433;
20 lc4 = 1.31282248;
21 lc5 = 0.07238887;
22 fc = 1200 : *(2*PI/SR) : log;
23 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
24 //b0 = 1;
25 //b1 = -1.01;
26 //b2 = 0;
27 //a1 = -1.84;
28 //a2 = 0.846416;
29 b0 = 1;
30 b1 = -c;
31 b2 = 0;
32 a1 = -2*R*cos(p);
33 a2 = R*R;
34 };
35
36 tubec(preamp,gain1) = hgroup("stage1", stage1) :
37 hgroup("stage2", stage2)
38 with {
39
40 stage1 = tubestage(TB_6V6_68k,86.0,2700.0,2.296150):
41 lowpass(1,6531.0) : *(preamp) : tubestage(TB_6V6_250k,132.0,1500.0,1.675587);
42 stage2 = lowpass(1,6531.0) : *(gain1) : tubestage(TB_6V6_250k,194.0,820.0,1.130462);
43
44 };
45
46 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
47 hgroup("stage2", stage2)
48 with {
49
50 stage1 = *(preamp): tubestage(TB_6V6_68k,86.0,2700.0,2.296150): *(0.77) :
51 lowpass(1,6531.0) : *(preamp) : tubestage(TB_6V6_250k,132.0,1500.0,1.675587): *(0.77);
52 stage2 = lowpass(1,6531.0) : *(gain1) : bifilter : tubestage(TB_6V6_250k,194.0,820.0,1.130462) : *(0.77);
53
54 } ;
55
56 process = component("gxdistortion.dsp").dist(drive,wet_dry) : tubeax(preamp,gain1) with {
57 drive = ampctrl.drive;
58 wet_dry = ampctrl.wet_dry;
59 preamp = ampctrl.preamp;
60 gain1 = ampctrl.gain1;
61 /*
62 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
63 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
64 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
65 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
66 */
67 };
0 declare id "6V6"; // in amp tube selector
1 declare name "6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 bifilter = tf2(b0,b1,b2,a1,a2) with
13 {
14 c = 1.059;
15 R = 0.9221;
16 lc0 = 0.00506158;
17 lc1 = 0.06446806;
18 lc2 = 0.27547621;
19 lc3 = 0.43359433;
20 lc4 = 1.31282248;
21 lc5 = 0.07238887;
22 fc = 1200 : *(2*PI/SR) : log;
23 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
24 //b0 = 1;
25 //b1 = -1.01;
26 //b2 = 0;
27 //a1 = -1.84;
28 //a2 = 0.846416;
29 b0 = 1;
30 b1 = -c;
31 b2 = 0;
32 a1 = -2*R*cos(p);
33 a2 = R*R;
34 };
35
36 tubec(preamp,gain1) = hgroup("stage1", stage1) :
37 hgroup("stage2", stage2)
38 with {
39
40 stage1 = tubestage(TB_6V6_68k,86.0,2700.0,2.296150):
41 lowpass(1,6531.0) : *(preamp) : tubestage(TB_6V6_250k,132.0,1500.0,1.675587);
42 stage2 = lowpass(1,6531.0) : *(gain1) : tubestage(TB_6V6_250k,194.0,820.0,1.130462);
43
44 };
45
46 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
47 hgroup("stage2", stage2)
48 with {
49
50 stage1 = *(preamp): tubestage(TB_6V6_68k,86.0,2700.0,2.296150): *(0.77) :
51 lowpass(1,6531.0) : *(preamp) : tubestage(TB_6V6_250k,132.0,1500.0,1.675587): *(0.77);
52 stage2 = lowpass(1,6531.0) : *(gain1) : bifilter : tubestage(TB_6V6_250k,194.0,820.0,1.130462) : *(0.77);
53
54 } ;
55
56 amp = component("gxdistortion.dsp").dist(drive,wet_dry) : tubeax(preamp,gain1) with {
57 drive = ampctrl.drive;
58 wet_dry = ampctrl.wet_dry;
59 preamp = ampctrl.preamp;
60 gain1 = ampctrl.gain1;
61 /*
62 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
63 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
64 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
65 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
66 */
67 };
68
69 process = amp,amp;
0 declare id "12AU7"; // in amp tube selector
1 declare name "12AU7";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
13 hgroup("stage2", stage2)
14 with {
15
16 stage1 = tubestage(TB_12AU7_68k,86.0,2700.0,3.718962) : *(preamp):*(2.0):
17 lowpass(1,6531.0) : tubestage(TB_12AU7_250k,132.0,1500.0,2.314844) : *(preamp) :*(2.0);
18 stage2 = lowpass(1,6531.0) : tubestage(TB_12AU7_250k,194.0,820.0,1.356567) : *(gain1):*(2.0);
19
20 } ;
21
22 process = component("gxdistortion.dsp").dist(drive,wet_dry): tubeax(preamp,gain1) with {
23 drive = ampctrl.drive;
24 wet_dry = ampctrl.wet_dry;
25 preamp = ampctrl.preamp;
26 gain1 = ampctrl.gain1;
27 /*
28 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
29 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
30 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
31 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
32 */
33 };
0 declare id "12AU7"; // in amp tube selector
1 declare name "12AU7";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
13 hgroup("stage2", stage2)
14 with {
15
16 stage1 = tubestage(TB_12AU7_68k,86.0,2700.0,3.718962) : *(preamp):*(2.0):
17 lowpass(1,6531.0) : tubestage(TB_12AU7_250k,132.0,1500.0,2.314844) : *(preamp) :*(2.0);
18 stage2 = lowpass(1,6531.0) : tubestage(TB_12AU7_250k,194.0,820.0,1.356567) : *(gain1):*(2.0);
19
20 } ;
21
22 amp = component("gxdistortion.dsp").dist(drive,wet_dry): tubeax(preamp,gain1) with {
23 drive = ampctrl.drive;
24 wet_dry = ampctrl.wet_dry;
25 preamp = ampctrl.preamp;
26 gain1 = ampctrl.gain1;
27 /*
28 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
29 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
30 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
31 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
32 */
33 };
34
35 process = amp,amp;
0 declare id "pre 12AU7/ master 6V6"; // in amp tube selector
1 declare name "pre 12AU7/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 bifilter = tf2(b0,b1,b2,a1,a2) with
13 {
14 c = 1.059;
15 R = 0.9221;
16 lc0 = 0.00506158;
17 lc1 = 0.06446806;
18 lc2 = 0.27547621;
19 lc3 = 0.43359433;
20 lc4 = 1.31282248;
21 lc5 = 0.07238887;
22 fc = 1200 : *(2*PI/SR) : log;
23 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
24 //b0 = 1;
25 //b1 = -1.01;
26 //b2 = 0;
27 //a1 = -1.84;
28 //a2 = 0.846416;
29 b0 = 1;
30 b1 = -c;
31 b2 = 0;
32 a1 = -2*R*cos(p);
33 a2 = R*R;
34 };
35
36 process = hgroup("stage1", stage1) :
37 component("gxdistortion.dsp").dist(drive,wet_dry) :
38 hgroup("stage2", stage2)
39 with {
40 drive = ampctrl.drive;
41 wet_dry = ampctrl.wet_dry;
42 preamp = ampctrl.preamp;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 */
48 stage1 = *(preamp): tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) :
49 lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162): tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487);
50 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :>_
51 with {
52 gain1 = ampctrl.gain1;
53 /*
54 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
55 */
56 };
57 };
0 declare id "pre 12AU7/ master 6V6"; // in amp tube selector
1 declare name "pre 12AU7/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 bifilter = tf2(b0,b1,b2,a1,a2) with
13 {
14 c = 1.059;
15 R = 0.9221;
16 lc0 = 0.00506158;
17 lc1 = 0.06446806;
18 lc2 = 0.27547621;
19 lc3 = 0.43359433;
20 lc4 = 1.31282248;
21 lc5 = 0.07238887;
22 fc = 1200 : *(2*PI/SR) : log;
23 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
24 //b0 = 1;
25 //b1 = -1.01;
26 //b2 = 0;
27 //a1 = -1.84;
28 //a2 = 0.846416;
29 b0 = 1;
30 b1 = -c;
31 b2 = 0;
32 a1 = -2*R*cos(p);
33 a2 = R*R;
34 };
35
36 amp = hgroup("stage1", stage1) :
37 component("gxdistortion.dsp").dist(drive,wet_dry) :
38 hgroup("stage2", stage2)
39 with {
40 drive = ampctrl.drive;
41 wet_dry = ampctrl.wet_dry;
42 preamp = ampctrl.preamp;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 */
48 stage1 = *(preamp): tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) :
49 lowpass(1,6531.0) : tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162): tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487);
50 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :>_
51 with {
52 gain1 = ampctrl.gain1;
53 /*
54 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
55 */
56 };
57 };
58
59 process = amp,amp;
0 declare id "pre 12ax7/ master 6V6"; // in amp tube selector
1 declare name "pre 12ax7/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 bifilter = tf2(b0,b1,b2,a1,a2) with
13 {
14 c = 1.059;
15 R = 0.9221;
16 lc0 = 0.00506158;
17 lc1 = 0.06446806;
18 lc2 = 0.27547621;
19 lc3 = 0.43359433;
20 lc4 = 1.31282248;
21 lc5 = 0.07238887;
22 fc = 1200 : *(2*PI/SR) : log;
23 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
24 //b0 = 1;
25 //b1 = -1.01;
26 //b2 = 0;
27 //a1 = -1.84;
28 //a2 = 0.846416;
29 b0 = 1;
30 b1 = -c;
31 b2 = 0;
32 a1 = -2*R*cos(p);
33 a2 = R*R;
34 };
35
36 process = hgroup("stage1", stage1) :
37 component("gxdistortion.dsp").dist(drive,wet_dry) :
38 hgroup("stage2", stage2)
39 with {
40 drive = ampctrl.drive;
41 wet_dry = ampctrl.wet_dry;
42 preamp = ampctrl.preamp;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 */
48 stage1 = *(preamp): tubestage(TB_12AX7_68k,86.0,2700.0,1.581656):
49 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285):tubestage(TB_12AX7_250k,194.0,820.0,0.840703);
50 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :>_
51 with {
52 gain1 = ampctrl.gain1;
53 /*
54 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
55 */
56 };
57 };
0 declare id "pre 12ax7/ master 6V6"; // in amp tube selector
1 declare name "pre 12ax7/ master 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 bifilter = tf2(b0,b1,b2,a1,a2) with
13 {
14 c = 1.059;
15 R = 0.9221;
16 lc0 = 0.00506158;
17 lc1 = 0.06446806;
18 lc2 = 0.27547621;
19 lc3 = 0.43359433;
20 lc4 = 1.31282248;
21 lc5 = 0.07238887;
22 fc = 1200 : *(2*PI/SR) : log;
23 p = lc0*pow(fc,5) + lc1*pow(fc,4) + lc2*pow(fc,3) + lc3*pow(fc,2) + lc4*fc + lc5 : exp;
24 //b0 = 1;
25 //b1 = -1.01;
26 //b2 = 0;
27 //a1 = -1.84;
28 //a2 = 0.846416;
29 b0 = 1;
30 b1 = -c;
31 b2 = 0;
32 a1 = -2*R*cos(p);
33 a2 = R*R;
34 };
35
36 amp = hgroup("stage1", stage1) :
37 component("gxdistortion.dsp").dist(drive,wet_dry) :
38 hgroup("stage2", stage2)
39 with {
40 drive = ampctrl.drive;
41 wet_dry = ampctrl.wet_dry;
42 preamp = ampctrl.preamp;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 */
48 stage1 = *(preamp): tubestage(TB_12AX7_68k,86.0,2700.0,1.581656):
49 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285):tubestage(TB_12AX7_250k,194.0,820.0,0.840703);
50 stage2 = lowpass(1,6531.0) : *(gain1) <: (tubestage(TB_6V6_250k,6531.0,820.0,1.130462),tubestage(TB_6V6_68k,6531.0,820.0,1.130740)) :>_
51 with {
52 gain1 = ampctrl.gain1;
53 /*
54 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
55 */
56 };
57 };
58
59 process = amp,amp;
0 declare id "pre 6DJ8/ push-pull 6V6"; // in amp tube selector
1 declare name "pre 6DJ8/ push-pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube Preamp Emulation stage 1 - 2
11 */
12
13
14 notch1(x) = notch(x,9645.,-12.,14.1);
15 notch2(x) = notch(x,7890.,-17.,7.1);
16 notch3(x) = notch(x,5046.,-12.,19.1);
17
18 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
19
20 process = hgroup("stage1", stage1) :
21 component("gxdistortion.dsp").dist2(drive,wet_dry) :
22 hgroup("stage2", stage2)
23 with {
24 drive = ampctrl.drive;
25 wet_dry = ampctrl.wet_dry;
26 preamp = ampctrl.preamp;
27 /*
28 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
29 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
30 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
31 */
32 atten = 0.6;
33 stage1 = speakerbp(310.0, 12000.0) :
34 *(preamp): (tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : + ~ (atten*tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609))):
35 lowpass(1,6531.0) : (tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609) : + ~ (atten*tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043))) : tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043) ;
36 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
37 notch1 : notch2 : notch3
38 with {
39 gain1 = ampctrl.gain1;
40 /*
41 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
42 */
43 };
44 };
0 declare id "pre 6DJ8/ push-pull 6V6"; // in amp tube selector
1 declare name "pre 6DJ8/ push-pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube Preamp Emulation stage 1 - 2
11 */
12
13
14 notch1(x) = notch(x,9645.,-12.,14.1);
15 notch2(x) = notch(x,7890.,-17.,7.1);
16 notch3(x) = notch(x,5046.,-12.,19.1);
17
18 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
19
20 amp = hgroup("stage1", stage1) :
21 component("gxdistortion.dsp").dist2(drive,wet_dry) :
22 hgroup("stage2", stage2)
23 with {
24 drive = ampctrl.drive;
25 wet_dry = ampctrl.wet_dry;
26 preamp = ampctrl.preamp;
27 /*
28 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
29 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
30 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
31 */
32 atten = 0.6;
33 stage1 = speakerbp(310.0, 12000.0) :
34 *(preamp): (tubestage130_20(TB_6DJ8_68k,86.0,2700.0,1.863946) : + ~ (atten*tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609))):
35 lowpass(1,6531.0) : (tubestage130_20(TB_6DJ8_250k,132.0,1500.0,1.271609) : + ~ (atten*tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043))) : tubestage130_20(TB_6DJ8_250k,194.0,820.0,0.797043) ;
36 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
37 notch1 : notch2 : notch3
38 with {
39 gain1 = ampctrl.gain1;
40 /*
41 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
42 */
43 };
44 };
45
46 process = amp,amp;
0 declare id "pre 12ax7/ push-pull 6V6"; // in amp tube selector
1 declare name "pre 12ax7/ push-pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube Preamp Emulation stage 1 - 2
11 * 12ax7 -> pusch pull 6V6
12 */
13
14
15 notch1(x) = notch(x,9645.,-12.,14.1);
16 notch2(x) = notch(x,7890.,-17.,7.1);
17 notch3(x) = notch(x,5046.,-12.,19.1);
18
19 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
20
21 process = hgroup("stage1", stage1)
22 : component("gxdistortion.dsp").dist2(drive,wet_dry)
23 : hgroup("stage2", stage2)
24 with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 /*
29 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
30 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
31 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
32 */
33 atten = 0.6;
34 stage1 = speakerbp(310.0, 12000.0)
35 : *(preamp): (tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : + ~ (atten*tubestage(TB_12AX7_250k,132.0,1500.0,1.204285)))
36 : lowpass(1,6531.0) : (tubestage(TB_12AX7_250k,132.0,1500.0,1.204285) : + ~ (atten*tubestage(TB_12AX7_250k,194.0,820.0,0.840703))) : tubestage(TB_12AX7_250k,194.0,820.0,0.840703);
37 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
38 notch1 : notch2 : notch3
39 with {
40 gain1 = ampctrl.gain1;
41 /*
42 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
43 */
44 };
45 };
0 declare id "pre 12ax7/ push-pull 6V6"; // in amp tube selector
1 declare name "pre 12ax7/ push-pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube Preamp Emulation stage 1 - 2
11 * 12ax7 -> pusch pull 6V6
12 */
13
14
15 notch1(x) = notch(x,9645.,-12.,14.1);
16 notch2(x) = notch(x,7890.,-17.,7.1);
17 notch3(x) = notch(x,5046.,-12.,19.1);
18
19 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
20
21 amp = hgroup("stage1", stage1)
22 : component("gxdistortion.dsp").dist2(drive,wet_dry)
23 : hgroup("stage2", stage2)
24 with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 /*
29 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
30 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
31 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
32 */
33 atten = 0.6;
34 stage1 = speakerbp(310.0, 12000.0)
35 : *(preamp): (tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : + ~ (atten*tubestage(TB_12AX7_250k,132.0,1500.0,1.204285)))
36 : lowpass(1,6531.0) : (tubestage(TB_12AX7_250k,132.0,1500.0,1.204285) : + ~ (atten*tubestage(TB_12AX7_250k,194.0,820.0,0.840703))) : tubestage(TB_12AX7_250k,194.0,820.0,0.840703);
37 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
38 notch1 : notch2 : notch3
39 with {
40 gain1 = ampctrl.gain1;
41 /*
42 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
43 */
44 };
45 };
46
47 process = amp,amp;
0 declare id "pre 12AU7/ push-pull 6V6"; // in amp tube selector
1 declare name "pre 12AU7/ push-pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube Preamp Emulation stage 1 - 2
11 * 12AU7 -> pusch pull 6V6
12 */
13
14
15 notch1(x) = notch(x,9645.,-12.,14.1);
16 notch2(x) = notch(x,7890.,-17.,7.1);
17 notch3(x) = notch(x,5046.,-12.,19.1);
18
19 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
20
21 process = hgroup("stage1", stage1) :
22 component("gxdistortion.dsp").dist2(drive,wet_dry) :
23 hgroup("stage2", stage2)
24 with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 /*
29 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
30 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
31 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
32 */
33 atten = 0.6;
34 stage1 = speakerbp(310.0, 12000.0) :
35 *(preamp):*(2.0): (tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) : + ~ (atten*tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162))):
36 lowpass(1,6531.0) : (tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162) : + ~ (atten*tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487))) : tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487);
37 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
38 notch1 : notch2 : notch3
39 with {
40 gain1 = ampctrl.gain1;
41 /*
42 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
43 */
44 };
45 };
46
0 declare id "pre 12AU7/ push-pull 6V6"; // in amp tube selector
1 declare name "pre 12AU7/ push-pull 6V6";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7 import("maxmsp.lib");
8
9 /****************************************************************
10 ** Tube Preamp Emulation stage 1 - 2
11 * 12AU7 -> pusch pull 6V6
12 */
13
14
15 notch1(x) = notch(x,9645.,-12.,14.1);
16 notch2(x) = notch(x,7890.,-17.,7.1);
17 notch3(x) = notch(x,5046.,-12.,19.1);
18
19 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
20
21 amp = hgroup("stage1", stage1) :
22 component("gxdistortion.dsp").dist2(drive,wet_dry) :
23 hgroup("stage2", stage2)
24 with {
25 drive = ampctrl.drive;
26 wet_dry = ampctrl.wet_dry;
27 preamp = ampctrl.preamp;
28 /*
29 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
30 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
31 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
32 */
33 atten = 0.6;
34 stage1 = speakerbp(310.0, 12000.0) :
35 *(preamp):*(2.0): (tubestage130_10(TB_12AU7_68k,86.0,2700.0,1.257240) : + ~ (atten*tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162))):
36 lowpass(1,6531.0) : (tubestage130_10(TB_12AU7_250k,132.0,1500.0,0.776162) : + ~ (atten*tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487))) : tubestage130_10(TB_12AU7_250k,194.0,820.0,0.445487);
37 stage2 = lowpass(1,6531.0) : *(gain1) <: ((min(0.7,tubestage(TB_6V6_250k,6531.0,410.0,0.659761))),(max(-0.75,tubestage(TB_6V6_68k,6531.0,410.0,0.664541)))) :>
38 notch1 : notch2 : notch3
39 with {
40 gain1 = ampctrl.gain1;
41 /*
42 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
43 */
44 };
45 };
46
47 process = amp,amp;
48
0 declare id "12ax7 feedback"; // in amp tube selector
1 declare name "12ax7 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12ax7 feedback
11 */
12
13 val(x) = valve.vt(dist, q(x), x)
14 with {
15 dist = 40.1;
16 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
17 lp(a) = *(1 - a) : + ~ *(a);
18 lp1tm1 = abs <: lp(0.9999), _ : max;
19 avgs = lp1tm1 : avg;
20 avg_size = SR/9;
21 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
22 lp2tm1 = avgs : lp(0.999);
23 };
24
25
26 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
27 hgroup("stage2", stage2)
28 with {
29
30 atten = 0.6;
31 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : - ~ (atten*tubestage(TB_12AX7_250k,132.0,1500.0,1.204285)) : *(preamp):
32 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285): + ~ (atten*tubestage(TB_12AX7_250k,194.0,820.0,0.840702));
33 stage2 = lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840702) : *(gain1);
34
35 } ;
36
37
38 process = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
39 drive = ampctrl.drive;
40 wet_dry = ampctrl.wet_dry;
41 preamp = ampctrl.preamp;
42 gain1 = ampctrl.gain1;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
48 */
49 };
50
0 declare id "12ax7 feedback"; // in amp tube selector
1 declare name "12ax7 feedback";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 * 12ax7 feedback
11 */
12
13 val(x) = valve.vt(dist, q(x), x)
14 with {
15 dist = 40.1;
16 q(x) = lp1tm1(x) * 1 - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
17 lp(a) = *(1 - a) : + ~ *(a);
18 lp1tm1 = abs <: lp(0.9999), _ : max;
19 avgs = lp1tm1 : avg;
20 avg_size = SR/9;
21 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
22 lp2tm1 = avgs : lp(0.999);
23 };
24
25
26 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
27 hgroup("stage2", stage2)
28 with {
29
30 atten = 0.6;
31 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : - ~ (atten*tubestage(TB_12AX7_250k,132.0,1500.0,1.204285)) : *(preamp):
32 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285): + ~ (atten*tubestage(TB_12AX7_250k,194.0,820.0,0.840702));
33 stage2 = lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840702) : *(gain1);
34
35 } ;
36
37
38 amp = val : component("gxdistortion.dsp").dist1(drive,wet_dry) : tubeax(preamp,gain1) with {
39 drive = ampctrl.drive;
40 wet_dry = ampctrl.wet_dry;
41 preamp = ampctrl.preamp;
42 gain1 = ampctrl.gain1;
43 /*
44 drive = vslider(".gxdistortion.drive[alias]",0.35, 0, 1, 0.01);
45 wet_dry = vslider(".gxdistortion.wet_dry[alias]", 100, 0, 100, 1) : /(100) : smoothi(0.999);
46 preamp = vslider(".amp2.stage1.Pregain[alias]",0,-20,20,0.1) : db2linear : smoothi(0.999);
47 gain1 = vslider(".amp2.stage2.gain1[alias]", 6, -20.0, 20.0, 0.1) : db2linear : smoothi(0.999);
48 */
49 };
50
51 process = amp,amp;
52
0 declare id "12ax7"; // in amp tube selector
1 declare name "12ax7";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
13 hgroup("stage2", stage2)
14 with {
15 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : *(preamp):
16 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285) : *(preamp);
17 stage2 = lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840703) : *(gain1);
18 };
19
20
21 amp = component("gxdistortion.dsp").dist(drive,wet_dry) : tubeax(preamp,gain1) with {
22 drive = ampctrl.drive;
23 wet_dry = ampctrl.wet_dry;
24 preamp = ampctrl.preamp;
25 gain1 = ampctrl.gain1;
26 };
27
28 process = amp,amp;
0 declare id "gxdistortion";
1 declare version "0.01";
2 declare author "brummer";
3 declare license "BSD";
4 declare copyright "(c)brummer 2008";
5
6
7 import("math.lib");
8 import("music.lib");
9 import("effect.lib");
10 import("filter.lib");
11 import("guitarix.lib");
12 import("maxmsp.lib");
13
14 F = 300; //nentry("split_low_freq", 250, 20, 600, 10);
15 F1 = 1200; //nentry("split_middle_freq", 650, 600, 1250, 10);
16 F2 = 3200; //nentry("split_high_freq", 1250, 1250, 12000, 10);
17
18 /**********************************************************************
19 *** this part is included here for backward compatibility from 0.9.27 to
20 *** 0.9.24
21 ***********************************************************************/
22
23 //------------------------------ count and take --------------------------------------
24
25 countN ((xs, xxs)) = 1 + countN(xxs);
26 countN (xx) = 1;
27
28 takeN (1, (xs, xxs)) = xs;
29 takeN (1, xs) = xs;
30 takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
31
32 //------------------------------ low/high-passfilters --------------------------------------
33
34 tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
35
36 tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
37 with {
38 conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
39 conv2(k0,k1,x) = k0*x + k1*x';
40 sub(x,y) = y-x;
41 };
42
43 tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
44 with {
45 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
46 d = a0 + c;
47 b1d = (b0 - b1*c) / d;
48 b0d = (b0 + b1*c) / d;
49 a1d = (a0 - c) / d;
50 };
51
52 tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
53 with {
54 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
55 csq = c*c;
56 d = a0 + a1 * c + csq;
57 b0d = (b0 + b1 * c + b2 * csq)/d;
58 b1d = 2 * (b0 - b2 * csq)/d;
59 b2d = (b0 - b1 * c + b2 * csq)/d;
60 a1d = 2 * (a0 - csq)/d;
61 a2d = (a0 - a1*c + csq)/d;
62 };
63
64 lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
65 highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
66 lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
67 with {
68 lphpr(s,0,N,fc) = _;
69 lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
70 lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
71 parity = N % 2;
72 S = (O-parity)/2; // current section number
73 a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
74 w1 = 2*PI*fc;
75 };
76 };
77
78 //------------------------------ analyzer --------------------------------------
79 analyzern(O,lfreqs) = _ <: bsplit(nb) with
80 {
81 nb = countN(lfreqs);
82 fc(n) = takeN(n, lfreqs);
83 lp(n) = lowpassN(O,fc(n));
84 hp(n) = highpassN(O,fc(n));
85 bsplit(0) = _;
86 bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
87 };
88
89 analyzerN(lfreqs) = analyzern(3,lfreqs);
90
91 filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
92 {
93 nb = count(lfreqs);
94 fc(n) = take(n, lfreqs);
95 ap(n) = highpass_plus_lowpass(O,fc(n));
96 delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
97 apchain(0) = _;
98 apchain(i) = ap(i) : apchain(i-1);
99 };
100
101 filterbankN(lfreqs) = filterbankn(3,lfreqs);
102
103 /**********************************************************************
104 *** end for backward compatibility from 0.9.27 to
105 *** 0.9.24 , it could removed when switch completly to > 0.9.27
106 ***********************************************************************/
107
108 //----------distortion---------
109
110 val(x) = valve.vt(dist, q(x), x)
111 with {
112 dist = 40.1;
113 q(x) = lp1tm1(x) * 1.0 - lp2tm1(x) * 1.02 - 1.0 : clip(-1.0,-0.01);
114 lp(a) = *(1 - a) : + ~ *(a);
115 lp1tm1 = abs <: lp(0.9999), _ : max;
116 avgs = lp1tm1 : avg;
117 avg_size = SR/9;
118 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
119 lp2tm1 = avgs : lp(0.999);
120 };
121
122 vt = valve.vt(dist, q) : neg : valve.vt(dist, q) : neg with
123 {
124 q_p = 0.9;
125 dist_p = 1.7;
126 q = -q_p*-q_p*-q_p;
127 dist = pow(10,dist_p);
128 };
129
130 //-distortion
131
132 distdrive(drive) = wet_dry_mix(wet_dry, _: distortion) with {
133
134 //drive = vslider("drive", 0.35, 0, 1, 0.01);
135
136 //h = (2.0): db2linear; //1,2589412
137 //l = (4.0): db2linear; //1,584893192
138 //mh = (4.0): db2linear; //1,584893192
139 //ml = (2.5): db2linear; //1,333521432
140
141 distortion1 = _:cubicnl(0.45*drive,0.0): *(1.2589412); // l
142 distortion2 = _:cubicnl(0.4*drive,0.0) : *(1.584893192); // h
143 distortion3 = _:cubicnl(1.0*drive,0.0) : *(1.584893192); //ml
144 distortion4 = _:cubicnl(0.6*drive,0.0) : *(1.333521432); //mh
145 distortion = lowpassN(2,15000.0): highpass(1,31.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>lowpass(1,6531.0);
146
147 wet_dry = (drive - 0.5) * 2;
148 };
149
150 distdrive1(drive) = wet_dry_mix(wet_dry, _: distortion) with {
151
152 //drive = vslider("drive", 0.35, 0, 1, 0.01);
153
154 //h = (2.0): db2linear; //1,2589412
155 //l = (4.0): db2linear; //1,584893192
156 //mh = (4.0): db2linear; //1,584893192
157 //ml = (2.5): db2linear; //1,333521432
158
159 distortion1 = _:cubicnl(0.4*drive,0.0): *(1.2589412); // l
160 distortion2 = _:cubicnl(0.8*drive,0.0) : *(1.584893192); // h
161 distortion3 = _:cubicnl(0.8*drive,0.0) : *(1.584893192); //ml
162 distortion4 = _:cubicnl(0.6*drive,0.0) : *(1.333521432); //mh
163 distortion = lowpassN(1,6531.0): highpass(1,120.0) : filterbankN((F,(F1,F2))) : distortion2,distortion4 ,distortion3,distortion1 :>lowpass(1,6531.0): highpass(1,120.0);
164
165 wet_dry = (drive - 0.5) * 2;
166 };
167
168 clipit = min(0.7) : max(-0.7) ;
169
170 gx_drive(drive) = _ <: _ + nonlin(4,4,0.125) * drive * 10 ;
171
172 wetdry = vslider("wet_dry[name:wet/dry]", 100, 0, 100, 1) : /(100);
173 drive = vslider("drive", 0.35, 0, 1, 0.01) : smoothi(0.999);
174
175 dist(drive,wetdry) =_<:(*(dry): +(no_denormal) :gx_drive(drive)),(*(wetdry):+(no_denormal) :distdrive(drive)):>_
176 with{
177
178 dry = 1 - wetdry;
179
180 };
181
182 dist1(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry) <: (clipit: cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
183 with{
184
185 dry = 1 - wetdry;
186
187 };
188
189 dist2(drive,wetdry) =_<:(*(dry): gx_drive(drive)),(*(wetdry):val :distdrive(drive)):>_
190 with{
191
192 dry = 1 - wetdry;
193
194 };
195
196 dist4(drive,wetdry) =_<:(*(dry): gx_drive(drive)),
197 (*(wetdry) : val <:
198 (cubicnl(drive,0.0) : * (0.5)),distdrive(drive) :>_):>_
199 with{
200
201 dry = 1 - wetdry;
202
203 };
204
205 process = distdrive;
0 declare name "Tape Delay";
1 declare category "Echo / Delay";
2
3 import("music.lib");
4 import("effect.lib");
5 import("oscillator.lib");
6 import("guitarix.lib");
7
8 /*
9 HEAD SPACING
10
11 I have lold Selmer unit where playback heads are 1.5 inches apart
12 and record head is 1.8 inches from last playback so :
13
14
15 record - play4 - play 3 - play 2 - play 1
16
17 1.8 - 1.5 - 1.5 - 1.5 - 1.5
18
19 Se we have record -1.8inches - head1, 2.3 to head2, 3.8 to head3 5.3 to head 4 !
20 Or at 15ips head1 120ms head2 220ms head3 320ms head4 420ms
21
22 According to what I have read the heads are not parallel but output from each one is fed into next ??? What ??? Also max delay from one head is 425ms
23 Apparently originsl units has 23 inch tapes!
24
25 Actual topology
26 In -> stage1 -> pentode driver for record head ->play heads -> 2stage valve amp ->mixer->out and feedback to pentode
27 Sounds OK maybe too much bandwidth loss try cleaner path
28 Look ay adding soft clip before machine to simulate saturation
29 Frequency response of tape in copicat would be poor due to design and use
30 Tape usually has steep low end frop with a hump and not quite so steep high drop, maybe as for guitar we can lower this but would guess that should start around
31 40 - 80Hz steep highpass with possible hump ( ? resonant filter )
32 5- 6k lowpass
33 Am concerned that as each valve stage already has same lowapss filter that this
34 may have same effect as in real amp of creating a resonance an will try same solution : stagger filters and identify dominant one ( biggest effect ) and slug it or drastically reduce it.
35 */
36
37 // So we need multiple delay heads
38 // Each head can be bypassed or moved to alter delay time
39 // so tape speed in inches per second
40 // distance from record head in inches
41 // thus we get delay in milliseconds
42 speed = 7.5 ;
43 // The wow should be preset by experiment...
44 // Lets introduce just a little
45 sine(freq) = (oscs(freq) + 1) / 2 : max(0); // max(0) because of numerical inaccuracy
46 freq= 4 ; // 4Hz
47 depth = 0.005 ; // Play with this
48 wow = sine( freq) * depth ;
49 tapespeed = hgroup( "Tape Control",speed + wow );
50
51 // Control input level
52 input = hgroup( "Input", vslider("InputGain[style:knob]", 0, 0, 1.0, 0.01) );
53 gain = hgroup( "Output", vslider("OutputGain[style:knob]", 0, 0, 1.0, 0.01));
54 echo = hgroup( "Echo", vslider("Swell[style:knob]", 0, 0, 1, 0.1)) ;
55 feedback = hgroup( "Echo", vslider("Sustain[style:knob]", 0, 0.0, 0.95, 0.01));
56
57 dtime1 = SR*( 1.5/tapespeed) ;
58 dtime2 = SR*( 3.0/tapespeed) ;
59 dtime3 = SR*( 4.5/tapespeed ) ;
60 dtime4 = SR*( 6.0/tapespeed ) ;
61
62 head1 = sdelay(N, interp, dtime1):*(checkbox("Head1")) with {
63 interp = SR/10.0; // 100*SER/1000
64 N = int( 2^19 ) ;
65 };
66 head2 = sdelay(N, interp, dtime2):*(checkbox("Head2")) with {
67 interp = 100*SR/1000.0;
68 N = int( 2^19 ) ;
69 };
70 head3 = sdelay(N, interp, dtime3):*(checkbox("Head3")) with {
71 interp = 100*SR/1000.0;
72 N = int( 2^19 ) ;
73 };
74 head4 = sdelay(N, interp, dtime4):*(checkbox("Head4")) with {
75 interp = 100*SR/1000.0;
76 N = int( 2^19 ) ;
77 };
78
79 // Added gain reduction to get unity gain at 0dB ( trial and error for each stage )
80 // Real tube values
81 // Fk Rk Vk
82 // 1500 1.3
83 // 2700 1,83
84 // 820 0.96
85 stage1 = tubestage(TB_12AX7_68k,2.1,1500.0,1.204541) ; // Gain 2.9 2nd -29.8 3rd -26.24
86 // End amp is 2 stages of 12AX7 with 100K anode and 3k3 and then 2k2 cathode!
87 // Tube details 3k3 cathode res 2.637334 vk0
88 // Tube details 2k2 cathode res 2.426864 vk0
89 stage2 =tubestage(TB_12AX7_250k,2.1,3300.0,2.637334) ;
90 stage3 =tubestage(TB_12AX7_250k,2.1, 2200.0,2.426864) ;
91
92 // IN real machine the ECHO level control is after the last 2 stages of valves
93 machine = vgroup( "Tape Heads", highpass( 4, 40 )<:head1,head2,head3:>lowpass( 1, 6500 ):dcblocker:*(echo) );
94
95 fbloop = lowpass( 1, 7500 ):*(feedback):*(0.5):highpass( 1, 125 ) ;
96
97 process = highpass( 1, 80 ):*(input):stage1<:_,(+:_<:machine :>stage2:stage3)~fbloop:>*(gain);
98
0 import("music.lib");
1 import("guitarix.lib");
2
3 fb_combii (maxdel,N,b0,aN) = (+ <: delay(maxdel,N),_) ~ *(-aN) : !,*(b0);
4 rev1i(maxdel,N,g) = fb_combii (maxdel,N,1,-g);
5
6 allpass_combi(maxdel,N,aN) = (+ <:
7 delay(maxdel,N-1),*(aN)) ~ *(-aN)
8 : mem,_ : + ;
9 rev2i(maxlen,len,g) = allpass_combi(maxlen,len,-g);
10
11 sat_rev = *(0.2) <: comb_bank :> allpass_chain with {
12
13 rev1N = rev1i;
14
15 rev11(len,g) = rev1N(1024,len,g);
16 rev12(len,g) = rev1N(2048,len,g);
17
18 comb_bank =
19 rev11( 778,.827),
20 rev11( 901,.805),
21 rev11(1011,.783),
22 rev12(1123,.764);
23
24 rev2N = rev2i;
25
26 allpass_chain =
27 rev2N(128,125,0.7) :
28 rev2N( 64, 42,0.7) :
29 rev2N( 16, 12,0.7);
30 };
31
32 wet_dry = vslider(".amp.wet_dry", 0, -1, 1, 0.01);
33 //wet_dry = vslider(".amp.wet_dry[name:wet/dry]", 100, 0, 100, 1) : /(100);
34 //dry = 1 - wet_dry;
35
36 switch = checkbox(".amp.feed_on_off[name:reverb_on_of]");
37 //s_reverb = _ <: select2(switch, _, ( _<:*(dry),(*(wet_dry):sat_rev):>_));
38 s_reverb = select2(switch, _, (wet_dry_mix(wet_dry,sat_rev)));
39
40 process = (s_reverb) <: _,_;
41
42 //process = _ <: _,_;
43
0 declare id "metal"; // in amp tube selector
1 declare name "GxMetal_head";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8
9
10 tstack = component("tonestack_bm.dsp");
11 tone = tstack[tse=tstack.ts.fender_deville;];
12
13 overdrive(drive,x) = (x*(abs(x) + drive)/(x*x + (drive-1)*abs(x) + 1)) ;
14
15
16 sharp = 10.0;
17 press = 5 * sharp;
18
19 attack = 0.005;
20 release = 10;
21 knee = 10.5;
22 ratio = 1.5;
23
24 env = abs : max(1);
25
26 compress(env) = level * (1-r)/r
27 with {
28 level = env : h ~ _ : linear2db : (_ + press) : max(0)
29 with {
30 h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
31 ga = exp(-1/(SR*attack));
32 gr = exp(-1/(SR*release));
33 };
34 p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
35 r = 1 - p + p * ratio;
36 };
37
38 sharper(x) = g(x) * x
39 with {
40 g = env : compress + sharp : db2linear;
41 };
42
43 /****************************************************************
44 ** Tube Preamp Emulation stage 1 - 2
45 */
46
47 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
48 hgroup("stage2", stage2) : tone :
49 hgroup("stage3", stage3)
50 with {
51 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : *(preamp):
52 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285);
53 stage2 = lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840703) : *(gain1) ;
54 stage3 = sharper<:(tubestage(TB_6V6_68k,6531.0,410.0,0.664541),
55 tubestage(TB_6V6_250k,6531.0,410.0,0.659761)):> lowpass(1,6531.0) ;
56 };
57
58 process = lowpass(1,6531.0) : overdrive(drive) : tubeax(preamp,gain1) : div_drive with {
59 drive = vslider("drive", 1, 1, 20, 0.1);
60 div_drive = *((drive*-0.4):db2linear : smoothi(0.999));
61 preamp = ampctrl.preamp;
62 gain1 = ampctrl.gain1;
63 };
0 declare id "metal"; // in amp tube selector
1 declare name "GxMetal_head";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** Tube Preamp Emulation stage 1 - 2
10 */
11
12 tubeax(preamp,gain1) = hgroup("stage1", stage1) :
13 hgroup("stage2", stage2) : tone :
14 hgroup("stage3", stage3)
15 with {
16 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656) : *(preamp):
17 lowpass(1,6531.0) : tubestage(TB_12AX7_250k,132.0,1500.0,1.204285);
18 stage2 = lowpass(1,6531.0) : tubestage(TB_12AX7_250k,194.0,820.0,0.840703) : *(gain1) ;
19 tone = component("bigmuff.dsp").bigmuff ;
20 stage3 = _<:(tubestage(TB_6V6_68k,6531.0,410.0,0.664541),
21 tubestage(TB_6V6_250k,6531.0,410.0,0.659761)):> lowpass(1,6531.0) ;
22 };
23
24 process = component("gxdistortion.dsp").distdrive1(drive) :
25 tubeax(preamp,gain1) : div_drive with {
26 drive = ampctrl.drive;
27 div_drive = *((drive*-12):db2linear : smoothi(0.999));
28 preamp = ampctrl.preamp;
29 gain1 = ampctrl.gain1;
30 };
0 declare id "noamp"; // in amp tube selector
1 declare name "---";
2
3 import("guitarix.lib");
4
5 process = *(gain1) with {
6 gain1 = ampctrl.gain1;
7 };
0 // Simple Tilt tone control
1 declare name "Gx Tilt Tone";
2 declare category "Distortion";
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8
9 stage1 = tubestage(TB_12AX7_68k,86.0,2700.0,1.581656);
10 tone = component("bigmuff.dsp").bigmuff ;
11 process = *(drive):stage1:tone:*(preamp):lowpass(1,6531):stage1:/(drive) with{
12 preamp = vslider("Gain[alias][style:knob]",0,0,20,0.1) : db2linear : smoothi(0.999);
13 drive = vslider("Drive[alias][style:knob]",0,0,20,0.1) : db2linear : smoothi(0.999);
14 };
0 declare name "Tube Delay";
1 declare category "Echo / Delay";
2
3
4 import("music.lib");
5 import("guitarix.lib");
6
7 level = vslider("level[style:knob]", 0, 0, 10, 0.1)/10;
8 gain = vslider("gain[style:knob]", 0, -30, 6, 0.1) : db2linear : smoothi(0.999);
9 feedback = vslider("feedback[style:knob]", 0, 0.0, 10, 0.1)/10;
10 dtime = hslider("delay[unit:ms][style:knob]", 0, 0.1, 5000, 0.1)*SR/1000.0;
11
12 // Added gain reduction to get unity gain at 0dB ( trial and error for each stage )
13 // Real tube values
14 // Fk Rk Vk
15 // 1500 1.3
16 // 2700 1,83
17 // 820 0.96
18 stage1 = tubestage(TB_12AX7_68k,2.1,1500.0,1.204541):lowpass( 1, 6531 ) ; // Gain 2.9 2nd -29.8 3rd -26.24
19 stage2 = tubestage(TB_12AX7_250k,2.1,1500.0,1.204285) :lowpass( 1, 6531 ); // Gain 2.41 2nd -34.34 3rd -23.36
20
21 interp = 100*SR/1000.0;
22
23 // for a 5 sec delay, mem size of 262144 will be enough
24 N = int( 2^18 ) ;
25 delayed = sdelay(N, interp, dtime) ;
26
27 // added a delay bypass output to get a real tape delay,
28 // and a low/highpass filter section in the feedback loop
29 // to avoid self oscillation
30
31 process = stage1:_<:((+:_<:_ ,( delayed:*(level)) :>_)~(*(feedback): highpass(1,120):lowpass(1,12000))):>_:*(gain):stage2;
0 declare name "Tube Tremolo";
1 declare category "Modulation";
2
3 /*
4 ** Model of a vactrol tremolo unit by "transmogrify"
5 ** c.f. http://sourceforge.net/apps/phpbb/guitarix/viewtopic.php?f=7&t=44&p=233&hilit=transmogrifox#p233
6 ** http://transmogrifox.webs.com/vactrol.m
7 */
8
9 import("music.lib");
10 import("oscillator.lib");
11
12 import("guitarix.lib");
13 /* vactrol model */
14
15 R1 = 2700;
16 Ra = 1e6;
17 Rb = 300;
18 b = exp(log(Ra)/log(Rb)) - exp(1);
19 dTC = 0.06;
20 minTC = log(0.005/dTC);
21
22 cds = ((_ <: _,_),_ : _+(1-alpha)*_) ~ (_<:*(alpha)) with {
23 iSR = 1/SR;
24 dRC = dTC * exp(*(minTC));
25 alpha = 1 - iSR / (dRC + iSR);
26 };
27
28 vactrol = pow(_,1.9) : cds : *(b) + exp(1) : exp(log(Ra)/log) : R1/(_ + R1);
29
30
31 /* triangle oscillator (not bandlimited, frequency is approximate) */
32
33 trianglewave(freq) = _ ~ (_ <: _ + hyst) : /(periodsamps) with {
34 if(c,t,e) = select2(c,e,t);
35 hyst(x) = if(_ > 0, 2 * (x < periodsamps) - 1, 1 - 2 * (x > 0)) ~ _;
36 periodsamps = int(SR / (2*float(freq)));
37 };
38
39 /* tremolo unit, using triangle or sine oscillator as lfo */
40
41 tremolo(freq, depth) = lfo * depth + 1 - depth : vactrol with {
42 sine(freq) = (oscs(freq) + 1) / 2 : max(0); // max(0) because of numerical inaccuracy
43 SINE=checkbox("SINEWAVE[enum:triangle|sine]");
44 lfo = select2(SINE, trianglewave(freq), sine(freq));
45 };
46
47 stage1 = tubestage(TB_12AX7_68k,2.1,1500.0,1.204541) ; // Gain 2.9 2nd -29.8 3rd -26.24
48 stage2 = tubestage(TB_12AX7_250k,2.1,1500.0,1.204285) ; // Gain 2.41 2nd -34.34 3rd -23.36
49 gain = vslider("Gain[style:knob]", 0, -12, 12, 0.1):db2linear: smoothi(0.999);
50
51 process = stage1:*(tremolo(vslider("speed[style:knob]",5,0.1,20,0.1),vslider("depth[style:knob]",0.5,0,1,0.01))):*(gain):stage2;
0 /*
1 Attempt at a true vibrato
2 And it works well!
3 Sounds very sweet with tubes wrapped
4
5 Need
6 LFO to modulate delay - LFO 5 - 14Hz
7 speed and depth
8 */
9 import("music.lib");
10 import("oscillator.lib");
11 import("guitarix.lib");
12
13
14 /* triangle oscillator (not bandlimited, frequency is approximate) */
15
16 trianglewave(freq) = _ ~ (_ <: _ + hyst) : /(periodsamps) with {
17 if(c,t,e) = select2(c,e,t);
18 hyst(x) = if(_ > 0, 2 * (x < periodsamps) - 1, 1 - 2 * (x > 0)) ~ _;
19 periodsamps = int(SR / (2*float(freq)));
20 };
21
22 /* vibrato unit, using triangle or sine oscillator as lfo
23 to modulate the delay time
24 */
25
26 vibrato = ((( lfo + 1 ) *5)+5)*depth with {
27 sine(freq) = (oscs(freq) + 1) / 2 : max(0); // max(0) because of numerical inaccuracy
28 SINE=checkbox("SINEWAVE[enum:triangle|sine]");
29 lfo = select2(SINE, trianglewave(freq), sine(freq));
30 freq = vslider("speed[style:knob]",5,0,14,0.1) ;
31 depth = vslider("depth[style:knob]",0.5,0,1,0.01) ;
32 };
33
34 delayed = sdelay(65536, interp, vibrato*SR/1000.0) with{
35 N = int(2^12); //65536
36 interp = 100.0 *SR/1000.0;
37 // interp = hslider("interpolation[unit:ms][style:knob]",10,1,100,0.1)*SR/1000.0;
38 dtime = hslider("delay[unit:ms][style:knob]", 0, 0, 14, 0.1)*SR/1000.0;
39 };
40 stage1 = tubestage(TB_12AX7_68k,120,1500.0,1.204541) ; // Gain 2.9 2nd -29.8 3rd -26.24
41 stage2 = lowpass( 1, 6531 ):tubestage(TB_12AX7_250k,80,1500.0,1.204285) ; // Gain 2.41 2nd -34.34 3rd -23.36
42 drive = vslider("gain[style:knob]", 0, -64, 6, 0.1) :db2linear: smoothi(0.999);
43 process = stage1:delayed:*(drive):stage2;
0 declare name "Treble boost";
1 declare category "Tone control";
2
3 import("filter.lib");
4
5 level = vslider("Level", 0, 0.5, 20, 0.5) ;
6 hfboost(level,fx,x) = x + (db2linear(level)-1)*highpass(1,fx,x);
7
8 process = hfboost(level, 1500);
0 declare id "IR";
1 declare name "ImpulseResponse";
2 declare category "Tone control";
3
4 declare version "0.01";
5 declare author "brummer";
6 declare license "BSD";
7 declare copyright "(c)brummer 2008";
8
9 import("math.lib");
10 import("music.lib");
11 import("effect.lib");
12 import("filter.lib");
13 import("guitarix.lib");
14
15 g3 = hslider("peak[tooltip:peak gain]", 1, 0, 10, 0.2);
16 fr = hslider("freq[tooltip:frequency (Hz)]", 440, 20, 12000, 10);
17 auto_ir = checkbox("auto_freq[name:auto freq][enum:manual|auto]") : clip(0, 1);
18
19 check_auto_ir(v) = select2(auto_ir, v, sym_clip(0.6));
20
21 feedbackcontroll(x) = firpart : + ~ feedback
22 with {
23 bw = hslider("bandwidth[tooltip:bandwidth (Hz)]", 100, 20, 20000, 10);
24 R = exp(0-PI*bw/SR); // pole radius [0 required]
25 A = 2*PI*fr/SR; // pole angle (radians pole = 2)
26 RR = R*R;
27 firpart = (x - x'') * g3 * ((1-RR)/2); // radius = 2
28 // time-domain coefficients ASSUMING ONE PIPELINE DELAY:
29 feedback(v) = 0 + R*check_auto_ir(2*cos(A),x)*v - RR*v';
30 };
31
32 process(x) = x + feedbackcontroll(x);
0 declare name "amp";
1
2 import("music.lib");
3 import("guitarix.lib");
4
5 gain = vslider("in_level[name:in / level]", 0, -40, 40, 0.1) : db2linear : smoothi(0.999);
6 process = *(gain);
0 declare id "low_highpass";
1 declare name "low high pass";
2 declare shortname "L/H/Filter";
3 declare category "Tone control";
4 declare groups ".low_high_pass.lhp[low_highpass], .low_high_pass.lhc[low_highcutoff]";
5
6 declare version "0.01";
7 declare author "brummer";
8 declare license "BSD";
9 declare copyright "(c)brummer 2008";
10
11 import("effect.lib");
12 import("guitarix.lib");
13 import("math.lib");
14
15 //-speaker emulation
16 sbp1 = vslider("low_freq[name:low freq][tooltip:low-freq cutoff Hz]",130,20,1000,10);
17 sbp2 = vslider("high_freq[name:high freq][tooltip:high-freq cutoff Hz]",5000,1000,12000,10);
18 switch1 = checkbox("on_off[name:low highcutoff]");
19 sbp = hgroup(".low_high_pass.lhc", bypass(switch1, +(anti_denormal_ac) : speakerbp(sbp1,sbp2)));
20
21
22 //------------------------------ low/high-passfilters --------------------------------------
23
24 tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
25
26 tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
27 with {
28 conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
29 conv2(k0,k1,x) = k0*x + k1*x';
30 sub(x,y) = y-x;
31 };
32
33 tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
34 with {
35 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
36 d = a0 + c;
37 b1d = (b0 - b1*c) / d;
38 b0d = (b0 + b1*c) / d;
39 a1d = (a0 - c) / d;
40 };
41
42 tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
43 with {
44 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
45 csq = c*c;
46 d = a0 + a1 * c + csq;
47 b0d = (b0 + b1 * c + b2 * csq)/d;
48 b1d = 2 * (b0 - b2 * csq)/d;
49 b2d = (b0 - b1 * c + b2 * csq)/d;
50 a1d = 2 * (a0 - csq)/d;
51 a2d = (a0 - a1*c + csq)/d;
52 };
53
54 lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
55 highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
56 lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
57 with {
58 lphpr(s,0,N,fc) = _;
59 lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
60 lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
61 parity = N % 2;
62 S = (O-parity)/2; // current section number
63 a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
64 w1 = 2*PI*fc;
65 };
66 };
67
68 //-low and highpass
69
70 lowpassfreq = nentry("low_freq[name:low freq]", 5000, 20, 12000, 10);
71 highpassfreq = nentry("high_freq[name:high freq]", 130, 20, 7040, 10);
72 switch = checkbox("on_off[name:low highpass]");
73 passo = +(anti_denormal_ac) : lowpassN(1,lowpassfreq) : highpassN(1,highpassfreq);
74 pass = hgroup(".low_high_pass.lhp", bypass(switch, passo));
75
76 process = pass : sbp ;
0 declare id "moog";
1 declare name "Moog Filter";
2 declare category "Tone control";
3 declare license "BSD";
4
5
6 import("effect.lib");
7 import("guitarix.lib");
8
9 Q = hslider("Q", 1, 0, 4, 0.1);
10 fr = hslider("fr", 3000, 440, 6000, 10): smoothi(0.999);
11
12 process = ( +(anti_denormal_ac): moogvcfN(Q,fr)), (+(anti_denormal_ac): moogvcfN(Q,fr));
0 declare id "MultiBandFilter";
1 declare version "1.0";
2 declare author "Grame";
3 declare license "BSD";
4 declare copyright "(c)GRAME 2006";
5
6 import("math.lib");
7 import("music.lib");
8 import("guitarix.lib");
9
10
11 //------------------------- Process --------------------------------
12
13
14 process = ifilter(vslider("Q31_25", 50, 1, 100, 1), 31.25, vslider("f31_25[tooltip:gain (dB) at 31.25 Hz]", 0, -50, 10, 0.1))
15 : ifilter(vslider("Q62_5", 50, 1, 100, 1), 62.5, vslider("f62_5 [tooltip:gain (dB) at 62.5 Hz] ", 0, -50, 10, 0.1))
16 : ifilter(vslider("Q125", 50, 1, 100, 1), 125, vslider("f125 [tooltip:gain (dB) at 125 Hz] ", 0, -50, 10, 0.1))
17 : ifilter(vslider("Q250", 50, 1, 100, 1), 250, vslider("f250 [tooltip:gain (dB) at 250 Hz] ", 0, -50, 10, 0.1))
18 : ifilter(vslider("Q500", 50, 1, 100, 1), 500, vslider("f500 [tooltip:gain (dB) at 500 Hz] ", 0, -50, 10, 0.1))
19 : ifilter(vslider("Q1k", 50, 1, 100, 1), 1000, vslider("f1k [tooltip:gain (dB) at 1 kHz] ", 0, -50, 10, 0.1))
20 : ifilter(vslider("Q2k", 50, 1, 100, 1), 2000, vslider("f2k [tooltip:gain (dB) at 2 kHz] ", 0, -50, 10, 0.1))
21 : ifilter(vslider("Q4k", 50, 1, 100, 1), 4000, vslider("f4k [tooltip:gain (dB) at 4 kHz] ", 0, -50, 10, 0.1))
22 : ifilter(vslider("Q8k", 50, 1, 100, 1), 8000, vslider("f8k [tooltip:gain (dB) at 8 kHz] ", 0, -50, 10, 0.1))
23 : ifilter(vslider("Q16k", 50, 1, 100, 1),16000, vslider("f16k [tooltip:gain (dB) at 16 kHz] ", 0, -50, 10, 0.1))
24 ;
0 declare id "shaper";
1 declare name "Shaper";
2
3 import("music.lib");
4
5 sharp = vslider("sharper[name:sharper]", 1, 1, 10, 1);
6 press = 5 * sharp;
7
8 attack = 0.005;
9 release = 10;
10 knee = 10.5;
11 ratio = 1.5;
12
13 env = abs : max(1);
14
15 compress(env) = level * (1-r)/r
16 with {
17 level = env : h ~ _ : linear2db : (_ + press) : max(0)
18 with {
19 h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
20 ga = exp(-1/(SR*attack));
21 gr = exp(-1/(SR*release));
22 };
23 p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
24 r = 1 - p + p * ratio;
25 };
26
27 process(x) = g(x) * x
28 with {
29 g = env : compress + sharp : db2linear;
30 };
0 import("math.lib");
1
2 ngate = fvariable(float ngate, <math.h>);
3
4 process = *(ngate);
0 declare id "withe_noise"; //
1 declare name "withe noise";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** noise to avoid denormals
10 */
11
12
13 randomr = +(12345)~*(1103515245);
14 noiser = (randomr/2147483647.0) * 0.00000000001;
15
16
17
18 process = + ( noiser);
0 declare id "tube2";
1
2 import("music.lib");
3 import("effect.lib");
4 import("guitarix.lib");
5
6 resonator = (+ <: (delay(4096, d-1) + delay(4096, d))/2.0)~*(1.0-a)
7 with {
8 //d = vslider("vibrato", 0.5, 0, 1, 0.01);
9 d = 1 - vslider("vibrato", 1, 0, 0.99, 0.01);
10 //a = vslider("trigger[name:resonanz]", 0.12, 0, 1, 0.01);
11 a = 0.9 - vslider("resonanz", 0.5, 0, 0.9, 0.01);
12 };
13
14 //fuzzy = vslider("fuzzy[name:tube]", 0.5, 0, 1, 0.01);
15 fuzzy = vslider("fuzzy[name:tube]", 1, -3, 10, 1);
16
17 tube1 = component("HighShelf.dsp").hs : nonlin1 : resonator : +(anti_denormal_ac) : speakerbp(130,5000) * fuzzy * 0.5;
18 process(x) = x + tube1(x) : sym_clip(0.7);
0 declare name "amp";
1
2 import("music.lib");
3 import("guitarix.lib");
4
5 gain = vslider("out_master[name:out / master]", 0, -40, 40, 0.1) : db2linear : smoothi(0.999);
6 process = *(gain);
0 declare name "Overdrive";
1 declare category "Distortion";
2
3 import("music.lib");
4 import("guitarix.lib");
5
6 drive = vslider("drive", 1, 1, 20, 0.1);
7 f = drive * -0.5 : db2linear : smoothi(0.999);
8
9 wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
10 dry = 1 - wet;
11
12 overdrive(x) = (x*(abs(x) + drive)/(x*x + (drive-1)*abs(x) + 1)) * f;
13
14
15 process = _<:*(dry),(*(wet) : overdrive):>_;
0 declare id "phaser";
1 declare name "Phaser";
2 declare category "Modulation";
3
4 //phaser taken from effect.lib
5 // by Julius O. Smith III
6
7
8 import("effect.lib");
9 import("oscillator.lib");
10
11 vibrato_mono(sections,phase01,fb,width,frqmin,fratio,frqmax,speed) =
12 (+ : seq(i,sections,ap2p(R,th(i)))) ~ *(fb)
13 with {
14 tf2 = component("filter.lib").tf2;
15 // second-order resonant digital allpass given pole radius and angle:
16 ap2p(R,th) = tf2(a2,a1,1,a1,a2) with {
17 a2 = R^2;
18 a1 = -2*R*cos(th);
19 };
20 SR = component("music.lib").SR;
21 R = exp(-pi*width/SR);
22 cososc = component("oscillator.lib").oscrc;
23 sinosc = component("oscillator.lib").oscrs;
24 osc = cososc(speed) * phase01 + sinosc(speed) * (1-phase01);
25 lfo = (1-osc)/2; // in [0,1]
26 pi = 4*atan(1);
27 thmin = 2*pi*frqmin/SR;
28 thmax = 2*pi*frqmax/SR;
29 th1 = thmin + (thmax-thmin)*lfo;
30 th(i) = (fratio^(i+1))*th1;
31 };
32
33 phaser_mono(Notches,phase01,width,frqmin,fratio,frqmax,speed,depth,fb,invert) =
34 _ <: *(g1) + g2mi*vibrato_mono(Notches,phase01,fb,width,frqmin,fratio,frqmax,speed)
35 with { // depth=0 => direct-signal only
36 g1 = 1-depth/2; // depth=1 => phaser mode (equal sum of direct and allpass-chain)
37 g2 = depth/2; // depth=2 => vibrato mode (allpass-chain signal only)
38 g2mi = select2(invert,g2,-g2); // inversion negates the allpass-chain signal
39 };
40
41 phaser_stereo(Notches,width,frqmin,fratio,frqmax,speed,depth,fb,invert)
42 = phaser_mono(Notches,0,width,frqmin,fratio,frqmax,speed,depth,fb,invert),
43 phaser_mono(Notches,1,width,frqmin,fratio,frqmax,speed,depth,fb,invert);
44
45 phaser_stereogx = *(level),*(level) : phaser_stereo(Notches,width,frqmin,fratio,frqmax,freq,mdepth,fb,invert)
46 with {
47 Notches = 4;
48 freq = hslider("Speed [unit:Hz] ", 0.5, 0, 10, 0.01);
49
50 depth = hslider("depth", 1, 0, 1, 0.01);
51 fb = hslider("feedback gain", 0, 0, 1, 0.01);
52 width = hslider("Notch width [unit:Hz]", 1000, 10, 5000, 1);
53 vibr = checkbox("VibratoMode[enum:direct | vibrato]");
54 frqmin = hslider("MinNotch1Freq [unit:Hz] ", 100, 20, 5000, 1);
55 frqmax = hslider("MaxNotch1Freq [unit:Hz] ", 800, 20, 10000, 1) : max(frqmin);
56 fratio = hslider("NotchFreq", 1.5, 1.1, 4, 0.01);
57 mdepth = select2(vibr,depth,2);
58
59 invert = checkbox("invert[enum:linear|invert]");
60 level = hslider("level [unit:dB]", 0, -60, 10, 0.1) : db2linear;
61
62 };
63
64 process = phaser_stereogx;
0 declare id "phaser_mono";
1 declare name "Phaser Mono";
2 declare category "Modulation";
3
4 import("effect.lib");
5
6
7 phaser_monogx = *(level): component("phaser.dsp").phaser_mono(Notches,0,width,frqmin,fratio,frqmax,freq,mdepth,fb,invert)
8 with {
9 Notches = 4;
10 freq = hslider("Speed [unit:Hz] ", 0.5, 0, 10, 0.01);
11
12 depth = 1 ;//hslider("depth", 1, 0, 1, 0.01);
13 fb = 0.5 ;//hslider("feedback gain", 0, 0, 1, 0.01);
14 width = 1000 ;//hslider("Notch width [unit:Hz]", 1000, 10, 5000, 1);
15 vibr = 1 ;//checkbox("VibratoMode[enum:direct | vibrato]");
16 frqmin = 100 ;//hslider("MinNotch1Freq [unit:Hz] ", 100, 20, 5000, 1);
17 frqmax = 800: max(frqmin) ;//hslider("MaxNotch1Freq [unit:Hz] ", 800, 20, 10000, 1) : max(frqmin);
18 fratio = 2.0 ;//hslider("NotchFreq", 1.5, 1.1, 4, 0.01);
19 mdepth = 2 ;//select2(vibr,depth,2);
20
21 invert = 1 ;//checkbox("invert[enum:linear|invert]");
22 level = hslider("level [unit:dB]", 0, -60, 10, 0.1) : db2linear;
23
24 };
25
26 wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
27 dry = 1 - wet;
28
29 process = _<:*(dry),(*(wet): phaser_monogx ):>_;
0 //declare name "preamp";
1
2 import("guitarix.lib");
3
4 fatan = vslider("atan[name:drive][tooltip:Input level for pre-amp (higher level gives more distortion)]", 1, 1, 10, 1);
5 moving_filter(x) = (x+x'+x'')/3;
6 nonlin1p(x) = (x-0.15*x*x)-(0.15*(x+anti_denormal_ac)*x*x);
7 nonlin2p(x) = 1.5*x - 0.5*(x+anti_denormal_ac)*x*x;
8 normalize(fatan) = 1/atan(fatan) * atan(_*fatan);
9 process = moving_filter : nonlin1p : nonlin2p : normalize(fatan)*0.75 : moving_filter;
10 /*
11 ** old definition was:
12 ** moving_filter*0.001 : nonlin1 : nonlin2 : normalize(fatan)*750;
13 */
0 //declare name "Preamp Impulse Former";
1 declare id "pre";
2
3 import("music.lib");
4 import("guitarix.lib");
5
6 gain = vslider("Level[alias]", 1, 0.1, 2.1, 0.1) ;
7
8 bass_gain = vslider("bass[name:bass][alias]", 0, -10, 10, 0.5);
9
10 treble_gain = vslider("treble[name:treble][alias]", 0, -10, 10, 0.5);
11
12 tone = component("tone.dsp").gxlow_shelf(300,bass_gain):
13 component("tone.dsp").gxhigh_shelf(2400,treble_gain);
14
15 process = tone : *(gain * pow(10, -0.1 * gain)); // FIXME
0 declare id "con";
1
2 import("music.lib");
3 import("guitarix.lib");
4
5 gain = vslider("Level[alias]", 1, 0.5, 5, 0.5);
6
7 process = *(gain * pow(10, -0.1 * gain)); // FIXME
0 declare id "tube2";
1 import("music.lib");
2 import("guitarix.lib");
3
4 resonator = (+ <: (delay(4096, d-1) + delay(4096, d))/2.0)~*(1.0-a)
5 with {
6 //d = vslider("vibrato", 0.5, 0, 1, 0.01);
7 d = 1 - vslider("vibrato[alias]", 1, 0, 1, 0.01);
8 //a = vslider("trigger", 0.12, 0, 1, 0.01);
9 a = 0.9 - vslider("resonanz[alias]", 0.5, 0, 0.9, 0.01);
10 };
11
12 //fuzzy = vslider("fuzzy", 0.5, 0, 1, 0.01);
13 fuzzy = vslider("fuzzy[name:tube][alias]", 1, -3, 10, 1);
14 tube1 = nonlin1 : resonator * fuzzy * 0.5 : sym_clip(0.7) : neg;
15
16 process = add_dc <: _ + tube1 : sym_clip(0.7);
0 declare id "eqs";
1 declare name "Scaleable EQ";
2 declare category "Tone control";
3 declare license "BSD";
4 declare copyright "(c)GRAME 2006";
5
6 import("math.lib");
7 import("music.lib");
8 import("guitarix.lib");
9
10
11 //------------------------- Process --------------------------------
12
13
14 process = ifilter(vslider("Qs31_25", 50, 1, 100, 1), vslider("freq31_25 [tooltip:Hz]",31, 20, 20000, 1), vslider("fs31_25[tooltip:gain (dB) at 31.25 Hz]", 0, -50, 10, 0.1))
15 : ifilter(vslider("Qs62_5", 50, 1, 100, 1), vslider("freq62_5 [tooltip:Hz]",62, 20, 20000, 1), vslider("fs62_5 [tooltip:gain (dB) at 62.5 Hz]", 0, -50, 10, 0.1))
16 : ifilter(vslider("Qs125", 50, 1, 100, 1), vslider("freq125 [tooltip:Hz]",125., 20, 20000, 1), vslider("fs125 [tooltip:gain (dB) at 125 Hz]", 0, -50, 10, 0.1))
17 : ifilter(vslider("Qs250", 50, 1, 100, 1), vslider("freq250 [tooltip:Hz]",250., 20, 20000, 1), vslider("fs250 [tooltip:gain (dB) at 250 Hz]", 0, -50, 10, 0.1))
18 : ifilter(vslider("Qs500", 50, 1, 100, 1), vslider("freq500 [tooltip:Hz]",500., 20, 20000, 1), vslider("fs500 [tooltip:gain (dB) at 500 Hz]", 0, -50, 10, 0.1))
19 : ifilter(vslider("Qs1k", 50, 1, 100, 1), vslider("freq1k [tooltip:Hz]",1000., 20, 20000, 1), vslider("fs1k [tooltip:gain (dB) at 1 kHz]", 0, -50, 10, 0.1))
20 : ifilter(vslider("Qs2k", 50, 1, 100, 1), vslider("freq2k [tooltip:Hz]",2000., 20, 20000, 1), vslider("fs2k [tooltip:gain (dB) at 2 kHz]", 0, -50, 10, 0.1))
21 : ifilter(vslider("Qs4k", 50, 1, 100, 1), vslider("freq4k [tooltip:Hz]",4000., 20, 20000, 1), vslider("fs4k [tooltip:gain (dB) at 4 kHz]", 0, -50, 10, 0.1))
22 : ifilter(vslider("Qs8k", 50, 1, 100, 1), vslider("freq8k [tooltip:Hz]",8000., 20, 20000, 1), vslider("fs8k [tooltip:gain (dB) at 8 kHz]", 0, -50, 10, 0.1))
23 : ifilter(vslider("Qs16k", 50, 1, 100, 1),vslider("freq16k [tooltip:Hz]",16000., 20, 20000, 1), vslider("fs16k [tooltip:gain (dB) at 16 kHz]", 0, -50, 10, 0.1))
24 ;
0 declare id "sloop";
1 declare version "1.0";
2 declare author "brummer";
3 declare license "BSD";
4
5
6 import("music.lib");
7
8
9 B = checkbox("Capture"); // Capture sound while pressed
10 C = checkbox("Play");
11
12 I = int(B); // convert button signal from float to integer
13 R = (I-I') <= 0; // Reset capture when button is pressed
14 D = (+(I):*(R))~_; // Compute capture duration while button is pressed: 0..NNNN0..MMM
15
16
17 capture = ( *(B) : (+ : fdelay(2097152, D-1)) ~ *(1.0-B)) *(C);
18
19
20 smooth(c) = *(1-c) : +~*(c);
21 level = hslider("gain", 0, -96, 4, 0.1) : db2linear : smooth(0.999);
22
23 process = vgroup( "SampleLooper", _ <:_, (capture : *(level)):>_ ) ;
24
0 declare id "amp.clip";
1
2 import("math.lib");
3 import("guitarix.lib");
4 b = hslider(".amp.fuzz", 0.0, 0.0, 1.99, 0.01);
5 a = 2-b;
6 //cut(x) = (fabs (x-a) -fabs (x+a))*0.5;
7 r(x) = x-sym_clip(a*0.88);
8 process(x) = x:sym_clip(a*0.88) <:+(r(x)*0.33);
0 import("music.lib");
1 import("filter.lib");
2 import("effect.lib");
3 import("guitarix.lib");
4
5
6 /****************************************************************
7 ** Tube Preamp Emulation stage 3
8 */
9
10 process = hgroup("stage3", BP(stage3))
11 with {
12 stage3 = lowpass1(6531.0) : component("amp2.dsp").tubestage(TB_12AX7_250k,194.0,820.0,0.840703) : *(gain3) with {
13 gain3 = vslider("gain3", 6, -10.0, 20.0, 0.1) : db2linear : smoothi(0.999);
14 };
15 };
0 declare id "withe_noise_stereo"; //
1 declare name "withe noise_stereo";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 /****************************************************************
9 ** noise to avoid denormals
10 */
11
12
13 randomr = +(12345)~*(1103515245);
14 noiser = (randomr/2147483647.0) * 0.00000000001;
15
16
17
18 process = + ( noiser), + ( noiser);
0 declare name "Stereo Delay";
1 declare category "Echo / Delay";
2
3 import("music.lib");
4 import("guitarix.lib");
5 msec = SR/1000.0;
6
7 lfol = component("oscillator.lib").oscrs; // sine for left channel
8
9 freq = hslider("LFO freq [unit:Hz]", 0.2, 0, 5, 0.01);
10 pingpong = checkbox("invert[enum:linear|pingpong]");
11 l_gain = vslider("l_gain", 0, -20, 20, 0.1) : db2linear : smoothi(0.999);
12 r_gain = vslider("r_gain", 0, -20, 20, 0.1) : db2linear : smoothi(0.999);
13 d = vslider("l_delay", 0, 0, 5000, 10)*msec;
14 r = vslider("r_delay", 0, 0, 5000, 10)*msec;
15 process = (_ <: _ + l_gain*(1-(lfol(freq)*pingpong)) * sdelay(262144, 1024, d) :> _),
16 (_ <: _ + r_gain*(1-((-1*lfol(freq))*pingpong)) * sdelay(262144, 1024, r) :> _);
17
0 declare name "Stereo Echo";
1 declare category "Echo / Delay";
2
3 import("music.lib");
4 import("guitarix.lib");
5 msec = SR/1000.0;
6
7
8 lfol = component("oscillator.lib").oscrs; // sine for left channel
9
10 freq = hslider("LFO freq [unit:Hz]", 0.2, 0, 5, 0.01);
11 pingpong = checkbox("invert[enum:linear|pingpong]");
12
13 tl = vslider("time_l", 1, 1, 2000, 1);
14 releasel = vslider("percent_l", 0, 0, 100, 0.1);
15 tr = vslider("time_r", 1, 1, 2000, 1);
16 releaser = vslider("percent_r", 0, 0, 100, 0.1);
17
18 echo1 = +~(sdelay(131072, 1024, int(tl*millisec)-1) * ((releasel/100.0)*(1-(lfol(freq)*pingpong))) );
19 echo2 = +~(sdelay(131072, 1024, int(tr*millisec)-1) * ((releaser/100.0)*(1-((-1*lfol(freq))*pingpong))) );
20 process = echo1,echo2;
0 declare name "Stereo Verb";
1 declare category "Reverb";
2 declare version "0.01";
3 declare author "brummer";
4 declare license "BSD";
5 declare copyright "(c)brummer 2008";
6
7 import("math.lib");
8 import("music.lib");
9 import("effect.lib");
10 import("filter.lib");
11
12 /*-----------------------------------------------
13 freeverb by "Grame"
14 -----------------------------------------------*/
15
16 // Filter Parameters
17
18 combtuningL1 = 1116;
19 combtuningL2 = 1188;
20 combtuningL3 = 1277;
21 combtuningL4 = 1356;
22 combtuningL5 = 1422;
23 combtuningL6 = 1491;
24 combtuningL7 = 1557;
25 combtuningL8 = 1617;
26
27 allpasstuningL1 = 556;
28 allpasstuningL2 = 441;
29 allpasstuningL3 = 341;
30 allpasstuningL4 = 225;
31
32 roomsizeSlider = vslider("RoomSize", 0.5, 0, 1, 0.025)*0.28 + 0.7;
33 dampslider = vslider("damp",0.5, 0, 1, 0.025);
34 combfeed = roomsizeSlider;
35 //wetslider = 0.5 + vslider("wet_dry[name:wet/dry]", 0, -0.5, 0.5, 0.1);
36 wet_dry = vslider("wet_dry[name:wet/dry]", 50, 0, 100, 1) : /(100);
37 dry = 1 - wet_dry;
38
39 // Comb and Allpass filters
40
41 allpass(dt,fb) = (_,_ <: (*(fb),_:+:@(dt)), -) ~ _ : (!,_);
42 comb(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb));
43
44 // Reverb components
45
46 monoReverb(fb1, fb2, damp, spread)
47 = _ <: comb(combtuningL1+spread, fb1, damp),
48 comb(combtuningL2+spread, fb1, damp),
49 comb(combtuningL3+spread, fb1, damp),
50 comb(combtuningL4+spread, fb1, damp),
51 comb(combtuningL5+spread, fb1, damp),
52 comb(combtuningL6+spread, fb1, damp),
53 comb(combtuningL7+spread, fb1, damp),
54 comb(combtuningL8+spread, fb1, damp)
55 +>
56 allpass (allpasstuningL1+spread, fb2)
57 : allpass (allpasstuningL2+spread, fb2)
58 : allpass (allpasstuningL3+spread, fb2)
59 : allpass (allpasstuningL4+spread, fb2)
60 ;
61
62 //----------------------------------------------------------------
63
64 lfol = component("oscillator.lib").oscrs; // sine for left channel
65
66 freq = hslider("LFO freq [unit:Hz]", 0.2, 0, 5, 0.01);
67 pingpong = checkbox("invert[enum:linear|pingpong]");
68
69 fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
70
71 freeverb_r = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(lfol(freq)*pingpong))):>_);
72 freeverb_l = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(-1*lfol(freq)*pingpong))):>_);
73 process = freeverb_r, freeverb_l;
0 declare id "amp.tone";
1 declare version "0.01";
2 declare author "brummer";
3 declare license "BSD";
4 declare copyright "(c)brummer 2008";
5
6 import("math.lib");
7 import("music.lib");
8 import("effect.lib");
9 import("filter.lib");
10 import("guitarix.lib");
11
12 /*-----------------------------------------------
13 The tone control
14 Low and high shelf filters, from Robert Bristow-Johnson's "Audio
15 EQ Cookbook", see http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt.
16 -----------------------------------------------*/
17
18 filter(b0,b1,b2,a0,a1,a2) = f : (+ ~ g)
19 with {
20 f(x) = (b0/a0)*x+(b1/a0)*x'+(b2/a0)*x'';
21 g(y) = 0-(a1/a0)*y-(a2/a0)*y';
22 };
23
24 gxlow_shelf(f0,g) = filter(b0,b1,b2,a0,a1,a2)
25 with {
26 S = 1;
27 A = pow(10,g/40);
28 w0 = 2*PI*f0/SR;
29 alpha = sin(w0)/2 * sqrt( (A + 1/A)*(1/S - 1) + 2 );
30
31 b0 = A*( (A+1) - (A-1)*cos(w0) + 2*sqrt(A)*alpha );
32 b1 = 2*A*( (A-1) - (A+1)*cos(w0) );
33 b2 = A*( (A+1) - (A-1)*cos(w0) - 2*sqrt(A)*alpha );
34 a0 = (A+1) + (A-1)*cos(w0) + 2*sqrt(A)*alpha;
35 a1 = -2*( (A-1) + (A+1)*cos(w0) );
36 a2 = (A+1) + (A-1)*cos(w0) - 2*sqrt(A)*alpha;
37 };
38
39 gxhigh_shelf(f0,g) = filter(b0,b1,b2,a0,a1,a2)
40 with {
41 S = 1;
42 A = pow(10,g/40);
43 w0 = 2*PI*f0/SR;
44 alpha = sin(w0)/2 * sqrt( (A + 1/A)*(1/S - 1) + 2 );
45
46 b0 = A*( (A+1) + (A-1)*cos(w0) + 2*sqrt(A)*alpha );
47 b1 = -2*A*( (A-1) + (A+1)*cos(w0) );
48 b2 = A*( (A+1) + (A-1)*cos(w0) - 2*sqrt(A)*alpha );
49 a0 = (A+1) - (A-1)*cos(w0) + 2*sqrt(A)*alpha;
50 a1 = 2*( (A-1) - (A+1)*cos(w0) );
51 a2 = (A+1) - (A-1)*cos(w0) - 2*sqrt(A)*alpha;
52 };
53
54
55 /* Fixed bass and treble frequencies.*/
56 bass_freq = 600;
57 treble_freq = 2400;
58
59 bass_gain = vslider("bass[name:bass]", 0, -20, 20, 0.1);
60 mid_gain = vslider("middle[name:middle]", 0, -20, 20, 0.1)/2;
61 treble_gain = vslider("treble[name:treble]", 0, -20, 20, 0.1);
62 tone(b,m,t) = gxlow_shelf(bass_freq,b-m) :
63 gxlow_shelf(treble_freq,m):
64 gxhigh_shelf(bass_freq,m) :
65 gxhigh_shelf(treble_freq,t-m);
66 process = add_dc :
67 gxlow_shelf(bass_freq,bass_gain-mid_gain) :
68 gxlow_shelf(treble_freq,mid_gain):
69 gxhigh_shelf(bass_freq,mid_gain) :
70 gxhigh_shelf(treble_freq,treble_gain-mid_gain);
0 declare id "tonemodul";
1 declare name "3 Band EQ";
2 declare category "Tone control";
3 declare version "0.01";
4 declare author "brummer";
5 declare license "BSD";
6 declare copyright "(c)brummer 2008";
7
8
9 import("math.lib");
10 import("music.lib");
11 import("effect.lib");
12 import("filter.lib");
13 import("guitarix.lib");
14 import("maxmsp.lib");
15
16 F = 600; //nentry("split_low_freq", 250, 20, 600, 10);
17 F1 = 1200; //nentry("split_middle_freq", 650, 600, 1250, 10);
18 F2 = 2400; //nentry("split_high_freq", 1250, 1250, 12000, 10);
19
20 /**********************************************************************
21 *** this part is included here for backward compatibility from 0.9.27 to
22 *** 0.9.24
23 ***********************************************************************/
24
25 //------------------------------ count and take --------------------------------------
26
27 countN ((xs, xxs)) = 1 + countN(xxs);
28 countN (xx) = 1;
29
30 takeN (1, (xs, xxs)) = xs;
31 takeN (1, xs) = xs;
32 takeN (nn, (xs, xxs)) = takeN (nn-1, xxs);
33
34 //------------------------------ low/high-passfilters --------------------------------------
35
36 tf1N(b0,b1,a1) = _ <: *(b0), (mem : *(b1)) :> + ~ *(0-a1);
37
38 tf2N(b0,b1,b2,a1,a2) = sub ~ conv2(a1,a2) : conv3(b0,b1,b2)
39 with {
40 conv3(k0,k1,k2,x) = k0*x + k1*x' + k2*x'';
41 conv2(k0,k1,x) = k0*x + k1*x';
42 sub(x,y) = y-x;
43 };
44
45 tf1sN(b1,b0,a0,w1) = tf1N(b0d,b1d,a1d)
46 with {
47 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
48 d = a0 + c;
49 b1d = (b0 - b1*c) / d;
50 b0d = (b0 + b1*c) / d;
51 a1d = (a0 - c) / d;
52 };
53
54 tf2sN(b2,b1,b0,a1,a0,w1) = tf2N(b0d,b1d,b2d,a1d,a2d)
55 with {
56 c = 1/tan((w1)*0.5/SR); // bilinear-transform scale-factor
57 csq = c*c;
58 d = a0 + a1 * c + csq;
59 b0d = (b0 + b1 * c + b2 * csq)/d;
60 b1d = 2 * (b0 - b2 * csq)/d;
61 b2d = (b0 - b1 * c + b2 * csq)/d;
62 a1d = 2 * (a0 - csq)/d;
63 a2d = (a0 - a1*c + csq)/d;
64 };
65
66 lowpassN(N,fc) = lowpass0_highpass1N(0,N,fc);
67 highpassN(N,fc) = lowpass0_highpass1N(1,N,fc);
68 lowpass0_highpass1N(s,N,fc) = lphpr(s,N,N,fc)
69 with {
70 lphpr(s,0,N,fc) = _;
71 lphpr(s,1,N,fc) = tf1sN(s,1-s,1,2*PI*fc);
72 lphpr(s,O,N,fc) = lphpr(s,(O-2),N,fc) : tf2sN(s,0,1-s,a1s,1,w1) with {
73 parity = N % 2;
74 S = (O-parity)/2; // current section number
75 a1s = -2*cos(-PI + (1-parity)*PI/(2*N) + (S-1+parity)*PI/N);
76 w1 = 2*PI*fc;
77 };
78 };
79
80 //------------------------------ analyzer --------------------------------------
81 analyzern(O,lfreqs) = _ <: bsplit(nb) with
82 {
83 nb = countN(lfreqs);
84 fc(n) = takeN(n, lfreqs);
85 lp(n) = lowpassN(O,fc(n));
86 hp(n) = highpassN(O,fc(n));
87 bsplit(0) = _;
88 bsplit(i) = hp(i), (lp(i) <: bsplit(i-1));
89 };
90
91 analyzerN(lfreqs) = analyzern(3,lfreqs);
92
93
94 filterbankn(O,lfreqs) = analyzern(O,lfreqs) : delayeq with
95 {
96 nb = count(lfreqs);
97 fc(n) = take(n, lfreqs);
98 ap(n) = highpass_plus_lowpass(O,fc(n));
99 delayeq = par(i,nb-1,apchain(nb-1-i)),_,_;
100 apchain(0) = _;
101 apchain(i) = ap(i) : apchain(i-1);
102 };
103
104 filterbankN(lfreqs) = filterbank(3,lfreqs);
105
106 /**********************************************************************
107 *** end for backward compatibility from 0.9.27 to
108 *** 0.9.24 , it could removed when switch completly to > 0.9.27
109 ***********************************************************************/
110
111 //----------tone_controll---------
112
113 t = vslider("Treble", 0., -5., 5, 0.01): db2linear : smoothi(0.999);
114 m = vslider("Middle", 0., -5., 5, 0.01): db2linear : smoothi(0.999);
115 l = vslider("Bass", 0., -5., 5, 0.01): db2linear : smoothi(0.999) ;
116
117
118 //tstack = component("tonestack.dsp");
119 sharp = vslider("sharper[name:sharper]", -2, -2.5, 5, 0.1);
120 press = -5. * sharp;
121
122 attack = 0.005;
123 release = 5.0;
124 knee = 10.5;
125 ratio = 3.0;
126
127 env = abs : max(1);
128
129 compress(env) = level * (1-r)/r
130 with {
131 level = env : h ~ _ : linear2db : (_ - press ) : max(0)
132 with {
133 h(x,y) = f*x+(1-f)*y with { f = (x<y)*ga+(x>=y)*gr; };
134 ga = exp(-1/(SR*attack));
135 gr = exp(-1/(SR*release));
136 };
137 p = level/(knee+eps) : max(0) : min(1) with { eps = 0.001; };
138 r = 1 - p + p * ratio;
139 };
140
141 comp1(x) = g(x) * x
142 with {
143 g = env : compress + sharp : db2linear;
144 };
145 comp = BP( comp1);
146
147
148
149 tone_controll = _ : filterbankN((F,F2)): *(t),*(m),*(l):>_;
150
151 process = (tone_controll : comp) ,(tone_controll : comp);
0 //tonestack selector
1
2 declare id "tonestack_imp";
3
4 import("filter.lib");
5
6 /****************************************************************
7 ** Equalisation 3 bandes
8 ** C1
9 ** IN >---------||---------
10 ** | |
11 ** | |
12 ** | | R4 | | R1 Treble
13 ** | | | |<------< Out
14 ** | | | |
15 ** | C2 |
16 ** |-------||--------|------
17 ** | | |
18 ** | | | |
19 ** | | |<---- R2 Bass
20 ** | | |
21 ** | |
22 ** | C3 | |
23 ** --------||------>| | R3 Middle
24 ** | |
25 ** |
26 ** _|_
27 ** -
28 */
29 /****************************************************************
30 ** Guitar tone stacks
31 ** values from CAPS plugin tonestack (based on work from D.T. Yeh)
32 */
33
34 ts = environment {
35 k = *(1e3);
36 M = *(1e6);
37 nF = *(1e-9);
38 pF = *(1e-12);
39
40 /* Fender */
41
42 bassman = environment { /* 59 Bassman 5F6-A */
43 R1 = 250:k;
44 R2 = 1:M;
45 R3 = 25:k;
46 R4 = 56:k;
47 C1 = 250:pF;
48 C2 = 20:nF;
49 C3 = 20:nF;
50 };
51
52
53 mesa = environment { /* Mesa Boogie Mark */
54 R1 = 250:k;
55 R2 = 250:k;
56 R3 = 25:k;
57 R4 = 100:k;
58 C1 = 250:pF;
59 C2 = 100:nF;
60 C3 = 47:nF;
61 };
62
63 twin = environment { /* 69 Twin Reverb AA270 */
64 R1 = 250:k;
65 R2 = 250:k;
66 R3 = 10:k;
67 R4 = 100:k;
68 C1 = 120:pF;
69 C2 = 100:nF;
70 C3 = 47:nF;
71 };
72
73 princeton = environment { /* 64 Princeton AA1164 */
74 R1 = 250:k;
75 R2 = 250:k;
76 R3 = 4.8:k;
77 R4 = 100:k;
78 C1 = 250:pF;
79 C2 = 100:nF;
80 C3 = 47:nF;
81 };
82
83 /* Marshall */
84
85 jcm800 = environment { /* 59/81 JCM-800 Lead 100 2203 */
86 R1 = 220:k;
87 R2 = 1:M;
88 R3 = 22:k;
89 R4 = 33:k;
90 C1 = 470:pF;
91 C2 = 22:nF;
92 C3 = 22:nF;
93 };
94 /* 90 JCM-900 Master 2100: same as JCM-800 */
95
96 jcm2000 = environment { /* 81 2000 Lead */
97 R1 = 250:k;
98 R2 = 1:M;
99 R3 = 25:k;
100 R4 = 56:k; /* a 10 k fixed + 100 k pot in series actually */
101 C1 = 500:pF;
102 C2 = 22:nF;
103 C3 = 22:nF;
104 };
105
106 jtm45 = environment { /* JTM 45 */
107 R1 = 250:k;
108 R2 = 1:M;
109 R3 = 25:k;
110 R4 = 33:k;
111 C1 = 270:pF;
112 C2 = 22:nF;
113 C3 = 22:nF;
114 };
115
116 /* parameter order is R1 - R4, C1 - C3 */
117 mlead = environment { /* 67 Major Lead 200 */
118 R1 = 250:k;
119 R2 = 1:M;
120 R3 = 25:k;
121 R4 = 33:k;
122 C1 = 500:pF;
123 C2 = 22:nF;
124 C3 = 22:nF;
125 };
126
127 m2199 = environment { /* undated M2199 30W solid state */
128 R1 = 250:k;
129 R2 = 250:k;
130 R3 = 25:k;
131 R4 = 56:k;
132 C1 = 250:pF;
133 C2 = 47:nF;
134 C3 = 47:nF;
135 };
136
137 /* Vox */
138 ac30 = environment { /* 59/86 AC-30 */
139 /* R3 is fixed (circuit differs anyway) */
140 R1 = 1:M;
141 R2 = 1:M;
142 R3 = 10:k;
143 R4 = 100:k;
144 C1 = 50:pF;
145 C2 = 22:nF;
146 C3 = 22:nF;
147 };
148
149 ac15 = environment { /* VOX AC-15 */
150 R1 = 220:k;
151 R2 = 220:k;
152 R3 = 220:k;
153 R4 = 100:k;
154 C1 = 470:pF;
155 C2 = 100:nF;
156 C3 = 47:nF;
157 };
158
159 soldano = environment { /* Soldano SLO 100 */
160 R1 = 250:k;
161 R2 = 1:M;
162 R3 = 25:k;
163 R4 = 47:k;
164 C1 = 470:pF;
165 C2 = 20:nF;
166 C3 = 20:nF;
167 };
168
169 sovtek = environment { /* MIG 100 H*/
170 R1 = 500:k;
171 R2 = 1:M;
172 R3 = 10:k;
173 R4 = 47:k;
174 C1 = 470:pF;
175 C2 = 22:nF;
176 C3 = 22:nF;
177 };
178
179 peavey = environment { /* c20*/
180 R1 = 250:k;
181 R2 = 250:k;
182 R3 = 20:k;
183 R4 = 68:k;
184 C1 = 270:pF;
185 C2 = 22:nF;
186 C3 = 22:nF;
187 };
188
189 ibanez = environment { /* gx20 */
190 R1 = 250:k;
191 R2 = 250:k;
192 R3 = 10:k;
193 R4 = 100:k;
194 C1 = 270:pF;
195 C2 = 100:nF;
196 C3 = 40:nF;
197 };
198
199 roland = environment { /* Cube 60 */
200 R1 = 250:k;
201 R2 = 250:k;
202 R3 = 10:k;
203 R4 = 41:k;
204 C1 = 240:pF;
205 C2 = 33:nF;
206 C3 = 82:nF;
207 };
208
209 ampeg = environment { /* VL 501 */
210 R1 = 250:k;
211 R2 = 1:M;
212 R3 = 25:k;
213 R4 = 32:k;
214 C1 = 470:pF;
215 C2 = 22:nF;
216 C3 = 22:nF;
217 };
218
219 ampeg_rev = environment { /* reverbrocket*/
220 R1 = 250:k;
221 R2 = 250:k;
222 R3 = 10:k;
223 R4 = 100:k;
224 C1 = 100:pF;
225 C2 = 100:nF;
226 C3 = 47:nF;
227 };
228
229 bogner = environment { /* Triple Giant Preamp */
230 R1 = 250:k;
231 R2 = 1:M;
232 R3 = 33:k;
233 R4 = 51:k;
234 C1 = 220:pF;
235 C2 = 15:nF;
236 C3 = 47:nF;
237 };
238
239 groove = environment { /* Trio Preamp */
240 R1 = 220:k;
241 R2 = 1:M;
242 R3 = 22:k;
243 R4 = 68:k;
244 C1 = 470:pF;
245 C2 = 22:nF;
246 C3 = 22:nF;
247 };
248
249 crunch = environment { /* Hughes&Kettner */
250 R1 = 220:k;
251 R2 = 220:k;
252 R3 = 10:k;
253 R4 = 100:k;
254 C1 = 220:pF;
255 C2 = 47:nF;
256 C3 = 47:nF;
257 };
258
259 fender_blues = environment { /* Fender blues junior */
260 R1 = 250:k;
261 R2 = 250:k;
262 R3 = 25:k;
263 R4 = 100:k;
264 C1 = 250:pF;
265 C2 = 22:nF;
266 C3 = 22:nF;
267 };
268
269 fender_default = environment { /* Fender */
270 R1 = 250:k;
271 R2 = 250:k;
272 R3 = 10:k;
273 R4 = 100:k;
274 C1 = 250:pF;
275 C2 = 100:nF;
276 C3 = 47:nF;
277 };
278
279 fender_deville = environment { /* Fender Hot Rod */
280 R1 = 250:k;
281 R2 = 250:k;
282 R3 = 25:k;
283 R4 = 130:k;
284 C1 = 250:pF;
285 C2 = 100:nF;
286 C3 = 22:nF;
287 };
288
289 gibsen = environment { /* gs12 reverbrocket */
290 R1 = 1:M;
291 R2 = 1:M;
292 R3 = 94:k; // 47k fixed
293 R4 = 270:k;
294 C1 = 25:pF;
295 C2 = 60:nF;
296 C3 = 20:nF;
297 };
298
299
300 };
301
302 t = vslider(".amp.tonestack.Treble[alias]", 0.5, 0, 1, 0.01);
303 m = vslider(".amp.tonestack.Middle[alias]", 0.5, 0, 1, 0.01);
304 l = vslider(".amp.tonestack.Bass[alias]", 0.5, 0, 1, 0.01) : (_-1)*3.4 : exp;
305
306
307
308 tonestack = 1/A0*iir((B0,B1,B2,B3),(A1/A0,A2/A0,A3/A0)) with {
309 C1 = tse.C1;
310 C2 = tse.C2;
311 C3 = tse.C3;
312 R1 = tse.R1;
313 R2 = tse.R2;
314 R3 = tse.R3;
315 R4 = tse.R4;
316
317 b1 = t*C1*R1 + m*C3*R3 + l*(C1*R2 + C2*R2) + (C1*R3 + C2*R3);
318
319 b2 = t*(C1*C2*R1*R4 + C1*C3*R1*R4) - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
320 + m*(C1*C3*R1*R3 + C1*C3*R3*R3 + C2*C3*R3*R3)
321 + l*(C1*C2*R1*R2 + C1*C2*R2*R4 + C1*C3*R2*R4)
322 + l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
323 + (C1*C2*R1*R3 + C1*C2*R3*R4 + C1*C3*R3*R4);
324
325 b3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
326 - m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
327 + m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
328 + t*C1*C2*C3*R1*R3*R4 - t*m*C1*C2*C3*R1*R3*R4
329 + t*l*C1*C2*C3*R1*R2*R4;
330
331 a0 = 1;
332
333 a1 = (C1*R1 + C1*R3 + C2*R3 + C2*R4 + C3*R4)
334 + m*C3*R3 + l*(C1*R2 + C2*R2);
335
336 a2 = m*(C1*C3*R1*R3 - C2*C3*R3*R4 + C1*C3*R3*R3 + C2*C3*R3*R3)
337 + l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
338 - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
339 + l*(C1*C2*R2*R4 + C1*C2*R1*R2 + C1*C3*R2*R4 + C2*C3*R2*R4)
340 + (C1*C2*R1*R4 + C1*C3*R1*R4 + C1*C2*R3*R4 + C1*C2*R1*R3 + C1*C3*R3*R4 + C2*C3*R3*R4);
341
342 a3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
343 - m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
344 + m*(C1*C2*C3*R3*R3*R4 + C1*C2*C3*R1*R3*R3 - C1*C2*C3*R1*R3*R4)
345 + l*C1*C2*C3*R1*R2*R4
346 + C1*C2*C3*R1*R3*R4;
347
348 c = 2*float(SR);
349
350 B0 = -b1*c - b2*pow(c,2) - b3*pow(c,3);
351 B1 = -b1*c + b2*pow(c,2) + 3*b3*pow(c,3);
352 B2 = b1*c + b2*pow(c,2) - 3*b3*pow(c,3);
353 B3 = b1*c - b2*pow(c,2) + b3*pow(c,3);
354 A0 = -a0 - a1*c - a2*pow(c,2) - a3*pow(c,3);
355 A1 = -3*a0 - a1*c + a2*pow(c,2) + 3*a3*pow(c,3);
356 A2 = -3*a0 + a1*c + a2*pow(c,2) - 3*a3*pow(c,3);
357 A3 = -a0 + a1*c - a2*pow(c,2) + a3*pow(c,3);
358 };
359
360 tse = ts.bassman;
361 process = tonestack;
0 declare id "AC-15"; // in tonestack selector
1 declare name "AC-15";
2 tstack = component("tonestack.dsp");
3 process = tstack[tse=tstack.ts.ac15;];
0 declare id "AC-15"; // in tonestack selector
1 declare name "AC-15";
2 tstack = component("tonestack.dsp");
3 process = tstack[tse=tstack.ts.ac15;],tstack[tse=tstack.ts.ac15;];
0 declare id "AC-30"; // in tonestack selector
1 declare name "AC-30";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ac30;];
0 declare id "AC-30"; // in tonestack selector
1 declare name "AC-30";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ac30;], tstack[tse=tstack.ts.ac30;];
0 declare id "Ampeg"; // in tonestack selector
1 declare name "Ampeg";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ampeg;];
0 declare id "Rev.Rocket"; // in tonestack selector
1 declare name "Rev.Rocket";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ampeg_rev;];
0 declare id "Rev.Rocket"; // in tonestack selector
1 declare name "Rev.Rocket";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ampeg_rev;], tstack[tse=tstack.ts.ampeg_rev;];
0 declare id "Ampeg"; // in tonestack selector
1 declare name "Ampeg";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ampeg;], tstack[tse=tstack.ts.ampeg;];
0 declare id "Bassman"; // in tonestack selector
1 declare name "Bassman";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.bassman;];
0 declare id "Bassman"; // in tonestack selector
1 declare name "Bassman";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.bassman;], tstack[tse=tstack.ts.bassman;];
0 //tonestack selector
1
2 declare id "tonestack_bm";
3
4 import("filter.lib");
5
6 /****************************************************************
7 ** Equalisation 3 bandes
8 ** C1
9 ** IN >---------||---------
10 ** | |
11 ** | |
12 ** | | R4 | | R1 Treble
13 ** | | | |<------< Out
14 ** | | | |
15 ** | C2 |
16 ** |-------||--------|------
17 ** | | |
18 ** | | | |
19 ** | | |<---- R2 Bass
20 ** | | |
21 ** | |
22 ** | C3 | |
23 ** --------||------>| | R3 Middle
24 ** | |
25 ** |
26 ** _|_
27 ** -
28 */
29 /****************************************************************
30 ** Guitar tone stacks
31 ** values from CAPS plugin tonestack (based on work from D.T. Yeh)
32 ** this version use only one controler like the Big Muff
33 */
34
35 ts = environment {
36 k = *(1e3);
37 M = *(1e6);
38 nF = *(1e-9);
39 pF = *(1e-12);
40
41 /* Fender */
42
43 bassman = environment { /* 59 Bassman 5F6-A */
44 R1 = 250:k;
45 R2 = 1:M;
46 R3 = 25:k;
47 R4 = 56:k;
48 C1 = 250:pF;
49 C2 = 20:nF;
50 C3 = 20:nF;
51 };
52
53
54 mesa = environment { /* Mesa Boogie Mark */
55 R1 = 250:k;
56 R2 = 250:k;
57 R3 = 25:k;
58 R4 = 100:k;
59 C1 = 250:pF;
60 C2 = 100:nF;
61 C3 = 47:nF;
62 };
63
64 twin = environment { /* 69 Twin Reverb AA270 */
65 R1 = 250:k;
66 R2 = 250:k;
67 R3 = 10:k;
68 R4 = 100:k;
69 C1 = 120:pF;
70 C2 = 100:nF;
71 C3 = 47:nF;
72 };
73
74 princeton = environment { /* 64 Princeton AA1164 */
75 R1 = 250:k;
76 R2 = 250:k;
77 R3 = 4.8:k;
78 R4 = 100:k;
79 C1 = 250:pF;
80 C2 = 100:nF;
81 C3 = 47:nF;
82 };
83
84 /* Marshall */
85
86 jcm800 = environment { /* 59/81 JCM-800 Lead 100 2203 */
87 R1 = 220:k;
88 R2 = 1:M;
89 R3 = 22:k;
90 R4 = 33:k;
91 C1 = 470:pF;
92 C2 = 22:nF;
93 C3 = 22:nF;
94 };
95 /* 90 JCM-900 Master 2100: same as JCM-800 */
96
97 jcm2000 = environment { /* 81 2000 Lead */
98 R1 = 250:k;
99 R2 = 1:M;
100 R3 = 25:k;
101 R4 = 56:k; /* a 10 k fixed + 100 k pot in series actually */
102 C1 = 500:pF;
103 C2 = 22:nF;
104 C3 = 22:nF;
105 };
106
107 jtm45 = environment { /* JTM 45 */
108 R1 = 250:k;
109 R2 = 1:M;
110 R3 = 25:k;
111 R4 = 33:k;
112 C1 = 270:pF;
113 C2 = 22:nF;
114 C3 = 22:nF;
115 };
116
117 /* parameter order is R1 - R4, C1 - C3 */
118 mlead = environment { /* 67 Major Lead 200 */
119 R1 = 250:k;
120 R2 = 1:M;
121 R3 = 25:k;
122 R4 = 33:k;
123 C1 = 500:pF;
124 C2 = 22:nF;
125 C3 = 22:nF;
126 };
127
128 m2199 = environment { /* undated M2199 30W solid state */
129 R1 = 250:k;
130 R2 = 250:k;
131 R3 = 25:k;
132 R4 = 56:k;
133 C1 = 250:pF;
134 C2 = 47:nF;
135 C3 = 47:nF;
136 };
137
138 /* Vox */
139 ac30 = environment { /* 59/86 AC-30 */
140 /* R3 is fixed (circuit differs anyway) */
141 R1 = 1:M;
142 R2 = 1:M;
143 R3 = 10:k;
144 R4 = 100:k;
145 C1 = 50:pF;
146 C2 = 22:nF;
147 C3 = 22:nF;
148 };
149
150 ac15 = environment { /* VOX AC-15 */
151 R1 = 220:k;
152 R2 = 220:k;
153 R3 = 220:k;
154 R4 = 100:k;
155 C1 = 470:pF;
156 C2 = 100:nF;
157 C3 = 47:nF;
158 };
159
160 soldano = environment { /* Soldano SLO 100 */
161 R1 = 250:k;
162 R2 = 1:M;
163 R3 = 25:k;
164 R4 = 47:k;
165 C1 = 470:pF;
166 C2 = 20:nF;
167 C3 = 20:nF;
168 };
169
170 sovtek = environment { /* MIG 100 H*/
171 R1 = 500:k;
172 R2 = 1:M;
173 R3 = 10:k;
174 R4 = 47:k;
175 C1 = 470:pF;
176 C2 = 22:nF;
177 C3 = 22:nF;
178 };
179
180 peavey = environment { /* c20*/
181 R1 = 250:k;
182 R2 = 250:k;
183 R3 = 20:k;
184 R4 = 68:k;
185 C1 = 270:pF;
186 C2 = 22:nF;
187 C3 = 22:nF;
188 };
189
190 ibanez = environment { /* gx20 */
191 R1 = 250:k;
192 R2 = 250:k;
193 R3 = 10:k;
194 R4 = 100:k;
195 C1 = 270:pF;
196 C2 = 100:nF;
197 C3 = 40:nF;
198 };
199
200 roland = environment { /* Cube 60 */
201 R1 = 250:k;
202 R2 = 250:k;
203 R3 = 10:k;
204 R4 = 41:k;
205 C1 = 240:pF;
206 C2 = 33:nF;
207 C3 = 82:nF;
208 };
209
210 ampeg = environment { /* VL 501 */
211 R1 = 250:k;
212 R2 = 1:M;
213 R3 = 25:k;
214 R4 = 32:k;
215 C1 = 470:pF;
216 C2 = 22:nF;
217 C3 = 22:nF;
218 };
219
220 ampeg_rev = environment { /* reverbrocket*/
221 R1 = 250:k;
222 R2 = 250:k;
223 R3 = 10:k;
224 R4 = 100:k;
225 C1 = 100:pF;
226 C2 = 100:nF;
227 C3 = 47:nF;
228 };
229
230 bogner = environment { /* Triple Giant Preamp */
231 R1 = 250:k;
232 R2 = 1:M;
233 R3 = 33:k;
234 R4 = 51:k;
235 C1 = 220:pF;
236 C2 = 15:nF;
237 C3 = 47:nF;
238 };
239
240 groove = environment { /* Trio Preamp */
241 R1 = 220:k;
242 R2 = 1:M;
243 R3 = 22:k;
244 R4 = 68:k;
245 C1 = 470:pF;
246 C2 = 22:nF;
247 C3 = 22:nF;
248 };
249
250 crunch = environment { /* Hughes&Kettner */
251 R1 = 220:k;
252 R2 = 220:k;
253 R3 = 10:k;
254 R4 = 100:k;
255 C1 = 220:pF;
256 C2 = 47:nF;
257 C3 = 47:nF;
258 };
259
260 fender_blues = environment { /* Fender blues junior */
261 R1 = 250:k;
262 R2 = 250:k;
263 R3 = 25:k;
264 R4 = 100:k;
265 C1 = 250:pF;
266 C2 = 22:nF;
267 C3 = 22:nF;
268 };
269
270 fender_default = environment { /* Fender */
271 R1 = 250:k;
272 R2 = 250:k;
273 R3 = 10:k;
274 R4 = 100:k;
275 C1 = 250:pF;
276 C2 = 100:nF;
277 C3 = 47:nF;
278 };
279
280 fender_deville = environment { /* Fender Hot Rod */
281 R1 = 250:k;
282 R2 = 250:k;
283 R3 = 25:k;
284 R4 = 130:k;
285 C1 = 250:pF;
286 C2 = 100:nF;
287 C3 = 22:nF;
288 };
289
290 gibsen = environment { /* gs12 reverbrocket */
291 R1 = 1:M;
292 R2 = 1:M;
293 R3 = 94:k; // 47k fixed
294 R4 = 270:k;
295 C1 = 25:pF;
296 C2 = 60:nF;
297 C3 = 20:nF;
298 };
299
300
301 };
302
303 t = vslider(".amp.tonestack.tone[alias]", 0.5, 0, 1, 0.01);
304 m = 0.5;
305 l = 1-t : (_-1)*3.4 : exp;
306
307
308 tonestack = 1/A0*iir((B0,B1,B2,B3),(A1/A0,A2/A0,A3/A0)) with {
309 C1 = tse.C1;
310 C2 = tse.C2;
311 C3 = tse.C3;
312 R1 = tse.R1;
313 R2 = tse.R2;
314 R3 = tse.R3;
315 R4 = tse.R4;
316
317 b1 = t*C1*R1 + m*C3*R3 + l*(C1*R2 + C2*R2) + (C1*R3 + C2*R3);
318
319 b2 = t*(C1*C2*R1*R4 + C1*C3*R1*R4) - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
320 + m*(C1*C3*R1*R3 + C1*C3*R3*R3 + C2*C3*R3*R3)
321 + l*(C1*C2*R1*R2 + C1*C2*R2*R4 + C1*C3*R2*R4)
322 + l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
323 + (C1*C2*R1*R3 + C1*C2*R3*R4 + C1*C3*R3*R4);
324
325 b3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
326 - m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
327 + m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
328 + t*C1*C2*C3*R1*R3*R4 - t*m*C1*C2*C3*R1*R3*R4
329 + t*l*C1*C2*C3*R1*R2*R4;
330
331 a0 = 1;
332
333 a1 = (C1*R1 + C1*R3 + C2*R3 + C2*R4 + C3*R4)
334 + m*C3*R3 + l*(C1*R2 + C2*R2);
335
336 a2 = m*(C1*C3*R1*R3 - C2*C3*R3*R4 + C1*C3*R3*R3 + C2*C3*R3*R3)
337 + l*m*(C1*C3*R2*R3 + C2*C3*R2*R3)
338 - m*m*(C1*C3*R3*R3 + C2*C3*R3*R3)
339 + l*(C1*C2*R2*R4 + C1*C2*R1*R2 + C1*C3*R2*R4 + C2*C3*R2*R4)
340 + (C1*C2*R1*R4 + C1*C3*R1*R4 + C1*C2*R3*R4 + C1*C2*R1*R3 + C1*C3*R3*R4 + C2*C3*R3*R4);
341
342 a3 = l*m*(C1*C2*C3*R1*R2*R3 + C1*C2*C3*R2*R3*R4)
343 - m*m*(C1*C2*C3*R1*R3*R3 + C1*C2*C3*R3*R3*R4)
344 + m*(C1*C2*C3*R3*R3*R4 + C1*C2*C3*R1*R3*R3 - C1*C2*C3*R1*R3*R4)
345 + l*C1*C2*C3*R1*R2*R4
346 + C1*C2*C3*R1*R3*R4;
347
348 c = 2*float(SR);
349
350 B0 = -b1*c - b2*pow(c,2) - b3*pow(c,3);
351 B1 = -b1*c + b2*pow(c,2) + 3*b3*pow(c,3);
352 B2 = b1*c + b2*pow(c,2) - 3*b3*pow(c,3);
353 B3 = b1*c - b2*pow(c,2) + b3*pow(c,3);
354 A0 = -a0 - a1*c - a2*pow(c,2) - a3*pow(c,3);
355 A1 = -3*a0 - a1*c + a2*pow(c,2) + 3*a3*pow(c,3);
356 A2 = -3*a0 + a1*c + a2*pow(c,2) - 3*a3*pow(c,3);
357 A3 = -a0 + a1*c - a2*pow(c,2) + a3*pow(c,3);
358 };
359
360 tse = ts.bassman;
361 process = tonestack;
0 declare id "Triple Giant"; // in tonestack selector
1 declare name "Triple Giant";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.bogner;];
0 declare id "Triple Giant"; // in tonestack selector
1 declare name "Triple Giant";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.bogner;], tstack[tse=tstack.ts.bogner;];
0 declare id "Hughes&Kettner"; // in tonestack selector
1 declare name "Hughes&Kettner";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.crunch;];
0 declare id "Hughes&Kettner"; // in tonestack selector
1 declare name "Hughes&Kettner";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.crunch;], tstack[tse=tstack.ts.crunch;];
0 declare id "default"; // in tonestack selector
1 declare name "default";
2
3 tstack = component("tonestack.dsp");
4 tone_controll = component("tone.dsp").tone(((tstack.l-0.5)*20),((tstack.m-0.5)*10),((tstack.t-0.5)*20));
5 process = tone_controll;
0 declare id "default"; // in tonestack selector
1 declare name "default";
2
3 tstack = component("tonestack.dsp");
4 tone_controll = component("tone.dsp").tone(((tstack.l-0.5)*20),((tstack.m-0.5)*10),((tstack.t-0.5)*20));
5 process = tone_controll, tone_controll;
0 declare id "Junior"; // in tonestack selector
1 declare name "Junior";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.fender_blues;];
0 declare id "Junior"; // in tonestack selector
1 declare name "Junior";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.fender_blues;], tstack[tse=tstack.ts.fender_blues;];
0 declare id "Fender"; // in tonestack selector
1 declare name "Fender";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.fender_default;];
0 declare id "Fender"; // in tonestack selector
1 declare name "Fender";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.fender_default;], tstack[tse=tstack.ts.fender_default;];
0 declare id "Deville"; // in tonestack selector
1 declare name "Deville";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.fender_deville;];
0 declare id "Deville"; // in tonestack selector
1 declare name "Deville";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.fender_deville;], tstack[tse=tstack.ts.fender_deville;];
0 declare id "Gibsen"; // in tonestack selector
1 declare name "Gibsen";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.gibsen;];
0 declare id "Gibsen"; // in tonestack selector
1 declare name "Gibsen";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.gibsen;], tstack[tse=tstack.ts.gibsen;];
0 declare id "Trio Preamp"; // in tonestack selector
1 declare name "Trio Preamp";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.groove;];
0 declare id "Trio Preamp"; // in tonestack selector
1 declare name "Trio Preamp";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.groove;], tstack[tse=tstack.ts.groove;];
0 declare id "Ibanez"; // in tonestack selector
1 declare name "Ibanez";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ibanez;];
0 declare id "Ibanez"; // in tonestack selector
1 declare name "Ibanez";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.ibanez;], tstack[tse=tstack.ts.ibanez;];
0 declare id "JCM-2000"; // in tonestack selector
1 declare name "JCM-2000";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.jcm2000;];
0 declare id "JCM-2000"; // in tonestack selector
1 declare name "JCM-2000";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.jcm2000;], tstack[tse=tstack.ts.jcm2000;];
0 declare id "JCM-800"; // in tonestack selector
1 declare name "JCM-800";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.jcm800;];
0 declare id "JCM-800"; // in tonestack selector
1 declare name "JCM-800";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.jcm800;], tstack[tse=tstack.ts.jcm800;];
0 declare id "JTM-45"; // in tonestack selector
1 declare name "JTM-45";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.jtm45;];
0 declare id "JTM-45"; // in tonestack selector
1 declare name "JTM-45";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.jtm45;], tstack[tse=tstack.ts.jtm45;];
0 declare id "M2199"; // in tonestack selector
1 declare name "M2199";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.m2199;];
0 declare id "M2199"; // in tonestack selector
1 declare name "M2199";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.m2199;], tstack[tse=tstack.ts.m2199;];
0 declare id "Mesa Boogie"; // in tonestack selector
1 declare name "Mesa Boogie";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.mesa;];
0 declare id "Mesa Boogie"; // in tonestack selector
1 declare name "Mesa Boogie";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.mesa;], tstack[tse=tstack.ts.mesa;];
0 declare id "M-Lead"; // in tonestack selector
1 declare name "M-Lead";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.mlead;];
0 declare id "M-Lead"; // in tonestack selector
1 declare name "M-Lead";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.mlead;], tstack[tse=tstack.ts.mlead;];
0 declare id "Peavey"; // in tonestack selector
1 declare name "Peavey";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.peavey;];
0 declare id "Peavey"; // in tonestack selector
1 declare name "Peavey";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.peavey;], tstack[tse=tstack.ts.peavey;];
0 declare id "Princeton"; // in tonestack selector
1 declare name "Princeton";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.princeton;];
0 declare id "Princeton"; // in tonestack selector
1 declare name "Princeton";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.princeton;], tstack[tse=tstack.ts.princeton;];
0 declare id "Roland"; // in tonestack selector
1 declare name "Roland";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.roland;];
0 declare id "Roland"; // in tonestack selector
1 declare name "Roland";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.roland;], tstack[tse=tstack.ts.roland;];
0 declare id "SOL 100"; // in tonestack selector
1 declare name "SOL 100";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.soldano;];
0 declare id "SOL 100"; // in tonestack selector
1 declare name "SOL 100";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.soldano;], tstack[tse=tstack.ts.soldano;];
0 declare id "MIG 100 H"; // in tonestack selector
1 declare name "MIG 100 H";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.sovtek;];
0 declare id "MIG 100 H"; // in tonestack selector
1 declare name "MIG 100 H";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.sovtek;], tstack[tse=tstack.ts.sovtek;];
0 declare id "Twin Reverb"; // in tonestack selector
1 declare name "Twin Reverb";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.twin;];
0 declare id "Twin Reverb"; // in tonestack selector
1 declare name "Twin Reverb";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.twin;],tstack[tse=tstack.ts.twin;];
0 declare name "Tremolo";
1 declare category "Modulation";
2
3 /*
4 ** Model of a vactrol tremolo unit by "transmogrify"
5 ** c.f. http://sourceforge.net/apps/phpbb/guitarix/viewtopic.php?f=7&t=44&p=233&hilit=transmogrifox#p233
6 ** http://transmogrifox.webs.com/vactrol.m
7 */
8
9 import("music.lib");
10 import("oscillator.lib");
11
12 /* vactrol model */
13
14 R1 = 2700;
15 Ra = 1e6;
16 Rb = 300;
17 b = exp(log(Ra)/log(Rb)) - exp(1);
18 dTC = 0.06;
19 minTC = log(0.005/dTC);
20
21 cds = ((_ <: _,_),_ : _+(1-alpha)*_) ~ (_<:*(alpha)) with {
22 iSR = 1/SR;
23 dRC = dTC * exp(*(minTC));
24 alpha = 1 - iSR / (dRC + iSR);
25 };
26
27 vactrol = pow(_,1.9) : cds : *(b) + exp(1) : exp(log(Ra)/log) : R1/(_ + R1);
28
29
30 /* triangle oscillator (not bandlimited, frequency is approximate) */
31
32 trianglewave(freq) = _ ~ (_ <: _ + hyst) : /(periodsamps) with {
33 if(c,t,e) = select2(c,e,t);
34 hyst(x) = if(_ > 0, 2 * (x < periodsamps) - 1, 1 - 2 * (x > 0)) ~ _;
35 periodsamps = int(SR / (2*float(freq)));
36 };
37
38 /* tremolo unit, using triangle or sine oscillator as lfo */
39
40 tremolo(freq, depth) = lfo * depth + 1 - depth : vactrol with {
41 sine(freq) = (oscs(freq) + 1) / 2 : max(0); // max(0) because of numerical inaccuracy
42 SINE=checkbox("SINE[enum:triangle|sine]");
43 lfo = select2(SINE, trianglewave(freq), sine(freq));
44 };
45
46 wet = vslider("wet_dry[name:wet/dry][tooltip:percentage of processed signal in output signal]", 100, 0, 100, 1) : /(100);
47 dry = 1 - wet;
48
49 process = _<:*(dry),(*(wet): *(tremolo(vslider("freq",5,0.1,50,0.1),vslider("depth",0.5,0,1,0.01)))):>_;
0 import("guitarix.lib");
1
2 fuzzy = vslider("fuzzy[name:count]", 1, -3, 10, 1);
3 process = fuzzy_tube(a,b,c,fuzzy)
4 with {
5 a = 2;
6 b = 1;
7 c = 0.5;
8 };
0 // dsp algorithm from swh ladspa valve plugin (Steve Harrison)
1
2 import("music.lib");
3 import("guitarix.lib");
4
5 g = vslider("g", 1, 0.2, 2, 0.1);
6
7
8 vt = valve.vt(dist, q) : *(g) : neg : valve.vt(dist, q) : neg with
9 {
10 q_p = vslider("q", 0.4, 0.4, 1, 0.001);
11 dist_p = vslider("dist", 0, 0, 1.7, 0.01);
12 q = -q_p*-q_p*-q_p;
13 dist = pow(10,dist_p);
14 };
15
16
17
18 process = vt ;
0 declare id "tube";
1
2 import("guitarix.lib");
3
4 vibrato = vslider("vibrato", 0, 0, 2, 0.02);
5
6 process = + ~ *(vibrato/2) : sym_clip(0.7);
7
8
0 // dsp algorithm from swh ladspa valve plugin (Steve Harrison)
1
2 import("music.lib");
3 import("guitarix.lib");
4
5 vt = valve.vt(dist, q) : neg : valve.vt(dist, q) : neg with
6 {
7 q_p = vslider("q", 0, -1.7, 1.7, 0.01);
8 dist_p = vslider("dist", 0, -2, 2, 0.01);
9 q = q_p*q_p*q_p;
10 dist = pow(10,dist_p);
11 };
12
13 vtu = valve.vt(dist, q) with
14 {
15 q_p = vslider("q", 0, -1.7, 1.7, 0.01);
16 dist_p = vslider("dist", 0, -2, 2, 0.01);
17 q = q_p*q_p*q_p;
18 dist = pow(10,dist_p);
19 };
20
21 vts(x) = abs(x) : neg : valve.vt(dist, q) : neg : copysign(_,x)
22 with
23 {
24 q_p = vslider("q", 0, -1.7, 1.7, 0.01);
25 dist_p = vslider("dist", 0, -2, 2, 0.01);
26 q = q_p*q_p*q_p;
27 dist = pow(10,dist_p);
28 copysign = ffunction(float copysign(float,float), <math.h>, "");
29 };
30
31 process = vt;
0 // dsp algorithm from swh ladspa valve_rect plugin (Steve Harrison)
1
2 import("music.lib");
3 import("guitarix.lib");
4
5 sag = vslider("sag", 0, 0, 1, 0.01);
6 dist_p = vslider("dist", 0, 0, 1, 0.01);
7
8 process(x) = valve.vt(dist, q(x), x)
9 with {
10 dist = dist_p * 40 + 0.1;
11 q(x) = lp1tm1(x) * sag - lp2tm1(x) * 1.02 - 1.0 : clip(-1,-0.01);
12 lp(a) = *(1 - a) : + ~ *(a);
13 lp1tm1 = abs <: lp(0.9999), _ : max;
14 avgs = lp1tm1 : avg;
15 avg_size = SR/9;
16 avg(x) = x - delay1s(avg_size,x) : + ~ _ : /(avg_size);
17 lp2tm1 = avgs : lp(0.999);
18 };
0 #! /usr/bin/env python
1 # encoding: utf-8
2
3 def build(bld):
4 unused_sources = [
5 'preamp.dsp',
6 'inputgain.dsp',
7 'AntiAlias.dsp',
8 'HighShelf.dsp',
9 'drive.dsp',
10 'osc_tube.dsp',
11 'reso_tube.dsp',
12 'tube.dsp',
13 'tube3.dsp',
14 'tubevibrato.dsp',
15 'multifilter.dsp',
16 'eq.dsp',
17 'outputgain.dsp',
18 'feed.dsp',
19 'balance1.dsp',
20 'amp2.dsp',
21 'stage3.dsp',
22 'distortion.dsp',
23 'distortion1.dsp',
24 'noisegate.dsp',
25 'sloop.dsp', ##float
26 'vibe_lfo_triangle.dsp',
27 'vibe_mono_lfo_triangle.dsp',
28 'presence_level.dsp',
29 'cabinet_impulse_former.dsp',
30 'preamp_impulse_former.dsp',
31 'vibe_mono_lfo_sine.dsp',
32 'vibe_lfo_sine.dsp',
33 ]
34
35 # activate mem allocation internal float
36 sources_plugin_float = [
37 'echo.dsp',
38 'delay.dsp',
39 'chorus.dsp',
40 'stereodelay.dsp',
41 'stereoecho.dsp',
42 ]
43
44 # activate mem allocation internal double
45 sources_plugin_init = [
46 'gxtubedelay.dsp',
47 'gxtubevibrato.dsp',
48 'gxechocat.dsp',
49
50 ]
51
52 sources_plugin = [
53 'low_high_pass.dsp',
54 'selecteq.dsp',
55 'crybaby.dsp',
56 'autowah.dsp',
57 'gx_distortion.dsp',
58 'impulseresponse.dsp',
59 'compressor.dsp',
60 'expander.dsp',
61 'overdrive.dsp',
62 'freeverb.dsp',
63 'biquad.dsp',
64 'tremolo.dsp',
65 'phaser_mono.dsp',
66 'chorus_mono.dsp',
67 'flanger_mono.dsp',
68 'gx_feedback.dsp',
69 'flanger.dsp',
70 'moog.dsp',
71 'phaser.dsp',
72 'gx_ampmodul.dsp',
73 'tonecontroll.dsp',
74 'stereoverb.dsp',
75 'softclip.dsp',
76 'gx_ampout.dsp',
77 'gx_ampout_ladspa.dsp',
78 'noise_shaper.dsp',
79 'bassbooster.dsp',
80 'gx_outputlevel.dsp',
81 'gx_outputlevel_ladspa.dsp',
82 'gxfeed.dsp',
83 'highbooster.dsp',
84 'noiser.dsp',
85 'stereo_noiser.dsp',
86 'gx_zita_rev1.dsp',
87 'gx_flanger.dsp',
88 'gxtilttone.dsp',
89 'gxtubetremelo.dsp',
90 'gx_studiopre.dsp',
91 'gx_studiopre_st.dsp',
92
93 # tone stacks
94 'tonestack_default.dsp',
95 'tonestack_bassman.dsp',
96 'tonestack_twin.dsp',
97 'tonestack_princeton.dsp',
98 'tonestack_jcm800.dsp',
99 'tonestack_jcm2000.dsp',
100 'tonestack_mlead.dsp',
101 'tonestack_m2199.dsp',
102 'tonestack_ac30.dsp',
103 'tonestack_soldano.dsp',
104 'tonestack_mesa.dsp',
105 'tonestack_jtm45.dsp',
106 'tonestack_ac15.dsp',
107 'tonestack_peavey.dsp',
108 'tonestack_ibanez.dsp',
109 'tonestack_roland.dsp',
110 'tonestack_ampeg.dsp',
111 'tonestack_ampeg_rev.dsp',
112 'tonestack_sovtek.dsp',
113 'tonestack_bogner.dsp',
114 'tonestack_groove.dsp',
115 'tonestack_crunch.dsp',
116 'tonestack_fender_blues.dsp',
117 'tonestack_fender_default.dsp',
118 'tonestack_fender_deville.dsp',
119 'tonestack_gibsen.dsp',
120
121 # tone stacks stereo
122 'tonestack_default_stereo.dsp',
123 'tonestack_bassman_stereo.dsp',
124 'tonestack_twin_stereo.dsp',
125 'tonestack_princeton_stereo.dsp',
126 'tonestack_jcm800_stereo.dsp',
127 'tonestack_jcm2000_stereo.dsp',
128 'tonestack_mlead_stereo.dsp',
129 'tonestack_m2199_stereo.dsp',
130 'tonestack_ac30_stereo.dsp',
131 'tonestack_soldano_stereo.dsp',
132 'tonestack_mesa_stereo.dsp',
133 'tonestack_jtm45_stereo.dsp',
134 'tonestack_ac15_stereo.dsp',
135 'tonestack_peavey_stereo.dsp',
136 'tonestack_ibanez_stereo.dsp',
137 'tonestack_roland_stereo.dsp',
138 'tonestack_ampeg_stereo.dsp',
139 'tonestack_ampeg_rev_stereo.dsp',
140 'tonestack_sovtek_stereo.dsp',
141 'tonestack_bogner_stereo.dsp',
142 'tonestack_groove_stereo.dsp',
143 'tonestack_crunch_stereo.dsp',
144 'tonestack_fender_blues_stereo.dsp',
145 'tonestack_fender_default_stereo.dsp',
146 'tonestack_fender_deville_stereo.dsp',
147 'tonestack_gibsen_stereo.dsp',
148
149 # amps
150 'gxamp.dsp',
151 'gxamp2.dsp',
152 'gxamp3.dsp',
153 'gxamp4.dsp',
154 'gxamp5.dsp',
155 'gxamp6.dsp',
156 'gxamp7.dsp',
157 'gxamp8.dsp',
158 'gxamp9.dsp',
159 'gxamp10.dsp',
160 'gxamp11.dsp',
161 'gxamp12.dsp',
162 'gxamp13.dsp',
163 'gxamp14.dsp',
164 'gxamp15.dsp',
165 'gxamp16.dsp',
166 'gxamp17.dsp',
167 'gxamp18.dsp',
168 'gxnoamp.dsp',
169 'gx_chump.dsp',
170 'gx_bigchump.dsp',
171 'gx_vibrochump.dsp',
172 'gxmetal_head.dsp',
173 'gxmetal_amp.dsp',
174
175 # stereo amps
176 'gxamp_stereo.dsp',
177 'gxamp2_stereo.dsp',
178 'gxamp3_stereo.dsp',
179 'gxamp4_stereo.dsp',
180 'gxamp5_stereo.dsp',
181 'gxamp6_stereo.dsp',
182 'gxamp7_stereo.dsp',
183 'gxamp8_stereo.dsp',
184 'gxamp9_stereo.dsp',
185 'gxamp10_stereo.dsp',
186 'gxamp11_stereo.dsp',
187 'gxamp12_stereo.dsp',
188 'gxamp13_stereo.dsp',
189 'gxamp14_stereo.dsp',
190 'gxamp15_stereo.dsp',
191 'gxamp16_stereo.dsp',
192 'gxamp17_stereo.dsp',
193 'gxamp18_stereo.dsp',
194
195 # bypass mode
196 'balance.dsp',
197 ]
198
199
200 if bld.env['FAUST']:
201 float_arg = ["-s","40000","--float"]
202 if bld.env['FAUST_DOUBLE']:
203 arg = ["--double"]
204 else:
205 arg = ["--float"]
206 bld.new_task_gen(
207 source = sources_plugin,
208 proc = "../tools/dsp2cc",
209 proc_args = arg+["--init-type=plugin-lv2"],
210 )
211 bld.new_task_gen(
212 source = sources_plugin_init,
213 proc = "../tools/dsp2cc",
214 proc_args = arg+["-s","40000","--init-type=plugin-lv2"],
215 )
216 bld.new_task_gen(
217 source = sources_plugin_float,
218 proc = "../tools/dsp2cc",
219 proc_args = float_arg+["--init-type=plugin-lv2"]
220 )
221 else:
222 gdir = "../faust-generated/"
223 for s in sources_plugin_float + sources_plugin + sources_plugin_init:
224 s = s.replace(".dsp",".cc")
225 bld(name = "copy-faust-cc",
226 rule = "cp ${SRC} ${TGT}",
227 source = gdir + s,
228 target = s,
229 )
230 bld.add_group()
231
232 def configure(conf):
233 pass
0 // generated from file '../src/LV2/faust/autowah.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace autowah {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int IOTA;
10 int iVec0[1024];
11 int iRec2[2];
12 FAUSTFLOAT fslider0;
13 FAUSTFLOAT *fslider0_;
14 double fRec1[2];
15 FAUSTFLOAT fslider1;
16 FAUSTFLOAT *fslider1_;
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 int iConst0;
20 double fConst1;
21 double fConst2;
22 double fRec3[2];
23 double fRec4[2];
24 double fRec0[3];
25 void connect(uint32_t port,void* data);
26 void clear_state_f();
27 void init(uint32_t samplingFreq);
28 void compute(int count, float *input0, float *output0);
29
30 static void clear_state_f_static(PluginLV2*);
31 static void init_static(uint32_t samplingFreq, PluginLV2*);
32 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
33 static void del_instance(PluginLV2 *p);
34 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
35 public:
36 Dsp();
37 ~Dsp();
38 };
39
40
41
42 Dsp::Dsp()
43 : PluginLV2() {
44 version = PLUGINLV2_VERSION;
45 id = "auto";
46 name = N_("auto");
47 mono_audio = compute_static;
48 stereo_audio = 0;
49 set_samplerate = init_static;
50 activate_plugin = 0;
51 connect_ports = connect_static;
52 clear_state = clear_state_f_static;
53 delete_instance = del_instance;
54 }
55
56 Dsp::~Dsp() {
57 }
58
59 inline void Dsp::clear_state_f()
60 {
61 for (int i=0; i<1024; i++) iVec0[i] = 0;
62 for (int i=0; i<2; i++) iRec2[i] = 0;
63 for (int i=0; i<2; i++) fRec1[i] = 0;
64 for (int i=0; i<2; i++) fRec3[i] = 0;
65 for (int i=0; i<2; i++) fRec4[i] = 0;
66 for (int i=0; i<3; i++) fRec0[i] = 0;
67 }
68
69 void Dsp::clear_state_f_static(PluginLV2 *p)
70 {
71 static_cast<Dsp*>(p)->clear_state_f();
72 }
73
74 inline void Dsp::init(uint32_t samplingFreq)
75 {
76 fSamplingFreq = samplingFreq;
77 IOTA = 0;
78 iConst0 = min(192000, max(1, fSamplingFreq));
79 fConst1 = (2827.4333882308138 / iConst0);
80 fConst2 = (1413.7166941154069 / iConst0);
81 clear_state_f();
82 }
83
84 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
85 {
86 static_cast<Dsp*>(p)->init(samplingFreq);
87 }
88
89 inline void Dsp::compute(int count, float *input0, float *output0)
90 {
91 #define fslider0 (*fslider0_)
92 #define fslider1 (*fslider1_)
93 #define fslider2 (*fslider2_)
94 double fSlow0 = (2.384185791015625e-10 * fslider0);
95 double fSlow1 = fslider2;
96 double fSlow2 = (0.01 * (fSlow1 * fslider1));
97 double fSlow3 = (1 - (0.01 * fSlow1));
98 for (int i=0; i<count; i++) {
99 double fTemp0 = (double)input0[i];
100 int iTemp1 = abs(int((4194304 * fTemp0)));
101 iVec0[IOTA&1023] = iTemp1;
102 iRec2[0] = ((iVec0[IOTA&1023] + iRec2[1]) - iVec0[(IOTA-1000)&1023]);
103 double fTemp2 = min(1, max(0, (fSlow0 * double(iRec2[0]))));
104 fRec1[0] = ((0.0001000000000000001 * pow(4.0,fTemp2)) + (0.999 * fRec1[1]));
105 double fTemp3 = pow(2.0,(2.3 * fTemp2));
106 double fTemp4 = (1 - (fConst2 * (fTemp3 / pow(2.0,(1.0 + (2.0 * (1.0 - fTemp2)))))));
107 fRec3[0] = ((0.0010000000000000009 * (0 - (2.0 * (fTemp4 * cos((fConst1 * fTemp3)))))) + (0.999 * fRec3[1]));
108 fRec4[0] = ((0.0010000000000000009 * faustpower<2>(fTemp4)) + (0.999 * fRec4[1]));
109 fRec0[0] = (0 - (((fRec4[0] * fRec0[2]) + (fRec3[0] * fRec0[1])) - (fSlow2 * (fTemp0 * fRec1[0]))));
110 output0[i] = (FAUSTFLOAT)((fRec0[0] + (fSlow3 * fTemp0)) - fRec0[1]);
111 // post processing
112 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
113 fRec4[1] = fRec4[0];
114 fRec3[1] = fRec3[0];
115 fRec1[1] = fRec1[0];
116 iRec2[1] = iRec2[0];
117 IOTA = IOTA+1;
118 }
119 #undef fslider0
120 #undef fslider1
121 #undef fslider2
122 }
123
124 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
125 {
126 static_cast<Dsp*>(p)->compute(count, input0, output0);
127 }
128
129
130 void Dsp::connect(uint32_t port,void* data)
131 {
132 switch ((PortIndex)port)
133 {
134 case WET_DRY:
135 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
136 break;
137 case LEVEL:
138 fslider1_ = (float*)data; // , 0.1, 0.0, 1.0, 0.01
139 break;
140 case WAH:
141 fslider0_ = (float*)data; // , 0.0, 0.0, 1.0, 0.01
142 break;
143 default:
144 break;
145 }
146 }
147
148 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
149 {
150 static_cast<Dsp*>(p)->connect(port, data);
151 }
152
153
154 PluginLV2 *plugin() {
155 return new Dsp();
156 }
157
158 void Dsp::del_instance(PluginLV2 *p)
159 {
160 delete static_cast<Dsp*>(p);
161 }
162
163 /*
164 typedef enum
165 {
166 WET_DRY,
167 LEVEL,
168 WAH,
169 } PortIndex;
170 */
171
172 } // end namespace autowah
0 // generated from file '../src/LV2/faust/balance.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace balance {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 double fRec0[2];
12 void connect(uint32_t port,void* data);
13 void clear_state_f();
14 void init(uint32_t samplingFreq);
15 void compute(int count, float *input0, float *input1, float *output0, float *output1);
16
17 static void clear_state_f_static(PluginLV2*);
18 static void init_static(uint32_t samplingFreq, PluginLV2*);
19 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
20 static void del_instance(PluginLV2 *p);
21 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
22 public:
23 Dsp();
24 ~Dsp();
25 };
26
27
28
29 Dsp::Dsp()
30 : PluginLV2() {
31 version = PLUGINLV2_VERSION;
32 id = "balance";
33 name = "?balance";
34 mono_audio = 0;
35 stereo_audio = compute_static;
36 set_samplerate = init_static;
37 activate_plugin = 0;
38 connect_ports = connect_static;
39 clear_state = clear_state_f_static;
40 delete_instance = del_instance;
41 }
42
43 Dsp::~Dsp() {
44 }
45
46 inline void Dsp::clear_state_f()
47 {
48 for (int i=0; i<2; i++) fRec0[i] = 0;
49 }
50
51 void Dsp::clear_state_f_static(PluginLV2 *p)
52 {
53 static_cast<Dsp*>(p)->clear_state_f();
54 }
55
56 inline void Dsp::init(uint32_t samplingFreq)
57 {
58 fSamplingFreq = samplingFreq;
59 clear_state_f();
60 }
61
62 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
63 {
64 static_cast<Dsp*>(p)->init(samplingFreq);
65 }
66
67 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
68 {
69 #define fslider0 (*fslider0_)
70 double fSlow0 = (0.0010000000000000009 * fslider0);
71 for (int i=0; i<count; i++) {
72 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
73 output0[i] = (FAUSTFLOAT)((double)input0[i] * (1 - max(0, fRec0[0])));
74 output1[i] = (FAUSTFLOAT)((double)input1[i] * (1 - max(0, (0 - fRec0[0]))));
75 // post processing
76 fRec0[1] = fRec0[0];
77 }
78 #undef fslider0
79 }
80
81 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
82 {
83 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
84 }
85
86
87 void Dsp::connect(uint32_t port,void* data)
88 {
89 switch ((PortIndex)port)
90 {
91 case BALANCE:
92 fslider0_ = (float*)data; // , 0.0, -1.0, 1.0, 0.1
93 break;
94 default:
95 break;
96 }
97 }
98
99 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
100 {
101 static_cast<Dsp*>(p)->connect(port, data);
102 }
103
104
105 PluginLV2 *plugin() {
106 return new Dsp();
107 }
108
109 void Dsp::del_instance(PluginLV2 *p)
110 {
111 delete static_cast<Dsp*>(p);
112 }
113
114 /*
115 typedef enum
116 {
117 BALANCE,
118 } PortIndex;
119 */
120
121 } // end namespace balance
0 // generated from file '../src/LV2/faust/bassbooster.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace bassbooster {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 double fConst0;
10 double fConst1;
11 double fConst2;
12 double fConst3;
13 double fConst4;
14 double fRec0[3];
15 FAUSTFLOAT fslider0;
16 FAUSTFLOAT *fslider0_;
17 void connect(uint32_t port,void* data);
18 void clear_state_f();
19 void init(uint32_t samplingFreq);
20 void compute(int count, float *input0, float *output0);
21
22 static void clear_state_f_static(PluginLV2*);
23 static void init_static(uint32_t samplingFreq, PluginLV2*);
24 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
25 static void del_instance(PluginLV2 *p);
26 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
27 public:
28 Dsp();
29 ~Dsp();
30 };
31
32
33
34 static const char* parm_groups[] = {
35 ".bassbooster", N_("Bassbooster"),
36 0
37 };
38
39 Dsp::Dsp()
40 : PluginLV2() {
41 version = PLUGINLV2_VERSION;
42 id = "amp.bass_boost";
43 name = N_("Bassbooster");
44 mono_audio = compute_static;
45 stereo_audio = 0;
46 set_samplerate = init_static;
47 activate_plugin = 0;
48 connect_ports = connect_static;
49 clear_state = clear_state_f_static;
50 delete_instance = del_instance;
51 }
52
53 Dsp::~Dsp() {
54 }
55
56 inline void Dsp::clear_state_f()
57 {
58 for (int i=0; i<3; i++) fRec0[i] = 0;
59 }
60
61 void Dsp::clear_state_f_static(PluginLV2 *p)
62 {
63 static_cast<Dsp*>(p)->clear_state_f();
64 }
65
66 inline void Dsp::init(uint32_t samplingFreq)
67 {
68 fSamplingFreq = samplingFreq;
69 fConst0 = tan((376.99111843077515 / min(192000, max(1, fSamplingFreq))));
70 fConst1 = faustpower<2>(fConst0);
71 fConst2 = (2 * (fConst1 - 1));
72 fConst3 = (1 + (fConst0 * (fConst0 - 1.4142135623730951)));
73 fConst4 = (1.0 / (1 + (fConst0 * (1.4142135623730951 + fConst0))));
74 clear_state_f();
75 }
76
77 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
78 {
79 static_cast<Dsp*>(p)->init(samplingFreq);
80 }
81
82 inline void Dsp::compute(int count, float *input0, float *output0)
83 {
84 #define fslider0 (*fslider0_)
85 double fSlow0 = pow(10,(0.05 * fslider0));
86 double fSlow1 = sqrt((2 * fSlow0));
87 double fSlow2 = (fConst0 * fSlow0);
88 double fSlow3 = (1 + (fConst0 * (fSlow2 - fSlow1)));
89 double fSlow4 = (2 * ((fConst1 * fSlow0) - 1));
90 double fSlow5 = (1 + (fConst0 * (fSlow2 + fSlow1)));
91 for (int i=0; i<count; i++) {
92 fRec0[0] = ((double)input0[i] - (fConst4 * ((fConst3 * fRec0[2]) + (fConst2 * fRec0[1]))));
93 output0[i] = (FAUSTFLOAT)(fConst4 * (((fSlow5 * fRec0[0]) + (fSlow4 * fRec0[1])) + (fSlow3 * fRec0[2])));
94 // post processing
95 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
96 }
97 #undef fslider0
98 }
99
100 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
101 {
102 static_cast<Dsp*>(p)->compute(count, input0, output0);
103 }
104
105
106 void Dsp::connect(uint32_t port,void* data)
107 {
108 switch ((PortIndex)port)
109 {
110 case LEVEL:
111 fslider0_ = (float*)data; // , 1e+01, 0.5, 2e+01, 0.5
112 break;
113 default:
114 break;
115 }
116 }
117
118 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
119 {
120 static_cast<Dsp*>(p)->connect(port, data);
121 }
122
123
124 PluginLV2 *plugin() {
125 return new Dsp();
126 }
127
128 void Dsp::del_instance(PluginLV2 *p)
129 {
130 delete static_cast<Dsp*>(p);
131 }
132
133 /*
134 typedef enum
135 {
136 LEVEL,
137 } PortIndex;
138 */
139
140 } // end namespace bassbooster
0 // generated from file '../src/LV2/faust/biquad.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace biquad {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 double fConst0;
12 double fRec0[3];
13 void connect(uint32_t port,void* data);
14 void clear_state_f();
15 void init(uint32_t samplingFreq);
16 void compute(int count, float *input0, float *output0);
17
18 static void clear_state_f_static(PluginLV2*);
19 static void init_static(uint32_t samplingFreq, PluginLV2*);
20 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
21 static void del_instance(PluginLV2 *p);
22 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
23 public:
24 Dsp();
25 ~Dsp();
26 };
27
28
29
30 Dsp::Dsp()
31 : PluginLV2() {
32 version = PLUGINLV2_VERSION;
33 id = "biquad";
34 name = N_("BiQuad Filter");
35 mono_audio = compute_static;
36 stereo_audio = 0;
37 set_samplerate = init_static;
38 activate_plugin = 0;
39 connect_ports = connect_static;
40 clear_state = clear_state_f_static;
41 delete_instance = del_instance;
42 }
43
44 Dsp::~Dsp() {
45 }
46
47 inline void Dsp::clear_state_f()
48 {
49 for (int i=0; i<3; i++) fRec0[i] = 0;
50 }
51
52 void Dsp::clear_state_f_static(PluginLV2 *p)
53 {
54 static_cast<Dsp*>(p)->clear_state_f();
55 }
56
57 inline void Dsp::init(uint32_t samplingFreq)
58 {
59 fSamplingFreq = samplingFreq;
60 fConst0 = (6.283185307179586 / min(192000, max(1, fSamplingFreq)));
61 clear_state_f();
62 }
63
64 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
65 {
66 static_cast<Dsp*>(p)->init(samplingFreq);
67 }
68
69 inline void Dsp::compute(int count, float *input0, float *output0)
70 {
71 #define fslider0 (*fslider0_)
72 double fSlow0 = log((fConst0 * fslider0));
73 double fSlow1 = (0 - (1.8442 * cos(exp((0.07238887 + (fSlow0 * (1.31282248 + (fSlow0 * (0.43359433 + (fSlow0 * (0.27547621 + (fSlow0 * (0.06446806 + (0.00506158 * fSlow0))))))))))))));
74 for (int i=0; i<count; i++) {
75 fRec0[0] = ((double)input0[i] - ((0.8502684100000001 * fRec0[2]) + (fSlow1 * fRec0[1])));
76 output0[i] = (FAUSTFLOAT)(0.31622776601683794 * (fRec0[0] - (1.059 * fRec0[1])));
77 // post processing
78 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
79 }
80 #undef fslider0
81 }
82
83 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
84 {
85 static_cast<Dsp*>(p)->compute(count, input0, output0);
86 }
87
88
89 void Dsp::connect(uint32_t port,void* data)
90 {
91 switch ((PortIndex)port)
92 {
93 case FREQ:
94 fslider0_ = (float*)data; // , 1.2e+03, 3e+02, 3e+03, 5.0
95 break;
96 default:
97 break;
98 }
99 }
100
101 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
102 {
103 static_cast<Dsp*>(p)->connect(port, data);
104 }
105
106
107 PluginLV2 *plugin() {
108 return new Dsp();
109 }
110
111 void Dsp::del_instance(PluginLV2 *p)
112 {
113 delete static_cast<Dsp*>(p);
114 }
115
116 /*
117 typedef enum
118 {
119 FREQ,
120 } PortIndex;
121 */
122
123 } // end namespace biquad
0 // generated from file '../src/LV2/faust/chorus.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace chorus {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 class SIG0 {
10 private:
11 int fSamplingFreq;
12 int iRec1[2];
13 public:
14 int getNumInputs() { return 0; }
15 int getNumOutputs() { return 1; }
16 void init(int samplingFreq) {
17 fSamplingFreq = samplingFreq;
18 for (int i=0; i<2; i++) iRec1[i] = 0;
19 }
20 void fill (int count, float output[]) {
21 for (int i=0; i<count; i++) {
22 iRec1[0] = (1 + iRec1[1]);
23 output[i] = sinf((9.587379924285257e-05f * (iRec1[0] - 1)));
24 // post processing
25 iRec1[1] = iRec1[0];
26 }
27 }
28 };
29 int IOTA;
30 float *fVec0;
31 FAUSTFLOAT fslider0;
32 FAUSTFLOAT *fslider0_;
33 int iConst0;
34 float fConst1;
35 float fRec0[2];
36 static float ftbl0[65536];
37 FAUSTFLOAT fslider1;
38 FAUSTFLOAT *fslider1_;
39 FAUSTFLOAT fslider2;
40 FAUSTFLOAT *fslider2_;
41 float fConst2;
42 FAUSTFLOAT fslider3;
43 FAUSTFLOAT *fslider3_;
44 float *fVec1;
45 bool mem_allocated;
46 void mem_alloc();
47 void mem_free();
48 void connect(uint32_t port,void* data);
49 void clear_state_f();
50 int activate(bool start);
51 void init(uint32_t samplingFreq);
52 void compute(int count, float *input0, float *input1, float *output0, float *output1);
53
54 static void clear_state_f_static(PluginLV2*);
55 static int activate_static(bool start, PluginLV2*);
56 static void init_static(uint32_t samplingFreq, PluginLV2*);
57 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
58 static void del_instance(PluginLV2 *p);
59 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
60 public:
61 Dsp();
62 ~Dsp();
63 };
64
65
66 float Dsp::ftbl0[65536];
67
68 Dsp::Dsp()
69 : PluginLV2(),
70 fVec0(0),
71 fVec1(0),
72 mem_allocated(false) {
73 version = PLUGINLV2_VERSION;
74 id = "chorus";
75 name = N_("Chorus");
76 mono_audio = 0;
77 stereo_audio = compute_static;
78 set_samplerate = init_static;
79 activate_plugin = activate_static;
80 connect_ports = connect_static;
81 clear_state = clear_state_f_static;
82 delete_instance = del_instance;
83 }
84
85 Dsp::~Dsp() {
86 }
87
88 inline void Dsp::clear_state_f()
89 {
90 for (int i=0; i<65536; i++) fVec0[i] = 0;
91 for (int i=0; i<2; i++) fRec0[i] = 0;
92 for (int i=0; i<65536; i++) fVec1[i] = 0;
93 }
94
95 void Dsp::clear_state_f_static(PluginLV2 *p)
96 {
97 static_cast<Dsp*>(p)->clear_state_f();
98 }
99
100 inline void Dsp::init(uint32_t samplingFreq)
101 {
102 SIG0 sig0;
103 sig0.init(samplingFreq);
104 sig0.fill(65536,ftbl0);
105 fSamplingFreq = samplingFreq;
106 IOTA = 0;
107 iConst0 = min(192000, max(1, fSamplingFreq));
108 fConst1 = (1.0f / iConst0);
109 fConst2 = (0.5f * iConst0);
110 }
111
112 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
113 {
114 static_cast<Dsp*>(p)->init(samplingFreq);
115 }
116
117 void Dsp::mem_alloc()
118 {
119 if (!fVec0) fVec0 = new float[65536];
120 if (!fVec1) fVec1 = new float[65536];
121 mem_allocated = true;
122 }
123
124 void Dsp::mem_free()
125 {
126 mem_allocated = false;
127 if (fVec0) { delete fVec0; fVec0 = 0; }
128 if (fVec1) { delete fVec1; fVec1 = 0; }
129 }
130
131 int Dsp::activate(bool start)
132 {
133 if (start) {
134 if (!mem_allocated) {
135 mem_alloc();
136 clear_state_f();
137 }
138 } else if (!mem_allocated) {
139 mem_free();
140 }
141 return 0;
142 }
143
144 int Dsp::activate_static(bool start, PluginLV2 *p)
145 {
146 return static_cast<Dsp*>(p)->activate(start);
147 }
148
149 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
150 {
151 #define fslider0 (*fslider0_)
152 #define fslider1 (*fslider1_)
153 #define fslider2 (*fslider2_)
154 #define fslider3 (*fslider3_)
155 float fSlow0 = (fConst1 * fslider0);
156 float fSlow1 = fslider1;
157 float fSlow2 = (fConst2 * fslider2);
158 float fSlow3 = fslider3;
159 for (int i=0; i<count; i++) {
160 float fTemp0 = (float)input0[i];
161 fVec0[IOTA&65535] = fTemp0;
162 float fTemp1 = (fSlow0 + fRec0[1]);
163 fRec0[0] = (fTemp1 - floorf(fTemp1));
164 float fTemp2 = (65536 * (fRec0[0] - floorf(fRec0[0])));
165 float fTemp3 = floorf(fTemp2);
166 int iTemp4 = int(fTemp3);
167 float fTemp5 = (fSlow2 * (1 + (fSlow1 * ((ftbl0[((1 + iTemp4) & 65535)] * (fTemp2 - fTemp3)) + (ftbl0[(iTemp4 & 65535)] * ((1 + fTemp3) - fTemp2))))));
168 int iTemp6 = int(fTemp5);
169 int iTemp7 = (1 + iTemp6);
170 output0[i] = (FAUSTFLOAT)(fVec0[IOTA&65535] + (fSlow3 * (((fTemp5 - iTemp6) * fVec0[(IOTA-int((int(iTemp7) & 65535)))&65535]) + ((iTemp7 - fTemp5) * fVec0[(IOTA-int((iTemp6 & 65535)))&65535]))));
171 float fTemp8 = (float)input1[i];
172 fVec1[IOTA&65535] = fTemp8;
173 float fTemp9 = (0.25f + fRec0[0]);
174 float fTemp10 = (65536 * (fTemp9 - floorf(fTemp9)));
175 float fTemp11 = floorf(fTemp10);
176 int iTemp12 = int(fTemp11);
177 float fTemp13 = (fSlow2 * (1 + (fSlow1 * ((ftbl0[((1 + iTemp12) & 65535)] * (fTemp10 - fTemp11)) + (ftbl0[(iTemp12 & 65535)] * ((1 + fTemp11) - fTemp10))))));
178 int iTemp14 = int(fTemp13);
179 int iTemp15 = (1 + iTemp14);
180 output1[i] = (FAUSTFLOAT)(fVec1[IOTA&65535] + (fSlow3 * (((fTemp13 - iTemp14) * fVec1[(IOTA-int((int(iTemp15) & 65535)))&65535]) + ((iTemp15 - fTemp13) * fVec1[(IOTA-int((iTemp14 & 65535)))&65535]))));
181 // post processing
182 fRec0[1] = fRec0[0];
183 IOTA = IOTA+1;
184 }
185 #undef fslider0
186 #undef fslider1
187 #undef fslider2
188 #undef fslider3
189 }
190
191 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
192 {
193 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
194 }
195
196
197 void Dsp::connect(uint32_t port,void* data)
198 {
199 switch ((PortIndex)port)
200 {
201 case LEVEL:
202 fslider3_ = (float*)data; // , 0.5f, 0.0f, 1.0f, 0.01f
203 break;
204 case DELAY:
205 fslider2_ = (float*)data; // , 0.02f, 0.0f, 0.2f, 0.01f
206 break;
207 case DEPTH:
208 fslider1_ = (float*)data; // , 0.02f, 0.0f, 1.0f, 0.01f
209 break;
210 case FREQ:
211 fslider0_ = (float*)data; // , 3.0f, 0.0f, 1e+01f, 0.01f
212 break;
213 default:
214 break;
215 }
216 }
217
218 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
219 {
220 static_cast<Dsp*>(p)->connect(port, data);
221 }
222
223
224 PluginLV2 *plugin() {
225 return new Dsp();
226 }
227
228 void Dsp::del_instance(PluginLV2 *p)
229 {
230 delete static_cast<Dsp*>(p);
231 }
232
233 /*
234 typedef enum
235 {
236 LEVEL,
237 DELAY,
238 DEPTH,
239 FREQ,
240 } PortIndex;
241 */
242
243 } // end namespace chorus
0 // generated from file '../src/LV2/faust/chorus_mono.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace chorus_mono {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 class SIG0 {
10 private:
11 int fSamplingFreq;
12 int iRec1[2];
13 public:
14 int getNumInputs() { return 0; }
15 int getNumOutputs() { return 1; }
16 void init(int samplingFreq) {
17 fSamplingFreq = samplingFreq;
18 for (int i=0; i<2; i++) iRec1[i] = 0;
19 }
20 void fill (int count, double output[]) {
21 for (int i=0; i<count; i++) {
22 iRec1[0] = (1 + iRec1[1]);
23 output[i] = sin((9.587379924285257e-05 * (iRec1[0] - 1)));
24 // post processing
25 iRec1[1] = iRec1[0];
26 }
27 }
28 };
29 FAUSTFLOAT fslider0;
30 FAUSTFLOAT *fslider0_;
31 int IOTA;
32 double fVec0[65536];
33 FAUSTFLOAT fslider1;
34 FAUSTFLOAT *fslider1_;
35 int iConst0;
36 double fConst1;
37 double fRec0[2];
38 static double ftbl0[65536];
39 double fConst2;
40 FAUSTFLOAT fslider2;
41 FAUSTFLOAT *fslider2_;
42 void connect(uint32_t port,void* data);
43 void clear_state_f();
44 void init(uint32_t samplingFreq);
45 void compute(int count, float *input0, float *output0);
46
47 static void clear_state_f_static(PluginLV2*);
48 static void init_static(uint32_t samplingFreq, PluginLV2*);
49 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
50 static void del_instance(PluginLV2 *p);
51 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
52 public:
53 Dsp();
54 ~Dsp();
55 };
56
57
58 double Dsp::ftbl0[65536];
59
60 Dsp::Dsp()
61 : PluginLV2() {
62 version = PLUGINLV2_VERSION;
63 id = "chorus_mono";
64 name = N_("Chorus Mono");
65 mono_audio = compute_static;
66 stereo_audio = 0;
67 set_samplerate = init_static;
68 activate_plugin = 0;
69 connect_ports = connect_static;
70 clear_state = clear_state_f_static;
71 delete_instance = del_instance;
72 }
73
74 Dsp::~Dsp() {
75 }
76
77 inline void Dsp::clear_state_f()
78 {
79 for (int i=0; i<65536; i++) fVec0[i] = 0;
80 for (int i=0; i<2; i++) fRec0[i] = 0;
81 }
82
83 void Dsp::clear_state_f_static(PluginLV2 *p)
84 {
85 static_cast<Dsp*>(p)->clear_state_f();
86 }
87
88 inline void Dsp::init(uint32_t samplingFreq)
89 {
90 SIG0 sig0;
91 sig0.init(samplingFreq);
92 sig0.fill(65536,ftbl0);
93 fSamplingFreq = samplingFreq;
94 IOTA = 0;
95 iConst0 = min(192000, max(1, fSamplingFreq));
96 fConst1 = (1.0 / iConst0);
97 fConst2 = (0.01 * iConst0);
98 clear_state_f();
99 }
100
101 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
102 {
103 static_cast<Dsp*>(p)->init(samplingFreq);
104 }
105
106 inline void Dsp::compute(int count, float *input0, float *output0)
107 {
108 #define fslider0 (*fslider0_)
109 #define fslider1 (*fslider1_)
110 #define fslider2 (*fslider2_)
111 double fSlow0 = (0.01 * fslider0);
112 double fSlow1 = (fSlow0 + (1 - fSlow0));
113 double fSlow2 = (fConst1 * fslider1);
114 double fSlow3 = fslider2;
115 for (int i=0; i<count; i++) {
116 double fTemp0 = (double)input0[i];
117 double fTemp1 = (fSlow0 * fTemp0);
118 fVec0[IOTA&65535] = fTemp1;
119 double fTemp2 = (fSlow2 + fRec0[1]);
120 fRec0[0] = (fTemp2 - floor(fTemp2));
121 double fTemp3 = (65536 * (fRec0[0] - floor(fRec0[0])));
122 double fTemp4 = floor(fTemp3);
123 int iTemp5 = int(fTemp4);
124 double fTemp6 = (fConst2 * (1 + (0.02 * ((ftbl0[((1 + iTemp5) & 65535)] * (fTemp3 - fTemp4)) + (ftbl0[(iTemp5 & 65535)] * ((1 + fTemp4) - fTemp3))))));
125 int iTemp7 = int(fTemp6);
126 int iTemp8 = (1 + iTemp7);
127 output0[i] = (FAUSTFLOAT)((fSlow3 * (((fTemp6 - iTemp7) * fVec0[(IOTA-int((int(iTemp8) & 65535)))&65535]) + ((iTemp8 - fTemp6) * fVec0[(IOTA-int((iTemp7 & 65535)))&65535]))) + (fSlow1 * fTemp0));
128 // post processing
129 fRec0[1] = fRec0[0];
130 IOTA = IOTA+1;
131 }
132 #undef fslider0
133 #undef fslider1
134 #undef fslider2
135 }
136
137 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
138 {
139 static_cast<Dsp*>(p)->compute(count, input0, output0);
140 }
141
142
143 void Dsp::connect(uint32_t port,void* data)
144 {
145 switch ((PortIndex)port)
146 {
147 case LEVEL:
148 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
149 break;
150 case FREQ:
151 fslider1_ = (float*)data; // , 2.0, 0.0, 1e+01, 0.01
152 break;
153 case WET_DRY:
154 fslider0_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
155 break;
156 default:
157 break;
158 }
159 }
160
161 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
162 {
163 static_cast<Dsp*>(p)->connect(port, data);
164 }
165
166
167 PluginLV2 *plugin() {
168 return new Dsp();
169 }
170
171 void Dsp::del_instance(PluginLV2 *p)
172 {
173 delete static_cast<Dsp*>(p);
174 }
175
176 /*
177 typedef enum
178 {
179 LEVEL,
180 FREQ,
181 WET_DRY,
182 } PortIndex;
183 */
184
185 } // end namespace chorus_mono
0 // generated from file '../src/LV2/faust/compressor.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace compressor {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fentry0;
10 FAUSTFLOAT *fentry0_;
11 FAUSTFLOAT fentry1;
12 FAUSTFLOAT *fentry1_;
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fRec1[2];
17 double fConst3;
18 FAUSTFLOAT fslider0;
19 FAUSTFLOAT *fslider0_;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec0[2];
23 FAUSTFLOAT fentry2;
24 FAUSTFLOAT *fentry2_;
25 void connect(uint32_t port,void* data);
26 void clear_state_f();
27 void init(uint32_t samplingFreq);
28 void compute(int count, float *input0, float *output0);
29
30 static void clear_state_f_static(PluginLV2*);
31 static void init_static(uint32_t samplingFreq, PluginLV2*);
32 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
33 static void del_instance(PluginLV2 *p);
34 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
35 public:
36 Dsp();
37 ~Dsp();
38 };
39
40
41
42 Dsp::Dsp()
43 : PluginLV2() {
44 version = PLUGINLV2_VERSION;
45 id = "compressor";
46 name = N_("Compressor");
47 mono_audio = compute_static;
48 stereo_audio = 0;
49 set_samplerate = init_static;
50 activate_plugin = 0;
51 connect_ports = connect_static;
52 clear_state = clear_state_f_static;
53 delete_instance = del_instance;
54 }
55
56 Dsp::~Dsp() {
57 }
58
59 inline void Dsp::clear_state_f()
60 {
61 for (int i=0; i<2; i++) fRec1[i] = 0;
62 for (int i=0; i<2; i++) fRec0[i] = 0;
63 }
64
65 void Dsp::clear_state_f_static(PluginLV2 *p)
66 {
67 static_cast<Dsp*>(p)->clear_state_f();
68 }
69
70 inline void Dsp::init(uint32_t samplingFreq)
71 {
72 fSamplingFreq = samplingFreq;
73 iConst0 = min(192000, max(1, fSamplingFreq));
74 fConst1 = exp((0 - (1e+01 / iConst0)));
75 fConst2 = (1 - fConst1);
76 fConst3 = (1.0 / iConst0);
77 clear_state_f();
78 }
79
80 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->init(samplingFreq);
83 }
84
85 inline void Dsp::compute(int count, float *input0, float *output0)
86 {
87 #define fentry0 (*fentry0_)
88 #define fentry1 (*fentry1_)
89 #define fslider0 (*fslider0_)
90 #define fslider1 (*fslider1_)
91 #define fentry2 (*fentry2_)
92 double fSlow0 = fentry1;
93 double fSlow1 = (fSlow0 - fentry0);
94 double fSlow2 = exp((0 - (fConst3 / max(fConst3, fslider0))));
95 double fSlow3 = exp((0 - (fConst3 / max(fConst3, fslider1))));
96 double fSlow4 = (1.0 / (0.001 + fSlow0));
97 double fSlow5 = (fentry2 - 1);
98 for (int i=0; i<count; i++) {
99 double fTemp0 = (double)input0[i];
100 fRec1[0] = ((fConst2 * fabs((fTemp0 + 1e-20))) + (fConst1 * fRec1[1]));
101 double fTemp1 = ((fSlow3 * (fRec0[1] >= fRec1[0])) + (fSlow2 * (fRec0[1] < fRec1[0])));
102 fRec0[0] = ((fRec1[0] * (0 - (fTemp1 - 1))) + (fRec0[1] * fTemp1));
103 double fTemp2 = max(0, ((20 * log10(fRec0[0])) + fSlow1));
104 double fTemp3 = (fSlow5 * min(1, max(0, (fSlow4 * fTemp2))));
105 output0[i] = (FAUSTFLOAT)(fTemp0 * pow(10,(0.05 * ((fTemp2 * (0 - fTemp3)) / (1 + fTemp3)))));
106 // post processing
107 fRec0[1] = fRec0[0];
108 fRec1[1] = fRec1[0];
109 }
110 #undef fentry0
111 #undef fentry1
112 #undef fslider0
113 #undef fslider1
114 #undef fentry2
115 }
116
117 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
118 {
119 static_cast<Dsp*>(p)->compute(count, input0, output0);
120 }
121
122
123 void Dsp::connect(uint32_t port,void* data)
124 {
125 switch ((PortIndex)port)
126 {
127 case RATIO:
128 fentry2_ = (float*)data; // , 2.0, 1.0, 2e+01, 0.1
129 break;
130 case KNEE:
131 fentry1_ = (float*)data; // , 3.0, 0.0, 2e+01, 0.1
132 break;
133 case THRESHOLD:
134 fentry0_ = (float*)data; // , -2e+01, -96.0, 1e+01, 0.1
135 break;
136 case RELEASE:
137 fslider1_ = (float*)data; // , 0.5, 0.0, 1e+01, 0.01
138 break;
139 case ATTACK:
140 fslider0_ = (float*)data; // , 0.002, 0.0, 1.0, 0.001
141 break;
142 default:
143 break;
144 }
145 }
146
147 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
148 {
149 static_cast<Dsp*>(p)->connect(port, data);
150 }
151
152
153 PluginLV2 *plugin() {
154 return new Dsp();
155 }
156
157 void Dsp::del_instance(PluginLV2 *p)
158 {
159 delete static_cast<Dsp*>(p);
160 }
161
162 /*
163 typedef enum
164 {
165 RATIO,
166 KNEE,
167 THRESHOLD,
168 RELEASE,
169 ATTACK,
170 } PortIndex;
171 */
172
173 } // end namespace compressor
0 // generated from file '../src/LV2/faust/crybaby.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace crybaby {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int iConst0;
12 double fConst1;
13 double fConst2;
14 double fRec1[2];
15 double fRec2[2];
16 double fRec3[2];
17 FAUSTFLOAT fslider1;
18 FAUSTFLOAT *fslider1_;
19 FAUSTFLOAT fslider2;
20 FAUSTFLOAT *fslider2_;
21 double fRec0[3];
22 void connect(uint32_t port,void* data);
23 void clear_state_f();
24 void init(uint32_t samplingFreq);
25 void compute(int count, float *input0, float *output0);
26
27 static void clear_state_f_static(PluginLV2*);
28 static void init_static(uint32_t samplingFreq, PluginLV2*);
29 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
30 static void del_instance(PluginLV2 *p);
31 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
32 public:
33 Dsp();
34 ~Dsp();
35 };
36
37
38
39 Dsp::Dsp()
40 : PluginLV2() {
41 version = PLUGINLV2_VERSION;
42 id = "manual";
43 name = N_("manual");
44 mono_audio = compute_static;
45 stereo_audio = 0;
46 set_samplerate = init_static;
47 activate_plugin = 0;
48 connect_ports = connect_static;
49 clear_state = clear_state_f_static;
50 delete_instance = del_instance;
51 }
52
53 Dsp::~Dsp() {
54 }
55
56 inline void Dsp::clear_state_f()
57 {
58 for (int i=0; i<2; i++) fRec1[i] = 0;
59 for (int i=0; i<2; i++) fRec2[i] = 0;
60 for (int i=0; i<2; i++) fRec3[i] = 0;
61 for (int i=0; i<3; i++) fRec0[i] = 0;
62 }
63
64 void Dsp::clear_state_f_static(PluginLV2 *p)
65 {
66 static_cast<Dsp*>(p)->clear_state_f();
67 }
68
69 inline void Dsp::init(uint32_t samplingFreq)
70 {
71 fSamplingFreq = samplingFreq;
72 iConst0 = min(192000, max(1, fSamplingFreq));
73 fConst1 = (1413.7166941154069 / iConst0);
74 fConst2 = (2827.4333882308138 / iConst0);
75 clear_state_f();
76 }
77
78 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
79 {
80 static_cast<Dsp*>(p)->init(samplingFreq);
81 }
82
83 inline void Dsp::compute(int count, float *input0, float *output0)
84 {
85 #define fslider0 (*fslider0_)
86 #define fslider1 (*fslider1_)
87 #define fslider2 (*fslider2_)
88 double fSlow0 = fslider0;
89 double fSlow1 = pow(2.0,(2.3 * fSlow0));
90 double fSlow2 = (1 - (fConst1 * (fSlow1 / pow(2.0,(1.0 + (2.0 * (1.0 - fSlow0)))))));
91 double fSlow3 = (0.0010000000000000009 * (0 - (2.0 * (cos((fConst2 * fSlow1)) * fSlow2))));
92 double fSlow4 = (0.0010000000000000009 * faustpower<2>(fSlow2));
93 double fSlow5 = (0.0001000000000000001 * pow(4.0,fSlow0));
94 double fSlow6 = fslider2;
95 double fSlow7 = (0.01 * (fSlow6 * fslider1));
96 double fSlow8 = (1 - (0.01 * fSlow6));
97 for (int i=0; i<count; i++) {
98 fRec1[0] = (fSlow3 + (0.999 * fRec1[1]));
99 fRec2[0] = (fSlow4 + (0.999 * fRec2[1]));
100 fRec3[0] = (fSlow5 + (0.999 * fRec3[1]));
101 double fTemp0 = (double)input0[i];
102 fRec0[0] = ((fSlow7 * (fTemp0 * fRec3[0])) - (0.996 * ((fRec2[0] * fRec0[2]) + (fRec1[0] * fRec0[1]))));
103 output0[i] = (FAUSTFLOAT)((fRec0[0] + (fSlow8 * fTemp0)) - (0.996 * fRec0[1]));
104 // post processing
105 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
106 fRec3[1] = fRec3[0];
107 fRec2[1] = fRec2[0];
108 fRec1[1] = fRec1[0];
109 }
110 #undef fslider0
111 #undef fslider1
112 #undef fslider2
113 }
114
115 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
116 {
117 static_cast<Dsp*>(p)->compute(count, input0, output0);
118 }
119
120
121 void Dsp::connect(uint32_t port,void* data)
122 {
123 switch ((PortIndex)port)
124 {
125 case WET_DRY:
126 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
127 break;
128 case LEVEL:
129 fslider1_ = (float*)data; // , 0.1, 0.0, 1.0, 0.01
130 break;
131 case WAH:
132 fslider0_ = (float*)data; // , 0.0, 0.0, 1.0, 0.01
133 break;
134 default:
135 break;
136 }
137 }
138
139 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
140 {
141 static_cast<Dsp*>(p)->connect(port, data);
142 }
143
144
145 PluginLV2 *plugin() {
146 return new Dsp();
147 }
148
149 void Dsp::del_instance(PluginLV2 *p)
150 {
151 delete static_cast<Dsp*>(p);
152 }
153
154 /*
155 typedef enum
156 {
157 WET_DRY,
158 LEVEL,
159 WAH,
160 } PortIndex;
161 */
162
163 } // end namespace crybaby
0 // generated from file '../src/LV2/faust/delay.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace delay {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int IOTA;
10 float *fVec0;
11 FAUSTFLOAT fslider0;
12 FAUSTFLOAT *fslider0_;
13 float fConst0;
14 FAUSTFLOAT fslider1;
15 FAUSTFLOAT *fslider1_;
16 float fRec0[2];
17 bool mem_allocated;
18 void mem_alloc();
19 void mem_free();
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 int activate(bool start);
23 void init(uint32_t samplingFreq);
24 void compute(int count, float *input0, float *output0);
25
26 static void clear_state_f_static(PluginLV2*);
27 static int activate_static(bool start, PluginLV2*);
28 static void init_static(uint32_t samplingFreq, PluginLV2*);
29 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
30 static void del_instance(PluginLV2 *p);
31 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
32 public:
33 Dsp();
34 ~Dsp();
35 };
36
37
38
39 Dsp::Dsp()
40 : PluginLV2(),
41 fVec0(0),
42 mem_allocated(false) {
43 version = PLUGINLV2_VERSION;
44 id = "delay";
45 name = N_("Delay");
46 mono_audio = compute_static;
47 stereo_audio = 0;
48 set_samplerate = init_static;
49 activate_plugin = activate_static;
50 connect_ports = connect_static;
51 clear_state = clear_state_f_static;
52 delete_instance = del_instance;
53 }
54
55 Dsp::~Dsp() {
56 }
57
58 inline void Dsp::clear_state_f()
59 {
60 for (int i=0; i<262144; i++) fVec0[i] = 0;
61 for (int i=0; i<2; i++) fRec0[i] = 0;
62 }
63
64 void Dsp::clear_state_f_static(PluginLV2 *p)
65 {
66 static_cast<Dsp*>(p)->clear_state_f();
67 }
68
69 inline void Dsp::init(uint32_t samplingFreq)
70 {
71 fSamplingFreq = samplingFreq;
72 IOTA = 0;
73 fConst0 = (0.001f * min(192000, max(1, fSamplingFreq)));
74 }
75
76 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
77 {
78 static_cast<Dsp*>(p)->init(samplingFreq);
79 }
80
81 void Dsp::mem_alloc()
82 {
83 if (!fVec0) fVec0 = new float[262144];
84 mem_allocated = true;
85 }
86
87 void Dsp::mem_free()
88 {
89 mem_allocated = false;
90 if (fVec0) { delete fVec0; fVec0 = 0; }
91 }
92
93 int Dsp::activate(bool start)
94 {
95 if (start) {
96 if (!mem_allocated) {
97 mem_alloc();
98 clear_state_f();
99 }
100 } else if (!mem_allocated) {
101 mem_free();
102 }
103 return 0;
104 }
105
106 int Dsp::activate_static(bool start, PluginLV2 *p)
107 {
108 return static_cast<Dsp*>(p)->activate(start);
109 }
110
111 inline void Dsp::compute(int count, float *input0, float *output0)
112 {
113 #define fslider0 (*fslider0_)
114 #define fslider1 (*fslider1_)
115 float fSlow0 = (fConst0 * fslider0);
116 int iSlow1 = int(fSlow0);
117 int iSlow2 = int((iSlow1 & 262143));
118 int iSlow3 = (1 + iSlow1);
119 float fSlow4 = (iSlow3 - fSlow0);
120 int iSlow5 = int((int(iSlow3) & 262143));
121 float fSlow6 = (fSlow0 - iSlow1);
122 float fSlow7 = (0.0010000000000000009f * powf(10,(0.05f * fslider1)));
123 for (int i=0; i<count; i++) {
124 float fTemp0 = (float)input0[i];
125 fVec0[IOTA&262143] = fTemp0;
126 fRec0[0] = (fSlow7 + (0.999f * fRec0[1]));
127 output0[i] = (FAUSTFLOAT)(fVec0[IOTA&262143] + (fRec0[0] * ((fSlow6 * fVec0[(IOTA-iSlow5)&262143]) + (fSlow4 * fVec0[(IOTA-iSlow2)&262143]))));
128 // post processing
129 fRec0[1] = fRec0[0];
130 IOTA = IOTA+1;
131 }
132 #undef fslider0
133 #undef fslider1
134 }
135
136 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
137 {
138 static_cast<Dsp*>(p)->compute(count, input0, output0);
139 }
140
141
142 void Dsp::connect(uint32_t port,void* data)
143 {
144 switch ((PortIndex)port)
145 {
146 case GAIN:
147 fslider1_ = (float*)data; // , 0.0f, -2e+01f, 2e+01f, 0.1f
148 break;
149 case DELAY:
150 fslider0_ = (float*)data; // , 0.0f, 0.0f, 5e+03f, 1e+01f
151 break;
152 default:
153 break;
154 }
155 }
156
157 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
158 {
159 static_cast<Dsp*>(p)->connect(port, data);
160 }
161
162
163 PluginLV2 *plugin() {
164 return new Dsp();
165 }
166
167 void Dsp::del_instance(PluginLV2 *p)
168 {
169 delete static_cast<Dsp*>(p);
170 }
171
172 /*
173 typedef enum
174 {
175 GAIN,
176 DELAY,
177 } PortIndex;
178 */
179
180 } // end namespace delay
0 // generated from file '../src/LV2/faust/echo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace echo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 float fConst0;
12 FAUSTFLOAT fslider1;
13 FAUSTFLOAT *fslider1_;
14 int IOTA;
15 float *fRec0;
16 bool mem_allocated;
17 void mem_alloc();
18 void mem_free();
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 int activate(bool start);
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *output0);
24
25 static void clear_state_f_static(PluginLV2*);
26 static int activate_static(bool start, PluginLV2*);
27 static void init_static(uint32_t samplingFreq, PluginLV2*);
28 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
29 static void del_instance(PluginLV2 *p);
30 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
31 public:
32 Dsp();
33 ~Dsp();
34 };
35
36
37
38 Dsp::Dsp()
39 : PluginLV2(),
40 fRec0(0),
41 mem_allocated(false) {
42 version = PLUGINLV2_VERSION;
43 id = "echo";
44 name = N_("Echo");
45 mono_audio = compute_static;
46 stereo_audio = 0;
47 set_samplerate = init_static;
48 activate_plugin = activate_static;
49 connect_ports = connect_static;
50 clear_state = clear_state_f_static;
51 delete_instance = del_instance;
52 }
53
54 Dsp::~Dsp() {
55 }
56
57 inline void Dsp::clear_state_f()
58 {
59 for (int i=0; i<262144; i++) fRec0[i] = 0;
60 }
61
62 void Dsp::clear_state_f_static(PluginLV2 *p)
63 {
64 static_cast<Dsp*>(p)->clear_state_f();
65 }
66
67 inline void Dsp::init(uint32_t samplingFreq)
68 {
69 fSamplingFreq = samplingFreq;
70 fConst0 = (0.001f * min(192000, max(1, fSamplingFreq)));
71 IOTA = 0;
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 void Dsp::mem_alloc()
80 {
81 if (!fRec0) fRec0 = new float[262144];
82 mem_allocated = true;
83 }
84
85 void Dsp::mem_free()
86 {
87 mem_allocated = false;
88 if (fRec0) { delete fRec0; fRec0 = 0; }
89 }
90
91 int Dsp::activate(bool start)
92 {
93 if (start) {
94 if (!mem_allocated) {
95 mem_alloc();
96 clear_state_f();
97 }
98 } else if (!mem_allocated) {
99 mem_free();
100 }
101 return 0;
102 }
103
104 int Dsp::activate_static(bool start, PluginLV2 *p)
105 {
106 return static_cast<Dsp*>(p)->activate(start);
107 }
108
109 inline void Dsp::compute(int count, float *input0, float *output0)
110 {
111 #define fslider0 (*fslider0_)
112 #define fslider1 (*fslider1_)
113 int iSlow0 = int((1 + int((int((int((fConst0 * fslider0)) - 1)) & 131071))));
114 float fSlow1 = (0.01f * fslider1);
115 for (int i=0; i<count; i++) {
116 fRec0[IOTA&262143] = ((float)input0[i] + (fSlow1 * fRec0[(IOTA-iSlow0)&262143]));
117 output0[i] = (FAUSTFLOAT)fRec0[(IOTA-0)&262143];
118 // post processing
119 IOTA = IOTA+1;
120 }
121 #undef fslider0
122 #undef fslider1
123 }
124
125 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
126 {
127 static_cast<Dsp*>(p)->compute(count, input0, output0);
128 }
129
130
131 void Dsp::connect(uint32_t port,void* data)
132 {
133 switch ((PortIndex)port)
134 {
135 case PERCENT:
136 fslider1_ = (float*)data; // , 0.0f, 0.0f, 1e+02f, 0.1f
137 break;
138 case TIME:
139 fslider0_ = (float*)data; // , 1.0f, 1.0f, 2e+03f, 1.0f
140 break;
141 default:
142 break;
143 }
144 }
145
146 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
147 {
148 static_cast<Dsp*>(p)->connect(port, data);
149 }
150
151
152 PluginLV2 *plugin() {
153 return new Dsp();
154 }
155
156 void Dsp::del_instance(PluginLV2 *p)
157 {
158 delete static_cast<Dsp*>(p);
159 }
160
161 /*
162 typedef enum
163 {
164 PERCENT,
165 TIME,
166 } PortIndex;
167 */
168
169 } // end namespace echo
0 // generated from file '../src/LV2/faust/expander.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace expander {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iConst0;
10 double fConst1;
11 double fConst2;
12 double fRec1[2];
13 double fConst3;
14 FAUSTFLOAT fslider0;
15 FAUSTFLOAT *fslider0_;
16 FAUSTFLOAT fslider1;
17 FAUSTFLOAT *fslider1_;
18 double fRec0[2];
19 FAUSTFLOAT fentry0;
20 FAUSTFLOAT *fentry0_;
21 FAUSTFLOAT fentry1;
22 FAUSTFLOAT *fentry1_;
23 FAUSTFLOAT fentry2;
24 FAUSTFLOAT *fentry2_;
25 void connect(uint32_t port,void* data);
26 void clear_state_f();
27 void init(uint32_t samplingFreq);
28 void compute(int count, float *input0, float *output0);
29
30 static void clear_state_f_static(PluginLV2*);
31 static void init_static(uint32_t samplingFreq, PluginLV2*);
32 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
33 static void del_instance(PluginLV2 *p);
34 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
35 public:
36 Dsp();
37 ~Dsp();
38 };
39
40
41
42 Dsp::Dsp()
43 : PluginLV2() {
44 version = PLUGINLV2_VERSION;
45 id = "expander";
46 name = N_("Expander");
47 mono_audio = compute_static;
48 stereo_audio = 0;
49 set_samplerate = init_static;
50 activate_plugin = 0;
51 connect_ports = connect_static;
52 clear_state = clear_state_f_static;
53 delete_instance = del_instance;
54 }
55
56 Dsp::~Dsp() {
57 }
58
59 inline void Dsp::clear_state_f()
60 {
61 for (int i=0; i<2; i++) fRec1[i] = 0;
62 for (int i=0; i<2; i++) fRec0[i] = 0;
63 }
64
65 void Dsp::clear_state_f_static(PluginLV2 *p)
66 {
67 static_cast<Dsp*>(p)->clear_state_f();
68 }
69
70 inline void Dsp::init(uint32_t samplingFreq)
71 {
72 fSamplingFreq = samplingFreq;
73 iConst0 = min(192000, max(1, fSamplingFreq));
74 fConst1 = exp((0 - (1e+01 / iConst0)));
75 fConst2 = (1 - fConst1);
76 fConst3 = (1.0 / iConst0);
77 clear_state_f();
78 }
79
80 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->init(samplingFreq);
83 }
84
85 inline void Dsp::compute(int count, float *input0, float *output0)
86 {
87 #define fslider0 (*fslider0_)
88 #define fslider1 (*fslider1_)
89 #define fentry0 (*fentry0_)
90 #define fentry1 (*fentry1_)
91 #define fentry2 (*fentry2_)
92 double fSlow0 = exp((0 - (fConst3 / max(fConst3, fslider0))));
93 double fSlow1 = exp((0 - (fConst3 / max(fConst3, fslider1))));
94 double fSlow2 = fentry1;
95 double fSlow3 = (fSlow2 + fentry0);
96 double fSlow4 = (1.0 / (0.001 + fSlow2));
97 double fSlow5 = (fentry2 - 1);
98 for (int i=0; i<count; i++) {
99 double fTemp0 = (double)input0[i];
100 fRec1[0] = ((fConst2 * fabs(fTemp0)) + (fConst1 * fRec1[1]));
101 double fTemp1 = max(fRec1[0], fTemp0);
102 double fTemp2 = ((fSlow1 * (fRec0[1] >= fTemp1)) + (fSlow0 * (fRec0[1] < fTemp1)));
103 fRec0[0] = ((fTemp1 * (0 - (fTemp2 - 1))) + (fRec0[1] * fTemp2));
104 double fTemp3 = max(0, (fSlow3 - (20 * log10(fRec0[0]))));
105 output0[i] = (FAUSTFLOAT)(fTemp0 * pow(10,(0.05 * (fTemp3 * (0 - (fSlow5 * min(1, max(0, (fSlow4 * fTemp3)))))))));
106 // post processing
107 fRec0[1] = fRec0[0];
108 fRec1[1] = fRec1[0];
109 }
110 #undef fslider0
111 #undef fslider1
112 #undef fentry0
113 #undef fentry1
114 #undef fentry2
115 }
116
117 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
118 {
119 static_cast<Dsp*>(p)->compute(count, input0, output0);
120 }
121
122
123 void Dsp::connect(uint32_t port,void* data)
124 {
125 switch ((PortIndex)port)
126 {
127 case RATIO:
128 fentry2_ = (float*)data; // , 2.0, 1.0, 2e+01, 0.1
129 break;
130 case KNEE:
131 fentry1_ = (float*)data; // , 3.0, 0.0, 2e+01, 0.1
132 break;
133 case THRESHOLD:
134 fentry0_ = (float*)data; // , -4e+01, -96.0, 1e+01, 0.1
135 break;
136 case RELEASE:
137 fslider1_ = (float*)data; // , 0.1, 0.0, 1e+01, 0.01
138 break;
139 case ATTACK:
140 fslider0_ = (float*)data; // , 0.001, 0.0, 1.0, 0.001
141 break;
142 default:
143 break;
144 }
145 }
146
147 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
148 {
149 static_cast<Dsp*>(p)->connect(port, data);
150 }
151
152
153 PluginLV2 *plugin() {
154 return new Dsp();
155 }
156
157 void Dsp::del_instance(PluginLV2 *p)
158 {
159 delete static_cast<Dsp*>(p);
160 }
161
162 /*
163 typedef enum
164 {
165 RATIO,
166 KNEE,
167 THRESHOLD,
168 RELEASE,
169 ATTACK,
170 } PortIndex;
171 */
172
173 } // end namespace expander
0 // generated from file '../src/LV2/faust/flanger.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace flanger {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int iVec0[2];
12 FAUSTFLOAT fslider1;
13 FAUSTFLOAT *fslider1_;
14 int IOTA;
15 double fVec1[2048];
16 FAUSTFLOAT fslider2;
17 FAUSTFLOAT *fslider2_;
18 int iConst0;
19 double fConst1;
20 double fRec1[2];
21 double fRec2[2];
22 FAUSTFLOAT fslider3;
23 FAUSTFLOAT *fslider3_;
24 FAUSTFLOAT fslider4;
25 FAUSTFLOAT *fslider4_;
26 double fRec0[2];
27 FAUSTFLOAT fslider5;
28 FAUSTFLOAT *fslider5_;
29 FAUSTFLOAT fcheckbox0;
30 FAUSTFLOAT *fcheckbox0_;
31 double fVec2[2048];
32 double fRec3[2];
33 void connect(uint32_t port,void* data);
34 void clear_state_f();
35 void init(uint32_t samplingFreq);
36 void compute(int count, float *input0, float *input1, float *output0, float *output1);
37
38 static void clear_state_f_static(PluginLV2*);
39 static void init_static(uint32_t samplingFreq, PluginLV2*);
40 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
41 static void del_instance(PluginLV2 *p);
42 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
43 public:
44 Dsp();
45 ~Dsp();
46 };
47
48
49
50 Dsp::Dsp()
51 : PluginLV2() {
52 version = PLUGINLV2_VERSION;
53 id = "flanger";
54 name = N_("Flanger");
55 mono_audio = 0;
56 stereo_audio = compute_static;
57 set_samplerate = init_static;
58 activate_plugin = 0;
59 connect_ports = connect_static;
60 clear_state = clear_state_f_static;
61 delete_instance = del_instance;
62 }
63
64 Dsp::~Dsp() {
65 }
66
67 inline void Dsp::clear_state_f()
68 {
69 for (int i=0; i<2; i++) iVec0[i] = 0;
70 for (int i=0; i<2048; i++) fVec1[i] = 0;
71 for (int i=0; i<2; i++) fRec1[i] = 0;
72 for (int i=0; i<2; i++) fRec2[i] = 0;
73 for (int i=0; i<2; i++) fRec0[i] = 0;
74 for (int i=0; i<2048; i++) fVec2[i] = 0;
75 for (int i=0; i<2; i++) fRec3[i] = 0;
76 }
77
78 void Dsp::clear_state_f_static(PluginLV2 *p)
79 {
80 static_cast<Dsp*>(p)->clear_state_f();
81 }
82
83 inline void Dsp::init(uint32_t samplingFreq)
84 {
85 fSamplingFreq = samplingFreq;
86 IOTA = 0;
87 iConst0 = min(192000, max(1, fSamplingFreq));
88 fConst1 = (6.283185307179586 / iConst0);
89 clear_state_f();
90 }
91
92 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
93 {
94 static_cast<Dsp*>(p)->init(samplingFreq);
95 }
96
97 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
98 {
99 #define fslider0 (*fslider0_)
100 #define fslider1 (*fslider1_)
101 #define fslider2 (*fslider2_)
102 #define fslider3 (*fslider3_)
103 #define fslider4 (*fslider4_)
104 #define fslider5 (*fslider5_)
105 #define fcheckbox0 (*fcheckbox0_)
106 double fSlow0 = pow(10,(0.05 * fslider0));
107 double fSlow1 = fslider1;
108 double fSlow2 = (fConst1 * fslider2);
109 double fSlow3 = sin(fSlow2);
110 double fSlow4 = cos(fSlow2);
111 double fSlow5 = (0 - fSlow3);
112 double fSlow6 = (0.0005 * fslider3);
113 double fSlow7 = (0.001 * fslider4);
114 double fSlow8 = fslider5;
115 double fSlow9 = ((int(fcheckbox0))?(0 - fSlow8):fSlow8);
116 for (int i=0; i<count; i++) {
117 double fTemp0 = (fSlow0 * (double)input0[i]);
118 iVec0[0] = 1;
119 double fTemp1 = ((fSlow1 * fRec0[1]) - fTemp0);
120 fVec1[IOTA&2047] = fTemp1;
121 fRec1[0] = ((fSlow4 * fRec1[1]) + (fSlow3 * fRec2[1]));
122 fRec2[0] = ((1 + ((fSlow5 * fRec1[1]) + (fSlow4 * fRec2[1]))) - iVec0[1]);
123 double fTemp2 = (iConst0 * (fSlow7 + (fSlow6 * (1 + fRec1[0]))));
124 int iTemp3 = int(fTemp2);
125 int iTemp4 = (1 + iTemp3);
126 fRec0[0] = (((fTemp2 - iTemp3) * fVec1[(IOTA-int((int(iTemp4) & 2047)))&2047]) + ((iTemp4 - fTemp2) * fVec1[(IOTA-int((iTemp3 & 2047)))&2047]));
127 output0[i] = (FAUSTFLOAT)(0.5 * (fTemp0 + (fSlow9 * fRec0[0])));
128 double fTemp5 = (fSlow0 * (double)input1[i]);
129 double fTemp6 = ((fSlow1 * fRec3[1]) - fTemp5);
130 fVec2[IOTA&2047] = fTemp6;
131 double fTemp7 = (iConst0 * (fSlow7 + (fSlow6 * (1 + fRec2[0]))));
132 int iTemp8 = int(fTemp7);
133 int iTemp9 = (1 + iTemp8);
134 fRec3[0] = (((fTemp7 - iTemp8) * fVec2[(IOTA-int((int(iTemp9) & 2047)))&2047]) + ((iTemp9 - fTemp7) * fVec2[(IOTA-int((iTemp8 & 2047)))&2047]));
135 output1[i] = (FAUSTFLOAT)(0.5 * (fTemp5 + (fSlow9 * fRec3[0])));
136 // post processing
137 fRec3[1] = fRec3[0];
138 fRec0[1] = fRec0[0];
139 fRec2[1] = fRec2[0];
140 fRec1[1] = fRec1[0];
141 IOTA = IOTA+1;
142 iVec0[1] = iVec0[0];
143 }
144 #undef fslider0
145 #undef fslider1
146 #undef fslider2
147 #undef fslider3
148 #undef fslider4
149 #undef fslider5
150 #undef fcheckbox0
151 }
152
153 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
154 {
155 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
156 }
157
158
159 void Dsp::connect(uint32_t port,void* data)
160 {
161 switch ((PortIndex)port)
162 {
163 // static const value_pair fcheckbox0_values[] = {{"linear"},{"invert"},{0}};
164 case INVERT:
165 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
166 break;
167 case DEPTH:
168 fslider5_ = (float*)data; // , 1.0, 0.0, 1.0, 0.01
169 break;
170 case FLANGEDELAYOFFSET:
171 fslider4_ = (float*)data; // , 1.0, 0.0, 2e+01, 0.01
172 break;
173 case FLANGEDELAY:
174 fslider3_ = (float*)data; // , 1e+01, 0.0, 2e+01, 0.01
175 break;
176 case LFOFREQ:
177 fslider2_ = (float*)data; // , 0.2, 0.0, 5.0, 0.01
178 break;
179 case FEEDBACKGAIN:
180 fslider1_ = (float*)data; // , 0.0, 0.0, 1.0, 0.01
181 break;
182 case LEVEL:
183 fslider0_ = (float*)data; // , 0.0, -6e+01, 1e+01, 0.1
184 break;
185 default:
186 break;
187 }
188 }
189
190 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
191 {
192 static_cast<Dsp*>(p)->connect(port, data);
193 }
194
195
196 PluginLV2 *plugin() {
197 return new Dsp();
198 }
199
200 void Dsp::del_instance(PluginLV2 *p)
201 {
202 delete static_cast<Dsp*>(p);
203 }
204
205 /*
206 typedef enum
207 {
208 INVERT,
209 DEPTH,
210 FLANGEDELAYOFFSET,
211 FLANGEDELAY,
212 LFOFREQ,
213 FEEDBACKGAIN,
214 LEVEL,
215 } PortIndex;
216 */
217
218 } // end namespace flanger
0 // generated from file '../src/LV2/faust/flanger_mono.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace flanger_mono {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int iVec0[2];
12 FAUSTFLOAT fslider1;
13 FAUSTFLOAT *fslider1_;
14 int IOTA;
15 double fVec1[2048];
16 FAUSTFLOAT fslider2;
17 FAUSTFLOAT *fslider2_;
18 int iConst0;
19 double fConst1;
20 double fRec1[2];
21 double fRec2[2];
22 double fRec0[2];
23 void connect(uint32_t port,void* data);
24 void clear_state_f();
25 void init(uint32_t samplingFreq);
26 void compute(int count, float *input0, float *output0);
27
28 static void clear_state_f_static(PluginLV2*);
29 static void init_static(uint32_t samplingFreq, PluginLV2*);
30 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
31 static void del_instance(PluginLV2 *p);
32 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
33 public:
34 Dsp();
35 ~Dsp();
36 };
37
38
39
40 Dsp::Dsp()
41 : PluginLV2() {
42 version = PLUGINLV2_VERSION;
43 id = "flanger_mono";
44 name = N_("Flanger Mono");
45 mono_audio = compute_static;
46 stereo_audio = 0;
47 set_samplerate = init_static;
48 activate_plugin = 0;
49 connect_ports = connect_static;
50 clear_state = clear_state_f_static;
51 delete_instance = del_instance;
52 }
53
54 Dsp::~Dsp() {
55 }
56
57 inline void Dsp::clear_state_f()
58 {
59 for (int i=0; i<2; i++) iVec0[i] = 0;
60 for (int i=0; i<2048; i++) fVec1[i] = 0;
61 for (int i=0; i<2; i++) fRec1[i] = 0;
62 for (int i=0; i<2; i++) fRec2[i] = 0;
63 for (int i=0; i<2; i++) fRec0[i] = 0;
64 }
65
66 void Dsp::clear_state_f_static(PluginLV2 *p)
67 {
68 static_cast<Dsp*>(p)->clear_state_f();
69 }
70
71 inline void Dsp::init(uint32_t samplingFreq)
72 {
73 fSamplingFreq = samplingFreq;
74 IOTA = 0;
75 iConst0 = min(192000, max(1, fSamplingFreq));
76 fConst1 = (6.283185307179586 / iConst0);
77 clear_state_f();
78 }
79
80 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->init(samplingFreq);
83 }
84
85 inline void Dsp::compute(int count, float *input0, float *output0)
86 {
87 #define fslider0 (*fslider0_)
88 #define fslider1 (*fslider1_)
89 #define fslider2 (*fslider2_)
90 double fSlow0 = fslider0;
91 double fSlow1 = (1 - (0.01 * fSlow0));
92 double fSlow2 = (0.01 * (fSlow0 * pow(10,(0.05 * fslider1))));
93 double fSlow3 = (fConst1 * fslider2);
94 double fSlow4 = sin(fSlow3);
95 double fSlow5 = cos(fSlow3);
96 double fSlow6 = (0 - fSlow4);
97 for (int i=0; i<count; i++) {
98 double fTemp0 = (double)input0[i];
99 iVec0[0] = 1;
100 double fTemp1 = (fSlow2 * fTemp0);
101 double fTemp2 = ((0.5 * fRec0[1]) - fTemp1);
102 fVec1[IOTA&2047] = fTemp2;
103 fRec1[0] = ((fSlow5 * fRec1[1]) + (fSlow4 * fRec2[1]));
104 fRec2[0] = ((1 + ((fSlow6 * fRec1[1]) + (fSlow5 * fRec2[1]))) - iVec0[1]);
105 double fTemp3 = (iConst0 * (0.001 + (0.005 * (1 + fRec1[0]))));
106 int iTemp4 = int(fTemp3);
107 int iTemp5 = (1 + iTemp4);
108 fRec0[0] = (((fTemp3 - iTemp4) * fVec1[(IOTA-int((int(iTemp5) & 2047)))&2047]) + ((iTemp5 - fTemp3) * fVec1[(IOTA-int((iTemp4 & 2047)))&2047]));
109 output0[i] = (FAUSTFLOAT)((0.5 * (fTemp1 - fRec0[0])) + (fSlow1 * fTemp0));
110 // post processing
111 fRec0[1] = fRec0[0];
112 fRec2[1] = fRec2[0];
113 fRec1[1] = fRec1[0];
114 IOTA = IOTA+1;
115 iVec0[1] = iVec0[0];
116 }
117 #undef fslider0
118 #undef fslider1
119 #undef fslider2
120 }
121
122 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
123 {
124 static_cast<Dsp*>(p)->compute(count, input0, output0);
125 }
126
127
128 void Dsp::connect(uint32_t port,void* data)
129 {
130 switch ((PortIndex)port)
131 {
132 case FREQ:
133 fslider2_ = (float*)data; // , 0.2, 0.0, 5.0, 0.01
134 break;
135 case LEVEL:
136 fslider1_ = (float*)data; // , 0.0, -6e+01, 1e+01, 0.1
137 break;
138 case WET_DRY:
139 fslider0_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
140 break;
141 default:
142 break;
143 }
144 }
145
146 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
147 {
148 static_cast<Dsp*>(p)->connect(port, data);
149 }
150
151
152 PluginLV2 *plugin() {
153 return new Dsp();
154 }
155
156 void Dsp::del_instance(PluginLV2 *p)
157 {
158 delete static_cast<Dsp*>(p);
159 }
160
161 /*
162 typedef enum
163 {
164 FREQ,
165 LEVEL,
166 WET_DRY,
167 } PortIndex;
168 */
169
170 } // end namespace flanger_mono
0 // generated from file '../src/LV2/faust/freeverb.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace freeverb {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fRec9[2];
14 FAUSTFLOAT fslider2;
15 FAUSTFLOAT *fslider2_;
16 int IOTA;
17 double fVec0[2048];
18 double fRec8[2];
19 double fRec11[2];
20 double fVec1[2048];
21 double fRec10[2];
22 double fRec13[2];
23 double fVec2[2048];
24 double fRec12[2];
25 double fRec15[2];
26 double fVec3[2048];
27 double fRec14[2];
28 double fRec17[2];
29 double fVec4[2048];
30 double fRec16[2];
31 double fRec19[2];
32 double fVec5[2048];
33 double fRec18[2];
34 double fRec21[2];
35 double fVec6[2048];
36 double fRec20[2];
37 double fRec23[2];
38 double fVec7[2048];
39 double fRec22[2];
40 double fVec8[1024];
41 double fRec6[2];
42 double fVec9[512];
43 double fRec4[2];
44 double fVec10[512];
45 double fRec2[2];
46 double fVec11[256];
47 double fRec0[2];
48 void connect(uint32_t port,void* data);
49 void clear_state_f();
50 void init(uint32_t samplingFreq);
51 void compute(int count, float *input0, float *output0);
52
53 static void clear_state_f_static(PluginLV2*);
54 static void init_static(uint32_t samplingFreq, PluginLV2*);
55 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
56 static void del_instance(PluginLV2 *p);
57 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
58 public:
59 Dsp();
60 ~Dsp();
61 };
62
63
64
65 Dsp::Dsp()
66 : PluginLV2() {
67 version = PLUGINLV2_VERSION;
68 id = "freeverb";
69 name = N_("Freeverb");
70 mono_audio = compute_static;
71 stereo_audio = 0;
72 set_samplerate = init_static;
73 activate_plugin = 0;
74 connect_ports = connect_static;
75 clear_state = clear_state_f_static;
76 delete_instance = del_instance;
77 }
78
79 Dsp::~Dsp() {
80 }
81
82 inline void Dsp::clear_state_f()
83 {
84 for (int i=0; i<2; i++) fRec9[i] = 0;
85 for (int i=0; i<2048; i++) fVec0[i] = 0;
86 for (int i=0; i<2; i++) fRec8[i] = 0;
87 for (int i=0; i<2; i++) fRec11[i] = 0;
88 for (int i=0; i<2048; i++) fVec1[i] = 0;
89 for (int i=0; i<2; i++) fRec10[i] = 0;
90 for (int i=0; i<2; i++) fRec13[i] = 0;
91 for (int i=0; i<2048; i++) fVec2[i] = 0;
92 for (int i=0; i<2; i++) fRec12[i] = 0;
93 for (int i=0; i<2; i++) fRec15[i] = 0;
94 for (int i=0; i<2048; i++) fVec3[i] = 0;
95 for (int i=0; i<2; i++) fRec14[i] = 0;
96 for (int i=0; i<2; i++) fRec17[i] = 0;
97 for (int i=0; i<2048; i++) fVec4[i] = 0;
98 for (int i=0; i<2; i++) fRec16[i] = 0;
99 for (int i=0; i<2; i++) fRec19[i] = 0;
100 for (int i=0; i<2048; i++) fVec5[i] = 0;
101 for (int i=0; i<2; i++) fRec18[i] = 0;
102 for (int i=0; i<2; i++) fRec21[i] = 0;
103 for (int i=0; i<2048; i++) fVec6[i] = 0;
104 for (int i=0; i<2; i++) fRec20[i] = 0;
105 for (int i=0; i<2; i++) fRec23[i] = 0;
106 for (int i=0; i<2048; i++) fVec7[i] = 0;
107 for (int i=0; i<2; i++) fRec22[i] = 0;
108 for (int i=0; i<1024; i++) fVec8[i] = 0;
109 for (int i=0; i<2; i++) fRec6[i] = 0;
110 for (int i=0; i<512; i++) fVec9[i] = 0;
111 for (int i=0; i<2; i++) fRec4[i] = 0;
112 for (int i=0; i<512; i++) fVec10[i] = 0;
113 for (int i=0; i<2; i++) fRec2[i] = 0;
114 for (int i=0; i<256; i++) fVec11[i] = 0;
115 for (int i=0; i<2; i++) fRec0[i] = 0;
116 }
117
118 void Dsp::clear_state_f_static(PluginLV2 *p)
119 {
120 static_cast<Dsp*>(p)->clear_state_f();
121 }
122
123 inline void Dsp::init(uint32_t samplingFreq)
124 {
125 fSamplingFreq = samplingFreq;
126 IOTA = 0;
127 clear_state_f();
128 }
129
130 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
131 {
132 static_cast<Dsp*>(p)->init(samplingFreq);
133 }
134
135 inline void Dsp::compute(int count, float *input0, float *output0)
136 {
137 #define fslider0 (*fslider0_)
138 #define fslider1 (*fslider1_)
139 #define fslider2 (*fslider2_)
140 double fSlow0 = fslider0;
141 double fSlow1 = (1 - (0.01 * fSlow0));
142 double fSlow2 = (fSlow1 + (fSlow0 * (0.00015 + (0.01 * fSlow1))));
143 double fSlow3 = fslider1;
144 double fSlow4 = (1 - fSlow3);
145 double fSlow5 = (0.7 + (0.28 * fslider2));
146 double fSlow6 = (0.00015 * fSlow0);
147 for (int i=0; i<count; i++) {
148 double fTemp0 = (double)input0[i];
149 fRec9[0] = ((fSlow4 * fRec8[1]) + (fSlow3 * fRec9[1]));
150 double fTemp1 = (fSlow6 * fTemp0);
151 fVec0[IOTA&2047] = (fTemp1 + (fSlow5 * fRec9[0]));
152 fRec8[0] = fVec0[(IOTA-1640)&2047];
153 fRec11[0] = ((fSlow4 * fRec10[1]) + (fSlow3 * fRec11[1]));
154 fVec1[IOTA&2047] = (fTemp1 + (fSlow5 * fRec11[0]));
155 fRec10[0] = fVec1[(IOTA-1580)&2047];
156 fRec13[0] = ((fSlow4 * fRec12[1]) + (fSlow3 * fRec13[1]));
157 fVec2[IOTA&2047] = (fTemp1 + (fSlow5 * fRec13[0]));
158 fRec12[0] = fVec2[(IOTA-1514)&2047];
159 fRec15[0] = ((fSlow4 * fRec14[1]) + (fSlow3 * fRec15[1]));
160 fVec3[IOTA&2047] = (fTemp1 + (fSlow5 * fRec15[0]));
161 fRec14[0] = fVec3[(IOTA-1445)&2047];
162 fRec17[0] = ((fSlow4 * fRec16[1]) + (fSlow3 * fRec17[1]));
163 fVec4[IOTA&2047] = (fTemp1 + (fSlow5 * fRec17[0]));
164 fRec16[0] = fVec4[(IOTA-1379)&2047];
165 fRec19[0] = ((fSlow4 * fRec18[1]) + (fSlow3 * fRec19[1]));
166 fVec5[IOTA&2047] = (fTemp1 + (fSlow5 * fRec19[0]));
167 fRec18[0] = fVec5[(IOTA-1300)&2047];
168 fRec21[0] = ((fSlow4 * fRec20[1]) + (fSlow3 * fRec21[1]));
169 fVec6[IOTA&2047] = (fTemp1 + (fSlow5 * fRec21[0]));
170 fRec20[0] = fVec6[(IOTA-1211)&2047];
171 fRec23[0] = ((fSlow4 * fRec22[1]) + (fSlow3 * fRec23[1]));
172 fVec7[IOTA&2047] = (fTemp1 + (fSlow5 * fRec23[0]));
173 fRec22[0] = fVec7[(IOTA-1139)&2047];
174 double fTemp2 = (((((((fRec22[0] + fRec20[0]) + fRec18[0]) + fRec16[0]) + fRec14[0]) + fRec12[0]) + fRec10[0]) + fRec8[0]);
175 fVec8[IOTA&1023] = (fTemp2 + (0.5 * fRec6[1]));
176 fRec6[0] = fVec8[(IOTA-579)&1023];
177 double fRec7 = (0 - (fTemp2 - fRec6[1]));
178 fVec9[IOTA&511] = (fRec7 + (0.5 * fRec4[1]));
179 fRec4[0] = fVec9[(IOTA-464)&511];
180 double fRec5 = (fRec4[1] - fRec7);
181 fVec10[IOTA&511] = (fRec5 + (0.5 * fRec2[1]));
182 fRec2[0] = fVec10[(IOTA-364)&511];
183 double fRec3 = (fRec2[1] - fRec5);
184 fVec11[IOTA&255] = (fRec3 + (0.5 * fRec0[1]));
185 fRec0[0] = fVec11[(IOTA-248)&255];
186 double fRec1 = (fRec0[1] - fRec3);
187 output0[i] = (FAUSTFLOAT)(fRec1 + (fSlow2 * fTemp0));
188 // post processing
189 fRec0[1] = fRec0[0];
190 fRec2[1] = fRec2[0];
191 fRec4[1] = fRec4[0];
192 fRec6[1] = fRec6[0];
193 fRec22[1] = fRec22[0];
194 fRec23[1] = fRec23[0];
195 fRec20[1] = fRec20[0];
196 fRec21[1] = fRec21[0];
197 fRec18[1] = fRec18[0];
198 fRec19[1] = fRec19[0];
199 fRec16[1] = fRec16[0];
200 fRec17[1] = fRec17[0];
201 fRec14[1] = fRec14[0];
202 fRec15[1] = fRec15[0];
203 fRec12[1] = fRec12[0];
204 fRec13[1] = fRec13[0];
205 fRec10[1] = fRec10[0];
206 fRec11[1] = fRec11[0];
207 fRec8[1] = fRec8[0];
208 IOTA = IOTA+1;
209 fRec9[1] = fRec9[0];
210 }
211 #undef fslider0
212 #undef fslider1
213 #undef fslider2
214 }
215
216 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
217 {
218 static_cast<Dsp*>(p)->compute(count, input0, output0);
219 }
220
221
222 void Dsp::connect(uint32_t port,void* data)
223 {
224 switch ((PortIndex)port)
225 {
226 case ROOMSIZE:
227 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.025
228 break;
229 case DAMP:
230 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.025
231 break;
232 case WET_DRY:
233 fslider0_ = (float*)data; // , 5e+01, 0.0, 1e+02, 1.0
234 break;
235 default:
236 break;
237 }
238 }
239
240 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
241 {
242 static_cast<Dsp*>(p)->connect(port, data);
243 }
244
245
246 PluginLV2 *plugin() {
247 return new Dsp();
248 }
249
250 void Dsp::del_instance(PluginLV2 *p)
251 {
252 delete static_cast<Dsp*>(p);
253 }
254
255 /*
256 typedef enum
257 {
258 ROOMSIZE,
259 DAMP,
260 WET_DRY,
261 } PortIndex;
262 */
263
264 } // end namespace freeverb
0 // generated from file '../src/LV2/faust/gx_ampmodul.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gx_ampmodul {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[6];
13 FAUSTFLOAT fslider1;
14 FAUSTFLOAT *fslider1_;
15 FAUSTFLOAT fslider2;
16 FAUSTFLOAT *fslider2_;
17 int iConst0;
18 double fConst1;
19 double fConst2;
20 double fConst3;
21 FAUSTFLOAT fslider3;
22 FAUSTFLOAT *fslider3_;
23 double fRec4[2];
24 double fConst4;
25 double fConst5;
26 double fConst6;
27 FAUSTFLOAT fslider4;
28 FAUSTFLOAT *fslider4_;
29 double fRec8[2];
30 FAUSTFLOAT fslider5;
31 FAUSTFLOAT *fslider5_;
32 double fRec12[2];
33 double fConst7;
34 double fConst8;
35 double fConst9;
36 double fVec0[2];
37 double fConst10;
38 double fRec13[2];
39 double fRec11[2];
40 double fConst11;
41 double fConst12;
42 double fRec10[2];
43 double fConst13;
44 double fRec9[2];
45 double fConst14;
46 double fConst15;
47 double fConst16;
48 double fVec1[2];
49 double fConst17;
50 double fRec14[2];
51 double fRec7[2];
52 double fRec6[2];
53 double fRec5[2];
54 double fConst18;
55 double fConst19;
56 double fConst20;
57 double fVec2[2];
58 double fConst21;
59 double fRec15[2];
60 double fRec3[2];
61 double fRec2[2];
62 double fRec1[6];
63 double fRec16[6];
64 double fVec3[2];
65 double fRec26[2];
66 double fRec25[2];
67 double fRec24[2];
68 double fRec23[2];
69 double fVec4[2];
70 double fRec27[2];
71 double fRec22[2];
72 double fRec21[2];
73 double fRec20[2];
74 double fVec5[2];
75 double fRec28[2];
76 double fRec19[2];
77 double fRec18[2];
78 double fRec17[6];
79 void connect(uint32_t port,void* data);
80 void clear_state_f();
81 void init(uint32_t samplingFreq);
82 void compute(int count, float *input0, float *input1, float *output0, float *output1);
83
84 static void clear_state_f_static(PluginLV2*);
85 static void init_static(uint32_t samplingFreq, PluginLV2*);
86 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
87 static void del_instance(PluginLV2 *p);
88 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
89 public:
90 Dsp();
91 ~Dsp();
92 };
93
94
95
96 static const char* parm_groups[] = {
97 "amp2.stage2", N_("Postamp Tube2"),
98 "amp2.stage1", N_("Postamp Tube1"),
99 0
100 };
101
102 Dsp::Dsp()
103 : PluginLV2() {
104 version = PLUGINLV2_VERSION;
105 id = "ampmodul";
106 name = N_("Postamp");
107 mono_audio = 0;
108 stereo_audio = compute_static;
109 set_samplerate = init_static;
110 activate_plugin = 0;
111 connect_ports = connect_static;
112 clear_state = clear_state_f_static;
113 delete_instance = del_instance;
114 }
115
116 Dsp::~Dsp() {
117 }
118
119 inline void Dsp::clear_state_f()
120 {
121 for (int i=0; i<6; i++) fRec0[i] = 0;
122 for (int i=0; i<2; i++) fRec4[i] = 0;
123 for (int i=0; i<2; i++) fRec8[i] = 0;
124 for (int i=0; i<2; i++) fRec12[i] = 0;
125 for (int i=0; i<2; i++) fVec0[i] = 0;
126 for (int i=0; i<2; i++) fRec13[i] = 0;
127 for (int i=0; i<2; i++) fRec11[i] = 0;
128 for (int i=0; i<2; i++) fRec10[i] = 0;
129 for (int i=0; i<2; i++) fRec9[i] = 0;
130 for (int i=0; i<2; i++) fVec1[i] = 0;
131 for (int i=0; i<2; i++) fRec14[i] = 0;
132 for (int i=0; i<2; i++) fRec7[i] = 0;
133 for (int i=0; i<2; i++) fRec6[i] = 0;
134 for (int i=0; i<2; i++) fRec5[i] = 0;
135 for (int i=0; i<2; i++) fVec2[i] = 0;
136 for (int i=0; i<2; i++) fRec15[i] = 0;
137 for (int i=0; i<2; i++) fRec3[i] = 0;
138 for (int i=0; i<2; i++) fRec2[i] = 0;
139 for (int i=0; i<6; i++) fRec1[i] = 0;
140 for (int i=0; i<6; i++) fRec16[i] = 0;
141 for (int i=0; i<2; i++) fVec3[i] = 0;
142 for (int i=0; i<2; i++) fRec26[i] = 0;
143 for (int i=0; i<2; i++) fRec25[i] = 0;
144 for (int i=0; i<2; i++) fRec24[i] = 0;
145 for (int i=0; i<2; i++) fRec23[i] = 0;
146 for (int i=0; i<2; i++) fVec4[i] = 0;
147 for (int i=0; i<2; i++) fRec27[i] = 0;
148 for (int i=0; i<2; i++) fRec22[i] = 0;
149 for (int i=0; i<2; i++) fRec21[i] = 0;
150 for (int i=0; i<2; i++) fRec20[i] = 0;
151 for (int i=0; i<2; i++) fVec5[i] = 0;
152 for (int i=0; i<2; i++) fRec28[i] = 0;
153 for (int i=0; i<2; i++) fRec19[i] = 0;
154 for (int i=0; i<2; i++) fRec18[i] = 0;
155 for (int i=0; i<6; i++) fRec17[i] = 0;
156 }
157
158 void Dsp::clear_state_f_static(PluginLV2 *p)
159 {
160 static_cast<Dsp*>(p)->clear_state_f();
161 }
162
163 inline void Dsp::init(uint32_t samplingFreq)
164 {
165 fSamplingFreq = samplingFreq;
166 iConst0 = min(192000, max(1, fSamplingFreq));
167 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
168 fConst2 = (1 + fConst1);
169 fConst3 = (0 - ((1 - fConst1) / fConst2));
170 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
171 fConst5 = (1 + fConst4);
172 fConst6 = (0 - ((1 - fConst4) / fConst5));
173 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
174 fConst8 = (1 + fConst7);
175 fConst9 = (0 - ((1 - fConst7) / fConst8));
176 fConst10 = (1.0 / fConst8);
177 fConst11 = (0 - fConst1);
178 fConst12 = (0.025 / fConst2);
179 fConst13 = (1.0 / fConst5);
180 fConst14 = (1.0 / tan((414.6902302738527 / iConst0)));
181 fConst15 = (1 + fConst14);
182 fConst16 = (0 - ((1 - fConst14) / fConst15));
183 fConst17 = (1.0 / fConst15);
184 fConst18 = (1.0 / tan((609.4689747964198 / iConst0)));
185 fConst19 = (1 + fConst18);
186 fConst20 = (0 - ((1 - fConst18) / fConst19));
187 fConst21 = (1.0 / fConst19);
188 clear_state_f();
189 }
190
191 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
192 {
193 static_cast<Dsp*>(p)->init(samplingFreq);
194 }
195
196 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
197 {
198 #define fslider0 (*fslider0_)
199 #define fslider1 (*fslider1_)
200 #define fslider2 (*fslider2_)
201 #define fslider3 (*fslider3_)
202 #define fslider4 (*fslider4_)
203 #define fslider5 (*fslider5_)
204 double fSlow0 = fslider0;
205 double fSlow1 = fslider1;
206 double fSlow2 = (1 - max(0, fSlow1));
207 double fSlow3 = fslider2;
208 double fSlow4 = (0.0010000000000000009 * pow(10,(0.05 * fslider3)));
209 double fSlow5 = (0.0010000000000000009 * pow(10,(0.05 * fslider4)));
210 double fSlow6 = (0.0010000000000000009 * pow(10,(0.05 * fslider5)));
211 double fSlow7 = (1 - max(0, (0 - fSlow1)));
212 for (int i=0; i<count; i++) {
213 double fTemp0 = (double)input0[i];
214 fRec0[0] = (fTemp0 - (fSlow0 * fRec0[5]));
215 fRec4[0] = (fSlow4 + (0.999 * fRec4[1]));
216 fRec8[0] = (fSlow5 + (0.999 * fRec8[1]));
217 fRec12[0] = (fSlow6 + (0.999 * fRec12[1]));
218 double fTemp1 = (1e-15 + (0.027 * fRec11[1]));
219 fVec0[0] = fTemp1;
220 fRec13[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec13[1]));
221 fRec11[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec13[0] + (fTemp0 * fRec12[0])) - 2.296149999999999)) - 164.9574074074074);
222 fRec10[0] = ((fConst12 * ((fConst11 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
223 fRec9[0] = ((fConst13 * (fRec10[0] + fRec10[1])) + (fConst6 * fRec9[1]));
224 double fTemp2 = (1e-15 + (0.015 * fRec7[1]));
225 fVec1[0] = fTemp2;
226 fRec14[0] = ((fConst17 * (fVec1[0] + fVec1[1])) + (fConst16 * fRec14[1]));
227 fRec7[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec14[0] + (fRec9[0] * fRec8[0])) - 1.6755869999999988)) - 138.2942);
228 fRec6[0] = ((fConst12 * ((fConst11 * fRec7[1]) + (fConst1 * fRec7[0]))) + (fConst3 * fRec6[1]));
229 fRec5[0] = ((fConst13 * (fRec6[0] + fRec6[1])) + (fConst6 * fRec5[1]));
230 double fTemp3 = (1e-15 + (0.0082 * fRec3[1]));
231 fVec2[0] = fTemp3;
232 fRec15[0] = ((fConst21 * (fVec2[0] + fVec2[1])) + (fConst20 * fRec15[1]));
233 fRec3[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec15[0] + (fRec5[0] * fRec4[0])) - 1.130461999999999)) - 112.13878048780487);
234 fRec2[0] = ((fConst12 * ((fConst11 * fRec3[1]) + (fConst1 * fRec3[0]))) + (fConst3 * fRec2[1]));
235 fRec1[0] = (fRec2[0] - (fSlow3 * fRec1[5]));
236 output0[i] = (FAUSTFLOAT)((fSlow7 * fRec1[0]) + (fSlow2 * fRec0[0]));
237 double fTemp4 = (double)input1[i];
238 fRec16[0] = (fTemp4 - (fSlow0 * fRec16[5]));
239 double fTemp5 = (1e-15 + (0.027 * fRec25[1]));
240 fVec3[0] = fTemp5;
241 fRec26[0] = ((fConst10 * (fVec3[0] + fVec3[1])) + (fConst9 * fRec26[1]));
242 fRec25[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec26[0] + (fTemp4 * fRec12[0])) - 2.296149999999999)) - 164.9574074074074);
243 fRec24[0] = ((fConst12 * ((fConst11 * fRec25[1]) + (fConst1 * fRec25[0]))) + (fConst3 * fRec24[1]));
244 fRec23[0] = ((fConst13 * (fRec24[0] + fRec24[1])) + (fConst6 * fRec23[1]));
245 double fTemp6 = (1e-15 + (0.015 * fRec22[1]));
246 fVec4[0] = fTemp6;
247 fRec27[0] = ((fConst17 * (fVec4[0] + fVec4[1])) + (fConst16 * fRec27[1]));
248 fRec22[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec27[0] + (fRec8[0] * fRec23[0])) - 1.6755869999999988)) - 138.2942);
249 fRec21[0] = ((fConst12 * ((fConst11 * fRec22[1]) + (fConst1 * fRec22[0]))) + (fConst3 * fRec21[1]));
250 fRec20[0] = ((fConst13 * (fRec21[0] + fRec21[1])) + (fConst6 * fRec20[1]));
251 double fTemp7 = (1e-15 + (0.0082 * fRec19[1]));
252 fVec5[0] = fTemp7;
253 fRec28[0] = ((fConst21 * (fVec5[0] + fVec5[1])) + (fConst20 * fRec28[1]));
254 fRec19[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec28[0] + (fRec4[0] * fRec20[0])) - 1.130461999999999)) - 112.13878048780487);
255 fRec18[0] = ((fConst12 * ((fConst11 * fRec19[1]) + (fConst1 * fRec19[0]))) + (fConst3 * fRec18[1]));
256 fRec17[0] = (fRec18[0] - (fSlow3 * fRec17[5]));
257 output1[i] = (FAUSTFLOAT)((fSlow7 * fRec17[0]) + (fSlow2 * fRec16[0]));
258 // post processing
259 for (int i=5; i>0; i--) fRec17[i] = fRec17[i-1];
260 fRec18[1] = fRec18[0];
261 fRec19[1] = fRec19[0];
262 fRec28[1] = fRec28[0];
263 fVec5[1] = fVec5[0];
264 fRec20[1] = fRec20[0];
265 fRec21[1] = fRec21[0];
266 fRec22[1] = fRec22[0];
267 fRec27[1] = fRec27[0];
268 fVec4[1] = fVec4[0];
269 fRec23[1] = fRec23[0];
270 fRec24[1] = fRec24[0];
271 fRec25[1] = fRec25[0];
272 fRec26[1] = fRec26[0];
273 fVec3[1] = fVec3[0];
274 for (int i=5; i>0; i--) fRec16[i] = fRec16[i-1];
275 for (int i=5; i>0; i--) fRec1[i] = fRec1[i-1];
276 fRec2[1] = fRec2[0];
277 fRec3[1] = fRec3[0];
278 fRec15[1] = fRec15[0];
279 fVec2[1] = fVec2[0];
280 fRec5[1] = fRec5[0];
281 fRec6[1] = fRec6[0];
282 fRec7[1] = fRec7[0];
283 fRec14[1] = fRec14[0];
284 fVec1[1] = fVec1[0];
285 fRec9[1] = fRec9[0];
286 fRec10[1] = fRec10[0];
287 fRec11[1] = fRec11[0];
288 fRec13[1] = fRec13[0];
289 fVec0[1] = fVec0[0];
290 fRec12[1] = fRec12[0];
291 fRec8[1] = fRec8[0];
292 fRec4[1] = fRec4[0];
293 for (int i=5; i>0; i--) fRec0[i] = fRec0[i-1];
294 }
295 #undef fslider0
296 #undef fslider1
297 #undef fslider2
298 #undef fslider3
299 #undef fslider4
300 #undef fslider5
301 }
302
303 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
304 {
305 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
306 }
307
308
309 void Dsp::connect(uint32_t port,void* data)
310 {
311 switch ((PortIndex)port)
312 {
313 case LEVEL:
314 fslider5_ = (float*)data; // , -2e+01, -4e+01, 4.0, 0.1
315 break;
316 case TUBE1:
317 fslider4_ = (float*)data; // , 6.0, -2e+01, 2e+01, 0.1
318 break;
319 case TUBE2:
320 fslider3_ = (float*)data; // , 6.0, -2e+01, 2e+01, 0.1
321 break;
322 case FEEDBACK:
323 fslider2_ = (float*)data; // , 0.0, -1.0, 1.0, 0.01
324 break;
325 case WET_DRY:
326 fslider1_ = (float*)data; // , 0.0, -1.0, 1.0, 0.1
327 break;
328 case FEEDBAC:
329 fslider0_ = (float*)data; // , 0.0, -1.0, 1.0, 0.01
330 break;
331 default:
332 break;
333 }
334 }
335
336 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
337 {
338 static_cast<Dsp*>(p)->connect(port, data);
339 }
340
341
342 PluginLV2 *plugin() {
343 return new Dsp();
344 }
345
346 void Dsp::del_instance(PluginLV2 *p)
347 {
348 delete static_cast<Dsp*>(p);
349 }
350
351 /*
352 typedef enum
353 {
354 LEVEL,
355 TUBE1,
356 TUBE2,
357 FEEDBACK,
358 WET_DRY,
359 FEEDBAC,
360 } PortIndex;
361 */
362
363 } // end namespace gx_ampmodul
0 // generated from file '../src/LV2/faust/gx_ampout.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_ampout {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 double fRec0[2];
12 void connect(uint32_t port,void* data);
13 void clear_state_f();
14 void init(uint32_t samplingFreq);
15 void compute(int count, float *input0, float *output0);
16
17 static void clear_state_f_static(PluginLV2*);
18 static void init_static(uint32_t samplingFreq, PluginLV2*);
19 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
20 static void del_instance(PluginLV2 *p);
21 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
22 public:
23 Dsp();
24 ~Dsp();
25 };
26
27
28
29 Dsp::Dsp()
30 : PluginLV2() {
31 version = PLUGINLV2_VERSION;
32 id = "amp";
33 name = N_("Amplifier");
34 mono_audio = compute_static;
35 stereo_audio = 0;
36 set_samplerate = init_static;
37 activate_plugin = 0;
38 connect_ports = connect_static;
39 clear_state = clear_state_f_static;
40 delete_instance = del_instance;
41 }
42
43 Dsp::~Dsp() {
44 }
45
46 inline void Dsp::clear_state_f()
47 {
48 for (int i=0; i<2; i++) fRec0[i] = 0;
49 }
50
51 void Dsp::clear_state_f_static(PluginLV2 *p)
52 {
53 static_cast<Dsp*>(p)->clear_state_f();
54 }
55
56 inline void Dsp::init(uint32_t samplingFreq)
57 {
58 fSamplingFreq = samplingFreq;
59 clear_state_f();
60 }
61
62 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
63 {
64 static_cast<Dsp*>(p)->init(samplingFreq);
65 }
66
67 inline void Dsp::compute(int count, float *input0, float *output0)
68 {
69 #define fslider0 (*fslider0_)
70 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
71 for (int i=0; i<count; i++) {
72 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
73 output0[i] = (FAUSTFLOAT)((double)input0[i] * fRec0[0]);
74 // post processing
75 fRec0[1] = fRec0[0];
76 }
77 #undef fslider0
78 }
79
80 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->compute(count, input0, output0);
83 }
84
85
86 void Dsp::connect(uint32_t port,void* data)
87 {
88 switch ((PortIndex)port)
89 {
90 case OUT_AMP:
91 fslider0_ = (float*)data; // , 0.0, -2e+01, 4.0, 0.1
92 break;
93 default:
94 break;
95 }
96 }
97
98 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
99 {
100 static_cast<Dsp*>(p)->connect(port, data);
101 }
102
103
104 PluginLV2 *plugin() {
105 return new Dsp();
106 }
107
108 void Dsp::del_instance(PluginLV2 *p)
109 {
110 delete static_cast<Dsp*>(p);
111 }
112
113 /*
114 typedef enum
115 {
116 OUT_AMP,
117 } PortIndex;
118 */
119
120 } // end namespace gx_ampout
0 // generated from file '../src/LV2/faust/gx_ampout_ladspa.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_ampout_ladspa {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 FAUSTFLOAT fcheckbox0;
14 FAUSTFLOAT *fcheckbox0_;
15 double fRec0[2];
16 void connect(uint32_t port,void* data);
17 void clear_state_f();
18 void init(uint32_t samplingFreq);
19 void compute(int count, float *input0, float *output0);
20
21 static void clear_state_f_static(PluginLV2*);
22 static void init_static(uint32_t samplingFreq, PluginLV2*);
23 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
24 static void del_instance(PluginLV2 *p);
25 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
26 public:
27 Dsp();
28 ~Dsp();
29 };
30
31
32
33 static const char* parm_groups[] = {
34 ".amp", N_("?"),
35 0
36 };
37
38 Dsp::Dsp()
39 : PluginLV2() {
40 version = PLUGINLV2_VERSION;
41 id = "gx_ampout_ladspa";
42 name = "?gx_ampout_ladspa";
43 mono_audio = compute_static;
44 stereo_audio = 0;
45 set_samplerate = init_static;
46 activate_plugin = 0;
47 connect_ports = connect_static;
48 clear_state = clear_state_f_static;
49 delete_instance = del_instance;
50 }
51
52 Dsp::~Dsp() {
53 }
54
55 inline void Dsp::clear_state_f()
56 {
57 for (int i=0; i<2; i++) fRec0[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 clear_state_f();
69 }
70
71 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
72 {
73 static_cast<Dsp*>(p)->init(samplingFreq);
74 }
75
76 inline void Dsp::compute(int count, float *input0, float *output0)
77 {
78 #define fslider0 (*fslider0_)
79 #define fslider1 (*fslider1_)
80 #define fcheckbox0 (*fcheckbox0_)
81 double fSlow0 = fslider0;
82 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * ((int(fcheckbox0))?(fSlow0 + fslider1):fSlow0))));
83 for (int i=0; i<count; i++) {
84 fRec0[0] = (fSlow1 + (0.999 * fRec0[1]));
85 output0[i] = (FAUSTFLOAT)((double)input0[i] * fRec0[0]);
86 // post processing
87 fRec0[1] = fRec0[0];
88 }
89 #undef fslider0
90 #undef fslider1
91 #undef fcheckbox0
92 }
93
94 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
95 {
96 static_cast<Dsp*>(p)->compute(count, input0, output0);
97 }
98
99
100 void Dsp::connect(uint32_t port,void* data)
101 {
102 switch ((PortIndex)port)
103 {
104 case ON_OFF:
105 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
106 break;
107 case OUT_AMP:
108 fslider1_ = (float*)data; // , 0.0, -2e+01, 4.0, 0.1
109 break;
110 case OUT_LADSPA:
111 fslider0_ = (float*)data; // , 0.0, -2e+01, 2e+01, 0.1
112 break;
113 default:
114 break;
115 }
116 }
117
118 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
119 {
120 static_cast<Dsp*>(p)->connect(port, data);
121 }
122
123
124 PluginLV2 *plugin() {
125 return new Dsp();
126 }
127
128 void Dsp::del_instance(PluginLV2 *p)
129 {
130 delete static_cast<Dsp*>(p);
131 }
132
133 /*
134 typedef enum
135 {
136 ON_OFF,
137 OUT_AMP,
138 OUT_LADSPA,
139 } PortIndex;
140 */
141
142 } // end namespace gx_ampout_ladspa
0 // generated from file '../src/LV2/faust/gx_bigchump.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gx_bigchump {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 FAUSTFLOAT fcheckbox0;
21 FAUSTFLOAT *fcheckbox0_;
22 FAUSTFLOAT fslider0;
23 FAUSTFLOAT *fslider0_;
24 double fRec5[2];
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fVec0[2];
35 double fConst19;
36 double fRec12[2];
37 double fRec11[2];
38 double fConst20;
39 double fConst21;
40 double fRec10[2];
41 double fConst22;
42 double fConst23;
43 double fRec9[2];
44 FAUSTFLOAT fslider1;
45 FAUSTFLOAT *fslider1_;
46 double fConst24;
47 double fConst25;
48 double fConst26;
49 double fConst27;
50 double fRec13[2];
51 FAUSTFLOAT fslider2;
52 FAUSTFLOAT *fslider2_;
53 double fRec14[2];
54 double fVec1[2];
55 double fConst28;
56 double fRec8[2];
57 double fVec2[2];
58 double fRec15[2];
59 double fRec7[2];
60 double fRec6[2];
61 double fConst29;
62 double fConst30;
63 double fConst31;
64 double fVec3[2];
65 double fConst32;
66 double fRec16[2];
67 double fRec4[2];
68 double fRec3[2];
69 double fConst33;
70 double fRec2[2];
71 double fConst34;
72 double fConst35;
73 double fRec1[2];
74 double fConst36;
75 double fConst37;
76 double fConst38;
77 double fConst39;
78 double fConst40;
79 double fConst41;
80 double fVec4[2];
81 double fRec21[2];
82 double fRec20[2];
83 double fRec19[2];
84 double fConst42;
85 double fRec18[2];
86 double fConst43;
87 double fConst44;
88 double fRec17[2];
89 double fRec0[2];
90 void connect(uint32_t port,void* data);
91 void clear_state_f();
92 void init(uint32_t samplingFreq);
93 void compute(int count, float *input0, float *output0);
94
95 static void clear_state_f_static(PluginLV2*);
96 static void init_static(uint32_t samplingFreq, PluginLV2*);
97 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
98 static void del_instance(PluginLV2 *p);
99 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
100 public:
101 Dsp();
102 ~Dsp();
103 };
104
105
106
107 Dsp::Dsp()
108 : PluginLV2() {
109 version = PLUGINLV2_VERSION;
110 id = "gx_bigchump";
111 name = N_("Redeye Big Chump");
112 mono_audio = compute_static;
113 stereo_audio = 0;
114 set_samplerate = init_static;
115 activate_plugin = 0;
116 connect_ports = connect_static;
117 clear_state = clear_state_f_static;
118 delete_instance = del_instance;
119 }
120
121 Dsp::~Dsp() {
122 }
123
124 inline void Dsp::clear_state_f()
125 {
126 for (int i=0; i<2; i++) fRec5[i] = 0;
127 for (int i=0; i<2; i++) fVec0[i] = 0;
128 for (int i=0; i<2; i++) fRec12[i] = 0;
129 for (int i=0; i<2; i++) fRec11[i] = 0;
130 for (int i=0; i<2; i++) fRec10[i] = 0;
131 for (int i=0; i<2; i++) fRec9[i] = 0;
132 for (int i=0; i<2; i++) fRec13[i] = 0;
133 for (int i=0; i<2; i++) fRec14[i] = 0;
134 for (int i=0; i<2; i++) fVec1[i] = 0;
135 for (int i=0; i<2; i++) fRec8[i] = 0;
136 for (int i=0; i<2; i++) fVec2[i] = 0;
137 for (int i=0; i<2; i++) fRec15[i] = 0;
138 for (int i=0; i<2; i++) fRec7[i] = 0;
139 for (int i=0; i<2; i++) fRec6[i] = 0;
140 for (int i=0; i<2; i++) fVec3[i] = 0;
141 for (int i=0; i<2; i++) fRec16[i] = 0;
142 for (int i=0; i<2; i++) fRec4[i] = 0;
143 for (int i=0; i<2; i++) fRec3[i] = 0;
144 for (int i=0; i<2; i++) fRec2[i] = 0;
145 for (int i=0; i<2; i++) fRec1[i] = 0;
146 for (int i=0; i<2; i++) fVec4[i] = 0;
147 for (int i=0; i<2; i++) fRec21[i] = 0;
148 for (int i=0; i<2; i++) fRec20[i] = 0;
149 for (int i=0; i<2; i++) fRec19[i] = 0;
150 for (int i=0; i<2; i++) fRec18[i] = 0;
151 for (int i=0; i<2; i++) fRec17[i] = 0;
152 for (int i=0; i<2; i++) fRec0[i] = 0;
153 }
154
155 void Dsp::clear_state_f_static(PluginLV2 *p)
156 {
157 static_cast<Dsp*>(p)->clear_state_f();
158 }
159
160 inline void Dsp::init(uint32_t samplingFreq)
161 {
162 fSamplingFreq = samplingFreq;
163 iConst0 = min(192000, max(1, fSamplingFreq));
164 fConst1 = (1.0 / tan((263.89378290154264 / iConst0)));
165 fConst2 = (1 + fConst1);
166 fConst3 = (0 - ((1 - fConst1) / fConst2));
167 fConst4 = (1.0 / tan((25368.36067773758 / iConst0)));
168 fConst5 = (1 + fConst4);
169 fConst6 = (0 - ((1 - fConst4) / fConst5));
170 fConst7 = (1.0 / tan((97.38937226128358 / iConst0)));
171 fConst8 = (1 + fConst7);
172 fConst9 = (0 - ((1 - fConst7) / fConst8));
173 fConst10 = (1.0 / tan((20517.741620594938 / iConst0)));
174 fConst11 = (1 + fConst10);
175 fConst12 = (0 - ((1 - fConst10) / fConst11));
176 fConst13 = (1.0 / tan((5830.795965062656 / iConst0)));
177 fConst14 = (1 + fConst13);
178 fConst15 = (0 - ((1 - fConst13) / fConst14));
179 fConst16 = (1.0 / tan((125.66370614359172 / iConst0)));
180 fConst17 = (1 + fConst16);
181 fConst18 = (0 - ((1 - fConst16) / fConst17));
182 fConst19 = (1.0 / fConst17);
183 fConst20 = (0 - fConst7);
184 fConst21 = (0.025 / fConst8);
185 fConst22 = (0 - fConst13);
186 fConst23 = (1.0 / fConst14);
187 fConst24 = (1.0 / tan((1281.7698026646356 / iConst0)));
188 fConst25 = (1 + fConst24);
189 fConst26 = (0 - ((1 - fConst24) / fConst25));
190 fConst27 = (1.0 / fConst25);
191 fConst28 = (1.0 / fConst11);
192 fConst29 = (1.0 / tan((188.49555921538757 / iConst0)));
193 fConst30 = (1 + fConst29);
194 fConst31 = (0 - ((1 - fConst29) / fConst30));
195 fConst32 = (1.0 / fConst30);
196 fConst33 = (1.0 / fConst5);
197 fConst34 = (0 - fConst1);
198 fConst35 = (1.0 / fConst2);
199 fConst36 = (1.0 / tan((238.76104167282426 / iConst0)));
200 fConst37 = (1 + fConst36);
201 fConst38 = (0 - ((1 - fConst36) / fConst37));
202 fConst39 = (1.0 / tan((28038.714433288904 / iConst0)));
203 fConst40 = (1 + fConst39);
204 fConst41 = (0 - ((1 - fConst39) / fConst40));
205 fConst42 = (1.0 / fConst40);
206 fConst43 = (0 - fConst36);
207 fConst44 = (1.0 / fConst37);
208 clear_state_f();
209 }
210
211 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
212 {
213 static_cast<Dsp*>(p)->init(samplingFreq);
214 }
215
216 inline void Dsp::compute(int count, float *input0, float *output0)
217 {
218 #define fcheckbox0 (*fcheckbox0_)
219 #define fslider0 (*fslider0_)
220 #define fslider1 (*fslider1_)
221 #define fslider2 (*fslider2_)
222 double fSlow0 = (0.5 * fcheckbox0);
223 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
224 double fSlow2 = fslider1;
225 double fSlow3 = (1 - fSlow2);
226 double fSlow4 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
227 for (int i=0; i<count; i++) {
228 fRec5[0] = (fSlow1 + (0.999 * fRec5[1]));
229 double fTemp0 = (1e-15 + (0.027 * fRec11[1]));
230 fVec0[0] = fTemp0;
231 fRec12[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec12[1]));
232 fRec11[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec12[0]) - 1.829999999999999)) - 182.22222222222223);
233 fRec10[0] = ((fConst21 * ((fConst20 * fRec11[1]) + (fConst7 * fRec11[0]))) + (fConst9 * fRec10[1]));
234 fRec9[0] = ((fConst23 * ((fConst22 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
235 fRec13[0] = ((fConst27 * (fRec10[0] + fRec10[1])) + (fConst26 * fRec13[1]));
236 fRec14[0] = (fSlow4 + (0.999 * fRec14[1]));
237 double fTemp1 = (fRec14[0] * ((fSlow3 * fRec13[0]) + (fSlow2 * fRec9[0])));
238 fVec1[0] = fTemp1;
239 fRec8[0] = ((fConst28 * (fVec1[0] + fVec1[1])) + (fConst12 * fRec8[1]));
240 double fTemp2 = (1e-15 + (0.027 * fRec7[1]));
241 fVec2[0] = fTemp2;
242 fRec15[0] = ((fConst19 * (fVec2[0] + fVec2[1])) + (fConst18 * fRec15[1]));
243 fRec7[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec15[0] + fRec8[0]) - 1.829999999999999)) - 182.22222222222223);
244 fRec6[0] = ((fConst21 * ((fConst20 * fRec7[1]) + (fConst7 * fRec7[0]))) + (fConst9 * fRec6[1]));
245 double fTemp3 = ((fRec6[0] * fRec5[0]) + (fSlow0 * fRec0[1]));
246 double fTemp4 = (1e-15 + (0.00822 * fRec4[1]));
247 fVec3[0] = fTemp4;
248 fRec16[0] = ((fConst32 * (fVec3[0] + fVec3[1])) + (fConst31 * fRec16[1]));
249 fRec4[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec16[0] + (fTemp3 * (fTemp3 >= 0.0))) - 1.130461999999999)) - 112.47420924574209);
250 fRec3[0] = ((fConst21 * ((fConst20 * fRec4[1]) + (fConst7 * fRec4[0]))) + (fConst9 * fRec3[1]));
251 fRec2[0] = ((fConst33 * (fRec3[0] + fRec3[1])) + (fConst6 * fRec2[1]));
252 fRec1[0] = ((fConst35 * ((fConst34 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
253 double fTemp5 = (1e-15 + (0.00818 * fRec20[1]));
254 fVec4[0] = fTemp5;
255 fRec21[0] = ((fConst32 * (fVec4[0] + fVec4[1])) + (fConst31 * fRec21[1]));
256 fRec20[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec21[0] + (fTemp3 * (fTemp3 <= 0.0))) - 1.130461999999999)) - 111.80171149144252);
257 fRec19[0] = ((fConst21 * ((fConst20 * fRec20[1]) + (fConst7 * fRec20[0]))) + (fConst9 * fRec19[1]));
258 fRec18[0] = ((fConst42 * (fRec19[0] + fRec19[1])) + (fConst41 * fRec18[1]));
259 fRec17[0] = ((fConst44 * ((fConst43 * fRec18[1]) + (fConst36 * fRec18[0]))) + (fConst38 * fRec17[1]));
260 fRec0[0] = (fRec17[0] + (0.98 * fRec1[0]));
261 output0[i] = (FAUSTFLOAT)fRec0[0];
262 // post processing
263 fRec0[1] = fRec0[0];
264 fRec17[1] = fRec17[0];
265 fRec18[1] = fRec18[0];
266 fRec19[1] = fRec19[0];
267 fRec20[1] = fRec20[0];
268 fRec21[1] = fRec21[0];
269 fVec4[1] = fVec4[0];
270 fRec1[1] = fRec1[0];
271 fRec2[1] = fRec2[0];
272 fRec3[1] = fRec3[0];
273 fRec4[1] = fRec4[0];
274 fRec16[1] = fRec16[0];
275 fVec3[1] = fVec3[0];
276 fRec6[1] = fRec6[0];
277 fRec7[1] = fRec7[0];
278 fRec15[1] = fRec15[0];
279 fVec2[1] = fVec2[0];
280 fRec8[1] = fRec8[0];
281 fVec1[1] = fVec1[0];
282 fRec14[1] = fRec14[0];
283 fRec13[1] = fRec13[0];
284 fRec9[1] = fRec9[0];
285 fRec10[1] = fRec10[0];
286 fRec11[1] = fRec11[0];
287 fRec12[1] = fRec12[0];
288 fVec0[1] = fVec0[0];
289 fRec5[1] = fRec5[0];
290 }
291 #undef fcheckbox0
292 #undef fslider0
293 #undef fslider1
294 #undef fslider2
295 }
296
297 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
298 {
299 static_cast<Dsp*>(p)->compute(count, input0, output0);
300 }
301
302
303 void Dsp::connect(uint32_t port,void* data)
304 {
305 switch ((PortIndex)port)
306 {
307 case FEEDBACK:
308 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
309 break;
310 case GAIN:
311 fslider2_ = (float*)data; // , 0.0, -24.0, 1e+01, 0.1
312 break;
313 case TONE:
314 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
315 break;
316 case VOLUME:
317 fslider0_ = (float*)data; // , 0.0, -24.0, 6.0, 0.1
318 break;
319 default:
320 break;
321 }
322 }
323
324 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
325 {
326 static_cast<Dsp*>(p)->connect(port, data);
327 }
328
329
330 PluginLV2 *plugin() {
331 return new Dsp();
332 }
333
334 void Dsp::del_instance(PluginLV2 *p)
335 {
336 delete static_cast<Dsp*>(p);
337 }
338
339 /*
340 typedef enum
341 {
342 FEEDBACK,
343 GAIN,
344 TONE,
345 VOLUME,
346 } PortIndex;
347 */
348
349 } // end namespace gx_bigchump
0 // generated from file '../src/LV2/faust/gx_chump.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gx_chump {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 FAUSTFLOAT fslider0;
19 FAUSTFLOAT *fslider0_;
20 double fRec3[2];
21 double fConst8;
22 double fConst9;
23 double fConst10;
24 double fConst11;
25 double fConst12;
26 double fConst13;
27 double fConst14;
28 double fConst15;
29 FAUSTFLOAT fcheckbox0;
30 FAUSTFLOAT *fcheckbox0_;
31 double fVec0[2];
32 double fConst16;
33 double fConst17;
34 double fRec11[2];
35 double fRec10[3];
36 double fConst18;
37 double fConst19;
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fVec1[2];
45 double fConst26;
46 double fRec15[2];
47 double fRec14[2];
48 double fConst27;
49 double fConst28;
50 double fRec13[2];
51 double fConst29;
52 double fConst30;
53 double fRec12[2];
54 FAUSTFLOAT fslider1;
55 FAUSTFLOAT *fslider1_;
56 double fConst31;
57 double fConst32;
58 double fConst33;
59 double fConst34;
60 double fRec16[2];
61 FAUSTFLOAT fslider2;
62 FAUSTFLOAT *fslider2_;
63 double fRec17[2];
64 double fVec2[2];
65 double fRec9[2];
66 double fConst35;
67 double fConst36;
68 double fConst37;
69 double fVec3[2];
70 double fConst38;
71 double fRec18[2];
72 double fRec8[2];
73 double fRec7[2];
74 double fVec4[2];
75 double fRec6[2];
76 double fVec5[2];
77 double fConst39;
78 double fRec19[2];
79 double fRec5[2];
80 double fRec4[2];
81 double fVec6[2];
82 double fRec2[2];
83 double fConst40;
84 double fRec1[2];
85 double fRec0[2];
86 void connect(uint32_t port,void* data);
87 void clear_state_f();
88 void init(uint32_t samplingFreq);
89 void compute(int count, float *input0, float *output0);
90
91 static void clear_state_f_static(PluginLV2*);
92 static void init_static(uint32_t samplingFreq, PluginLV2*);
93 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
94 static void del_instance(PluginLV2 *p);
95 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
96 public:
97 Dsp();
98 ~Dsp();
99 };
100
101
102
103 Dsp::Dsp()
104 : PluginLV2() {
105 version = PLUGINLV2_VERSION;
106 id = "Redeye Chump";
107 name = N_("Redeye Chumo");
108 mono_audio = compute_static;
109 stereo_audio = 0;
110 set_samplerate = init_static;
111 activate_plugin = 0;
112 connect_ports = connect_static;
113 clear_state = clear_state_f_static;
114 delete_instance = del_instance;
115 }
116
117 Dsp::~Dsp() {
118 }
119
120 inline void Dsp::clear_state_f()
121 {
122 for (int i=0; i<2; i++) fRec3[i] = 0;
123 for (int i=0; i<2; i++) fVec0[i] = 0;
124 for (int i=0; i<2; i++) fRec11[i] = 0;
125 for (int i=0; i<3; i++) fRec10[i] = 0;
126 for (int i=0; i<2; i++) fVec1[i] = 0;
127 for (int i=0; i<2; i++) fRec15[i] = 0;
128 for (int i=0; i<2; i++) fRec14[i] = 0;
129 for (int i=0; i<2; i++) fRec13[i] = 0;
130 for (int i=0; i<2; i++) fRec12[i] = 0;
131 for (int i=0; i<2; i++) fRec16[i] = 0;
132 for (int i=0; i<2; i++) fRec17[i] = 0;
133 for (int i=0; i<2; i++) fVec2[i] = 0;
134 for (int i=0; i<2; i++) fRec9[i] = 0;
135 for (int i=0; i<2; i++) fVec3[i] = 0;
136 for (int i=0; i<2; i++) fRec18[i] = 0;
137 for (int i=0; i<2; i++) fRec8[i] = 0;
138 for (int i=0; i<2; i++) fRec7[i] = 0;
139 for (int i=0; i<2; i++) fVec4[i] = 0;
140 for (int i=0; i<2; i++) fRec6[i] = 0;
141 for (int i=0; i<2; i++) fVec5[i] = 0;
142 for (int i=0; i<2; i++) fRec19[i] = 0;
143 for (int i=0; i<2; i++) fRec5[i] = 0;
144 for (int i=0; i<2; i++) fRec4[i] = 0;
145 for (int i=0; i<2; i++) fVec6[i] = 0;
146 for (int i=0; i<2; i++) fRec2[i] = 0;
147 for (int i=0; i<2; i++) fRec1[i] = 0;
148 for (int i=0; i<2; i++) fRec0[i] = 0;
149 }
150
151 void Dsp::clear_state_f_static(PluginLV2 *p)
152 {
153 static_cast<Dsp*>(p)->clear_state_f();
154 }
155
156 inline void Dsp::init(uint32_t samplingFreq)
157 {
158 fSamplingFreq = samplingFreq;
159 iConst0 = min(192000, max(1, fSamplingFreq));
160 fConst1 = (1.0 / tan((376.99111843077515 / iConst0)));
161 fConst2 = (1 + fConst1);
162 fConst3 = (0 - ((1 - fConst1) / fConst2));
163 fConst4 = tan((20517.741620594938 / iConst0));
164 fConst5 = (1.0 / fConst4);
165 fConst6 = (1 + fConst5);
166 fConst7 = (0 - ((1 - fConst5) / fConst6));
167 fConst8 = (1.0 / tan((97.38937226128358 / iConst0)));
168 fConst9 = (1 + fConst8);
169 fConst10 = (0 - ((1 - fConst8) / fConst9));
170 fConst11 = (1.0 / faustpower<2>(fConst4));
171 fConst12 = (2 * (1 - fConst11));
172 fConst13 = (1 + ((fConst5 - 1.0000000000000004) / fConst4));
173 fConst14 = (1 + ((fConst5 + 1.0000000000000004) / fConst4));
174 fConst15 = (1.0 / fConst14);
175 fConst16 = (0 - fConst5);
176 fConst17 = (1.0 / fConst6);
177 fConst18 = (2 * (0 - fConst11));
178 fConst19 = (0.4125375446227544 / fConst14);
179 fConst20 = (1.0 / tan((5830.795965062656 / iConst0)));
180 fConst21 = (1 + fConst20);
181 fConst22 = (0 - ((1 - fConst20) / fConst21));
182 fConst23 = (1.0 / tan((270.1769682087222 / iConst0)));
183 fConst24 = (1 + fConst23);
184 fConst25 = (0 - ((1 - fConst23) / fConst24));
185 fConst26 = (1.0 / fConst24);
186 fConst27 = (0 - fConst8);
187 fConst28 = (0.025 / fConst9);
188 fConst29 = (0 - fConst20);
189 fConst30 = (1.0 / fConst21);
190 fConst31 = (1.0 / tan((1281.7698026646356 / iConst0)));
191 fConst32 = (1 + fConst31);
192 fConst33 = (0 - ((1 - fConst31) / fConst32));
193 fConst34 = (1.0 / fConst32);
194 fConst35 = (1.0 / tan((314.1592653589793 / iConst0)));
195 fConst36 = (1 + fConst35);
196 fConst37 = (0 - ((1 - fConst35) / fConst36));
197 fConst38 = (1.0 / fConst36);
198 fConst39 = (1.0 / fConst2);
199 fConst40 = (0 - fConst1);
200 clear_state_f();
201 }
202
203 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
204 {
205 static_cast<Dsp*>(p)->init(samplingFreq);
206 }
207
208 inline void Dsp::compute(int count, float *input0, float *output0)
209 {
210 #define fslider0 (*fslider0_)
211 #define fcheckbox0 (*fcheckbox0_)
212 #define fslider1 (*fslider1_)
213 #define fslider2 (*fslider2_)
214 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
215 double fSlow1 = fcheckbox0;
216 double fSlow2 = (fConst5 * fSlow1);
217 double fSlow3 = fslider1;
218 double fSlow4 = (1 - fSlow3);
219 double fSlow5 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
220 for (int i=0; i<count; i++) {
221 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
222 double fTemp0 = (fSlow1 * fRec0[1]);
223 fVec0[0] = fTemp0;
224 fRec11[0] = ((fConst17 * ((fConst16 * fVec0[1]) + (fSlow2 * fRec0[1]))) + (fConst7 * fRec11[1]));
225 fRec10[0] = (fRec11[0] - (fConst15 * ((fConst13 * fRec10[2]) + (fConst12 * fRec10[1]))));
226 double fTemp1 = (1e-15 + (0.027 * fRec14[1]));
227 fVec1[0] = fTemp1;
228 fRec15[0] = ((fConst26 * (fVec1[0] + fVec1[1])) + (fConst25 * fRec15[1]));
229 fRec14[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec15[0]) - 1.5816559999999988)) - 191.42014814814814);
230 fRec13[0] = ((fConst28 * ((fConst27 * fRec14[1]) + (fConst8 * fRec14[0]))) + (fConst10 * fRec13[1]));
231 fRec12[0] = ((fConst30 * ((fConst29 * fRec13[1]) + (fConst20 * fRec13[0]))) + (fConst22 * fRec12[1]));
232 fRec16[0] = ((fConst34 * (fRec13[0] + fRec13[1])) + (fConst33 * fRec16[1]));
233 fRec17[0] = (fSlow5 + (0.999 * fRec17[1]));
234 double fTemp2 = ((fRec17[0] * ((fSlow4 * fRec16[0]) + (fSlow3 * fRec12[0]))) - (0.5 * (fVec0[0] + (fConst19 * (((fConst11 * fRec10[0]) + (fConst18 * fRec10[1])) + (fConst11 * fRec10[2]))))));
235 fVec2[0] = fTemp2;
236 fRec9[0] = ((fConst17 * (fVec2[0] + fVec2[1])) + (fConst7 * fRec9[1]));
237 double fTemp3 = (1e-15 + (0.015 * fRec8[1]));
238 fVec3[0] = fTemp3;
239 fRec18[0] = ((fConst38 * (fVec3[0] + fVec3[1])) + (fConst37 * fRec18[1]));
240 fRec8[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec18[0] + fRec9[0]) - 1.204284999999999)) - 169.71433333333334);
241 fRec7[0] = ((fConst28 * ((fConst27 * fRec8[1]) + (fConst8 * fRec8[0]))) + (fConst10 * fRec7[1]));
242 double fTemp4 = (fRec7[0] * fRec3[0]);
243 fVec4[0] = fTemp4;
244 fRec6[0] = ((fConst17 * (fVec4[0] + fVec4[1])) + (fConst7 * fRec6[1]));
245 double fTemp5 = (1e-15 + (0.0082 * fRec5[1]));
246 fVec5[0] = fTemp5;
247 fRec19[0] = ((fConst39 * (fVec5[0] + fVec5[1])) + (fConst3 * fRec19[1]));
248 fRec5[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec19[0] + fRec6[0]) - 1.130461999999999)) - 112.13878048780487);
249 fRec4[0] = ((fConst28 * ((fConst27 * fRec5[1]) + (fConst8 * fRec5[0]))) + (fConst10 * fRec4[1]));
250 double fTemp6 = (fRec4[0] * (1 - (0.05 * fRec3[0])));
251 fVec6[0] = fTemp6;
252 fRec2[0] = ((fConst17 * (fVec6[0] + fVec6[1])) + (fConst7 * fRec2[1]));
253 fRec1[0] = ((fConst39 * ((fConst40 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
254 fRec0[0] = fRec1[0];
255 output0[i] = (FAUSTFLOAT)fRec0[0];
256 // post processing
257 fRec0[1] = fRec0[0];
258 fRec1[1] = fRec1[0];
259 fRec2[1] = fRec2[0];
260 fVec6[1] = fVec6[0];
261 fRec4[1] = fRec4[0];
262 fRec5[1] = fRec5[0];
263 fRec19[1] = fRec19[0];
264 fVec5[1] = fVec5[0];
265 fRec6[1] = fRec6[0];
266 fVec4[1] = fVec4[0];
267 fRec7[1] = fRec7[0];
268 fRec8[1] = fRec8[0];
269 fRec18[1] = fRec18[0];
270 fVec3[1] = fVec3[0];
271 fRec9[1] = fRec9[0];
272 fVec2[1] = fVec2[0];
273 fRec17[1] = fRec17[0];
274 fRec16[1] = fRec16[0];
275 fRec12[1] = fRec12[0];
276 fRec13[1] = fRec13[0];
277 fRec14[1] = fRec14[0];
278 fRec15[1] = fRec15[0];
279 fVec1[1] = fVec1[0];
280 fRec10[2] = fRec10[1]; fRec10[1] = fRec10[0];
281 fRec11[1] = fRec11[0];
282 fVec0[1] = fVec0[0];
283 fRec3[1] = fRec3[0];
284 }
285 #undef fslider0
286 #undef fcheckbox0
287 #undef fslider1
288 #undef fslider2
289 }
290
291 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
292 {
293 static_cast<Dsp*>(p)->compute(count, input0, output0);
294 }
295
296
297 void Dsp::connect(uint32_t port,void* data)
298 {
299 switch ((PortIndex)port)
300 {
301 case FEEDBACK:
302 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
303 break;
304 case GAIN:
305 fslider2_ = (float*)data; // , 0.0, -2e+01, 2e+01, 0.1
306 break;
307 case TONE:
308 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
309 break;
310 case VOLUME:
311 fslider0_ = (float*)data; // , 0.0, -2e+01, 1e+01, 0.1
312 break;
313 default:
314 break;
315 }
316 }
317
318 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
319 {
320 static_cast<Dsp*>(p)->connect(port, data);
321 }
322
323
324 PluginLV2 *plugin() {
325 return new Dsp();
326 }
327
328 void Dsp::del_instance(PluginLV2 *p)
329 {
330 delete static_cast<Dsp*>(p);
331 }
332
333 /*
334 typedef enum
335 {
336 FEEDBACK,
337 GAIN,
338 TONE,
339 VOLUME,
340 } PortIndex;
341 */
342
343 } // end namespace gx_chump
0 // generated from file '../src/LV2/faust/gx_distortion.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_distortion {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int iVec0[2];
12 FAUSTFLOAT fslider1;
13 FAUSTFLOAT *fslider1_;
14 double fRec0[2];
15 int iConst0;
16 double fConst1;
17 double fConst2;
18 double fConst3;
19 FAUSTFLOAT fentry0;
20 FAUSTFLOAT *fentry0_;
21 double fConst4;
22 FAUSTFLOAT fentry1;
23 FAUSTFLOAT *fentry1_;
24 FAUSTFLOAT fentry2;
25 FAUSTFLOAT *fentry2_;
26 double fConst5;
27 double fConst6;
28 double fConst7;
29 double fConst8;
30 double fConst9;
31 double fConst10;
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 FAUSTFLOAT fslider2;
36 FAUSTFLOAT *fslider2_;
37 int IOTA;
38 double fVec1[4096];
39 FAUSTFLOAT fslider3;
40 FAUSTFLOAT *fslider3_;
41 double fRec10[2];
42 FAUSTFLOAT fcheckbox0;
43 FAUSTFLOAT *fcheckbox0_;
44 double fRec11[2];
45 double fRec9[3];
46 double fVec2[2];
47 double fConst14;
48 double fConst15;
49 double fRec8[2];
50 double fRec7[2];
51 double fRec6[3];
52 double fVec3[2];
53 double fRec5[2];
54 double fRec4[3];
55 double fVec4[2];
56 double fRec3[2];
57 double fRec2[3];
58 FAUSTFLOAT fslider4;
59 FAUSTFLOAT *fslider4_;
60 FAUSTFLOAT fslider5;
61 FAUSTFLOAT *fslider5_;
62 FAUSTFLOAT fslider6;
63 FAUSTFLOAT *fslider6_;
64 FAUSTFLOAT fslider7;
65 FAUSTFLOAT *fslider7_;
66 double fRec12[2];
67 double fRec14[2];
68 double fRec13[3];
69 FAUSTFLOAT fslider8;
70 FAUSTFLOAT *fslider8_;
71 FAUSTFLOAT fslider9;
72 FAUSTFLOAT *fslider9_;
73 double fRec15[2];
74 double fRec18[2];
75 double fRec17[3];
76 double fRec16[3];
77 FAUSTFLOAT fslider10;
78 FAUSTFLOAT *fslider10_;
79 FAUSTFLOAT fslider11;
80 FAUSTFLOAT *fslider11_;
81 double fRec19[2];
82 double fRec23[2];
83 double fRec22[3];
84 double fRec21[3];
85 double fRec20[3];
86 FAUSTFLOAT fslider12;
87 FAUSTFLOAT *fslider12_;
88 FAUSTFLOAT fslider13;
89 FAUSTFLOAT *fslider13_;
90 double fRec24[2];
91 double fVec5[2];
92 double fConst16;
93 double fRec1[2];
94 void connect(uint32_t port,void* data);
95 void clear_state_f();
96 void init(uint32_t samplingFreq);
97 void compute(int count, float *input0, float *output0);
98
99 static void clear_state_f_static(PluginLV2*);
100 static void init_static(uint32_t samplingFreq, PluginLV2*);
101 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
102 static void del_instance(PluginLV2 *p);
103 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
104 public:
105 Dsp();
106 ~Dsp();
107 };
108
109
110
111 static const char* parm_groups[] = {
112 "resonator", N_("Distortion resonator"),
113 0
114 };
115
116 Dsp::Dsp()
117 : PluginLV2() {
118 version = PLUGINLV2_VERSION;
119 id = "gx_distortion";
120 name = N_("Multi Band Distortion");
121 mono_audio = compute_static;
122 stereo_audio = 0;
123 set_samplerate = init_static;
124 activate_plugin = 0;
125 connect_ports = connect_static;
126 clear_state = clear_state_f_static;
127 delete_instance = del_instance;
128 }
129
130 Dsp::~Dsp() {
131 }
132
133 inline void Dsp::clear_state_f()
134 {
135 for (int i=0; i<2; i++) iVec0[i] = 0;
136 for (int i=0; i<2; i++) fRec0[i] = 0;
137 for (int i=0; i<4096; i++) fVec1[i] = 0;
138 for (int i=0; i<2; i++) fRec10[i] = 0;
139 for (int i=0; i<2; i++) fRec11[i] = 0;
140 for (int i=0; i<3; i++) fRec9[i] = 0;
141 for (int i=0; i<2; i++) fVec2[i] = 0;
142 for (int i=0; i<2; i++) fRec8[i] = 0;
143 for (int i=0; i<2; i++) fRec7[i] = 0;
144 for (int i=0; i<3; i++) fRec6[i] = 0;
145 for (int i=0; i<2; i++) fVec3[i] = 0;
146 for (int i=0; i<2; i++) fRec5[i] = 0;
147 for (int i=0; i<3; i++) fRec4[i] = 0;
148 for (int i=0; i<2; i++) fVec4[i] = 0;
149 for (int i=0; i<2; i++) fRec3[i] = 0;
150 for (int i=0; i<3; i++) fRec2[i] = 0;
151 for (int i=0; i<2; i++) fRec12[i] = 0;
152 for (int i=0; i<2; i++) fRec14[i] = 0;
153 for (int i=0; i<3; i++) fRec13[i] = 0;
154 for (int i=0; i<2; i++) fRec15[i] = 0;
155 for (int i=0; i<2; i++) fRec18[i] = 0;
156 for (int i=0; i<3; i++) fRec17[i] = 0;
157 for (int i=0; i<3; i++) fRec16[i] = 0;
158 for (int i=0; i<2; i++) fRec19[i] = 0;
159 for (int i=0; i<2; i++) fRec23[i] = 0;
160 for (int i=0; i<3; i++) fRec22[i] = 0;
161 for (int i=0; i<3; i++) fRec21[i] = 0;
162 for (int i=0; i<3; i++) fRec20[i] = 0;
163 for (int i=0; i<2; i++) fRec24[i] = 0;
164 for (int i=0; i<2; i++) fVec5[i] = 0;
165 for (int i=0; i<2; i++) fRec1[i] = 0;
166 }
167
168 void Dsp::clear_state_f_static(PluginLV2 *p)
169 {
170 static_cast<Dsp*>(p)->clear_state_f();
171 }
172
173 inline void Dsp::init(uint32_t samplingFreq)
174 {
175 fSamplingFreq = samplingFreq;
176 iConst0 = min(192000, max(1, fSamplingFreq));
177 fConst1 = (1.0 / tan((20517.741620594938 / iConst0)));
178 fConst2 = (1 + fConst1);
179 fConst3 = (0 - ((1 - fConst1) / fConst2));
180 fConst4 = (3.141592653589793 / iConst0);
181 fConst5 = (1.0 / tan((97.38937226128358 / iConst0)));
182 fConst6 = (1 + fConst5);
183 fConst7 = (0 - ((1 - fConst5) / fConst6));
184 fConst8 = tan((47123.8898038469 / iConst0));
185 fConst9 = (2 * (1 - (1.0 / faustpower<2>(fConst8))));
186 fConst10 = (1.0 / fConst8);
187 fConst11 = (1 + ((fConst10 - 1.414213562373095) / fConst8));
188 fConst12 = (1 + ((1.414213562373095 + fConst10) / fConst8));
189 fConst13 = (1.0 / fConst12);
190 IOTA = 0;
191 fConst14 = (0 - fConst5);
192 fConst15 = (1.0 / (fConst6 * fConst12));
193 fConst16 = (1.0 / fConst2);
194 clear_state_f();
195 }
196
197 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
198 {
199 static_cast<Dsp*>(p)->init(samplingFreq);
200 }
201
202 inline void Dsp::compute(int count, float *input0, float *output0)
203 {
204 #define fslider0 (*fslider0_)
205 #define fslider1 (*fslider1_)
206 #define fentry0 (*fentry0_)
207 #define fentry1 (*fentry1_)
208 #define fentry2 (*fentry2_)
209 #define fslider2 (*fslider2_)
210 #define fslider3 (*fslider3_)
211 #define fcheckbox0 (*fcheckbox0_)
212 #define fslider4 (*fslider4_)
213 #define fslider5 (*fslider5_)
214 #define fslider6 (*fslider6_)
215 #define fslider7 (*fslider7_)
216 #define fslider8 (*fslider8_)
217 #define fslider9 (*fslider9_)
218 #define fslider10 (*fslider10_)
219 #define fslider11 (*fslider11_)
220 #define fslider12 (*fslider12_)
221 #define fslider13 (*fslider13_)
222 double fSlow0 = (0.01 * fslider0);
223 double fSlow1 = (1 - fSlow0);
224 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * (fslider1 - 10))));
225 double fSlow3 = tan((fConst4 * fentry0));
226 double fSlow4 = (1.0 / faustpower<2>(fSlow3));
227 double fSlow5 = (2 * (1 - fSlow4));
228 double fSlow6 = (1.0 / fSlow3);
229 double fSlow7 = (1 + ((fSlow6 - 1.0000000000000004) / fSlow3));
230 double fSlow8 = (1 + ((fSlow6 + 1.0000000000000004) / fSlow3));
231 double fSlow9 = (1.0 / fSlow8);
232 double fSlow10 = (1 + fSlow6);
233 double fSlow11 = (0 - ((1 - fSlow6) / fSlow10));
234 double fSlow12 = tan((fConst4 * fentry1));
235 double fSlow13 = (1.0 / faustpower<2>(fSlow12));
236 double fSlow14 = (2 * (1 - fSlow13));
237 double fSlow15 = (1.0 / fSlow12);
238 double fSlow16 = (1 + ((fSlow15 - 1.0000000000000004) / fSlow12));
239 double fSlow17 = (1 + ((fSlow15 + 1.0000000000000004) / fSlow12));
240 double fSlow18 = (1.0 / fSlow17);
241 double fSlow19 = (1 + fSlow15);
242 double fSlow20 = (0 - ((1 - fSlow15) / fSlow19));
243 double fSlow21 = tan((fConst4 * fentry2));
244 double fSlow22 = (1.0 / faustpower<2>(fSlow21));
245 double fSlow23 = (2 * (1 - fSlow22));
246 double fSlow24 = (1.0 / fSlow21);
247 double fSlow25 = (1 + ((fSlow24 - 1.0000000000000004) / fSlow21));
248 double fSlow26 = (1 + ((1.0000000000000004 + fSlow24) / fSlow21));
249 double fSlow27 = (1.0 / fSlow26);
250 double fSlow28 = (1 + fSlow24);
251 double fSlow29 = (0 - ((1 - fSlow24) / fSlow28));
252 double fSlow30 = (1.0 - fslider2);
253 double fSlow31 = fslider3;
254 int iSlow32 = int((int((fSlow31 - 1)) & 4095));
255 int iSlow33 = int((int(fSlow31) & 4095));
256 int iSlow34 = int(fcheckbox0);
257 double fSlow35 = (1.0 / fSlow28);
258 double fSlow36 = (1.0 / fSlow19);
259 double fSlow37 = (1.0 / (fSlow3 * fSlow17));
260 double fSlow38 = (0 - fSlow6);
261 double fSlow39 = (1.0 / fSlow10);
262 double fSlow40 = (2 * (0 - fSlow4));
263 double fSlow41 = fslider5;
264 double fSlow42 = (pow(1e+01,(2 * (fSlow41 * fslider4))) / fSlow8);
265 double fSlow43 = fslider6;
266 double fSlow44 = (0.0010000000000000009 * pow(10,(0.05 * (fslider7 - 10))));
267 double fSlow45 = (pow(1e+01,(2 * (fSlow41 * fslider8))) / fSlow8);
268 double fSlow46 = (0.0010000000000000009 * pow(10,(0.05 * (fslider9 - 10))));
269 double fSlow47 = (1 + ((fSlow6 - 1.0) / fSlow3));
270 double fSlow48 = (1.0 / (1 + ((1.0 + fSlow6) / fSlow3)));
271 double fSlow49 = (1.0 / (fSlow12 * fSlow26));
272 double fSlow50 = (0 - fSlow15);
273 double fSlow51 = (2 * (0 - fSlow13));
274 double fSlow52 = pow(1e+01,(2 * (fSlow41 * fslider10)));
275 double fSlow53 = (0.0010000000000000009 * pow(10,(0.05 * (fslider11 - 10))));
276 double fSlow54 = (1 + ((fSlow15 - 1.0) / fSlow12));
277 double fSlow55 = (1.0 / (1 + ((1.0 + fSlow15) / fSlow12)));
278 double fSlow56 = (0 - fSlow24);
279 double fSlow57 = (2 * (0 - fSlow22));
280 double fSlow58 = pow(1e+01,(2 * (fSlow41 * fslider12)));
281 double fSlow59 = (0.0010000000000000009 * pow(10,(0.05 * (fslider13 - 10))));
282 for (int i=0; i<count; i++) {
283 double fTemp0 = (double)input0[i];
284 iVec0[0] = 1;
285 fRec0[0] = (fSlow2 + (0.999 * fRec0[1]));
286 double fTemp1 = (fSlow0 * fTemp0);
287 double fTemp2 = (fTemp1 + (fSlow30 * fRec10[1]));
288 fVec1[IOTA&4095] = fTemp2;
289 fRec10[0] = (0.5 * (fVec1[(IOTA-iSlow33)&4095] + fVec1[(IOTA-iSlow32)&4095]));
290 fRec11[0] = ((1e-20 * (1 - iVec0[1])) - fRec11[1]);
291 fRec9[0] = ((fRec11[0] + ((iSlow34)?fRec10[0]:fTemp1)) - (fConst13 * ((fConst11 * fRec9[2]) + (fConst9 * fRec9[1]))));
292 double fTemp3 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
293 fVec2[0] = fTemp3;
294 fRec8[0] = ((fConst15 * ((fConst14 * fVec2[1]) + (fConst5 * fVec2[0]))) + (fConst7 * fRec8[1]));
295 fRec7[0] = ((fSlow35 * (fRec8[0] + fRec8[1])) + (fSlow29 * fRec7[1]));
296 fRec6[0] = (fRec7[0] - (fSlow27 * ((fSlow25 * fRec6[2]) + (fSlow23 * fRec6[1]))));
297 double fTemp4 = (fRec6[2] + (fRec6[0] + (2 * fRec6[1])));
298 double fTemp5 = (fSlow27 * fTemp4);
299 fVec3[0] = fTemp5;
300 fRec5[0] = ((fSlow36 * (fVec3[0] + fVec3[1])) + (fSlow20 * fRec5[1]));
301 fRec4[0] = (fRec5[0] - (fSlow18 * ((fSlow16 * fRec4[2]) + (fSlow14 * fRec4[1]))));
302 double fTemp6 = (fRec4[2] + (fRec4[0] + (2 * fRec4[1])));
303 double fTemp7 = (fSlow18 * fTemp6);
304 fVec4[0] = fTemp7;
305 fRec3[0] = ((fSlow39 * ((fSlow38 * fVec4[1]) + (fSlow37 * fTemp6))) + (fSlow11 * fRec3[1]));
306 fRec2[0] = (fRec3[0] - (fSlow9 * ((fSlow7 * fRec2[2]) + (fSlow5 * fRec2[1]))));
307 double fTemp8 = max(-1, min(1, (fSlow43 + (fSlow42 * (((fSlow4 * fRec2[0]) + (fSlow40 * fRec2[1])) + (fSlow4 * fRec2[2]))))));
308 fRec12[0] = (fSlow44 + (0.999 * fRec12[1]));
309 fRec14[0] = ((fSlow39 * (fVec4[0] + fVec4[1])) + (fSlow11 * fRec14[1]));
310 fRec13[0] = (fRec14[0] - (fSlow9 * ((fSlow7 * fRec13[2]) + (fSlow5 * fRec13[1]))));
311 double fTemp9 = max(-1, min(1, (fSlow43 + (fSlow45 * (fRec13[2] + (fRec13[0] + (2 * fRec13[1])))))));
312 fRec15[0] = (fSlow46 + (0.999 * fRec15[1]));
313 double fTemp10 = (fSlow5 * fRec16[1]);
314 fRec18[0] = ((fSlow36 * ((fSlow50 * fVec3[1]) + (fSlow49 * fTemp4))) + (fSlow20 * fRec18[1]));
315 fRec17[0] = (fRec18[0] - (fSlow18 * ((fSlow16 * fRec17[2]) + (fSlow14 * fRec17[1]))));
316 fRec16[0] = ((fSlow18 * (((fSlow13 * fRec17[0]) + (fSlow51 * fRec17[1])) + (fSlow13 * fRec17[2]))) - (fSlow48 * ((fSlow47 * fRec16[2]) + fTemp10)));
317 double fTemp11 = max(-1, min(1, (fSlow43 + (fSlow52 * (fRec16[2] + (fSlow48 * (fTemp10 + (fSlow47 * fRec16[0]))))))));
318 fRec19[0] = (fSlow53 + (0.999 * fRec19[1]));
319 double fTemp12 = (fSlow5 * fRec20[1]);
320 double fTemp13 = (fSlow14 * fRec21[1]);
321 fRec23[0] = ((fSlow35 * ((fSlow56 * fRec8[1]) + (fSlow24 * fRec8[0]))) + (fSlow29 * fRec23[1]));
322 fRec22[0] = (fRec23[0] - (fSlow27 * ((fSlow25 * fRec22[2]) + (fSlow23 * fRec22[1]))));
323 fRec21[0] = ((fSlow27 * (((fSlow22 * fRec22[0]) + (fSlow57 * fRec22[1])) + (fSlow22 * fRec22[2]))) - (fSlow55 * ((fSlow54 * fRec21[2]) + fTemp13)));
324 fRec20[0] = ((fRec21[2] + (fSlow55 * (fTemp13 + (fSlow54 * fRec21[0])))) - (fSlow48 * ((fSlow47 * fRec20[2]) + fTemp12)));
325 double fTemp14 = max(-1, min(1, (fSlow43 + (fSlow58 * (fRec20[2] + (fSlow48 * (fTemp12 + (fSlow47 * fRec20[0]))))))));
326 fRec24[0] = (fSlow59 + (0.999 * fRec24[1]));
327 double fTemp15 = (((fRec24[0] * fTemp14) * (1 - (0.3333333333333333 * faustpower<2>(fTemp14)))) + (((fRec19[0] * fTemp11) * (1 - (0.3333333333333333 * faustpower<2>(fTemp11)))) + (((fRec15[0] * fTemp9) * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fRec12[0] * fTemp8) * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))));
328 fVec5[0] = fTemp15;
329 fRec1[0] = ((fConst16 * (fVec5[0] + fVec5[1])) + (fConst3 * fRec1[1]));
330 output0[i] = (FAUSTFLOAT)((fRec1[0] * fRec0[0]) + (fSlow1 * fTemp0));
331 // post processing
332 fRec1[1] = fRec1[0];
333 fVec5[1] = fVec5[0];
334 fRec24[1] = fRec24[0];
335 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
336 fRec21[2] = fRec21[1]; fRec21[1] = fRec21[0];
337 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
338 fRec23[1] = fRec23[0];
339 fRec19[1] = fRec19[0];
340 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
341 fRec17[2] = fRec17[1]; fRec17[1] = fRec17[0];
342 fRec18[1] = fRec18[0];
343 fRec15[1] = fRec15[0];
344 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
345 fRec14[1] = fRec14[0];
346 fRec12[1] = fRec12[0];
347 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
348 fRec3[1] = fRec3[0];
349 fVec4[1] = fVec4[0];
350 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
351 fRec5[1] = fRec5[0];
352 fVec3[1] = fVec3[0];
353 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
354 fRec7[1] = fRec7[0];
355 fRec8[1] = fRec8[0];
356 fVec2[1] = fVec2[0];
357 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
358 fRec11[1] = fRec11[0];
359 fRec10[1] = fRec10[0];
360 IOTA = IOTA+1;
361 fRec0[1] = fRec0[0];
362 iVec0[1] = iVec0[0];
363 }
364 #undef fslider0
365 #undef fslider1
366 #undef fentry0
367 #undef fentry1
368 #undef fentry2
369 #undef fslider2
370 #undef fslider3
371 #undef fcheckbox0
372 #undef fslider4
373 #undef fslider5
374 #undef fslider6
375 #undef fslider7
376 #undef fslider8
377 #undef fslider9
378 #undef fslider10
379 #undef fslider11
380 #undef fslider12
381 #undef fslider13
382 }
383
384 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
385 {
386 static_cast<Dsp*>(p)->compute(count, input0, output0);
387 }
388
389
390 void Dsp::connect(uint32_t port,void* data)
391 {
392 switch ((PortIndex)port)
393 {
394 case HIGH_GAIN:
395 fslider13_ = (float*)data; // , 1e+01, -1e+01, 2e+01, 0.1
396 break;
397 case HIGH_DRIVE:
398 fslider12_ = (float*)data; // , 1.0, 0.0, 1.0, 0.01
399 break;
400 case MIDDLE_H_GAIN:
401 fslider11_ = (float*)data; // , 1e+01, -1e+01, 2e+01, 0.1
402 break;
403 case MIDDLE_H_DRIVE:
404 fslider10_ = (float*)data; // , 1.0, 0.0, 1.0, 0.01
405 break;
406 case ON_OFF:
407 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
408 break;
409 case SPLIT_MIDDLE_FREQ:
410 fentry1_ = (float*)data; // , 6.5e+02, 6e+02, 1.25e+03, 1e+01
411 break;
412 case SPLIT_LOW_FREQ:
413 fentry0_ = (float*)data; // , 2.5e+02, 2e+01, 6e+02, 1e+01
414 break;
415 case SPLIT_HIGH_FREQ:
416 fentry2_ = (float*)data; // , 1.25e+03, 1.25e+03, 1.2e+04, 1e+01
417 break;
418 case MIDDLE_L_GAIN:
419 fslider7_ = (float*)data; // , 1e+01, -1e+01, 2e+01, 0.1
420 break;
421 case LEVEL:
422 fslider6_ = (float*)data; // , 0.0, 0.0, 0.5, 0.01
423 break;
424 case DRIVE:
425 fslider5_ = (float*)data; // , 0.64, 0.0, 1.0, 0.01
426 break;
427 case MIDDLE_L_DRIVE:
428 fslider4_ = (float*)data; // , 1.0, 0.0, 1.0, 0.01
429 break;
430 case VIBRATO:
431 fslider3_ = (float*)data; // , 1.0, 0.0, 1.0, 0.01
432 break;
433 case TRIGGER:
434 fslider2_ = (float*)data; // , 0.12, 0.0, 1.0, 0.01
435 break;
436 case GAIN:
437 fslider1_ = (float*)data; // , 2.0, -1e+01, 1e+01, 0.1
438 break;
439 case WET_DRY:
440 fslider0_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
441 break;
442 case LOW_GAIN:
443 fslider9_ = (float*)data; // , 1e+01, -1e+01, 2e+01, 0.1
444 break;
445 case LOW_DRIVE:
446 fslider8_ = (float*)data; // , 1.0, 0.0, 1.0, 0.01
447 break;
448 default:
449 break;
450 }
451 }
452
453 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
454 {
455 static_cast<Dsp*>(p)->connect(port, data);
456 }
457
458
459 PluginLV2 *plugin() {
460 return new Dsp();
461 }
462
463 void Dsp::del_instance(PluginLV2 *p)
464 {
465 delete static_cast<Dsp*>(p);
466 }
467
468 /*
469 typedef enum
470 {
471 HIGH_GAIN,
472 HIGH_DRIVE,
473 MIDDLE_H_GAIN,
474 MIDDLE_H_DRIVE,
475 ON_OFF,
476 SPLIT_MIDDLE_FREQ,
477 SPLIT_LOW_FREQ,
478 SPLIT_HIGH_FREQ,
479 MIDDLE_L_GAIN,
480 LEVEL,
481 DRIVE,
482 MIDDLE_L_DRIVE,
483 VIBRATO,
484 TRIGGER,
485 GAIN,
486 WET_DRY,
487 LOW_GAIN,
488 LOW_DRIVE,
489 } PortIndex;
490 */
491
492 } // end namespace gx_distortion
0 // generated from file '../src/LV2/faust/gx_feedback.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_feedback {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fRec0[6];
14 void connect(uint32_t port,void* data);
15 void clear_state_f();
16 void init(uint32_t samplingFreq);
17 void compute(int count, float *input0, float *output0);
18
19 static void clear_state_f_static(PluginLV2*);
20 static void init_static(uint32_t samplingFreq, PluginLV2*);
21 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
22 static void del_instance(PluginLV2 *p);
23 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
24 public:
25 Dsp();
26 ~Dsp();
27 };
28
29
30
31 Dsp::Dsp()
32 : PluginLV2() {
33 version = PLUGINLV2_VERSION;
34 id = "feedback";
35 name = N_("Feedback");
36 mono_audio = compute_static;
37 stereo_audio = 0;
38 set_samplerate = init_static;
39 activate_plugin = 0;
40 connect_ports = connect_static;
41 clear_state = clear_state_f_static;
42 delete_instance = del_instance;
43 }
44
45 Dsp::~Dsp() {
46 }
47
48 inline void Dsp::clear_state_f()
49 {
50 for (int i=0; i<6; i++) fRec0[i] = 0;
51 }
52
53 void Dsp::clear_state_f_static(PluginLV2 *p)
54 {
55 static_cast<Dsp*>(p)->clear_state_f();
56 }
57
58 inline void Dsp::init(uint32_t samplingFreq)
59 {
60 fSamplingFreq = samplingFreq;
61 clear_state_f();
62 }
63
64 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
65 {
66 static_cast<Dsp*>(p)->init(samplingFreq);
67 }
68
69 inline void Dsp::compute(int count, float *input0, float *output0)
70 {
71 #define fslider0 (*fslider0_)
72 #define fslider1 (*fslider1_)
73 double fSlow0 = (0.01 * fslider0);
74 double fSlow1 = (1 - fSlow0);
75 double fSlow2 = fslider1;
76 for (int i=0; i<count; i++) {
77 double fTemp0 = (double)input0[i];
78 fRec0[0] = ((fSlow0 * fTemp0) - (fSlow2 * fRec0[5]));
79 output0[i] = (FAUSTFLOAT)(fRec0[0] + (fSlow1 * fTemp0));
80 // post processing
81 for (int i=5; i>0; i--) fRec0[i] = fRec0[i-1];
82 }
83 #undef fslider0
84 #undef fslider1
85 }
86
87 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
88 {
89 static_cast<Dsp*>(p)->compute(count, input0, output0);
90 }
91
92
93 void Dsp::connect(uint32_t port,void* data)
94 {
95 switch ((PortIndex)port)
96 {
97 case FEEDBACK:
98 fslider1_ = (float*)data; // , 0.0, -1.0, 1.0, 0.01
99 break;
100 case WET_DRY:
101 fslider0_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
102 break;
103 default:
104 break;
105 }
106 }
107
108 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
109 {
110 static_cast<Dsp*>(p)->connect(port, data);
111 }
112
113
114 PluginLV2 *plugin() {
115 return new Dsp();
116 }
117
118 void Dsp::del_instance(PluginLV2 *p)
119 {
120 delete static_cast<Dsp*>(p);
121 }
122
123 /*
124 typedef enum
125 {
126 FEEDBACK,
127 WET_DRY,
128 } PortIndex;
129 */
130
131 } // end namespace gx_feedback
0 // generated from file '../src/LV2/faust/gx_flanger.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_flanger {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int IOTA;
10 double fVec0[1024];
11 int iVec1[2];
12 FAUSTFLOAT fslider0;
13 FAUSTFLOAT *fslider0_;
14 FAUSTFLOAT fslider1;
15 FAUSTFLOAT *fslider1_;
16 FAUSTFLOAT fslider2;
17 FAUSTFLOAT *fslider2_;
18 FAUSTFLOAT fslider3;
19 FAUSTFLOAT *fslider3_;
20 int iConst0;
21 double fConst1;
22 double fRec1[2];
23 double fRec2[2];
24 FAUSTFLOAT fslider4;
25 FAUSTFLOAT *fslider4_;
26 FAUSTFLOAT fslider5;
27 FAUSTFLOAT *fslider5_;
28 double fConst2;
29 double fVec2[1024];
30 double fRec0[2];
31 double fVec3[2048];
32 double fRec3[2];
33 void connect(uint32_t port,void* data);
34 void clear_state_f();
35 void init(uint32_t samplingFreq);
36 void compute(int count, float *input0, float *output0);
37
38 static void clear_state_f_static(PluginLV2*);
39 static void init_static(uint32_t samplingFreq, PluginLV2*);
40 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
41 static void del_instance(PluginLV2 *p);
42 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
43 public:
44 Dsp();
45 ~Dsp();
46 };
47
48
49
50 Dsp::Dsp()
51 : PluginLV2() {
52 version = PLUGINLV2_VERSION;
53 id = "flanger_mono_gx";
54 name = N_("Flanger GX");
55 mono_audio = compute_static;
56 stereo_audio = 0;
57 set_samplerate = init_static;
58 activate_plugin = 0;
59 connect_ports = connect_static;
60 clear_state = clear_state_f_static;
61 delete_instance = del_instance;
62 }
63
64 Dsp::~Dsp() {
65 }
66
67 inline void Dsp::clear_state_f()
68 {
69 for (int i=0; i<1024; i++) fVec0[i] = 0;
70 for (int i=0; i<2; i++) iVec1[i] = 0;
71 for (int i=0; i<2; i++) fRec1[i] = 0;
72 for (int i=0; i<2; i++) fRec2[i] = 0;
73 for (int i=0; i<1024; i++) fVec2[i] = 0;
74 for (int i=0; i<2; i++) fRec0[i] = 0;
75 for (int i=0; i<2048; i++) fVec3[i] = 0;
76 for (int i=0; i<2; i++) fRec3[i] = 0;
77 }
78
79 void Dsp::clear_state_f_static(PluginLV2 *p)
80 {
81 static_cast<Dsp*>(p)->clear_state_f();
82 }
83
84 inline void Dsp::init(uint32_t samplingFreq)
85 {
86 fSamplingFreq = samplingFreq;
87 IOTA = 0;
88 iConst0 = min(192000, max(1, fSamplingFreq));
89 fConst1 = (6.283185307179586 / iConst0);
90 fConst2 = (0.5 * iConst0);
91 clear_state_f();
92 }
93
94 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
95 {
96 static_cast<Dsp*>(p)->init(samplingFreq);
97 }
98
99 inline void Dsp::compute(int count, float *input0, float *output0)
100 {
101 #define fslider0 (*fslider0_)
102 #define fslider1 (*fslider1_)
103 #define fslider2 (*fslider2_)
104 #define fslider3 (*fslider3_)
105 #define fslider4 (*fslider4_)
106 #define fslider5 (*fslider5_)
107 double fSlow0 = fslider0;
108 double fSlow1 = fslider1;
109 double fSlow2 = (0.01 * (fSlow1 * min(1, (1 + fSlow0))));
110 double fSlow3 = (2 - fSlow2);
111 double fSlow4 = (0.3333333333333333 * ((2 + fabs(fSlow0)) * fslider2));
112 double fSlow5 = (fConst1 * fslider3);
113 double fSlow6 = sin(fSlow5);
114 double fSlow7 = cos(fSlow5);
115 double fSlow8 = (0 - fSlow6);
116 double fSlow9 = (0.0005 * fslider4);
117 double fSlow10 = (0.001 * fslider5);
118 double fSlow11 = (0.01 * (min(1, (1 - fSlow0)) * fSlow1));
119 double fSlow12 = (2 - fSlow11);
120 double fSlow13 = (0 - fSlow4);
121 for (int i=0; i<count; i++) {
122 double fTemp0 = (double)input0[i];
123 fVec0[IOTA&1023] = fTemp0;
124 iVec1[0] = 1;
125 fRec1[0] = ((fSlow7 * fRec1[1]) + (fSlow6 * fRec2[1]));
126 fRec2[0] = ((1 + ((fSlow8 * fRec1[1]) + (fSlow7 * fRec2[1]))) - iVec1[1]);
127 double fTemp1 = (fSlow10 + (fSlow9 * (1 + fRec1[0])));
128 double fTemp2 = (fConst2 * fTemp1);
129 int iTemp3 = int(fTemp2);
130 int iTemp4 = int((iTemp3 & 1023));
131 int iTemp5 = (1 + iTemp3);
132 double fTemp6 = (iTemp5 - fTemp2);
133 int iTemp7 = int((int(iTemp5) & 1023));
134 double fTemp8 = (fTemp2 - iTemp3);
135 double fTemp9 = (((fTemp8 * fVec0[(IOTA-iTemp7)&1023]) + (fTemp6 * fVec0[(IOTA-iTemp4)&1023])) + (fSlow4 * fRec0[1]));
136 fVec2[IOTA&1023] = fTemp9;
137 fRec0[0] = ((fTemp8 * fVec2[(IOTA-iTemp7)&1023]) + (fTemp6 * fVec2[(IOTA-iTemp4)&1023]));
138 double fTemp10 = ((fSlow2 * fRec0[0]) + (fSlow3 * fVec0[IOTA&1023]));
139 double fTemp11 = (fTemp10 + (fSlow13 * fRec3[1]));
140 fVec3[IOTA&2047] = fTemp11;
141 double fTemp12 = (iConst0 * fTemp1);
142 int iTemp13 = int(fTemp12);
143 int iTemp14 = (1 + iTemp13);
144 fRec3[0] = (((fTemp12 - iTemp13) * fVec3[(IOTA-int((int(iTemp14) & 2047)))&2047]) + ((iTemp14 - fTemp12) * fVec3[(IOTA-int((iTemp13 & 2047)))&2047]));
145 output0[i] = (FAUSTFLOAT)(0.25 * ((fSlow11 * fRec3[0]) + (fSlow12 * fTemp10)));
146 // post processing
147 fRec3[1] = fRec3[0];
148 fRec0[1] = fRec0[0];
149 fRec2[1] = fRec2[0];
150 fRec1[1] = fRec1[0];
151 iVec1[1] = iVec1[0];
152 IOTA = IOTA+1;
153 }
154 #undef fslider0
155 #undef fslider1
156 #undef fslider2
157 #undef fslider3
158 #undef fslider4
159 #undef fslider5
160 }
161
162 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
163 {
164 static_cast<Dsp*>(p)->compute(count, input0, output0);
165 }
166
167
168 void Dsp::connect(uint32_t port,void* data)
169 {
170 switch ((PortIndex)port)
171 {
172 case DEPTH:
173 fslider5_ = (float*)data; // , 0.5, 0.0, 5.0, 0.01
174 break;
175 case WIDTH:
176 fslider4_ = (float*)data; // , 5.0, 0.0, 1e+01, 0.01
177 break;
178 case FREQ:
179 fslider3_ = (float*)data; // , 0.2, 0.05, 1e+01, 1.06
180 break;
181 case FEEDBACK:
182 fslider2_ = (float*)data; // , -0.707, -0.99, 0.99, 0.01
183 break;
184 case WET:
185 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
186 break;
187 case MIX:
188 fslider0_ = (float*)data; // , 0.0, -1.0, 1.0, 0.1
189 break;
190 default:
191 break;
192 }
193 }
194
195 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
196 {
197 static_cast<Dsp*>(p)->connect(port, data);
198 }
199
200
201 PluginLV2 *plugin() {
202 return new Dsp();
203 }
204
205 void Dsp::del_instance(PluginLV2 *p)
206 {
207 delete static_cast<Dsp*>(p);
208 }
209
210 /*
211 typedef enum
212 {
213 DEPTH,
214 WIDTH,
215 FREQ,
216 FEEDBACK,
217 WET,
218 MIX,
219 } PortIndex;
220 */
221
222 } // end namespace gx_flanger
0 // generated from file '../src/LV2/faust/gx_outputlevel.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_outputlevel {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 double fRec0[2];
12 void connect(uint32_t port,void* data);
13 void clear_state_f();
14 void init(uint32_t samplingFreq);
15 void compute(int count, float *input0, float *input1, float *output0, float *output1);
16
17 static void clear_state_f_static(PluginLV2*);
18 static void init_static(uint32_t samplingFreq, PluginLV2*);
19 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
20 static void del_instance(PluginLV2 *p);
21 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
22 public:
23 Dsp();
24 ~Dsp();
25 };
26
27
28
29 Dsp::Dsp()
30 : PluginLV2() {
31 version = PLUGINLV2_VERSION;
32 id = "gx_outputlevel";
33 name = "?gx_outputlevel";
34 mono_audio = 0;
35 stereo_audio = compute_static;
36 set_samplerate = init_static;
37 activate_plugin = 0;
38 connect_ports = connect_static;
39 clear_state = clear_state_f_static;
40 delete_instance = del_instance;
41 }
42
43 Dsp::~Dsp() {
44 }
45
46 inline void Dsp::clear_state_f()
47 {
48 for (int i=0; i<2; i++) fRec0[i] = 0;
49 }
50
51 void Dsp::clear_state_f_static(PluginLV2 *p)
52 {
53 static_cast<Dsp*>(p)->clear_state_f();
54 }
55
56 inline void Dsp::init(uint32_t samplingFreq)
57 {
58 fSamplingFreq = samplingFreq;
59 clear_state_f();
60 }
61
62 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
63 {
64 static_cast<Dsp*>(p)->init(samplingFreq);
65 }
66
67 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
68 {
69 #define fslider0 (*fslider0_)
70 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
71 for (int i=0; i<count; i++) {
72 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
73 output0[i] = (FAUSTFLOAT)((double)input0[i] * fRec0[0]);
74 output1[i] = (FAUSTFLOAT)((double)input1[i] * fRec0[0]);
75 // post processing
76 fRec0[1] = fRec0[0];
77 }
78 #undef fslider0
79 }
80
81 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
82 {
83 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
84 }
85
86
87 void Dsp::connect(uint32_t port,void* data)
88 {
89 switch ((PortIndex)port)
90 {
91 case OUT_MASTER:
92 fslider0_ = (float*)data; // , 0.0, -5e+01, 4.0, 0.1
93 break;
94 default:
95 break;
96 }
97 }
98
99 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
100 {
101 static_cast<Dsp*>(p)->connect(port, data);
102 }
103
104
105 PluginLV2 *plugin() {
106 return new Dsp();
107 }
108
109 void Dsp::del_instance(PluginLV2 *p)
110 {
111 delete static_cast<Dsp*>(p);
112 }
113
114 /*
115 typedef enum
116 {
117 OUT_MASTER,
118 } PortIndex;
119 */
120
121 } // end namespace gx_outputlevel
0 // generated from file '../src/LV2/faust/gx_outputlevel_ladspa.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_outputlevel_ladspa {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fRec0[2];
14 void connect(uint32_t port,void* data);
15 void clear_state_f();
16 void init(uint32_t samplingFreq);
17 void compute(int count, float *input0, float *input1, float *output0, float *output1);
18
19 static void clear_state_f_static(PluginLV2*);
20 static void init_static(uint32_t samplingFreq, PluginLV2*);
21 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
22 static void del_instance(PluginLV2 *p);
23 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
24 public:
25 Dsp();
26 ~Dsp();
27 };
28
29
30
31 static const char* parm_groups[] = {
32 ".amp", N_("?"),
33 0
34 };
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "gx_outputlevel_ladspa";
40 name = "?gx_outputlevel_ladspa";
41 mono_audio = 0;
42 stereo_audio = compute_static;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<2; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 clear_state_f();
67 }
68
69 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
70 {
71 static_cast<Dsp*>(p)->init(samplingFreq);
72 }
73
74 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
75 {
76 #define fslider0 (*fslider0_)
77 #define fslider1 (*fslider1_)
78 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * (fslider1 + fslider0))));
79 for (int i=0; i<count; i++) {
80 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
81 output0[i] = (FAUSTFLOAT)((double)input0[i] * fRec0[0]);
82 output1[i] = (FAUSTFLOAT)((double)input1[i] * fRec0[0]);
83 // post processing
84 fRec0[1] = fRec0[0];
85 }
86 #undef fslider0
87 #undef fslider1
88 }
89
90 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
91 {
92 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
93 }
94
95
96 void Dsp::connect(uint32_t port,void* data)
97 {
98 switch ((PortIndex)port)
99 {
100 case OUT_MASTER_LADSPA:
101 fslider1_ = (float*)data; // , 0.0, -2e+01, 2e+01, 0.1
102 break;
103 case OUT_MASTER:
104 fslider0_ = (float*)data; // , 0.0, -5e+01, 4.0, 0.1
105 break;
106 default:
107 break;
108 }
109 }
110
111 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
112 {
113 static_cast<Dsp*>(p)->connect(port, data);
114 }
115
116
117 PluginLV2 *plugin() {
118 return new Dsp();
119 }
120
121 void Dsp::del_instance(PluginLV2 *p)
122 {
123 delete static_cast<Dsp*>(p);
124 }
125
126 /*
127 typedef enum
128 {
129 OUT_MASTER_LADSPA,
130 OUT_MASTER,
131 } PortIndex;
132 */
133
134 } // end namespace gx_outputlevel_ladspa
0 // generated from file '../src/LV2/faust/gx_studiopre.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gx_studiopre {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 FAUSTFLOAT fslider0;
15 FAUSTFLOAT *fslider0_;
16 double fConst4;
17 FAUSTFLOAT fslider1;
18 FAUSTFLOAT *fslider1_;
19 FAUSTFLOAT fslider2;
20 FAUSTFLOAT *fslider2_;
21 double fConst5;
22 double fConst6;
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fVec0[2];
28 double fConst11;
29 double fRec6[2];
30 double fRec5[2];
31 double fConst12;
32 double fConst13;
33 double fRec4[2];
34 double fRec3[4];
35 FAUSTFLOAT fslider3;
36 FAUSTFLOAT *fslider3_;
37 FAUSTFLOAT fcheckbox0;
38 FAUSTFLOAT *fcheckbox0_;
39 double fVec1[2];
40 double fRec2[2];
41 double fVec2[2];
42 double fRec7[2];
43 double fRec1[2];
44 double fRec0[2];
45 void connect(uint32_t port,void* data);
46 void clear_state_f();
47 void init(uint32_t samplingFreq);
48 void compute(int count, float *input0, float *output0);
49
50 static void clear_state_f_static(PluginLV2*);
51 static void init_static(uint32_t samplingFreq, PluginLV2*);
52 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
53 static void del_instance(PluginLV2 *p);
54 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
55 public:
56 Dsp();
57 ~Dsp();
58 };
59
60
61
62 Dsp::Dsp()
63 : PluginLV2() {
64 version = PLUGINLV2_VERSION;
65 id = "gx_studiopre";
66 name = "?gx_studiopre";
67 mono_audio = compute_static;
68 stereo_audio = 0;
69 set_samplerate = init_static;
70 activate_plugin = 0;
71 connect_ports = connect_static;
72 clear_state = clear_state_f_static;
73 delete_instance = del_instance;
74 }
75
76 Dsp::~Dsp() {
77 }
78
79 inline void Dsp::clear_state_f()
80 {
81 for (int i=0; i<2; i++) fVec0[i] = 0;
82 for (int i=0; i<2; i++) fRec6[i] = 0;
83 for (int i=0; i<2; i++) fRec5[i] = 0;
84 for (int i=0; i<2; i++) fRec4[i] = 0;
85 for (int i=0; i<4; i++) fRec3[i] = 0;
86 for (int i=0; i<2; i++) fVec1[i] = 0;
87 for (int i=0; i<2; i++) fRec2[i] = 0;
88 for (int i=0; i<2; i++) fVec2[i] = 0;
89 for (int i=0; i<2; i++) fRec7[i] = 0;
90 for (int i=0; i<2; i++) fRec1[i] = 0;
91 for (int i=0; i<2; i++) fRec0[i] = 0;
92 }
93
94 void Dsp::clear_state_f_static(PluginLV2 *p)
95 {
96 static_cast<Dsp*>(p)->clear_state_f();
97 }
98
99 inline void Dsp::init(uint32_t samplingFreq)
100 {
101 fSamplingFreq = samplingFreq;
102 iConst0 = min(192000, max(1, fSamplingFreq));
103 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
104 fConst2 = (1 + fConst1);
105 fConst3 = (0 - ((1 - fConst1) / fConst2));
106 fConst4 = (41887.90204786391 / iConst0);
107 fConst5 = (2 * double(iConst0));
108 fConst6 = faustpower<2>(fConst5);
109 fConst7 = (3 * fConst5);
110 fConst8 = (1.0 / tan((6.5973445725385655 / iConst0)));
111 fConst9 = (1 + fConst8);
112 fConst10 = (0 - ((1 - fConst8) / fConst9));
113 fConst11 = (1.0 / fConst9);
114 fConst12 = (0 - fConst1);
115 fConst13 = (0.025 / fConst2);
116 clear_state_f();
117 }
118
119 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
120 {
121 static_cast<Dsp*>(p)->init(samplingFreq);
122 }
123
124 inline void Dsp::compute(int count, float *input0, float *output0)
125 {
126 #define fslider0 (*fslider0_)
127 #define fslider1 (*fslider1_)
128 #define fslider2 (*fslider2_)
129 #define fslider3 (*fslider3_)
130 #define fcheckbox0 (*fcheckbox0_)
131 double fSlow0 = fslider0;
132 double fSlow1 = tan((fConst4 / (1.0 + fSlow0)));
133 double fSlow2 = (1.0 / fSlow1);
134 double fSlow3 = (1 + fSlow2);
135 double fSlow4 = (0 - ((1 - fSlow2) / fSlow3));
136 double fSlow5 = fslider1;
137 double fSlow6 = (4.7117500000000004e-07 * fSlow5);
138 double fSlow7 = exp((3.4 * (fslider2 - 1)));
139 double fSlow8 = (5.718000000000001e-06 + ((0.00011998125000000002 * fSlow7) + (fSlow5 * (((1.1779375000000001e-05 * fSlow7) - 4.199450000000001e-06) - fSlow6))));
140 double fSlow9 = ((1.0281250000000001e-09 * fSlow7) - (4.1125e-11 * fSlow5));
141 double fSlow10 = (7.343750000000001e-09 * fSlow7);
142 double fSlow11 = (2.9375e-10 + (fSlow10 + (fSlow5 * (fSlow9 - 2.52625e-10))));
143 double fSlow12 = (fConst5 * fSlow11);
144 double fSlow13 = (0.00047000000000000004 * fSlow5);
145 double fSlow14 = (0.0250625 * fSlow7);
146 double fSlow15 = (fConst5 * (0.015765 + (fSlow14 + fSlow13)));
147 double fSlow16 = ((fSlow15 + (fConst6 * (fSlow12 - fSlow8))) - 1);
148 double fSlow17 = (fConst7 * fSlow11);
149 double fSlow18 = ((fConst6 * (fSlow8 + fSlow17)) - (3 + fSlow15));
150 double fSlow19 = ((fSlow15 + (fConst6 * (fSlow8 - fSlow17))) - 3);
151 double fSlow20 = (0 - (1 + (fSlow15 + (fConst6 * (fSlow8 + fSlow12)))));
152 double fSlow21 = (1.0 / fSlow20);
153 double fSlow22 = fslider3;
154 double fSlow23 = ((fSlow5 * (4.1125e-11 + fSlow9)) + (fSlow22 * (fSlow10 + (2.9375e-10 - (2.9375e-10 * fSlow5)))));
155 double fSlow24 = (fConst7 * fSlow23);
156 double fSlow25 = (9.925e-08 + (((9.187500000000001e-07 * fSlow22) + (fSlow5 * (5.0055e-07 - fSlow6))) + (fSlow7 * (2.48125e-06 + (1.1779375000000001e-05 * fSlow5)))));
157 double fSlow26 = (0.0010025 + (fSlow14 + (fSlow13 + (6.25e-05 * fSlow22))));
158 double fSlow27 = (fConst5 * fSlow26);
159 double fSlow28 = (fSlow27 + (fConst6 * (fSlow25 - fSlow24)));
160 double fSlow29 = (fConst5 * fSlow23);
161 double fSlow30 = (fSlow27 + (fConst6 * (fSlow29 - fSlow25)));
162 double fSlow31 = (fConst5 * (0 - fSlow26));
163 double fSlow32 = (fSlow31 + (fConst6 * (fSlow25 + fSlow24)));
164 double fSlow33 = (fSlow31 - (fConst6 * (fSlow25 + fSlow29)));
165 double fSlow34 = fcheckbox0;
166 double fSlow35 = (fSlow34 / (fSlow1 * fSlow20));
167 double fSlow36 = (fSlow34 / fSlow20);
168 double fSlow37 = (0 - fSlow2);
169 double fSlow38 = (1.0 / fSlow3);
170 double fSlow39 = (0.1 * (fSlow0 / fSlow20));
171 for (int i=0; i<count; i++) {
172 double fTemp0 = (1e-15 + (0.015 * fRec5[1]));
173 fVec0[0] = fTemp0;
174 fRec6[0] = ((fConst11 * (fVec0[0] + fVec0[1])) + (fConst10 * fRec6[1]));
175 fRec5[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec6[0]) - 1.204540999999999)) - 169.69726666666665);
176 fRec4[0] = ((fConst13 * ((fConst12 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
177 fRec3[0] = ((10 * fRec4[0]) - (fSlow21 * (((fSlow19 * fRec3[2]) + (fSlow18 * fRec3[1])) + (fSlow16 * fRec3[3]))));
178 double fTemp1 = ((fSlow33 * fRec3[0]) + ((fSlow32 * fRec3[1]) + ((fSlow30 * fRec3[3]) + (fSlow28 * fRec3[2]))));
179 fVec1[0] = (fSlow36 * fTemp1);
180 fRec2[0] = ((fSlow38 * ((fSlow37 * fVec1[1]) + (fSlow35 * fTemp1))) + (fSlow4 * fRec2[1]));
181 double fTemp2 = (1e-15 + (0.015 * fRec1[1]));
182 fVec2[0] = fTemp2;
183 fRec7[0] = ((fConst11 * (fVec2[0] + fVec2[1])) + (fConst10 * fRec7[1]));
184 fRec1[0] = (Ftube(TUBE_TABLE_12AX7_250k, (((fSlow39 * fTemp1) + (fRec7[0] + fRec2[0])) - 1.204284999999999)) - 169.71433333333334);
185 fRec0[0] = ((fConst13 * ((fConst12 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
186 output0[i] = (FAUSTFLOAT)fRec0[0];
187 // post processing
188 fRec0[1] = fRec0[0];
189 fRec1[1] = fRec1[0];
190 fRec7[1] = fRec7[0];
191 fVec2[1] = fVec2[0];
192 fRec2[1] = fRec2[0];
193 fVec1[1] = fVec1[0];
194 for (int i=3; i>0; i--) fRec3[i] = fRec3[i-1];
195 fRec4[1] = fRec4[0];
196 fRec5[1] = fRec5[0];
197 fRec6[1] = fRec6[0];
198 fVec0[1] = fVec0[0];
199 }
200 #undef fslider0
201 #undef fslider1
202 #undef fslider2
203 #undef fslider3
204 #undef fcheckbox0
205 }
206
207 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
208 {
209 static_cast<Dsp*>(p)->compute(count, input0, output0);
210 }
211
212
213 void Dsp::connect(uint32_t port,void* data)
214 {
215 switch ((PortIndex)port)
216 {
217 case BRIGHT_L:
218 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
219 break;
220 case TREBLE_L:
221 fslider3_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
222 break;
223 case BASS_L:
224 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
225 break;
226 case MIDDLE_L:
227 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
228 break;
229 case VOLUME_L:
230 fslider0_ = (float*)data; // , 5.0, 0.0, 1e+01, 0.1
231 break;
232 default:
233 break;
234 }
235 }
236
237 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
238 {
239 static_cast<Dsp*>(p)->connect(port, data);
240 }
241
242
243 PluginLV2 *plugin() {
244 return new Dsp();
245 }
246
247 void Dsp::del_instance(PluginLV2 *p)
248 {
249 delete static_cast<Dsp*>(p);
250 }
251
252 /*
253 typedef enum
254 {
255 BRIGHT_L,
256 TREBLE_L,
257 BASS_L,
258 MIDDLE_L,
259 VOLUME_L,
260 } PortIndex;
261 */
262
263 } // end namespace gx_studiopre
0 // generated from file '../src/LV2/faust/gx_studiopre_st.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gx_studiopre_st {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 FAUSTFLOAT fslider0;
15 FAUSTFLOAT *fslider0_;
16 double fConst4;
17 FAUSTFLOAT fslider1;
18 FAUSTFLOAT *fslider1_;
19 FAUSTFLOAT fslider2;
20 FAUSTFLOAT *fslider2_;
21 double fConst5;
22 double fConst6;
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fVec0[2];
28 double fConst11;
29 double fRec6[2];
30 double fRec5[2];
31 double fConst12;
32 double fConst13;
33 double fRec4[2];
34 double fRec3[4];
35 FAUSTFLOAT fslider3;
36 FAUSTFLOAT *fslider3_;
37 FAUSTFLOAT fcheckbox0;
38 FAUSTFLOAT *fcheckbox0_;
39 double fVec1[2];
40 double fRec2[2];
41 double fVec2[2];
42 double fRec7[2];
43 double fRec1[2];
44 double fRec0[2];
45 FAUSTFLOAT fslider4;
46 FAUSTFLOAT *fslider4_;
47 FAUSTFLOAT fslider5;
48 FAUSTFLOAT *fslider5_;
49 FAUSTFLOAT fslider6;
50 FAUSTFLOAT *fslider6_;
51 double fVec3[2];
52 double fRec14[2];
53 double fRec13[2];
54 double fRec12[2];
55 double fRec11[4];
56 FAUSTFLOAT fslider7;
57 FAUSTFLOAT *fslider7_;
58 FAUSTFLOAT fcheckbox1;
59 FAUSTFLOAT *fcheckbox1_;
60 double fVec4[2];
61 double fRec10[2];
62 double fVec5[2];
63 double fRec15[2];
64 double fRec9[2];
65 double fRec8[2];
66 void connect(uint32_t port,void* data);
67 void clear_state_f();
68 void init(uint32_t samplingFreq);
69 void compute(int count, float *input0, float *input1, float *output0, float *output1);
70
71 static void clear_state_f_static(PluginLV2*);
72 static void init_static(uint32_t samplingFreq, PluginLV2*);
73 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
74 static void del_instance(PluginLV2 *p);
75 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
76 public:
77 Dsp();
78 ~Dsp();
79 };
80
81
82
83 Dsp::Dsp()
84 : PluginLV2() {
85 version = PLUGINLV2_VERSION;
86 id = "gx_studiopre_st";
87 name = "?gx_studiopre_st";
88 mono_audio = 0;
89 stereo_audio = compute_static;
90 set_samplerate = init_static;
91 activate_plugin = 0;
92 connect_ports = connect_static;
93 clear_state = clear_state_f_static;
94 delete_instance = del_instance;
95 }
96
97 Dsp::~Dsp() {
98 }
99
100 inline void Dsp::clear_state_f()
101 {
102 for (int i=0; i<2; i++) fVec0[i] = 0;
103 for (int i=0; i<2; i++) fRec6[i] = 0;
104 for (int i=0; i<2; i++) fRec5[i] = 0;
105 for (int i=0; i<2; i++) fRec4[i] = 0;
106 for (int i=0; i<4; i++) fRec3[i] = 0;
107 for (int i=0; i<2; i++) fVec1[i] = 0;
108 for (int i=0; i<2; i++) fRec2[i] = 0;
109 for (int i=0; i<2; i++) fVec2[i] = 0;
110 for (int i=0; i<2; i++) fRec7[i] = 0;
111 for (int i=0; i<2; i++) fRec1[i] = 0;
112 for (int i=0; i<2; i++) fRec0[i] = 0;
113 for (int i=0; i<2; i++) fVec3[i] = 0;
114 for (int i=0; i<2; i++) fRec14[i] = 0;
115 for (int i=0; i<2; i++) fRec13[i] = 0;
116 for (int i=0; i<2; i++) fRec12[i] = 0;
117 for (int i=0; i<4; i++) fRec11[i] = 0;
118 for (int i=0; i<2; i++) fVec4[i] = 0;
119 for (int i=0; i<2; i++) fRec10[i] = 0;
120 for (int i=0; i<2; i++) fVec5[i] = 0;
121 for (int i=0; i<2; i++) fRec15[i] = 0;
122 for (int i=0; i<2; i++) fRec9[i] = 0;
123 for (int i=0; i<2; i++) fRec8[i] = 0;
124 }
125
126 void Dsp::clear_state_f_static(PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->clear_state_f();
129 }
130
131 inline void Dsp::init(uint32_t samplingFreq)
132 {
133 fSamplingFreq = samplingFreq;
134 iConst0 = min(192000, max(1, fSamplingFreq));
135 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
136 fConst2 = (1 + fConst1);
137 fConst3 = (0 - ((1 - fConst1) / fConst2));
138 fConst4 = (41887.90204786391 / iConst0);
139 fConst5 = (2 * double(iConst0));
140 fConst6 = faustpower<2>(fConst5);
141 fConst7 = (3 * fConst5);
142 fConst8 = (1.0 / tan((6.5973445725385655 / iConst0)));
143 fConst9 = (1 + fConst8);
144 fConst10 = (0 - ((1 - fConst8) / fConst9));
145 fConst11 = (1.0 / fConst9);
146 fConst12 = (0 - fConst1);
147 fConst13 = (0.025 / fConst2);
148 clear_state_f();
149 }
150
151 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
152 {
153 static_cast<Dsp*>(p)->init(samplingFreq);
154 }
155
156 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
157 {
158 #define fslider0 (*fslider0_)
159 #define fslider1 (*fslider1_)
160 #define fslider2 (*fslider2_)
161 #define fslider3 (*fslider3_)
162 #define fcheckbox0 (*fcheckbox0_)
163 #define fslider4 (*fslider4_)
164 #define fslider5 (*fslider5_)
165 #define fslider6 (*fslider6_)
166 #define fslider7 (*fslider7_)
167 #define fcheckbox1 (*fcheckbox1_)
168 double fSlow0 = fslider0;
169 double fSlow1 = tan((fConst4 / (1.0 + fSlow0)));
170 double fSlow2 = (1.0 / fSlow1);
171 double fSlow3 = (1 + fSlow2);
172 double fSlow4 = (0 - ((1 - fSlow2) / fSlow3));
173 double fSlow5 = fslider1;
174 double fSlow6 = (4.7117500000000004e-07 * fSlow5);
175 double fSlow7 = exp((3.4 * (fslider2 - 1)));
176 double fSlow8 = (5.718000000000001e-06 + ((0.00011998125000000002 * fSlow7) + (fSlow5 * (((1.1779375000000001e-05 * fSlow7) - 4.199450000000001e-06) - fSlow6))));
177 double fSlow9 = ((1.0281250000000001e-09 * fSlow7) - (4.1125e-11 * fSlow5));
178 double fSlow10 = (7.343750000000001e-09 * fSlow7);
179 double fSlow11 = (2.9375e-10 + (fSlow10 + (fSlow5 * (fSlow9 - 2.52625e-10))));
180 double fSlow12 = (fConst5 * fSlow11);
181 double fSlow13 = (0.00047000000000000004 * fSlow5);
182 double fSlow14 = (0.0250625 * fSlow7);
183 double fSlow15 = (fConst5 * (0.015765 + (fSlow14 + fSlow13)));
184 double fSlow16 = ((fSlow15 + (fConst6 * (fSlow12 - fSlow8))) - 1);
185 double fSlow17 = (fConst7 * fSlow11);
186 double fSlow18 = ((fConst6 * (fSlow8 + fSlow17)) - (3 + fSlow15));
187 double fSlow19 = ((fSlow15 + (fConst6 * (fSlow8 - fSlow17))) - 3);
188 double fSlow20 = (0 - (1 + (fSlow15 + (fConst6 * (fSlow8 + fSlow12)))));
189 double fSlow21 = (1.0 / fSlow20);
190 double fSlow22 = fslider3;
191 double fSlow23 = ((fSlow5 * (4.1125e-11 + fSlow9)) + (fSlow22 * (fSlow10 + (2.9375e-10 - (2.9375e-10 * fSlow5)))));
192 double fSlow24 = (fConst7 * fSlow23);
193 double fSlow25 = (9.925e-08 + (((9.187500000000001e-07 * fSlow22) + (fSlow5 * (5.0055e-07 - fSlow6))) + (fSlow7 * (2.48125e-06 + (1.1779375000000001e-05 * fSlow5)))));
194 double fSlow26 = (0.0010025 + (fSlow14 + (fSlow13 + (6.25e-05 * fSlow22))));
195 double fSlow27 = (fConst5 * fSlow26);
196 double fSlow28 = (fSlow27 + (fConst6 * (fSlow25 - fSlow24)));
197 double fSlow29 = (fConst5 * fSlow23);
198 double fSlow30 = (fSlow27 + (fConst6 * (fSlow29 - fSlow25)));
199 double fSlow31 = (fConst5 * (0 - fSlow26));
200 double fSlow32 = (fSlow31 + (fConst6 * (fSlow25 + fSlow24)));
201 double fSlow33 = (fSlow31 - (fConst6 * (fSlow25 + fSlow29)));
202 double fSlow34 = fcheckbox0;
203 double fSlow35 = (fSlow34 / (fSlow1 * fSlow20));
204 double fSlow36 = (fSlow34 / fSlow20);
205 double fSlow37 = (0 - fSlow2);
206 double fSlow38 = (1.0 / fSlow3);
207 double fSlow39 = (0.1 * (fSlow0 / fSlow20));
208 double fSlow40 = fslider4;
209 double fSlow41 = tan((fConst4 / (1.0 + fSlow40)));
210 double fSlow42 = (1.0 / fSlow41);
211 double fSlow43 = (1 + fSlow42);
212 double fSlow44 = (0 - ((1 - fSlow42) / fSlow43));
213 double fSlow45 = fslider5;
214 double fSlow46 = (4.7117500000000004e-07 * fSlow45);
215 double fSlow47 = exp((3.4 * (fslider6 - 1)));
216 double fSlow48 = (5.718000000000001e-06 + ((0.00011998125000000002 * fSlow47) + (fSlow45 * (((1.1779375000000001e-05 * fSlow47) - 4.199450000000001e-06) - fSlow46))));
217 double fSlow49 = ((1.0281250000000001e-09 * fSlow47) - (4.1125e-11 * fSlow45));
218 double fSlow50 = (7.343750000000001e-09 * fSlow47);
219 double fSlow51 = (2.9375e-10 + (fSlow50 + (fSlow45 * (fSlow49 - 2.52625e-10))));
220 double fSlow52 = (fConst5 * fSlow51);
221 double fSlow53 = (0.00047000000000000004 * fSlow45);
222 double fSlow54 = (0.0250625 * fSlow47);
223 double fSlow55 = (fConst5 * (0.015765 + (fSlow54 + fSlow53)));
224 double fSlow56 = ((fSlow55 + (fConst6 * (fSlow52 - fSlow48))) - 1);
225 double fSlow57 = (fConst7 * fSlow51);
226 double fSlow58 = ((fConst6 * (fSlow48 + fSlow57)) - (3 + fSlow55));
227 double fSlow59 = ((fSlow55 + (fConst6 * (fSlow48 - fSlow57))) - 3);
228 double fSlow60 = (0 - (1 + (fSlow55 + (fConst6 * (fSlow48 + fSlow52)))));
229 double fSlow61 = (1.0 / fSlow60);
230 double fSlow62 = fslider7;
231 double fSlow63 = ((fSlow45 * (4.1125e-11 + fSlow49)) + (fSlow62 * (fSlow50 + (2.9375e-10 - (2.9375e-10 * fSlow45)))));
232 double fSlow64 = (fConst7 * fSlow63);
233 double fSlow65 = (9.925e-08 + (((9.187500000000001e-07 * fSlow62) + (fSlow45 * (5.0055e-07 - fSlow46))) + (fSlow47 * (2.48125e-06 + (1.1779375000000001e-05 * fSlow45)))));
234 double fSlow66 = (0.0010025 + (fSlow54 + (fSlow53 + (6.25e-05 * fSlow62))));
235 double fSlow67 = (fConst5 * fSlow66);
236 double fSlow68 = (fSlow67 + (fConst6 * (fSlow65 - fSlow64)));
237 double fSlow69 = (fConst5 * fSlow63);
238 double fSlow70 = (fSlow67 + (fConst6 * (fSlow69 - fSlow65)));
239 double fSlow71 = (fConst5 * (0 - fSlow66));
240 double fSlow72 = (fSlow71 + (fConst6 * (fSlow65 + fSlow64)));
241 double fSlow73 = (fSlow71 - (fConst6 * (fSlow65 + fSlow69)));
242 double fSlow74 = fcheckbox1;
243 double fSlow75 = (fSlow74 / (fSlow41 * fSlow60));
244 double fSlow76 = (fSlow74 / fSlow60);
245 double fSlow77 = (0 - fSlow42);
246 double fSlow78 = (1.0 / fSlow43);
247 double fSlow79 = (0.1 * (fSlow40 / fSlow60));
248 for (int i=0; i<count; i++) {
249 double fTemp0 = (1e-15 + (0.015 * fRec5[1]));
250 fVec0[0] = fTemp0;
251 fRec6[0] = ((fConst11 * (fVec0[0] + fVec0[1])) + (fConst10 * fRec6[1]));
252 fRec5[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec6[0]) - 1.204540999999999)) - 169.69726666666665);
253 fRec4[0] = ((fConst13 * ((fConst12 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
254 fRec3[0] = ((10 * fRec4[0]) - (fSlow21 * (((fSlow19 * fRec3[2]) + (fSlow18 * fRec3[1])) + (fSlow16 * fRec3[3]))));
255 double fTemp1 = ((fSlow33 * fRec3[0]) + ((fSlow32 * fRec3[1]) + ((fSlow30 * fRec3[3]) + (fSlow28 * fRec3[2]))));
256 fVec1[0] = (fSlow36 * fTemp1);
257 fRec2[0] = ((fSlow38 * ((fSlow37 * fVec1[1]) + (fSlow35 * fTemp1))) + (fSlow4 * fRec2[1]));
258 double fTemp2 = (1e-15 + (0.015 * fRec1[1]));
259 fVec2[0] = fTemp2;
260 fRec7[0] = ((fConst11 * (fVec2[0] + fVec2[1])) + (fConst10 * fRec7[1]));
261 fRec1[0] = (Ftube(TUBE_TABLE_12AX7_250k, (((fSlow39 * fTemp1) + (fRec7[0] + fRec2[0])) - 1.204284999999999)) - 169.71433333333334);
262 fRec0[0] = ((fConst13 * ((fConst12 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
263 output0[i] = (FAUSTFLOAT)fRec0[0];
264 double fTemp3 = (1e-15 + (0.015 * fRec13[1]));
265 fVec3[0] = fTemp3;
266 fRec14[0] = ((fConst11 * (fVec3[0] + fVec3[1])) + (fConst10 * fRec14[1]));
267 fRec13[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input1[i] + fRec14[0]) - 1.204540999999999)) - 169.69726666666665);
268 fRec12[0] = ((fConst13 * ((fConst12 * fRec13[1]) + (fConst1 * fRec13[0]))) + (fConst3 * fRec12[1]));
269 fRec11[0] = ((10 * fRec12[0]) - (fSlow61 * (((fSlow59 * fRec11[2]) + (fSlow58 * fRec11[1])) + (fSlow56 * fRec11[3]))));
270 double fTemp4 = ((fSlow73 * fRec11[0]) + ((fSlow72 * fRec11[1]) + ((fSlow70 * fRec11[3]) + (fSlow68 * fRec11[2]))));
271 fVec4[0] = (fSlow76 * fTemp4);
272 fRec10[0] = ((fSlow78 * ((fSlow77 * fVec4[1]) + (fSlow75 * fTemp4))) + (fSlow44 * fRec10[1]));
273 double fTemp5 = (1e-15 + (0.015 * fRec9[1]));
274 fVec5[0] = fTemp5;
275 fRec15[0] = ((fConst11 * (fVec5[0] + fVec5[1])) + (fConst10 * fRec15[1]));
276 fRec9[0] = (Ftube(TUBE_TABLE_12AX7_250k, (((fSlow79 * fTemp4) + (fRec15[0] + fRec10[0])) - 1.204284999999999)) - 169.71433333333334);
277 fRec8[0] = ((fConst13 * ((fConst12 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
278 output1[i] = (FAUSTFLOAT)fRec8[0];
279 // post processing
280 fRec8[1] = fRec8[0];
281 fRec9[1] = fRec9[0];
282 fRec15[1] = fRec15[0];
283 fVec5[1] = fVec5[0];
284 fRec10[1] = fRec10[0];
285 fVec4[1] = fVec4[0];
286 for (int i=3; i>0; i--) fRec11[i] = fRec11[i-1];
287 fRec12[1] = fRec12[0];
288 fRec13[1] = fRec13[0];
289 fRec14[1] = fRec14[0];
290 fVec3[1] = fVec3[0];
291 fRec0[1] = fRec0[0];
292 fRec1[1] = fRec1[0];
293 fRec7[1] = fRec7[0];
294 fVec2[1] = fVec2[0];
295 fRec2[1] = fRec2[0];
296 fVec1[1] = fVec1[0];
297 for (int i=3; i>0; i--) fRec3[i] = fRec3[i-1];
298 fRec4[1] = fRec4[0];
299 fRec5[1] = fRec5[0];
300 fRec6[1] = fRec6[0];
301 fVec0[1] = fVec0[0];
302 }
303 #undef fslider0
304 #undef fslider1
305 #undef fslider2
306 #undef fslider3
307 #undef fcheckbox0
308 #undef fslider4
309 #undef fslider5
310 #undef fslider6
311 #undef fslider7
312 #undef fcheckbox1
313 }
314
315 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
316 {
317 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
318 }
319
320
321 void Dsp::connect(uint32_t port,void* data)
322 {
323 switch ((PortIndex)port)
324 {
325 case BRIGHT_R:
326 fcheckbox1_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
327 break;
328 case BRIGHT_L:
329 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
330 break;
331 case TREBLE_R:
332 fslider7_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
333 break;
334 case BASS_R:
335 fslider6_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
336 break;
337 case MIDDLE_R:
338 fslider5_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
339 break;
340 case VOLUME_R:
341 fslider4_ = (float*)data; // , 5.0, 0.0, 1e+01, 0.1
342 break;
343 case TREBLE_L:
344 fslider3_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
345 break;
346 case BASS_L:
347 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
348 break;
349 case MIDDLE_L:
350 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
351 break;
352 case VOLUME_L:
353 fslider0_ = (float*)data; // , 5.0, 0.0, 1e+01, 0.1
354 break;
355 default:
356 break;
357 }
358 }
359
360 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
361 {
362 static_cast<Dsp*>(p)->connect(port, data);
363 }
364
365
366 PluginLV2 *plugin() {
367 return new Dsp();
368 }
369
370 void Dsp::del_instance(PluginLV2 *p)
371 {
372 delete static_cast<Dsp*>(p);
373 }
374
375 /*
376 typedef enum
377 {
378 BRIGHT_R,
379 BRIGHT_L,
380 TREBLE_R,
381 BASS_R,
382 MIDDLE_R,
383 VOLUME_R,
384 TREBLE_L,
385 BASS_L,
386 MIDDLE_L,
387 VOLUME_L,
388 } PortIndex;
389 */
390
391 } // end namespace gx_studiopre_st
0 // generated from file '../src/LV2/faust/gx_vibrochump.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gx_vibrochump {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iVec0[2];
11 int iConst0;
12 double fConst1;
13 double fConst2;
14 double fConst3;
15 double fConst4;
16 double fConst5;
17 double fConst6;
18 double fConst7;
19 double fConst8;
20 double fConst9;
21 double fConst10;
22 double fConst11;
23 FAUSTFLOAT fslider0;
24 FAUSTFLOAT *fslider0_;
25 double fConst12;
26 int iRec7[2];
27 int iRec6[2];
28 double fConst13;
29 double fRec10[2];
30 double fRec9[2];
31 double fRec8[2];
32 FAUSTFLOAT fcheckbox0;
33 FAUSTFLOAT *fcheckbox0_;
34 FAUSTFLOAT fslider1;
35 FAUSTFLOAT *fslider1_;
36 double fRec5[2];
37 FAUSTFLOAT fslider2;
38 FAUSTFLOAT *fslider2_;
39 double fRec12[2];
40 double fConst14;
41 double fConst15;
42 double fConst16;
43 double fConst17;
44 double fConst18;
45 FAUSTFLOAT fcheckbox1;
46 FAUSTFLOAT *fcheckbox1_;
47 double fVec1[2];
48 double fConst19;
49 double fConst20;
50 double fRec17[2];
51 double fRec16[3];
52 double fConst21;
53 double fConst22;
54 double fConst23;
55 double fConst24;
56 double fConst25;
57 double fConst26;
58 double fConst27;
59 double fConst28;
60 double fVec2[2];
61 double fConst29;
62 double fRec21[2];
63 double fRec20[2];
64 double fConst30;
65 double fConst31;
66 double fRec19[2];
67 double fConst32;
68 double fConst33;
69 double fRec18[2];
70 FAUSTFLOAT fslider3;
71 FAUSTFLOAT *fslider3_;
72 double fConst34;
73 double fConst35;
74 double fConst36;
75 double fConst37;
76 double fRec22[2];
77 FAUSTFLOAT fslider4;
78 FAUSTFLOAT *fslider4_;
79 double fRec23[2];
80 double fVec3[2];
81 double fRec15[2];
82 double fConst38;
83 double fConst39;
84 double fConst40;
85 double fVec4[2];
86 double fConst41;
87 double fRec24[2];
88 double fRec14[2];
89 double fRec13[2];
90 double fVec5[2];
91 double fRec11[2];
92 double fVec6[2];
93 double fConst42;
94 double fRec25[2];
95 double fRec4[2];
96 double fRec3[2];
97 double fConst43;
98 double fRec2[2];
99 double fConst44;
100 double fRec1[2];
101 double fRec0[2];
102 void connect(uint32_t port,void* data);
103 void clear_state_f();
104 void init(uint32_t samplingFreq);
105 void compute(int count, float *input0, float *output0);
106
107 static void clear_state_f_static(PluginLV2*);
108 static void init_static(uint32_t samplingFreq, PluginLV2*);
109 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
110 static void del_instance(PluginLV2 *p);
111 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
112 public:
113 Dsp();
114 ~Dsp();
115 };
116
117
118
119 Dsp::Dsp()
120 : PluginLV2() {
121 version = PLUGINLV2_VERSION;
122 id = "Redeye Vibro Chump";
123 name = N_("Redeye Vibro Chumo");
124 mono_audio = compute_static;
125 stereo_audio = 0;
126 set_samplerate = init_static;
127 activate_plugin = 0;
128 connect_ports = connect_static;
129 clear_state = clear_state_f_static;
130 delete_instance = del_instance;
131 }
132
133 Dsp::~Dsp() {
134 }
135
136 inline void Dsp::clear_state_f()
137 {
138 for (int i=0; i<2; i++) iVec0[i] = 0;
139 for (int i=0; i<2; i++) iRec7[i] = 0;
140 for (int i=0; i<2; i++) iRec6[i] = 0;
141 for (int i=0; i<2; i++) fRec10[i] = 0;
142 for (int i=0; i<2; i++) fRec9[i] = 0;
143 for (int i=0; i<2; i++) fRec8[i] = 0;
144 for (int i=0; i<2; i++) fRec5[i] = 0;
145 for (int i=0; i<2; i++) fRec12[i] = 0;
146 for (int i=0; i<2; i++) fVec1[i] = 0;
147 for (int i=0; i<2; i++) fRec17[i] = 0;
148 for (int i=0; i<3; i++) fRec16[i] = 0;
149 for (int i=0; i<2; i++) fVec2[i] = 0;
150 for (int i=0; i<2; i++) fRec21[i] = 0;
151 for (int i=0; i<2; i++) fRec20[i] = 0;
152 for (int i=0; i<2; i++) fRec19[i] = 0;
153 for (int i=0; i<2; i++) fRec18[i] = 0;
154 for (int i=0; i<2; i++) fRec22[i] = 0;
155 for (int i=0; i<2; i++) fRec23[i] = 0;
156 for (int i=0; i<2; i++) fVec3[i] = 0;
157 for (int i=0; i<2; i++) fRec15[i] = 0;
158 for (int i=0; i<2; i++) fVec4[i] = 0;
159 for (int i=0; i<2; i++) fRec24[i] = 0;
160 for (int i=0; i<2; i++) fRec14[i] = 0;
161 for (int i=0; i<2; i++) fRec13[i] = 0;
162 for (int i=0; i<2; i++) fVec5[i] = 0;
163 for (int i=0; i<2; i++) fRec11[i] = 0;
164 for (int i=0; i<2; i++) fVec6[i] = 0;
165 for (int i=0; i<2; i++) fRec25[i] = 0;
166 for (int i=0; i<2; i++) fRec4[i] = 0;
167 for (int i=0; i<2; i++) fRec3[i] = 0;
168 for (int i=0; i<2; i++) fRec2[i] = 0;
169 for (int i=0; i<2; i++) fRec1[i] = 0;
170 for (int i=0; i<2; i++) fRec0[i] = 0;
171 }
172
173 void Dsp::clear_state_f_static(PluginLV2 *p)
174 {
175 static_cast<Dsp*>(p)->clear_state_f();
176 }
177
178 inline void Dsp::init(uint32_t samplingFreq)
179 {
180 fSamplingFreq = samplingFreq;
181 iConst0 = min(192000, max(1, fSamplingFreq));
182 fConst1 = (1.0 / tan((376.99111843077515 / iConst0)));
183 fConst2 = (1 + fConst1);
184 fConst3 = (0 - ((1 - fConst1) / fConst2));
185 fConst4 = tan((20517.741620594938 / iConst0));
186 fConst5 = (1.0 / fConst4);
187 fConst6 = (1 + fConst5);
188 fConst7 = (0 - ((1 - fConst5) / fConst6));
189 fConst8 = (1.0 / tan((97.38937226128358 / iConst0)));
190 fConst9 = (1 + fConst8);
191 fConst10 = (0 - ((1 - fConst8) / fConst9));
192 fConst11 = (1.0 / iConst0);
193 fConst12 = (0.5 * iConst0);
194 fConst13 = (6.283185307179586 / iConst0);
195 fConst14 = (1.0 / faustpower<2>(fConst4));
196 fConst15 = (2 * (1 - fConst14));
197 fConst16 = (1 + ((fConst5 - 1.0000000000000004) / fConst4));
198 fConst17 = (1 + ((fConst5 + 1.0000000000000004) / fConst4));
199 fConst18 = (1.0 / fConst17);
200 fConst19 = (0 - fConst5);
201 fConst20 = (1.0 / fConst6);
202 fConst21 = (2 * (0 - fConst14));
203 fConst22 = (0.4125375446227544 / fConst17);
204 fConst23 = (1.0 / tan((5830.795965062656 / iConst0)));
205 fConst24 = (1 + fConst23);
206 fConst25 = (0 - ((1 - fConst23) / fConst24));
207 fConst26 = (1.0 / tan((270.1769682087222 / iConst0)));
208 fConst27 = (1 + fConst26);
209 fConst28 = (0 - ((1 - fConst26) / fConst27));
210 fConst29 = (1.0 / fConst27);
211 fConst30 = (0 - fConst8);
212 fConst31 = (0.025 / fConst9);
213 fConst32 = (0 - fConst23);
214 fConst33 = (1.0 / fConst24);
215 fConst34 = (1.0 / tan((1281.7698026646356 / iConst0)));
216 fConst35 = (1 + fConst34);
217 fConst36 = (0 - ((1 - fConst34) / fConst35));
218 fConst37 = (1.0 / fConst35);
219 fConst38 = (1.0 / tan((314.1592653589793 / iConst0)));
220 fConst39 = (1 + fConst38);
221 fConst40 = (0 - ((1 - fConst38) / fConst39));
222 fConst41 = (1.0 / fConst39);
223 fConst42 = (1.0 / fConst2);
224 fConst43 = (0.5 / fConst6);
225 fConst44 = (0 - fConst1);
226 clear_state_f();
227 }
228
229 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
230 {
231 static_cast<Dsp*>(p)->init(samplingFreq);
232 }
233
234 inline void Dsp::compute(int count, float *input0, float *output0)
235 {
236 #define fslider0 (*fslider0_)
237 #define fcheckbox0 (*fcheckbox0_)
238 #define fslider1 (*fslider1_)
239 #define fslider2 (*fslider2_)
240 #define fcheckbox1 (*fcheckbox1_)
241 #define fslider3 (*fslider3_)
242 #define fslider4 (*fslider4_)
243 double fSlow0 = fslider0;
244 int iSlow1 = int((fConst12 / double(fSlow0)));
245 double fSlow2 = (1.0 / iSlow1);
246 double fSlow3 = (fConst13 * fSlow0);
247 int iSlow4 = int(fcheckbox0);
248 double fSlow5 = fslider1;
249 double fSlow6 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
250 double fSlow7 = fcheckbox1;
251 double fSlow8 = (fConst5 * fSlow7);
252 double fSlow9 = fslider3;
253 double fSlow10 = (1 - fSlow9);
254 double fSlow11 = (0.0010000000000000009 * pow(10,(0.05 * fslider4)));
255 for (int i=0; i<count; i++) {
256 iVec0[0] = 1;
257 double fTemp0 = (fRec5[1] * (1 - (fConst11 / (fConst11 + (0.06 * exp((0 - (2.4849066497880004 * fRec5[1]))))))));
258 iRec7[0] = ((int((iRec7[1] > 0)))?((2 * (iRec6[1] < iSlow1)) - 1):(1 - (2 * (iRec6[1] > 0))));
259 iRec6[0] = (iRec7[0] + iRec6[1]);
260 fRec10[0] = ((fSlow3 * (0 - fRec8[1])) + fRec10[1]);
261 fRec9[0] = ((1 + ((fSlow3 * fRec10[0]) + fRec9[1])) - iVec0[1]);
262 fRec8[0] = fRec9[0];
263 fRec5[0] = (fTemp0 + (fConst11 * (pow((1 + (fSlow5 * ((0.1 * ((iSlow4)?max(0, (0.5 * (1 + fRec8[0]))):(fSlow2 * iRec6[0]))) - 0.1))),1.9) / (fConst11 + (0.06 * exp((0 - (2.4849066497880004 * fTemp0))))))));
264 fRec12[0] = (fSlow6 + (0.999 * fRec12[1]));
265 double fTemp1 = (fSlow7 * fRec0[1]);
266 fVec1[0] = fTemp1;
267 fRec17[0] = ((fConst20 * ((fConst19 * fVec1[1]) + (fSlow8 * fRec0[1]))) + (fConst7 * fRec17[1]));
268 fRec16[0] = (fRec17[0] - (fConst18 * ((fConst16 * fRec16[2]) + (fConst15 * fRec16[1]))));
269 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
270 fVec2[0] = fTemp2;
271 fRec21[0] = ((fConst29 * (fVec2[0] + fVec2[1])) + (fConst28 * fRec21[1]));
272 fRec20[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec21[0]) - 1.5816559999999988)) - 191.42014814814814);
273 fRec19[0] = ((fConst31 * ((fConst30 * fRec20[1]) + (fConst8 * fRec20[0]))) + (fConst10 * fRec19[1]));
274 fRec18[0] = ((fConst33 * ((fConst32 * fRec19[1]) + (fConst23 * fRec19[0]))) + (fConst25 * fRec18[1]));
275 fRec22[0] = ((fConst37 * (fRec19[0] + fRec19[1])) + (fConst36 * fRec22[1]));
276 fRec23[0] = (fSlow11 + (0.999 * fRec23[1]));
277 double fTemp3 = ((fRec23[0] * ((fSlow10 * fRec22[0]) + (fSlow9 * fRec18[0]))) - (0.5 * (fVec1[0] + (fConst22 * (((fConst14 * fRec16[0]) + (fConst21 * fRec16[1])) + (fConst14 * fRec16[2]))))));
278 fVec3[0] = fTemp3;
279 fRec15[0] = ((fConst20 * (fVec3[0] + fVec3[1])) + (fConst7 * fRec15[1]));
280 double fTemp4 = (1e-15 + (0.015 * fRec14[1]));
281 fVec4[0] = fTemp4;
282 fRec24[0] = ((fConst41 * (fVec4[0] + fVec4[1])) + (fConst40 * fRec24[1]));
283 fRec14[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec24[0] + fRec15[0]) - 1.204284999999999)) - 169.71433333333334);
284 fRec13[0] = ((fConst31 * ((fConst30 * fRec14[1]) + (fConst8 * fRec14[0]))) + (fConst10 * fRec13[1]));
285 double fTemp5 = (fRec13[0] * fRec12[0]);
286 fVec5[0] = fTemp5;
287 fRec11[0] = ((fConst20 * (fVec5[0] + fVec5[1])) + (fConst7 * fRec11[1]));
288 double fTemp6 = (1e-15 + (0.0082 * fRec4[1]));
289 fVec6[0] = fTemp6;
290 fRec25[0] = ((fConst42 * (fVec6[0] + fVec6[1])) + (fConst3 * fRec25[1]));
291 fRec4[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec25[0] + (2700 * (fRec11[0] / (2700 + exp((13.815510557964274 / log((2.718281828459045 + (8.551967507929417 * fRec5[0]))))))))) - 1.130461999999999)) - 112.13878048780487);
292 fRec3[0] = ((fConst31 * ((fConst30 * fRec4[1]) + (fConst8 * fRec4[0]))) + (fConst10 * fRec3[1]));
293 fRec2[0] = ((fConst43 * (fRec3[0] + fRec3[1])) + (fConst7 * fRec2[1]));
294 fRec1[0] = ((fConst42 * ((fConst44 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
295 fRec0[0] = fRec1[0];
296 output0[i] = (FAUSTFLOAT)fRec0[0];
297 // post processing
298 fRec0[1] = fRec0[0];
299 fRec1[1] = fRec1[0];
300 fRec2[1] = fRec2[0];
301 fRec3[1] = fRec3[0];
302 fRec4[1] = fRec4[0];
303 fRec25[1] = fRec25[0];
304 fVec6[1] = fVec6[0];
305 fRec11[1] = fRec11[0];
306 fVec5[1] = fVec5[0];
307 fRec13[1] = fRec13[0];
308 fRec14[1] = fRec14[0];
309 fRec24[1] = fRec24[0];
310 fVec4[1] = fVec4[0];
311 fRec15[1] = fRec15[0];
312 fVec3[1] = fVec3[0];
313 fRec23[1] = fRec23[0];
314 fRec22[1] = fRec22[0];
315 fRec18[1] = fRec18[0];
316 fRec19[1] = fRec19[0];
317 fRec20[1] = fRec20[0];
318 fRec21[1] = fRec21[0];
319 fVec2[1] = fVec2[0];
320 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
321 fRec17[1] = fRec17[0];
322 fVec1[1] = fVec1[0];
323 fRec12[1] = fRec12[0];
324 fRec5[1] = fRec5[0];
325 fRec8[1] = fRec8[0];
326 fRec9[1] = fRec9[0];
327 fRec10[1] = fRec10[0];
328 iRec6[1] = iRec6[0];
329 iRec7[1] = iRec7[0];
330 iVec0[1] = iVec0[0];
331 }
332 #undef fslider0
333 #undef fcheckbox0
334 #undef fslider1
335 #undef fslider2
336 #undef fcheckbox1
337 #undef fslider3
338 #undef fslider4
339 }
340
341 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
342 {
343 static_cast<Dsp*>(p)->compute(count, input0, output0);
344 }
345
346
347 void Dsp::connect(uint32_t port,void* data)
348 {
349 switch ((PortIndex)port)
350 {
351 case FEEDBACK:
352 fcheckbox1_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
353 break;
354 // static const value_pair fcheckbox0_values[] = {{"triangle"},{"sine"},{0}};
355 case SINEWAVE:
356 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
357 break;
358 case GAIN:
359 fslider4_ = (float*)data; // , 0.0, -2e+01, 2e+01, 0.1
360 break;
361 case TONE:
362 fslider3_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
363 break;
364 case VOLUME:
365 fslider2_ = (float*)data; // , 0.0, -2e+01, 1e+01, 0.1
366 break;
367 case INTENSITY:
368 fslider1_ = (float*)data; // , 5.0, 0.0, 1e+01, 0.1
369 break;
370 case SPEED:
371 fslider0_ = (float*)data; // , 5.0, 0.1, 1e+01, 0.1
372 break;
373 default:
374 break;
375 }
376 }
377
378 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
379 {
380 static_cast<Dsp*>(p)->connect(port, data);
381 }
382
383
384 PluginLV2 *plugin() {
385 return new Dsp();
386 }
387
388 void Dsp::del_instance(PluginLV2 *p)
389 {
390 delete static_cast<Dsp*>(p);
391 }
392
393 /*
394 typedef enum
395 {
396 FEEDBACK,
397 SINEWAVE,
398 GAIN,
399 TONE,
400 VOLUME,
401 INTENSITY,
402 SPEED,
403 } PortIndex;
404 */
405
406 } // end namespace gx_vibrochump
0 // generated from file '../src/LV2/faust/gx_zita_rev1.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gx_zita_rev1 {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int iConst0;
12 double fConst1;
13 double fConst2;
14 FAUSTFLOAT fslider1;
15 FAUSTFLOAT *fslider1_;
16 double fConst3;
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fConst4;
20 double fRec13[2];
21 FAUSTFLOAT fslider3;
22 FAUSTFLOAT *fslider3_;
23 double fRec12[2];
24 int IOTA;
25 double fVec0[8192];
26 double fConst5;
27 int iConst6;
28 double fVec1[8192];
29 FAUSTFLOAT fslider4;
30 FAUSTFLOAT *fslider4_;
31 double fConst7;
32 double fVec2[2048];
33 int iConst8;
34 double fRec10[2];
35 double fConst9;
36 double fConst10;
37 double fRec17[2];
38 double fRec16[2];
39 double fVec3[8192];
40 double fConst11;
41 int iConst12;
42 double fVec4[1024];
43 int iConst13;
44 double fRec14[2];
45 double fConst14;
46 double fConst15;
47 double fRec21[2];
48 double fRec20[2];
49 double fVec5[8192];
50 double fConst16;
51 int iConst17;
52 double fVec6[2048];
53 int iConst18;
54 double fRec18[2];
55 double fConst19;
56 double fConst20;
57 double fRec25[2];
58 double fRec24[2];
59 double fVec7[8192];
60 double fConst21;
61 int iConst22;
62 double fVec8[1024];
63 int iConst23;
64 double fRec22[2];
65 double fConst24;
66 double fConst25;
67 double fRec29[2];
68 double fRec28[2];
69 double fVec9[16384];
70 double fConst26;
71 int iConst27;
72 double fVec10[8192];
73 double fVec11[2048];
74 int iConst28;
75 double fRec26[2];
76 double fConst29;
77 double fConst30;
78 double fRec33[2];
79 double fRec32[2];
80 double fVec12[8192];
81 double fConst31;
82 int iConst32;
83 double fVec13[2048];
84 int iConst33;
85 double fRec30[2];
86 double fConst34;
87 double fConst35;
88 double fRec37[2];
89 double fRec36[2];
90 double fVec14[16384];
91 double fConst36;
92 int iConst37;
93 double fVec15[2048];
94 int iConst38;
95 double fRec34[2];
96 double fConst39;
97 double fConst40;
98 double fRec41[2];
99 double fRec40[2];
100 double fVec16[16384];
101 double fConst41;
102 int iConst42;
103 double fVec17[1024];
104 int iConst43;
105 double fRec38[2];
106 double fRec2[3];
107 double fRec3[3];
108 double fRec4[3];
109 double fRec5[3];
110 double fRec6[3];
111 double fRec7[3];
112 double fRec8[3];
113 double fRec9[3];
114 FAUSTFLOAT fslider5;
115 FAUSTFLOAT *fslider5_;
116 double fConst44;
117 FAUSTFLOAT fslider6;
118 FAUSTFLOAT *fslider6_;
119 double fRec1[3];
120 FAUSTFLOAT fslider7;
121 FAUSTFLOAT *fslider7_;
122 FAUSTFLOAT fslider8;
123 FAUSTFLOAT *fslider8_;
124 double fRec0[3];
125 FAUSTFLOAT fslider9;
126 FAUSTFLOAT *fslider9_;
127 double fRec42[2];
128 FAUSTFLOAT fslider10;
129 FAUSTFLOAT *fslider10_;
130 double fRec43[2];
131 double fRec45[3];
132 double fRec44[3];
133 void connect(uint32_t port,void* data);
134 void clear_state_f();
135 void init(uint32_t samplingFreq);
136 void compute(int count, float *input0, float *input1, float *output0, float *output1);
137
138 static void clear_state_f_static(PluginLV2*);
139 static void init_static(uint32_t samplingFreq, PluginLV2*);
140 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
141 static void del_instance(PluginLV2 *p);
142 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
143 public:
144 Dsp();
145 ~Dsp();
146 };
147
148
149
150 static const char* parm_groups[] = {
151 "equalizer2", N_("RM Peaking Equalizer 2"),
152 "equalizer1", N_("RM Peaking Equalizer 1"),
153 "output", N_("Output"),
154 "input", N_("Input"),
155 "decay_times", N_("Decay Times in Bands"),
156 0
157 };
158
159 Dsp::Dsp()
160 : PluginLV2() {
161 version = PLUGINLV2_VERSION;
162 id = "zita_rev1";
163 name = N_("Zita Rev1");
164 mono_audio = 0;
165 stereo_audio = compute_static;
166 set_samplerate = init_static;
167 activate_plugin = 0;
168 connect_ports = connect_static;
169 clear_state = clear_state_f_static;
170 delete_instance = del_instance;
171 }
172
173 Dsp::~Dsp() {
174 }
175
176 inline void Dsp::clear_state_f()
177 {
178 for (int i=0; i<2; i++) fRec13[i] = 0;
179 for (int i=0; i<2; i++) fRec12[i] = 0;
180 for (int i=0; i<8192; i++) fVec0[i] = 0;
181 for (int i=0; i<8192; i++) fVec1[i] = 0;
182 for (int i=0; i<2048; i++) fVec2[i] = 0;
183 for (int i=0; i<2; i++) fRec10[i] = 0;
184 for (int i=0; i<2; i++) fRec17[i] = 0;
185 for (int i=0; i<2; i++) fRec16[i] = 0;
186 for (int i=0; i<8192; i++) fVec3[i] = 0;
187 for (int i=0; i<1024; i++) fVec4[i] = 0;
188 for (int i=0; i<2; i++) fRec14[i] = 0;
189 for (int i=0; i<2; i++) fRec21[i] = 0;
190 for (int i=0; i<2; i++) fRec20[i] = 0;
191 for (int i=0; i<8192; i++) fVec5[i] = 0;
192 for (int i=0; i<2048; i++) fVec6[i] = 0;
193 for (int i=0; i<2; i++) fRec18[i] = 0;
194 for (int i=0; i<2; i++) fRec25[i] = 0;
195 for (int i=0; i<2; i++) fRec24[i] = 0;
196 for (int i=0; i<8192; i++) fVec7[i] = 0;
197 for (int i=0; i<1024; i++) fVec8[i] = 0;
198 for (int i=0; i<2; i++) fRec22[i] = 0;
199 for (int i=0; i<2; i++) fRec29[i] = 0;
200 for (int i=0; i<2; i++) fRec28[i] = 0;
201 for (int i=0; i<16384; i++) fVec9[i] = 0;
202 for (int i=0; i<8192; i++) fVec10[i] = 0;
203 for (int i=0; i<2048; i++) fVec11[i] = 0;
204 for (int i=0; i<2; i++) fRec26[i] = 0;
205 for (int i=0; i<2; i++) fRec33[i] = 0;
206 for (int i=0; i<2; i++) fRec32[i] = 0;
207 for (int i=0; i<8192; i++) fVec12[i] = 0;
208 for (int i=0; i<2048; i++) fVec13[i] = 0;
209 for (int i=0; i<2; i++) fRec30[i] = 0;
210 for (int i=0; i<2; i++) fRec37[i] = 0;
211 for (int i=0; i<2; i++) fRec36[i] = 0;
212 for (int i=0; i<16384; i++) fVec14[i] = 0;
213 for (int i=0; i<2048; i++) fVec15[i] = 0;
214 for (int i=0; i<2; i++) fRec34[i] = 0;
215 for (int i=0; i<2; i++) fRec41[i] = 0;
216 for (int i=0; i<2; i++) fRec40[i] = 0;
217 for (int i=0; i<16384; i++) fVec16[i] = 0;
218 for (int i=0; i<1024; i++) fVec17[i] = 0;
219 for (int i=0; i<2; i++) fRec38[i] = 0;
220 for (int i=0; i<3; i++) fRec2[i] = 0;
221 for (int i=0; i<3; i++) fRec3[i] = 0;
222 for (int i=0; i<3; i++) fRec4[i] = 0;
223 for (int i=0; i<3; i++) fRec5[i] = 0;
224 for (int i=0; i<3; i++) fRec6[i] = 0;
225 for (int i=0; i<3; i++) fRec7[i] = 0;
226 for (int i=0; i<3; i++) fRec8[i] = 0;
227 for (int i=0; i<3; i++) fRec9[i] = 0;
228 for (int i=0; i<3; i++) fRec1[i] = 0;
229 for (int i=0; i<3; i++) fRec0[i] = 0;
230 for (int i=0; i<2; i++) fRec42[i] = 0;
231 for (int i=0; i<2; i++) fRec43[i] = 0;
232 for (int i=0; i<3; i++) fRec45[i] = 0;
233 for (int i=0; i<3; i++) fRec44[i] = 0;
234 }
235
236 void Dsp::clear_state_f_static(PluginLV2 *p)
237 {
238 static_cast<Dsp*>(p)->clear_state_f();
239 }
240
241 inline void Dsp::init(uint32_t samplingFreq)
242 {
243 fSamplingFreq = samplingFreq;
244 iConst0 = min(192000, max(1, fSamplingFreq));
245 fConst1 = floor((0.5 + (0.174713 * iConst0)));
246 fConst2 = ((0 - (6.907755278982138 * fConst1)) / iConst0);
247 fConst3 = (6.283185307179586 / double(iConst0));
248 fConst4 = (3.141592653589793 / iConst0);
249 IOTA = 0;
250 fConst5 = floor((0.5 + (0.022904 * iConst0)));
251 iConst6 = int((int((fConst1 - fConst5)) & 8191));
252 fConst7 = (0.001 * iConst0);
253 iConst8 = int((int((fConst5 - 1)) & 2047));
254 fConst9 = floor((0.5 + (0.153129 * iConst0)));
255 fConst10 = ((0 - (6.907755278982138 * fConst9)) / iConst0);
256 fConst11 = floor((0.5 + (0.020346 * iConst0)));
257 iConst12 = int((int((fConst9 - fConst11)) & 8191));
258 iConst13 = int((int((fConst11 - 1)) & 1023));
259 fConst14 = floor((0.5 + (0.127837 * iConst0)));
260 fConst15 = ((0 - (6.907755278982138 * fConst14)) / iConst0);
261 fConst16 = floor((0.5 + (0.031604 * iConst0)));
262 iConst17 = int((int((fConst14 - fConst16)) & 8191));
263 iConst18 = int((int((fConst16 - 1)) & 2047));
264 fConst19 = floor((0.5 + (0.125 * iConst0)));
265 fConst20 = ((0 - (6.907755278982138 * fConst19)) / iConst0);
266 fConst21 = floor((0.5 + (0.013458 * iConst0)));
267 iConst22 = int((int((fConst19 - fConst21)) & 8191));
268 iConst23 = int((int((fConst21 - 1)) & 1023));
269 fConst24 = floor((0.5 + (0.210389 * iConst0)));
270 fConst25 = ((0 - (6.907755278982138 * fConst24)) / iConst0);
271 fConst26 = floor((0.5 + (0.024421 * iConst0)));
272 iConst27 = int((int((fConst24 - fConst26)) & 16383));
273 iConst28 = int((int((fConst26 - 1)) & 2047));
274 fConst29 = floor((0.5 + (0.192303 * iConst0)));
275 fConst30 = ((0 - (6.907755278982138 * fConst29)) / iConst0);
276 fConst31 = floor((0.5 + (0.029291 * iConst0)));
277 iConst32 = int((int((fConst29 - fConst31)) & 8191));
278 iConst33 = int((int((fConst31 - 1)) & 2047));
279 fConst34 = floor((0.5 + (0.256891 * iConst0)));
280 fConst35 = ((0 - (6.907755278982138 * fConst34)) / iConst0);
281 fConst36 = floor((0.5 + (0.027333 * iConst0)));
282 iConst37 = int((int((fConst34 - fConst36)) & 16383));
283 iConst38 = int((int((fConst36 - 1)) & 2047));
284 fConst39 = floor((0.5 + (0.219991 * iConst0)));
285 fConst40 = ((0 - (6.907755278982138 * fConst39)) / iConst0);
286 fConst41 = floor((0.5 + (0.019123 * iConst0)));
287 iConst42 = int((int((fConst39 - fConst41)) & 16383));
288 iConst43 = int((int((fConst41 - 1)) & 1023));
289 fConst44 = (6.283185307179586 / iConst0);
290 clear_state_f();
291 }
292
293 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
294 {
295 static_cast<Dsp*>(p)->init(samplingFreq);
296 }
297
298 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
299 {
300 #define fslider0 (*fslider0_)
301 #define fslider1 (*fslider1_)
302 #define fslider2 (*fslider2_)
303 #define fslider3 (*fslider3_)
304 #define fslider4 (*fslider4_)
305 #define fslider5 (*fslider5_)
306 #define fslider6 (*fslider6_)
307 #define fslider7 (*fslider7_)
308 #define fslider8 (*fslider8_)
309 #define fslider9 (*fslider9_)
310 #define fslider10 (*fslider10_)
311 double fSlow0 = fslider0;
312 double fSlow1 = exp((fConst2 / fSlow0));
313 double fSlow2 = faustpower<2>(fSlow1);
314 double fSlow3 = (1.0 - fSlow2);
315 double fSlow4 = cos((fConst3 * fslider1));
316 double fSlow5 = (1.0 - (fSlow4 * fSlow2));
317 double fSlow6 = sqrt(max(0, ((faustpower<2>(fSlow5) / faustpower<2>(fSlow3)) - 1.0)));
318 double fSlow7 = (fSlow5 / fSlow3);
319 double fSlow8 = (fSlow7 - fSlow6);
320 double fSlow9 = (1.0 / tan((fConst4 * fslider2)));
321 double fSlow10 = (1 + fSlow9);
322 double fSlow11 = (0 - ((1 - fSlow9) / fSlow10));
323 double fSlow12 = (1.0 / fSlow10);
324 double fSlow13 = fslider3;
325 double fSlow14 = ((exp((fConst2 / fSlow13)) / fSlow1) - 1);
326 double fSlow15 = (fSlow1 * ((1.0 + fSlow6) - fSlow7));
327 int iSlow16 = int((int((fConst7 * fslider4)) & 8191));
328 double fSlow17 = exp((fConst10 / fSlow0));
329 double fSlow18 = faustpower<2>(fSlow17);
330 double fSlow19 = (1.0 - fSlow18);
331 double fSlow20 = (1.0 - (fSlow4 * fSlow18));
332 double fSlow21 = sqrt(max(0, ((faustpower<2>(fSlow20) / faustpower<2>(fSlow19)) - 1.0)));
333 double fSlow22 = (fSlow20 / fSlow19);
334 double fSlow23 = (fSlow22 - fSlow21);
335 double fSlow24 = ((exp((fConst10 / fSlow13)) / fSlow17) - 1);
336 double fSlow25 = (fSlow17 * ((1.0 + fSlow21) - fSlow22));
337 double fSlow26 = exp((fConst15 / fSlow0));
338 double fSlow27 = faustpower<2>(fSlow26);
339 double fSlow28 = (1.0 - fSlow27);
340 double fSlow29 = (1.0 - (fSlow4 * fSlow27));
341 double fSlow30 = sqrt(max(0, ((faustpower<2>(fSlow29) / faustpower<2>(fSlow28)) - 1.0)));
342 double fSlow31 = (fSlow29 / fSlow28);
343 double fSlow32 = (fSlow31 - fSlow30);
344 double fSlow33 = ((exp((fConst15 / fSlow13)) / fSlow26) - 1);
345 double fSlow34 = (fSlow26 * ((1.0 + fSlow30) - fSlow31));
346 double fSlow35 = exp((fConst20 / fSlow0));
347 double fSlow36 = faustpower<2>(fSlow35);
348 double fSlow37 = (1.0 - fSlow36);
349 double fSlow38 = (1.0 - (fSlow4 * fSlow36));
350 double fSlow39 = sqrt(max(0, ((faustpower<2>(fSlow38) / faustpower<2>(fSlow37)) - 1.0)));
351 double fSlow40 = (fSlow38 / fSlow37);
352 double fSlow41 = (fSlow40 - fSlow39);
353 double fSlow42 = ((exp((fConst20 / fSlow13)) / fSlow35) - 1);
354 double fSlow43 = (fSlow35 * ((1.0 + fSlow39) - fSlow40));
355 double fSlow44 = exp((fConst25 / fSlow0));
356 double fSlow45 = faustpower<2>(fSlow44);
357 double fSlow46 = (1.0 - fSlow45);
358 double fSlow47 = (1.0 - (fSlow4 * fSlow45));
359 double fSlow48 = sqrt(max(0, ((faustpower<2>(fSlow47) / faustpower<2>(fSlow46)) - 1.0)));
360 double fSlow49 = (fSlow47 / fSlow46);
361 double fSlow50 = (fSlow49 - fSlow48);
362 double fSlow51 = ((exp((fConst25 / fSlow13)) / fSlow44) - 1);
363 double fSlow52 = (fSlow44 * ((1.0 + fSlow48) - fSlow49));
364 double fSlow53 = exp((fConst30 / fSlow0));
365 double fSlow54 = faustpower<2>(fSlow53);
366 double fSlow55 = (1.0 - fSlow54);
367 double fSlow56 = (1.0 - (fSlow4 * fSlow54));
368 double fSlow57 = sqrt(max(0, ((faustpower<2>(fSlow56) / faustpower<2>(fSlow55)) - 1.0)));
369 double fSlow58 = (fSlow56 / fSlow55);
370 double fSlow59 = (fSlow58 - fSlow57);
371 double fSlow60 = ((exp((fConst30 / fSlow13)) / fSlow53) - 1);
372 double fSlow61 = (fSlow53 * ((1.0 + fSlow57) - fSlow58));
373 double fSlow62 = exp((fConst35 / fSlow0));
374 double fSlow63 = faustpower<2>(fSlow62);
375 double fSlow64 = (1.0 - fSlow63);
376 double fSlow65 = (1.0 - (fSlow4 * fSlow63));
377 double fSlow66 = sqrt(max(0, ((faustpower<2>(fSlow65) / faustpower<2>(fSlow64)) - 1.0)));
378 double fSlow67 = (fSlow65 / fSlow64);
379 double fSlow68 = (fSlow67 - fSlow66);
380 double fSlow69 = ((exp((fConst35 / fSlow13)) / fSlow62) - 1);
381 double fSlow70 = (fSlow62 * ((1.0 + fSlow66) - fSlow67));
382 double fSlow71 = exp((fConst40 / fSlow0));
383 double fSlow72 = faustpower<2>(fSlow71);
384 double fSlow73 = (1.0 - fSlow72);
385 double fSlow74 = (1.0 - (fSlow72 * fSlow4));
386 double fSlow75 = sqrt(max(0, ((faustpower<2>(fSlow74) / faustpower<2>(fSlow73)) - 1.0)));
387 double fSlow76 = (fSlow74 / fSlow73);
388 double fSlow77 = (fSlow76 - fSlow75);
389 double fSlow78 = ((exp((fConst40 / fSlow13)) / fSlow71) - 1);
390 double fSlow79 = (fSlow71 * ((1.0 + fSlow75) - fSlow76));
391 double fSlow80 = fslider5;
392 double fSlow81 = pow(10,(0.05 * fslider6));
393 double fSlow82 = (fConst44 * (fSlow80 / sqrt(fSlow81)));
394 double fSlow83 = ((1.0 - fSlow82) / (1.0 + fSlow82));
395 double fSlow84 = ((1 + fSlow83) * (0 - cos((fConst44 * fSlow80))));
396 double fSlow85 = fslider7;
397 double fSlow86 = pow(10,(0.05 * fslider8));
398 double fSlow87 = (fConst44 * (fSlow85 / sqrt(fSlow86)));
399 double fSlow88 = ((1.0 - fSlow87) / (1.0 + fSlow87));
400 double fSlow89 = ((1 + fSlow88) * (0 - cos((fConst44 * fSlow85))));
401 double fSlow90 = (0.0010000000000000009 * fslider9);
402 double fSlow91 = (0.0010000000000000009 * fslider10);
403 for (int i=0; i<count; i++) {
404 fRec13[0] = ((fSlow12 * (fRec6[1] + fRec6[2])) + (fSlow11 * fRec13[1]));
405 fRec12[0] = ((fSlow15 * (fRec6[1] + (fSlow14 * fRec13[0]))) + (fSlow8 * fRec12[1]));
406 fVec0[IOTA&8191] = (1e-20 + (0.35355339059327373 * fRec12[0]));
407 double fTemp0 = (double)input0[i];
408 fVec1[IOTA&8191] = fTemp0;
409 double fTemp1 = (0.3 * fVec1[(IOTA-iSlow16)&8191]);
410 double fTemp2 = ((fTemp1 + fVec0[(IOTA-iConst6)&8191]) - (0.6 * fRec10[1]));
411 fVec2[IOTA&2047] = fTemp2;
412 fRec10[0] = fVec2[(IOTA-iConst8)&2047];
413 double fRec11 = (0.6 * fVec2[IOTA&2047]);
414 fRec17[0] = ((fSlow12 * (fRec2[1] + fRec2[2])) + (fSlow11 * fRec17[1]));
415 fRec16[0] = ((fSlow25 * (fRec2[1] + (fSlow24 * fRec17[0]))) + (fSlow23 * fRec16[1]));
416 fVec3[IOTA&8191] = (1e-20 + (0.35355339059327373 * fRec16[0]));
417 double fTemp3 = ((fTemp1 + fVec3[(IOTA-iConst12)&8191]) - (0.6 * fRec14[1]));
418 fVec4[IOTA&1023] = fTemp3;
419 fRec14[0] = fVec4[(IOTA-iConst13)&1023];
420 double fRec15 = (0.6 * fVec4[IOTA&1023]);
421 double fTemp4 = (fRec15 + fRec11);
422 fRec21[0] = ((fSlow12 * (fRec4[1] + fRec4[2])) + (fSlow11 * fRec21[1]));
423 fRec20[0] = ((fSlow34 * (fRec4[1] + (fSlow33 * fRec21[0]))) + (fSlow32 * fRec20[1]));
424 fVec5[IOTA&8191] = (1e-20 + (0.35355339059327373 * fRec20[0]));
425 double fTemp5 = (fVec5[(IOTA-iConst17)&8191] - (fTemp1 + (0.6 * fRec18[1])));
426 fVec6[IOTA&2047] = fTemp5;
427 fRec18[0] = fVec6[(IOTA-iConst18)&2047];
428 double fRec19 = (0.6 * fVec6[IOTA&2047]);
429 fRec25[0] = ((fSlow12 * (fRec8[1] + fRec8[2])) + (fSlow11 * fRec25[1]));
430 fRec24[0] = ((fSlow43 * (fRec8[1] + (fSlow42 * fRec25[0]))) + (fSlow41 * fRec24[1]));
431 fVec7[IOTA&8191] = (1e-20 + (0.35355339059327373 * fRec24[0]));
432 double fTemp6 = (fVec7[(IOTA-iConst22)&8191] - (fTemp1 + (0.6 * fRec22[1])));
433 fVec8[IOTA&1023] = fTemp6;
434 fRec22[0] = fVec8[(IOTA-iConst23)&1023];
435 double fRec23 = (0.6 * fVec8[IOTA&1023]);
436 double fTemp7 = (fRec23 + (fRec19 + fTemp4));
437 fRec29[0] = ((fSlow12 * (fRec3[1] + fRec3[2])) + (fSlow11 * fRec29[1]));
438 fRec28[0] = ((fSlow52 * (fRec3[1] + (fSlow51 * fRec29[0]))) + (fSlow50 * fRec28[1]));
439 fVec9[IOTA&16383] = (1e-20 + (0.35355339059327373 * fRec28[0]));
440 double fTemp8 = (double)input1[i];
441 fVec10[IOTA&8191] = fTemp8;
442 double fTemp9 = (0.3 * fVec10[(IOTA-iSlow16)&8191]);
443 double fTemp10 = ((fTemp9 + fVec9[(IOTA-iConst27)&16383]) + (0.6 * fRec26[1]));
444 fVec11[IOTA&2047] = fTemp10;
445 fRec26[0] = fVec11[(IOTA-iConst28)&2047];
446 double fRec27 = (0 - (0.6 * fVec11[IOTA&2047]));
447 fRec33[0] = ((fSlow12 * (fRec7[1] + fRec7[2])) + (fSlow11 * fRec33[1]));
448 fRec32[0] = ((fSlow61 * (fRec7[1] + (fSlow60 * fRec33[0]))) + (fSlow59 * fRec32[1]));
449 fVec12[IOTA&8191] = (1e-20 + (0.35355339059327373 * fRec32[0]));
450 double fTemp11 = ((fTemp9 + fVec12[(IOTA-iConst32)&8191]) + (0.6 * fRec30[1]));
451 fVec13[IOTA&2047] = fTemp11;
452 fRec30[0] = fVec13[(IOTA-iConst33)&2047];
453 double fRec31 = (0 - (0.6 * fVec13[IOTA&2047]));
454 fRec37[0] = ((fSlow12 * (fRec5[1] + fRec5[2])) + (fSlow11 * fRec37[1]));
455 fRec36[0] = ((fSlow70 * (fRec5[1] + (fSlow69 * fRec37[0]))) + (fSlow68 * fRec36[1]));
456 fVec14[IOTA&16383] = (1e-20 + (0.35355339059327373 * fRec36[0]));
457 double fTemp12 = ((fVec14[(IOTA-iConst37)&16383] + (0.6 * fRec34[1])) - fTemp9);
458 fVec15[IOTA&2047] = fTemp12;
459 fRec34[0] = fVec15[(IOTA-iConst38)&2047];
460 double fRec35 = (0 - (0.6 * fVec15[IOTA&2047]));
461 fRec41[0] = ((fSlow12 * (fRec9[1] + fRec9[2])) + (fSlow11 * fRec41[1]));
462 fRec40[0] = ((fSlow79 * (fRec9[1] + (fSlow78 * fRec41[0]))) + (fSlow77 * fRec40[1]));
463 fVec16[IOTA&16383] = (1e-20 + (0.35355339059327373 * fRec40[0]));
464 double fTemp13 = ((fVec16[(IOTA-iConst42)&16383] + (0.6 * fRec38[1])) - fTemp9);
465 fVec17[IOTA&1023] = fTemp13;
466 fRec38[0] = fVec17[(IOTA-iConst43)&1023];
467 double fRec39 = (0 - (0.6 * fVec17[IOTA&1023]));
468 fRec2[0] = (fRec14[1] + (fRec10[1] + (fRec18[1] + (fRec22[1] + (fRec26[1] + (fRec30[1] + (fRec34[1] + (fRec38[1] + (fRec39 + (fRec35 + (fRec31 + (fRec27 + fTemp7))))))))))));
469 fRec3[0] = (0 - ((fRec26[1] + (fRec30[1] + (fRec34[1] + (fRec38[1] + (fRec39 + (fRec35 + (fRec27 + fRec31))))))) - (fRec14[1] + (fRec10[1] + (fRec18[1] + (fRec22[1] + fTemp7))))));
470 double fTemp14 = (fRec19 + fRec23);
471 fRec4[0] = (0 - ((fRec18[1] + (fRec22[1] + (fRec34[1] + (fRec38[1] + (fRec39 + (fRec35 + fTemp14)))))) - (fRec14[1] + (fRec10[1] + (fRec26[1] + (fRec30[1] + (fRec31 + (fRec27 + fTemp4))))))));
472 fRec5[0] = (0 - ((fRec18[1] + (fRec22[1] + (fRec26[1] + (fRec30[1] + (fRec31 + (fRec27 + fTemp14)))))) - (fRec14[1] + (fRec10[1] + (fRec34[1] + (fRec38[1] + (fRec39 + (fRec35 + fTemp4))))))));
473 double fTemp15 = (fRec15 + fRec19);
474 double fTemp16 = (fRec11 + fRec23);
475 fRec6[0] = (0 - ((fRec10[1] + (fRec22[1] + (fRec30[1] + (fRec38[1] + (fRec39 + (fRec31 + fTemp16)))))) - (fRec14[1] + (fRec18[1] + (fRec26[1] + (fRec34[1] + (fRec35 + (fRec27 + fTemp15))))))));
476 fRec7[0] = (0 - ((fRec10[1] + (fRec22[1] + (fRec26[1] + (fRec34[1] + (fRec35 + (fRec27 + fTemp16)))))) - (fRec14[1] + (fRec18[1] + (fRec30[1] + (fRec38[1] + (fRec39 + (fRec31 + fTemp15))))))));
477 double fTemp17 = (fRec15 + fRec23);
478 double fTemp18 = (fRec11 + fRec19);
479 fRec8[0] = (0 - ((fRec10[1] + (fRec18[1] + (fRec30[1] + (fRec34[1] + (fRec35 + (fRec31 + fTemp18)))))) - (fRec14[1] + (fRec22[1] + (fRec26[1] + (fRec38[1] + (fRec39 + (fRec27 + fTemp17))))))));
480 fRec9[0] = (0 - ((fRec10[1] + (fRec18[1] + (fRec26[1] + (fRec38[1] + (fRec39 + (fRec27 + fTemp18)))))) - (fRec14[1] + (fRec22[1] + (fRec30[1] + (fRec34[1] + (fRec35 + (fRec31 + fTemp17))))))));
481 double fTemp19 = (0.37 * (fRec3[0] + fRec4[0]));
482 double fTemp20 = (fSlow84 * fRec1[1]);
483 fRec1[0] = (0 - (((fSlow83 * fRec1[2]) + fTemp20) - fTemp19));
484 double fTemp21 = (fSlow83 * fRec1[0]);
485 double fTemp22 = (0.5 * ((fSlow81 * ((fTemp21 + (fRec1[2] + fTemp20)) - fTemp19)) + (fTemp21 + (fTemp20 + (fTemp19 + fRec1[2])))));
486 double fTemp23 = (fSlow89 * fRec0[1]);
487 fRec0[0] = (0 - (((fSlow88 * fRec0[2]) + fTemp23) - fTemp22));
488 double fTemp24 = (fSlow88 * fRec0[0]);
489 fRec42[0] = (fSlow90 + (0.999 * fRec42[1]));
490 double fTemp25 = (1.0 + fRec42[0]);
491 double fTemp26 = (1.0 - (0.5 * fTemp25));
492 fRec43[0] = (fSlow91 + (0.999 * fRec43[1]));
493 double fTemp27 = pow(10,(0.05 * fRec43[0]));
494 output0[i] = (FAUSTFLOAT)(fTemp27 * ((fVec1[IOTA&8191] * fTemp26) + (0.25 * (fTemp25 * ((fSlow86 * ((fTemp24 + (fRec0[2] + fTemp23)) - fTemp22)) + (fTemp24 + (fTemp23 + (fTemp22 + fRec0[2]))))))));
495 double fTemp28 = (0.37 * (fRec3[0] - fRec4[0]));
496 double fTemp29 = (fSlow84 * fRec45[1]);
497 fRec45[0] = (0 - (((fSlow83 * fRec45[2]) + fTemp29) - fTemp28));
498 double fTemp30 = (fSlow83 * fRec45[0]);
499 double fTemp31 = (0.5 * ((fSlow81 * ((fTemp30 + (fRec45[2] + fTemp29)) - fTemp28)) + (fTemp30 + (fTemp29 + (fTemp28 + fRec45[2])))));
500 double fTemp32 = (fSlow89 * fRec44[1]);
501 fRec44[0] = (0 - (((fSlow88 * fRec44[2]) + fTemp32) - fTemp31));
502 double fTemp33 = (fSlow88 * fRec44[0]);
503 output1[i] = (FAUSTFLOAT)(fTemp27 * ((fVec10[IOTA&8191] * fTemp26) + (0.25 * (fTemp25 * ((fSlow86 * ((fTemp33 + (fRec44[2] + fTemp32)) - fTemp31)) + (fTemp33 + (fTemp32 + (fTemp31 + fRec44[2]))))))));
504 // post processing
505 fRec44[2] = fRec44[1]; fRec44[1] = fRec44[0];
506 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
507 fRec43[1] = fRec43[0];
508 fRec42[1] = fRec42[0];
509 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
510 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
511 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
512 fRec8[2] = fRec8[1]; fRec8[1] = fRec8[0];
513 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
514 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
515 fRec5[2] = fRec5[1]; fRec5[1] = fRec5[0];
516 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
517 fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
518 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
519 fRec38[1] = fRec38[0];
520 fRec40[1] = fRec40[0];
521 fRec41[1] = fRec41[0];
522 fRec34[1] = fRec34[0];
523 fRec36[1] = fRec36[0];
524 fRec37[1] = fRec37[0];
525 fRec30[1] = fRec30[0];
526 fRec32[1] = fRec32[0];
527 fRec33[1] = fRec33[0];
528 fRec26[1] = fRec26[0];
529 fRec28[1] = fRec28[0];
530 fRec29[1] = fRec29[0];
531 fRec22[1] = fRec22[0];
532 fRec24[1] = fRec24[0];
533 fRec25[1] = fRec25[0];
534 fRec18[1] = fRec18[0];
535 fRec20[1] = fRec20[0];
536 fRec21[1] = fRec21[0];
537 fRec14[1] = fRec14[0];
538 fRec16[1] = fRec16[0];
539 fRec17[1] = fRec17[0];
540 fRec10[1] = fRec10[0];
541 IOTA = IOTA+1;
542 fRec12[1] = fRec12[0];
543 fRec13[1] = fRec13[0];
544 }
545 #undef fslider0
546 #undef fslider1
547 #undef fslider2
548 #undef fslider3
549 #undef fslider4
550 #undef fslider5
551 #undef fslider6
552 #undef fslider7
553 #undef fslider8
554 #undef fslider9
555 #undef fslider10
556 }
557
558 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
559 {
560 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
561 }
562
563
564 void Dsp::connect(uint32_t port,void* data)
565 {
566 switch ((PortIndex)port)
567 {
568 case LEVEL:
569 fslider10_ = (float*)data; // , 0.0, -7e+01, 4e+01, 0.1
570 break;
571 case EQ2_FREQ:
572 fslider7_ = (float*)data; // , 315.0, 4e+01, 2.5e+03, 1.0
573 break;
574 case EQ1_LEVEL:
575 fslider6_ = (float*)data; // , 0.0, -15.0, 15.0, 0.1
576 break;
577 case EQ1_FREQ:
578 fslider5_ = (float*)data; // , 315.0, 4e+01, 2.5e+03, 1.0
579 break;
580 case IN_DELAY:
581 fslider4_ = (float*)data; // , 6e+01, 2e+01, 1e+02, 1.0
582 break;
583 case LOW_RT60:
584 fslider3_ = (float*)data; // , 3.0, 1.0, 8.0, 0.1
585 break;
586 case LF_X:
587 fslider2_ = (float*)data; // , 2e+02, 5e+01, 1e+03, 1.0
588 break;
589 case HF_DAMPING:
590 fslider1_ = (float*)data; // , 6e+03, 1.5e+03, 2.352e+04, 1.0
591 break;
592 case MID_RT60:
593 fslider0_ = (float*)data; // , 2.0, 1.0, 8.0, 0.1
594 break;
595 case DRY_WET_MIX:
596 fslider9_ = (float*)data; // , 0.0, -1.0, 1.0, 0.01
597 break;
598 case EQ2_LEVEL:
599 fslider8_ = (float*)data; // , 0.0, -15.0, 15.0, 0.1
600 break;
601 default:
602 break;
603 }
604 }
605
606 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
607 {
608 static_cast<Dsp*>(p)->connect(port, data);
609 }
610
611
612 PluginLV2 *plugin() {
613 return new Dsp();
614 }
615
616 void Dsp::del_instance(PluginLV2 *p)
617 {
618 delete static_cast<Dsp*>(p);
619 }
620
621 /*
622 typedef enum
623 {
624 LEVEL,
625 EQ2_FREQ,
626 EQ1_LEVEL,
627 EQ1_FREQ,
628 IN_DELAY,
629 LOW_RT60,
630 LF_X,
631 HF_DAMPING,
632 MID_RT60,
633 DRY_WET_MIX,
634 EQ2_LEVEL,
635 } PortIndex;
636 */
637
638 } // end namespace gx_zita_rev1
0 // generated from file '../src/LV2/faust/gxamp.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fRec6[2];
109 double fConst60;
110 double fConst61;
111 double fConst62;
112 double fVec6[2];
113 double fConst63;
114 double fRec30[2];
115 double fRec5[2];
116 double fRec4[2];
117 double fVec7[2];
118 double fRec3[2];
119 double fConst64;
120 double fConst65;
121 double fConst66;
122 double fVec8[2];
123 double fConst67;
124 double fRec31[2];
125 double fRec2[2];
126 double fRec1[2];
127 void connect(uint32_t port,void* data);
128 void clear_state_f();
129 void init(uint32_t samplingFreq);
130 void compute(int count, float *input0, float *output0);
131
132 static void clear_state_f_static(PluginLV2*);
133 static void init_static(uint32_t samplingFreq, PluginLV2*);
134 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
135 static void del_instance(PluginLV2 *p);
136 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
137 public:
138 Dsp();
139 ~Dsp();
140 };
141
142
143
144 Dsp::Dsp()
145 : PluginLV2() {
146 version = PLUGINLV2_VERSION;
147 id = "12ax7";
148 name = N_("12ax7");
149 mono_audio = compute_static;
150 stereo_audio = 0;
151 set_samplerate = init_static;
152 activate_plugin = 0;
153 connect_ports = connect_static;
154 clear_state = clear_state_f_static;
155 delete_instance = del_instance;
156 }
157
158 Dsp::~Dsp() {
159 }
160
161 inline void Dsp::clear_state_f()
162 {
163 for (int i=0; i<2; i++) fRec0[i] = 0;
164 for (int i=0; i<2; i++) fRec7[i] = 0;
165 for (int i=0; i<2; i++) fRec10[i] = 0;
166 for (int i=0; i<2; i++) fVec0[i] = 0;
167 for (int i=0; i<2; i++) fRec11[i] = 0;
168 for (int i=0; i<3; i++) fRec19[i] = 0;
169 for (int i=0; i<2; i++) fVec1[i] = 0;
170 for (int i=0; i<2; i++) fRec18[i] = 0;
171 for (int i=0; i<2; i++) fRec17[i] = 0;
172 for (int i=0; i<3; i++) fRec16[i] = 0;
173 for (int i=0; i<2; i++) fVec2[i] = 0;
174 for (int i=0; i<2; i++) fRec15[i] = 0;
175 for (int i=0; i<3; i++) fRec14[i] = 0;
176 for (int i=0; i<3; i++) fRec13[i] = 0;
177 for (int i=0; i<2; i++) fRec23[i] = 0;
178 for (int i=0; i<3; i++) fRec22[i] = 0;
179 for (int i=0; i<2; i++) fVec3[i] = 0;
180 for (int i=0; i<2; i++) fRec21[i] = 0;
181 for (int i=0; i<3; i++) fRec20[i] = 0;
182 for (int i=0; i<2; i++) fRec27[i] = 0;
183 for (int i=0; i<3; i++) fRec26[i] = 0;
184 for (int i=0; i<3; i++) fRec25[i] = 0;
185 for (int i=0; i<3; i++) fRec24[i] = 0;
186 for (int i=0; i<2; i++) fRec29[i] = 0;
187 for (int i=0; i<3; i++) fRec28[i] = 0;
188 for (int i=0; i<2; i++) fVec4[i] = 0;
189 for (int i=0; i<2; i++) fRec12[i] = 0;
190 for (int i=0; i<2; i++) fRec9[i] = 0;
191 for (int i=0; i<2; i++) fRec8[i] = 0;
192 for (int i=0; i<2; i++) fVec5[i] = 0;
193 for (int i=0; i<2; i++) fRec6[i] = 0;
194 for (int i=0; i<2; i++) fVec6[i] = 0;
195 for (int i=0; i<2; i++) fRec30[i] = 0;
196 for (int i=0; i<2; i++) fRec5[i] = 0;
197 for (int i=0; i<2; i++) fRec4[i] = 0;
198 for (int i=0; i<2; i++) fVec7[i] = 0;
199 for (int i=0; i<2; i++) fRec3[i] = 0;
200 for (int i=0; i<2; i++) fVec8[i] = 0;
201 for (int i=0; i<2; i++) fRec31[i] = 0;
202 for (int i=0; i<2; i++) fRec2[i] = 0;
203 for (int i=0; i<2; i++) fRec1[i] = 0;
204 }
205
206 void Dsp::clear_state_f_static(PluginLV2 *p)
207 {
208 static_cast<Dsp*>(p)->clear_state_f();
209 }
210
211 inline void Dsp::init(uint32_t samplingFreq)
212 {
213 fSamplingFreq = samplingFreq;
214 iConst0 = min(192000, max(1, fSamplingFreq));
215 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
216 fConst2 = (1 + fConst1);
217 fConst3 = (0 - ((1 - fConst1) / fConst2));
218 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
219 fConst5 = (1 + fConst4);
220 fConst6 = (0 - ((1 - fConst4) / fConst5));
221 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
222 fConst8 = (1 + fConst7);
223 fConst9 = (0 - ((1 - fConst7) / fConst8));
224 fConst10 = (1.0 / fConst8);
225 fConst11 = tan((942.4777960769379 / iConst0));
226 fConst12 = (1.0 / faustpower<2>(fConst11));
227 fConst13 = (2 * (1 - fConst12));
228 fConst14 = (1.0 / fConst11);
229 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
230 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
231 fConst17 = tan((3769.9111843077517 / iConst0));
232 fConst18 = (1.0 / faustpower<2>(fConst17));
233 fConst19 = (2 * (1 - fConst18));
234 fConst20 = (1.0 / fConst17);
235 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
236 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
237 fConst23 = (1.0 / fConst22);
238 fConst24 = (1 + fConst20);
239 fConst25 = (0 - ((1 - fConst20) / fConst24));
240 fConst26 = tan((10053.096491487338 / iConst0));
241 fConst27 = (1.0 / faustpower<2>(fConst26));
242 fConst28 = (2 * (1 - fConst27));
243 fConst29 = (1.0 / fConst26);
244 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
245 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
246 fConst32 = (1.0 / fConst31);
247 fConst33 = (1 + fConst29);
248 fConst34 = (0 - ((1 - fConst29) / fConst33));
249 fConst35 = tan((47123.8898038469 / iConst0));
250 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
251 fConst37 = (1.0 / fConst35);
252 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
253 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
254 fConst40 = (1.0 / fConst39);
255 fConst41 = (0 - fConst1);
256 fConst42 = (1.0 / (fConst2 * fConst39));
257 fConst43 = (1.0 / fConst33);
258 fConst44 = (0 - fConst20);
259 fConst45 = (1.0 / (fConst24 * fConst31));
260 fConst46 = (2 * (0 - fConst18));
261 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
262 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
263 fConst49 = (1 + fConst14);
264 fConst50 = (0 - ((1 - fConst14) / fConst49));
265 fConst51 = (0 - fConst14);
266 fConst52 = (1.0 / (fConst49 * fConst22));
267 fConst53 = (2 * (0 - fConst12));
268 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
269 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
270 fConst56 = (0 - fConst29);
271 fConst57 = (2 * (0 - fConst27));
272 fConst58 = (1.0 / fConst5);
273 fConst59 = (0.025 / fConst2);
274 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
275 fConst61 = (1 + fConst60);
276 fConst62 = (0 - ((1 - fConst60) / fConst61));
277 fConst63 = (1.0 / fConst61);
278 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
279 fConst65 = (1 + fConst64);
280 fConst66 = (0 - ((1 - fConst64) / fConst65));
281 fConst67 = (1.0 / fConst65);
282 clear_state_f();
283 }
284
285 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
286 {
287 static_cast<Dsp*>(p)->init(samplingFreq);
288 }
289
290 inline void Dsp::compute(int count, float *input0, float *output0)
291 {
292 #define fslider0 (*fslider0_)
293 #define fslider1 (*fslider1_)
294 #define fslider2 (*fslider2_)
295 #define fslider3 (*fslider3_)
296 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
297 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
298 double fSlow2 = (1.000000000000001e-05 * fslider2);
299 double fSlow3 = fslider3;
300 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
301 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
302 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
303 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
304 double fSlow8 = (2 * (fSlow3 - 0.5));
305 double fSlow9 = (1 - max(0, (0 - fSlow8)));
306 double fSlow10 = (1 - max(0, fSlow8));
307 double fSlow11 = (1.25 * fSlow3);
308 for (int i=0; i<count; i++) {
309 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
310 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
311 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
312 double fTemp0 = (double)input0[i];
313 double fTemp1 = (fTemp0 * (1 - fRec10[0]));
314 double fTemp2 = (1e-15 + (0.027 * fRec9[1]));
315 fVec0[0] = fTemp2;
316 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
317 double fTemp3 = (fConst13 * fRec13[1]);
318 double fTemp4 = (1e-15 + (fTemp0 * fRec10[0]));
319 fRec19[0] = (fTemp4 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
320 double fTemp5 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
321 fVec1[0] = fTemp5;
322 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
323 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
324 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
325 double fTemp6 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
326 fVec2[0] = fTemp6;
327 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
328 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
329 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp3)));
330 double fTemp7 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp3 + (fConst15 * fRec13[0])))))));
331 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
332 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
333 double fTemp8 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
334 fVec3[0] = fTemp8;
335 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
336 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
337 double fTemp9 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
338 double fTemp10 = (fConst13 * fRec24[1]);
339 double fTemp11 = (fConst19 * fRec25[1]);
340 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
341 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
342 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp11)));
343 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp11 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp10)));
344 double fTemp12 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp10 + (fConst15 * fRec24[0])))))));
345 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
346 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
347 double fTemp13 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
348 double fTemp14 = ((1.2589412 * (fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13))))) + (1.584893192 * ((fTemp12 * (1 - (0.3333333333333333 * faustpower<2>(fTemp12)))) + ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + (0.8413951417869425 * (fTemp7 * (1 - (0.3333333333333333 * faustpower<2>(fTemp7)))))))));
349 fVec4[0] = fTemp14;
350 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
351 double fTemp15 = (1e-15 + fTemp1);
352 fRec9[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fSlow11 * ((fTemp15 * (4 - (4 * fabs(fTemp15)))) - fTemp15)) + ((fSlow10 * fTemp4) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp1)))) - 1.581655999999998)) - 191.42014814814814);
353 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
354 double fTemp16 = (fRec8[0] * fRec7[0]);
355 fVec5[0] = fTemp16;
356 fRec6[0] = ((fConst58 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
357 double fTemp17 = (1e-15 + (0.015 * fRec5[1]));
358 fVec6[0] = fTemp17;
359 fRec30[0] = ((fConst63 * (fVec6[0] + fVec6[1])) + (fConst62 * fRec30[1]));
360 fRec5[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec30[0] + fRec6[0]) - 1.204284999999999)) - 169.71433333333334);
361 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
362 double fTemp18 = (fRec7[0] * fRec4[0]);
363 fVec7[0] = fTemp18;
364 fRec3[0] = ((fConst58 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
365 double fTemp19 = (1e-15 + (0.0082 * fRec2[1]));
366 fVec8[0] = fTemp19;
367 fRec31[0] = ((fConst67 * (fVec8[0] + fVec8[1])) + (fConst66 * fRec31[1]));
368 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec31[0] + fRec3[0]) - 0.840702999999999)) - 147.47524390243905);
369 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
370 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
371 // post processing
372 fRec1[1] = fRec1[0];
373 fRec2[1] = fRec2[0];
374 fRec31[1] = fRec31[0];
375 fVec8[1] = fVec8[0];
376 fRec3[1] = fRec3[0];
377 fVec7[1] = fVec7[0];
378 fRec4[1] = fRec4[0];
379 fRec5[1] = fRec5[0];
380 fRec30[1] = fRec30[0];
381 fVec6[1] = fVec6[0];
382 fRec6[1] = fRec6[0];
383 fVec5[1] = fVec5[0];
384 fRec8[1] = fRec8[0];
385 fRec9[1] = fRec9[0];
386 fRec12[1] = fRec12[0];
387 fVec4[1] = fVec4[0];
388 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
389 fRec29[1] = fRec29[0];
390 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
391 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
392 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
393 fRec27[1] = fRec27[0];
394 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
395 fRec21[1] = fRec21[0];
396 fVec3[1] = fVec3[0];
397 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
398 fRec23[1] = fRec23[0];
399 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
400 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
401 fRec15[1] = fRec15[0];
402 fVec2[1] = fVec2[0];
403 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
404 fRec17[1] = fRec17[0];
405 fRec18[1] = fRec18[0];
406 fVec1[1] = fVec1[0];
407 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
408 fRec11[1] = fRec11[0];
409 fVec0[1] = fVec0[0];
410 fRec10[1] = fRec10[0];
411 fRec7[1] = fRec7[0];
412 fRec0[1] = fRec0[0];
413 }
414 #undef fslider0
415 #undef fslider1
416 #undef fslider2
417 #undef fslider3
418 }
419
420 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
421 {
422 static_cast<Dsp*>(p)->compute(count, input0, output0);
423 }
424
425
426 void Dsp::connect(uint32_t port,void* data)
427 {
428 switch ((PortIndex)port)
429 {
430 case DRIVE:
431 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
432 break;
433 case WET_DRY:
434 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
435 break;
436 case PREGAIN:
437 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
438 break;
439 case GAIN1:
440 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
441 break;
442 default:
443 break;
444 }
445 }
446
447 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
448 {
449 static_cast<Dsp*>(p)->connect(port, data);
450 }
451
452
453 PluginLV2 *plugin() {
454 return new Dsp();
455 }
456
457 void Dsp::del_instance(PluginLV2 *p)
458 {
459 delete static_cast<Dsp*>(p);
460 }
461
462 /*
463 typedef enum
464 {
465 DRIVE,
466 WET_DRY,
467 PREGAIN,
468 GAIN1,
469 } PortIndex;
470 */
471
472 } // end namespace gxamp
0 // generated from file '../src/LV2/faust/gxamp10.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp10 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 double fVec0[2];
21 double fConst7;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 FAUSTFLOAT fslider1;
27 FAUSTFLOAT *fslider1_;
28 double fRec8[2];
29 FAUSTFLOAT fslider2;
30 FAUSTFLOAT *fslider2_;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fVec1[2];
36 double fConst14;
37 double fRec12[2];
38 double fConst15;
39 double fConst16;
40 double fConst17;
41 double fConst18;
42 double fConst19;
43 double fConst20;
44 double fConst21;
45 double fConst22;
46 double fConst23;
47 double fConst24;
48 double fConst25;
49 double fConst26;
50 double fConst27;
51 double fConst28;
52 double fConst29;
53 double fConst30;
54 double fConst31;
55 double fConst32;
56 double fConst33;
57 double fConst34;
58 double fConst35;
59 double fConst36;
60 double fConst37;
61 double fConst38;
62 double fConst39;
63 double fConst40;
64 double fConst41;
65 double fConst42;
66 double fConst43;
67 double fConst44;
68 double fRec20[3];
69 double fVec2[2];
70 double fConst45;
71 double fConst46;
72 double fRec19[2];
73 double fConst47;
74 double fRec18[2];
75 double fRec17[3];
76 double fVec3[2];
77 double fConst48;
78 double fConst49;
79 double fRec16[2];
80 double fRec15[3];
81 double fConst50;
82 double fRec14[3];
83 FAUSTFLOAT fslider3;
84 FAUSTFLOAT *fslider3_;
85 double fConst51;
86 double fConst52;
87 double fConst53;
88 double fConst54;
89 double fRec24[2];
90 double fRec23[3];
91 double fVec4[2];
92 double fConst55;
93 double fConst56;
94 double fRec22[2];
95 double fRec21[3];
96 double fConst57;
97 double fConst58;
98 double fConst59;
99 double fConst60;
100 double fRec28[2];
101 double fRec27[3];
102 double fConst61;
103 double fRec26[3];
104 double fRec25[3];
105 double fRec30[2];
106 double fRec29[3];
107 double fVec5[2];
108 double fConst62;
109 double fRec13[2];
110 double fRec10[2];
111 double fConst63;
112 double fRec9[2];
113 double fVec6[2];
114 double fRec7[2];
115 double fConst64;
116 double fConst65;
117 double fConst66;
118 double fVec7[2];
119 double fConst67;
120 double fRec31[2];
121 double fRec6[2];
122 double fRec5[2];
123 double fVec8[2];
124 double fRec4[2];
125 double fRec2[2];
126 double fRec1[2];
127 double fVec9[2];
128 double fRec34[2];
129 double fRec33[2];
130 double fRec32[2];
131 void connect(uint32_t port,void* data);
132 void clear_state_f();
133 void init(uint32_t samplingFreq);
134 void compute(int count, float *input0, float *output0);
135
136 static void clear_state_f_static(PluginLV2*);
137 static void init_static(uint32_t samplingFreq, PluginLV2*);
138 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
139 static void del_instance(PluginLV2 *p);
140 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
141 public:
142 Dsp();
143 ~Dsp();
144 };
145
146
147
148 Dsp::Dsp()
149 : PluginLV2() {
150 version = PLUGINLV2_VERSION;
151 id = "6DJ8";
152 name = N_("6DJ8");
153 mono_audio = compute_static;
154 stereo_audio = 0;
155 set_samplerate = init_static;
156 activate_plugin = 0;
157 connect_ports = connect_static;
158 clear_state = clear_state_f_static;
159 delete_instance = del_instance;
160 }
161
162 Dsp::~Dsp() {
163 }
164
165 inline void Dsp::clear_state_f()
166 {
167 for (int i=0; i<2; i++) fRec0[i] = 0;
168 for (int i=0; i<2; i++) fVec0[i] = 0;
169 for (int i=0; i<2; i++) fRec3[i] = 0;
170 for (int i=0; i<2; i++) fRec8[i] = 0;
171 for (int i=0; i<2; i++) fRec11[i] = 0;
172 for (int i=0; i<2; i++) fVec1[i] = 0;
173 for (int i=0; i<2; i++) fRec12[i] = 0;
174 for (int i=0; i<3; i++) fRec20[i] = 0;
175 for (int i=0; i<2; i++) fVec2[i] = 0;
176 for (int i=0; i<2; i++) fRec19[i] = 0;
177 for (int i=0; i<2; i++) fRec18[i] = 0;
178 for (int i=0; i<3; i++) fRec17[i] = 0;
179 for (int i=0; i<2; i++) fVec3[i] = 0;
180 for (int i=0; i<2; i++) fRec16[i] = 0;
181 for (int i=0; i<3; i++) fRec15[i] = 0;
182 for (int i=0; i<3; i++) fRec14[i] = 0;
183 for (int i=0; i<2; i++) fRec24[i] = 0;
184 for (int i=0; i<3; i++) fRec23[i] = 0;
185 for (int i=0; i<2; i++) fVec4[i] = 0;
186 for (int i=0; i<2; i++) fRec22[i] = 0;
187 for (int i=0; i<3; i++) fRec21[i] = 0;
188 for (int i=0; i<2; i++) fRec28[i] = 0;
189 for (int i=0; i<3; i++) fRec27[i] = 0;
190 for (int i=0; i<3; i++) fRec26[i] = 0;
191 for (int i=0; i<3; i++) fRec25[i] = 0;
192 for (int i=0; i<2; i++) fRec30[i] = 0;
193 for (int i=0; i<3; i++) fRec29[i] = 0;
194 for (int i=0; i<2; i++) fVec5[i] = 0;
195 for (int i=0; i<2; i++) fRec13[i] = 0;
196 for (int i=0; i<2; i++) fRec10[i] = 0;
197 for (int i=0; i<2; i++) fRec9[i] = 0;
198 for (int i=0; i<2; i++) fVec6[i] = 0;
199 for (int i=0; i<2; i++) fRec7[i] = 0;
200 for (int i=0; i<2; i++) fVec7[i] = 0;
201 for (int i=0; i<2; i++) fRec31[i] = 0;
202 for (int i=0; i<2; i++) fRec6[i] = 0;
203 for (int i=0; i<2; i++) fRec5[i] = 0;
204 for (int i=0; i<2; i++) fVec8[i] = 0;
205 for (int i=0; i<2; i++) fRec4[i] = 0;
206 for (int i=0; i<2; i++) fRec2[i] = 0;
207 for (int i=0; i<2; i++) fRec1[i] = 0;
208 for (int i=0; i<2; i++) fVec9[i] = 0;
209 for (int i=0; i<2; i++) fRec34[i] = 0;
210 for (int i=0; i<2; i++) fRec33[i] = 0;
211 for (int i=0; i<2; i++) fRec32[i] = 0;
212 }
213
214 void Dsp::clear_state_f_static(PluginLV2 *p)
215 {
216 static_cast<Dsp*>(p)->clear_state_f();
217 }
218
219 inline void Dsp::init(uint32_t samplingFreq)
220 {
221 fSamplingFreq = samplingFreq;
222 iConst0 = min(192000, max(1, fSamplingFreq));
223 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
224 fConst2 = (1 + fConst1);
225 fConst3 = (0 - ((1 - fConst1) / fConst2));
226 fConst4 = (1.0 / tan((609.4689747964198 / iConst0)));
227 fConst5 = (1 + fConst4);
228 fConst6 = (0 - ((1 - fConst4) / fConst5));
229 fConst7 = (1.0 / fConst5);
230 fConst8 = (1.0 / tan((20517.741620594938 / iConst0)));
231 fConst9 = (1 + fConst8);
232 fConst10 = (0 - ((1 - fConst8) / fConst9));
233 fConst11 = (1.0 / tan((270.1769682087222 / iConst0)));
234 fConst12 = (1 + fConst11);
235 fConst13 = (0 - ((1 - fConst11) / fConst12));
236 fConst14 = (1.0 / fConst12);
237 fConst15 = tan((942.4777960769379 / iConst0));
238 fConst16 = (1.0 / faustpower<2>(fConst15));
239 fConst17 = (2 * (1 - fConst16));
240 fConst18 = (1.0 / fConst15);
241 fConst19 = (1 + ((fConst18 - 1.0) / fConst15));
242 fConst20 = (1.0 / (1 + ((1.0 + fConst18) / fConst15)));
243 fConst21 = tan((3769.9111843077517 / iConst0));
244 fConst22 = (1.0 / faustpower<2>(fConst21));
245 fConst23 = (2 * (1 - fConst22));
246 fConst24 = (1.0 / fConst21);
247 fConst25 = (1 + ((fConst24 - 1.0000000000000004) / fConst21));
248 fConst26 = (1 + ((fConst24 + 1.0000000000000004) / fConst21));
249 fConst27 = (1.0 / fConst26);
250 fConst28 = (1 + fConst24);
251 fConst29 = (0 - ((1 - fConst24) / fConst28));
252 fConst30 = tan((10053.096491487338 / iConst0));
253 fConst31 = (1.0 / faustpower<2>(fConst30));
254 fConst32 = (2 * (1 - fConst31));
255 fConst33 = (1.0 / fConst30);
256 fConst34 = (1 + ((fConst33 - 1.0000000000000004) / fConst30));
257 fConst35 = (1 + ((1.0000000000000004 + fConst33) / fConst30));
258 fConst36 = (1.0 / fConst35);
259 fConst37 = (1 + fConst33);
260 fConst38 = (0 - ((1 - fConst33) / fConst37));
261 fConst39 = tan((47123.8898038469 / iConst0));
262 fConst40 = (2 * (1 - (1.0 / faustpower<2>(fConst39))));
263 fConst41 = (1.0 / fConst39);
264 fConst42 = (1 + ((fConst41 - 1.414213562373095) / fConst39));
265 fConst43 = (1 + ((1.414213562373095 + fConst41) / fConst39));
266 fConst44 = (1.0 / fConst43);
267 fConst45 = (0 - fConst1);
268 fConst46 = (1.0 / (fConst2 * fConst43));
269 fConst47 = (1.0 / fConst37);
270 fConst48 = (0 - fConst24);
271 fConst49 = (1.0 / (fConst28 * fConst35));
272 fConst50 = (2 * (0 - fConst22));
273 fConst51 = (1 + ((fConst18 - 1.0000000000000004) / fConst15));
274 fConst52 = (1.0 / (1 + ((fConst18 + 1.0000000000000004) / fConst15)));
275 fConst53 = (1 + fConst18);
276 fConst54 = (0 - ((1 - fConst18) / fConst53));
277 fConst55 = (0 - fConst18);
278 fConst56 = (1.0 / (fConst53 * fConst26));
279 fConst57 = (2 * (0 - fConst16));
280 fConst58 = (1 + ((fConst24 - 1.0) / fConst21));
281 fConst59 = (1.0 / (1 + ((1.0 + fConst24) / fConst21)));
282 fConst60 = (0 - fConst33);
283 fConst61 = (2 * (0 - fConst31));
284 fConst62 = (1.0 / fConst9);
285 fConst63 = (0.05 / fConst2);
286 fConst64 = (1.0 / tan((414.6902302738527 / iConst0)));
287 fConst65 = (1 + fConst64);
288 fConst66 = (0 - ((1 - fConst64) / fConst65));
289 fConst67 = (1.0 / fConst65);
290 clear_state_f();
291 }
292
293 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
294 {
295 static_cast<Dsp*>(p)->init(samplingFreq);
296 }
297
298 inline void Dsp::compute(int count, float *input0, float *output0)
299 {
300 #define fslider0 (*fslider0_)
301 #define fslider1 (*fslider1_)
302 #define fslider2 (*fslider2_)
303 #define fslider3 (*fslider3_)
304 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
305 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
306 double fSlow2 = (1.000000000000001e-05 * fslider2);
307 double fSlow3 = fslider3;
308 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
309 double fSlow5 = (fConst52 * pow(1e+01,(2 * fSlow3)));
310 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
311 double fSlow7 = (fConst52 * pow(1e+01,(0.9 * fSlow3)));
312 double fSlow8 = (2 * (fSlow3 - 0.5));
313 double fSlow9 = (1 - max(0, (0 - fSlow8)));
314 double fSlow10 = (1 - max(0, fSlow8));
315 double fSlow11 = (1.25 * fSlow3);
316 for (int i=0; i<count; i++) {
317 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
318 double fTemp0 = (1e-15 + (0.0082 * fRec2[1]));
319 fVec0[0] = fTemp0;
320 fRec3[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec3[1]));
321 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
322 fRec11[0] = (fSlow2 + (0.999 * fRec11[1]));
323 double fTemp1 = (double)input0[i];
324 double fTemp2 = (fTemp1 * (1 - fRec11[0]));
325 double fTemp3 = (1e-15 + (0.027 * fRec10[1]));
326 fVec1[0] = fTemp3;
327 fRec12[0] = ((fConst14 * (fVec1[0] + fVec1[1])) + (fConst13 * fRec12[1]));
328 double fTemp4 = (fConst17 * fRec14[1]);
329 double fTemp5 = (1e-15 + (fTemp1 * fRec11[0]));
330 fRec20[0] = (fTemp5 - (fConst44 * ((fConst42 * fRec20[2]) + (fConst40 * fRec20[1]))));
331 double fTemp6 = (fRec20[2] + (fRec20[0] + (2 * fRec20[1])));
332 fVec2[0] = fTemp6;
333 fRec19[0] = ((fConst46 * ((fConst45 * fVec2[1]) + (fConst1 * fVec2[0]))) + (fConst3 * fRec19[1]));
334 fRec18[0] = ((fConst47 * (fRec19[0] + fRec19[1])) + (fConst38 * fRec18[1]));
335 fRec17[0] = (fRec18[0] - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
336 double fTemp7 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
337 fVec3[0] = fTemp7;
338 fRec16[0] = ((fConst49 * ((fConst48 * fVec3[1]) + (fConst24 * fVec3[0]))) + (fConst29 * fRec16[1]));
339 fRec15[0] = (fRec16[0] - (fConst27 * ((fConst25 * fRec15[2]) + (fConst23 * fRec15[1]))));
340 fRec14[0] = ((fConst27 * (((fConst22 * fRec15[0]) + (fConst50 * fRec15[1])) + (fConst22 * fRec15[2]))) - (fConst20 * ((fConst19 * fRec14[2]) + fTemp4)));
341 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec14[2] + (fConst20 * (fTemp4 + (fConst19 * fRec14[0])))))));
342 fRec24[0] = ((fConst49 * (fVec3[0] + fVec3[1])) + (fConst29 * fRec24[1]));
343 fRec23[0] = (fRec24[0] - (fConst27 * ((fConst25 * fRec23[2]) + (fConst23 * fRec23[1]))));
344 double fTemp9 = (fRec23[2] + (fRec23[0] + (2 * fRec23[1])));
345 fVec4[0] = fTemp9;
346 fRec22[0] = ((fConst56 * ((fConst55 * fVec4[1]) + (fConst18 * fVec4[0]))) + (fConst54 * fRec22[1]));
347 fRec21[0] = (fRec22[0] - (fConst52 * ((fConst51 * fRec21[2]) + (fConst17 * fRec21[1]))));
348 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst16 * fRec21[0]) + (fConst57 * fRec21[1])) + (fConst16 * fRec21[2])))));
349 double fTemp11 = (fConst17 * fRec25[1]);
350 double fTemp12 = (fConst23 * fRec26[1]);
351 fRec28[0] = ((fConst47 * ((fConst60 * fRec19[1]) + (fConst33 * fRec19[0]))) + (fConst38 * fRec28[1]));
352 fRec27[0] = (fRec28[0] - (fConst36 * ((fConst34 * fRec27[2]) + (fConst32 * fRec27[1]))));
353 fRec26[0] = ((fConst36 * (((fConst31 * fRec27[0]) + (fConst61 * fRec27[1])) + (fConst31 * fRec27[2]))) - (fConst59 * ((fConst58 * fRec26[2]) + fTemp12)));
354 fRec25[0] = ((fRec26[2] + (fConst59 * (fTemp12 + (fConst58 * fRec26[0])))) - (fConst20 * ((fConst19 * fRec25[2]) + fTemp11)));
355 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec25[2] + (fConst20 * (fTemp11 + (fConst19 * fRec25[0])))))));
356 fRec30[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst54 * fRec30[1]));
357 fRec29[0] = (fRec30[0] - (fConst52 * ((fConst51 * fRec29[2]) + (fConst17 * fRec29[1]))));
358 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec29[2] + (fRec29[0] + (2 * fRec29[1]))))));
359 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
360 fVec5[0] = fTemp15;
361 fRec13[0] = ((fConst62 * (fVec5[0] + fVec5[1])) + (fConst10 * fRec13[1]));
362 double fTemp16 = (1e-15 + fTemp2);
363 fRec10[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fSlow11 * ((fTemp16 * (4 - (4 * fabs(fTemp16)))) - fTemp16)) + ((fSlow10 * fTemp5) + ((fSlow9 * fRec13[0]) + (fRec12[0] + fTemp2)))) - 1.863945999999998)) - 60.96496296296296);
364 fRec9[0] = ((fConst63 * ((fConst45 * fRec10[1]) + (fConst1 * fRec10[0]))) + (fConst3 * fRec9[1]));
365 double fTemp17 = (fRec9[0] * fRec8[0]);
366 fVec6[0] = fTemp17;
367 fRec7[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst10 * fRec7[1]));
368 double fTemp18 = (1e-15 + (0.015 * fRec6[1]));
369 fVec7[0] = fTemp18;
370 fRec31[0] = ((fConst67 * (fVec7[0] + fVec7[1])) + (fConst66 * fRec31[1]));
371 fRec6[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec31[0] + fRec7[0]) - 1.2716089999999989)) - 45.22606666666667);
372 fRec5[0] = ((fConst63 * ((fConst45 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
373 double fTemp19 = (fRec8[0] * fRec5[0]);
374 fVec8[0] = fTemp19;
375 fRec4[0] = ((fConst62 * (fVec8[0] + fVec8[1])) + (fConst10 * fRec4[1]));
376 fRec2[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec4[0] + fRec3[0]) - 0.797042999999999)) - 32.799634146341475);
377 fRec1[0] = ((fConst63 * ((fConst45 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
378 double fTemp20 = (1e-15 + (0.0082 * fRec33[1]));
379 fVec9[0] = fTemp20;
380 fRec34[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec34[1]));
381 fRec33[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec34[0] + fRec4[0]) - 0.799030999999999)) - 32.55719512195121);
382 fRec32[0] = ((fConst63 * ((fConst45 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
383 output0[i] = (FAUSTFLOAT)((fRec32[0] + fRec1[0]) * fRec0[0]);
384 // post processing
385 fRec32[1] = fRec32[0];
386 fRec33[1] = fRec33[0];
387 fRec34[1] = fRec34[0];
388 fVec9[1] = fVec9[0];
389 fRec1[1] = fRec1[0];
390 fRec2[1] = fRec2[0];
391 fRec4[1] = fRec4[0];
392 fVec8[1] = fVec8[0];
393 fRec5[1] = fRec5[0];
394 fRec6[1] = fRec6[0];
395 fRec31[1] = fRec31[0];
396 fVec7[1] = fVec7[0];
397 fRec7[1] = fRec7[0];
398 fVec6[1] = fVec6[0];
399 fRec9[1] = fRec9[0];
400 fRec10[1] = fRec10[0];
401 fRec13[1] = fRec13[0];
402 fVec5[1] = fVec5[0];
403 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
404 fRec30[1] = fRec30[0];
405 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
406 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
407 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
408 fRec28[1] = fRec28[0];
409 fRec21[2] = fRec21[1]; fRec21[1] = fRec21[0];
410 fRec22[1] = fRec22[0];
411 fVec4[1] = fVec4[0];
412 fRec23[2] = fRec23[1]; fRec23[1] = fRec23[0];
413 fRec24[1] = fRec24[0];
414 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
415 fRec15[2] = fRec15[1]; fRec15[1] = fRec15[0];
416 fRec16[1] = fRec16[0];
417 fVec3[1] = fVec3[0];
418 fRec17[2] = fRec17[1]; fRec17[1] = fRec17[0];
419 fRec18[1] = fRec18[0];
420 fRec19[1] = fRec19[0];
421 fVec2[1] = fVec2[0];
422 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
423 fRec12[1] = fRec12[0];
424 fVec1[1] = fVec1[0];
425 fRec11[1] = fRec11[0];
426 fRec8[1] = fRec8[0];
427 fRec3[1] = fRec3[0];
428 fVec0[1] = fVec0[0];
429 fRec0[1] = fRec0[0];
430 }
431 #undef fslider0
432 #undef fslider1
433 #undef fslider2
434 #undef fslider3
435 }
436
437 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
438 {
439 static_cast<Dsp*>(p)->compute(count, input0, output0);
440 }
441
442
443 void Dsp::connect(uint32_t port,void* data)
444 {
445 switch ((PortIndex)port)
446 {
447 case DRIVE:
448 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
449 break;
450 case WET_DRY:
451 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
452 break;
453 case PREGAIN:
454 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
455 break;
456 case GAIN1:
457 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
458 break;
459 default:
460 break;
461 }
462 }
463
464 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
465 {
466 static_cast<Dsp*>(p)->connect(port, data);
467 }
468
469
470 PluginLV2 *plugin() {
471 return new Dsp();
472 }
473
474 void Dsp::del_instance(PluginLV2 *p)
475 {
476 delete static_cast<Dsp*>(p);
477 }
478
479 /*
480 typedef enum
481 {
482 DRIVE,
483 WET_DRY,
484 PREGAIN,
485 GAIN1,
486 } PortIndex;
487 */
488
489 } // end namespace gxamp10
0 // generated from file '../src/LV2/faust/gxamp10_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp10_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 double fVec0[2];
21 double fConst7;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 FAUSTFLOAT fslider1;
27 FAUSTFLOAT *fslider1_;
28 double fRec8[2];
29 FAUSTFLOAT fslider2;
30 FAUSTFLOAT *fslider2_;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fVec1[2];
36 double fConst14;
37 double fRec12[2];
38 double fConst15;
39 double fConst16;
40 double fConst17;
41 double fConst18;
42 double fConst19;
43 double fConst20;
44 double fConst21;
45 double fConst22;
46 double fConst23;
47 double fConst24;
48 double fConst25;
49 double fConst26;
50 double fConst27;
51 double fConst28;
52 double fConst29;
53 double fConst30;
54 double fConst31;
55 double fConst32;
56 double fConst33;
57 double fConst34;
58 double fConst35;
59 double fConst36;
60 double fConst37;
61 double fConst38;
62 double fConst39;
63 double fConst40;
64 double fConst41;
65 double fConst42;
66 double fConst43;
67 double fConst44;
68 double fRec20[3];
69 double fVec2[2];
70 double fConst45;
71 double fConst46;
72 double fRec19[2];
73 double fConst47;
74 double fRec18[2];
75 double fRec17[3];
76 double fVec3[2];
77 double fConst48;
78 double fConst49;
79 double fRec16[2];
80 double fRec15[3];
81 double fConst50;
82 double fRec14[3];
83 FAUSTFLOAT fslider3;
84 FAUSTFLOAT *fslider3_;
85 double fConst51;
86 double fConst52;
87 double fConst53;
88 double fConst54;
89 double fRec24[2];
90 double fRec23[3];
91 double fVec4[2];
92 double fConst55;
93 double fConst56;
94 double fRec22[2];
95 double fRec21[3];
96 double fConst57;
97 double fConst58;
98 double fConst59;
99 double fConst60;
100 double fRec28[2];
101 double fRec27[3];
102 double fConst61;
103 double fRec26[3];
104 double fRec25[3];
105 double fRec30[2];
106 double fRec29[3];
107 double fVec5[2];
108 double fConst62;
109 double fRec13[2];
110 double fRec10[2];
111 double fConst63;
112 double fRec9[2];
113 double fVec6[2];
114 double fRec7[2];
115 double fConst64;
116 double fConst65;
117 double fConst66;
118 double fVec7[2];
119 double fConst67;
120 double fRec31[2];
121 double fRec6[2];
122 double fRec5[2];
123 double fVec8[2];
124 double fRec4[2];
125 double fRec2[2];
126 double fRec1[2];
127 double fVec9[2];
128 double fRec34[2];
129 double fRec33[2];
130 double fRec32[2];
131 double fVec10[2];
132 double fRec37[2];
133 double fVec11[2];
134 double fRec44[2];
135 double fRec52[3];
136 double fVec12[2];
137 double fRec51[2];
138 double fRec50[2];
139 double fRec49[3];
140 double fVec13[2];
141 double fRec48[2];
142 double fRec47[3];
143 double fRec46[3];
144 double fRec56[2];
145 double fRec55[3];
146 double fVec14[2];
147 double fRec54[2];
148 double fRec53[3];
149 double fRec60[2];
150 double fRec59[3];
151 double fRec58[3];
152 double fRec57[3];
153 double fRec62[2];
154 double fRec61[3];
155 double fVec15[2];
156 double fRec45[2];
157 double fRec43[2];
158 double fRec42[2];
159 double fVec16[2];
160 double fRec41[2];
161 double fVec17[2];
162 double fRec63[2];
163 double fRec40[2];
164 double fRec39[2];
165 double fVec18[2];
166 double fRec38[2];
167 double fRec36[2];
168 double fRec35[2];
169 double fVec19[2];
170 double fRec66[2];
171 double fRec65[2];
172 double fRec64[2];
173 void connect(uint32_t port,void* data);
174 void clear_state_f();
175 void init(uint32_t samplingFreq);
176 void compute(int count, float *input0, float *input1, float *output0, float *output1);
177
178 static void clear_state_f_static(PluginLV2*);
179 static void init_static(uint32_t samplingFreq, PluginLV2*);
180 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
181 static void del_instance(PluginLV2 *p);
182 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
183 public:
184 Dsp();
185 ~Dsp();
186 };
187
188
189
190 Dsp::Dsp()
191 : PluginLV2() {
192 version = PLUGINLV2_VERSION;
193 id = "6DJ8";
194 name = N_("6DJ8");
195 mono_audio = 0;
196 stereo_audio = compute_static;
197 set_samplerate = init_static;
198 activate_plugin = 0;
199 connect_ports = connect_static;
200 clear_state = clear_state_f_static;
201 delete_instance = del_instance;
202 }
203
204 Dsp::~Dsp() {
205 }
206
207 inline void Dsp::clear_state_f()
208 {
209 for (int i=0; i<2; i++) fRec0[i] = 0;
210 for (int i=0; i<2; i++) fVec0[i] = 0;
211 for (int i=0; i<2; i++) fRec3[i] = 0;
212 for (int i=0; i<2; i++) fRec8[i] = 0;
213 for (int i=0; i<2; i++) fRec11[i] = 0;
214 for (int i=0; i<2; i++) fVec1[i] = 0;
215 for (int i=0; i<2; i++) fRec12[i] = 0;
216 for (int i=0; i<3; i++) fRec20[i] = 0;
217 for (int i=0; i<2; i++) fVec2[i] = 0;
218 for (int i=0; i<2; i++) fRec19[i] = 0;
219 for (int i=0; i<2; i++) fRec18[i] = 0;
220 for (int i=0; i<3; i++) fRec17[i] = 0;
221 for (int i=0; i<2; i++) fVec3[i] = 0;
222 for (int i=0; i<2; i++) fRec16[i] = 0;
223 for (int i=0; i<3; i++) fRec15[i] = 0;
224 for (int i=0; i<3; i++) fRec14[i] = 0;
225 for (int i=0; i<2; i++) fRec24[i] = 0;
226 for (int i=0; i<3; i++) fRec23[i] = 0;
227 for (int i=0; i<2; i++) fVec4[i] = 0;
228 for (int i=0; i<2; i++) fRec22[i] = 0;
229 for (int i=0; i<3; i++) fRec21[i] = 0;
230 for (int i=0; i<2; i++) fRec28[i] = 0;
231 for (int i=0; i<3; i++) fRec27[i] = 0;
232 for (int i=0; i<3; i++) fRec26[i] = 0;
233 for (int i=0; i<3; i++) fRec25[i] = 0;
234 for (int i=0; i<2; i++) fRec30[i] = 0;
235 for (int i=0; i<3; i++) fRec29[i] = 0;
236 for (int i=0; i<2; i++) fVec5[i] = 0;
237 for (int i=0; i<2; i++) fRec13[i] = 0;
238 for (int i=0; i<2; i++) fRec10[i] = 0;
239 for (int i=0; i<2; i++) fRec9[i] = 0;
240 for (int i=0; i<2; i++) fVec6[i] = 0;
241 for (int i=0; i<2; i++) fRec7[i] = 0;
242 for (int i=0; i<2; i++) fVec7[i] = 0;
243 for (int i=0; i<2; i++) fRec31[i] = 0;
244 for (int i=0; i<2; i++) fRec6[i] = 0;
245 for (int i=0; i<2; i++) fRec5[i] = 0;
246 for (int i=0; i<2; i++) fVec8[i] = 0;
247 for (int i=0; i<2; i++) fRec4[i] = 0;
248 for (int i=0; i<2; i++) fRec2[i] = 0;
249 for (int i=0; i<2; i++) fRec1[i] = 0;
250 for (int i=0; i<2; i++) fVec9[i] = 0;
251 for (int i=0; i<2; i++) fRec34[i] = 0;
252 for (int i=0; i<2; i++) fRec33[i] = 0;
253 for (int i=0; i<2; i++) fRec32[i] = 0;
254 for (int i=0; i<2; i++) fVec10[i] = 0;
255 for (int i=0; i<2; i++) fRec37[i] = 0;
256 for (int i=0; i<2; i++) fVec11[i] = 0;
257 for (int i=0; i<2; i++) fRec44[i] = 0;
258 for (int i=0; i<3; i++) fRec52[i] = 0;
259 for (int i=0; i<2; i++) fVec12[i] = 0;
260 for (int i=0; i<2; i++) fRec51[i] = 0;
261 for (int i=0; i<2; i++) fRec50[i] = 0;
262 for (int i=0; i<3; i++) fRec49[i] = 0;
263 for (int i=0; i<2; i++) fVec13[i] = 0;
264 for (int i=0; i<2; i++) fRec48[i] = 0;
265 for (int i=0; i<3; i++) fRec47[i] = 0;
266 for (int i=0; i<3; i++) fRec46[i] = 0;
267 for (int i=0; i<2; i++) fRec56[i] = 0;
268 for (int i=0; i<3; i++) fRec55[i] = 0;
269 for (int i=0; i<2; i++) fVec14[i] = 0;
270 for (int i=0; i<2; i++) fRec54[i] = 0;
271 for (int i=0; i<3; i++) fRec53[i] = 0;
272 for (int i=0; i<2; i++) fRec60[i] = 0;
273 for (int i=0; i<3; i++) fRec59[i] = 0;
274 for (int i=0; i<3; i++) fRec58[i] = 0;
275 for (int i=0; i<3; i++) fRec57[i] = 0;
276 for (int i=0; i<2; i++) fRec62[i] = 0;
277 for (int i=0; i<3; i++) fRec61[i] = 0;
278 for (int i=0; i<2; i++) fVec15[i] = 0;
279 for (int i=0; i<2; i++) fRec45[i] = 0;
280 for (int i=0; i<2; i++) fRec43[i] = 0;
281 for (int i=0; i<2; i++) fRec42[i] = 0;
282 for (int i=0; i<2; i++) fVec16[i] = 0;
283 for (int i=0; i<2; i++) fRec41[i] = 0;
284 for (int i=0; i<2; i++) fVec17[i] = 0;
285 for (int i=0; i<2; i++) fRec63[i] = 0;
286 for (int i=0; i<2; i++) fRec40[i] = 0;
287 for (int i=0; i<2; i++) fRec39[i] = 0;
288 for (int i=0; i<2; i++) fVec18[i] = 0;
289 for (int i=0; i<2; i++) fRec38[i] = 0;
290 for (int i=0; i<2; i++) fRec36[i] = 0;
291 for (int i=0; i<2; i++) fRec35[i] = 0;
292 for (int i=0; i<2; i++) fVec19[i] = 0;
293 for (int i=0; i<2; i++) fRec66[i] = 0;
294 for (int i=0; i<2; i++) fRec65[i] = 0;
295 for (int i=0; i<2; i++) fRec64[i] = 0;
296 }
297
298 void Dsp::clear_state_f_static(PluginLV2 *p)
299 {
300 static_cast<Dsp*>(p)->clear_state_f();
301 }
302
303 inline void Dsp::init(uint32_t samplingFreq)
304 {
305 fSamplingFreq = samplingFreq;
306 iConst0 = min(192000, max(1, fSamplingFreq));
307 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
308 fConst2 = (1 + fConst1);
309 fConst3 = (0 - ((1 - fConst1) / fConst2));
310 fConst4 = (1.0 / tan((609.4689747964198 / iConst0)));
311 fConst5 = (1 + fConst4);
312 fConst6 = (0 - ((1 - fConst4) / fConst5));
313 fConst7 = (1.0 / fConst5);
314 fConst8 = (1.0 / tan((20517.741620594938 / iConst0)));
315 fConst9 = (1 + fConst8);
316 fConst10 = (0 - ((1 - fConst8) / fConst9));
317 fConst11 = (1.0 / tan((270.1769682087222 / iConst0)));
318 fConst12 = (1 + fConst11);
319 fConst13 = (0 - ((1 - fConst11) / fConst12));
320 fConst14 = (1.0 / fConst12);
321 fConst15 = tan((942.4777960769379 / iConst0));
322 fConst16 = (1.0 / faustpower<2>(fConst15));
323 fConst17 = (2 * (1 - fConst16));
324 fConst18 = (1.0 / fConst15);
325 fConst19 = (1 + ((fConst18 - 1.0) / fConst15));
326 fConst20 = (1.0 / (1 + ((1.0 + fConst18) / fConst15)));
327 fConst21 = tan((3769.9111843077517 / iConst0));
328 fConst22 = (1.0 / faustpower<2>(fConst21));
329 fConst23 = (2 * (1 - fConst22));
330 fConst24 = (1.0 / fConst21);
331 fConst25 = (1 + ((fConst24 - 1.0000000000000004) / fConst21));
332 fConst26 = (1 + ((fConst24 + 1.0000000000000004) / fConst21));
333 fConst27 = (1.0 / fConst26);
334 fConst28 = (1 + fConst24);
335 fConst29 = (0 - ((1 - fConst24) / fConst28));
336 fConst30 = tan((10053.096491487338 / iConst0));
337 fConst31 = (1.0 / faustpower<2>(fConst30));
338 fConst32 = (2 * (1 - fConst31));
339 fConst33 = (1.0 / fConst30);
340 fConst34 = (1 + ((fConst33 - 1.0000000000000004) / fConst30));
341 fConst35 = (1 + ((1.0000000000000004 + fConst33) / fConst30));
342 fConst36 = (1.0 / fConst35);
343 fConst37 = (1 + fConst33);
344 fConst38 = (0 - ((1 - fConst33) / fConst37));
345 fConst39 = tan((47123.8898038469 / iConst0));
346 fConst40 = (2 * (1 - (1.0 / faustpower<2>(fConst39))));
347 fConst41 = (1.0 / fConst39);
348 fConst42 = (1 + ((fConst41 - 1.414213562373095) / fConst39));
349 fConst43 = (1 + ((1.414213562373095 + fConst41) / fConst39));
350 fConst44 = (1.0 / fConst43);
351 fConst45 = (0 - fConst1);
352 fConst46 = (1.0 / (fConst2 * fConst43));
353 fConst47 = (1.0 / fConst37);
354 fConst48 = (0 - fConst24);
355 fConst49 = (1.0 / (fConst28 * fConst35));
356 fConst50 = (2 * (0 - fConst22));
357 fConst51 = (1 + ((fConst18 - 1.0000000000000004) / fConst15));
358 fConst52 = (1.0 / (1 + ((fConst18 + 1.0000000000000004) / fConst15)));
359 fConst53 = (1 + fConst18);
360 fConst54 = (0 - ((1 - fConst18) / fConst53));
361 fConst55 = (0 - fConst18);
362 fConst56 = (1.0 / (fConst53 * fConst26));
363 fConst57 = (2 * (0 - fConst16));
364 fConst58 = (1 + ((fConst24 - 1.0) / fConst21));
365 fConst59 = (1.0 / (1 + ((1.0 + fConst24) / fConst21)));
366 fConst60 = (0 - fConst33);
367 fConst61 = (2 * (0 - fConst31));
368 fConst62 = (1.0 / fConst9);
369 fConst63 = (0.05 / fConst2);
370 fConst64 = (1.0 / tan((414.6902302738527 / iConst0)));
371 fConst65 = (1 + fConst64);
372 fConst66 = (0 - ((1 - fConst64) / fConst65));
373 fConst67 = (1.0 / fConst65);
374 clear_state_f();
375 }
376
377 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
378 {
379 static_cast<Dsp*>(p)->init(samplingFreq);
380 }
381
382 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
383 {
384 #define fslider0 (*fslider0_)
385 #define fslider1 (*fslider1_)
386 #define fslider2 (*fslider2_)
387 #define fslider3 (*fslider3_)
388 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
389 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
390 double fSlow2 = (1.000000000000001e-05 * fslider2);
391 double fSlow3 = fslider3;
392 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
393 double fSlow5 = (fConst52 * pow(1e+01,(2 * fSlow3)));
394 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
395 double fSlow7 = (fConst52 * pow(1e+01,(0.9 * fSlow3)));
396 double fSlow8 = (2 * (fSlow3 - 0.5));
397 double fSlow9 = (1 - max(0, (0 - fSlow8)));
398 double fSlow10 = (1 - max(0, fSlow8));
399 double fSlow11 = (1.25 * fSlow3);
400 for (int i=0; i<count; i++) {
401 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
402 double fTemp0 = (1e-15 + (0.0082 * fRec2[1]));
403 fVec0[0] = fTemp0;
404 fRec3[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec3[1]));
405 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
406 fRec11[0] = (fSlow2 + (0.999 * fRec11[1]));
407 double fTemp1 = (1 - fRec11[0]);
408 double fTemp2 = (double)input0[i];
409 double fTemp3 = (fTemp2 * fTemp1);
410 double fTemp4 = (1e-15 + (0.027 * fRec10[1]));
411 fVec1[0] = fTemp4;
412 fRec12[0] = ((fConst14 * (fVec1[0] + fVec1[1])) + (fConst13 * fRec12[1]));
413 double fTemp5 = (fConst17 * fRec14[1]);
414 double fTemp6 = (1e-15 + (fTemp2 * fRec11[0]));
415 fRec20[0] = (fTemp6 - (fConst44 * ((fConst42 * fRec20[2]) + (fConst40 * fRec20[1]))));
416 double fTemp7 = (fRec20[2] + (fRec20[0] + (2 * fRec20[1])));
417 fVec2[0] = fTemp7;
418 fRec19[0] = ((fConst46 * ((fConst45 * fVec2[1]) + (fConst1 * fVec2[0]))) + (fConst3 * fRec19[1]));
419 fRec18[0] = ((fConst47 * (fRec19[0] + fRec19[1])) + (fConst38 * fRec18[1]));
420 fRec17[0] = (fRec18[0] - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
421 double fTemp8 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
422 fVec3[0] = fTemp8;
423 fRec16[0] = ((fConst49 * ((fConst48 * fVec3[1]) + (fConst24 * fVec3[0]))) + (fConst29 * fRec16[1]));
424 fRec15[0] = (fRec16[0] - (fConst27 * ((fConst25 * fRec15[2]) + (fConst23 * fRec15[1]))));
425 fRec14[0] = ((fConst27 * (((fConst22 * fRec15[0]) + (fConst50 * fRec15[1])) + (fConst22 * fRec15[2]))) - (fConst20 * ((fConst19 * fRec14[2]) + fTemp5)));
426 double fTemp9 = max(-1, min(1, (fSlow4 * (fRec14[2] + (fConst20 * (fTemp5 + (fConst19 * fRec14[0])))))));
427 fRec24[0] = ((fConst49 * (fVec3[0] + fVec3[1])) + (fConst29 * fRec24[1]));
428 fRec23[0] = (fRec24[0] - (fConst27 * ((fConst25 * fRec23[2]) + (fConst23 * fRec23[1]))));
429 double fTemp10 = (fRec23[2] + (fRec23[0] + (2 * fRec23[1])));
430 fVec4[0] = fTemp10;
431 fRec22[0] = ((fConst56 * ((fConst55 * fVec4[1]) + (fConst18 * fVec4[0]))) + (fConst54 * fRec22[1]));
432 fRec21[0] = (fRec22[0] - (fConst52 * ((fConst51 * fRec21[2]) + (fConst17 * fRec21[1]))));
433 double fTemp11 = max(-1, min(1, (fSlow5 * (((fConst16 * fRec21[0]) + (fConst57 * fRec21[1])) + (fConst16 * fRec21[2])))));
434 double fTemp12 = (fConst17 * fRec25[1]);
435 double fTemp13 = (fConst23 * fRec26[1]);
436 fRec28[0] = ((fConst47 * ((fConst60 * fRec19[1]) + (fConst33 * fRec19[0]))) + (fConst38 * fRec28[1]));
437 fRec27[0] = (fRec28[0] - (fConst36 * ((fConst34 * fRec27[2]) + (fConst32 * fRec27[1]))));
438 fRec26[0] = ((fConst36 * (((fConst31 * fRec27[0]) + (fConst61 * fRec27[1])) + (fConst31 * fRec27[2]))) - (fConst59 * ((fConst58 * fRec26[2]) + fTemp13)));
439 fRec25[0] = ((fRec26[2] + (fConst59 * (fTemp13 + (fConst58 * fRec26[0])))) - (fConst20 * ((fConst19 * fRec25[2]) + fTemp12)));
440 double fTemp14 = max(-1, min(1, (fSlow6 * (fRec25[2] + (fConst20 * (fTemp12 + (fConst19 * fRec25[0])))))));
441 fRec30[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst54 * fRec30[1]));
442 fRec29[0] = (fRec30[0] - (fConst52 * ((fConst51 * fRec29[2]) + (fConst17 * fRec29[1]))));
443 double fTemp15 = max(-1, min(1, (fSlow7 * (fRec29[2] + (fRec29[0] + (2 * fRec29[1]))))));
444 double fTemp16 = ((1.2589412 * (fTemp15 * (1 - (0.3333333333333333 * faustpower<2>(fTemp15))))) + (1.584893192 * ((fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14)))) + ((fTemp11 * (1 - (0.3333333333333333 * faustpower<2>(fTemp11)))) + (0.8413951417869425 * (fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))))))));
445 fVec5[0] = fTemp16;
446 fRec13[0] = ((fConst62 * (fVec5[0] + fVec5[1])) + (fConst10 * fRec13[1]));
447 double fTemp17 = (1e-15 + fTemp3);
448 fRec10[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fSlow11 * ((fTemp17 * (4 - (4 * fabs(fTemp17)))) - fTemp17)) + ((fSlow10 * fTemp6) + ((fSlow9 * fRec13[0]) + (fRec12[0] + fTemp3)))) - 1.863945999999998)) - 60.96496296296296);
449 fRec9[0] = ((fConst63 * ((fConst45 * fRec10[1]) + (fConst1 * fRec10[0]))) + (fConst3 * fRec9[1]));
450 double fTemp18 = (fRec9[0] * fRec8[0]);
451 fVec6[0] = fTemp18;
452 fRec7[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst10 * fRec7[1]));
453 double fTemp19 = (1e-15 + (0.015 * fRec6[1]));
454 fVec7[0] = fTemp19;
455 fRec31[0] = ((fConst67 * (fVec7[0] + fVec7[1])) + (fConst66 * fRec31[1]));
456 fRec6[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec31[0] + fRec7[0]) - 1.2716089999999989)) - 45.22606666666667);
457 fRec5[0] = ((fConst63 * ((fConst45 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
458 double fTemp20 = (fRec8[0] * fRec5[0]);
459 fVec8[0] = fTemp20;
460 fRec4[0] = ((fConst62 * (fVec8[0] + fVec8[1])) + (fConst10 * fRec4[1]));
461 fRec2[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec4[0] + fRec3[0]) - 0.797042999999999)) - 32.799634146341475);
462 fRec1[0] = ((fConst63 * ((fConst45 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
463 double fTemp21 = (1e-15 + (0.0082 * fRec33[1]));
464 fVec9[0] = fTemp21;
465 fRec34[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec34[1]));
466 fRec33[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec34[0] + fRec4[0]) - 0.799030999999999)) - 32.55719512195121);
467 fRec32[0] = ((fConst63 * ((fConst45 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
468 output0[i] = (FAUSTFLOAT)((fRec32[0] + fRec1[0]) * fRec0[0]);
469 double fTemp22 = (1e-15 + (0.0082 * fRec36[1]));
470 fVec10[0] = fTemp22;
471 fRec37[0] = ((fConst7 * (fVec10[0] + fVec10[1])) + (fConst6 * fRec37[1]));
472 double fTemp23 = (double)input1[i];
473 double fTemp24 = (fTemp23 * fTemp1);
474 double fTemp25 = (1e-15 + (0.027 * fRec43[1]));
475 fVec11[0] = fTemp25;
476 fRec44[0] = ((fConst14 * (fVec11[0] + fVec11[1])) + (fConst13 * fRec44[1]));
477 double fTemp26 = (fConst17 * fRec46[1]);
478 double fTemp27 = (1e-15 + (fTemp23 * fRec11[0]));
479 fRec52[0] = (fTemp27 - (fConst44 * ((fConst42 * fRec52[2]) + (fConst40 * fRec52[1]))));
480 double fTemp28 = (fRec52[2] + (fRec52[0] + (2 * fRec52[1])));
481 fVec12[0] = fTemp28;
482 fRec51[0] = ((fConst46 * ((fConst45 * fVec12[1]) + (fConst1 * fVec12[0]))) + (fConst3 * fRec51[1]));
483 fRec50[0] = ((fConst47 * (fRec51[0] + fRec51[1])) + (fConst38 * fRec50[1]));
484 fRec49[0] = (fRec50[0] - (fConst36 * ((fConst34 * fRec49[2]) + (fConst32 * fRec49[1]))));
485 double fTemp29 = (fRec49[2] + (fRec49[0] + (2 * fRec49[1])));
486 fVec13[0] = fTemp29;
487 fRec48[0] = ((fConst49 * ((fConst48 * fVec13[1]) + (fConst24 * fVec13[0]))) + (fConst29 * fRec48[1]));
488 fRec47[0] = (fRec48[0] - (fConst27 * ((fConst25 * fRec47[2]) + (fConst23 * fRec47[1]))));
489 fRec46[0] = ((fConst27 * (((fConst22 * fRec47[0]) + (fConst50 * fRec47[1])) + (fConst22 * fRec47[2]))) - (fConst20 * ((fConst19 * fRec46[2]) + fTemp26)));
490 double fTemp30 = max(-1, min(1, (fSlow4 * (fRec46[2] + (fConst20 * (fTemp26 + (fConst19 * fRec46[0])))))));
491 fRec56[0] = ((fConst49 * (fVec13[0] + fVec13[1])) + (fConst29 * fRec56[1]));
492 fRec55[0] = (fRec56[0] - (fConst27 * ((fConst25 * fRec55[2]) + (fConst23 * fRec55[1]))));
493 double fTemp31 = (fRec55[2] + (fRec55[0] + (2 * fRec55[1])));
494 fVec14[0] = fTemp31;
495 fRec54[0] = ((fConst56 * ((fConst55 * fVec14[1]) + (fConst18 * fVec14[0]))) + (fConst54 * fRec54[1]));
496 fRec53[0] = (fRec54[0] - (fConst52 * ((fConst51 * fRec53[2]) + (fConst17 * fRec53[1]))));
497 double fTemp32 = max(-1, min(1, (fSlow5 * (((fConst16 * fRec53[0]) + (fConst57 * fRec53[1])) + (fConst16 * fRec53[2])))));
498 double fTemp33 = (fConst17 * fRec57[1]);
499 double fTemp34 = (fConst23 * fRec58[1]);
500 fRec60[0] = ((fConst47 * ((fConst60 * fRec51[1]) + (fConst33 * fRec51[0]))) + (fConst38 * fRec60[1]));
501 fRec59[0] = (fRec60[0] - (fConst36 * ((fConst34 * fRec59[2]) + (fConst32 * fRec59[1]))));
502 fRec58[0] = ((fConst36 * (((fConst31 * fRec59[0]) + (fConst61 * fRec59[1])) + (fConst31 * fRec59[2]))) - (fConst59 * ((fConst58 * fRec58[2]) + fTemp34)));
503 fRec57[0] = ((fRec58[2] + (fConst59 * (fTemp34 + (fConst58 * fRec58[0])))) - (fConst20 * ((fConst19 * fRec57[2]) + fTemp33)));
504 double fTemp35 = max(-1, min(1, (fSlow6 * (fRec57[2] + (fConst20 * (fTemp33 + (fConst19 * fRec57[0])))))));
505 fRec62[0] = ((fConst56 * (fVec14[0] + fVec14[1])) + (fConst54 * fRec62[1]));
506 fRec61[0] = (fRec62[0] - (fConst52 * ((fConst51 * fRec61[2]) + (fConst17 * fRec61[1]))));
507 double fTemp36 = max(-1, min(1, (fSlow7 * (fRec61[2] + (fRec61[0] + (2 * fRec61[1]))))));
508 double fTemp37 = ((1.2589412 * (fTemp36 * (1 - (0.3333333333333333 * faustpower<2>(fTemp36))))) + (1.584893192 * ((fTemp35 * (1 - (0.3333333333333333 * faustpower<2>(fTemp35)))) + ((fTemp32 * (1 - (0.3333333333333333 * faustpower<2>(fTemp32)))) + (0.8413951417869425 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))))))));
509 fVec15[0] = fTemp37;
510 fRec45[0] = ((fConst62 * (fVec15[0] + fVec15[1])) + (fConst10 * fRec45[1]));
511 double fTemp38 = (1e-15 + fTemp24);
512 fRec43[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fSlow11 * ((fTemp38 * (4 - (4 * fabs(fTemp38)))) - fTemp38)) + ((fSlow10 * fTemp27) + ((fSlow9 * fRec45[0]) + (fRec44[0] + fTemp24)))) - 1.863945999999998)) - 60.96496296296296);
513 fRec42[0] = ((fConst63 * ((fConst45 * fRec43[1]) + (fConst1 * fRec43[0]))) + (fConst3 * fRec42[1]));
514 double fTemp39 = (fRec8[0] * fRec42[0]);
515 fVec16[0] = fTemp39;
516 fRec41[0] = ((fConst62 * (fVec16[0] + fVec16[1])) + (fConst10 * fRec41[1]));
517 double fTemp40 = (1e-15 + (0.015 * fRec40[1]));
518 fVec17[0] = fTemp40;
519 fRec63[0] = ((fConst67 * (fVec17[0] + fVec17[1])) + (fConst66 * fRec63[1]));
520 fRec40[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec63[0] + fRec41[0]) - 1.2716089999999989)) - 45.22606666666667);
521 fRec39[0] = ((fConst63 * ((fConst45 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
522 double fTemp41 = (fRec8[0] * fRec39[0]);
523 fVec18[0] = fTemp41;
524 fRec38[0] = ((fConst62 * (fVec18[0] + fVec18[1])) + (fConst10 * fRec38[1]));
525 fRec36[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec38[0] + fRec37[0]) - 0.797042999999999)) - 32.799634146341475);
526 fRec35[0] = ((fConst63 * ((fConst45 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
527 double fTemp42 = (1e-15 + (0.0082 * fRec65[1]));
528 fVec19[0] = fTemp42;
529 fRec66[0] = ((fConst7 * (fVec19[0] + fVec19[1])) + (fConst6 * fRec66[1]));
530 fRec65[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec66[0] + fRec38[0]) - 0.799030999999999)) - 32.55719512195121);
531 fRec64[0] = ((fConst63 * ((fConst45 * fRec65[1]) + (fConst1 * fRec65[0]))) + (fConst3 * fRec64[1]));
532 output1[i] = (FAUSTFLOAT)(fRec0[0] * (fRec64[0] + fRec35[0]));
533 // post processing
534 fRec64[1] = fRec64[0];
535 fRec65[1] = fRec65[0];
536 fRec66[1] = fRec66[0];
537 fVec19[1] = fVec19[0];
538 fRec35[1] = fRec35[0];
539 fRec36[1] = fRec36[0];
540 fRec38[1] = fRec38[0];
541 fVec18[1] = fVec18[0];
542 fRec39[1] = fRec39[0];
543 fRec40[1] = fRec40[0];
544 fRec63[1] = fRec63[0];
545 fVec17[1] = fVec17[0];
546 fRec41[1] = fRec41[0];
547 fVec16[1] = fVec16[0];
548 fRec42[1] = fRec42[0];
549 fRec43[1] = fRec43[0];
550 fRec45[1] = fRec45[0];
551 fVec15[1] = fVec15[0];
552 fRec61[2] = fRec61[1]; fRec61[1] = fRec61[0];
553 fRec62[1] = fRec62[0];
554 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
555 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
556 fRec59[2] = fRec59[1]; fRec59[1] = fRec59[0];
557 fRec60[1] = fRec60[0];
558 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
559 fRec54[1] = fRec54[0];
560 fVec14[1] = fVec14[0];
561 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
562 fRec56[1] = fRec56[0];
563 fRec46[2] = fRec46[1]; fRec46[1] = fRec46[0];
564 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
565 fRec48[1] = fRec48[0];
566 fVec13[1] = fVec13[0];
567 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
568 fRec50[1] = fRec50[0];
569 fRec51[1] = fRec51[0];
570 fVec12[1] = fVec12[0];
571 fRec52[2] = fRec52[1]; fRec52[1] = fRec52[0];
572 fRec44[1] = fRec44[0];
573 fVec11[1] = fVec11[0];
574 fRec37[1] = fRec37[0];
575 fVec10[1] = fVec10[0];
576 fRec32[1] = fRec32[0];
577 fRec33[1] = fRec33[0];
578 fRec34[1] = fRec34[0];
579 fVec9[1] = fVec9[0];
580 fRec1[1] = fRec1[0];
581 fRec2[1] = fRec2[0];
582 fRec4[1] = fRec4[0];
583 fVec8[1] = fVec8[0];
584 fRec5[1] = fRec5[0];
585 fRec6[1] = fRec6[0];
586 fRec31[1] = fRec31[0];
587 fVec7[1] = fVec7[0];
588 fRec7[1] = fRec7[0];
589 fVec6[1] = fVec6[0];
590 fRec9[1] = fRec9[0];
591 fRec10[1] = fRec10[0];
592 fRec13[1] = fRec13[0];
593 fVec5[1] = fVec5[0];
594 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
595 fRec30[1] = fRec30[0];
596 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
597 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
598 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
599 fRec28[1] = fRec28[0];
600 fRec21[2] = fRec21[1]; fRec21[1] = fRec21[0];
601 fRec22[1] = fRec22[0];
602 fVec4[1] = fVec4[0];
603 fRec23[2] = fRec23[1]; fRec23[1] = fRec23[0];
604 fRec24[1] = fRec24[0];
605 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
606 fRec15[2] = fRec15[1]; fRec15[1] = fRec15[0];
607 fRec16[1] = fRec16[0];
608 fVec3[1] = fVec3[0];
609 fRec17[2] = fRec17[1]; fRec17[1] = fRec17[0];
610 fRec18[1] = fRec18[0];
611 fRec19[1] = fRec19[0];
612 fVec2[1] = fVec2[0];
613 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
614 fRec12[1] = fRec12[0];
615 fVec1[1] = fVec1[0];
616 fRec11[1] = fRec11[0];
617 fRec8[1] = fRec8[0];
618 fRec3[1] = fRec3[0];
619 fVec0[1] = fVec0[0];
620 fRec0[1] = fRec0[0];
621 }
622 #undef fslider0
623 #undef fslider1
624 #undef fslider2
625 #undef fslider3
626 }
627
628 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
629 {
630 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
631 }
632
633
634 void Dsp::connect(uint32_t port,void* data)
635 {
636 switch ((PortIndex)port)
637 {
638 case DRIVE:
639 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
640 break;
641 case WET_DRY:
642 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
643 break;
644 case PREGAIN:
645 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
646 break;
647 case GAIN1:
648 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
649 break;
650 default:
651 break;
652 }
653 }
654
655 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
656 {
657 static_cast<Dsp*>(p)->connect(port, data);
658 }
659
660
661 PluginLV2 *plugin() {
662 return new Dsp();
663 }
664
665 void Dsp::del_instance(PluginLV2 *p)
666 {
667 delete static_cast<Dsp*>(p);
668 }
669
670 /*
671 typedef enum
672 {
673 DRIVE,
674 WET_DRY,
675 PREGAIN,
676 GAIN1,
677 } PortIndex;
678 */
679
680 } // end namespace gxamp10_stereo
0 // generated from file '../src/LV2/faust/gxamp11.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp11 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 void connect(uint32_t port,void* data);
144 void clear_state_f();
145 void init(uint32_t samplingFreq);
146 void compute(int count, float *input0, float *output0);
147
148 static void clear_state_f_static(PluginLV2*);
149 static void init_static(uint32_t samplingFreq, PluginLV2*);
150 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
151 static void del_instance(PluginLV2 *p);
152 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
153 public:
154 Dsp();
155 ~Dsp();
156 };
157
158
159
160 Dsp::Dsp()
161 : PluginLV2() {
162 version = PLUGINLV2_VERSION;
163 id = "12AU7 feedback";
164 name = N_("12AU7 feedback");
165 mono_audio = compute_static;
166 stereo_audio = 0;
167 set_samplerate = init_static;
168 activate_plugin = 0;
169 connect_ports = connect_static;
170 clear_state = clear_state_f_static;
171 delete_instance = del_instance;
172 }
173
174 Dsp::~Dsp() {
175 }
176
177 inline void Dsp::clear_state_f()
178 {
179 for (int i=0; i<2; i++) fRec0[i] = 0;
180 for (int i=0; i<2; i++) fRec8[i] = 0;
181 for (int i=0; i<2; i++) fRec22[i] = 0;
182 for (int i=0; i<32768; i++) fVec0[i] = 0;
183 for (int i=0; i<2; i++) fRec21[i] = 0;
184 for (int i=0; i<2; i++) fRec20[i] = 0;
185 for (int i=0; i<2; i++) fRec23[i] = 0;
186 for (int i=0; i<3; i++) fRec19[i] = 0;
187 for (int i=0; i<2; i++) fVec1[i] = 0;
188 for (int i=0; i<2; i++) fRec18[i] = 0;
189 for (int i=0; i<2; i++) fRec17[i] = 0;
190 for (int i=0; i<3; i++) fRec16[i] = 0;
191 for (int i=0; i<2; i++) fVec2[i] = 0;
192 for (int i=0; i<2; i++) fRec15[i] = 0;
193 for (int i=0; i<3; i++) fRec14[i] = 0;
194 for (int i=0; i<3; i++) fRec13[i] = 0;
195 for (int i=0; i<2; i++) fRec27[i] = 0;
196 for (int i=0; i<3; i++) fRec26[i] = 0;
197 for (int i=0; i<2; i++) fVec3[i] = 0;
198 for (int i=0; i<2; i++) fRec25[i] = 0;
199 for (int i=0; i<3; i++) fRec24[i] = 0;
200 for (int i=0; i<2; i++) fRec31[i] = 0;
201 for (int i=0; i<3; i++) fRec30[i] = 0;
202 for (int i=0; i<3; i++) fRec29[i] = 0;
203 for (int i=0; i<3; i++) fRec28[i] = 0;
204 for (int i=0; i<2; i++) fRec33[i] = 0;
205 for (int i=0; i<3; i++) fRec32[i] = 0;
206 for (int i=0; i<2; i++) fVec4[i] = 0;
207 for (int i=0; i<2; i++) fRec12[i] = 0;
208 for (int i=0; i<2; i++) fVec5[i] = 0;
209 for (int i=0; i<2; i++) fRec34[i] = 0;
210 for (int i=0; i<2; i++) fRec11[i] = 0;
211 for (int i=0; i<2; i++) fRec10[i] = 0;
212 for (int i=0; i<2; i++) fVec6[i] = 0;
213 for (int i=0; i<2; i++) fRec37[i] = 0;
214 for (int i=0; i<2; i++) fRec36[i] = 0;
215 for (int i=0; i<2; i++) fRec35[i] = 0;
216 for (int i=0; i<2; i++) fRec9[i] = 0;
217 for (int i=0; i<2; i++) fVec7[i] = 0;
218 for (int i=0; i<2; i++) fRec7[i] = 0;
219 for (int i=0; i<2; i++) fVec8[i] = 0;
220 for (int i=0; i<2; i++) fRec38[i] = 0;
221 for (int i=0; i<2; i++) fRec6[i] = 0;
222 for (int i=0; i<2; i++) fRec5[i] = 0;
223 for (int i=0; i<2; i++) fVec9[i] = 0;
224 for (int i=0; i<2; i++) fRec41[i] = 0;
225 for (int i=0; i<2; i++) fRec40[i] = 0;
226 for (int i=0; i<2; i++) fRec39[i] = 0;
227 for (int i=0; i<2; i++) fRec4[i] = 0;
228 for (int i=0; i<2; i++) fRec3[i] = 0;
229 for (int i=0; i<2; i++) fVec10[i] = 0;
230 for (int i=0; i<2; i++) fRec42[i] = 0;
231 for (int i=0; i<2; i++) fRec2[i] = 0;
232 for (int i=0; i<2; i++) fRec1[i] = 0;
233 }
234
235 void Dsp::clear_state_f_static(PluginLV2 *p)
236 {
237 static_cast<Dsp*>(p)->clear_state_f();
238 }
239
240 inline void Dsp::init(uint32_t samplingFreq)
241 {
242 fSamplingFreq = samplingFreq;
243 iConst0 = min(192000, max(1, fSamplingFreq));
244 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
245 fConst2 = (1 + fConst1);
246 fConst3 = (0 - ((1 - fConst1) / fConst2));
247 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
248 fConst5 = (1 + fConst4);
249 fConst6 = (0 - ((1 - fConst4) / fConst5));
250 fConst7 = tan((942.4777960769379 / iConst0));
251 fConst8 = (1.0 / faustpower<2>(fConst7));
252 fConst9 = (2 * (1 - fConst8));
253 fConst10 = (1.0 / fConst7);
254 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
255 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
256 fConst13 = tan((3769.9111843077517 / iConst0));
257 fConst14 = (1.0 / faustpower<2>(fConst13));
258 fConst15 = (2 * (1 - fConst14));
259 fConst16 = (1.0 / fConst13);
260 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
261 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
262 fConst19 = (1.0 / fConst18);
263 fConst20 = (1 + fConst16);
264 fConst21 = (0 - ((1 - fConst16) / fConst20));
265 fConst22 = tan((10053.096491487338 / iConst0));
266 fConst23 = (1.0 / faustpower<2>(fConst22));
267 fConst24 = (2 * (1 - fConst23));
268 fConst25 = (1.0 / fConst22);
269 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
270 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
271 fConst28 = (1.0 / fConst27);
272 fConst29 = (1 + fConst25);
273 fConst30 = (0 - ((1 - fConst25) / fConst29));
274 fConst31 = tan((47123.8898038469 / iConst0));
275 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
276 fConst33 = (1.0 / fConst31);
277 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
278 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
279 fConst36 = (1.0 / fConst35);
280 IOTA = 0;
281 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
282 fConst38 = (0.009000000000000008 / iConst0);
283 fConst39 = (0 - fConst1);
284 fConst40 = (1.0 / (fConst2 * fConst35));
285 fConst41 = (1.0 / fConst29);
286 fConst42 = (0 - fConst16);
287 fConst43 = (1.0 / (fConst20 * fConst27));
288 fConst44 = (2 * (0 - fConst14));
289 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
290 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
291 fConst47 = (1 + fConst10);
292 fConst48 = (0 - ((1 - fConst10) / fConst47));
293 fConst49 = (0 - fConst10);
294 fConst50 = (1.0 / (fConst47 * fConst18));
295 fConst51 = (2 * (0 - fConst8));
296 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
297 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
298 fConst54 = (0 - fConst25);
299 fConst55 = (2 * (0 - fConst23));
300 fConst56 = (1.0 / fConst5);
301 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
302 fConst58 = (1 + fConst57);
303 fConst59 = (0 - ((1 - fConst57) / fConst58));
304 fConst60 = (1.0 / fConst58);
305 fConst61 = (0.1 / fConst2);
306 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
307 fConst63 = (1 + fConst62);
308 fConst64 = (0 - ((1 - fConst62) / fConst63));
309 fConst65 = (1.0 / fConst63);
310 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
311 fConst67 = (1 + fConst66);
312 fConst68 = (0 - ((1 - fConst66) / fConst67));
313 fConst69 = (1.0 / fConst67);
314 clear_state_f();
315 }
316
317 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
318 {
319 static_cast<Dsp*>(p)->init(samplingFreq);
320 }
321
322 inline void Dsp::compute(int count, float *input0, float *output0)
323 {
324 #define fslider0 (*fslider0_)
325 #define fslider1 (*fslider1_)
326 #define fslider2 (*fslider2_)
327 #define fslider3 (*fslider3_)
328 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
329 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
330 double fSlow2 = (1.000000000000001e-05 * fslider2);
331 double fSlow3 = fslider3;
332 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
333 double fSlow5 = pow(1e+01,(2 * fSlow3));
334 double fSlow6 = (fConst46 * fSlow5);
335 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
336 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
337 double fSlow9 = (2 * (fSlow3 - 0.5));
338 double fSlow10 = (1 - max(0, (0 - fSlow9)));
339 double fSlow11 = (0.024937655860349125 * (1 - max(0, fSlow9)));
340 double fSlow12 = (1.25 * fSlow3);
341 for (int i=0; i<count; i++) {
342 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
343 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
344 double fTemp0 = (fConst9 * fRec13[1]);
345 double fTemp1 = (double)input0[i];
346 double fTemp2 = fabs(fTemp1);
347 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
348 double fTemp3 = max(fRec22[0], fTemp2);
349 fVec0[IOTA&32767] = fTemp3;
350 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
351 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
352 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
353 double fTemp5 = (0 - fTemp4);
354 double fTemp6 = (40.1 * fTemp5);
355 double fTemp7 = max(-600, fTemp6);
356 double fTemp8 = (0 - fTemp7);
357 double fTemp9 = (fTemp1 - fTemp4);
358 double fTemp10 = (40.1 * fTemp9);
359 double fTemp11 = max(-600, fTemp10);
360 double fTemp12 = (0 - fTemp11);
361 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
362 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
363 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
364 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
365 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
366 fVec1[0] = fTemp15;
367 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
368 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
369 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
370 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
371 fVec2[0] = fTemp16;
372 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
373 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
374 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
375 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
376 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
377 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
378 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
379 fVec3[0] = fTemp18;
380 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
381 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
382 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
383 double fTemp20 = (fConst9 * fRec28[1]);
384 double fTemp21 = (fConst15 * fRec29[1]);
385 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
386 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
387 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
388 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
389 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
390 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
391 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
392 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
393 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
394 fVec4[0] = fTemp24;
395 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
396 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
397 fVec5[0] = fTemp25;
398 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
399 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
400 double fTemp27 = (1 - fRec23[0]);
401 fRec11[0] = (Ftube(TUBE_TABLE_12AU7_68k, (((fTemp13 * ((fTemp27 * (0.024937655860349125 + (fSlow12 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))) + (fSlow11 * fRec23[0]))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 1.2572399999999988)) - 83.43555555555557);
402 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
403 double fTemp28 = (1e-15 + (0.015 * fRec36[1]));
404 fVec6[0] = fTemp28;
405 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
406 fRec36[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec37[0] + fRec9[1]) - 0.776161999999999)) - 78.25586666666666);
407 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
408 fRec9[0] = (fRec35[0] - fRec10[0]);
409 double fTemp29 = (fRec9[0] * fRec8[0]);
410 fVec7[0] = fTemp29;
411 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
412 double fTemp30 = (1e-15 + (0.015 * fRec6[1]));
413 fVec8[0] = fTemp30;
414 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
415 fRec6[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec38[0] + fRec7[0]) - 0.776161999999999)) - 78.25586666666666);
416 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
417 double fTemp31 = (1e-15 + (0.0082 * fRec40[1]));
418 fVec9[0] = fTemp31;
419 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
420 fRec40[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec41[0] + fRec4[1]) - 0.445486999999999)) - 75.67231707317073);
421 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
422 fRec4[0] = (fRec39[0] + fRec5[0]);
423 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
424 double fTemp32 = (1e-15 + (0.0082 * fRec2[1]));
425 fVec10[0] = fTemp32;
426 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
427 fRec2[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec42[0] + fRec3[0]) - 0.445486999999999)) - 75.67231707317073);
428 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
429 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
430 // post processing
431 fRec1[1] = fRec1[0];
432 fRec2[1] = fRec2[0];
433 fRec42[1] = fRec42[0];
434 fVec10[1] = fVec10[0];
435 fRec3[1] = fRec3[0];
436 fRec4[1] = fRec4[0];
437 fRec39[1] = fRec39[0];
438 fRec40[1] = fRec40[0];
439 fRec41[1] = fRec41[0];
440 fVec9[1] = fVec9[0];
441 fRec5[1] = fRec5[0];
442 fRec6[1] = fRec6[0];
443 fRec38[1] = fRec38[0];
444 fVec8[1] = fVec8[0];
445 fRec7[1] = fRec7[0];
446 fVec7[1] = fVec7[0];
447 fRec9[1] = fRec9[0];
448 fRec35[1] = fRec35[0];
449 fRec36[1] = fRec36[0];
450 fRec37[1] = fRec37[0];
451 fVec6[1] = fVec6[0];
452 fRec10[1] = fRec10[0];
453 fRec11[1] = fRec11[0];
454 fRec34[1] = fRec34[0];
455 fVec5[1] = fVec5[0];
456 fRec12[1] = fRec12[0];
457 fVec4[1] = fVec4[0];
458 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
459 fRec33[1] = fRec33[0];
460 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
461 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
462 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
463 fRec31[1] = fRec31[0];
464 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
465 fRec25[1] = fRec25[0];
466 fVec3[1] = fVec3[0];
467 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
468 fRec27[1] = fRec27[0];
469 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
470 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
471 fRec15[1] = fRec15[0];
472 fVec2[1] = fVec2[0];
473 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
474 fRec17[1] = fRec17[0];
475 fRec18[1] = fRec18[0];
476 fVec1[1] = fVec1[0];
477 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
478 fRec23[1] = fRec23[0];
479 fRec20[1] = fRec20[0];
480 fRec21[1] = fRec21[0];
481 IOTA = IOTA+1;
482 fRec22[1] = fRec22[0];
483 fRec8[1] = fRec8[0];
484 fRec0[1] = fRec0[0];
485 }
486 #undef fslider0
487 #undef fslider1
488 #undef fslider2
489 #undef fslider3
490 }
491
492 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
493 {
494 static_cast<Dsp*>(p)->compute(count, input0, output0);
495 }
496
497
498 void Dsp::connect(uint32_t port,void* data)
499 {
500 switch ((PortIndex)port)
501 {
502 case DRIVE:
503 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
504 break;
505 case WET_DRY:
506 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
507 break;
508 case PREGAIN:
509 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
510 break;
511 case GAIN1:
512 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
513 break;
514 default:
515 break;
516 }
517 }
518
519 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
520 {
521 static_cast<Dsp*>(p)->connect(port, data);
522 }
523
524
525 PluginLV2 *plugin() {
526 return new Dsp();
527 }
528
529 void Dsp::del_instance(PluginLV2 *p)
530 {
531 delete static_cast<Dsp*>(p);
532 }
533
534 /*
535 typedef enum
536 {
537 DRIVE,
538 WET_DRY,
539 PREGAIN,
540 GAIN1,
541 } PortIndex;
542 */
543
544 } // end namespace gxamp11
0 // generated from file '../src/LV2/faust/gxamp11_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp11_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 double fRec63[2];
144 double fVec11[32768];
145 double fRec62[2];
146 double fRec61[2];
147 double fRec60[3];
148 double fVec12[2];
149 double fRec59[2];
150 double fRec58[2];
151 double fRec57[3];
152 double fVec13[2];
153 double fRec56[2];
154 double fRec55[3];
155 double fRec54[3];
156 double fRec67[2];
157 double fRec66[3];
158 double fVec14[2];
159 double fRec65[2];
160 double fRec64[3];
161 double fRec71[2];
162 double fRec70[3];
163 double fRec69[3];
164 double fRec68[3];
165 double fRec73[2];
166 double fRec72[3];
167 double fVec15[2];
168 double fRec53[2];
169 double fVec16[2];
170 double fRec74[2];
171 double fRec52[2];
172 double fRec51[2];
173 double fVec17[2];
174 double fRec77[2];
175 double fRec76[2];
176 double fRec75[2];
177 double fRec50[2];
178 double fVec18[2];
179 double fRec49[2];
180 double fVec19[2];
181 double fRec78[2];
182 double fRec48[2];
183 double fRec47[2];
184 double fVec20[2];
185 double fRec81[2];
186 double fRec80[2];
187 double fRec79[2];
188 double fRec46[2];
189 double fRec45[2];
190 double fVec21[2];
191 double fRec82[2];
192 double fRec44[2];
193 double fRec43[2];
194 void connect(uint32_t port,void* data);
195 void clear_state_f();
196 void init(uint32_t samplingFreq);
197 void compute(int count, float *input0, float *input1, float *output0, float *output1);
198
199 static void clear_state_f_static(PluginLV2*);
200 static void init_static(uint32_t samplingFreq, PluginLV2*);
201 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
202 static void del_instance(PluginLV2 *p);
203 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
204 public:
205 Dsp();
206 ~Dsp();
207 };
208
209
210
211 Dsp::Dsp()
212 : PluginLV2() {
213 version = PLUGINLV2_VERSION;
214 id = "12AU7 feedback";
215 name = N_("12AU7 feedback");
216 mono_audio = 0;
217 stereo_audio = compute_static;
218 set_samplerate = init_static;
219 activate_plugin = 0;
220 connect_ports = connect_static;
221 clear_state = clear_state_f_static;
222 delete_instance = del_instance;
223 }
224
225 Dsp::~Dsp() {
226 }
227
228 inline void Dsp::clear_state_f()
229 {
230 for (int i=0; i<2; i++) fRec0[i] = 0;
231 for (int i=0; i<2; i++) fRec8[i] = 0;
232 for (int i=0; i<2; i++) fRec22[i] = 0;
233 for (int i=0; i<32768; i++) fVec0[i] = 0;
234 for (int i=0; i<2; i++) fRec21[i] = 0;
235 for (int i=0; i<2; i++) fRec20[i] = 0;
236 for (int i=0; i<2; i++) fRec23[i] = 0;
237 for (int i=0; i<3; i++) fRec19[i] = 0;
238 for (int i=0; i<2; i++) fVec1[i] = 0;
239 for (int i=0; i<2; i++) fRec18[i] = 0;
240 for (int i=0; i<2; i++) fRec17[i] = 0;
241 for (int i=0; i<3; i++) fRec16[i] = 0;
242 for (int i=0; i<2; i++) fVec2[i] = 0;
243 for (int i=0; i<2; i++) fRec15[i] = 0;
244 for (int i=0; i<3; i++) fRec14[i] = 0;
245 for (int i=0; i<3; i++) fRec13[i] = 0;
246 for (int i=0; i<2; i++) fRec27[i] = 0;
247 for (int i=0; i<3; i++) fRec26[i] = 0;
248 for (int i=0; i<2; i++) fVec3[i] = 0;
249 for (int i=0; i<2; i++) fRec25[i] = 0;
250 for (int i=0; i<3; i++) fRec24[i] = 0;
251 for (int i=0; i<2; i++) fRec31[i] = 0;
252 for (int i=0; i<3; i++) fRec30[i] = 0;
253 for (int i=0; i<3; i++) fRec29[i] = 0;
254 for (int i=0; i<3; i++) fRec28[i] = 0;
255 for (int i=0; i<2; i++) fRec33[i] = 0;
256 for (int i=0; i<3; i++) fRec32[i] = 0;
257 for (int i=0; i<2; i++) fVec4[i] = 0;
258 for (int i=0; i<2; i++) fRec12[i] = 0;
259 for (int i=0; i<2; i++) fVec5[i] = 0;
260 for (int i=0; i<2; i++) fRec34[i] = 0;
261 for (int i=0; i<2; i++) fRec11[i] = 0;
262 for (int i=0; i<2; i++) fRec10[i] = 0;
263 for (int i=0; i<2; i++) fVec6[i] = 0;
264 for (int i=0; i<2; i++) fRec37[i] = 0;
265 for (int i=0; i<2; i++) fRec36[i] = 0;
266 for (int i=0; i<2; i++) fRec35[i] = 0;
267 for (int i=0; i<2; i++) fRec9[i] = 0;
268 for (int i=0; i<2; i++) fVec7[i] = 0;
269 for (int i=0; i<2; i++) fRec7[i] = 0;
270 for (int i=0; i<2; i++) fVec8[i] = 0;
271 for (int i=0; i<2; i++) fRec38[i] = 0;
272 for (int i=0; i<2; i++) fRec6[i] = 0;
273 for (int i=0; i<2; i++) fRec5[i] = 0;
274 for (int i=0; i<2; i++) fVec9[i] = 0;
275 for (int i=0; i<2; i++) fRec41[i] = 0;
276 for (int i=0; i<2; i++) fRec40[i] = 0;
277 for (int i=0; i<2; i++) fRec39[i] = 0;
278 for (int i=0; i<2; i++) fRec4[i] = 0;
279 for (int i=0; i<2; i++) fRec3[i] = 0;
280 for (int i=0; i<2; i++) fVec10[i] = 0;
281 for (int i=0; i<2; i++) fRec42[i] = 0;
282 for (int i=0; i<2; i++) fRec2[i] = 0;
283 for (int i=0; i<2; i++) fRec1[i] = 0;
284 for (int i=0; i<2; i++) fRec63[i] = 0;
285 for (int i=0; i<32768; i++) fVec11[i] = 0;
286 for (int i=0; i<2; i++) fRec62[i] = 0;
287 for (int i=0; i<2; i++) fRec61[i] = 0;
288 for (int i=0; i<3; i++) fRec60[i] = 0;
289 for (int i=0; i<2; i++) fVec12[i] = 0;
290 for (int i=0; i<2; i++) fRec59[i] = 0;
291 for (int i=0; i<2; i++) fRec58[i] = 0;
292 for (int i=0; i<3; i++) fRec57[i] = 0;
293 for (int i=0; i<2; i++) fVec13[i] = 0;
294 for (int i=0; i<2; i++) fRec56[i] = 0;
295 for (int i=0; i<3; i++) fRec55[i] = 0;
296 for (int i=0; i<3; i++) fRec54[i] = 0;
297 for (int i=0; i<2; i++) fRec67[i] = 0;
298 for (int i=0; i<3; i++) fRec66[i] = 0;
299 for (int i=0; i<2; i++) fVec14[i] = 0;
300 for (int i=0; i<2; i++) fRec65[i] = 0;
301 for (int i=0; i<3; i++) fRec64[i] = 0;
302 for (int i=0; i<2; i++) fRec71[i] = 0;
303 for (int i=0; i<3; i++) fRec70[i] = 0;
304 for (int i=0; i<3; i++) fRec69[i] = 0;
305 for (int i=0; i<3; i++) fRec68[i] = 0;
306 for (int i=0; i<2; i++) fRec73[i] = 0;
307 for (int i=0; i<3; i++) fRec72[i] = 0;
308 for (int i=0; i<2; i++) fVec15[i] = 0;
309 for (int i=0; i<2; i++) fRec53[i] = 0;
310 for (int i=0; i<2; i++) fVec16[i] = 0;
311 for (int i=0; i<2; i++) fRec74[i] = 0;
312 for (int i=0; i<2; i++) fRec52[i] = 0;
313 for (int i=0; i<2; i++) fRec51[i] = 0;
314 for (int i=0; i<2; i++) fVec17[i] = 0;
315 for (int i=0; i<2; i++) fRec77[i] = 0;
316 for (int i=0; i<2; i++) fRec76[i] = 0;
317 for (int i=0; i<2; i++) fRec75[i] = 0;
318 for (int i=0; i<2; i++) fRec50[i] = 0;
319 for (int i=0; i<2; i++) fVec18[i] = 0;
320 for (int i=0; i<2; i++) fRec49[i] = 0;
321 for (int i=0; i<2; i++) fVec19[i] = 0;
322 for (int i=0; i<2; i++) fRec78[i] = 0;
323 for (int i=0; i<2; i++) fRec48[i] = 0;
324 for (int i=0; i<2; i++) fRec47[i] = 0;
325 for (int i=0; i<2; i++) fVec20[i] = 0;
326 for (int i=0; i<2; i++) fRec81[i] = 0;
327 for (int i=0; i<2; i++) fRec80[i] = 0;
328 for (int i=0; i<2; i++) fRec79[i] = 0;
329 for (int i=0; i<2; i++) fRec46[i] = 0;
330 for (int i=0; i<2; i++) fRec45[i] = 0;
331 for (int i=0; i<2; i++) fVec21[i] = 0;
332 for (int i=0; i<2; i++) fRec82[i] = 0;
333 for (int i=0; i<2; i++) fRec44[i] = 0;
334 for (int i=0; i<2; i++) fRec43[i] = 0;
335 }
336
337 void Dsp::clear_state_f_static(PluginLV2 *p)
338 {
339 static_cast<Dsp*>(p)->clear_state_f();
340 }
341
342 inline void Dsp::init(uint32_t samplingFreq)
343 {
344 fSamplingFreq = samplingFreq;
345 iConst0 = min(192000, max(1, fSamplingFreq));
346 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
347 fConst2 = (1 + fConst1);
348 fConst3 = (0 - ((1 - fConst1) / fConst2));
349 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
350 fConst5 = (1 + fConst4);
351 fConst6 = (0 - ((1 - fConst4) / fConst5));
352 fConst7 = tan((942.4777960769379 / iConst0));
353 fConst8 = (1.0 / faustpower<2>(fConst7));
354 fConst9 = (2 * (1 - fConst8));
355 fConst10 = (1.0 / fConst7);
356 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
357 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
358 fConst13 = tan((3769.9111843077517 / iConst0));
359 fConst14 = (1.0 / faustpower<2>(fConst13));
360 fConst15 = (2 * (1 - fConst14));
361 fConst16 = (1.0 / fConst13);
362 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
363 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
364 fConst19 = (1.0 / fConst18);
365 fConst20 = (1 + fConst16);
366 fConst21 = (0 - ((1 - fConst16) / fConst20));
367 fConst22 = tan((10053.096491487338 / iConst0));
368 fConst23 = (1.0 / faustpower<2>(fConst22));
369 fConst24 = (2 * (1 - fConst23));
370 fConst25 = (1.0 / fConst22);
371 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
372 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
373 fConst28 = (1.0 / fConst27);
374 fConst29 = (1 + fConst25);
375 fConst30 = (0 - ((1 - fConst25) / fConst29));
376 fConst31 = tan((47123.8898038469 / iConst0));
377 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
378 fConst33 = (1.0 / fConst31);
379 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
380 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
381 fConst36 = (1.0 / fConst35);
382 IOTA = 0;
383 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
384 fConst38 = (0.009000000000000008 / iConst0);
385 fConst39 = (0 - fConst1);
386 fConst40 = (1.0 / (fConst2 * fConst35));
387 fConst41 = (1.0 / fConst29);
388 fConst42 = (0 - fConst16);
389 fConst43 = (1.0 / (fConst20 * fConst27));
390 fConst44 = (2 * (0 - fConst14));
391 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
392 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
393 fConst47 = (1 + fConst10);
394 fConst48 = (0 - ((1 - fConst10) / fConst47));
395 fConst49 = (0 - fConst10);
396 fConst50 = (1.0 / (fConst47 * fConst18));
397 fConst51 = (2 * (0 - fConst8));
398 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
399 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
400 fConst54 = (0 - fConst25);
401 fConst55 = (2 * (0 - fConst23));
402 fConst56 = (1.0 / fConst5);
403 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
404 fConst58 = (1 + fConst57);
405 fConst59 = (0 - ((1 - fConst57) / fConst58));
406 fConst60 = (1.0 / fConst58);
407 fConst61 = (0.1 / fConst2);
408 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
409 fConst63 = (1 + fConst62);
410 fConst64 = (0 - ((1 - fConst62) / fConst63));
411 fConst65 = (1.0 / fConst63);
412 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
413 fConst67 = (1 + fConst66);
414 fConst68 = (0 - ((1 - fConst66) / fConst67));
415 fConst69 = (1.0 / fConst67);
416 clear_state_f();
417 }
418
419 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
420 {
421 static_cast<Dsp*>(p)->init(samplingFreq);
422 }
423
424 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
425 {
426 #define fslider0 (*fslider0_)
427 #define fslider1 (*fslider1_)
428 #define fslider2 (*fslider2_)
429 #define fslider3 (*fslider3_)
430 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
431 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
432 double fSlow2 = (1.000000000000001e-05 * fslider2);
433 double fSlow3 = fslider3;
434 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
435 double fSlow5 = pow(1e+01,(2 * fSlow3));
436 double fSlow6 = (fConst46 * fSlow5);
437 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
438 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
439 double fSlow9 = (2 * (fSlow3 - 0.5));
440 double fSlow10 = (1 - max(0, (0 - fSlow9)));
441 double fSlow11 = (1.25 * fSlow3);
442 double fSlow12 = (0.024937655860349125 * (1 - max(0, fSlow9)));
443 for (int i=0; i<count; i++) {
444 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
445 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
446 double fTemp0 = (fConst9 * fRec13[1]);
447 double fTemp1 = (double)input0[i];
448 double fTemp2 = fabs(fTemp1);
449 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
450 double fTemp3 = max(fRec22[0], fTemp2);
451 fVec0[IOTA&32767] = fTemp3;
452 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
453 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
454 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
455 double fTemp5 = (0 - fTemp4);
456 double fTemp6 = (40.1 * fTemp5);
457 double fTemp7 = max(-600, fTemp6);
458 double fTemp8 = (0 - fTemp7);
459 double fTemp9 = (fTemp1 - fTemp4);
460 double fTemp10 = (40.1 * fTemp9);
461 double fTemp11 = max(-600, fTemp10);
462 double fTemp12 = (0 - fTemp11);
463 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
464 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
465 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
466 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
467 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
468 fVec1[0] = fTemp15;
469 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
470 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
471 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
472 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
473 fVec2[0] = fTemp16;
474 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
475 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
476 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
477 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
478 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
479 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
480 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
481 fVec3[0] = fTemp18;
482 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
483 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
484 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
485 double fTemp20 = (fConst9 * fRec28[1]);
486 double fTemp21 = (fConst15 * fRec29[1]);
487 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
488 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
489 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
490 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
491 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
492 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
493 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
494 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
495 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
496 fVec4[0] = fTemp24;
497 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
498 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
499 fVec5[0] = fTemp25;
500 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
501 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
502 double fTemp27 = (1 - fRec23[0]);
503 double fTemp28 = (fSlow12 * fRec23[0]);
504 fRec11[0] = (Ftube(TUBE_TABLE_12AU7_68k, (((fTemp13 * (fTemp28 + (fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 1.2572399999999988)) - 83.43555555555557);
505 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
506 double fTemp29 = (1e-15 + (0.015 * fRec36[1]));
507 fVec6[0] = fTemp29;
508 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
509 fRec36[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec37[0] + fRec9[1]) - 0.776161999999999)) - 78.25586666666666);
510 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
511 fRec9[0] = (fRec35[0] - fRec10[0]);
512 double fTemp30 = (fRec9[0] * fRec8[0]);
513 fVec7[0] = fTemp30;
514 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
515 double fTemp31 = (1e-15 + (0.015 * fRec6[1]));
516 fVec8[0] = fTemp31;
517 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
518 fRec6[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec38[0] + fRec7[0]) - 0.776161999999999)) - 78.25586666666666);
519 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
520 double fTemp32 = (1e-15 + (0.0082 * fRec40[1]));
521 fVec9[0] = fTemp32;
522 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
523 fRec40[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec41[0] + fRec4[1]) - 0.445486999999999)) - 75.67231707317073);
524 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
525 fRec4[0] = (fRec39[0] + fRec5[0]);
526 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
527 double fTemp33 = (1e-15 + (0.0082 * fRec2[1]));
528 fVec10[0] = fTemp33;
529 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
530 fRec2[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec42[0] + fRec3[0]) - 0.445486999999999)) - 75.67231707317073);
531 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
532 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
533 double fTemp34 = (fConst9 * fRec54[1]);
534 double fTemp35 = (double)input1[i];
535 double fTemp36 = fabs(fTemp35);
536 fRec63[0] = ((9.999999999998899e-05 * fTemp36) + (0.9999 * fRec63[1]));
537 double fTemp37 = max(fRec63[0], fTemp36);
538 fVec11[IOTA&32767] = fTemp37;
539 fRec62[0] = ((fVec11[IOTA&32767] + fRec62[1]) - fVec11[(IOTA-iConst37)&32767]);
540 fRec61[0] = ((fConst38 * fRec62[0]) + (0.999 * fRec61[1]));
541 double fTemp38 = max(-1, min(-0.01, (fVec11[IOTA&32767] - (1.0 + (1.02 * fRec61[0])))));
542 double fTemp39 = (0 - fTemp38);
543 double fTemp40 = (40.1 * fTemp39);
544 double fTemp41 = max(-600, fTemp40);
545 double fTemp42 = (0 - fTemp41);
546 double fTemp43 = (fTemp35 - fTemp38);
547 double fTemp44 = (40.1 * fTemp43);
548 double fTemp45 = max(-600, fTemp44);
549 double fTemp46 = (0 - fTemp45);
550 double fTemp47 = (((int((fabs(fTemp44) > 0.0001)))?((int((fTemp45 < -50)))?(exp(fTemp45) * fTemp46):(fTemp45 / (1 - exp(fTemp46)))):(1 + (fTemp43 * (20.05 + (134.00083333333336 * fTemp43))))) - ((int((fabs(fTemp40) > 0.0001)))?((int((fTemp41 < -50)))?(exp(fTemp41) * fTemp42):(fTemp41 / (1 - exp(fTemp42)))):(1 + (fTemp39 * (20.05 + (134.00083333333336 * fTemp39))))));
551 double fTemp48 = (0.024937655860349125 * (fRec23[0] * fTemp47));
552 fRec60[0] = (fTemp48 - (fConst36 * ((fConst34 * fRec60[2]) + (fConst32 * fRec60[1]))));
553 double fTemp49 = (fRec60[2] + (fRec60[0] + (2 * fRec60[1])));
554 fVec12[0] = fTemp49;
555 fRec59[0] = ((fConst40 * ((fConst39 * fVec12[1]) + (fConst1 * fVec12[0]))) + (fConst3 * fRec59[1]));
556 fRec58[0] = ((fConst41 * (fRec59[0] + fRec59[1])) + (fConst30 * fRec58[1]));
557 fRec57[0] = (fRec58[0] - (fConst28 * ((fConst26 * fRec57[2]) + (fConst24 * fRec57[1]))));
558 double fTemp50 = (fRec57[2] + (fRec57[0] + (2 * fRec57[1])));
559 fVec13[0] = fTemp50;
560 fRec56[0] = ((fConst43 * ((fConst42 * fVec13[1]) + (fConst16 * fVec13[0]))) + (fConst21 * fRec56[1]));
561 fRec55[0] = (fRec56[0] - (fConst19 * ((fConst17 * fRec55[2]) + (fConst15 * fRec55[1]))));
562 fRec54[0] = ((fConst19 * (((fConst14 * fRec55[0]) + (fConst44 * fRec55[1])) + (fConst14 * fRec55[2]))) - (fConst12 * ((fConst11 * fRec54[2]) + fTemp34)));
563 double fTemp51 = max(-1, min(1, (fSlow4 * (fRec54[2] + (fConst12 * (fTemp34 + (fConst11 * fRec54[0])))))));
564 fRec67[0] = ((fConst43 * (fVec13[0] + fVec13[1])) + (fConst21 * fRec67[1]));
565 fRec66[0] = (fRec67[0] - (fConst19 * ((fConst17 * fRec66[2]) + (fConst15 * fRec66[1]))));
566 double fTemp52 = (fRec66[2] + (fRec66[0] + (2 * fRec66[1])));
567 fVec14[0] = fTemp52;
568 fRec65[0] = ((fConst50 * ((fConst49 * fVec14[1]) + (fConst10 * fVec14[0]))) + (fConst48 * fRec65[1]));
569 fRec64[0] = (fRec65[0] - (fConst46 * ((fConst45 * fRec64[2]) + (fConst9 * fRec64[1]))));
570 double fTemp53 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec64[0]) + (fConst51 * fRec64[1])) + (fConst8 * fRec64[2])))));
571 double fTemp54 = (fConst9 * fRec68[1]);
572 double fTemp55 = (fConst15 * fRec69[1]);
573 fRec71[0] = ((fConst41 * ((fConst54 * fRec59[1]) + (fConst25 * fRec59[0]))) + (fConst30 * fRec71[1]));
574 fRec70[0] = (fRec71[0] - (fConst28 * ((fConst26 * fRec70[2]) + (fConst24 * fRec70[1]))));
575 fRec69[0] = ((fConst28 * (((fConst23 * fRec70[0]) + (fConst55 * fRec70[1])) + (fConst23 * fRec70[2]))) - (fConst53 * ((fConst52 * fRec69[2]) + fTemp55)));
576 fRec68[0] = ((fRec69[2] + (fConst53 * (fTemp55 + (fConst52 * fRec69[0])))) - (fConst12 * ((fConst11 * fRec68[2]) + fTemp54)));
577 double fTemp56 = max(-1, min(1, (fSlow7 * (fRec68[2] + (fConst12 * (fTemp54 + (fConst11 * fRec68[0])))))));
578 fRec73[0] = ((fConst50 * (fVec14[0] + fVec14[1])) + (fConst48 * fRec73[1]));
579 fRec72[0] = (fRec73[0] - (fConst46 * ((fConst45 * fRec72[2]) + (fConst9 * fRec72[1]))));
580 double fTemp57 = max(-1, min(1, (fSlow8 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1]))))));
581 double fTemp58 = ((1.2589412 * (fTemp57 * (1 - (0.3333333333333333 * faustpower<2>(fTemp57))))) + (1.584893192 * ((fTemp56 * (1 - (0.3333333333333333 * faustpower<2>(fTemp56)))) + ((fTemp53 * (1 - (0.3333333333333333 * faustpower<2>(fTemp53)))) + (0.8413951417869425 * (fTemp51 * (1 - (0.3333333333333333 * faustpower<2>(fTemp51)))))))));
582 fVec15[0] = fTemp58;
583 fRec53[0] = ((fConst56 * (fVec15[0] + fVec15[1])) + (fConst6 * fRec53[1]));
584 double fTemp59 = (1e-15 + (0.027 * fRec52[1]));
585 fVec16[0] = fTemp59;
586 fRec74[0] = ((fConst60 * (fVec16[0] + fVec16[1])) + (fConst59 * fRec74[1]));
587 double fTemp60 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp48)))));
588 fRec52[0] = (Ftube(TUBE_TABLE_12AU7_68k, (((fTemp47 * ((fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp47))))) - 0.024937655860349125)))) + fTemp28)) + ((0.5 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60))))) + (fRec74[0] + (fSlow10 * fRec53[0])))) - 1.2572399999999988)) - 83.43555555555557);
589 fRec51[0] = ((fConst61 * ((fConst39 * fRec52[1]) + (fConst1 * fRec52[0]))) + (fConst3 * fRec51[1]));
590 double fTemp61 = (1e-15 + (0.015 * fRec76[1]));
591 fVec17[0] = fTemp61;
592 fRec77[0] = ((fConst65 * (fVec17[0] + fVec17[1])) + (fConst64 * fRec77[1]));
593 fRec76[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec77[0] + fRec50[1]) - 0.776161999999999)) - 78.25586666666666);
594 fRec75[0] = ((fConst61 * ((fConst39 * fRec76[1]) + (fConst1 * fRec76[0]))) + (fConst3 * fRec75[1]));
595 fRec50[0] = (fRec75[0] - fRec51[0]);
596 double fTemp62 = (fRec8[0] * fRec50[0]);
597 fVec18[0] = fTemp62;
598 fRec49[0] = ((fConst56 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec49[1]));
599 double fTemp63 = (1e-15 + (0.015 * fRec48[1]));
600 fVec19[0] = fTemp63;
601 fRec78[0] = ((fConst65 * (fVec19[0] + fVec19[1])) + (fConst64 * fRec78[1]));
602 fRec48[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec78[0] + fRec49[0]) - 0.776161999999999)) - 78.25586666666666);
603 fRec47[0] = ((fConst61 * ((fConst39 * fRec48[1]) + (fConst1 * fRec48[0]))) + (fConst3 * fRec47[1]));
604 double fTemp64 = (1e-15 + (0.0082 * fRec80[1]));
605 fVec20[0] = fTemp64;
606 fRec81[0] = ((fConst69 * (fVec20[0] + fVec20[1])) + (fConst68 * fRec81[1]));
607 fRec80[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec81[0] + fRec46[1]) - 0.445486999999999)) - 75.67231707317073);
608 fRec79[0] = ((fConst61 * ((fConst39 * fRec80[1]) + (fConst1 * fRec80[0]))) + (fConst3 * fRec79[1]));
609 fRec46[0] = (fRec79[0] + fRec47[0]);
610 fRec45[0] = ((fConst56 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
611 double fTemp65 = (1e-15 + (0.0082 * fRec44[1]));
612 fVec21[0] = fTemp65;
613 fRec82[0] = ((fConst69 * (fVec21[0] + fVec21[1])) + (fConst68 * fRec82[1]));
614 fRec44[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec82[0] + fRec45[0]) - 0.445486999999999)) - 75.67231707317073);
615 fRec43[0] = ((fConst61 * ((fConst39 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
616 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec43[0]);
617 // post processing
618 fRec43[1] = fRec43[0];
619 fRec44[1] = fRec44[0];
620 fRec82[1] = fRec82[0];
621 fVec21[1] = fVec21[0];
622 fRec45[1] = fRec45[0];
623 fRec46[1] = fRec46[0];
624 fRec79[1] = fRec79[0];
625 fRec80[1] = fRec80[0];
626 fRec81[1] = fRec81[0];
627 fVec20[1] = fVec20[0];
628 fRec47[1] = fRec47[0];
629 fRec48[1] = fRec48[0];
630 fRec78[1] = fRec78[0];
631 fVec19[1] = fVec19[0];
632 fRec49[1] = fRec49[0];
633 fVec18[1] = fVec18[0];
634 fRec50[1] = fRec50[0];
635 fRec75[1] = fRec75[0];
636 fRec76[1] = fRec76[0];
637 fRec77[1] = fRec77[0];
638 fVec17[1] = fVec17[0];
639 fRec51[1] = fRec51[0];
640 fRec52[1] = fRec52[0];
641 fRec74[1] = fRec74[0];
642 fVec16[1] = fVec16[0];
643 fRec53[1] = fRec53[0];
644 fVec15[1] = fVec15[0];
645 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
646 fRec73[1] = fRec73[0];
647 fRec68[2] = fRec68[1]; fRec68[1] = fRec68[0];
648 fRec69[2] = fRec69[1]; fRec69[1] = fRec69[0];
649 fRec70[2] = fRec70[1]; fRec70[1] = fRec70[0];
650 fRec71[1] = fRec71[0];
651 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
652 fRec65[1] = fRec65[0];
653 fVec14[1] = fVec14[0];
654 fRec66[2] = fRec66[1]; fRec66[1] = fRec66[0];
655 fRec67[1] = fRec67[0];
656 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
657 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
658 fRec56[1] = fRec56[0];
659 fVec13[1] = fVec13[0];
660 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
661 fRec58[1] = fRec58[0];
662 fRec59[1] = fRec59[0];
663 fVec12[1] = fVec12[0];
664 fRec60[2] = fRec60[1]; fRec60[1] = fRec60[0];
665 fRec61[1] = fRec61[0];
666 fRec62[1] = fRec62[0];
667 fRec63[1] = fRec63[0];
668 fRec1[1] = fRec1[0];
669 fRec2[1] = fRec2[0];
670 fRec42[1] = fRec42[0];
671 fVec10[1] = fVec10[0];
672 fRec3[1] = fRec3[0];
673 fRec4[1] = fRec4[0];
674 fRec39[1] = fRec39[0];
675 fRec40[1] = fRec40[0];
676 fRec41[1] = fRec41[0];
677 fVec9[1] = fVec9[0];
678 fRec5[1] = fRec5[0];
679 fRec6[1] = fRec6[0];
680 fRec38[1] = fRec38[0];
681 fVec8[1] = fVec8[0];
682 fRec7[1] = fRec7[0];
683 fVec7[1] = fVec7[0];
684 fRec9[1] = fRec9[0];
685 fRec35[1] = fRec35[0];
686 fRec36[1] = fRec36[0];
687 fRec37[1] = fRec37[0];
688 fVec6[1] = fVec6[0];
689 fRec10[1] = fRec10[0];
690 fRec11[1] = fRec11[0];
691 fRec34[1] = fRec34[0];
692 fVec5[1] = fVec5[0];
693 fRec12[1] = fRec12[0];
694 fVec4[1] = fVec4[0];
695 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
696 fRec33[1] = fRec33[0];
697 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
698 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
699 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
700 fRec31[1] = fRec31[0];
701 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
702 fRec25[1] = fRec25[0];
703 fVec3[1] = fVec3[0];
704 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
705 fRec27[1] = fRec27[0];
706 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
707 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
708 fRec15[1] = fRec15[0];
709 fVec2[1] = fVec2[0];
710 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
711 fRec17[1] = fRec17[0];
712 fRec18[1] = fRec18[0];
713 fVec1[1] = fVec1[0];
714 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
715 fRec23[1] = fRec23[0];
716 fRec20[1] = fRec20[0];
717 fRec21[1] = fRec21[0];
718 IOTA = IOTA+1;
719 fRec22[1] = fRec22[0];
720 fRec8[1] = fRec8[0];
721 fRec0[1] = fRec0[0];
722 }
723 #undef fslider0
724 #undef fslider1
725 #undef fslider2
726 #undef fslider3
727 }
728
729 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
730 {
731 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
732 }
733
734
735 void Dsp::connect(uint32_t port,void* data)
736 {
737 switch ((PortIndex)port)
738 {
739 case DRIVE:
740 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
741 break;
742 case WET_DRY:
743 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
744 break;
745 case PREGAIN:
746 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
747 break;
748 case GAIN1:
749 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
750 break;
751 default:
752 break;
753 }
754 }
755
756 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
757 {
758 static_cast<Dsp*>(p)->connect(port, data);
759 }
760
761
762 PluginLV2 *plugin() {
763 return new Dsp();
764 }
765
766 void Dsp::del_instance(PluginLV2 *p)
767 {
768 delete static_cast<Dsp*>(p);
769 }
770
771 /*
772 typedef enum
773 {
774 DRIVE,
775 WET_DRY,
776 PREGAIN,
777 GAIN1,
778 } PortIndex;
779 */
780
781 } // end namespace gxamp11_stereo
0 // generated from file '../src/LV2/faust/gxamp12.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp12 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fConst68;
130 double fRec0[2];
131 double fVec9[2];
132 double fRec37[2];
133 double fRec36[2];
134 double fRec35[2];
135 void connect(uint32_t port,void* data);
136 void clear_state_f();
137 void init(uint32_t samplingFreq);
138 void compute(int count, float *input0, float *output0);
139
140 static void clear_state_f_static(PluginLV2*);
141 static void init_static(uint32_t samplingFreq, PluginLV2*);
142 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
143 static void del_instance(PluginLV2 *p);
144 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
145 public:
146 Dsp();
147 ~Dsp();
148 };
149
150
151
152 Dsp::Dsp()
153 : PluginLV2() {
154 version = PLUGINLV2_VERSION;
155 id = "pre 6DJ8/ master 6V6";
156 name = N_("pre 6DJ8/ master 6V6");
157 mono_audio = compute_static;
158 stereo_audio = 0;
159 set_samplerate = init_static;
160 activate_plugin = 0;
161 connect_ports = connect_static;
162 clear_state = clear_state_f_static;
163 delete_instance = del_instance;
164 }
165
166 Dsp::~Dsp() {
167 }
168
169 inline void Dsp::clear_state_f()
170 {
171 for (int i=0; i<2; i++) fVec0[i] = 0;
172 for (int i=0; i<2; i++) fRec2[i] = 0;
173 for (int i=0; i<2; i++) fRec3[i] = 0;
174 for (int i=0; i<2; i++) fRec13[i] = 0;
175 for (int i=0; i<2; i++) fRec21[i] = 0;
176 for (int i=0; i<2; i++) fVec1[i] = 0;
177 for (int i=0; i<2; i++) fRec22[i] = 0;
178 for (int i=0; i<2; i++) fRec20[i] = 0;
179 for (int i=0; i<2; i++) fRec19[i] = 0;
180 for (int i=0; i<2; i++) fRec18[i] = 0;
181 for (int i=0; i<2; i++) fVec2[i] = 0;
182 for (int i=0; i<2; i++) fRec23[i] = 0;
183 for (int i=0; i<2; i++) fRec17[i] = 0;
184 for (int i=0; i<2; i++) fRec16[i] = 0;
185 for (int i=0; i<2; i++) fVec3[i] = 0;
186 for (int i=0; i<2; i++) fRec24[i] = 0;
187 for (int i=0; i<2; i++) fRec15[i] = 0;
188 for (int i=0; i<2; i++) fRec14[i] = 0;
189 for (int i=0; i<3; i++) fRec12[i] = 0;
190 for (int i=0; i<2; i++) fVec4[i] = 0;
191 for (int i=0; i<2; i++) fRec11[i] = 0;
192 for (int i=0; i<2; i++) fRec10[i] = 0;
193 for (int i=0; i<3; i++) fRec9[i] = 0;
194 for (int i=0; i<2; i++) fVec5[i] = 0;
195 for (int i=0; i<2; i++) fRec8[i] = 0;
196 for (int i=0; i<3; i++) fRec7[i] = 0;
197 for (int i=0; i<3; i++) fRec6[i] = 0;
198 for (int i=0; i<2; i++) fRec28[i] = 0;
199 for (int i=0; i<3; i++) fRec27[i] = 0;
200 for (int i=0; i<2; i++) fVec6[i] = 0;
201 for (int i=0; i<2; i++) fRec26[i] = 0;
202 for (int i=0; i<3; i++) fRec25[i] = 0;
203 for (int i=0; i<2; i++) fRec32[i] = 0;
204 for (int i=0; i<3; i++) fRec31[i] = 0;
205 for (int i=0; i<3; i++) fRec30[i] = 0;
206 for (int i=0; i<3; i++) fRec29[i] = 0;
207 for (int i=0; i<2; i++) fRec34[i] = 0;
208 for (int i=0; i<3; i++) fRec33[i] = 0;
209 for (int i=0; i<2; i++) fVec7[i] = 0;
210 for (int i=0; i<2; i++) fRec5[i] = 0;
211 for (int i=0; i<2; i++) fVec8[i] = 0;
212 for (int i=0; i<2; i++) fRec4[i] = 0;
213 for (int i=0; i<2; i++) fRec1[i] = 0;
214 for (int i=0; i<2; i++) fRec0[i] = 0;
215 for (int i=0; i<2; i++) fVec9[i] = 0;
216 for (int i=0; i<2; i++) fRec37[i] = 0;
217 for (int i=0; i<2; i++) fRec36[i] = 0;
218 for (int i=0; i<2; i++) fRec35[i] = 0;
219 }
220
221 void Dsp::clear_state_f_static(PluginLV2 *p)
222 {
223 static_cast<Dsp*>(p)->clear_state_f();
224 }
225
226 inline void Dsp::init(uint32_t samplingFreq)
227 {
228 fSamplingFreq = samplingFreq;
229 iConst0 = min(192000, max(1, fSamplingFreq));
230 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
231 fConst2 = (1 + fConst1);
232 fConst3 = (0 - ((1 - fConst1) / fConst2));
233 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
234 fConst5 = (1 + fConst4);
235 fConst6 = (0 - ((1 - fConst4) / fConst5));
236 fConst7 = (1.0 / fConst5);
237 fConst8 = tan((942.4777960769379 / iConst0));
238 fConst9 = (1.0 / faustpower<2>(fConst8));
239 fConst10 = (2 * (1 - fConst9));
240 fConst11 = (1.0 / fConst8);
241 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
242 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
243 fConst14 = tan((3769.9111843077517 / iConst0));
244 fConst15 = (1.0 / faustpower<2>(fConst14));
245 fConst16 = (2 * (1 - fConst15));
246 fConst17 = (1.0 / fConst14);
247 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
248 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
249 fConst20 = (1.0 / fConst19);
250 fConst21 = (1 + fConst17);
251 fConst22 = (0 - ((1 - fConst17) / fConst21));
252 fConst23 = tan((10053.096491487338 / iConst0));
253 fConst24 = (1.0 / faustpower<2>(fConst23));
254 fConst25 = (2 * (1 - fConst24));
255 fConst26 = (1.0 / fConst23);
256 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
257 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
258 fConst29 = (1.0 / fConst28);
259 fConst30 = (1 + fConst26);
260 fConst31 = (0 - ((1 - fConst26) / fConst30));
261 fConst32 = tan((47123.8898038469 / iConst0));
262 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
263 fConst34 = (1.0 / fConst32);
264 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
265 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
266 fConst37 = (1.0 / fConst36);
267 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
268 fConst39 = (1 + fConst38);
269 fConst40 = (0 - ((1 - fConst38) / fConst39));
270 fConst41 = (1.0 / fConst39);
271 fConst42 = (0 - fConst1);
272 fConst43 = (0.05 / fConst2);
273 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
274 fConst45 = (1 + fConst44);
275 fConst46 = (0 - ((1 - fConst44) / fConst45));
276 fConst47 = (1.0 / fConst45);
277 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
278 fConst49 = (1 + fConst48);
279 fConst50 = (0 - ((1 - fConst48) / fConst49));
280 fConst51 = (1.0 / fConst49);
281 fConst52 = (1.0 / (fConst2 * fConst36));
282 fConst53 = (1.0 / fConst30);
283 fConst54 = (0 - fConst17);
284 fConst55 = (1.0 / (fConst21 * fConst28));
285 fConst56 = (2 * (0 - fConst15));
286 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
287 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
288 fConst59 = (1 + fConst11);
289 fConst60 = (0 - ((1 - fConst11) / fConst59));
290 fConst61 = (0 - fConst11);
291 fConst62 = (1.0 / (fConst59 * fConst19));
292 fConst63 = (2 * (0 - fConst9));
293 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
294 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
295 fConst66 = (0 - fConst26);
296 fConst67 = (2 * (0 - fConst24));
297 fConst68 = (0.025 / fConst2);
298 clear_state_f();
299 }
300
301 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
302 {
303 static_cast<Dsp*>(p)->init(samplingFreq);
304 }
305
306 inline void Dsp::compute(int count, float *input0, float *output0)
307 {
308 #define fslider0 (*fslider0_)
309 #define fslider1 (*fslider1_)
310 #define fslider2 (*fslider2_)
311 #define fslider3 (*fslider3_)
312 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
313 double fSlow1 = (1.000000000000001e-05 * fslider1);
314 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
315 double fSlow3 = fslider3;
316 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
317 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
318 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
319 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
320 double fSlow8 = (2 * (fSlow3 - 0.5));
321 double fSlow9 = (1 - max(0, (0 - fSlow8)));
322 double fSlow10 = (1 - max(0, fSlow8));
323 double fSlow11 = (1.25 * fSlow3);
324 for (int i=0; i<count; i++) {
325 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
326 fVec0[0] = fTemp0;
327 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
328 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
329 double fTemp1 = (fConst10 * fRec6[1]);
330 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
331 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
332 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
333 fVec1[0] = fTemp2;
334 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
335 fRec20[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 1.863945999999999)) - 60.96496296296296);
336 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
337 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
338 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
339 fVec2[0] = fTemp3;
340 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
341 fRec17[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec23[0] + fRec18[0]) - 1.2716089999999989)) - 45.22606666666667);
342 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
343 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
344 fVec3[0] = fTemp4;
345 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
346 fRec15[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec24[0] + fRec16[0]) - 0.797042999999999)) - 32.799634146341475);
347 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
348 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
349 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
350 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
351 fVec4[0] = fTemp6;
352 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
353 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
354 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
355 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
356 fVec5[0] = fTemp7;
357 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
358 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
359 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
360 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
361 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
362 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
363 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
364 fVec6[0] = fTemp9;
365 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
366 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
367 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
368 double fTemp11 = (fConst10 * fRec29[1]);
369 double fTemp12 = (fConst16 * fRec30[1]);
370 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
371 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
372 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
373 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
374 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
375 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
376 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
377 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
378 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
379 fVec7[0] = fTemp15;
380 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
381 double fTemp16 = (fRec14[0] * (1 - fRec13[0]));
382 double fTemp17 = (1e-15 + fTemp16);
383 double fTemp18 = (1e-15 + ((fSlow11 * ((fTemp17 * (4 - (4 * fabs(fTemp17)))) - fTemp17)) + ((fSlow10 * fTemp5) + (fTemp16 + (fSlow9 * fRec5[0])))));
384 fVec8[0] = fTemp18;
385 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
386 double fTemp19 = (fRec4[0] * fRec3[0]);
387 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp19 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
388 fRec0[0] = ((fConst68 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
389 double fTemp20 = (1e-15 + (0.0082 * fRec36[1]));
390 fVec9[0] = fTemp20;
391 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
392 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp19) - 1.130461999999999)) - 112.13878048780487);
393 fRec35[0] = ((fConst68 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
394 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
395 // post processing
396 fRec35[1] = fRec35[0];
397 fRec36[1] = fRec36[0];
398 fRec37[1] = fRec37[0];
399 fVec9[1] = fVec9[0];
400 fRec0[1] = fRec0[0];
401 fRec1[1] = fRec1[0];
402 fRec4[1] = fRec4[0];
403 fVec8[1] = fVec8[0];
404 fRec5[1] = fRec5[0];
405 fVec7[1] = fVec7[0];
406 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
407 fRec34[1] = fRec34[0];
408 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
409 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
410 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
411 fRec32[1] = fRec32[0];
412 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
413 fRec26[1] = fRec26[0];
414 fVec6[1] = fVec6[0];
415 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
416 fRec28[1] = fRec28[0];
417 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
418 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
419 fRec8[1] = fRec8[0];
420 fVec5[1] = fVec5[0];
421 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
422 fRec10[1] = fRec10[0];
423 fRec11[1] = fRec11[0];
424 fVec4[1] = fVec4[0];
425 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
426 fRec14[1] = fRec14[0];
427 fRec15[1] = fRec15[0];
428 fRec24[1] = fRec24[0];
429 fVec3[1] = fVec3[0];
430 fRec16[1] = fRec16[0];
431 fRec17[1] = fRec17[0];
432 fRec23[1] = fRec23[0];
433 fVec2[1] = fVec2[0];
434 fRec18[1] = fRec18[0];
435 fRec19[1] = fRec19[0];
436 fRec20[1] = fRec20[0];
437 fRec22[1] = fRec22[0];
438 fVec1[1] = fVec1[0];
439 fRec21[1] = fRec21[0];
440 fRec13[1] = fRec13[0];
441 fRec3[1] = fRec3[0];
442 fRec2[1] = fRec2[0];
443 fVec0[1] = fVec0[0];
444 }
445 #undef fslider0
446 #undef fslider1
447 #undef fslider2
448 #undef fslider3
449 }
450
451 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
452 {
453 static_cast<Dsp*>(p)->compute(count, input0, output0);
454 }
455
456
457 void Dsp::connect(uint32_t port,void* data)
458 {
459 switch ((PortIndex)port)
460 {
461 case DRIVE:
462 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
463 break;
464 case PREGAIN:
465 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
466 break;
467 case WET_DRY:
468 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
469 break;
470 case GAIN1:
471 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
472 break;
473 default:
474 break;
475 }
476 }
477
478 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
479 {
480 static_cast<Dsp*>(p)->connect(port, data);
481 }
482
483
484 PluginLV2 *plugin() {
485 return new Dsp();
486 }
487
488 void Dsp::del_instance(PluginLV2 *p)
489 {
490 delete static_cast<Dsp*>(p);
491 }
492
493 /*
494 typedef enum
495 {
496 DRIVE,
497 PREGAIN,
498 WET_DRY,
499 GAIN1,
500 } PortIndex;
501 */
502
503 } // end namespace gxamp12
0 // generated from file '../src/LV2/faust/gxamp12_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp12_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fConst68;
130 double fRec0[2];
131 double fVec9[2];
132 double fRec37[2];
133 double fRec36[2];
134 double fRec35[2];
135 double fVec10[2];
136 double fRec48[2];
137 double fRec47[2];
138 double fRec46[2];
139 double fRec45[2];
140 double fVec11[2];
141 double fRec49[2];
142 double fRec44[2];
143 double fRec43[2];
144 double fVec12[2];
145 double fRec50[2];
146 double fRec42[2];
147 double fRec41[2];
148 double fRec58[3];
149 double fVec13[2];
150 double fRec57[2];
151 double fRec56[2];
152 double fRec55[3];
153 double fVec14[2];
154 double fRec54[2];
155 double fRec53[3];
156 double fRec52[3];
157 double fRec62[2];
158 double fRec61[3];
159 double fVec15[2];
160 double fRec60[2];
161 double fRec59[3];
162 double fRec66[2];
163 double fRec65[3];
164 double fRec64[3];
165 double fRec63[3];
166 double fRec68[2];
167 double fRec67[3];
168 double fVec16[2];
169 double fRec51[2];
170 double fVec17[2];
171 double fRec40[2];
172 double fVec18[2];
173 double fRec69[2];
174 double fRec39[2];
175 double fRec38[2];
176 double fVec19[2];
177 double fRec72[2];
178 double fRec71[2];
179 double fRec70[2];
180 void connect(uint32_t port,void* data);
181 void clear_state_f();
182 void init(uint32_t samplingFreq);
183 void compute(int count, float *input0, float *input1, float *output0, float *output1);
184
185 static void clear_state_f_static(PluginLV2*);
186 static void init_static(uint32_t samplingFreq, PluginLV2*);
187 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
188 static void del_instance(PluginLV2 *p);
189 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
190 public:
191 Dsp();
192 ~Dsp();
193 };
194
195
196
197 Dsp::Dsp()
198 : PluginLV2() {
199 version = PLUGINLV2_VERSION;
200 id = "pre 6DJ8/ master 6V6";
201 name = N_("pre 6DJ8/ master 6V6");
202 mono_audio = 0;
203 stereo_audio = compute_static;
204 set_samplerate = init_static;
205 activate_plugin = 0;
206 connect_ports = connect_static;
207 clear_state = clear_state_f_static;
208 delete_instance = del_instance;
209 }
210
211 Dsp::~Dsp() {
212 }
213
214 inline void Dsp::clear_state_f()
215 {
216 for (int i=0; i<2; i++) fVec0[i] = 0;
217 for (int i=0; i<2; i++) fRec2[i] = 0;
218 for (int i=0; i<2; i++) fRec3[i] = 0;
219 for (int i=0; i<2; i++) fRec13[i] = 0;
220 for (int i=0; i<2; i++) fRec21[i] = 0;
221 for (int i=0; i<2; i++) fVec1[i] = 0;
222 for (int i=0; i<2; i++) fRec22[i] = 0;
223 for (int i=0; i<2; i++) fRec20[i] = 0;
224 for (int i=0; i<2; i++) fRec19[i] = 0;
225 for (int i=0; i<2; i++) fRec18[i] = 0;
226 for (int i=0; i<2; i++) fVec2[i] = 0;
227 for (int i=0; i<2; i++) fRec23[i] = 0;
228 for (int i=0; i<2; i++) fRec17[i] = 0;
229 for (int i=0; i<2; i++) fRec16[i] = 0;
230 for (int i=0; i<2; i++) fVec3[i] = 0;
231 for (int i=0; i<2; i++) fRec24[i] = 0;
232 for (int i=0; i<2; i++) fRec15[i] = 0;
233 for (int i=0; i<2; i++) fRec14[i] = 0;
234 for (int i=0; i<3; i++) fRec12[i] = 0;
235 for (int i=0; i<2; i++) fVec4[i] = 0;
236 for (int i=0; i<2; i++) fRec11[i] = 0;
237 for (int i=0; i<2; i++) fRec10[i] = 0;
238 for (int i=0; i<3; i++) fRec9[i] = 0;
239 for (int i=0; i<2; i++) fVec5[i] = 0;
240 for (int i=0; i<2; i++) fRec8[i] = 0;
241 for (int i=0; i<3; i++) fRec7[i] = 0;
242 for (int i=0; i<3; i++) fRec6[i] = 0;
243 for (int i=0; i<2; i++) fRec28[i] = 0;
244 for (int i=0; i<3; i++) fRec27[i] = 0;
245 for (int i=0; i<2; i++) fVec6[i] = 0;
246 for (int i=0; i<2; i++) fRec26[i] = 0;
247 for (int i=0; i<3; i++) fRec25[i] = 0;
248 for (int i=0; i<2; i++) fRec32[i] = 0;
249 for (int i=0; i<3; i++) fRec31[i] = 0;
250 for (int i=0; i<3; i++) fRec30[i] = 0;
251 for (int i=0; i<3; i++) fRec29[i] = 0;
252 for (int i=0; i<2; i++) fRec34[i] = 0;
253 for (int i=0; i<3; i++) fRec33[i] = 0;
254 for (int i=0; i<2; i++) fVec7[i] = 0;
255 for (int i=0; i<2; i++) fRec5[i] = 0;
256 for (int i=0; i<2; i++) fVec8[i] = 0;
257 for (int i=0; i<2; i++) fRec4[i] = 0;
258 for (int i=0; i<2; i++) fRec1[i] = 0;
259 for (int i=0; i<2; i++) fRec0[i] = 0;
260 for (int i=0; i<2; i++) fVec9[i] = 0;
261 for (int i=0; i<2; i++) fRec37[i] = 0;
262 for (int i=0; i<2; i++) fRec36[i] = 0;
263 for (int i=0; i<2; i++) fRec35[i] = 0;
264 for (int i=0; i<2; i++) fVec10[i] = 0;
265 for (int i=0; i<2; i++) fRec48[i] = 0;
266 for (int i=0; i<2; i++) fRec47[i] = 0;
267 for (int i=0; i<2; i++) fRec46[i] = 0;
268 for (int i=0; i<2; i++) fRec45[i] = 0;
269 for (int i=0; i<2; i++) fVec11[i] = 0;
270 for (int i=0; i<2; i++) fRec49[i] = 0;
271 for (int i=0; i<2; i++) fRec44[i] = 0;
272 for (int i=0; i<2; i++) fRec43[i] = 0;
273 for (int i=0; i<2; i++) fVec12[i] = 0;
274 for (int i=0; i<2; i++) fRec50[i] = 0;
275 for (int i=0; i<2; i++) fRec42[i] = 0;
276 for (int i=0; i<2; i++) fRec41[i] = 0;
277 for (int i=0; i<3; i++) fRec58[i] = 0;
278 for (int i=0; i<2; i++) fVec13[i] = 0;
279 for (int i=0; i<2; i++) fRec57[i] = 0;
280 for (int i=0; i<2; i++) fRec56[i] = 0;
281 for (int i=0; i<3; i++) fRec55[i] = 0;
282 for (int i=0; i<2; i++) fVec14[i] = 0;
283 for (int i=0; i<2; i++) fRec54[i] = 0;
284 for (int i=0; i<3; i++) fRec53[i] = 0;
285 for (int i=0; i<3; i++) fRec52[i] = 0;
286 for (int i=0; i<2; i++) fRec62[i] = 0;
287 for (int i=0; i<3; i++) fRec61[i] = 0;
288 for (int i=0; i<2; i++) fVec15[i] = 0;
289 for (int i=0; i<2; i++) fRec60[i] = 0;
290 for (int i=0; i<3; i++) fRec59[i] = 0;
291 for (int i=0; i<2; i++) fRec66[i] = 0;
292 for (int i=0; i<3; i++) fRec65[i] = 0;
293 for (int i=0; i<3; i++) fRec64[i] = 0;
294 for (int i=0; i<3; i++) fRec63[i] = 0;
295 for (int i=0; i<2; i++) fRec68[i] = 0;
296 for (int i=0; i<3; i++) fRec67[i] = 0;
297 for (int i=0; i<2; i++) fVec16[i] = 0;
298 for (int i=0; i<2; i++) fRec51[i] = 0;
299 for (int i=0; i<2; i++) fVec17[i] = 0;
300 for (int i=0; i<2; i++) fRec40[i] = 0;
301 for (int i=0; i<2; i++) fVec18[i] = 0;
302 for (int i=0; i<2; i++) fRec69[i] = 0;
303 for (int i=0; i<2; i++) fRec39[i] = 0;
304 for (int i=0; i<2; i++) fRec38[i] = 0;
305 for (int i=0; i<2; i++) fVec19[i] = 0;
306 for (int i=0; i<2; i++) fRec72[i] = 0;
307 for (int i=0; i<2; i++) fRec71[i] = 0;
308 for (int i=0; i<2; i++) fRec70[i] = 0;
309 }
310
311 void Dsp::clear_state_f_static(PluginLV2 *p)
312 {
313 static_cast<Dsp*>(p)->clear_state_f();
314 }
315
316 inline void Dsp::init(uint32_t samplingFreq)
317 {
318 fSamplingFreq = samplingFreq;
319 iConst0 = min(192000, max(1, fSamplingFreq));
320 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
321 fConst2 = (1 + fConst1);
322 fConst3 = (0 - ((1 - fConst1) / fConst2));
323 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
324 fConst5 = (1 + fConst4);
325 fConst6 = (0 - ((1 - fConst4) / fConst5));
326 fConst7 = (1.0 / fConst5);
327 fConst8 = tan((942.4777960769379 / iConst0));
328 fConst9 = (1.0 / faustpower<2>(fConst8));
329 fConst10 = (2 * (1 - fConst9));
330 fConst11 = (1.0 / fConst8);
331 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
332 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
333 fConst14 = tan((3769.9111843077517 / iConst0));
334 fConst15 = (1.0 / faustpower<2>(fConst14));
335 fConst16 = (2 * (1 - fConst15));
336 fConst17 = (1.0 / fConst14);
337 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
338 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
339 fConst20 = (1.0 / fConst19);
340 fConst21 = (1 + fConst17);
341 fConst22 = (0 - ((1 - fConst17) / fConst21));
342 fConst23 = tan((10053.096491487338 / iConst0));
343 fConst24 = (1.0 / faustpower<2>(fConst23));
344 fConst25 = (2 * (1 - fConst24));
345 fConst26 = (1.0 / fConst23);
346 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
347 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
348 fConst29 = (1.0 / fConst28);
349 fConst30 = (1 + fConst26);
350 fConst31 = (0 - ((1 - fConst26) / fConst30));
351 fConst32 = tan((47123.8898038469 / iConst0));
352 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
353 fConst34 = (1.0 / fConst32);
354 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
355 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
356 fConst37 = (1.0 / fConst36);
357 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
358 fConst39 = (1 + fConst38);
359 fConst40 = (0 - ((1 - fConst38) / fConst39));
360 fConst41 = (1.0 / fConst39);
361 fConst42 = (0 - fConst1);
362 fConst43 = (0.05 / fConst2);
363 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
364 fConst45 = (1 + fConst44);
365 fConst46 = (0 - ((1 - fConst44) / fConst45));
366 fConst47 = (1.0 / fConst45);
367 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
368 fConst49 = (1 + fConst48);
369 fConst50 = (0 - ((1 - fConst48) / fConst49));
370 fConst51 = (1.0 / fConst49);
371 fConst52 = (1.0 / (fConst2 * fConst36));
372 fConst53 = (1.0 / fConst30);
373 fConst54 = (0 - fConst17);
374 fConst55 = (1.0 / (fConst21 * fConst28));
375 fConst56 = (2 * (0 - fConst15));
376 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
377 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
378 fConst59 = (1 + fConst11);
379 fConst60 = (0 - ((1 - fConst11) / fConst59));
380 fConst61 = (0 - fConst11);
381 fConst62 = (1.0 / (fConst59 * fConst19));
382 fConst63 = (2 * (0 - fConst9));
383 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
384 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
385 fConst66 = (0 - fConst26);
386 fConst67 = (2 * (0 - fConst24));
387 fConst68 = (0.025 / fConst2);
388 clear_state_f();
389 }
390
391 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
392 {
393 static_cast<Dsp*>(p)->init(samplingFreq);
394 }
395
396 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
397 {
398 #define fslider0 (*fslider0_)
399 #define fslider1 (*fslider1_)
400 #define fslider2 (*fslider2_)
401 #define fslider3 (*fslider3_)
402 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
403 double fSlow1 = (1.000000000000001e-05 * fslider1);
404 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
405 double fSlow3 = fslider3;
406 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
407 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
408 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
409 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
410 double fSlow8 = (2 * (fSlow3 - 0.5));
411 double fSlow9 = (1 - max(0, (0 - fSlow8)));
412 double fSlow10 = (1 - max(0, fSlow8));
413 double fSlow11 = (1.25 * fSlow3);
414 for (int i=0; i<count; i++) {
415 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
416 fVec0[0] = fTemp0;
417 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
418 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
419 double fTemp1 = (fConst10 * fRec6[1]);
420 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
421 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
422 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
423 fVec1[0] = fTemp2;
424 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
425 fRec20[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 1.863945999999999)) - 60.96496296296296);
426 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
427 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
428 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
429 fVec2[0] = fTemp3;
430 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
431 fRec17[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec23[0] + fRec18[0]) - 1.2716089999999989)) - 45.22606666666667);
432 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
433 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
434 fVec3[0] = fTemp4;
435 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
436 fRec15[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec24[0] + fRec16[0]) - 0.797042999999999)) - 32.799634146341475);
437 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
438 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
439 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
440 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
441 fVec4[0] = fTemp6;
442 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
443 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
444 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
445 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
446 fVec5[0] = fTemp7;
447 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
448 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
449 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
450 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
451 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
452 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
453 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
454 fVec6[0] = fTemp9;
455 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
456 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
457 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
458 double fTemp11 = (fConst10 * fRec29[1]);
459 double fTemp12 = (fConst16 * fRec30[1]);
460 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
461 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
462 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
463 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
464 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
465 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
466 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
467 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
468 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
469 fVec7[0] = fTemp15;
470 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
471 double fTemp16 = (1 - fRec13[0]);
472 double fTemp17 = (fRec14[0] * fTemp16);
473 double fTemp18 = (1e-15 + fTemp17);
474 double fTemp19 = (1e-15 + ((fSlow11 * ((fTemp18 * (4 - (4 * fabs(fTemp18)))) - fTemp18)) + ((fSlow10 * fTemp5) + (fTemp17 + (fSlow9 * fRec5[0])))));
475 fVec8[0] = fTemp19;
476 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
477 double fTemp20 = (fRec4[0] * fRec3[0]);
478 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp20 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
479 fRec0[0] = ((fConst68 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
480 double fTemp21 = (1e-15 + (0.0082 * fRec36[1]));
481 fVec9[0] = fTemp21;
482 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
483 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp20) - 1.130461999999999)) - 112.13878048780487);
484 fRec35[0] = ((fConst68 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
485 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
486 double fTemp22 = (1e-15 + (0.027 * fRec47[1]));
487 fVec10[0] = fTemp22;
488 fRec48[0] = ((fConst41 * (fVec10[0] + fVec10[1])) + (fConst40 * fRec48[1]));
489 fRec47[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec48[0] + ((double)input1[i] * fRec21[0])) - 1.863945999999999)) - 60.96496296296296);
490 fRec46[0] = ((fConst43 * ((fConst42 * fRec47[1]) + (fConst1 * fRec47[0]))) + (fConst3 * fRec46[1]));
491 fRec45[0] = ((fConst7 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
492 double fTemp23 = (1e-15 + (0.015 * fRec44[1]));
493 fVec11[0] = fTemp23;
494 fRec49[0] = ((fConst47 * (fVec11[0] + fVec11[1])) + (fConst46 * fRec49[1]));
495 fRec44[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec49[0] + fRec45[0]) - 1.2716089999999989)) - 45.22606666666667);
496 fRec43[0] = ((fConst43 * ((fConst42 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
497 double fTemp24 = (1e-15 + (0.0082 * fRec42[1]));
498 fVec12[0] = fTemp24;
499 fRec50[0] = ((fConst51 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec50[1]));
500 fRec42[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec50[0] + fRec43[0]) - 0.797042999999999)) - 32.799634146341475);
501 fRec41[0] = ((fConst43 * ((fConst42 * fRec42[1]) + (fConst1 * fRec42[0]))) + (fConst3 * fRec41[1]));
502 double fTemp25 = (fTemp16 * fRec41[0]);
503 double fTemp26 = (1e-15 + (fRec13[0] * fRec41[0]));
504 double fTemp27 = (fConst10 * fRec52[1]);
505 fRec58[0] = (fTemp26 - (fConst37 * ((fConst35 * fRec58[2]) + (fConst33 * fRec58[1]))));
506 double fTemp28 = (fRec58[2] + (fRec58[0] + (2 * fRec58[1])));
507 fVec13[0] = fTemp28;
508 fRec57[0] = ((fConst52 * ((fConst42 * fVec13[1]) + (fConst1 * fVec13[0]))) + (fConst3 * fRec57[1]));
509 fRec56[0] = ((fConst53 * (fRec57[0] + fRec57[1])) + (fConst31 * fRec56[1]));
510 fRec55[0] = (fRec56[0] - (fConst29 * ((fConst27 * fRec55[2]) + (fConst25 * fRec55[1]))));
511 double fTemp29 = (fRec55[2] + (fRec55[0] + (2 * fRec55[1])));
512 fVec14[0] = fTemp29;
513 fRec54[0] = ((fConst55 * ((fConst54 * fVec14[1]) + (fConst17 * fVec14[0]))) + (fConst22 * fRec54[1]));
514 fRec53[0] = (fRec54[0] - (fConst20 * ((fConst18 * fRec53[2]) + (fConst16 * fRec53[1]))));
515 fRec52[0] = ((fConst20 * (((fConst15 * fRec53[0]) + (fConst56 * fRec53[1])) + (fConst15 * fRec53[2]))) - (fConst13 * ((fConst12 * fRec52[2]) + fTemp27)));
516 double fTemp30 = max(-1, min(1, (fSlow4 * (fRec52[2] + (fConst13 * (fTemp27 + (fConst12 * fRec52[0])))))));
517 fRec62[0] = ((fConst55 * (fVec14[0] + fVec14[1])) + (fConst22 * fRec62[1]));
518 fRec61[0] = (fRec62[0] - (fConst20 * ((fConst18 * fRec61[2]) + (fConst16 * fRec61[1]))));
519 double fTemp31 = (fRec61[2] + (fRec61[0] + (2 * fRec61[1])));
520 fVec15[0] = fTemp31;
521 fRec60[0] = ((fConst62 * ((fConst61 * fVec15[1]) + (fConst11 * fVec15[0]))) + (fConst60 * fRec60[1]));
522 fRec59[0] = (fRec60[0] - (fConst58 * ((fConst57 * fRec59[2]) + (fConst10 * fRec59[1]))));
523 double fTemp32 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec59[0]) + (fConst63 * fRec59[1])) + (fConst9 * fRec59[2])))));
524 double fTemp33 = (fConst10 * fRec63[1]);
525 double fTemp34 = (fConst16 * fRec64[1]);
526 fRec66[0] = ((fConst53 * ((fConst66 * fRec57[1]) + (fConst26 * fRec57[0]))) + (fConst31 * fRec66[1]));
527 fRec65[0] = (fRec66[0] - (fConst29 * ((fConst27 * fRec65[2]) + (fConst25 * fRec65[1]))));
528 fRec64[0] = ((fConst29 * (((fConst24 * fRec65[0]) + (fConst67 * fRec65[1])) + (fConst24 * fRec65[2]))) - (fConst65 * ((fConst64 * fRec64[2]) + fTemp34)));
529 fRec63[0] = ((fRec64[2] + (fConst65 * (fTemp34 + (fConst64 * fRec64[0])))) - (fConst13 * ((fConst12 * fRec63[2]) + fTemp33)));
530 double fTemp35 = max(-1, min(1, (fSlow6 * (fRec63[2] + (fConst13 * (fTemp33 + (fConst12 * fRec63[0])))))));
531 fRec68[0] = ((fConst62 * (fVec15[0] + fVec15[1])) + (fConst60 * fRec68[1]));
532 fRec67[0] = (fRec68[0] - (fConst58 * ((fConst57 * fRec67[2]) + (fConst10 * fRec67[1]))));
533 double fTemp36 = max(-1, min(1, (fSlow7 * (fRec67[2] + (fRec67[0] + (2 * fRec67[1]))))));
534 double fTemp37 = ((1.2589412 * (fTemp36 * (1 - (0.3333333333333333 * faustpower<2>(fTemp36))))) + (1.584893192 * ((fTemp35 * (1 - (0.3333333333333333 * faustpower<2>(fTemp35)))) + ((fTemp32 * (1 - (0.3333333333333333 * faustpower<2>(fTemp32)))) + (0.8413951417869425 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))))))));
535 fVec16[0] = fTemp37;
536 fRec51[0] = ((fConst7 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec51[1]));
537 double fTemp38 = (1e-15 + fTemp25);
538 double fTemp39 = (1e-15 + ((fSlow11 * ((fTemp38 * (4 - (4 * fabs(fTemp38)))) - fTemp38)) + (((fSlow9 * fRec51[0]) + (fSlow10 * fTemp26)) + fTemp25)));
539 fVec17[0] = fTemp39;
540 fRec40[0] = ((fConst7 * (fVec17[0] + fVec17[1])) + (fConst6 * fRec40[1]));
541 double fTemp40 = (fRec3[0] * fRec40[0]);
542 double fTemp41 = (1e-15 + (0.0082 * fRec39[1]));
543 fVec18[0] = fTemp41;
544 fRec69[0] = ((fConst7 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec69[1]));
545 fRec39[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec69[0] + fTemp40) - 1.130739999999999)) - 112.10487804878048);
546 fRec38[0] = ((fConst68 * ((fConst42 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
547 double fTemp42 = (1e-15 + (0.0082 * fRec71[1]));
548 fVec19[0] = fTemp42;
549 fRec72[0] = ((fConst7 * (fVec19[0] + fVec19[1])) + (fConst6 * fRec72[1]));
550 fRec71[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec72[0] + fTemp40) - 1.130461999999999)) - 112.13878048780487);
551 fRec70[0] = ((fConst68 * ((fConst42 * fRec71[1]) + (fConst1 * fRec71[0]))) + (fConst3 * fRec70[1]));
552 output1[i] = (FAUSTFLOAT)(fRec70[0] + fRec38[0]);
553 // post processing
554 fRec70[1] = fRec70[0];
555 fRec71[1] = fRec71[0];
556 fRec72[1] = fRec72[0];
557 fVec19[1] = fVec19[0];
558 fRec38[1] = fRec38[0];
559 fRec39[1] = fRec39[0];
560 fRec69[1] = fRec69[0];
561 fVec18[1] = fVec18[0];
562 fRec40[1] = fRec40[0];
563 fVec17[1] = fVec17[0];
564 fRec51[1] = fRec51[0];
565 fVec16[1] = fVec16[0];
566 fRec67[2] = fRec67[1]; fRec67[1] = fRec67[0];
567 fRec68[1] = fRec68[0];
568 fRec63[2] = fRec63[1]; fRec63[1] = fRec63[0];
569 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
570 fRec65[2] = fRec65[1]; fRec65[1] = fRec65[0];
571 fRec66[1] = fRec66[0];
572 fRec59[2] = fRec59[1]; fRec59[1] = fRec59[0];
573 fRec60[1] = fRec60[0];
574 fVec15[1] = fVec15[0];
575 fRec61[2] = fRec61[1]; fRec61[1] = fRec61[0];
576 fRec62[1] = fRec62[0];
577 fRec52[2] = fRec52[1]; fRec52[1] = fRec52[0];
578 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
579 fRec54[1] = fRec54[0];
580 fVec14[1] = fVec14[0];
581 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
582 fRec56[1] = fRec56[0];
583 fRec57[1] = fRec57[0];
584 fVec13[1] = fVec13[0];
585 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
586 fRec41[1] = fRec41[0];
587 fRec42[1] = fRec42[0];
588 fRec50[1] = fRec50[0];
589 fVec12[1] = fVec12[0];
590 fRec43[1] = fRec43[0];
591 fRec44[1] = fRec44[0];
592 fRec49[1] = fRec49[0];
593 fVec11[1] = fVec11[0];
594 fRec45[1] = fRec45[0];
595 fRec46[1] = fRec46[0];
596 fRec47[1] = fRec47[0];
597 fRec48[1] = fRec48[0];
598 fVec10[1] = fVec10[0];
599 fRec35[1] = fRec35[0];
600 fRec36[1] = fRec36[0];
601 fRec37[1] = fRec37[0];
602 fVec9[1] = fVec9[0];
603 fRec0[1] = fRec0[0];
604 fRec1[1] = fRec1[0];
605 fRec4[1] = fRec4[0];
606 fVec8[1] = fVec8[0];
607 fRec5[1] = fRec5[0];
608 fVec7[1] = fVec7[0];
609 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
610 fRec34[1] = fRec34[0];
611 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
612 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
613 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
614 fRec32[1] = fRec32[0];
615 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
616 fRec26[1] = fRec26[0];
617 fVec6[1] = fVec6[0];
618 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
619 fRec28[1] = fRec28[0];
620 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
621 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
622 fRec8[1] = fRec8[0];
623 fVec5[1] = fVec5[0];
624 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
625 fRec10[1] = fRec10[0];
626 fRec11[1] = fRec11[0];
627 fVec4[1] = fVec4[0];
628 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
629 fRec14[1] = fRec14[0];
630 fRec15[1] = fRec15[0];
631 fRec24[1] = fRec24[0];
632 fVec3[1] = fVec3[0];
633 fRec16[1] = fRec16[0];
634 fRec17[1] = fRec17[0];
635 fRec23[1] = fRec23[0];
636 fVec2[1] = fVec2[0];
637 fRec18[1] = fRec18[0];
638 fRec19[1] = fRec19[0];
639 fRec20[1] = fRec20[0];
640 fRec22[1] = fRec22[0];
641 fVec1[1] = fVec1[0];
642 fRec21[1] = fRec21[0];
643 fRec13[1] = fRec13[0];
644 fRec3[1] = fRec3[0];
645 fRec2[1] = fRec2[0];
646 fVec0[1] = fVec0[0];
647 }
648 #undef fslider0
649 #undef fslider1
650 #undef fslider2
651 #undef fslider3
652 }
653
654 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
655 {
656 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
657 }
658
659
660 void Dsp::connect(uint32_t port,void* data)
661 {
662 switch ((PortIndex)port)
663 {
664 case DRIVE:
665 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
666 break;
667 case PREGAIN:
668 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
669 break;
670 case WET_DRY:
671 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
672 break;
673 case GAIN1:
674 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
675 break;
676 default:
677 break;
678 }
679 }
680
681 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
682 {
683 static_cast<Dsp*>(p)->connect(port, data);
684 }
685
686
687 PluginLV2 *plugin() {
688 return new Dsp();
689 }
690
691 void Dsp::del_instance(PluginLV2 *p)
692 {
693 delete static_cast<Dsp*>(p);
694 }
695
696 /*
697 typedef enum
698 {
699 DRIVE,
700 PREGAIN,
701 WET_DRY,
702 GAIN1,
703 } PortIndex;
704 */
705
706 } // end namespace gxamp12_stereo
0 // generated from file '../src/LV2/faust/gxamp13.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp13 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 void connect(uint32_t port,void* data);
144 void clear_state_f();
145 void init(uint32_t samplingFreq);
146 void compute(int count, float *input0, float *output0);
147
148 static void clear_state_f_static(PluginLV2*);
149 static void init_static(uint32_t samplingFreq, PluginLV2*);
150 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
151 static void del_instance(PluginLV2 *p);
152 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
153 public:
154 Dsp();
155 ~Dsp();
156 };
157
158
159
160 Dsp::Dsp()
161 : PluginLV2() {
162 version = PLUGINLV2_VERSION;
163 id = "6DJ8 feedback";
164 name = N_("6DJ8 feedback");
165 mono_audio = compute_static;
166 stereo_audio = 0;
167 set_samplerate = init_static;
168 activate_plugin = 0;
169 connect_ports = connect_static;
170 clear_state = clear_state_f_static;
171 delete_instance = del_instance;
172 }
173
174 Dsp::~Dsp() {
175 }
176
177 inline void Dsp::clear_state_f()
178 {
179 for (int i=0; i<2; i++) fRec0[i] = 0;
180 for (int i=0; i<2; i++) fRec8[i] = 0;
181 for (int i=0; i<2; i++) fRec22[i] = 0;
182 for (int i=0; i<32768; i++) fVec0[i] = 0;
183 for (int i=0; i<2; i++) fRec21[i] = 0;
184 for (int i=0; i<2; i++) fRec20[i] = 0;
185 for (int i=0; i<2; i++) fRec23[i] = 0;
186 for (int i=0; i<3; i++) fRec19[i] = 0;
187 for (int i=0; i<2; i++) fVec1[i] = 0;
188 for (int i=0; i<2; i++) fRec18[i] = 0;
189 for (int i=0; i<2; i++) fRec17[i] = 0;
190 for (int i=0; i<3; i++) fRec16[i] = 0;
191 for (int i=0; i<2; i++) fVec2[i] = 0;
192 for (int i=0; i<2; i++) fRec15[i] = 0;
193 for (int i=0; i<3; i++) fRec14[i] = 0;
194 for (int i=0; i<3; i++) fRec13[i] = 0;
195 for (int i=0; i<2; i++) fRec27[i] = 0;
196 for (int i=0; i<3; i++) fRec26[i] = 0;
197 for (int i=0; i<2; i++) fVec3[i] = 0;
198 for (int i=0; i<2; i++) fRec25[i] = 0;
199 for (int i=0; i<3; i++) fRec24[i] = 0;
200 for (int i=0; i<2; i++) fRec31[i] = 0;
201 for (int i=0; i<3; i++) fRec30[i] = 0;
202 for (int i=0; i<3; i++) fRec29[i] = 0;
203 for (int i=0; i<3; i++) fRec28[i] = 0;
204 for (int i=0; i<2; i++) fRec33[i] = 0;
205 for (int i=0; i<3; i++) fRec32[i] = 0;
206 for (int i=0; i<2; i++) fVec4[i] = 0;
207 for (int i=0; i<2; i++) fRec12[i] = 0;
208 for (int i=0; i<2; i++) fVec5[i] = 0;
209 for (int i=0; i<2; i++) fRec34[i] = 0;
210 for (int i=0; i<2; i++) fRec11[i] = 0;
211 for (int i=0; i<2; i++) fRec10[i] = 0;
212 for (int i=0; i<2; i++) fVec6[i] = 0;
213 for (int i=0; i<2; i++) fRec37[i] = 0;
214 for (int i=0; i<2; i++) fRec36[i] = 0;
215 for (int i=0; i<2; i++) fRec35[i] = 0;
216 for (int i=0; i<2; i++) fRec9[i] = 0;
217 for (int i=0; i<2; i++) fVec7[i] = 0;
218 for (int i=0; i<2; i++) fRec7[i] = 0;
219 for (int i=0; i<2; i++) fVec8[i] = 0;
220 for (int i=0; i<2; i++) fRec38[i] = 0;
221 for (int i=0; i<2; i++) fRec6[i] = 0;
222 for (int i=0; i<2; i++) fRec5[i] = 0;
223 for (int i=0; i<2; i++) fVec9[i] = 0;
224 for (int i=0; i<2; i++) fRec41[i] = 0;
225 for (int i=0; i<2; i++) fRec40[i] = 0;
226 for (int i=0; i<2; i++) fRec39[i] = 0;
227 for (int i=0; i<2; i++) fRec4[i] = 0;
228 for (int i=0; i<2; i++) fRec3[i] = 0;
229 for (int i=0; i<2; i++) fVec10[i] = 0;
230 for (int i=0; i<2; i++) fRec42[i] = 0;
231 for (int i=0; i<2; i++) fRec2[i] = 0;
232 for (int i=0; i<2; i++) fRec1[i] = 0;
233 }
234
235 void Dsp::clear_state_f_static(PluginLV2 *p)
236 {
237 static_cast<Dsp*>(p)->clear_state_f();
238 }
239
240 inline void Dsp::init(uint32_t samplingFreq)
241 {
242 fSamplingFreq = samplingFreq;
243 iConst0 = min(192000, max(1, fSamplingFreq));
244 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
245 fConst2 = (1 + fConst1);
246 fConst3 = (0 - ((1 - fConst1) / fConst2));
247 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
248 fConst5 = (1 + fConst4);
249 fConst6 = (0 - ((1 - fConst4) / fConst5));
250 fConst7 = tan((942.4777960769379 / iConst0));
251 fConst8 = (1.0 / faustpower<2>(fConst7));
252 fConst9 = (2 * (1 - fConst8));
253 fConst10 = (1.0 / fConst7);
254 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
255 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
256 fConst13 = tan((3769.9111843077517 / iConst0));
257 fConst14 = (1.0 / faustpower<2>(fConst13));
258 fConst15 = (2 * (1 - fConst14));
259 fConst16 = (1.0 / fConst13);
260 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
261 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
262 fConst19 = (1.0 / fConst18);
263 fConst20 = (1 + fConst16);
264 fConst21 = (0 - ((1 - fConst16) / fConst20));
265 fConst22 = tan((10053.096491487338 / iConst0));
266 fConst23 = (1.0 / faustpower<2>(fConst22));
267 fConst24 = (2 * (1 - fConst23));
268 fConst25 = (1.0 / fConst22);
269 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
270 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
271 fConst28 = (1.0 / fConst27);
272 fConst29 = (1 + fConst25);
273 fConst30 = (0 - ((1 - fConst25) / fConst29));
274 fConst31 = tan((47123.8898038469 / iConst0));
275 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
276 fConst33 = (1.0 / fConst31);
277 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
278 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
279 fConst36 = (1.0 / fConst35);
280 IOTA = 0;
281 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
282 fConst38 = (0.009000000000000008 / iConst0);
283 fConst39 = (0 - fConst1);
284 fConst40 = (1.0 / (fConst2 * fConst35));
285 fConst41 = (1.0 / fConst29);
286 fConst42 = (0 - fConst16);
287 fConst43 = (1.0 / (fConst20 * fConst27));
288 fConst44 = (2 * (0 - fConst14));
289 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
290 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
291 fConst47 = (1 + fConst10);
292 fConst48 = (0 - ((1 - fConst10) / fConst47));
293 fConst49 = (0 - fConst10);
294 fConst50 = (1.0 / (fConst47 * fConst18));
295 fConst51 = (2 * (0 - fConst8));
296 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
297 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
298 fConst54 = (0 - fConst25);
299 fConst55 = (2 * (0 - fConst23));
300 fConst56 = (1.0 / fConst5);
301 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
302 fConst58 = (1 + fConst57);
303 fConst59 = (0 - ((1 - fConst57) / fConst58));
304 fConst60 = (1.0 / fConst58);
305 fConst61 = (0.05 / fConst2);
306 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
307 fConst63 = (1 + fConst62);
308 fConst64 = (0 - ((1 - fConst62) / fConst63));
309 fConst65 = (1.0 / fConst63);
310 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
311 fConst67 = (1 + fConst66);
312 fConst68 = (0 - ((1 - fConst66) / fConst67));
313 fConst69 = (1.0 / fConst67);
314 clear_state_f();
315 }
316
317 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
318 {
319 static_cast<Dsp*>(p)->init(samplingFreq);
320 }
321
322 inline void Dsp::compute(int count, float *input0, float *output0)
323 {
324 #define fslider0 (*fslider0_)
325 #define fslider1 (*fslider1_)
326 #define fslider2 (*fslider2_)
327 #define fslider3 (*fslider3_)
328 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
329 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
330 double fSlow2 = (1.000000000000001e-05 * fslider2);
331 double fSlow3 = fslider3;
332 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
333 double fSlow5 = pow(1e+01,(2 * fSlow3));
334 double fSlow6 = (fConst46 * fSlow5);
335 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
336 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
337 double fSlow9 = (2 * (fSlow3 - 0.5));
338 double fSlow10 = (1 - max(0, (0 - fSlow9)));
339 double fSlow11 = (0.024937655860349125 * (1 - max(0, fSlow9)));
340 double fSlow12 = (1.25 * fSlow3);
341 for (int i=0; i<count; i++) {
342 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
343 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
344 double fTemp0 = (fConst9 * fRec13[1]);
345 double fTemp1 = (double)input0[i];
346 double fTemp2 = fabs(fTemp1);
347 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
348 double fTemp3 = max(fRec22[0], fTemp2);
349 fVec0[IOTA&32767] = fTemp3;
350 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
351 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
352 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
353 double fTemp5 = (0 - fTemp4);
354 double fTemp6 = (40.1 * fTemp5);
355 double fTemp7 = max(-600, fTemp6);
356 double fTemp8 = (0 - fTemp7);
357 double fTemp9 = (fTemp1 - fTemp4);
358 double fTemp10 = (40.1 * fTemp9);
359 double fTemp11 = max(-600, fTemp10);
360 double fTemp12 = (0 - fTemp11);
361 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
362 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
363 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
364 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
365 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
366 fVec1[0] = fTemp15;
367 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
368 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
369 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
370 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
371 fVec2[0] = fTemp16;
372 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
373 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
374 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
375 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
376 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
377 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
378 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
379 fVec3[0] = fTemp18;
380 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
381 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
382 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
383 double fTemp20 = (fConst9 * fRec28[1]);
384 double fTemp21 = (fConst15 * fRec29[1]);
385 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
386 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
387 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
388 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
389 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
390 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
391 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
392 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
393 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
394 fVec4[0] = fTemp24;
395 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
396 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
397 fVec5[0] = fTemp25;
398 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
399 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
400 double fTemp27 = (1 - fRec23[0]);
401 fRec11[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fTemp13 * ((fTemp27 * (0.024937655860349125 + (fSlow12 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))) + (fSlow11 * fRec23[0]))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 1.863945999999999)) - 60.96496296296296);
402 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
403 double fTemp28 = (1e-15 + (0.015 * fRec36[1]));
404 fVec6[0] = fTemp28;
405 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
406 fRec36[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec37[0] + fRec9[1]) - 1.2716089999999989)) - 45.22606666666667);
407 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
408 fRec9[0] = ((0.6 * fRec35[0]) - fRec10[0]);
409 double fTemp29 = (fRec9[0] * fRec8[0]);
410 fVec7[0] = fTemp29;
411 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
412 double fTemp30 = (1e-15 + (0.015 * fRec6[1]));
413 fVec8[0] = fTemp30;
414 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
415 fRec6[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec38[0] + fRec7[0]) - 1.2716089999999989)) - 45.22606666666667);
416 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
417 double fTemp31 = (1e-15 + (0.0082 * fRec40[1]));
418 fVec9[0] = fTemp31;
419 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
420 fRec40[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec41[0] + fRec4[1]) - 0.797042999999999)) - 32.799634146341475);
421 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
422 fRec4[0] = ((0.6 * fRec39[0]) + fRec5[0]);
423 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
424 double fTemp32 = (1e-15 + (0.0082 * fRec2[1]));
425 fVec10[0] = fTemp32;
426 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
427 fRec2[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec42[0] + fRec3[0]) - 0.797042999999999)) - 32.799634146341475);
428 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
429 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
430 // post processing
431 fRec1[1] = fRec1[0];
432 fRec2[1] = fRec2[0];
433 fRec42[1] = fRec42[0];
434 fVec10[1] = fVec10[0];
435 fRec3[1] = fRec3[0];
436 fRec4[1] = fRec4[0];
437 fRec39[1] = fRec39[0];
438 fRec40[1] = fRec40[0];
439 fRec41[1] = fRec41[0];
440 fVec9[1] = fVec9[0];
441 fRec5[1] = fRec5[0];
442 fRec6[1] = fRec6[0];
443 fRec38[1] = fRec38[0];
444 fVec8[1] = fVec8[0];
445 fRec7[1] = fRec7[0];
446 fVec7[1] = fVec7[0];
447 fRec9[1] = fRec9[0];
448 fRec35[1] = fRec35[0];
449 fRec36[1] = fRec36[0];
450 fRec37[1] = fRec37[0];
451 fVec6[1] = fVec6[0];
452 fRec10[1] = fRec10[0];
453 fRec11[1] = fRec11[0];
454 fRec34[1] = fRec34[0];
455 fVec5[1] = fVec5[0];
456 fRec12[1] = fRec12[0];
457 fVec4[1] = fVec4[0];
458 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
459 fRec33[1] = fRec33[0];
460 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
461 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
462 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
463 fRec31[1] = fRec31[0];
464 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
465 fRec25[1] = fRec25[0];
466 fVec3[1] = fVec3[0];
467 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
468 fRec27[1] = fRec27[0];
469 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
470 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
471 fRec15[1] = fRec15[0];
472 fVec2[1] = fVec2[0];
473 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
474 fRec17[1] = fRec17[0];
475 fRec18[1] = fRec18[0];
476 fVec1[1] = fVec1[0];
477 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
478 fRec23[1] = fRec23[0];
479 fRec20[1] = fRec20[0];
480 fRec21[1] = fRec21[0];
481 IOTA = IOTA+1;
482 fRec22[1] = fRec22[0];
483 fRec8[1] = fRec8[0];
484 fRec0[1] = fRec0[0];
485 }
486 #undef fslider0
487 #undef fslider1
488 #undef fslider2
489 #undef fslider3
490 }
491
492 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
493 {
494 static_cast<Dsp*>(p)->compute(count, input0, output0);
495 }
496
497
498 void Dsp::connect(uint32_t port,void* data)
499 {
500 switch ((PortIndex)port)
501 {
502 case DRIVE:
503 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
504 break;
505 case WET_DRY:
506 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
507 break;
508 case PREGAIN:
509 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
510 break;
511 case GAIN1:
512 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
513 break;
514 default:
515 break;
516 }
517 }
518
519 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
520 {
521 static_cast<Dsp*>(p)->connect(port, data);
522 }
523
524
525 PluginLV2 *plugin() {
526 return new Dsp();
527 }
528
529 void Dsp::del_instance(PluginLV2 *p)
530 {
531 delete static_cast<Dsp*>(p);
532 }
533
534 /*
535 typedef enum
536 {
537 DRIVE,
538 WET_DRY,
539 PREGAIN,
540 GAIN1,
541 } PortIndex;
542 */
543
544 } // end namespace gxamp13
0 // generated from file '../src/LV2/faust/gxamp13_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp13_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 double fRec63[2];
144 double fVec11[32768];
145 double fRec62[2];
146 double fRec61[2];
147 double fRec60[3];
148 double fVec12[2];
149 double fRec59[2];
150 double fRec58[2];
151 double fRec57[3];
152 double fVec13[2];
153 double fRec56[2];
154 double fRec55[3];
155 double fRec54[3];
156 double fRec67[2];
157 double fRec66[3];
158 double fVec14[2];
159 double fRec65[2];
160 double fRec64[3];
161 double fRec71[2];
162 double fRec70[3];
163 double fRec69[3];
164 double fRec68[3];
165 double fRec73[2];
166 double fRec72[3];
167 double fVec15[2];
168 double fRec53[2];
169 double fVec16[2];
170 double fRec74[2];
171 double fRec52[2];
172 double fRec51[2];
173 double fVec17[2];
174 double fRec77[2];
175 double fRec76[2];
176 double fRec75[2];
177 double fRec50[2];
178 double fVec18[2];
179 double fRec49[2];
180 double fVec19[2];
181 double fRec78[2];
182 double fRec48[2];
183 double fRec47[2];
184 double fVec20[2];
185 double fRec81[2];
186 double fRec80[2];
187 double fRec79[2];
188 double fRec46[2];
189 double fRec45[2];
190 double fVec21[2];
191 double fRec82[2];
192 double fRec44[2];
193 double fRec43[2];
194 void connect(uint32_t port,void* data);
195 void clear_state_f();
196 void init(uint32_t samplingFreq);
197 void compute(int count, float *input0, float *input1, float *output0, float *output1);
198
199 static void clear_state_f_static(PluginLV2*);
200 static void init_static(uint32_t samplingFreq, PluginLV2*);
201 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
202 static void del_instance(PluginLV2 *p);
203 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
204 public:
205 Dsp();
206 ~Dsp();
207 };
208
209
210
211 Dsp::Dsp()
212 : PluginLV2() {
213 version = PLUGINLV2_VERSION;
214 id = "6DJ8 feedback";
215 name = N_("6DJ8 feedback");
216 mono_audio = 0;
217 stereo_audio = compute_static;
218 set_samplerate = init_static;
219 activate_plugin = 0;
220 connect_ports = connect_static;
221 clear_state = clear_state_f_static;
222 delete_instance = del_instance;
223 }
224
225 Dsp::~Dsp() {
226 }
227
228 inline void Dsp::clear_state_f()
229 {
230 for (int i=0; i<2; i++) fRec0[i] = 0;
231 for (int i=0; i<2; i++) fRec8[i] = 0;
232 for (int i=0; i<2; i++) fRec22[i] = 0;
233 for (int i=0; i<32768; i++) fVec0[i] = 0;
234 for (int i=0; i<2; i++) fRec21[i] = 0;
235 for (int i=0; i<2; i++) fRec20[i] = 0;
236 for (int i=0; i<2; i++) fRec23[i] = 0;
237 for (int i=0; i<3; i++) fRec19[i] = 0;
238 for (int i=0; i<2; i++) fVec1[i] = 0;
239 for (int i=0; i<2; i++) fRec18[i] = 0;
240 for (int i=0; i<2; i++) fRec17[i] = 0;
241 for (int i=0; i<3; i++) fRec16[i] = 0;
242 for (int i=0; i<2; i++) fVec2[i] = 0;
243 for (int i=0; i<2; i++) fRec15[i] = 0;
244 for (int i=0; i<3; i++) fRec14[i] = 0;
245 for (int i=0; i<3; i++) fRec13[i] = 0;
246 for (int i=0; i<2; i++) fRec27[i] = 0;
247 for (int i=0; i<3; i++) fRec26[i] = 0;
248 for (int i=0; i<2; i++) fVec3[i] = 0;
249 for (int i=0; i<2; i++) fRec25[i] = 0;
250 for (int i=0; i<3; i++) fRec24[i] = 0;
251 for (int i=0; i<2; i++) fRec31[i] = 0;
252 for (int i=0; i<3; i++) fRec30[i] = 0;
253 for (int i=0; i<3; i++) fRec29[i] = 0;
254 for (int i=0; i<3; i++) fRec28[i] = 0;
255 for (int i=0; i<2; i++) fRec33[i] = 0;
256 for (int i=0; i<3; i++) fRec32[i] = 0;
257 for (int i=0; i<2; i++) fVec4[i] = 0;
258 for (int i=0; i<2; i++) fRec12[i] = 0;
259 for (int i=0; i<2; i++) fVec5[i] = 0;
260 for (int i=0; i<2; i++) fRec34[i] = 0;
261 for (int i=0; i<2; i++) fRec11[i] = 0;
262 for (int i=0; i<2; i++) fRec10[i] = 0;
263 for (int i=0; i<2; i++) fVec6[i] = 0;
264 for (int i=0; i<2; i++) fRec37[i] = 0;
265 for (int i=0; i<2; i++) fRec36[i] = 0;
266 for (int i=0; i<2; i++) fRec35[i] = 0;
267 for (int i=0; i<2; i++) fRec9[i] = 0;
268 for (int i=0; i<2; i++) fVec7[i] = 0;
269 for (int i=0; i<2; i++) fRec7[i] = 0;
270 for (int i=0; i<2; i++) fVec8[i] = 0;
271 for (int i=0; i<2; i++) fRec38[i] = 0;
272 for (int i=0; i<2; i++) fRec6[i] = 0;
273 for (int i=0; i<2; i++) fRec5[i] = 0;
274 for (int i=0; i<2; i++) fVec9[i] = 0;
275 for (int i=0; i<2; i++) fRec41[i] = 0;
276 for (int i=0; i<2; i++) fRec40[i] = 0;
277 for (int i=0; i<2; i++) fRec39[i] = 0;
278 for (int i=0; i<2; i++) fRec4[i] = 0;
279 for (int i=0; i<2; i++) fRec3[i] = 0;
280 for (int i=0; i<2; i++) fVec10[i] = 0;
281 for (int i=0; i<2; i++) fRec42[i] = 0;
282 for (int i=0; i<2; i++) fRec2[i] = 0;
283 for (int i=0; i<2; i++) fRec1[i] = 0;
284 for (int i=0; i<2; i++) fRec63[i] = 0;
285 for (int i=0; i<32768; i++) fVec11[i] = 0;
286 for (int i=0; i<2; i++) fRec62[i] = 0;
287 for (int i=0; i<2; i++) fRec61[i] = 0;
288 for (int i=0; i<3; i++) fRec60[i] = 0;
289 for (int i=0; i<2; i++) fVec12[i] = 0;
290 for (int i=0; i<2; i++) fRec59[i] = 0;
291 for (int i=0; i<2; i++) fRec58[i] = 0;
292 for (int i=0; i<3; i++) fRec57[i] = 0;
293 for (int i=0; i<2; i++) fVec13[i] = 0;
294 for (int i=0; i<2; i++) fRec56[i] = 0;
295 for (int i=0; i<3; i++) fRec55[i] = 0;
296 for (int i=0; i<3; i++) fRec54[i] = 0;
297 for (int i=0; i<2; i++) fRec67[i] = 0;
298 for (int i=0; i<3; i++) fRec66[i] = 0;
299 for (int i=0; i<2; i++) fVec14[i] = 0;
300 for (int i=0; i<2; i++) fRec65[i] = 0;
301 for (int i=0; i<3; i++) fRec64[i] = 0;
302 for (int i=0; i<2; i++) fRec71[i] = 0;
303 for (int i=0; i<3; i++) fRec70[i] = 0;
304 for (int i=0; i<3; i++) fRec69[i] = 0;
305 for (int i=0; i<3; i++) fRec68[i] = 0;
306 for (int i=0; i<2; i++) fRec73[i] = 0;
307 for (int i=0; i<3; i++) fRec72[i] = 0;
308 for (int i=0; i<2; i++) fVec15[i] = 0;
309 for (int i=0; i<2; i++) fRec53[i] = 0;
310 for (int i=0; i<2; i++) fVec16[i] = 0;
311 for (int i=0; i<2; i++) fRec74[i] = 0;
312 for (int i=0; i<2; i++) fRec52[i] = 0;
313 for (int i=0; i<2; i++) fRec51[i] = 0;
314 for (int i=0; i<2; i++) fVec17[i] = 0;
315 for (int i=0; i<2; i++) fRec77[i] = 0;
316 for (int i=0; i<2; i++) fRec76[i] = 0;
317 for (int i=0; i<2; i++) fRec75[i] = 0;
318 for (int i=0; i<2; i++) fRec50[i] = 0;
319 for (int i=0; i<2; i++) fVec18[i] = 0;
320 for (int i=0; i<2; i++) fRec49[i] = 0;
321 for (int i=0; i<2; i++) fVec19[i] = 0;
322 for (int i=0; i<2; i++) fRec78[i] = 0;
323 for (int i=0; i<2; i++) fRec48[i] = 0;
324 for (int i=0; i<2; i++) fRec47[i] = 0;
325 for (int i=0; i<2; i++) fVec20[i] = 0;
326 for (int i=0; i<2; i++) fRec81[i] = 0;
327 for (int i=0; i<2; i++) fRec80[i] = 0;
328 for (int i=0; i<2; i++) fRec79[i] = 0;
329 for (int i=0; i<2; i++) fRec46[i] = 0;
330 for (int i=0; i<2; i++) fRec45[i] = 0;
331 for (int i=0; i<2; i++) fVec21[i] = 0;
332 for (int i=0; i<2; i++) fRec82[i] = 0;
333 for (int i=0; i<2; i++) fRec44[i] = 0;
334 for (int i=0; i<2; i++) fRec43[i] = 0;
335 }
336
337 void Dsp::clear_state_f_static(PluginLV2 *p)
338 {
339 static_cast<Dsp*>(p)->clear_state_f();
340 }
341
342 inline void Dsp::init(uint32_t samplingFreq)
343 {
344 fSamplingFreq = samplingFreq;
345 iConst0 = min(192000, max(1, fSamplingFreq));
346 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
347 fConst2 = (1 + fConst1);
348 fConst3 = (0 - ((1 - fConst1) / fConst2));
349 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
350 fConst5 = (1 + fConst4);
351 fConst6 = (0 - ((1 - fConst4) / fConst5));
352 fConst7 = tan((942.4777960769379 / iConst0));
353 fConst8 = (1.0 / faustpower<2>(fConst7));
354 fConst9 = (2 * (1 - fConst8));
355 fConst10 = (1.0 / fConst7);
356 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
357 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
358 fConst13 = tan((3769.9111843077517 / iConst0));
359 fConst14 = (1.0 / faustpower<2>(fConst13));
360 fConst15 = (2 * (1 - fConst14));
361 fConst16 = (1.0 / fConst13);
362 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
363 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
364 fConst19 = (1.0 / fConst18);
365 fConst20 = (1 + fConst16);
366 fConst21 = (0 - ((1 - fConst16) / fConst20));
367 fConst22 = tan((10053.096491487338 / iConst0));
368 fConst23 = (1.0 / faustpower<2>(fConst22));
369 fConst24 = (2 * (1 - fConst23));
370 fConst25 = (1.0 / fConst22);
371 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
372 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
373 fConst28 = (1.0 / fConst27);
374 fConst29 = (1 + fConst25);
375 fConst30 = (0 - ((1 - fConst25) / fConst29));
376 fConst31 = tan((47123.8898038469 / iConst0));
377 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
378 fConst33 = (1.0 / fConst31);
379 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
380 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
381 fConst36 = (1.0 / fConst35);
382 IOTA = 0;
383 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
384 fConst38 = (0.009000000000000008 / iConst0);
385 fConst39 = (0 - fConst1);
386 fConst40 = (1.0 / (fConst2 * fConst35));
387 fConst41 = (1.0 / fConst29);
388 fConst42 = (0 - fConst16);
389 fConst43 = (1.0 / (fConst20 * fConst27));
390 fConst44 = (2 * (0 - fConst14));
391 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
392 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
393 fConst47 = (1 + fConst10);
394 fConst48 = (0 - ((1 - fConst10) / fConst47));
395 fConst49 = (0 - fConst10);
396 fConst50 = (1.0 / (fConst47 * fConst18));
397 fConst51 = (2 * (0 - fConst8));
398 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
399 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
400 fConst54 = (0 - fConst25);
401 fConst55 = (2 * (0 - fConst23));
402 fConst56 = (1.0 / fConst5);
403 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
404 fConst58 = (1 + fConst57);
405 fConst59 = (0 - ((1 - fConst57) / fConst58));
406 fConst60 = (1.0 / fConst58);
407 fConst61 = (0.05 / fConst2);
408 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
409 fConst63 = (1 + fConst62);
410 fConst64 = (0 - ((1 - fConst62) / fConst63));
411 fConst65 = (1.0 / fConst63);
412 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
413 fConst67 = (1 + fConst66);
414 fConst68 = (0 - ((1 - fConst66) / fConst67));
415 fConst69 = (1.0 / fConst67);
416 clear_state_f();
417 }
418
419 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
420 {
421 static_cast<Dsp*>(p)->init(samplingFreq);
422 }
423
424 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
425 {
426 #define fslider0 (*fslider0_)
427 #define fslider1 (*fslider1_)
428 #define fslider2 (*fslider2_)
429 #define fslider3 (*fslider3_)
430 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
431 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
432 double fSlow2 = (1.000000000000001e-05 * fslider2);
433 double fSlow3 = fslider3;
434 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
435 double fSlow5 = pow(1e+01,(2 * fSlow3));
436 double fSlow6 = (fConst46 * fSlow5);
437 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
438 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
439 double fSlow9 = (2 * (fSlow3 - 0.5));
440 double fSlow10 = (1 - max(0, (0 - fSlow9)));
441 double fSlow11 = (1.25 * fSlow3);
442 double fSlow12 = (0.024937655860349125 * (1 - max(0, fSlow9)));
443 for (int i=0; i<count; i++) {
444 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
445 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
446 double fTemp0 = (fConst9 * fRec13[1]);
447 double fTemp1 = (double)input0[i];
448 double fTemp2 = fabs(fTemp1);
449 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
450 double fTemp3 = max(fRec22[0], fTemp2);
451 fVec0[IOTA&32767] = fTemp3;
452 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
453 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
454 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
455 double fTemp5 = (0 - fTemp4);
456 double fTemp6 = (40.1 * fTemp5);
457 double fTemp7 = max(-600, fTemp6);
458 double fTemp8 = (0 - fTemp7);
459 double fTemp9 = (fTemp1 - fTemp4);
460 double fTemp10 = (40.1 * fTemp9);
461 double fTemp11 = max(-600, fTemp10);
462 double fTemp12 = (0 - fTemp11);
463 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
464 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
465 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
466 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
467 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
468 fVec1[0] = fTemp15;
469 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
470 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
471 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
472 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
473 fVec2[0] = fTemp16;
474 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
475 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
476 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
477 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
478 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
479 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
480 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
481 fVec3[0] = fTemp18;
482 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
483 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
484 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
485 double fTemp20 = (fConst9 * fRec28[1]);
486 double fTemp21 = (fConst15 * fRec29[1]);
487 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
488 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
489 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
490 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
491 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
492 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
493 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
494 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
495 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
496 fVec4[0] = fTemp24;
497 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
498 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
499 fVec5[0] = fTemp25;
500 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
501 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
502 double fTemp27 = (1 - fRec23[0]);
503 double fTemp28 = (fSlow12 * fRec23[0]);
504 fRec11[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fTemp13 * (fTemp28 + (fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 1.863945999999999)) - 60.96496296296296);
505 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
506 double fTemp29 = (1e-15 + (0.015 * fRec36[1]));
507 fVec6[0] = fTemp29;
508 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
509 fRec36[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec37[0] + fRec9[1]) - 1.2716089999999989)) - 45.22606666666667);
510 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
511 fRec9[0] = ((0.6 * fRec35[0]) - fRec10[0]);
512 double fTemp30 = (fRec9[0] * fRec8[0]);
513 fVec7[0] = fTemp30;
514 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
515 double fTemp31 = (1e-15 + (0.015 * fRec6[1]));
516 fVec8[0] = fTemp31;
517 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
518 fRec6[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec38[0] + fRec7[0]) - 1.2716089999999989)) - 45.22606666666667);
519 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
520 double fTemp32 = (1e-15 + (0.0082 * fRec40[1]));
521 fVec9[0] = fTemp32;
522 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
523 fRec40[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec41[0] + fRec4[1]) - 0.797042999999999)) - 32.799634146341475);
524 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
525 fRec4[0] = ((0.6 * fRec39[0]) + fRec5[0]);
526 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
527 double fTemp33 = (1e-15 + (0.0082 * fRec2[1]));
528 fVec10[0] = fTemp33;
529 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
530 fRec2[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec42[0] + fRec3[0]) - 0.797042999999999)) - 32.799634146341475);
531 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
532 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
533 double fTemp34 = (fConst9 * fRec54[1]);
534 double fTemp35 = (double)input1[i];
535 double fTemp36 = fabs(fTemp35);
536 fRec63[0] = ((9.999999999998899e-05 * fTemp36) + (0.9999 * fRec63[1]));
537 double fTemp37 = max(fRec63[0], fTemp36);
538 fVec11[IOTA&32767] = fTemp37;
539 fRec62[0] = ((fVec11[IOTA&32767] + fRec62[1]) - fVec11[(IOTA-iConst37)&32767]);
540 fRec61[0] = ((fConst38 * fRec62[0]) + (0.999 * fRec61[1]));
541 double fTemp38 = max(-1, min(-0.01, (fVec11[IOTA&32767] - (1.0 + (1.02 * fRec61[0])))));
542 double fTemp39 = (0 - fTemp38);
543 double fTemp40 = (40.1 * fTemp39);
544 double fTemp41 = max(-600, fTemp40);
545 double fTemp42 = (0 - fTemp41);
546 double fTemp43 = (fTemp35 - fTemp38);
547 double fTemp44 = (40.1 * fTemp43);
548 double fTemp45 = max(-600, fTemp44);
549 double fTemp46 = (0 - fTemp45);
550 double fTemp47 = (((int((fabs(fTemp44) > 0.0001)))?((int((fTemp45 < -50)))?(exp(fTemp45) * fTemp46):(fTemp45 / (1 - exp(fTemp46)))):(1 + (fTemp43 * (20.05 + (134.00083333333336 * fTemp43))))) - ((int((fabs(fTemp40) > 0.0001)))?((int((fTemp41 < -50)))?(exp(fTemp41) * fTemp42):(fTemp41 / (1 - exp(fTemp42)))):(1 + (fTemp39 * (20.05 + (134.00083333333336 * fTemp39))))));
551 double fTemp48 = (0.024937655860349125 * (fRec23[0] * fTemp47));
552 fRec60[0] = (fTemp48 - (fConst36 * ((fConst34 * fRec60[2]) + (fConst32 * fRec60[1]))));
553 double fTemp49 = (fRec60[2] + (fRec60[0] + (2 * fRec60[1])));
554 fVec12[0] = fTemp49;
555 fRec59[0] = ((fConst40 * ((fConst39 * fVec12[1]) + (fConst1 * fVec12[0]))) + (fConst3 * fRec59[1]));
556 fRec58[0] = ((fConst41 * (fRec59[0] + fRec59[1])) + (fConst30 * fRec58[1]));
557 fRec57[0] = (fRec58[0] - (fConst28 * ((fConst26 * fRec57[2]) + (fConst24 * fRec57[1]))));
558 double fTemp50 = (fRec57[2] + (fRec57[0] + (2 * fRec57[1])));
559 fVec13[0] = fTemp50;
560 fRec56[0] = ((fConst43 * ((fConst42 * fVec13[1]) + (fConst16 * fVec13[0]))) + (fConst21 * fRec56[1]));
561 fRec55[0] = (fRec56[0] - (fConst19 * ((fConst17 * fRec55[2]) + (fConst15 * fRec55[1]))));
562 fRec54[0] = ((fConst19 * (((fConst14 * fRec55[0]) + (fConst44 * fRec55[1])) + (fConst14 * fRec55[2]))) - (fConst12 * ((fConst11 * fRec54[2]) + fTemp34)));
563 double fTemp51 = max(-1, min(1, (fSlow4 * (fRec54[2] + (fConst12 * (fTemp34 + (fConst11 * fRec54[0])))))));
564 fRec67[0] = ((fConst43 * (fVec13[0] + fVec13[1])) + (fConst21 * fRec67[1]));
565 fRec66[0] = (fRec67[0] - (fConst19 * ((fConst17 * fRec66[2]) + (fConst15 * fRec66[1]))));
566 double fTemp52 = (fRec66[2] + (fRec66[0] + (2 * fRec66[1])));
567 fVec14[0] = fTemp52;
568 fRec65[0] = ((fConst50 * ((fConst49 * fVec14[1]) + (fConst10 * fVec14[0]))) + (fConst48 * fRec65[1]));
569 fRec64[0] = (fRec65[0] - (fConst46 * ((fConst45 * fRec64[2]) + (fConst9 * fRec64[1]))));
570 double fTemp53 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec64[0]) + (fConst51 * fRec64[1])) + (fConst8 * fRec64[2])))));
571 double fTemp54 = (fConst9 * fRec68[1]);
572 double fTemp55 = (fConst15 * fRec69[1]);
573 fRec71[0] = ((fConst41 * ((fConst54 * fRec59[1]) + (fConst25 * fRec59[0]))) + (fConst30 * fRec71[1]));
574 fRec70[0] = (fRec71[0] - (fConst28 * ((fConst26 * fRec70[2]) + (fConst24 * fRec70[1]))));
575 fRec69[0] = ((fConst28 * (((fConst23 * fRec70[0]) + (fConst55 * fRec70[1])) + (fConst23 * fRec70[2]))) - (fConst53 * ((fConst52 * fRec69[2]) + fTemp55)));
576 fRec68[0] = ((fRec69[2] + (fConst53 * (fTemp55 + (fConst52 * fRec69[0])))) - (fConst12 * ((fConst11 * fRec68[2]) + fTemp54)));
577 double fTemp56 = max(-1, min(1, (fSlow7 * (fRec68[2] + (fConst12 * (fTemp54 + (fConst11 * fRec68[0])))))));
578 fRec73[0] = ((fConst50 * (fVec14[0] + fVec14[1])) + (fConst48 * fRec73[1]));
579 fRec72[0] = (fRec73[0] - (fConst46 * ((fConst45 * fRec72[2]) + (fConst9 * fRec72[1]))));
580 double fTemp57 = max(-1, min(1, (fSlow8 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1]))))));
581 double fTemp58 = ((1.2589412 * (fTemp57 * (1 - (0.3333333333333333 * faustpower<2>(fTemp57))))) + (1.584893192 * ((fTemp56 * (1 - (0.3333333333333333 * faustpower<2>(fTemp56)))) + ((fTemp53 * (1 - (0.3333333333333333 * faustpower<2>(fTemp53)))) + (0.8413951417869425 * (fTemp51 * (1 - (0.3333333333333333 * faustpower<2>(fTemp51)))))))));
582 fVec15[0] = fTemp58;
583 fRec53[0] = ((fConst56 * (fVec15[0] + fVec15[1])) + (fConst6 * fRec53[1]));
584 double fTemp59 = (1e-15 + (0.027 * fRec52[1]));
585 fVec16[0] = fTemp59;
586 fRec74[0] = ((fConst60 * (fVec16[0] + fVec16[1])) + (fConst59 * fRec74[1]));
587 double fTemp60 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp48)))));
588 fRec52[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fTemp47 * ((fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp47))))) - 0.024937655860349125)))) + fTemp28)) + ((0.5 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60))))) + (fRec74[0] + (fSlow10 * fRec53[0])))) - 1.863945999999999)) - 60.96496296296296);
589 fRec51[0] = ((fConst61 * ((fConst39 * fRec52[1]) + (fConst1 * fRec52[0]))) + (fConst3 * fRec51[1]));
590 double fTemp61 = (1e-15 + (0.015 * fRec76[1]));
591 fVec17[0] = fTemp61;
592 fRec77[0] = ((fConst65 * (fVec17[0] + fVec17[1])) + (fConst64 * fRec77[1]));
593 fRec76[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec77[0] + fRec50[1]) - 1.2716089999999989)) - 45.22606666666667);
594 fRec75[0] = ((fConst61 * ((fConst39 * fRec76[1]) + (fConst1 * fRec76[0]))) + (fConst3 * fRec75[1]));
595 fRec50[0] = ((0.6 * fRec75[0]) - fRec51[0]);
596 double fTemp62 = (fRec8[0] * fRec50[0]);
597 fVec18[0] = fTemp62;
598 fRec49[0] = ((fConst56 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec49[1]));
599 double fTemp63 = (1e-15 + (0.015 * fRec48[1]));
600 fVec19[0] = fTemp63;
601 fRec78[0] = ((fConst65 * (fVec19[0] + fVec19[1])) + (fConst64 * fRec78[1]));
602 fRec48[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec78[0] + fRec49[0]) - 1.2716089999999989)) - 45.22606666666667);
603 fRec47[0] = ((fConst61 * ((fConst39 * fRec48[1]) + (fConst1 * fRec48[0]))) + (fConst3 * fRec47[1]));
604 double fTemp64 = (1e-15 + (0.0082 * fRec80[1]));
605 fVec20[0] = fTemp64;
606 fRec81[0] = ((fConst69 * (fVec20[0] + fVec20[1])) + (fConst68 * fRec81[1]));
607 fRec80[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec81[0] + fRec46[1]) - 0.797042999999999)) - 32.799634146341475);
608 fRec79[0] = ((fConst61 * ((fConst39 * fRec80[1]) + (fConst1 * fRec80[0]))) + (fConst3 * fRec79[1]));
609 fRec46[0] = ((0.6 * fRec79[0]) + fRec47[0]);
610 fRec45[0] = ((fConst56 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
611 double fTemp65 = (1e-15 + (0.0082 * fRec44[1]));
612 fVec21[0] = fTemp65;
613 fRec82[0] = ((fConst69 * (fVec21[0] + fVec21[1])) + (fConst68 * fRec82[1]));
614 fRec44[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec82[0] + fRec45[0]) - 0.797042999999999)) - 32.799634146341475);
615 fRec43[0] = ((fConst61 * ((fConst39 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
616 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec43[0]);
617 // post processing
618 fRec43[1] = fRec43[0];
619 fRec44[1] = fRec44[0];
620 fRec82[1] = fRec82[0];
621 fVec21[1] = fVec21[0];
622 fRec45[1] = fRec45[0];
623 fRec46[1] = fRec46[0];
624 fRec79[1] = fRec79[0];
625 fRec80[1] = fRec80[0];
626 fRec81[1] = fRec81[0];
627 fVec20[1] = fVec20[0];
628 fRec47[1] = fRec47[0];
629 fRec48[1] = fRec48[0];
630 fRec78[1] = fRec78[0];
631 fVec19[1] = fVec19[0];
632 fRec49[1] = fRec49[0];
633 fVec18[1] = fVec18[0];
634 fRec50[1] = fRec50[0];
635 fRec75[1] = fRec75[0];
636 fRec76[1] = fRec76[0];
637 fRec77[1] = fRec77[0];
638 fVec17[1] = fVec17[0];
639 fRec51[1] = fRec51[0];
640 fRec52[1] = fRec52[0];
641 fRec74[1] = fRec74[0];
642 fVec16[1] = fVec16[0];
643 fRec53[1] = fRec53[0];
644 fVec15[1] = fVec15[0];
645 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
646 fRec73[1] = fRec73[0];
647 fRec68[2] = fRec68[1]; fRec68[1] = fRec68[0];
648 fRec69[2] = fRec69[1]; fRec69[1] = fRec69[0];
649 fRec70[2] = fRec70[1]; fRec70[1] = fRec70[0];
650 fRec71[1] = fRec71[0];
651 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
652 fRec65[1] = fRec65[0];
653 fVec14[1] = fVec14[0];
654 fRec66[2] = fRec66[1]; fRec66[1] = fRec66[0];
655 fRec67[1] = fRec67[0];
656 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
657 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
658 fRec56[1] = fRec56[0];
659 fVec13[1] = fVec13[0];
660 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
661 fRec58[1] = fRec58[0];
662 fRec59[1] = fRec59[0];
663 fVec12[1] = fVec12[0];
664 fRec60[2] = fRec60[1]; fRec60[1] = fRec60[0];
665 fRec61[1] = fRec61[0];
666 fRec62[1] = fRec62[0];
667 fRec63[1] = fRec63[0];
668 fRec1[1] = fRec1[0];
669 fRec2[1] = fRec2[0];
670 fRec42[1] = fRec42[0];
671 fVec10[1] = fVec10[0];
672 fRec3[1] = fRec3[0];
673 fRec4[1] = fRec4[0];
674 fRec39[1] = fRec39[0];
675 fRec40[1] = fRec40[0];
676 fRec41[1] = fRec41[0];
677 fVec9[1] = fVec9[0];
678 fRec5[1] = fRec5[0];
679 fRec6[1] = fRec6[0];
680 fRec38[1] = fRec38[0];
681 fVec8[1] = fVec8[0];
682 fRec7[1] = fRec7[0];
683 fVec7[1] = fVec7[0];
684 fRec9[1] = fRec9[0];
685 fRec35[1] = fRec35[0];
686 fRec36[1] = fRec36[0];
687 fRec37[1] = fRec37[0];
688 fVec6[1] = fVec6[0];
689 fRec10[1] = fRec10[0];
690 fRec11[1] = fRec11[0];
691 fRec34[1] = fRec34[0];
692 fVec5[1] = fVec5[0];
693 fRec12[1] = fRec12[0];
694 fVec4[1] = fVec4[0];
695 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
696 fRec33[1] = fRec33[0];
697 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
698 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
699 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
700 fRec31[1] = fRec31[0];
701 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
702 fRec25[1] = fRec25[0];
703 fVec3[1] = fVec3[0];
704 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
705 fRec27[1] = fRec27[0];
706 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
707 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
708 fRec15[1] = fRec15[0];
709 fVec2[1] = fVec2[0];
710 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
711 fRec17[1] = fRec17[0];
712 fRec18[1] = fRec18[0];
713 fVec1[1] = fVec1[0];
714 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
715 fRec23[1] = fRec23[0];
716 fRec20[1] = fRec20[0];
717 fRec21[1] = fRec21[0];
718 IOTA = IOTA+1;
719 fRec22[1] = fRec22[0];
720 fRec8[1] = fRec8[0];
721 fRec0[1] = fRec0[0];
722 }
723 #undef fslider0
724 #undef fslider1
725 #undef fslider2
726 #undef fslider3
727 }
728
729 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
730 {
731 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
732 }
733
734
735 void Dsp::connect(uint32_t port,void* data)
736 {
737 switch ((PortIndex)port)
738 {
739 case DRIVE:
740 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
741 break;
742 case WET_DRY:
743 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
744 break;
745 case PREGAIN:
746 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
747 break;
748 case GAIN1:
749 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
750 break;
751 default:
752 break;
753 }
754 }
755
756 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
757 {
758 static_cast<Dsp*>(p)->connect(port, data);
759 }
760
761
762 PluginLV2 *plugin() {
763 return new Dsp();
764 }
765
766 void Dsp::del_instance(PluginLV2 *p)
767 {
768 delete static_cast<Dsp*>(p);
769 }
770
771 /*
772 typedef enum
773 {
774 DRIVE,
775 WET_DRY,
776 PREGAIN,
777 GAIN1,
778 } PortIndex;
779 */
780
781 } // end namespace gxamp13_stereo
0 // generated from file '../src/LV2/faust/gxamp14.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp14 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fRec6[2];
109 double fConst60;
110 double fConst61;
111 double fConst62;
112 double fVec6[2];
113 double fConst63;
114 double fRec30[2];
115 double fRec5[2];
116 double fRec4[2];
117 double fVec7[2];
118 double fRec3[2];
119 double fConst64;
120 double fConst65;
121 double fConst66;
122 double fVec8[2];
123 double fConst67;
124 double fRec31[2];
125 double fRec2[2];
126 double fRec1[2];
127 void connect(uint32_t port,void* data);
128 void clear_state_f();
129 void init(uint32_t samplingFreq);
130 void compute(int count, float *input0, float *output0);
131
132 static void clear_state_f_static(PluginLV2*);
133 static void init_static(uint32_t samplingFreq, PluginLV2*);
134 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
135 static void del_instance(PluginLV2 *p);
136 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
137 public:
138 Dsp();
139 ~Dsp();
140 };
141
142
143
144 Dsp::Dsp()
145 : PluginLV2() {
146 version = PLUGINLV2_VERSION;
147 id = "12AT7";
148 name = N_("12AT7");
149 mono_audio = compute_static;
150 stereo_audio = 0;
151 set_samplerate = init_static;
152 activate_plugin = 0;
153 connect_ports = connect_static;
154 clear_state = clear_state_f_static;
155 delete_instance = del_instance;
156 }
157
158 Dsp::~Dsp() {
159 }
160
161 inline void Dsp::clear_state_f()
162 {
163 for (int i=0; i<2; i++) fRec0[i] = 0;
164 for (int i=0; i<2; i++) fRec7[i] = 0;
165 for (int i=0; i<2; i++) fRec10[i] = 0;
166 for (int i=0; i<2; i++) fVec0[i] = 0;
167 for (int i=0; i<2; i++) fRec11[i] = 0;
168 for (int i=0; i<3; i++) fRec19[i] = 0;
169 for (int i=0; i<2; i++) fVec1[i] = 0;
170 for (int i=0; i<2; i++) fRec18[i] = 0;
171 for (int i=0; i<2; i++) fRec17[i] = 0;
172 for (int i=0; i<3; i++) fRec16[i] = 0;
173 for (int i=0; i<2; i++) fVec2[i] = 0;
174 for (int i=0; i<2; i++) fRec15[i] = 0;
175 for (int i=0; i<3; i++) fRec14[i] = 0;
176 for (int i=0; i<3; i++) fRec13[i] = 0;
177 for (int i=0; i<2; i++) fRec23[i] = 0;
178 for (int i=0; i<3; i++) fRec22[i] = 0;
179 for (int i=0; i<2; i++) fVec3[i] = 0;
180 for (int i=0; i<2; i++) fRec21[i] = 0;
181 for (int i=0; i<3; i++) fRec20[i] = 0;
182 for (int i=0; i<2; i++) fRec27[i] = 0;
183 for (int i=0; i<3; i++) fRec26[i] = 0;
184 for (int i=0; i<3; i++) fRec25[i] = 0;
185 for (int i=0; i<3; i++) fRec24[i] = 0;
186 for (int i=0; i<2; i++) fRec29[i] = 0;
187 for (int i=0; i<3; i++) fRec28[i] = 0;
188 for (int i=0; i<2; i++) fVec4[i] = 0;
189 for (int i=0; i<2; i++) fRec12[i] = 0;
190 for (int i=0; i<2; i++) fRec9[i] = 0;
191 for (int i=0; i<2; i++) fRec8[i] = 0;
192 for (int i=0; i<2; i++) fVec5[i] = 0;
193 for (int i=0; i<2; i++) fRec6[i] = 0;
194 for (int i=0; i<2; i++) fVec6[i] = 0;
195 for (int i=0; i<2; i++) fRec30[i] = 0;
196 for (int i=0; i<2; i++) fRec5[i] = 0;
197 for (int i=0; i<2; i++) fRec4[i] = 0;
198 for (int i=0; i<2; i++) fVec7[i] = 0;
199 for (int i=0; i<2; i++) fRec3[i] = 0;
200 for (int i=0; i<2; i++) fVec8[i] = 0;
201 for (int i=0; i<2; i++) fRec31[i] = 0;
202 for (int i=0; i<2; i++) fRec2[i] = 0;
203 for (int i=0; i<2; i++) fRec1[i] = 0;
204 }
205
206 void Dsp::clear_state_f_static(PluginLV2 *p)
207 {
208 static_cast<Dsp*>(p)->clear_state_f();
209 }
210
211 inline void Dsp::init(uint32_t samplingFreq)
212 {
213 fSamplingFreq = samplingFreq;
214 iConst0 = min(192000, max(1, fSamplingFreq));
215 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
216 fConst2 = (1 + fConst1);
217 fConst3 = (0 - ((1 - fConst1) / fConst2));
218 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
219 fConst5 = (1 + fConst4);
220 fConst6 = (0 - ((1 - fConst4) / fConst5));
221 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
222 fConst8 = (1 + fConst7);
223 fConst9 = (0 - ((1 - fConst7) / fConst8));
224 fConst10 = (1.0 / fConst8);
225 fConst11 = tan((942.4777960769379 / iConst0));
226 fConst12 = (1.0 / faustpower<2>(fConst11));
227 fConst13 = (2 * (1 - fConst12));
228 fConst14 = (1.0 / fConst11);
229 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
230 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
231 fConst17 = tan((3769.9111843077517 / iConst0));
232 fConst18 = (1.0 / faustpower<2>(fConst17));
233 fConst19 = (2 * (1 - fConst18));
234 fConst20 = (1.0 / fConst17);
235 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
236 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
237 fConst23 = (1.0 / fConst22);
238 fConst24 = (1 + fConst20);
239 fConst25 = (0 - ((1 - fConst20) / fConst24));
240 fConst26 = tan((10053.096491487338 / iConst0));
241 fConst27 = (1.0 / faustpower<2>(fConst26));
242 fConst28 = (2 * (1 - fConst27));
243 fConst29 = (1.0 / fConst26);
244 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
245 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
246 fConst32 = (1.0 / fConst31);
247 fConst33 = (1 + fConst29);
248 fConst34 = (0 - ((1 - fConst29) / fConst33));
249 fConst35 = tan((47123.8898038469 / iConst0));
250 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
251 fConst37 = (1.0 / fConst35);
252 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
253 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
254 fConst40 = (1.0 / fConst39);
255 fConst41 = (0 - fConst1);
256 fConst42 = (1.0 / (fConst2 * fConst39));
257 fConst43 = (1.0 / fConst33);
258 fConst44 = (0 - fConst20);
259 fConst45 = (1.0 / (fConst24 * fConst31));
260 fConst46 = (2 * (0 - fConst18));
261 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
262 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
263 fConst49 = (1 + fConst14);
264 fConst50 = (0 - ((1 - fConst14) / fConst49));
265 fConst51 = (0 - fConst14);
266 fConst52 = (1.0 / (fConst49 * fConst22));
267 fConst53 = (2 * (0 - fConst12));
268 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
269 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
270 fConst56 = (0 - fConst29);
271 fConst57 = (2 * (0 - fConst27));
272 fConst58 = (1.0 / fConst5);
273 fConst59 = (0.025 / fConst2);
274 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
275 fConst61 = (1 + fConst60);
276 fConst62 = (0 - ((1 - fConst60) / fConst61));
277 fConst63 = (1.0 / fConst61);
278 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
279 fConst65 = (1 + fConst64);
280 fConst66 = (0 - ((1 - fConst64) / fConst65));
281 fConst67 = (1.0 / fConst65);
282 clear_state_f();
283 }
284
285 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
286 {
287 static_cast<Dsp*>(p)->init(samplingFreq);
288 }
289
290 inline void Dsp::compute(int count, float *input0, float *output0)
291 {
292 #define fslider0 (*fslider0_)
293 #define fslider1 (*fslider1_)
294 #define fslider2 (*fslider2_)
295 #define fslider3 (*fslider3_)
296 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
297 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
298 double fSlow2 = (1.000000000000001e-05 * fslider2);
299 double fSlow3 = fslider3;
300 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
301 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
302 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
303 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
304 double fSlow8 = (2 * (fSlow3 - 0.5));
305 double fSlow9 = (1 - max(0, (0 - fSlow8)));
306 double fSlow10 = (1 - max(0, fSlow8));
307 double fSlow11 = (1.25 * fSlow3);
308 for (int i=0; i<count; i++) {
309 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
310 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
311 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
312 double fTemp0 = (double)input0[i];
313 double fTemp1 = (fTemp0 * (1 - fRec10[0]));
314 double fTemp2 = (1e-15 + (0.027 * fRec9[1]));
315 fVec0[0] = fTemp2;
316 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
317 double fTemp3 = (fConst13 * fRec13[1]);
318 double fTemp4 = (1e-15 + (fTemp0 * fRec10[0]));
319 fRec19[0] = (fTemp4 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
320 double fTemp5 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
321 fVec1[0] = fTemp5;
322 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
323 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
324 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
325 double fTemp6 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
326 fVec2[0] = fTemp6;
327 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
328 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
329 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp3)));
330 double fTemp7 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp3 + (fConst15 * fRec13[0])))))));
331 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
332 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
333 double fTemp8 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
334 fVec3[0] = fTemp8;
335 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
336 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
337 double fTemp9 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
338 double fTemp10 = (fConst13 * fRec24[1]);
339 double fTemp11 = (fConst19 * fRec25[1]);
340 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
341 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
342 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp11)));
343 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp11 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp10)));
344 double fTemp12 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp10 + (fConst15 * fRec24[0])))))));
345 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
346 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
347 double fTemp13 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
348 double fTemp14 = ((1.2589412 * (fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13))))) + (1.584893192 * ((fTemp12 * (1 - (0.3333333333333333 * faustpower<2>(fTemp12)))) + ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + (0.8413951417869425 * (fTemp7 * (1 - (0.3333333333333333 * faustpower<2>(fTemp7)))))))));
349 fVec4[0] = fTemp14;
350 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
351 double fTemp15 = (1e-15 + fTemp1);
352 fRec9[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fSlow11 * ((fTemp15 * (4 - (4 * fabs(fTemp15)))) - fTemp15)) + ((fSlow10 * fTemp4) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp1)))) - 2.6177529999999978)) - 153.04618518518518);
353 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
354 double fTemp16 = (fRec8[0] * fRec7[0]);
355 fVec5[0] = fTemp16;
356 fRec6[0] = ((fConst58 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
357 double fTemp17 = (1e-15 + (0.015 * fRec5[1]));
358 fVec6[0] = fTemp17;
359 fRec30[0] = ((fConst63 * (fVec6[0] + fVec6[1])) + (fConst62 * fRec30[1]));
360 fRec5[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec30[0] + fRec6[0]) - 1.887331999999999)) - 124.17786666666666);
361 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
362 double fTemp18 = (fRec7[0] * fRec4[0]);
363 fVec7[0] = fTemp18;
364 fRec3[0] = ((fConst58 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
365 double fTemp19 = (1e-15 + (0.0082 * fRec2[1]));
366 fVec8[0] = fTemp19;
367 fRec31[0] = ((fConst67 * (fVec8[0] + fVec8[1])) + (fConst66 * fRec31[1]));
368 fRec2[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec31[0] + fRec3[0]) - 1.2569619999999988)) - 96.7119512195122);
369 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
370 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
371 // post processing
372 fRec1[1] = fRec1[0];
373 fRec2[1] = fRec2[0];
374 fRec31[1] = fRec31[0];
375 fVec8[1] = fVec8[0];
376 fRec3[1] = fRec3[0];
377 fVec7[1] = fVec7[0];
378 fRec4[1] = fRec4[0];
379 fRec5[1] = fRec5[0];
380 fRec30[1] = fRec30[0];
381 fVec6[1] = fVec6[0];
382 fRec6[1] = fRec6[0];
383 fVec5[1] = fVec5[0];
384 fRec8[1] = fRec8[0];
385 fRec9[1] = fRec9[0];
386 fRec12[1] = fRec12[0];
387 fVec4[1] = fVec4[0];
388 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
389 fRec29[1] = fRec29[0];
390 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
391 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
392 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
393 fRec27[1] = fRec27[0];
394 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
395 fRec21[1] = fRec21[0];
396 fVec3[1] = fVec3[0];
397 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
398 fRec23[1] = fRec23[0];
399 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
400 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
401 fRec15[1] = fRec15[0];
402 fVec2[1] = fVec2[0];
403 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
404 fRec17[1] = fRec17[0];
405 fRec18[1] = fRec18[0];
406 fVec1[1] = fVec1[0];
407 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
408 fRec11[1] = fRec11[0];
409 fVec0[1] = fVec0[0];
410 fRec10[1] = fRec10[0];
411 fRec7[1] = fRec7[0];
412 fRec0[1] = fRec0[0];
413 }
414 #undef fslider0
415 #undef fslider1
416 #undef fslider2
417 #undef fslider3
418 }
419
420 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
421 {
422 static_cast<Dsp*>(p)->compute(count, input0, output0);
423 }
424
425
426 void Dsp::connect(uint32_t port,void* data)
427 {
428 switch ((PortIndex)port)
429 {
430 case DRIVE:
431 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
432 break;
433 case WET_DRY:
434 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
435 break;
436 case PREGAIN:
437 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
438 break;
439 case GAIN1:
440 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
441 break;
442 default:
443 break;
444 }
445 }
446
447 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
448 {
449 static_cast<Dsp*>(p)->connect(port, data);
450 }
451
452
453 PluginLV2 *plugin() {
454 return new Dsp();
455 }
456
457 void Dsp::del_instance(PluginLV2 *p)
458 {
459 delete static_cast<Dsp*>(p);
460 }
461
462 /*
463 typedef enum
464 {
465 DRIVE,
466 WET_DRY,
467 PREGAIN,
468 GAIN1,
469 } PortIndex;
470 */
471
472 } // end namespace gxamp14
0 // generated from file '../src/LV2/faust/gxamp14_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp14_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fRec6[2];
109 double fConst60;
110 double fConst61;
111 double fConst62;
112 double fVec6[2];
113 double fConst63;
114 double fRec30[2];
115 double fRec5[2];
116 double fRec4[2];
117 double fVec7[2];
118 double fRec3[2];
119 double fConst64;
120 double fConst65;
121 double fConst66;
122 double fVec8[2];
123 double fConst67;
124 double fRec31[2];
125 double fRec2[2];
126 double fRec1[2];
127 double fVec9[2];
128 double fRec40[2];
129 double fRec48[3];
130 double fVec10[2];
131 double fRec47[2];
132 double fRec46[2];
133 double fRec45[3];
134 double fVec11[2];
135 double fRec44[2];
136 double fRec43[3];
137 double fRec42[3];
138 double fRec52[2];
139 double fRec51[3];
140 double fVec12[2];
141 double fRec50[2];
142 double fRec49[3];
143 double fRec56[2];
144 double fRec55[3];
145 double fRec54[3];
146 double fRec53[3];
147 double fRec58[2];
148 double fRec57[3];
149 double fVec13[2];
150 double fRec41[2];
151 double fRec39[2];
152 double fRec38[2];
153 double fVec14[2];
154 double fRec37[2];
155 double fVec15[2];
156 double fRec59[2];
157 double fRec36[2];
158 double fRec35[2];
159 double fVec16[2];
160 double fRec34[2];
161 double fVec17[2];
162 double fRec60[2];
163 double fRec33[2];
164 double fRec32[2];
165 void connect(uint32_t port,void* data);
166 void clear_state_f();
167 void init(uint32_t samplingFreq);
168 void compute(int count, float *input0, float *input1, float *output0, float *output1);
169
170 static void clear_state_f_static(PluginLV2*);
171 static void init_static(uint32_t samplingFreq, PluginLV2*);
172 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
173 static void del_instance(PluginLV2 *p);
174 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
175 public:
176 Dsp();
177 ~Dsp();
178 };
179
180
181
182 Dsp::Dsp()
183 : PluginLV2() {
184 version = PLUGINLV2_VERSION;
185 id = "12AT7";
186 name = N_("12AT7");
187 mono_audio = 0;
188 stereo_audio = compute_static;
189 set_samplerate = init_static;
190 activate_plugin = 0;
191 connect_ports = connect_static;
192 clear_state = clear_state_f_static;
193 delete_instance = del_instance;
194 }
195
196 Dsp::~Dsp() {
197 }
198
199 inline void Dsp::clear_state_f()
200 {
201 for (int i=0; i<2; i++) fRec0[i] = 0;
202 for (int i=0; i<2; i++) fRec7[i] = 0;
203 for (int i=0; i<2; i++) fRec10[i] = 0;
204 for (int i=0; i<2; i++) fVec0[i] = 0;
205 for (int i=0; i<2; i++) fRec11[i] = 0;
206 for (int i=0; i<3; i++) fRec19[i] = 0;
207 for (int i=0; i<2; i++) fVec1[i] = 0;
208 for (int i=0; i<2; i++) fRec18[i] = 0;
209 for (int i=0; i<2; i++) fRec17[i] = 0;
210 for (int i=0; i<3; i++) fRec16[i] = 0;
211 for (int i=0; i<2; i++) fVec2[i] = 0;
212 for (int i=0; i<2; i++) fRec15[i] = 0;
213 for (int i=0; i<3; i++) fRec14[i] = 0;
214 for (int i=0; i<3; i++) fRec13[i] = 0;
215 for (int i=0; i<2; i++) fRec23[i] = 0;
216 for (int i=0; i<3; i++) fRec22[i] = 0;
217 for (int i=0; i<2; i++) fVec3[i] = 0;
218 for (int i=0; i<2; i++) fRec21[i] = 0;
219 for (int i=0; i<3; i++) fRec20[i] = 0;
220 for (int i=0; i<2; i++) fRec27[i] = 0;
221 for (int i=0; i<3; i++) fRec26[i] = 0;
222 for (int i=0; i<3; i++) fRec25[i] = 0;
223 for (int i=0; i<3; i++) fRec24[i] = 0;
224 for (int i=0; i<2; i++) fRec29[i] = 0;
225 for (int i=0; i<3; i++) fRec28[i] = 0;
226 for (int i=0; i<2; i++) fVec4[i] = 0;
227 for (int i=0; i<2; i++) fRec12[i] = 0;
228 for (int i=0; i<2; i++) fRec9[i] = 0;
229 for (int i=0; i<2; i++) fRec8[i] = 0;
230 for (int i=0; i<2; i++) fVec5[i] = 0;
231 for (int i=0; i<2; i++) fRec6[i] = 0;
232 for (int i=0; i<2; i++) fVec6[i] = 0;
233 for (int i=0; i<2; i++) fRec30[i] = 0;
234 for (int i=0; i<2; i++) fRec5[i] = 0;
235 for (int i=0; i<2; i++) fRec4[i] = 0;
236 for (int i=0; i<2; i++) fVec7[i] = 0;
237 for (int i=0; i<2; i++) fRec3[i] = 0;
238 for (int i=0; i<2; i++) fVec8[i] = 0;
239 for (int i=0; i<2; i++) fRec31[i] = 0;
240 for (int i=0; i<2; i++) fRec2[i] = 0;
241 for (int i=0; i<2; i++) fRec1[i] = 0;
242 for (int i=0; i<2; i++) fVec9[i] = 0;
243 for (int i=0; i<2; i++) fRec40[i] = 0;
244 for (int i=0; i<3; i++) fRec48[i] = 0;
245 for (int i=0; i<2; i++) fVec10[i] = 0;
246 for (int i=0; i<2; i++) fRec47[i] = 0;
247 for (int i=0; i<2; i++) fRec46[i] = 0;
248 for (int i=0; i<3; i++) fRec45[i] = 0;
249 for (int i=0; i<2; i++) fVec11[i] = 0;
250 for (int i=0; i<2; i++) fRec44[i] = 0;
251 for (int i=0; i<3; i++) fRec43[i] = 0;
252 for (int i=0; i<3; i++) fRec42[i] = 0;
253 for (int i=0; i<2; i++) fRec52[i] = 0;
254 for (int i=0; i<3; i++) fRec51[i] = 0;
255 for (int i=0; i<2; i++) fVec12[i] = 0;
256 for (int i=0; i<2; i++) fRec50[i] = 0;
257 for (int i=0; i<3; i++) fRec49[i] = 0;
258 for (int i=0; i<2; i++) fRec56[i] = 0;
259 for (int i=0; i<3; i++) fRec55[i] = 0;
260 for (int i=0; i<3; i++) fRec54[i] = 0;
261 for (int i=0; i<3; i++) fRec53[i] = 0;
262 for (int i=0; i<2; i++) fRec58[i] = 0;
263 for (int i=0; i<3; i++) fRec57[i] = 0;
264 for (int i=0; i<2; i++) fVec13[i] = 0;
265 for (int i=0; i<2; i++) fRec41[i] = 0;
266 for (int i=0; i<2; i++) fRec39[i] = 0;
267 for (int i=0; i<2; i++) fRec38[i] = 0;
268 for (int i=0; i<2; i++) fVec14[i] = 0;
269 for (int i=0; i<2; i++) fRec37[i] = 0;
270 for (int i=0; i<2; i++) fVec15[i] = 0;
271 for (int i=0; i<2; i++) fRec59[i] = 0;
272 for (int i=0; i<2; i++) fRec36[i] = 0;
273 for (int i=0; i<2; i++) fRec35[i] = 0;
274 for (int i=0; i<2; i++) fVec16[i] = 0;
275 for (int i=0; i<2; i++) fRec34[i] = 0;
276 for (int i=0; i<2; i++) fVec17[i] = 0;
277 for (int i=0; i<2; i++) fRec60[i] = 0;
278 for (int i=0; i<2; i++) fRec33[i] = 0;
279 for (int i=0; i<2; i++) fRec32[i] = 0;
280 }
281
282 void Dsp::clear_state_f_static(PluginLV2 *p)
283 {
284 static_cast<Dsp*>(p)->clear_state_f();
285 }
286
287 inline void Dsp::init(uint32_t samplingFreq)
288 {
289 fSamplingFreq = samplingFreq;
290 iConst0 = min(192000, max(1, fSamplingFreq));
291 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
292 fConst2 = (1 + fConst1);
293 fConst3 = (0 - ((1 - fConst1) / fConst2));
294 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
295 fConst5 = (1 + fConst4);
296 fConst6 = (0 - ((1 - fConst4) / fConst5));
297 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
298 fConst8 = (1 + fConst7);
299 fConst9 = (0 - ((1 - fConst7) / fConst8));
300 fConst10 = (1.0 / fConst8);
301 fConst11 = tan((942.4777960769379 / iConst0));
302 fConst12 = (1.0 / faustpower<2>(fConst11));
303 fConst13 = (2 * (1 - fConst12));
304 fConst14 = (1.0 / fConst11);
305 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
306 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
307 fConst17 = tan((3769.9111843077517 / iConst0));
308 fConst18 = (1.0 / faustpower<2>(fConst17));
309 fConst19 = (2 * (1 - fConst18));
310 fConst20 = (1.0 / fConst17);
311 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
312 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
313 fConst23 = (1.0 / fConst22);
314 fConst24 = (1 + fConst20);
315 fConst25 = (0 - ((1 - fConst20) / fConst24));
316 fConst26 = tan((10053.096491487338 / iConst0));
317 fConst27 = (1.0 / faustpower<2>(fConst26));
318 fConst28 = (2 * (1 - fConst27));
319 fConst29 = (1.0 / fConst26);
320 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
321 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
322 fConst32 = (1.0 / fConst31);
323 fConst33 = (1 + fConst29);
324 fConst34 = (0 - ((1 - fConst29) / fConst33));
325 fConst35 = tan((47123.8898038469 / iConst0));
326 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
327 fConst37 = (1.0 / fConst35);
328 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
329 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
330 fConst40 = (1.0 / fConst39);
331 fConst41 = (0 - fConst1);
332 fConst42 = (1.0 / (fConst2 * fConst39));
333 fConst43 = (1.0 / fConst33);
334 fConst44 = (0 - fConst20);
335 fConst45 = (1.0 / (fConst24 * fConst31));
336 fConst46 = (2 * (0 - fConst18));
337 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
338 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
339 fConst49 = (1 + fConst14);
340 fConst50 = (0 - ((1 - fConst14) / fConst49));
341 fConst51 = (0 - fConst14);
342 fConst52 = (1.0 / (fConst49 * fConst22));
343 fConst53 = (2 * (0 - fConst12));
344 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
345 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
346 fConst56 = (0 - fConst29);
347 fConst57 = (2 * (0 - fConst27));
348 fConst58 = (1.0 / fConst5);
349 fConst59 = (0.025 / fConst2);
350 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
351 fConst61 = (1 + fConst60);
352 fConst62 = (0 - ((1 - fConst60) / fConst61));
353 fConst63 = (1.0 / fConst61);
354 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
355 fConst65 = (1 + fConst64);
356 fConst66 = (0 - ((1 - fConst64) / fConst65));
357 fConst67 = (1.0 / fConst65);
358 clear_state_f();
359 }
360
361 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
362 {
363 static_cast<Dsp*>(p)->init(samplingFreq);
364 }
365
366 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
367 {
368 #define fslider0 (*fslider0_)
369 #define fslider1 (*fslider1_)
370 #define fslider2 (*fslider2_)
371 #define fslider3 (*fslider3_)
372 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
373 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
374 double fSlow2 = (1.000000000000001e-05 * fslider2);
375 double fSlow3 = fslider3;
376 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
377 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
378 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
379 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
380 double fSlow8 = (2 * (fSlow3 - 0.5));
381 double fSlow9 = (1 - max(0, (0 - fSlow8)));
382 double fSlow10 = (1 - max(0, fSlow8));
383 double fSlow11 = (1.25 * fSlow3);
384 for (int i=0; i<count; i++) {
385 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
386 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
387 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
388 double fTemp0 = (1 - fRec10[0]);
389 double fTemp1 = (double)input0[i];
390 double fTemp2 = (fTemp1 * fTemp0);
391 double fTemp3 = (1e-15 + (0.027 * fRec9[1]));
392 fVec0[0] = fTemp3;
393 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
394 double fTemp4 = (fConst13 * fRec13[1]);
395 double fTemp5 = (1e-15 + (fTemp1 * fRec10[0]));
396 fRec19[0] = (fTemp5 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
397 double fTemp6 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
398 fVec1[0] = fTemp6;
399 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
400 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
401 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
402 double fTemp7 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
403 fVec2[0] = fTemp7;
404 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
405 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
406 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp4)));
407 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp4 + (fConst15 * fRec13[0])))))));
408 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
409 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
410 double fTemp9 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
411 fVec3[0] = fTemp9;
412 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
413 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
414 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
415 double fTemp11 = (fConst13 * fRec24[1]);
416 double fTemp12 = (fConst19 * fRec25[1]);
417 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
418 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
419 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp12)));
420 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp12 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp11)));
421 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp11 + (fConst15 * fRec24[0])))))));
422 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
423 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
424 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
425 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
426 fVec4[0] = fTemp15;
427 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
428 double fTemp16 = (1e-15 + fTemp2);
429 fRec9[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fSlow11 * ((fTemp16 * (4 - (4 * fabs(fTemp16)))) - fTemp16)) + ((fSlow10 * fTemp5) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp2)))) - 2.6177529999999978)) - 153.04618518518518);
430 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
431 double fTemp17 = (fRec8[0] * fRec7[0]);
432 fVec5[0] = fTemp17;
433 fRec6[0] = ((fConst58 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
434 double fTemp18 = (1e-15 + (0.015 * fRec5[1]));
435 fVec6[0] = fTemp18;
436 fRec30[0] = ((fConst63 * (fVec6[0] + fVec6[1])) + (fConst62 * fRec30[1]));
437 fRec5[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec30[0] + fRec6[0]) - 1.887331999999999)) - 124.17786666666666);
438 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
439 double fTemp19 = (fRec7[0] * fRec4[0]);
440 fVec7[0] = fTemp19;
441 fRec3[0] = ((fConst58 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
442 double fTemp20 = (1e-15 + (0.0082 * fRec2[1]));
443 fVec8[0] = fTemp20;
444 fRec31[0] = ((fConst67 * (fVec8[0] + fVec8[1])) + (fConst66 * fRec31[1]));
445 fRec2[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec31[0] + fRec3[0]) - 1.2569619999999988)) - 96.7119512195122);
446 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
447 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
448 double fTemp21 = (double)input1[i];
449 double fTemp22 = (fTemp21 * fTemp0);
450 double fTemp23 = (1e-15 + (0.027 * fRec39[1]));
451 fVec9[0] = fTemp23;
452 fRec40[0] = ((fConst10 * (fVec9[0] + fVec9[1])) + (fConst9 * fRec40[1]));
453 double fTemp24 = (fConst13 * fRec42[1]);
454 double fTemp25 = (1e-15 + (fTemp21 * fRec10[0]));
455 fRec48[0] = (fTemp25 - (fConst40 * ((fConst38 * fRec48[2]) + (fConst36 * fRec48[1]))));
456 double fTemp26 = (fRec48[2] + (fRec48[0] + (2 * fRec48[1])));
457 fVec10[0] = fTemp26;
458 fRec47[0] = ((fConst42 * ((fConst41 * fVec10[1]) + (fConst1 * fVec10[0]))) + (fConst3 * fRec47[1]));
459 fRec46[0] = ((fConst43 * (fRec47[0] + fRec47[1])) + (fConst34 * fRec46[1]));
460 fRec45[0] = (fRec46[0] - (fConst32 * ((fConst30 * fRec45[2]) + (fConst28 * fRec45[1]))));
461 double fTemp27 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
462 fVec11[0] = fTemp27;
463 fRec44[0] = ((fConst45 * ((fConst44 * fVec11[1]) + (fConst20 * fVec11[0]))) + (fConst25 * fRec44[1]));
464 fRec43[0] = (fRec44[0] - (fConst23 * ((fConst21 * fRec43[2]) + (fConst19 * fRec43[1]))));
465 fRec42[0] = ((fConst23 * (((fConst18 * fRec43[0]) + (fConst46 * fRec43[1])) + (fConst18 * fRec43[2]))) - (fConst16 * ((fConst15 * fRec42[2]) + fTemp24)));
466 double fTemp28 = max(-1, min(1, (fSlow4 * (fRec42[2] + (fConst16 * (fTemp24 + (fConst15 * fRec42[0])))))));
467 fRec52[0] = ((fConst45 * (fVec11[0] + fVec11[1])) + (fConst25 * fRec52[1]));
468 fRec51[0] = (fRec52[0] - (fConst23 * ((fConst21 * fRec51[2]) + (fConst19 * fRec51[1]))));
469 double fTemp29 = (fRec51[2] + (fRec51[0] + (2 * fRec51[1])));
470 fVec12[0] = fTemp29;
471 fRec50[0] = ((fConst52 * ((fConst51 * fVec12[1]) + (fConst14 * fVec12[0]))) + (fConst50 * fRec50[1]));
472 fRec49[0] = (fRec50[0] - (fConst48 * ((fConst47 * fRec49[2]) + (fConst13 * fRec49[1]))));
473 double fTemp30 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec49[0]) + (fConst53 * fRec49[1])) + (fConst12 * fRec49[2])))));
474 double fTemp31 = (fConst13 * fRec53[1]);
475 double fTemp32 = (fConst19 * fRec54[1]);
476 fRec56[0] = ((fConst43 * ((fConst56 * fRec47[1]) + (fConst29 * fRec47[0]))) + (fConst34 * fRec56[1]));
477 fRec55[0] = (fRec56[0] - (fConst32 * ((fConst30 * fRec55[2]) + (fConst28 * fRec55[1]))));
478 fRec54[0] = ((fConst32 * (((fConst27 * fRec55[0]) + (fConst57 * fRec55[1])) + (fConst27 * fRec55[2]))) - (fConst55 * ((fConst54 * fRec54[2]) + fTemp32)));
479 fRec53[0] = ((fRec54[2] + (fConst55 * (fTemp32 + (fConst54 * fRec54[0])))) - (fConst16 * ((fConst15 * fRec53[2]) + fTemp31)));
480 double fTemp33 = max(-1, min(1, (fSlow6 * (fRec53[2] + (fConst16 * (fTemp31 + (fConst15 * fRec53[0])))))));
481 fRec58[0] = ((fConst52 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec58[1]));
482 fRec57[0] = (fRec58[0] - (fConst48 * ((fConst47 * fRec57[2]) + (fConst13 * fRec57[1]))));
483 double fTemp34 = max(-1, min(1, (fSlow7 * (fRec57[2] + (fRec57[0] + (2 * fRec57[1]))))));
484 double fTemp35 = ((1.2589412 * (fTemp34 * (1 - (0.3333333333333333 * faustpower<2>(fTemp34))))) + (1.584893192 * ((fTemp33 * (1 - (0.3333333333333333 * faustpower<2>(fTemp33)))) + ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + (0.8413951417869425 * (fTemp28 * (1 - (0.3333333333333333 * faustpower<2>(fTemp28)))))))));
485 fVec13[0] = fTemp35;
486 fRec41[0] = ((fConst58 * (fVec13[0] + fVec13[1])) + (fConst6 * fRec41[1]));
487 double fTemp36 = (1e-15 + fTemp22);
488 fRec39[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fSlow11 * ((fTemp36 * (4 - (4 * fabs(fTemp36)))) - fTemp36)) + ((fSlow10 * fTemp25) + ((fSlow9 * fRec41[0]) + (fRec40[0] + fTemp22)))) - 2.6177529999999978)) - 153.04618518518518);
489 fRec38[0] = ((fConst59 * ((fConst41 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
490 double fTemp37 = (fRec7[0] * fRec38[0]);
491 fVec14[0] = fTemp37;
492 fRec37[0] = ((fConst58 * (fVec14[0] + fVec14[1])) + (fConst6 * fRec37[1]));
493 double fTemp38 = (1e-15 + (0.015 * fRec36[1]));
494 fVec15[0] = fTemp38;
495 fRec59[0] = ((fConst63 * (fVec15[0] + fVec15[1])) + (fConst62 * fRec59[1]));
496 fRec36[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec59[0] + fRec37[0]) - 1.887331999999999)) - 124.17786666666666);
497 fRec35[0] = ((fConst59 * ((fConst1 * fRec36[0]) + (fConst41 * fRec36[1]))) + (fConst3 * fRec35[1]));
498 double fTemp39 = (fRec7[0] * fRec35[0]);
499 fVec16[0] = fTemp39;
500 fRec34[0] = ((fConst58 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec34[1]));
501 double fTemp40 = (1e-15 + (0.0082 * fRec33[1]));
502 fVec17[0] = fTemp40;
503 fRec60[0] = ((fConst67 * (fVec17[0] + fVec17[1])) + (fConst66 * fRec60[1]));
504 fRec33[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec60[0] + fRec34[0]) - 1.2569619999999988)) - 96.7119512195122);
505 fRec32[0] = ((fConst59 * ((fConst41 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
506 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec32[0]);
507 // post processing
508 fRec32[1] = fRec32[0];
509 fRec33[1] = fRec33[0];
510 fRec60[1] = fRec60[0];
511 fVec17[1] = fVec17[0];
512 fRec34[1] = fRec34[0];
513 fVec16[1] = fVec16[0];
514 fRec35[1] = fRec35[0];
515 fRec36[1] = fRec36[0];
516 fRec59[1] = fRec59[0];
517 fVec15[1] = fVec15[0];
518 fRec37[1] = fRec37[0];
519 fVec14[1] = fVec14[0];
520 fRec38[1] = fRec38[0];
521 fRec39[1] = fRec39[0];
522 fRec41[1] = fRec41[0];
523 fVec13[1] = fVec13[0];
524 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
525 fRec58[1] = fRec58[0];
526 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
527 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
528 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
529 fRec56[1] = fRec56[0];
530 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
531 fRec50[1] = fRec50[0];
532 fVec12[1] = fVec12[0];
533 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
534 fRec52[1] = fRec52[0];
535 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
536 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
537 fRec44[1] = fRec44[0];
538 fVec11[1] = fVec11[0];
539 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
540 fRec46[1] = fRec46[0];
541 fRec47[1] = fRec47[0];
542 fVec10[1] = fVec10[0];
543 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
544 fRec40[1] = fRec40[0];
545 fVec9[1] = fVec9[0];
546 fRec1[1] = fRec1[0];
547 fRec2[1] = fRec2[0];
548 fRec31[1] = fRec31[0];
549 fVec8[1] = fVec8[0];
550 fRec3[1] = fRec3[0];
551 fVec7[1] = fVec7[0];
552 fRec4[1] = fRec4[0];
553 fRec5[1] = fRec5[0];
554 fRec30[1] = fRec30[0];
555 fVec6[1] = fVec6[0];
556 fRec6[1] = fRec6[0];
557 fVec5[1] = fVec5[0];
558 fRec8[1] = fRec8[0];
559 fRec9[1] = fRec9[0];
560 fRec12[1] = fRec12[0];
561 fVec4[1] = fVec4[0];
562 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
563 fRec29[1] = fRec29[0];
564 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
565 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
566 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
567 fRec27[1] = fRec27[0];
568 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
569 fRec21[1] = fRec21[0];
570 fVec3[1] = fVec3[0];
571 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
572 fRec23[1] = fRec23[0];
573 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
574 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
575 fRec15[1] = fRec15[0];
576 fVec2[1] = fVec2[0];
577 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
578 fRec17[1] = fRec17[0];
579 fRec18[1] = fRec18[0];
580 fVec1[1] = fVec1[0];
581 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
582 fRec11[1] = fRec11[0];
583 fVec0[1] = fVec0[0];
584 fRec10[1] = fRec10[0];
585 fRec7[1] = fRec7[0];
586 fRec0[1] = fRec0[0];
587 }
588 #undef fslider0
589 #undef fslider1
590 #undef fslider2
591 #undef fslider3
592 }
593
594 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
595 {
596 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
597 }
598
599
600 void Dsp::connect(uint32_t port,void* data)
601 {
602 switch ((PortIndex)port)
603 {
604 case DRIVE:
605 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
606 break;
607 case WET_DRY:
608 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
609 break;
610 case PREGAIN:
611 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
612 break;
613 case GAIN1:
614 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
615 break;
616 default:
617 break;
618 }
619 }
620
621 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
622 {
623 static_cast<Dsp*>(p)->connect(port, data);
624 }
625
626
627 PluginLV2 *plugin() {
628 return new Dsp();
629 }
630
631 void Dsp::del_instance(PluginLV2 *p)
632 {
633 delete static_cast<Dsp*>(p);
634 }
635
636 /*
637 typedef enum
638 {
639 DRIVE,
640 WET_DRY,
641 PREGAIN,
642 GAIN1,
643 } PortIndex;
644 */
645
646 } // end namespace gxamp14_stereo
0 // generated from file '../src/LV2/faust/gxamp15.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp15 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fRec0[2];
130 double fVec9[2];
131 double fRec37[2];
132 double fRec36[2];
133 double fRec35[2];
134 void connect(uint32_t port,void* data);
135 void clear_state_f();
136 void init(uint32_t samplingFreq);
137 void compute(int count, float *input0, float *output0);
138
139 static void clear_state_f_static(PluginLV2*);
140 static void init_static(uint32_t samplingFreq, PluginLV2*);
141 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
142 static void del_instance(PluginLV2 *p);
143 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
144 public:
145 Dsp();
146 ~Dsp();
147 };
148
149
150
151 Dsp::Dsp()
152 : PluginLV2() {
153 version = PLUGINLV2_VERSION;
154 id = "pre 12AT7/ master 6V6";
155 name = N_("pre 12AT7/ master 6V6");
156 mono_audio = compute_static;
157 stereo_audio = 0;
158 set_samplerate = init_static;
159 activate_plugin = 0;
160 connect_ports = connect_static;
161 clear_state = clear_state_f_static;
162 delete_instance = del_instance;
163 }
164
165 Dsp::~Dsp() {
166 }
167
168 inline void Dsp::clear_state_f()
169 {
170 for (int i=0; i<2; i++) fVec0[i] = 0;
171 for (int i=0; i<2; i++) fRec2[i] = 0;
172 for (int i=0; i<2; i++) fRec3[i] = 0;
173 for (int i=0; i<2; i++) fRec13[i] = 0;
174 for (int i=0; i<2; i++) fRec21[i] = 0;
175 for (int i=0; i<2; i++) fVec1[i] = 0;
176 for (int i=0; i<2; i++) fRec22[i] = 0;
177 for (int i=0; i<2; i++) fRec20[i] = 0;
178 for (int i=0; i<2; i++) fRec19[i] = 0;
179 for (int i=0; i<2; i++) fRec18[i] = 0;
180 for (int i=0; i<2; i++) fVec2[i] = 0;
181 for (int i=0; i<2; i++) fRec23[i] = 0;
182 for (int i=0; i<2; i++) fRec17[i] = 0;
183 for (int i=0; i<2; i++) fRec16[i] = 0;
184 for (int i=0; i<2; i++) fVec3[i] = 0;
185 for (int i=0; i<2; i++) fRec24[i] = 0;
186 for (int i=0; i<2; i++) fRec15[i] = 0;
187 for (int i=0; i<2; i++) fRec14[i] = 0;
188 for (int i=0; i<3; i++) fRec12[i] = 0;
189 for (int i=0; i<2; i++) fVec4[i] = 0;
190 for (int i=0; i<2; i++) fRec11[i] = 0;
191 for (int i=0; i<2; i++) fRec10[i] = 0;
192 for (int i=0; i<3; i++) fRec9[i] = 0;
193 for (int i=0; i<2; i++) fVec5[i] = 0;
194 for (int i=0; i<2; i++) fRec8[i] = 0;
195 for (int i=0; i<3; i++) fRec7[i] = 0;
196 for (int i=0; i<3; i++) fRec6[i] = 0;
197 for (int i=0; i<2; i++) fRec28[i] = 0;
198 for (int i=0; i<3; i++) fRec27[i] = 0;
199 for (int i=0; i<2; i++) fVec6[i] = 0;
200 for (int i=0; i<2; i++) fRec26[i] = 0;
201 for (int i=0; i<3; i++) fRec25[i] = 0;
202 for (int i=0; i<2; i++) fRec32[i] = 0;
203 for (int i=0; i<3; i++) fRec31[i] = 0;
204 for (int i=0; i<3; i++) fRec30[i] = 0;
205 for (int i=0; i<3; i++) fRec29[i] = 0;
206 for (int i=0; i<2; i++) fRec34[i] = 0;
207 for (int i=0; i<3; i++) fRec33[i] = 0;
208 for (int i=0; i<2; i++) fVec7[i] = 0;
209 for (int i=0; i<2; i++) fRec5[i] = 0;
210 for (int i=0; i<2; i++) fVec8[i] = 0;
211 for (int i=0; i<2; i++) fRec4[i] = 0;
212 for (int i=0; i<2; i++) fRec1[i] = 0;
213 for (int i=0; i<2; i++) fRec0[i] = 0;
214 for (int i=0; i<2; i++) fVec9[i] = 0;
215 for (int i=0; i<2; i++) fRec37[i] = 0;
216 for (int i=0; i<2; i++) fRec36[i] = 0;
217 for (int i=0; i<2; i++) fRec35[i] = 0;
218 }
219
220 void Dsp::clear_state_f_static(PluginLV2 *p)
221 {
222 static_cast<Dsp*>(p)->clear_state_f();
223 }
224
225 inline void Dsp::init(uint32_t samplingFreq)
226 {
227 fSamplingFreq = samplingFreq;
228 iConst0 = min(192000, max(1, fSamplingFreq));
229 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
230 fConst2 = (1 + fConst1);
231 fConst3 = (0 - ((1 - fConst1) / fConst2));
232 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
233 fConst5 = (1 + fConst4);
234 fConst6 = (0 - ((1 - fConst4) / fConst5));
235 fConst7 = (1.0 / fConst5);
236 fConst8 = tan((942.4777960769379 / iConst0));
237 fConst9 = (1.0 / faustpower<2>(fConst8));
238 fConst10 = (2 * (1 - fConst9));
239 fConst11 = (1.0 / fConst8);
240 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
241 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
242 fConst14 = tan((3769.9111843077517 / iConst0));
243 fConst15 = (1.0 / faustpower<2>(fConst14));
244 fConst16 = (2 * (1 - fConst15));
245 fConst17 = (1.0 / fConst14);
246 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
247 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
248 fConst20 = (1.0 / fConst19);
249 fConst21 = (1 + fConst17);
250 fConst22 = (0 - ((1 - fConst17) / fConst21));
251 fConst23 = tan((10053.096491487338 / iConst0));
252 fConst24 = (1.0 / faustpower<2>(fConst23));
253 fConst25 = (2 * (1 - fConst24));
254 fConst26 = (1.0 / fConst23);
255 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
256 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
257 fConst29 = (1.0 / fConst28);
258 fConst30 = (1 + fConst26);
259 fConst31 = (0 - ((1 - fConst26) / fConst30));
260 fConst32 = tan((47123.8898038469 / iConst0));
261 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
262 fConst34 = (1.0 / fConst32);
263 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
264 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
265 fConst37 = (1.0 / fConst36);
266 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
267 fConst39 = (1 + fConst38);
268 fConst40 = (0 - ((1 - fConst38) / fConst39));
269 fConst41 = (1.0 / fConst39);
270 fConst42 = (0 - fConst1);
271 fConst43 = (0.025 / fConst2);
272 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
273 fConst45 = (1 + fConst44);
274 fConst46 = (0 - ((1 - fConst44) / fConst45));
275 fConst47 = (1.0 / fConst45);
276 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
277 fConst49 = (1 + fConst48);
278 fConst50 = (0 - ((1 - fConst48) / fConst49));
279 fConst51 = (1.0 / fConst49);
280 fConst52 = (1.0 / (fConst2 * fConst36));
281 fConst53 = (1.0 / fConst30);
282 fConst54 = (0 - fConst17);
283 fConst55 = (1.0 / (fConst21 * fConst28));
284 fConst56 = (2 * (0 - fConst15));
285 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
286 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
287 fConst59 = (1 + fConst11);
288 fConst60 = (0 - ((1 - fConst11) / fConst59));
289 fConst61 = (0 - fConst11);
290 fConst62 = (1.0 / (fConst59 * fConst19));
291 fConst63 = (2 * (0 - fConst9));
292 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
293 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
294 fConst66 = (0 - fConst26);
295 fConst67 = (2 * (0 - fConst24));
296 clear_state_f();
297 }
298
299 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
300 {
301 static_cast<Dsp*>(p)->init(samplingFreq);
302 }
303
304 inline void Dsp::compute(int count, float *input0, float *output0)
305 {
306 #define fslider0 (*fslider0_)
307 #define fslider1 (*fslider1_)
308 #define fslider2 (*fslider2_)
309 #define fslider3 (*fslider3_)
310 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
311 double fSlow1 = (1.000000000000001e-05 * fslider1);
312 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
313 double fSlow3 = fslider3;
314 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
315 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
316 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
317 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
318 double fSlow8 = (2 * (fSlow3 - 0.5));
319 double fSlow9 = (1 - max(0, (0 - fSlow8)));
320 double fSlow10 = (1 - max(0, fSlow8));
321 double fSlow11 = (1.25 * fSlow3);
322 for (int i=0; i<count; i++) {
323 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
324 fVec0[0] = fTemp0;
325 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
326 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
327 double fTemp1 = (fConst10 * fRec6[1]);
328 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
329 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
330 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
331 fVec1[0] = fTemp2;
332 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
333 fRec20[0] = (Ftube(TUBE_TABLE_12AT7_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 2.617752999999999)) - 153.04618518518518);
334 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
335 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
336 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
337 fVec2[0] = fTemp3;
338 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
339 fRec17[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec23[0] + fRec18[0]) - 1.887331999999999)) - 124.17786666666666);
340 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
341 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
342 fVec3[0] = fTemp4;
343 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
344 fRec15[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec24[0] + fRec16[0]) - 1.2569619999999988)) - 96.7119512195122);
345 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
346 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
347 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
348 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
349 fVec4[0] = fTemp6;
350 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
351 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
352 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
353 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
354 fVec5[0] = fTemp7;
355 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
356 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
357 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
358 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
359 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
360 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
361 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
362 fVec6[0] = fTemp9;
363 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
364 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
365 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
366 double fTemp11 = (fConst10 * fRec29[1]);
367 double fTemp12 = (fConst16 * fRec30[1]);
368 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
369 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
370 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
371 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
372 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
373 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
374 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
375 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
376 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
377 fVec7[0] = fTemp15;
378 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
379 double fTemp16 = (fRec14[0] * (1 - fRec13[0]));
380 double fTemp17 = (1e-15 + fTemp16);
381 double fTemp18 = (1e-15 + ((fSlow11 * ((fTemp17 * (4 - (4 * fabs(fTemp17)))) - fTemp17)) + ((fSlow10 * fTemp5) + (fTemp16 + (fSlow9 * fRec5[0])))));
382 fVec8[0] = fTemp18;
383 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
384 double fTemp19 = (fRec4[0] * fRec3[0]);
385 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp19 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
386 fRec0[0] = ((fConst43 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
387 double fTemp20 = (1e-15 + (0.0082 * fRec36[1]));
388 fVec9[0] = fTemp20;
389 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
390 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp19) - 1.130461999999999)) - 112.13878048780487);
391 fRec35[0] = ((fConst43 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
392 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
393 // post processing
394 fRec35[1] = fRec35[0];
395 fRec36[1] = fRec36[0];
396 fRec37[1] = fRec37[0];
397 fVec9[1] = fVec9[0];
398 fRec0[1] = fRec0[0];
399 fRec1[1] = fRec1[0];
400 fRec4[1] = fRec4[0];
401 fVec8[1] = fVec8[0];
402 fRec5[1] = fRec5[0];
403 fVec7[1] = fVec7[0];
404 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
405 fRec34[1] = fRec34[0];
406 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
407 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
408 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
409 fRec32[1] = fRec32[0];
410 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
411 fRec26[1] = fRec26[0];
412 fVec6[1] = fVec6[0];
413 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
414 fRec28[1] = fRec28[0];
415 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
416 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
417 fRec8[1] = fRec8[0];
418 fVec5[1] = fVec5[0];
419 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
420 fRec10[1] = fRec10[0];
421 fRec11[1] = fRec11[0];
422 fVec4[1] = fVec4[0];
423 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
424 fRec14[1] = fRec14[0];
425 fRec15[1] = fRec15[0];
426 fRec24[1] = fRec24[0];
427 fVec3[1] = fVec3[0];
428 fRec16[1] = fRec16[0];
429 fRec17[1] = fRec17[0];
430 fRec23[1] = fRec23[0];
431 fVec2[1] = fVec2[0];
432 fRec18[1] = fRec18[0];
433 fRec19[1] = fRec19[0];
434 fRec20[1] = fRec20[0];
435 fRec22[1] = fRec22[0];
436 fVec1[1] = fVec1[0];
437 fRec21[1] = fRec21[0];
438 fRec13[1] = fRec13[0];
439 fRec3[1] = fRec3[0];
440 fRec2[1] = fRec2[0];
441 fVec0[1] = fVec0[0];
442 }
443 #undef fslider0
444 #undef fslider1
445 #undef fslider2
446 #undef fslider3
447 }
448
449 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
450 {
451 static_cast<Dsp*>(p)->compute(count, input0, output0);
452 }
453
454
455 void Dsp::connect(uint32_t port,void* data)
456 {
457 switch ((PortIndex)port)
458 {
459 case DRIVE:
460 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
461 break;
462 case PREGAIN:
463 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
464 break;
465 case WET_DRY:
466 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
467 break;
468 case GAIN1:
469 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
470 break;
471 default:
472 break;
473 }
474 }
475
476 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
477 {
478 static_cast<Dsp*>(p)->connect(port, data);
479 }
480
481
482 PluginLV2 *plugin() {
483 return new Dsp();
484 }
485
486 void Dsp::del_instance(PluginLV2 *p)
487 {
488 delete static_cast<Dsp*>(p);
489 }
490
491 /*
492 typedef enum
493 {
494 DRIVE,
495 PREGAIN,
496 WET_DRY,
497 GAIN1,
498 } PortIndex;
499 */
500
501 } // end namespace gxamp15
0 // generated from file '../src/LV2/faust/gxamp15_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp15_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fRec0[2];
130 double fVec9[2];
131 double fRec37[2];
132 double fRec36[2];
133 double fRec35[2];
134 double fVec10[2];
135 double fRec48[2];
136 double fRec47[2];
137 double fRec46[2];
138 double fRec45[2];
139 double fVec11[2];
140 double fRec49[2];
141 double fRec44[2];
142 double fRec43[2];
143 double fVec12[2];
144 double fRec50[2];
145 double fRec42[2];
146 double fRec41[2];
147 double fRec58[3];
148 double fVec13[2];
149 double fRec57[2];
150 double fRec56[2];
151 double fRec55[3];
152 double fVec14[2];
153 double fRec54[2];
154 double fRec53[3];
155 double fRec52[3];
156 double fRec62[2];
157 double fRec61[3];
158 double fVec15[2];
159 double fRec60[2];
160 double fRec59[3];
161 double fRec66[2];
162 double fRec65[3];
163 double fRec64[3];
164 double fRec63[3];
165 double fRec68[2];
166 double fRec67[3];
167 double fVec16[2];
168 double fRec51[2];
169 double fVec17[2];
170 double fRec40[2];
171 double fVec18[2];
172 double fRec69[2];
173 double fRec39[2];
174 double fRec38[2];
175 double fVec19[2];
176 double fRec72[2];
177 double fRec71[2];
178 double fRec70[2];
179 void connect(uint32_t port,void* data);
180 void clear_state_f();
181 void init(uint32_t samplingFreq);
182 void compute(int count, float *input0, float *input1, float *output0, float *output1);
183
184 static void clear_state_f_static(PluginLV2*);
185 static void init_static(uint32_t samplingFreq, PluginLV2*);
186 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
187 static void del_instance(PluginLV2 *p);
188 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
189 public:
190 Dsp();
191 ~Dsp();
192 };
193
194
195
196 Dsp::Dsp()
197 : PluginLV2() {
198 version = PLUGINLV2_VERSION;
199 id = "pre 12AT7/ master 6V6";
200 name = N_("pre 12AT7/ master 6V6");
201 mono_audio = 0;
202 stereo_audio = compute_static;
203 set_samplerate = init_static;
204 activate_plugin = 0;
205 connect_ports = connect_static;
206 clear_state = clear_state_f_static;
207 delete_instance = del_instance;
208 }
209
210 Dsp::~Dsp() {
211 }
212
213 inline void Dsp::clear_state_f()
214 {
215 for (int i=0; i<2; i++) fVec0[i] = 0;
216 for (int i=0; i<2; i++) fRec2[i] = 0;
217 for (int i=0; i<2; i++) fRec3[i] = 0;
218 for (int i=0; i<2; i++) fRec13[i] = 0;
219 for (int i=0; i<2; i++) fRec21[i] = 0;
220 for (int i=0; i<2; i++) fVec1[i] = 0;
221 for (int i=0; i<2; i++) fRec22[i] = 0;
222 for (int i=0; i<2; i++) fRec20[i] = 0;
223 for (int i=0; i<2; i++) fRec19[i] = 0;
224 for (int i=0; i<2; i++) fRec18[i] = 0;
225 for (int i=0; i<2; i++) fVec2[i] = 0;
226 for (int i=0; i<2; i++) fRec23[i] = 0;
227 for (int i=0; i<2; i++) fRec17[i] = 0;
228 for (int i=0; i<2; i++) fRec16[i] = 0;
229 for (int i=0; i<2; i++) fVec3[i] = 0;
230 for (int i=0; i<2; i++) fRec24[i] = 0;
231 for (int i=0; i<2; i++) fRec15[i] = 0;
232 for (int i=0; i<2; i++) fRec14[i] = 0;
233 for (int i=0; i<3; i++) fRec12[i] = 0;
234 for (int i=0; i<2; i++) fVec4[i] = 0;
235 for (int i=0; i<2; i++) fRec11[i] = 0;
236 for (int i=0; i<2; i++) fRec10[i] = 0;
237 for (int i=0; i<3; i++) fRec9[i] = 0;
238 for (int i=0; i<2; i++) fVec5[i] = 0;
239 for (int i=0; i<2; i++) fRec8[i] = 0;
240 for (int i=0; i<3; i++) fRec7[i] = 0;
241 for (int i=0; i<3; i++) fRec6[i] = 0;
242 for (int i=0; i<2; i++) fRec28[i] = 0;
243 for (int i=0; i<3; i++) fRec27[i] = 0;
244 for (int i=0; i<2; i++) fVec6[i] = 0;
245 for (int i=0; i<2; i++) fRec26[i] = 0;
246 for (int i=0; i<3; i++) fRec25[i] = 0;
247 for (int i=0; i<2; i++) fRec32[i] = 0;
248 for (int i=0; i<3; i++) fRec31[i] = 0;
249 for (int i=0; i<3; i++) fRec30[i] = 0;
250 for (int i=0; i<3; i++) fRec29[i] = 0;
251 for (int i=0; i<2; i++) fRec34[i] = 0;
252 for (int i=0; i<3; i++) fRec33[i] = 0;
253 for (int i=0; i<2; i++) fVec7[i] = 0;
254 for (int i=0; i<2; i++) fRec5[i] = 0;
255 for (int i=0; i<2; i++) fVec8[i] = 0;
256 for (int i=0; i<2; i++) fRec4[i] = 0;
257 for (int i=0; i<2; i++) fRec1[i] = 0;
258 for (int i=0; i<2; i++) fRec0[i] = 0;
259 for (int i=0; i<2; i++) fVec9[i] = 0;
260 for (int i=0; i<2; i++) fRec37[i] = 0;
261 for (int i=0; i<2; i++) fRec36[i] = 0;
262 for (int i=0; i<2; i++) fRec35[i] = 0;
263 for (int i=0; i<2; i++) fVec10[i] = 0;
264 for (int i=0; i<2; i++) fRec48[i] = 0;
265 for (int i=0; i<2; i++) fRec47[i] = 0;
266 for (int i=0; i<2; i++) fRec46[i] = 0;
267 for (int i=0; i<2; i++) fRec45[i] = 0;
268 for (int i=0; i<2; i++) fVec11[i] = 0;
269 for (int i=0; i<2; i++) fRec49[i] = 0;
270 for (int i=0; i<2; i++) fRec44[i] = 0;
271 for (int i=0; i<2; i++) fRec43[i] = 0;
272 for (int i=0; i<2; i++) fVec12[i] = 0;
273 for (int i=0; i<2; i++) fRec50[i] = 0;
274 for (int i=0; i<2; i++) fRec42[i] = 0;
275 for (int i=0; i<2; i++) fRec41[i] = 0;
276 for (int i=0; i<3; i++) fRec58[i] = 0;
277 for (int i=0; i<2; i++) fVec13[i] = 0;
278 for (int i=0; i<2; i++) fRec57[i] = 0;
279 for (int i=0; i<2; i++) fRec56[i] = 0;
280 for (int i=0; i<3; i++) fRec55[i] = 0;
281 for (int i=0; i<2; i++) fVec14[i] = 0;
282 for (int i=0; i<2; i++) fRec54[i] = 0;
283 for (int i=0; i<3; i++) fRec53[i] = 0;
284 for (int i=0; i<3; i++) fRec52[i] = 0;
285 for (int i=0; i<2; i++) fRec62[i] = 0;
286 for (int i=0; i<3; i++) fRec61[i] = 0;
287 for (int i=0; i<2; i++) fVec15[i] = 0;
288 for (int i=0; i<2; i++) fRec60[i] = 0;
289 for (int i=0; i<3; i++) fRec59[i] = 0;
290 for (int i=0; i<2; i++) fRec66[i] = 0;
291 for (int i=0; i<3; i++) fRec65[i] = 0;
292 for (int i=0; i<3; i++) fRec64[i] = 0;
293 for (int i=0; i<3; i++) fRec63[i] = 0;
294 for (int i=0; i<2; i++) fRec68[i] = 0;
295 for (int i=0; i<3; i++) fRec67[i] = 0;
296 for (int i=0; i<2; i++) fVec16[i] = 0;
297 for (int i=0; i<2; i++) fRec51[i] = 0;
298 for (int i=0; i<2; i++) fVec17[i] = 0;
299 for (int i=0; i<2; i++) fRec40[i] = 0;
300 for (int i=0; i<2; i++) fVec18[i] = 0;
301 for (int i=0; i<2; i++) fRec69[i] = 0;
302 for (int i=0; i<2; i++) fRec39[i] = 0;
303 for (int i=0; i<2; i++) fRec38[i] = 0;
304 for (int i=0; i<2; i++) fVec19[i] = 0;
305 for (int i=0; i<2; i++) fRec72[i] = 0;
306 for (int i=0; i<2; i++) fRec71[i] = 0;
307 for (int i=0; i<2; i++) fRec70[i] = 0;
308 }
309
310 void Dsp::clear_state_f_static(PluginLV2 *p)
311 {
312 static_cast<Dsp*>(p)->clear_state_f();
313 }
314
315 inline void Dsp::init(uint32_t samplingFreq)
316 {
317 fSamplingFreq = samplingFreq;
318 iConst0 = min(192000, max(1, fSamplingFreq));
319 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
320 fConst2 = (1 + fConst1);
321 fConst3 = (0 - ((1 - fConst1) / fConst2));
322 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
323 fConst5 = (1 + fConst4);
324 fConst6 = (0 - ((1 - fConst4) / fConst5));
325 fConst7 = (1.0 / fConst5);
326 fConst8 = tan((942.4777960769379 / iConst0));
327 fConst9 = (1.0 / faustpower<2>(fConst8));
328 fConst10 = (2 * (1 - fConst9));
329 fConst11 = (1.0 / fConst8);
330 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
331 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
332 fConst14 = tan((3769.9111843077517 / iConst0));
333 fConst15 = (1.0 / faustpower<2>(fConst14));
334 fConst16 = (2 * (1 - fConst15));
335 fConst17 = (1.0 / fConst14);
336 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
337 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
338 fConst20 = (1.0 / fConst19);
339 fConst21 = (1 + fConst17);
340 fConst22 = (0 - ((1 - fConst17) / fConst21));
341 fConst23 = tan((10053.096491487338 / iConst0));
342 fConst24 = (1.0 / faustpower<2>(fConst23));
343 fConst25 = (2 * (1 - fConst24));
344 fConst26 = (1.0 / fConst23);
345 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
346 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
347 fConst29 = (1.0 / fConst28);
348 fConst30 = (1 + fConst26);
349 fConst31 = (0 - ((1 - fConst26) / fConst30));
350 fConst32 = tan((47123.8898038469 / iConst0));
351 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
352 fConst34 = (1.0 / fConst32);
353 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
354 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
355 fConst37 = (1.0 / fConst36);
356 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
357 fConst39 = (1 + fConst38);
358 fConst40 = (0 - ((1 - fConst38) / fConst39));
359 fConst41 = (1.0 / fConst39);
360 fConst42 = (0 - fConst1);
361 fConst43 = (0.025 / fConst2);
362 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
363 fConst45 = (1 + fConst44);
364 fConst46 = (0 - ((1 - fConst44) / fConst45));
365 fConst47 = (1.0 / fConst45);
366 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
367 fConst49 = (1 + fConst48);
368 fConst50 = (0 - ((1 - fConst48) / fConst49));
369 fConst51 = (1.0 / fConst49);
370 fConst52 = (1.0 / (fConst2 * fConst36));
371 fConst53 = (1.0 / fConst30);
372 fConst54 = (0 - fConst17);
373 fConst55 = (1.0 / (fConst21 * fConst28));
374 fConst56 = (2 * (0 - fConst15));
375 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
376 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
377 fConst59 = (1 + fConst11);
378 fConst60 = (0 - ((1 - fConst11) / fConst59));
379 fConst61 = (0 - fConst11);
380 fConst62 = (1.0 / (fConst59 * fConst19));
381 fConst63 = (2 * (0 - fConst9));
382 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
383 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
384 fConst66 = (0 - fConst26);
385 fConst67 = (2 * (0 - fConst24));
386 clear_state_f();
387 }
388
389 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
390 {
391 static_cast<Dsp*>(p)->init(samplingFreq);
392 }
393
394 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
395 {
396 #define fslider0 (*fslider0_)
397 #define fslider1 (*fslider1_)
398 #define fslider2 (*fslider2_)
399 #define fslider3 (*fslider3_)
400 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
401 double fSlow1 = (1.000000000000001e-05 * fslider1);
402 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
403 double fSlow3 = fslider3;
404 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
405 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
406 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
407 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
408 double fSlow8 = (2 * (fSlow3 - 0.5));
409 double fSlow9 = (1 - max(0, (0 - fSlow8)));
410 double fSlow10 = (1 - max(0, fSlow8));
411 double fSlow11 = (1.25 * fSlow3);
412 for (int i=0; i<count; i++) {
413 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
414 fVec0[0] = fTemp0;
415 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
416 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
417 double fTemp1 = (fConst10 * fRec6[1]);
418 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
419 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
420 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
421 fVec1[0] = fTemp2;
422 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
423 fRec20[0] = (Ftube(TUBE_TABLE_12AT7_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 2.617752999999999)) - 153.04618518518518);
424 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
425 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
426 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
427 fVec2[0] = fTemp3;
428 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
429 fRec17[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec23[0] + fRec18[0]) - 1.887331999999999)) - 124.17786666666666);
430 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
431 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
432 fVec3[0] = fTemp4;
433 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
434 fRec15[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec24[0] + fRec16[0]) - 1.2569619999999988)) - 96.7119512195122);
435 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
436 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
437 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
438 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
439 fVec4[0] = fTemp6;
440 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
441 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
442 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
443 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
444 fVec5[0] = fTemp7;
445 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
446 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
447 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
448 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
449 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
450 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
451 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
452 fVec6[0] = fTemp9;
453 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
454 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
455 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
456 double fTemp11 = (fConst10 * fRec29[1]);
457 double fTemp12 = (fConst16 * fRec30[1]);
458 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
459 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
460 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
461 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
462 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
463 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
464 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
465 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
466 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
467 fVec7[0] = fTemp15;
468 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
469 double fTemp16 = (1 - fRec13[0]);
470 double fTemp17 = (fRec14[0] * fTemp16);
471 double fTemp18 = (1e-15 + fTemp17);
472 double fTemp19 = (1e-15 + ((fSlow11 * ((fTemp18 * (4 - (4 * fabs(fTemp18)))) - fTemp18)) + ((fSlow10 * fTemp5) + (fTemp17 + (fSlow9 * fRec5[0])))));
473 fVec8[0] = fTemp19;
474 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
475 double fTemp20 = (fRec4[0] * fRec3[0]);
476 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp20 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
477 fRec0[0] = ((fConst43 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
478 double fTemp21 = (1e-15 + (0.0082 * fRec36[1]));
479 fVec9[0] = fTemp21;
480 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
481 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp20) - 1.130461999999999)) - 112.13878048780487);
482 fRec35[0] = ((fConst43 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
483 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
484 double fTemp22 = (1e-15 + (0.027 * fRec47[1]));
485 fVec10[0] = fTemp22;
486 fRec48[0] = ((fConst41 * (fVec10[0] + fVec10[1])) + (fConst40 * fRec48[1]));
487 fRec47[0] = (Ftube(TUBE_TABLE_12AT7_68k, ((fRec48[0] + ((double)input1[i] * fRec21[0])) - 2.617752999999999)) - 153.04618518518518);
488 fRec46[0] = ((fConst43 * ((fConst42 * fRec47[1]) + (fConst1 * fRec47[0]))) + (fConst3 * fRec46[1]));
489 fRec45[0] = ((fConst7 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
490 double fTemp23 = (1e-15 + (0.015 * fRec44[1]));
491 fVec11[0] = fTemp23;
492 fRec49[0] = ((fConst47 * (fVec11[0] + fVec11[1])) + (fConst46 * fRec49[1]));
493 fRec44[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec49[0] + fRec45[0]) - 1.887331999999999)) - 124.17786666666666);
494 fRec43[0] = ((fConst43 * ((fConst42 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
495 double fTemp24 = (1e-15 + (0.0082 * fRec42[1]));
496 fVec12[0] = fTemp24;
497 fRec50[0] = ((fConst51 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec50[1]));
498 fRec42[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec50[0] + fRec43[0]) - 1.2569619999999988)) - 96.7119512195122);
499 fRec41[0] = ((fConst43 * ((fConst42 * fRec42[1]) + (fConst1 * fRec42[0]))) + (fConst3 * fRec41[1]));
500 double fTemp25 = (fTemp16 * fRec41[0]);
501 double fTemp26 = (1e-15 + (fRec13[0] * fRec41[0]));
502 double fTemp27 = (fConst10 * fRec52[1]);
503 fRec58[0] = (fTemp26 - (fConst37 * ((fConst35 * fRec58[2]) + (fConst33 * fRec58[1]))));
504 double fTemp28 = (fRec58[2] + (fRec58[0] + (2 * fRec58[1])));
505 fVec13[0] = fTemp28;
506 fRec57[0] = ((fConst52 * ((fConst42 * fVec13[1]) + (fConst1 * fVec13[0]))) + (fConst3 * fRec57[1]));
507 fRec56[0] = ((fConst53 * (fRec57[0] + fRec57[1])) + (fConst31 * fRec56[1]));
508 fRec55[0] = (fRec56[0] - (fConst29 * ((fConst27 * fRec55[2]) + (fConst25 * fRec55[1]))));
509 double fTemp29 = (fRec55[2] + (fRec55[0] + (2 * fRec55[1])));
510 fVec14[0] = fTemp29;
511 fRec54[0] = ((fConst55 * ((fConst54 * fVec14[1]) + (fConst17 * fVec14[0]))) + (fConst22 * fRec54[1]));
512 fRec53[0] = (fRec54[0] - (fConst20 * ((fConst18 * fRec53[2]) + (fConst16 * fRec53[1]))));
513 fRec52[0] = ((fConst20 * (((fConst15 * fRec53[0]) + (fConst56 * fRec53[1])) + (fConst15 * fRec53[2]))) - (fConst13 * ((fConst12 * fRec52[2]) + fTemp27)));
514 double fTemp30 = max(-1, min(1, (fSlow4 * (fRec52[2] + (fConst13 * (fTemp27 + (fConst12 * fRec52[0])))))));
515 fRec62[0] = ((fConst55 * (fVec14[0] + fVec14[1])) + (fConst22 * fRec62[1]));
516 fRec61[0] = (fRec62[0] - (fConst20 * ((fConst18 * fRec61[2]) + (fConst16 * fRec61[1]))));
517 double fTemp31 = (fRec61[2] + (fRec61[0] + (2 * fRec61[1])));
518 fVec15[0] = fTemp31;
519 fRec60[0] = ((fConst62 * ((fConst61 * fVec15[1]) + (fConst11 * fVec15[0]))) + (fConst60 * fRec60[1]));
520 fRec59[0] = (fRec60[0] - (fConst58 * ((fConst10 * fRec59[1]) + (fConst57 * fRec59[2]))));
521 double fTemp32 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec59[0]) + (fConst63 * fRec59[1])) + (fConst9 * fRec59[2])))));
522 double fTemp33 = (fConst10 * fRec63[1]);
523 double fTemp34 = (fConst16 * fRec64[1]);
524 fRec66[0] = ((fConst53 * ((fConst66 * fRec57[1]) + (fConst26 * fRec57[0]))) + (fConst31 * fRec66[1]));
525 fRec65[0] = (fRec66[0] - (fConst29 * ((fConst27 * fRec65[2]) + (fConst25 * fRec65[1]))));
526 fRec64[0] = ((fConst29 * (((fConst24 * fRec65[0]) + (fConst67 * fRec65[1])) + (fConst24 * fRec65[2]))) - (fConst65 * ((fConst64 * fRec64[2]) + fTemp34)));
527 fRec63[0] = ((fRec64[2] + (fConst65 * (fTemp34 + (fConst64 * fRec64[0])))) - (fConst13 * ((fConst12 * fRec63[2]) + fTemp33)));
528 double fTemp35 = max(-1, min(1, (fSlow6 * (fRec63[2] + (fConst13 * (fTemp33 + (fConst12 * fRec63[0])))))));
529 fRec68[0] = ((fConst62 * (fVec15[0] + fVec15[1])) + (fConst60 * fRec68[1]));
530 fRec67[0] = (fRec68[0] - (fConst58 * ((fConst57 * fRec67[2]) + (fConst10 * fRec67[1]))));
531 double fTemp36 = max(-1, min(1, (fSlow7 * (fRec67[2] + (fRec67[0] + (2 * fRec67[1]))))));
532 double fTemp37 = ((1.2589412 * (fTemp36 * (1 - (0.3333333333333333 * faustpower<2>(fTemp36))))) + (1.584893192 * ((fTemp35 * (1 - (0.3333333333333333 * faustpower<2>(fTemp35)))) + ((fTemp32 * (1 - (0.3333333333333333 * faustpower<2>(fTemp32)))) + (0.8413951417869425 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))))))));
533 fVec16[0] = fTemp37;
534 fRec51[0] = ((fConst7 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec51[1]));
535 double fTemp38 = (1e-15 + fTemp25);
536 double fTemp39 = (1e-15 + ((fSlow11 * ((fTemp38 * (4 - (4 * fabs(fTemp38)))) - fTemp38)) + (((fSlow9 * fRec51[0]) + (fSlow10 * fTemp26)) + fTemp25)));
537 fVec17[0] = fTemp39;
538 fRec40[0] = ((fConst7 * (fVec17[0] + fVec17[1])) + (fConst6 * fRec40[1]));
539 double fTemp40 = (fRec3[0] * fRec40[0]);
540 double fTemp41 = (1e-15 + (0.0082 * fRec39[1]));
541 fVec18[0] = fTemp41;
542 fRec69[0] = ((fConst7 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec69[1]));
543 fRec39[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec69[0] + fTemp40) - 1.130739999999999)) - 112.10487804878048);
544 fRec38[0] = ((fConst43 * ((fConst42 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
545 double fTemp42 = (1e-15 + (0.0082 * fRec71[1]));
546 fVec19[0] = fTemp42;
547 fRec72[0] = ((fConst7 * (fVec19[0] + fVec19[1])) + (fConst6 * fRec72[1]));
548 fRec71[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec72[0] + fTemp40) - 1.130461999999999)) - 112.13878048780487);
549 fRec70[0] = ((fConst43 * ((fConst42 * fRec71[1]) + (fConst1 * fRec71[0]))) + (fConst3 * fRec70[1]));
550 output1[i] = (FAUSTFLOAT)(fRec70[0] + fRec38[0]);
551 // post processing
552 fRec70[1] = fRec70[0];
553 fRec71[1] = fRec71[0];
554 fRec72[1] = fRec72[0];
555 fVec19[1] = fVec19[0];
556 fRec38[1] = fRec38[0];
557 fRec39[1] = fRec39[0];
558 fRec69[1] = fRec69[0];
559 fVec18[1] = fVec18[0];
560 fRec40[1] = fRec40[0];
561 fVec17[1] = fVec17[0];
562 fRec51[1] = fRec51[0];
563 fVec16[1] = fVec16[0];
564 fRec67[2] = fRec67[1]; fRec67[1] = fRec67[0];
565 fRec68[1] = fRec68[0];
566 fRec63[2] = fRec63[1]; fRec63[1] = fRec63[0];
567 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
568 fRec65[2] = fRec65[1]; fRec65[1] = fRec65[0];
569 fRec66[1] = fRec66[0];
570 fRec59[2] = fRec59[1]; fRec59[1] = fRec59[0];
571 fRec60[1] = fRec60[0];
572 fVec15[1] = fVec15[0];
573 fRec61[2] = fRec61[1]; fRec61[1] = fRec61[0];
574 fRec62[1] = fRec62[0];
575 fRec52[2] = fRec52[1]; fRec52[1] = fRec52[0];
576 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
577 fRec54[1] = fRec54[0];
578 fVec14[1] = fVec14[0];
579 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
580 fRec56[1] = fRec56[0];
581 fRec57[1] = fRec57[0];
582 fVec13[1] = fVec13[0];
583 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
584 fRec41[1] = fRec41[0];
585 fRec42[1] = fRec42[0];
586 fRec50[1] = fRec50[0];
587 fVec12[1] = fVec12[0];
588 fRec43[1] = fRec43[0];
589 fRec44[1] = fRec44[0];
590 fRec49[1] = fRec49[0];
591 fVec11[1] = fVec11[0];
592 fRec45[1] = fRec45[0];
593 fRec46[1] = fRec46[0];
594 fRec47[1] = fRec47[0];
595 fRec48[1] = fRec48[0];
596 fVec10[1] = fVec10[0];
597 fRec35[1] = fRec35[0];
598 fRec36[1] = fRec36[0];
599 fRec37[1] = fRec37[0];
600 fVec9[1] = fVec9[0];
601 fRec0[1] = fRec0[0];
602 fRec1[1] = fRec1[0];
603 fRec4[1] = fRec4[0];
604 fVec8[1] = fVec8[0];
605 fRec5[1] = fRec5[0];
606 fVec7[1] = fVec7[0];
607 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
608 fRec34[1] = fRec34[0];
609 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
610 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
611 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
612 fRec32[1] = fRec32[0];
613 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
614 fRec26[1] = fRec26[0];
615 fVec6[1] = fVec6[0];
616 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
617 fRec28[1] = fRec28[0];
618 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
619 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
620 fRec8[1] = fRec8[0];
621 fVec5[1] = fVec5[0];
622 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
623 fRec10[1] = fRec10[0];
624 fRec11[1] = fRec11[0];
625 fVec4[1] = fVec4[0];
626 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
627 fRec14[1] = fRec14[0];
628 fRec15[1] = fRec15[0];
629 fRec24[1] = fRec24[0];
630 fVec3[1] = fVec3[0];
631 fRec16[1] = fRec16[0];
632 fRec17[1] = fRec17[0];
633 fRec23[1] = fRec23[0];
634 fVec2[1] = fVec2[0];
635 fRec18[1] = fRec18[0];
636 fRec19[1] = fRec19[0];
637 fRec20[1] = fRec20[0];
638 fRec22[1] = fRec22[0];
639 fVec1[1] = fVec1[0];
640 fRec21[1] = fRec21[0];
641 fRec13[1] = fRec13[0];
642 fRec3[1] = fRec3[0];
643 fRec2[1] = fRec2[0];
644 fVec0[1] = fVec0[0];
645 }
646 #undef fslider0
647 #undef fslider1
648 #undef fslider2
649 #undef fslider3
650 }
651
652 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
653 {
654 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
655 }
656
657
658 void Dsp::connect(uint32_t port,void* data)
659 {
660 switch ((PortIndex)port)
661 {
662 case DRIVE:
663 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
664 break;
665 case PREGAIN:
666 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
667 break;
668 case WET_DRY:
669 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
670 break;
671 case GAIN1:
672 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
673 break;
674 default:
675 break;
676 }
677 }
678
679 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
680 {
681 static_cast<Dsp*>(p)->connect(port, data);
682 }
683
684
685 PluginLV2 *plugin() {
686 return new Dsp();
687 }
688
689 void Dsp::del_instance(PluginLV2 *p)
690 {
691 delete static_cast<Dsp*>(p);
692 }
693
694 /*
695 typedef enum
696 {
697 DRIVE,
698 PREGAIN,
699 WET_DRY,
700 GAIN1,
701 } PortIndex;
702 */
703
704 } // end namespace gxamp15_stereo
0 // generated from file '../src/LV2/faust/gxamp16.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp16 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fVec1[2];
48 double fConst29;
49 double fRec21[2];
50 double fRec20[2];
51 double fRec19[3];
52 double fRec18[3];
53 FAUSTFLOAT fslider2;
54 FAUSTFLOAT *fslider2_;
55 double fRec22[2];
56 double fConst30;
57 double fConst31;
58 double fConst32;
59 double fVec2[2];
60 double fConst33;
61 double fRec23[2];
62 double fRec17[2];
63 double fConst34;
64 double fConst35;
65 double fRec16[2];
66 double fConst36;
67 double fConst37;
68 double fConst38;
69 double fVec3[2];
70 double fConst39;
71 double fRec26[2];
72 double fRec25[2];
73 double fRec24[2];
74 double fRec15[2];
75 double fRec14[2];
76 double fVec4[2];
77 double fRec27[2];
78 double fRec13[2];
79 double fRec12[2];
80 double fConst40;
81 double fConst41;
82 double fConst42;
83 double fVec5[2];
84 double fConst43;
85 double fRec30[2];
86 double fRec29[2];
87 double fRec28[2];
88 double fRec11[2];
89 double fVec6[2];
90 double fRec31[2];
91 double fRec10[2];
92 double fRec9[2];
93 FAUSTFLOAT fslider3;
94 FAUSTFLOAT *fslider3_;
95 double fRec34[2];
96 int IOTA;
97 double fVec7[32768];
98 int iConst44;
99 double fRec33[2];
100 double fConst45;
101 double fRec32[2];
102 double fConst46;
103 double fConst47;
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fRec42[3];
133 double fVec8[2];
134 double fConst76;
135 double fRec41[2];
136 double fConst77;
137 double fRec40[2];
138 double fRec39[3];
139 double fVec9[2];
140 double fConst78;
141 double fConst79;
142 double fRec38[2];
143 double fRec37[3];
144 double fConst80;
145 double fRec36[3];
146 double fConst81;
147 double fConst82;
148 double fConst83;
149 double fConst84;
150 double fRec46[2];
151 double fRec45[3];
152 double fVec10[2];
153 double fConst85;
154 double fConst86;
155 double fRec44[2];
156 double fRec43[3];
157 double fConst87;
158 double fConst88;
159 double fConst89;
160 double fConst90;
161 double fRec50[2];
162 double fRec49[3];
163 double fConst91;
164 double fRec48[3];
165 double fRec47[3];
166 double fRec52[2];
167 double fRec51[3];
168 double fVec11[2];
169 double fRec35[2];
170 double fVec12[2];
171 double fRec7[2];
172 double fRec4[2];
173 double fRec3[2];
174 double fVec13[2];
175 double fRec55[2];
176 double fRec54[2];
177 double fRec53[2];
178 double fVec14[3];
179 double fConst92;
180 double fConst93;
181 double fRec2[3];
182 double fConst94;
183 double fConst95;
184 double fRec1[3];
185 double fConst96;
186 double fConst97;
187 double fRec0[3];
188 void connect(uint32_t port,void* data);
189 void clear_state_f();
190 void init(uint32_t samplingFreq);
191 void compute(int count, float *input0, float *output0);
192
193 static void clear_state_f_static(PluginLV2*);
194 static void init_static(uint32_t samplingFreq, PluginLV2*);
195 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
196 static void del_instance(PluginLV2 *p);
197 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
198 public:
199 Dsp();
200 ~Dsp();
201 };
202
203
204
205 Dsp::Dsp()
206 : PluginLV2() {
207 version = PLUGINLV2_VERSION;
208 id = "pre 12AT7/ push pull 6V6";
209 name = N_("pre 12AT7/ push pull 6V6");
210 mono_audio = compute_static;
211 stereo_audio = 0;
212 set_samplerate = init_static;
213 activate_plugin = 0;
214 connect_ports = connect_static;
215 clear_state = clear_state_f_static;
216 delete_instance = del_instance;
217 }
218
219 Dsp::~Dsp() {
220 }
221
222 inline void Dsp::clear_state_f()
223 {
224 for (int i=0; i<2; i++) fVec0[i] = 0;
225 for (int i=0; i<2; i++) fRec5[i] = 0;
226 for (int i=0; i<2; i++) fRec6[i] = 0;
227 for (int i=0; i<2; i++) fRec8[i] = 0;
228 for (int i=0; i<2; i++) fVec1[i] = 0;
229 for (int i=0; i<2; i++) fRec21[i] = 0;
230 for (int i=0; i<2; i++) fRec20[i] = 0;
231 for (int i=0; i<3; i++) fRec19[i] = 0;
232 for (int i=0; i<3; i++) fRec18[i] = 0;
233 for (int i=0; i<2; i++) fRec22[i] = 0;
234 for (int i=0; i<2; i++) fVec2[i] = 0;
235 for (int i=0; i<2; i++) fRec23[i] = 0;
236 for (int i=0; i<2; i++) fRec17[i] = 0;
237 for (int i=0; i<2; i++) fRec16[i] = 0;
238 for (int i=0; i<2; i++) fVec3[i] = 0;
239 for (int i=0; i<2; i++) fRec26[i] = 0;
240 for (int i=0; i<2; i++) fRec25[i] = 0;
241 for (int i=0; i<2; i++) fRec24[i] = 0;
242 for (int i=0; i<2; i++) fRec15[i] = 0;
243 for (int i=0; i<2; i++) fRec14[i] = 0;
244 for (int i=0; i<2; i++) fVec4[i] = 0;
245 for (int i=0; i<2; i++) fRec27[i] = 0;
246 for (int i=0; i<2; i++) fRec13[i] = 0;
247 for (int i=0; i<2; i++) fRec12[i] = 0;
248 for (int i=0; i<2; i++) fVec5[i] = 0;
249 for (int i=0; i<2; i++) fRec30[i] = 0;
250 for (int i=0; i<2; i++) fRec29[i] = 0;
251 for (int i=0; i<2; i++) fRec28[i] = 0;
252 for (int i=0; i<2; i++) fRec11[i] = 0;
253 for (int i=0; i<2; i++) fVec6[i] = 0;
254 for (int i=0; i<2; i++) fRec31[i] = 0;
255 for (int i=0; i<2; i++) fRec10[i] = 0;
256 for (int i=0; i<2; i++) fRec9[i] = 0;
257 for (int i=0; i<2; i++) fRec34[i] = 0;
258 for (int i=0; i<32768; i++) fVec7[i] = 0;
259 for (int i=0; i<2; i++) fRec33[i] = 0;
260 for (int i=0; i<2; i++) fRec32[i] = 0;
261 for (int i=0; i<3; i++) fRec42[i] = 0;
262 for (int i=0; i<2; i++) fVec8[i] = 0;
263 for (int i=0; i<2; i++) fRec41[i] = 0;
264 for (int i=0; i<2; i++) fRec40[i] = 0;
265 for (int i=0; i<3; i++) fRec39[i] = 0;
266 for (int i=0; i<2; i++) fVec9[i] = 0;
267 for (int i=0; i<2; i++) fRec38[i] = 0;
268 for (int i=0; i<3; i++) fRec37[i] = 0;
269 for (int i=0; i<3; i++) fRec36[i] = 0;
270 for (int i=0; i<2; i++) fRec46[i] = 0;
271 for (int i=0; i<3; i++) fRec45[i] = 0;
272 for (int i=0; i<2; i++) fVec10[i] = 0;
273 for (int i=0; i<2; i++) fRec44[i] = 0;
274 for (int i=0; i<3; i++) fRec43[i] = 0;
275 for (int i=0; i<2; i++) fRec50[i] = 0;
276 for (int i=0; i<3; i++) fRec49[i] = 0;
277 for (int i=0; i<3; i++) fRec48[i] = 0;
278 for (int i=0; i<3; i++) fRec47[i] = 0;
279 for (int i=0; i<2; i++) fRec52[i] = 0;
280 for (int i=0; i<3; i++) fRec51[i] = 0;
281 for (int i=0; i<2; i++) fVec11[i] = 0;
282 for (int i=0; i<2; i++) fRec35[i] = 0;
283 for (int i=0; i<2; i++) fVec12[i] = 0;
284 for (int i=0; i<2; i++) fRec7[i] = 0;
285 for (int i=0; i<2; i++) fRec4[i] = 0;
286 for (int i=0; i<2; i++) fRec3[i] = 0;
287 for (int i=0; i<2; i++) fVec13[i] = 0;
288 for (int i=0; i<2; i++) fRec55[i] = 0;
289 for (int i=0; i<2; i++) fRec54[i] = 0;
290 for (int i=0; i<2; i++) fRec53[i] = 0;
291 for (int i=0; i<3; i++) fVec14[i] = 0;
292 for (int i=0; i<3; i++) fRec2[i] = 0;
293 for (int i=0; i<3; i++) fRec1[i] = 0;
294 for (int i=0; i<3; i++) fRec0[i] = 0;
295 }
296
297 void Dsp::clear_state_f_static(PluginLV2 *p)
298 {
299 static_cast<Dsp*>(p)->clear_state_f();
300 }
301
302 inline void Dsp::init(uint32_t samplingFreq)
303 {
304 fSamplingFreq = samplingFreq;
305 iConst0 = min(192000, max(1, fSamplingFreq));
306 fConst1 = (31704.95306002819 / iConst0);
307 fConst2 = (2 * cos(fConst1));
308 fConst3 = (0.026178010471204185 * sin(fConst1));
309 fConst4 = (fConst3 - 1);
310 fConst5 = (49574.33207364693 / iConst0);
311 fConst6 = (2 * cos(fConst5));
312 fConst7 = (0.07042253521126761 * sin(fConst5));
313 fConst8 = (fConst7 - 1);
314 fConst9 = (60601.32228774711 / iConst0);
315 fConst10 = (2 * cos(fConst9));
316 fConst11 = (0.03546099290780142 * sin(fConst9));
317 fConst12 = (fConst11 - 1);
318 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
319 fConst14 = (1 + fConst13);
320 fConst15 = (0 - ((1 - fConst13) / fConst14));
321 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
322 fConst17 = (1 + fConst16);
323 fConst18 = (0 - ((1 - fConst16) / fConst17));
324 fConst19 = (1.0 / fConst17);
325 fConst20 = tan((37699.11184307752 / iConst0));
326 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
327 fConst22 = (1.0 / fConst20);
328 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
329 fConst24 = (1.0 / (1 + ((0.7653668647301795 + fConst22) / fConst20)));
330 fConst25 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
331 fConst26 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
332 fConst27 = (973.8937226128359 / iConst0);
333 fConst28 = (1 - fConst27);
334 fConst29 = (1.0 / (1 + fConst27));
335 fConst30 = (1.0 / tan((270.1769682087222 / iConst0)));
336 fConst31 = (1 + fConst30);
337 fConst32 = (0 - ((1 - fConst30) / fConst31));
338 fConst33 = (1.0 / fConst31);
339 fConst34 = (0 - fConst13);
340 fConst35 = (0.025 / fConst14);
341 fConst36 = (1.0 / tan((414.6902302738527 / iConst0)));
342 fConst37 = (1 + fConst36);
343 fConst38 = (0 - ((1 - fConst36) / fConst37));
344 fConst39 = (1.0 / fConst37);
345 fConst40 = (1.0 / tan((609.4689747964198 / iConst0)));
346 fConst41 = (1 + fConst40);
347 fConst42 = (0 - ((1 - fConst40) / fConst41));
348 fConst43 = (1.0 / fConst41);
349 IOTA = 0;
350 iConst44 = int((int((0.1111111111111111 * iConst0)) & 65535));
351 fConst45 = (0.009000000000000008 / iConst0);
352 fConst46 = tan((942.4777960769379 / iConst0));
353 fConst47 = (1.0 / faustpower<2>(fConst46));
354 fConst48 = (2 * (1 - fConst47));
355 fConst49 = (1.0 / fConst46);
356 fConst50 = (1 + ((fConst49 - 1.0) / fConst46));
357 fConst51 = (1.0 / (1 + ((1.0 + fConst49) / fConst46)));
358 fConst52 = tan((3769.9111843077517 / iConst0));
359 fConst53 = (1.0 / faustpower<2>(fConst52));
360 fConst54 = (2 * (1 - fConst53));
361 fConst55 = (1.0 / fConst52);
362 fConst56 = (1 + ((fConst55 - 1.0000000000000004) / fConst52));
363 fConst57 = (1 + ((fConst55 + 1.0000000000000004) / fConst52));
364 fConst58 = (1.0 / fConst57);
365 fConst59 = (1 + fConst55);
366 fConst60 = (0 - ((1 - fConst55) / fConst59));
367 fConst61 = tan((10053.096491487338 / iConst0));
368 fConst62 = (1.0 / faustpower<2>(fConst61));
369 fConst63 = (2 * (1 - fConst62));
370 fConst64 = (1.0 / fConst61);
371 fConst65 = (1 + ((fConst64 - 1.0000000000000004) / fConst61));
372 fConst66 = (1 + ((1.0000000000000004 + fConst64) / fConst61));
373 fConst67 = (1.0 / fConst66);
374 fConst68 = (1 + fConst64);
375 fConst69 = (0 - ((1 - fConst64) / fConst68));
376 fConst70 = tan((47123.8898038469 / iConst0));
377 fConst71 = (2 * (1 - (1.0 / faustpower<2>(fConst70))));
378 fConst72 = (1.0 / fConst70);
379 fConst73 = (1 + ((fConst72 - 1.414213562373095) / fConst70));
380 fConst74 = (1 + ((1.414213562373095 + fConst72) / fConst70));
381 fConst75 = (1.0 / fConst74);
382 fConst76 = (1.0 / (fConst14 * fConst74));
383 fConst77 = (1.0 / fConst68);
384 fConst78 = (0 - fConst55);
385 fConst79 = (1.0 / (fConst59 * fConst66));
386 fConst80 = (2 * (0 - fConst53));
387 fConst81 = (1 + ((fConst49 - 1.0000000000000004) / fConst46));
388 fConst82 = (1.0 / (1 + ((fConst49 + 1.0000000000000004) / fConst46)));
389 fConst83 = (1 + fConst49);
390 fConst84 = (0 - ((1 - fConst49) / fConst83));
391 fConst85 = (0 - fConst49);
392 fConst86 = (1.0 / (fConst83 * fConst57));
393 fConst87 = (2 * (0 - fConst47));
394 fConst88 = (1 + ((fConst55 - 1.0) / fConst52));
395 fConst89 = (1.0 / (1 + ((1.0 + fConst55) / fConst52)));
396 fConst90 = (0 - fConst64);
397 fConst91 = (2 * (0 - fConst62));
398 fConst92 = (0 - fConst10);
399 fConst93 = (1.0 / (1 + fConst11));
400 fConst94 = (0 - fConst6);
401 fConst95 = (1.0 / (1 + fConst7));
402 fConst96 = (0 - fConst2);
403 fConst97 = (1.0 / (1 + fConst3));
404 clear_state_f();
405 }
406
407 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
408 {
409 static_cast<Dsp*>(p)->init(samplingFreq);
410 }
411
412 inline void Dsp::compute(int count, float *input0, float *output0)
413 {
414 #define fslider0 (*fslider0_)
415 #define fslider1 (*fslider1_)
416 #define fslider2 (*fslider2_)
417 #define fslider3 (*fslider3_)
418 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
419 double fSlow1 = (1.000000000000001e-05 * fslider1);
420 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
421 double fSlow3 = fslider3;
422 double fSlow4 = (1.25 * fSlow3);
423 double fSlow5 = (2 * (fSlow3 - 0.5));
424 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
425 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
426 double fSlow8 = (fConst82 * pow(1e+01,(2 * fSlow3)));
427 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
428 double fSlow10 = (fConst82 * pow(1e+01,(0.9 * fSlow3)));
429 double fSlow11 = (1 - max(0, (0 - fSlow5)));
430 for (int i=0; i<count; i++) {
431 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
432 fVec0[0] = fTemp0;
433 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
434 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
435 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
436 double fTemp1 = (double)input0[i];
437 fVec1[0] = fTemp1;
438 fRec21[0] = (fConst29 * ((fVec1[0] - fVec1[1]) + (fConst28 * fRec21[1])));
439 fRec20[0] = (fConst29 * ((fRec21[0] - fRec21[1]) + (fConst28 * fRec20[1])));
440 fRec19[0] = (fRec20[0] - (fConst26 * ((fConst25 * fRec19[2]) + (fConst21 * fRec19[1]))));
441 fRec18[0] = ((fConst26 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst24 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
442 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
443 double fTemp2 = (1e-15 + (0.027 * fRec17[1]));
444 fVec2[0] = fTemp2;
445 fRec23[0] = ((fConst33 * (fVec2[0] + fVec2[1])) + (fConst32 * fRec23[1]));
446 fRec17[0] = (Ftube(TUBE_TABLE_12AT7_68k, ((fRec23[0] + (fConst24 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 2.617752999999999)) - 153.04618518518518);
447 fRec16[0] = ((fConst35 * ((fConst34 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
448 double fTemp3 = (1e-15 + (0.015 * fRec25[1]));
449 fVec3[0] = fTemp3;
450 fRec26[0] = ((fConst39 * (fVec3[0] + fVec3[1])) + (fConst38 * fRec26[1]));
451 fRec25[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec26[0] + fRec15[1]) - 1.8873329999999988)) - 124.17779999999999);
452 fRec24[0] = ((fConst35 * ((fConst34 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
453 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
454 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
455 double fTemp4 = (1e-15 + (0.015 * fRec13[1]));
456 fVec4[0] = fTemp4;
457 fRec27[0] = ((fConst39 * (fVec4[0] + fVec4[1])) + (fConst38 * fRec27[1]));
458 fRec13[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec27[0] + fRec14[0]) - 1.8873329999999988)) - 124.17779999999999);
459 fRec12[0] = ((fConst35 * ((fConst34 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
460 double fTemp5 = (1e-15 + (0.0082 * fRec29[1]));
461 fVec5[0] = fTemp5;
462 fRec30[0] = ((fConst43 * (fVec5[0] + fVec5[1])) + (fConst42 * fRec30[1]));
463 fRec29[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec30[0] + fRec11[1]) - 1.2569619999999988)) - 96.7119512195122);
464 fRec28[0] = ((fConst35 * ((fConst34 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
465 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
466 double fTemp6 = (1e-15 + (0.0082 * fRec10[1]));
467 fVec6[0] = fTemp6;
468 fRec31[0] = ((fConst43 * (fVec6[0] + fVec6[1])) + (fConst42 * fRec31[1]));
469 fRec10[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec31[0] + fRec11[0]) - 1.2569619999999988)) - 96.7119512195122);
470 fRec9[0] = ((fConst35 * ((fConst34 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
471 double fTemp7 = (fRec9[0] * (1 - fRec8[0]));
472 double fTemp8 = (fRec9[0] * fRec8[0]);
473 double fTemp9 = fabs(fTemp8);
474 fRec34[0] = ((9.999999999998899e-05 * fTemp9) + (0.9999 * fRec34[1]));
475 double fTemp10 = max(fRec34[0], fTemp9);
476 fVec7[IOTA&32767] = fTemp10;
477 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst44)&32767]);
478 fRec32[0] = ((fConst45 * fRec33[0]) + (0.999 * fRec32[1]));
479 double fTemp11 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
480 double fTemp12 = (0 - fTemp11);
481 double fTemp13 = (40.1 * fTemp12);
482 double fTemp14 = max(-600, fTemp13);
483 double fTemp15 = (0 - fTemp14);
484 double fTemp16 = (fTemp8 - fTemp11);
485 double fTemp17 = (40.1 * fTemp16);
486 double fTemp18 = max(-600, fTemp17);
487 double fTemp19 = (0 - fTemp18);
488 double fTemp20 = (((int((fabs(fTemp17) > 0.0001)))?((int((fTemp18 < -50)))?(exp(fTemp18) * fTemp19):(fTemp18 / (1 - exp(fTemp19)))):(1 + (fTemp16 * (20.05 + (134.00083333333336 * fTemp16))))) - ((int((fabs(fTemp13) > 0.0001)))?((int((fTemp14 < -50)))?(exp(fTemp14) * fTemp15):(fTemp14 / (1 - exp(fTemp15)))):(1 + (fTemp12 * (20.05 + (134.00083333333336 * fTemp12))))));
489 double fTemp21 = (fConst48 * fRec36[1]);
490 fRec42[0] = ((0.024937655860349125 * fTemp20) - (fConst75 * ((fConst73 * fRec42[2]) + (fConst71 * fRec42[1]))));
491 double fTemp22 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
492 fVec8[0] = fTemp22;
493 fRec41[0] = ((fConst76 * ((fConst34 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
494 fRec40[0] = ((fConst77 * (fRec41[0] + fRec41[1])) + (fConst69 * fRec40[1]));
495 fRec39[0] = (fRec40[0] - (fConst67 * ((fConst65 * fRec39[2]) + (fConst63 * fRec39[1]))));
496 double fTemp23 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
497 fVec9[0] = fTemp23;
498 fRec38[0] = ((fConst79 * ((fConst78 * fVec9[1]) + (fConst55 * fVec9[0]))) + (fConst60 * fRec38[1]));
499 fRec37[0] = (fRec38[0] - (fConst58 * ((fConst56 * fRec37[2]) + (fConst54 * fRec37[1]))));
500 fRec36[0] = ((fConst58 * (((fConst53 * fRec37[0]) + (fConst80 * fRec37[1])) + (fConst53 * fRec37[2]))) - (fConst51 * ((fConst50 * fRec36[2]) + fTemp21)));
501 double fTemp24 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst51 * (fTemp21 + (fConst50 * fRec36[0])))))));
502 fRec46[0] = ((fConst79 * (fVec9[0] + fVec9[1])) + (fConst60 * fRec46[1]));
503 fRec45[0] = (fRec46[0] - (fConst58 * ((fConst56 * fRec45[2]) + (fConst54 * fRec45[1]))));
504 double fTemp25 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
505 fVec10[0] = fTemp25;
506 fRec44[0] = ((fConst86 * ((fConst85 * fVec10[1]) + (fConst49 * fVec10[0]))) + (fConst84 * fRec44[1]));
507 fRec43[0] = (fRec44[0] - (fConst82 * ((fConst81 * fRec43[2]) + (fConst48 * fRec43[1]))));
508 double fTemp26 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec43[0]) + (fConst87 * fRec43[1])) + (fConst47 * fRec43[2])))));
509 double fTemp27 = (fConst48 * fRec47[1]);
510 double fTemp28 = (fConst54 * fRec48[1]);
511 fRec50[0] = ((fConst77 * ((fConst90 * fRec41[1]) + (fConst64 * fRec41[0]))) + (fConst69 * fRec50[1]));
512 fRec49[0] = (fRec50[0] - (fConst67 * ((fConst65 * fRec49[2]) + (fConst63 * fRec49[1]))));
513 fRec48[0] = ((fConst67 * (((fConst62 * fRec49[0]) + (fConst91 * fRec49[1])) + (fConst62 * fRec49[2]))) - (fConst89 * ((fConst88 * fRec48[2]) + fTemp28)));
514 fRec47[0] = ((fRec48[2] + (fConst89 * (fTemp28 + (fConst88 * fRec48[0])))) - (fConst51 * ((fConst50 * fRec47[2]) + fTemp27)));
515 double fTemp29 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst51 * (fTemp27 + (fConst50 * fRec47[0])))))));
516 fRec52[0] = ((fConst86 * (fVec10[0] + fVec10[1])) + (fConst84 * fRec52[1]));
517 fRec51[0] = (fRec52[0] - (fConst82 * ((fConst81 * fRec51[2]) + (fConst48 * fRec51[1]))));
518 double fTemp30 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
519 double fTemp31 = ((1.2589412 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30))))) + (1.584893192 * ((fTemp29 * (1 - (0.3333333333333333 * faustpower<2>(fTemp29)))) + ((fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26)))) + (0.8413951417869425 * (fTemp24 * (1 - (0.3333333333333333 * faustpower<2>(fTemp24)))))))));
520 fVec11[0] = fTemp31;
521 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
522 double fTemp32 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp20)) + (fTemp7 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp7))) - 1)))));
523 fVec12[0] = fTemp32;
524 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
525 double fTemp33 = (fRec7[0] * fRec6[0]);
526 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp33 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
527 fRec3[0] = ((fConst35 * ((fConst34 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
528 double fTemp34 = (1e-15 + (0.0041 * fRec54[1]));
529 fVec13[0] = fTemp34;
530 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
531 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp33) - 0.659760999999999)) - 89.08268292682925);
532 fRec53[0] = ((fConst35 * ((fConst34 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
533 double fTemp35 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
534 fVec14[0] = fTemp35;
535 fRec2[0] = (fConst93 * ((fVec14[2] + (fVec14[0] + (fConst92 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
536 fRec1[0] = (fConst95 * ((fRec2[2] + (fRec2[0] + (fConst94 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
537 fRec0[0] = (fConst97 * ((fRec1[2] + (fRec1[0] + (fConst96 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
538 output0[i] = (FAUSTFLOAT)fRec0[0];
539 // post processing
540 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
541 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
542 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
543 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
544 fRec53[1] = fRec53[0];
545 fRec54[1] = fRec54[0];
546 fRec55[1] = fRec55[0];
547 fVec13[1] = fVec13[0];
548 fRec3[1] = fRec3[0];
549 fRec4[1] = fRec4[0];
550 fRec7[1] = fRec7[0];
551 fVec12[1] = fVec12[0];
552 fRec35[1] = fRec35[0];
553 fVec11[1] = fVec11[0];
554 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
555 fRec52[1] = fRec52[0];
556 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
557 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
558 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
559 fRec50[1] = fRec50[0];
560 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
561 fRec44[1] = fRec44[0];
562 fVec10[1] = fVec10[0];
563 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
564 fRec46[1] = fRec46[0];
565 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
566 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
567 fRec38[1] = fRec38[0];
568 fVec9[1] = fVec9[0];
569 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
570 fRec40[1] = fRec40[0];
571 fRec41[1] = fRec41[0];
572 fVec8[1] = fVec8[0];
573 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
574 fRec32[1] = fRec32[0];
575 fRec33[1] = fRec33[0];
576 IOTA = IOTA+1;
577 fRec34[1] = fRec34[0];
578 fRec9[1] = fRec9[0];
579 fRec10[1] = fRec10[0];
580 fRec31[1] = fRec31[0];
581 fVec6[1] = fVec6[0];
582 fRec11[1] = fRec11[0];
583 fRec28[1] = fRec28[0];
584 fRec29[1] = fRec29[0];
585 fRec30[1] = fRec30[0];
586 fVec5[1] = fVec5[0];
587 fRec12[1] = fRec12[0];
588 fRec13[1] = fRec13[0];
589 fRec27[1] = fRec27[0];
590 fVec4[1] = fVec4[0];
591 fRec14[1] = fRec14[0];
592 fRec15[1] = fRec15[0];
593 fRec24[1] = fRec24[0];
594 fRec25[1] = fRec25[0];
595 fRec26[1] = fRec26[0];
596 fVec3[1] = fVec3[0];
597 fRec16[1] = fRec16[0];
598 fRec17[1] = fRec17[0];
599 fRec23[1] = fRec23[0];
600 fVec2[1] = fVec2[0];
601 fRec22[1] = fRec22[0];
602 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
603 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
604 fRec20[1] = fRec20[0];
605 fRec21[1] = fRec21[0];
606 fVec1[1] = fVec1[0];
607 fRec8[1] = fRec8[0];
608 fRec6[1] = fRec6[0];
609 fRec5[1] = fRec5[0];
610 fVec0[1] = fVec0[0];
611 }
612 #undef fslider0
613 #undef fslider1
614 #undef fslider2
615 #undef fslider3
616 }
617
618 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
619 {
620 static_cast<Dsp*>(p)->compute(count, input0, output0);
621 }
622
623
624 void Dsp::connect(uint32_t port,void* data)
625 {
626 switch ((PortIndex)port)
627 {
628 case DRIVE:
629 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
630 break;
631 case PREGAIN:
632 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
633 break;
634 case WET_DRY:
635 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
636 break;
637 case GAIN1:
638 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
639 break;
640 default:
641 break;
642 }
643 }
644
645 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
646 {
647 static_cast<Dsp*>(p)->connect(port, data);
648 }
649
650
651 PluginLV2 *plugin() {
652 return new Dsp();
653 }
654
655 void Dsp::del_instance(PluginLV2 *p)
656 {
657 delete static_cast<Dsp*>(p);
658 }
659
660 /*
661 typedef enum
662 {
663 DRIVE,
664 PREGAIN,
665 WET_DRY,
666 GAIN1,
667 } PortIndex;
668 */
669
670 } // end namespace gxamp16
0 // generated from file '../src/LV2/faust/gxamp16_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp16_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fVec1[2];
48 double fConst29;
49 double fRec21[2];
50 double fRec20[2];
51 double fRec19[3];
52 double fRec18[3];
53 FAUSTFLOAT fslider2;
54 FAUSTFLOAT *fslider2_;
55 double fRec22[2];
56 double fConst30;
57 double fConst31;
58 double fConst32;
59 double fVec2[2];
60 double fConst33;
61 double fRec23[2];
62 double fRec17[2];
63 double fConst34;
64 double fConst35;
65 double fRec16[2];
66 double fConst36;
67 double fConst37;
68 double fConst38;
69 double fVec3[2];
70 double fConst39;
71 double fRec26[2];
72 double fRec25[2];
73 double fRec24[2];
74 double fRec15[2];
75 double fRec14[2];
76 double fVec4[2];
77 double fRec27[2];
78 double fRec13[2];
79 double fRec12[2];
80 double fConst40;
81 double fConst41;
82 double fConst42;
83 double fVec5[2];
84 double fConst43;
85 double fRec30[2];
86 double fRec29[2];
87 double fRec28[2];
88 double fRec11[2];
89 double fVec6[2];
90 double fRec31[2];
91 double fRec10[2];
92 double fRec9[2];
93 FAUSTFLOAT fslider3;
94 FAUSTFLOAT *fslider3_;
95 double fRec34[2];
96 int IOTA;
97 double fVec7[32768];
98 int iConst44;
99 double fRec33[2];
100 double fConst45;
101 double fRec32[2];
102 double fConst46;
103 double fConst47;
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fRec42[3];
133 double fVec8[2];
134 double fConst76;
135 double fRec41[2];
136 double fConst77;
137 double fRec40[2];
138 double fRec39[3];
139 double fVec9[2];
140 double fConst78;
141 double fConst79;
142 double fRec38[2];
143 double fRec37[3];
144 double fConst80;
145 double fRec36[3];
146 double fConst81;
147 double fConst82;
148 double fConst83;
149 double fConst84;
150 double fRec46[2];
151 double fRec45[3];
152 double fVec10[2];
153 double fConst85;
154 double fConst86;
155 double fRec44[2];
156 double fRec43[3];
157 double fConst87;
158 double fConst88;
159 double fConst89;
160 double fConst90;
161 double fRec50[2];
162 double fRec49[3];
163 double fConst91;
164 double fRec48[3];
165 double fRec47[3];
166 double fRec52[2];
167 double fRec51[3];
168 double fVec11[2];
169 double fRec35[2];
170 double fVec12[2];
171 double fRec7[2];
172 double fRec4[2];
173 double fRec3[2];
174 double fVec13[2];
175 double fRec55[2];
176 double fRec54[2];
177 double fRec53[2];
178 double fVec14[3];
179 double fConst92;
180 double fConst93;
181 double fRec2[3];
182 double fConst94;
183 double fConst95;
184 double fRec1[3];
185 double fConst96;
186 double fConst97;
187 double fRec0[3];
188 double fVec15[2];
189 double fRec74[2];
190 double fRec73[2];
191 double fRec72[3];
192 double fRec71[3];
193 double fVec16[2];
194 double fRec75[2];
195 double fRec70[2];
196 double fRec69[2];
197 double fVec17[2];
198 double fRec78[2];
199 double fRec77[2];
200 double fRec76[2];
201 double fRec68[2];
202 double fRec67[2];
203 double fVec18[2];
204 double fRec79[2];
205 double fRec66[2];
206 double fRec65[2];
207 double fVec19[2];
208 double fRec82[2];
209 double fRec81[2];
210 double fRec80[2];
211 double fRec64[2];
212 double fVec20[2];
213 double fRec83[2];
214 double fRec63[2];
215 double fRec62[2];
216 double fRec86[2];
217 double fVec21[32768];
218 double fRec85[2];
219 double fRec84[2];
220 double fRec94[3];
221 double fVec22[2];
222 double fRec93[2];
223 double fRec92[2];
224 double fRec91[3];
225 double fVec23[2];
226 double fRec90[2];
227 double fRec89[3];
228 double fRec88[3];
229 double fRec98[2];
230 double fRec97[3];
231 double fVec24[2];
232 double fRec96[2];
233 double fRec95[3];
234 double fRec102[2];
235 double fRec101[3];
236 double fRec100[3];
237 double fRec99[3];
238 double fRec104[2];
239 double fRec103[3];
240 double fVec25[2];
241 double fRec87[2];
242 double fVec26[2];
243 double fRec61[2];
244 double fVec27[2];
245 double fRec105[2];
246 double fRec60[2];
247 double fRec59[2];
248 double fVec28[2];
249 double fRec108[2];
250 double fRec107[2];
251 double fRec106[2];
252 double fVec29[3];
253 double fRec58[3];
254 double fRec57[3];
255 double fRec56[3];
256 void connect(uint32_t port,void* data);
257 void clear_state_f();
258 void init(uint32_t samplingFreq);
259 void compute(int count, float *input0, float *input1, float *output0, float *output1);
260
261 static void clear_state_f_static(PluginLV2*);
262 static void init_static(uint32_t samplingFreq, PluginLV2*);
263 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
264 static void del_instance(PluginLV2 *p);
265 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
266 public:
267 Dsp();
268 ~Dsp();
269 };
270
271
272
273 Dsp::Dsp()
274 : PluginLV2() {
275 version = PLUGINLV2_VERSION;
276 id = "pre 12AT7/ push pull 6V6";
277 name = N_("pre 12AT7/ push pull 6V6");
278 mono_audio = 0;
279 stereo_audio = compute_static;
280 set_samplerate = init_static;
281 activate_plugin = 0;
282 connect_ports = connect_static;
283 clear_state = clear_state_f_static;
284 delete_instance = del_instance;
285 }
286
287 Dsp::~Dsp() {
288 }
289
290 inline void Dsp::clear_state_f()
291 {
292 for (int i=0; i<2; i++) fVec0[i] = 0;
293 for (int i=0; i<2; i++) fRec5[i] = 0;
294 for (int i=0; i<2; i++) fRec6[i] = 0;
295 for (int i=0; i<2; i++) fRec8[i] = 0;
296 for (int i=0; i<2; i++) fVec1[i] = 0;
297 for (int i=0; i<2; i++) fRec21[i] = 0;
298 for (int i=0; i<2; i++) fRec20[i] = 0;
299 for (int i=0; i<3; i++) fRec19[i] = 0;
300 for (int i=0; i<3; i++) fRec18[i] = 0;
301 for (int i=0; i<2; i++) fRec22[i] = 0;
302 for (int i=0; i<2; i++) fVec2[i] = 0;
303 for (int i=0; i<2; i++) fRec23[i] = 0;
304 for (int i=0; i<2; i++) fRec17[i] = 0;
305 for (int i=0; i<2; i++) fRec16[i] = 0;
306 for (int i=0; i<2; i++) fVec3[i] = 0;
307 for (int i=0; i<2; i++) fRec26[i] = 0;
308 for (int i=0; i<2; i++) fRec25[i] = 0;
309 for (int i=0; i<2; i++) fRec24[i] = 0;
310 for (int i=0; i<2; i++) fRec15[i] = 0;
311 for (int i=0; i<2; i++) fRec14[i] = 0;
312 for (int i=0; i<2; i++) fVec4[i] = 0;
313 for (int i=0; i<2; i++) fRec27[i] = 0;
314 for (int i=0; i<2; i++) fRec13[i] = 0;
315 for (int i=0; i<2; i++) fRec12[i] = 0;
316 for (int i=0; i<2; i++) fVec5[i] = 0;
317 for (int i=0; i<2; i++) fRec30[i] = 0;
318 for (int i=0; i<2; i++) fRec29[i] = 0;
319 for (int i=0; i<2; i++) fRec28[i] = 0;
320 for (int i=0; i<2; i++) fRec11[i] = 0;
321 for (int i=0; i<2; i++) fVec6[i] = 0;
322 for (int i=0; i<2; i++) fRec31[i] = 0;
323 for (int i=0; i<2; i++) fRec10[i] = 0;
324 for (int i=0; i<2; i++) fRec9[i] = 0;
325 for (int i=0; i<2; i++) fRec34[i] = 0;
326 for (int i=0; i<32768; i++) fVec7[i] = 0;
327 for (int i=0; i<2; i++) fRec33[i] = 0;
328 for (int i=0; i<2; i++) fRec32[i] = 0;
329 for (int i=0; i<3; i++) fRec42[i] = 0;
330 for (int i=0; i<2; i++) fVec8[i] = 0;
331 for (int i=0; i<2; i++) fRec41[i] = 0;
332 for (int i=0; i<2; i++) fRec40[i] = 0;
333 for (int i=0; i<3; i++) fRec39[i] = 0;
334 for (int i=0; i<2; i++) fVec9[i] = 0;
335 for (int i=0; i<2; i++) fRec38[i] = 0;
336 for (int i=0; i<3; i++) fRec37[i] = 0;
337 for (int i=0; i<3; i++) fRec36[i] = 0;
338 for (int i=0; i<2; i++) fRec46[i] = 0;
339 for (int i=0; i<3; i++) fRec45[i] = 0;
340 for (int i=0; i<2; i++) fVec10[i] = 0;
341 for (int i=0; i<2; i++) fRec44[i] = 0;
342 for (int i=0; i<3; i++) fRec43[i] = 0;
343 for (int i=0; i<2; i++) fRec50[i] = 0;
344 for (int i=0; i<3; i++) fRec49[i] = 0;
345 for (int i=0; i<3; i++) fRec48[i] = 0;
346 for (int i=0; i<3; i++) fRec47[i] = 0;
347 for (int i=0; i<2; i++) fRec52[i] = 0;
348 for (int i=0; i<3; i++) fRec51[i] = 0;
349 for (int i=0; i<2; i++) fVec11[i] = 0;
350 for (int i=0; i<2; i++) fRec35[i] = 0;
351 for (int i=0; i<2; i++) fVec12[i] = 0;
352 for (int i=0; i<2; i++) fRec7[i] = 0;
353 for (int i=0; i<2; i++) fRec4[i] = 0;
354 for (int i=0; i<2; i++) fRec3[i] = 0;
355 for (int i=0; i<2; i++) fVec13[i] = 0;
356 for (int i=0; i<2; i++) fRec55[i] = 0;
357 for (int i=0; i<2; i++) fRec54[i] = 0;
358 for (int i=0; i<2; i++) fRec53[i] = 0;
359 for (int i=0; i<3; i++) fVec14[i] = 0;
360 for (int i=0; i<3; i++) fRec2[i] = 0;
361 for (int i=0; i<3; i++) fRec1[i] = 0;
362 for (int i=0; i<3; i++) fRec0[i] = 0;
363 for (int i=0; i<2; i++) fVec15[i] = 0;
364 for (int i=0; i<2; i++) fRec74[i] = 0;
365 for (int i=0; i<2; i++) fRec73[i] = 0;
366 for (int i=0; i<3; i++) fRec72[i] = 0;
367 for (int i=0; i<3; i++) fRec71[i] = 0;
368 for (int i=0; i<2; i++) fVec16[i] = 0;
369 for (int i=0; i<2; i++) fRec75[i] = 0;
370 for (int i=0; i<2; i++) fRec70[i] = 0;
371 for (int i=0; i<2; i++) fRec69[i] = 0;
372 for (int i=0; i<2; i++) fVec17[i] = 0;
373 for (int i=0; i<2; i++) fRec78[i] = 0;
374 for (int i=0; i<2; i++) fRec77[i] = 0;
375 for (int i=0; i<2; i++) fRec76[i] = 0;
376 for (int i=0; i<2; i++) fRec68[i] = 0;
377 for (int i=0; i<2; i++) fRec67[i] = 0;
378 for (int i=0; i<2; i++) fVec18[i] = 0;
379 for (int i=0; i<2; i++) fRec79[i] = 0;
380 for (int i=0; i<2; i++) fRec66[i] = 0;
381 for (int i=0; i<2; i++) fRec65[i] = 0;
382 for (int i=0; i<2; i++) fVec19[i] = 0;
383 for (int i=0; i<2; i++) fRec82[i] = 0;
384 for (int i=0; i<2; i++) fRec81[i] = 0;
385 for (int i=0; i<2; i++) fRec80[i] = 0;
386 for (int i=0; i<2; i++) fRec64[i] = 0;
387 for (int i=0; i<2; i++) fVec20[i] = 0;
388 for (int i=0; i<2; i++) fRec83[i] = 0;
389 for (int i=0; i<2; i++) fRec63[i] = 0;
390 for (int i=0; i<2; i++) fRec62[i] = 0;
391 for (int i=0; i<2; i++) fRec86[i] = 0;
392 for (int i=0; i<32768; i++) fVec21[i] = 0;
393 for (int i=0; i<2; i++) fRec85[i] = 0;
394 for (int i=0; i<2; i++) fRec84[i] = 0;
395 for (int i=0; i<3; i++) fRec94[i] = 0;
396 for (int i=0; i<2; i++) fVec22[i] = 0;
397 for (int i=0; i<2; i++) fRec93[i] = 0;
398 for (int i=0; i<2; i++) fRec92[i] = 0;
399 for (int i=0; i<3; i++) fRec91[i] = 0;
400 for (int i=0; i<2; i++) fVec23[i] = 0;
401 for (int i=0; i<2; i++) fRec90[i] = 0;
402 for (int i=0; i<3; i++) fRec89[i] = 0;
403 for (int i=0; i<3; i++) fRec88[i] = 0;
404 for (int i=0; i<2; i++) fRec98[i] = 0;
405 for (int i=0; i<3; i++) fRec97[i] = 0;
406 for (int i=0; i<2; i++) fVec24[i] = 0;
407 for (int i=0; i<2; i++) fRec96[i] = 0;
408 for (int i=0; i<3; i++) fRec95[i] = 0;
409 for (int i=0; i<2; i++) fRec102[i] = 0;
410 for (int i=0; i<3; i++) fRec101[i] = 0;
411 for (int i=0; i<3; i++) fRec100[i] = 0;
412 for (int i=0; i<3; i++) fRec99[i] = 0;
413 for (int i=0; i<2; i++) fRec104[i] = 0;
414 for (int i=0; i<3; i++) fRec103[i] = 0;
415 for (int i=0; i<2; i++) fVec25[i] = 0;
416 for (int i=0; i<2; i++) fRec87[i] = 0;
417 for (int i=0; i<2; i++) fVec26[i] = 0;
418 for (int i=0; i<2; i++) fRec61[i] = 0;
419 for (int i=0; i<2; i++) fVec27[i] = 0;
420 for (int i=0; i<2; i++) fRec105[i] = 0;
421 for (int i=0; i<2; i++) fRec60[i] = 0;
422 for (int i=0; i<2; i++) fRec59[i] = 0;
423 for (int i=0; i<2; i++) fVec28[i] = 0;
424 for (int i=0; i<2; i++) fRec108[i] = 0;
425 for (int i=0; i<2; i++) fRec107[i] = 0;
426 for (int i=0; i<2; i++) fRec106[i] = 0;
427 for (int i=0; i<3; i++) fVec29[i] = 0;
428 for (int i=0; i<3; i++) fRec58[i] = 0;
429 for (int i=0; i<3; i++) fRec57[i] = 0;
430 for (int i=0; i<3; i++) fRec56[i] = 0;
431 }
432
433 void Dsp::clear_state_f_static(PluginLV2 *p)
434 {
435 static_cast<Dsp*>(p)->clear_state_f();
436 }
437
438 inline void Dsp::init(uint32_t samplingFreq)
439 {
440 fSamplingFreq = samplingFreq;
441 iConst0 = min(192000, max(1, fSamplingFreq));
442 fConst1 = (31704.95306002819 / iConst0);
443 fConst2 = (2 * cos(fConst1));
444 fConst3 = (0.026178010471204185 * sin(fConst1));
445 fConst4 = (fConst3 - 1);
446 fConst5 = (49574.33207364693 / iConst0);
447 fConst6 = (2 * cos(fConst5));
448 fConst7 = (0.07042253521126761 * sin(fConst5));
449 fConst8 = (fConst7 - 1);
450 fConst9 = (60601.32228774711 / iConst0);
451 fConst10 = (2 * cos(fConst9));
452 fConst11 = (0.03546099290780142 * sin(fConst9));
453 fConst12 = (fConst11 - 1);
454 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
455 fConst14 = (1 + fConst13);
456 fConst15 = (0 - ((1 - fConst13) / fConst14));
457 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
458 fConst17 = (1 + fConst16);
459 fConst18 = (0 - ((1 - fConst16) / fConst17));
460 fConst19 = (1.0 / fConst17);
461 fConst20 = tan((37699.11184307752 / iConst0));
462 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
463 fConst22 = (1.0 / fConst20);
464 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
465 fConst24 = (1.0 / (1 + ((0.7653668647301795 + fConst22) / fConst20)));
466 fConst25 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
467 fConst26 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
468 fConst27 = (973.8937226128359 / iConst0);
469 fConst28 = (1 - fConst27);
470 fConst29 = (1.0 / (1 + fConst27));
471 fConst30 = (1.0 / tan((270.1769682087222 / iConst0)));
472 fConst31 = (1 + fConst30);
473 fConst32 = (0 - ((1 - fConst30) / fConst31));
474 fConst33 = (1.0 / fConst31);
475 fConst34 = (0 - fConst13);
476 fConst35 = (0.025 / fConst14);
477 fConst36 = (1.0 / tan((414.6902302738527 / iConst0)));
478 fConst37 = (1 + fConst36);
479 fConst38 = (0 - ((1 - fConst36) / fConst37));
480 fConst39 = (1.0 / fConst37);
481 fConst40 = (1.0 / tan((609.4689747964198 / iConst0)));
482 fConst41 = (1 + fConst40);
483 fConst42 = (0 - ((1 - fConst40) / fConst41));
484 fConst43 = (1.0 / fConst41);
485 IOTA = 0;
486 iConst44 = int((int((0.1111111111111111 * iConst0)) & 65535));
487 fConst45 = (0.009000000000000008 / iConst0);
488 fConst46 = tan((942.4777960769379 / iConst0));
489 fConst47 = (1.0 / faustpower<2>(fConst46));
490 fConst48 = (2 * (1 - fConst47));
491 fConst49 = (1.0 / fConst46);
492 fConst50 = (1 + ((fConst49 - 1.0) / fConst46));
493 fConst51 = (1.0 / (1 + ((1.0 + fConst49) / fConst46)));
494 fConst52 = tan((3769.9111843077517 / iConst0));
495 fConst53 = (1.0 / faustpower<2>(fConst52));
496 fConst54 = (2 * (1 - fConst53));
497 fConst55 = (1.0 / fConst52);
498 fConst56 = (1 + ((fConst55 - 1.0000000000000004) / fConst52));
499 fConst57 = (1 + ((fConst55 + 1.0000000000000004) / fConst52));
500 fConst58 = (1.0 / fConst57);
501 fConst59 = (1 + fConst55);
502 fConst60 = (0 - ((1 - fConst55) / fConst59));
503 fConst61 = tan((10053.096491487338 / iConst0));
504 fConst62 = (1.0 / faustpower<2>(fConst61));
505 fConst63 = (2 * (1 - fConst62));
506 fConst64 = (1.0 / fConst61);
507 fConst65 = (1 + ((fConst64 - 1.0000000000000004) / fConst61));
508 fConst66 = (1 + ((1.0000000000000004 + fConst64) / fConst61));
509 fConst67 = (1.0 / fConst66);
510 fConst68 = (1 + fConst64);
511 fConst69 = (0 - ((1 - fConst64) / fConst68));
512 fConst70 = tan((47123.8898038469 / iConst0));
513 fConst71 = (2 * (1 - (1.0 / faustpower<2>(fConst70))));
514 fConst72 = (1.0 / fConst70);
515 fConst73 = (1 + ((fConst72 - 1.414213562373095) / fConst70));
516 fConst74 = (1 + ((1.414213562373095 + fConst72) / fConst70));
517 fConst75 = (1.0 / fConst74);
518 fConst76 = (1.0 / (fConst14 * fConst74));
519 fConst77 = (1.0 / fConst68);
520 fConst78 = (0 - fConst55);
521 fConst79 = (1.0 / (fConst59 * fConst66));
522 fConst80 = (2 * (0 - fConst53));
523 fConst81 = (1 + ((fConst49 - 1.0000000000000004) / fConst46));
524 fConst82 = (1.0 / (1 + ((fConst49 + 1.0000000000000004) / fConst46)));
525 fConst83 = (1 + fConst49);
526 fConst84 = (0 - ((1 - fConst49) / fConst83));
527 fConst85 = (0 - fConst49);
528 fConst86 = (1.0 / (fConst83 * fConst57));
529 fConst87 = (2 * (0 - fConst47));
530 fConst88 = (1 + ((fConst55 - 1.0) / fConst52));
531 fConst89 = (1.0 / (1 + ((1.0 + fConst55) / fConst52)));
532 fConst90 = (0 - fConst64);
533 fConst91 = (2 * (0 - fConst62));
534 fConst92 = (0 - fConst10);
535 fConst93 = (1.0 / (1 + fConst11));
536 fConst94 = (0 - fConst6);
537 fConst95 = (1.0 / (1 + fConst7));
538 fConst96 = (0 - fConst2);
539 fConst97 = (1.0 / (1 + fConst3));
540 clear_state_f();
541 }
542
543 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
544 {
545 static_cast<Dsp*>(p)->init(samplingFreq);
546 }
547
548 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
549 {
550 #define fslider0 (*fslider0_)
551 #define fslider1 (*fslider1_)
552 #define fslider2 (*fslider2_)
553 #define fslider3 (*fslider3_)
554 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
555 double fSlow1 = (1.000000000000001e-05 * fslider1);
556 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
557 double fSlow3 = fslider3;
558 double fSlow4 = (1.25 * fSlow3);
559 double fSlow5 = (2 * (fSlow3 - 0.5));
560 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
561 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
562 double fSlow8 = (fConst82 * pow(1e+01,(2 * fSlow3)));
563 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
564 double fSlow10 = (fConst82 * pow(1e+01,(0.9 * fSlow3)));
565 double fSlow11 = (1 - max(0, (0 - fSlow5)));
566 for (int i=0; i<count; i++) {
567 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
568 fVec0[0] = fTemp0;
569 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
570 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
571 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
572 double fTemp1 = (1 - fRec8[0]);
573 double fTemp2 = (double)input0[i];
574 fVec1[0] = fTemp2;
575 fRec21[0] = (fConst29 * ((fVec1[0] - fVec1[1]) + (fConst28 * fRec21[1])));
576 fRec20[0] = (fConst29 * ((fRec21[0] - fRec21[1]) + (fConst28 * fRec20[1])));
577 fRec19[0] = (fRec20[0] - (fConst26 * ((fConst25 * fRec19[2]) + (fConst21 * fRec19[1]))));
578 fRec18[0] = ((fConst26 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst24 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
579 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
580 double fTemp3 = (1e-15 + (0.027 * fRec17[1]));
581 fVec2[0] = fTemp3;
582 fRec23[0] = ((fConst33 * (fVec2[0] + fVec2[1])) + (fConst32 * fRec23[1]));
583 fRec17[0] = (Ftube(TUBE_TABLE_12AT7_68k, ((fRec23[0] + (fConst24 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 2.617752999999999)) - 153.04618518518518);
584 fRec16[0] = ((fConst35 * ((fConst34 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
585 double fTemp4 = (1e-15 + (0.015 * fRec25[1]));
586 fVec3[0] = fTemp4;
587 fRec26[0] = ((fConst39 * (fVec3[0] + fVec3[1])) + (fConst38 * fRec26[1]));
588 fRec25[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec26[0] + fRec15[1]) - 1.8873329999999988)) - 124.17779999999999);
589 fRec24[0] = ((fConst35 * ((fConst34 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
590 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
591 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
592 double fTemp5 = (1e-15 + (0.015 * fRec13[1]));
593 fVec4[0] = fTemp5;
594 fRec27[0] = ((fConst39 * (fVec4[0] + fVec4[1])) + (fConst38 * fRec27[1]));
595 fRec13[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec27[0] + fRec14[0]) - 1.8873329999999988)) - 124.17779999999999);
596 fRec12[0] = ((fConst35 * ((fConst34 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
597 double fTemp6 = (1e-15 + (0.0082 * fRec29[1]));
598 fVec5[0] = fTemp6;
599 fRec30[0] = ((fConst43 * (fVec5[0] + fVec5[1])) + (fConst42 * fRec30[1]));
600 fRec29[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec30[0] + fRec11[1]) - 1.2569619999999988)) - 96.7119512195122);
601 fRec28[0] = ((fConst35 * ((fConst34 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
602 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
603 double fTemp7 = (1e-15 + (0.0082 * fRec10[1]));
604 fVec6[0] = fTemp7;
605 fRec31[0] = ((fConst43 * (fVec6[0] + fVec6[1])) + (fConst42 * fRec31[1]));
606 fRec10[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec31[0] + fRec11[0]) - 1.2569619999999988)) - 96.7119512195122);
607 fRec9[0] = ((fConst35 * ((fConst34 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
608 double fTemp8 = (fRec9[0] * fTemp1);
609 double fTemp9 = (fRec9[0] * fRec8[0]);
610 double fTemp10 = fabs(fTemp9);
611 fRec34[0] = ((9.999999999998899e-05 * fTemp10) + (0.9999 * fRec34[1]));
612 double fTemp11 = max(fRec34[0], fTemp10);
613 fVec7[IOTA&32767] = fTemp11;
614 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst44)&32767]);
615 fRec32[0] = ((fConst45 * fRec33[0]) + (0.999 * fRec32[1]));
616 double fTemp12 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
617 double fTemp13 = (0 - fTemp12);
618 double fTemp14 = (40.1 * fTemp13);
619 double fTemp15 = max(-600, fTemp14);
620 double fTemp16 = (0 - fTemp15);
621 double fTemp17 = (fTemp9 - fTemp12);
622 double fTemp18 = (40.1 * fTemp17);
623 double fTemp19 = max(-600, fTemp18);
624 double fTemp20 = (0 - fTemp19);
625 double fTemp21 = (((int((fabs(fTemp18) > 0.0001)))?((int((fTemp19 < -50)))?(exp(fTemp19) * fTemp20):(fTemp19 / (1 - exp(fTemp20)))):(1 + (fTemp17 * (20.05 + (134.00083333333336 * fTemp17))))) - ((int((fabs(fTemp14) > 0.0001)))?((int((fTemp15 < -50)))?(exp(fTemp15) * fTemp16):(fTemp15 / (1 - exp(fTemp16)))):(1 + (fTemp13 * (20.05 + (134.00083333333336 * fTemp13))))));
626 double fTemp22 = (fConst48 * fRec36[1]);
627 fRec42[0] = ((0.024937655860349125 * fTemp21) - (fConst75 * ((fConst73 * fRec42[2]) + (fConst71 * fRec42[1]))));
628 double fTemp23 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
629 fVec8[0] = fTemp23;
630 fRec41[0] = ((fConst76 * ((fConst34 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
631 fRec40[0] = ((fConst77 * (fRec41[0] + fRec41[1])) + (fConst69 * fRec40[1]));
632 fRec39[0] = (fRec40[0] - (fConst67 * ((fConst65 * fRec39[2]) + (fConst63 * fRec39[1]))));
633 double fTemp24 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
634 fVec9[0] = fTemp24;
635 fRec38[0] = ((fConst79 * ((fConst78 * fVec9[1]) + (fConst55 * fVec9[0]))) + (fConst60 * fRec38[1]));
636 fRec37[0] = (fRec38[0] - (fConst58 * ((fConst56 * fRec37[2]) + (fConst54 * fRec37[1]))));
637 fRec36[0] = ((fConst58 * (((fConst53 * fRec37[0]) + (fConst80 * fRec37[1])) + (fConst53 * fRec37[2]))) - (fConst51 * ((fConst50 * fRec36[2]) + fTemp22)));
638 double fTemp25 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst51 * (fTemp22 + (fConst50 * fRec36[0])))))));
639 fRec46[0] = ((fConst79 * (fVec9[0] + fVec9[1])) + (fConst60 * fRec46[1]));
640 fRec45[0] = (fRec46[0] - (fConst58 * ((fConst56 * fRec45[2]) + (fConst54 * fRec45[1]))));
641 double fTemp26 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
642 fVec10[0] = fTemp26;
643 fRec44[0] = ((fConst86 * ((fConst85 * fVec10[1]) + (fConst49 * fVec10[0]))) + (fConst84 * fRec44[1]));
644 fRec43[0] = (fRec44[0] - (fConst82 * ((fConst81 * fRec43[2]) + (fConst48 * fRec43[1]))));
645 double fTemp27 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec43[0]) + (fConst87 * fRec43[1])) + (fConst47 * fRec43[2])))));
646 double fTemp28 = (fConst48 * fRec47[1]);
647 double fTemp29 = (fConst54 * fRec48[1]);
648 fRec50[0] = ((fConst77 * ((fConst90 * fRec41[1]) + (fConst64 * fRec41[0]))) + (fConst69 * fRec50[1]));
649 fRec49[0] = (fRec50[0] - (fConst67 * ((fConst65 * fRec49[2]) + (fConst63 * fRec49[1]))));
650 fRec48[0] = ((fConst67 * (((fConst62 * fRec49[0]) + (fConst91 * fRec49[1])) + (fConst62 * fRec49[2]))) - (fConst89 * ((fConst88 * fRec48[2]) + fTemp29)));
651 fRec47[0] = ((fRec48[2] + (fConst89 * (fTemp29 + (fConst88 * fRec48[0])))) - (fConst51 * ((fConst50 * fRec47[2]) + fTemp28)));
652 double fTemp30 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst51 * (fTemp28 + (fConst50 * fRec47[0])))))));
653 fRec52[0] = ((fConst86 * (fVec10[0] + fVec10[1])) + (fConst84 * fRec52[1]));
654 fRec51[0] = (fRec52[0] - (fConst82 * ((fConst81 * fRec51[2]) + (fConst48 * fRec51[1]))));
655 double fTemp31 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
656 double fTemp32 = ((1.2589412 * (fTemp31 * (1 - (0.3333333333333333 * faustpower<2>(fTemp31))))) + (1.584893192 * ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + ((fTemp27 * (1 - (0.3333333333333333 * faustpower<2>(fTemp27)))) + (0.8413951417869425 * (fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))))))));
657 fVec11[0] = fTemp32;
658 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
659 double fTemp33 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp21)) + (fTemp8 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp8))) - 1)))));
660 fVec12[0] = fTemp33;
661 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
662 double fTemp34 = (fRec7[0] * fRec6[0]);
663 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp34 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
664 fRec3[0] = ((fConst35 * ((fConst34 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
665 double fTemp35 = (1e-15 + (0.0041 * fRec54[1]));
666 fVec13[0] = fTemp35;
667 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
668 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp34) - 0.659760999999999)) - 89.08268292682925);
669 fRec53[0] = ((fConst35 * ((fConst34 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
670 double fTemp36 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
671 fVec14[0] = fTemp36;
672 fRec2[0] = (fConst93 * ((fVec14[2] + (fVec14[0] + (fConst92 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
673 fRec1[0] = (fConst95 * ((fRec2[2] + (fRec2[0] + (fConst94 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
674 fRec0[0] = (fConst97 * ((fRec1[2] + (fRec1[0] + (fConst96 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
675 output0[i] = (FAUSTFLOAT)fRec0[0];
676 double fTemp37 = (double)input1[i];
677 fVec15[0] = fTemp37;
678 fRec74[0] = (fConst29 * ((fVec15[0] - fVec15[1]) + (fConst28 * fRec74[1])));
679 fRec73[0] = (fConst29 * ((fRec74[0] - fRec74[1]) + (fConst28 * fRec73[1])));
680 fRec72[0] = (fRec73[0] - (fConst26 * ((fConst25 * fRec72[2]) + (fConst21 * fRec72[1]))));
681 fRec71[0] = ((fConst26 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1])))) - (fConst24 * ((fConst23 * fRec71[2]) + (fConst21 * fRec71[1]))));
682 double fTemp38 = (1e-15 + (0.027 * fRec70[1]));
683 fVec16[0] = fTemp38;
684 fRec75[0] = ((fConst33 * (fVec16[0] + fVec16[1])) + (fConst32 * fRec75[1]));
685 fRec70[0] = (Ftube(TUBE_TABLE_12AT7_68k, ((fRec75[0] + (fConst24 * (fRec22[0] * (fRec71[2] + (fRec71[0] + (2 * fRec71[1])))))) - 2.617752999999999)) - 153.04618518518518);
686 fRec69[0] = ((fConst35 * ((fConst34 * fRec70[1]) + (fConst13 * fRec70[0]))) + (fConst15 * fRec69[1]));
687 double fTemp39 = (1e-15 + (0.015 * fRec77[1]));
688 fVec17[0] = fTemp39;
689 fRec78[0] = ((fConst39 * (fVec17[0] + fVec17[1])) + (fConst38 * fRec78[1]));
690 fRec77[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec78[0] + fRec68[1]) - 1.8873329999999988)) - 124.17779999999999);
691 fRec76[0] = ((fConst35 * ((fConst34 * fRec77[1]) + (fConst13 * fRec77[0]))) + (fConst15 * fRec76[1]));
692 fRec68[0] = ((0.6 * fRec76[0]) + fRec69[0]);
693 fRec67[0] = ((fConst19 * (fRec68[0] + fRec68[1])) + (fConst18 * fRec67[1]));
694 double fTemp40 = (1e-15 + (0.015 * fRec66[1]));
695 fVec18[0] = fTemp40;
696 fRec79[0] = ((fConst39 * (fVec18[0] + fVec18[1])) + (fConst38 * fRec79[1]));
697 fRec66[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec79[0] + fRec67[0]) - 1.8873329999999988)) - 124.17779999999999);
698 fRec65[0] = ((fConst35 * ((fConst34 * fRec66[1]) + (fConst13 * fRec66[0]))) + (fConst15 * fRec65[1]));
699 double fTemp41 = (1e-15 + (0.0082 * fRec81[1]));
700 fVec19[0] = fTemp41;
701 fRec82[0] = ((fConst43 * (fVec19[0] + fVec19[1])) + (fConst42 * fRec82[1]));
702 fRec81[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec82[0] + fRec64[1]) - 1.2569619999999988)) - 96.7119512195122);
703 fRec80[0] = ((fConst35 * ((fConst34 * fRec81[1]) + (fConst13 * fRec81[0]))) + (fConst15 * fRec80[1]));
704 fRec64[0] = ((0.6 * fRec80[0]) + fRec65[0]);
705 double fTemp42 = (1e-15 + (0.0082 * fRec63[1]));
706 fVec20[0] = fTemp42;
707 fRec83[0] = ((fConst43 * (fVec20[0] + fVec20[1])) + (fConst42 * fRec83[1]));
708 fRec63[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec83[0] + fRec64[0]) - 1.2569619999999988)) - 96.7119512195122);
709 fRec62[0] = ((fConst35 * ((fConst34 * fRec63[1]) + (fConst13 * fRec63[0]))) + (fConst15 * fRec62[1]));
710 double fTemp43 = (fTemp1 * fRec62[0]);
711 double fTemp44 = (fRec8[0] * fRec62[0]);
712 double fTemp45 = fabs(fTemp44);
713 fRec86[0] = ((9.999999999998899e-05 * fTemp45) + (0.9999 * fRec86[1]));
714 double fTemp46 = max(fRec86[0], fTemp45);
715 fVec21[IOTA&32767] = fTemp46;
716 fRec85[0] = ((fVec21[IOTA&32767] + fRec85[1]) - fVec21[(IOTA-iConst44)&32767]);
717 fRec84[0] = ((fConst45 * fRec85[0]) + (0.999 * fRec84[1]));
718 double fTemp47 = max(-1.0, min(-0.01, (fVec21[IOTA&32767] - (1.0 + (1.02 * fRec84[0])))));
719 double fTemp48 = (0 - fTemp47);
720 double fTemp49 = (40.1 * fTemp48);
721 double fTemp50 = max(-600, fTemp49);
722 double fTemp51 = (0 - fTemp50);
723 double fTemp52 = (fTemp44 - fTemp47);
724 double fTemp53 = (40.1 * fTemp52);
725 double fTemp54 = max(-600, fTemp53);
726 double fTemp55 = (0 - fTemp54);
727 double fTemp56 = (((int((fabs(fTemp53) > 0.0001)))?((int((fTemp54 < -50)))?(exp(fTemp54) * fTemp55):(fTemp54 / (1 - exp(fTemp55)))):(1 + (fTemp52 * (20.05 + (134.00083333333336 * fTemp52))))) - ((int((fabs(fTemp49) > 0.0001)))?((int((fTemp50 < -50)))?(exp(fTemp50) * fTemp51):(fTemp50 / (1 - exp(fTemp51)))):(1 + (fTemp48 * (20.05 + (134.00083333333336 * fTemp48))))));
728 double fTemp57 = (fConst48 * fRec88[1]);
729 fRec94[0] = ((0.024937655860349125 * fTemp56) - (fConst75 * ((fConst73 * fRec94[2]) + (fConst71 * fRec94[1]))));
730 double fTemp58 = (fRec94[2] + (fRec94[0] + (2 * fRec94[1])));
731 fVec22[0] = fTemp58;
732 fRec93[0] = ((fConst76 * ((fConst34 * fVec22[1]) + (fConst13 * fVec22[0]))) + (fConst15 * fRec93[1]));
733 fRec92[0] = ((fConst77 * (fRec93[0] + fRec93[1])) + (fConst69 * fRec92[1]));
734 fRec91[0] = (fRec92[0] - (fConst67 * ((fConst65 * fRec91[2]) + (fConst63 * fRec91[1]))));
735 double fTemp59 = (fRec91[2] + (fRec91[0] + (2 * fRec91[1])));
736 fVec23[0] = fTemp59;
737 fRec90[0] = ((fConst79 * ((fConst78 * fVec23[1]) + (fConst55 * fVec23[0]))) + (fConst60 * fRec90[1]));
738 fRec89[0] = (fRec90[0] - (fConst58 * ((fConst56 * fRec89[2]) + (fConst54 * fRec89[1]))));
739 fRec88[0] = ((fConst58 * (((fConst53 * fRec89[0]) + (fConst80 * fRec89[1])) + (fConst53 * fRec89[2]))) - (fConst51 * ((fConst50 * fRec88[2]) + fTemp57)));
740 double fTemp60 = max(-1, min(1, (fSlow7 * (fRec88[2] + (fConst51 * (fTemp57 + (fConst50 * fRec88[0])))))));
741 fRec98[0] = ((fConst79 * (fVec23[0] + fVec23[1])) + (fConst60 * fRec98[1]));
742 fRec97[0] = (fRec98[0] - (fConst58 * ((fConst56 * fRec97[2]) + (fConst54 * fRec97[1]))));
743 double fTemp61 = (fRec97[2] + (fRec97[0] + (2 * fRec97[1])));
744 fVec24[0] = fTemp61;
745 fRec96[0] = ((fConst86 * ((fConst85 * fVec24[1]) + (fConst49 * fVec24[0]))) + (fConst84 * fRec96[1]));
746 fRec95[0] = (fRec96[0] - (fConst82 * ((fConst81 * fRec95[2]) + (fConst48 * fRec95[1]))));
747 double fTemp62 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec95[0]) + (fConst87 * fRec95[1])) + (fConst47 * fRec95[2])))));
748 double fTemp63 = (fConst48 * fRec99[1]);
749 double fTemp64 = (fConst54 * fRec100[1]);
750 fRec102[0] = ((fConst77 * ((fConst90 * fRec93[1]) + (fConst64 * fRec93[0]))) + (fConst69 * fRec102[1]));
751 fRec101[0] = (fRec102[0] - (fConst67 * ((fConst65 * fRec101[2]) + (fConst63 * fRec101[1]))));
752 fRec100[0] = ((fConst67 * (((fConst62 * fRec101[0]) + (fConst91 * fRec101[1])) + (fConst62 * fRec101[2]))) - (fConst89 * ((fConst88 * fRec100[2]) + fTemp64)));
753 fRec99[0] = ((fRec100[2] + (fConst89 * (fTemp64 + (fConst88 * fRec100[0])))) - (fConst51 * ((fConst50 * fRec99[2]) + fTemp63)));
754 double fTemp65 = max(-1, min(1, (fSlow9 * (fRec99[2] + (fConst51 * (fTemp63 + (fConst50 * fRec99[0])))))));
755 fRec104[0] = ((fConst86 * (fVec24[0] + fVec24[1])) + (fConst84 * fRec104[1]));
756 fRec103[0] = (fRec104[0] - (fConst82 * ((fConst81 * fRec103[2]) + (fConst48 * fRec103[1]))));
757 double fTemp66 = max(-1, min(1, (fSlow10 * (fRec103[2] + (fRec103[0] + (2 * fRec103[1]))))));
758 double fTemp67 = ((1.2589412 * (fTemp66 * (1 - (0.3333333333333333 * faustpower<2>(fTemp66))))) + (1.584893192 * ((fTemp65 * (1 - (0.3333333333333333 * faustpower<2>(fTemp65)))) + ((fTemp62 * (1 - (0.3333333333333333 * faustpower<2>(fTemp62)))) + (0.8413951417869425 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60)))))))));
759 fVec25[0] = fTemp67;
760 fRec87[0] = ((fConst19 * (fVec25[0] + fVec25[1])) + (fConst18 * fRec87[1]));
761 double fTemp68 = (((fSlow11 * fRec87[0]) + (fSlow6 * fTemp56)) + (fTemp43 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp43))) - 1)))));
762 fVec26[0] = fTemp68;
763 fRec61[0] = ((fConst19 * (fVec26[0] + fVec26[1])) + (fConst18 * fRec61[1]));
764 double fTemp69 = (fRec6[0] * fRec61[0]);
765 double fTemp70 = (1e-15 + (0.0041 * fRec60[1]));
766 fVec27[0] = fTemp70;
767 fRec105[0] = ((fConst19 * (fVec27[0] + fVec27[1])) + (fConst18 * fRec105[1]));
768 fRec60[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec105[0] + fTemp69) - 0.664540999999999)) - 87.91682926829267);
769 fRec59[0] = ((fConst35 * ((fConst34 * fRec60[1]) + (fConst13 * fRec60[0]))) + (fConst15 * fRec59[1]));
770 double fTemp71 = (1e-15 + (0.0041 * fRec107[1]));
771 fVec28[0] = fTemp71;
772 fRec108[0] = ((fConst19 * (fVec28[0] + fVec28[1])) + (fConst18 * fRec108[1]));
773 fRec107[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec108[0] + fTemp69) - 0.659760999999999)) - 89.08268292682925);
774 fRec106[0] = ((fConst35 * ((fConst34 * fRec107[1]) + (fConst13 * fRec107[0]))) + (fConst15 * fRec106[1]));
775 double fTemp72 = (min(0.7, fRec106[0]) + max(-0.75, fRec59[0]));
776 fVec29[0] = fTemp72;
777 fRec58[0] = (fConst93 * ((fVec29[2] + (fVec29[0] + (fConst92 * fVec29[1]))) + ((fConst12 * fRec58[2]) + (fConst10 * fRec58[1]))));
778 fRec57[0] = (fConst95 * ((fRec58[2] + (fRec58[0] + (fConst94 * fRec58[1]))) + ((fConst8 * fRec57[2]) + (fConst6 * fRec57[1]))));
779 fRec56[0] = (fConst97 * ((fRec57[2] + (fRec57[0] + (fConst96 * fRec57[1]))) + ((fConst4 * fRec56[2]) + (fConst2 * fRec56[1]))));
780 output1[i] = (FAUSTFLOAT)fRec56[0];
781 // post processing
782 fRec56[2] = fRec56[1]; fRec56[1] = fRec56[0];
783 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
784 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
785 fVec29[2] = fVec29[1]; fVec29[1] = fVec29[0];
786 fRec106[1] = fRec106[0];
787 fRec107[1] = fRec107[0];
788 fRec108[1] = fRec108[0];
789 fVec28[1] = fVec28[0];
790 fRec59[1] = fRec59[0];
791 fRec60[1] = fRec60[0];
792 fRec105[1] = fRec105[0];
793 fVec27[1] = fVec27[0];
794 fRec61[1] = fRec61[0];
795 fVec26[1] = fVec26[0];
796 fRec87[1] = fRec87[0];
797 fVec25[1] = fVec25[0];
798 fRec103[2] = fRec103[1]; fRec103[1] = fRec103[0];
799 fRec104[1] = fRec104[0];
800 fRec99[2] = fRec99[1]; fRec99[1] = fRec99[0];
801 fRec100[2] = fRec100[1]; fRec100[1] = fRec100[0];
802 fRec101[2] = fRec101[1]; fRec101[1] = fRec101[0];
803 fRec102[1] = fRec102[0];
804 fRec95[2] = fRec95[1]; fRec95[1] = fRec95[0];
805 fRec96[1] = fRec96[0];
806 fVec24[1] = fVec24[0];
807 fRec97[2] = fRec97[1]; fRec97[1] = fRec97[0];
808 fRec98[1] = fRec98[0];
809 fRec88[2] = fRec88[1]; fRec88[1] = fRec88[0];
810 fRec89[2] = fRec89[1]; fRec89[1] = fRec89[0];
811 fRec90[1] = fRec90[0];
812 fVec23[1] = fVec23[0];
813 fRec91[2] = fRec91[1]; fRec91[1] = fRec91[0];
814 fRec92[1] = fRec92[0];
815 fRec93[1] = fRec93[0];
816 fVec22[1] = fVec22[0];
817 fRec94[2] = fRec94[1]; fRec94[1] = fRec94[0];
818 fRec84[1] = fRec84[0];
819 fRec85[1] = fRec85[0];
820 fRec86[1] = fRec86[0];
821 fRec62[1] = fRec62[0];
822 fRec63[1] = fRec63[0];
823 fRec83[1] = fRec83[0];
824 fVec20[1] = fVec20[0];
825 fRec64[1] = fRec64[0];
826 fRec80[1] = fRec80[0];
827 fRec81[1] = fRec81[0];
828 fRec82[1] = fRec82[0];
829 fVec19[1] = fVec19[0];
830 fRec65[1] = fRec65[0];
831 fRec66[1] = fRec66[0];
832 fRec79[1] = fRec79[0];
833 fVec18[1] = fVec18[0];
834 fRec67[1] = fRec67[0];
835 fRec68[1] = fRec68[0];
836 fRec76[1] = fRec76[0];
837 fRec77[1] = fRec77[0];
838 fRec78[1] = fRec78[0];
839 fVec17[1] = fVec17[0];
840 fRec69[1] = fRec69[0];
841 fRec70[1] = fRec70[0];
842 fRec75[1] = fRec75[0];
843 fVec16[1] = fVec16[0];
844 fRec71[2] = fRec71[1]; fRec71[1] = fRec71[0];
845 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
846 fRec73[1] = fRec73[0];
847 fRec74[1] = fRec74[0];
848 fVec15[1] = fVec15[0];
849 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
850 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
851 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
852 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
853 fRec53[1] = fRec53[0];
854 fRec54[1] = fRec54[0];
855 fRec55[1] = fRec55[0];
856 fVec13[1] = fVec13[0];
857 fRec3[1] = fRec3[0];
858 fRec4[1] = fRec4[0];
859 fRec7[1] = fRec7[0];
860 fVec12[1] = fVec12[0];
861 fRec35[1] = fRec35[0];
862 fVec11[1] = fVec11[0];
863 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
864 fRec52[1] = fRec52[0];
865 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
866 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
867 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
868 fRec50[1] = fRec50[0];
869 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
870 fRec44[1] = fRec44[0];
871 fVec10[1] = fVec10[0];
872 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
873 fRec46[1] = fRec46[0];
874 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
875 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
876 fRec38[1] = fRec38[0];
877 fVec9[1] = fVec9[0];
878 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
879 fRec40[1] = fRec40[0];
880 fRec41[1] = fRec41[0];
881 fVec8[1] = fVec8[0];
882 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
883 fRec32[1] = fRec32[0];
884 fRec33[1] = fRec33[0];
885 IOTA = IOTA+1;
886 fRec34[1] = fRec34[0];
887 fRec9[1] = fRec9[0];
888 fRec10[1] = fRec10[0];
889 fRec31[1] = fRec31[0];
890 fVec6[1] = fVec6[0];
891 fRec11[1] = fRec11[0];
892 fRec28[1] = fRec28[0];
893 fRec29[1] = fRec29[0];
894 fRec30[1] = fRec30[0];
895 fVec5[1] = fVec5[0];
896 fRec12[1] = fRec12[0];
897 fRec13[1] = fRec13[0];
898 fRec27[1] = fRec27[0];
899 fVec4[1] = fVec4[0];
900 fRec14[1] = fRec14[0];
901 fRec15[1] = fRec15[0];
902 fRec24[1] = fRec24[0];
903 fRec25[1] = fRec25[0];
904 fRec26[1] = fRec26[0];
905 fVec3[1] = fVec3[0];
906 fRec16[1] = fRec16[0];
907 fRec17[1] = fRec17[0];
908 fRec23[1] = fRec23[0];
909 fVec2[1] = fVec2[0];
910 fRec22[1] = fRec22[0];
911 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
912 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
913 fRec20[1] = fRec20[0];
914 fRec21[1] = fRec21[0];
915 fVec1[1] = fVec1[0];
916 fRec8[1] = fRec8[0];
917 fRec6[1] = fRec6[0];
918 fRec5[1] = fRec5[0];
919 fVec0[1] = fVec0[0];
920 }
921 #undef fslider0
922 #undef fslider1
923 #undef fslider2
924 #undef fslider3
925 }
926
927 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
928 {
929 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
930 }
931
932
933 void Dsp::connect(uint32_t port,void* data)
934 {
935 switch ((PortIndex)port)
936 {
937 case DRIVE:
938 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
939 break;
940 case PREGAIN:
941 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
942 break;
943 case WET_DRY:
944 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
945 break;
946 case GAIN1:
947 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
948 break;
949 default:
950 break;
951 }
952 }
953
954 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
955 {
956 static_cast<Dsp*>(p)->connect(port, data);
957 }
958
959
960 PluginLV2 *plugin() {
961 return new Dsp();
962 }
963
964 void Dsp::del_instance(PluginLV2 *p)
965 {
966 delete static_cast<Dsp*>(p);
967 }
968
969 /*
970 typedef enum
971 {
972 DRIVE,
973 PREGAIN,
974 WET_DRY,
975 GAIN1,
976 } PortIndex;
977 */
978
979 } // end namespace gxamp16_stereo
0 // generated from file '../src/LV2/faust/gxamp17.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp17 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 void connect(uint32_t port,void* data);
144 void clear_state_f();
145 void init(uint32_t samplingFreq);
146 void compute(int count, float *input0, float *output0);
147
148 static void clear_state_f_static(PluginLV2*);
149 static void init_static(uint32_t samplingFreq, PluginLV2*);
150 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
151 static void del_instance(PluginLV2 *p);
152 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
153 public:
154 Dsp();
155 ~Dsp();
156 };
157
158
159
160 Dsp::Dsp()
161 : PluginLV2() {
162 version = PLUGINLV2_VERSION;
163 id = "12AT7 feedback";
164 name = N_("12AT7 feedback");
165 mono_audio = compute_static;
166 stereo_audio = 0;
167 set_samplerate = init_static;
168 activate_plugin = 0;
169 connect_ports = connect_static;
170 clear_state = clear_state_f_static;
171 delete_instance = del_instance;
172 }
173
174 Dsp::~Dsp() {
175 }
176
177 inline void Dsp::clear_state_f()
178 {
179 for (int i=0; i<2; i++) fRec0[i] = 0;
180 for (int i=0; i<2; i++) fRec8[i] = 0;
181 for (int i=0; i<2; i++) fRec22[i] = 0;
182 for (int i=0; i<32768; i++) fVec0[i] = 0;
183 for (int i=0; i<2; i++) fRec21[i] = 0;
184 for (int i=0; i<2; i++) fRec20[i] = 0;
185 for (int i=0; i<2; i++) fRec23[i] = 0;
186 for (int i=0; i<3; i++) fRec19[i] = 0;
187 for (int i=0; i<2; i++) fVec1[i] = 0;
188 for (int i=0; i<2; i++) fRec18[i] = 0;
189 for (int i=0; i<2; i++) fRec17[i] = 0;
190 for (int i=0; i<3; i++) fRec16[i] = 0;
191 for (int i=0; i<2; i++) fVec2[i] = 0;
192 for (int i=0; i<2; i++) fRec15[i] = 0;
193 for (int i=0; i<3; i++) fRec14[i] = 0;
194 for (int i=0; i<3; i++) fRec13[i] = 0;
195 for (int i=0; i<2; i++) fRec27[i] = 0;
196 for (int i=0; i<3; i++) fRec26[i] = 0;
197 for (int i=0; i<2; i++) fVec3[i] = 0;
198 for (int i=0; i<2; i++) fRec25[i] = 0;
199 for (int i=0; i<3; i++) fRec24[i] = 0;
200 for (int i=0; i<2; i++) fRec31[i] = 0;
201 for (int i=0; i<3; i++) fRec30[i] = 0;
202 for (int i=0; i<3; i++) fRec29[i] = 0;
203 for (int i=0; i<3; i++) fRec28[i] = 0;
204 for (int i=0; i<2; i++) fRec33[i] = 0;
205 for (int i=0; i<3; i++) fRec32[i] = 0;
206 for (int i=0; i<2; i++) fVec4[i] = 0;
207 for (int i=0; i<2; i++) fRec12[i] = 0;
208 for (int i=0; i<2; i++) fVec5[i] = 0;
209 for (int i=0; i<2; i++) fRec34[i] = 0;
210 for (int i=0; i<2; i++) fRec11[i] = 0;
211 for (int i=0; i<2; i++) fRec10[i] = 0;
212 for (int i=0; i<2; i++) fVec6[i] = 0;
213 for (int i=0; i<2; i++) fRec37[i] = 0;
214 for (int i=0; i<2; i++) fRec36[i] = 0;
215 for (int i=0; i<2; i++) fRec35[i] = 0;
216 for (int i=0; i<2; i++) fRec9[i] = 0;
217 for (int i=0; i<2; i++) fVec7[i] = 0;
218 for (int i=0; i<2; i++) fRec7[i] = 0;
219 for (int i=0; i<2; i++) fVec8[i] = 0;
220 for (int i=0; i<2; i++) fRec38[i] = 0;
221 for (int i=0; i<2; i++) fRec6[i] = 0;
222 for (int i=0; i<2; i++) fRec5[i] = 0;
223 for (int i=0; i<2; i++) fVec9[i] = 0;
224 for (int i=0; i<2; i++) fRec41[i] = 0;
225 for (int i=0; i<2; i++) fRec40[i] = 0;
226 for (int i=0; i<2; i++) fRec39[i] = 0;
227 for (int i=0; i<2; i++) fRec4[i] = 0;
228 for (int i=0; i<2; i++) fRec3[i] = 0;
229 for (int i=0; i<2; i++) fVec10[i] = 0;
230 for (int i=0; i<2; i++) fRec42[i] = 0;
231 for (int i=0; i<2; i++) fRec2[i] = 0;
232 for (int i=0; i<2; i++) fRec1[i] = 0;
233 }
234
235 void Dsp::clear_state_f_static(PluginLV2 *p)
236 {
237 static_cast<Dsp*>(p)->clear_state_f();
238 }
239
240 inline void Dsp::init(uint32_t samplingFreq)
241 {
242 fSamplingFreq = samplingFreq;
243 iConst0 = min(192000, max(1, fSamplingFreq));
244 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
245 fConst2 = (1 + fConst1);
246 fConst3 = (0 - ((1 - fConst1) / fConst2));
247 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
248 fConst5 = (1 + fConst4);
249 fConst6 = (0 - ((1 - fConst4) / fConst5));
250 fConst7 = tan((942.4777960769379 / iConst0));
251 fConst8 = (1.0 / faustpower<2>(fConst7));
252 fConst9 = (2 * (1 - fConst8));
253 fConst10 = (1.0 / fConst7);
254 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
255 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
256 fConst13 = tan((3769.9111843077517 / iConst0));
257 fConst14 = (1.0 / faustpower<2>(fConst13));
258 fConst15 = (2 * (1 - fConst14));
259 fConst16 = (1.0 / fConst13);
260 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
261 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
262 fConst19 = (1.0 / fConst18);
263 fConst20 = (1 + fConst16);
264 fConst21 = (0 - ((1 - fConst16) / fConst20));
265 fConst22 = tan((10053.096491487338 / iConst0));
266 fConst23 = (1.0 / faustpower<2>(fConst22));
267 fConst24 = (2 * (1 - fConst23));
268 fConst25 = (1.0 / fConst22);
269 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
270 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
271 fConst28 = (1.0 / fConst27);
272 fConst29 = (1 + fConst25);
273 fConst30 = (0 - ((1 - fConst25) / fConst29));
274 fConst31 = tan((47123.8898038469 / iConst0));
275 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
276 fConst33 = (1.0 / fConst31);
277 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
278 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
279 fConst36 = (1.0 / fConst35);
280 IOTA = 0;
281 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
282 fConst38 = (0.009000000000000008 / iConst0);
283 fConst39 = (0 - fConst1);
284 fConst40 = (1.0 / (fConst2 * fConst35));
285 fConst41 = (1.0 / fConst29);
286 fConst42 = (0 - fConst16);
287 fConst43 = (1.0 / (fConst20 * fConst27));
288 fConst44 = (2 * (0 - fConst14));
289 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
290 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
291 fConst47 = (1 + fConst10);
292 fConst48 = (0 - ((1 - fConst10) / fConst47));
293 fConst49 = (0 - fConst10);
294 fConst50 = (1.0 / (fConst47 * fConst18));
295 fConst51 = (2 * (0 - fConst8));
296 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
297 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
298 fConst54 = (0 - fConst25);
299 fConst55 = (2 * (0 - fConst23));
300 fConst56 = (1.0 / fConst5);
301 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
302 fConst58 = (1 + fConst57);
303 fConst59 = (0 - ((1 - fConst57) / fConst58));
304 fConst60 = (1.0 / fConst58);
305 fConst61 = (0.025 / fConst2);
306 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
307 fConst63 = (1 + fConst62);
308 fConst64 = (0 - ((1 - fConst62) / fConst63));
309 fConst65 = (1.0 / fConst63);
310 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
311 fConst67 = (1 + fConst66);
312 fConst68 = (0 - ((1 - fConst66) / fConst67));
313 fConst69 = (1.0 / fConst67);
314 clear_state_f();
315 }
316
317 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
318 {
319 static_cast<Dsp*>(p)->init(samplingFreq);
320 }
321
322 inline void Dsp::compute(int count, float *input0, float *output0)
323 {
324 #define fslider0 (*fslider0_)
325 #define fslider1 (*fslider1_)
326 #define fslider2 (*fslider2_)
327 #define fslider3 (*fslider3_)
328 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
329 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
330 double fSlow2 = (1.000000000000001e-05 * fslider2);
331 double fSlow3 = fslider3;
332 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
333 double fSlow5 = pow(1e+01,(2 * fSlow3));
334 double fSlow6 = (fConst46 * fSlow5);
335 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
336 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
337 double fSlow9 = (2 * (fSlow3 - 0.5));
338 double fSlow10 = (1 - max(0, (0 - fSlow9)));
339 double fSlow11 = (0.024937655860349125 * (1 - max(0, fSlow9)));
340 double fSlow12 = (1.25 * fSlow3);
341 for (int i=0; i<count; i++) {
342 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
343 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
344 double fTemp0 = (fConst9 * fRec13[1]);
345 double fTemp1 = (double)input0[i];
346 double fTemp2 = fabs(fTemp1);
347 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
348 double fTemp3 = max(fRec22[0], fTemp2);
349 fVec0[IOTA&32767] = fTemp3;
350 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
351 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
352 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
353 double fTemp5 = (0 - fTemp4);
354 double fTemp6 = (40.1 * fTemp5);
355 double fTemp7 = max(-600, fTemp6);
356 double fTemp8 = (0 - fTemp7);
357 double fTemp9 = (fTemp1 - fTemp4);
358 double fTemp10 = (40.1 * fTemp9);
359 double fTemp11 = max(-600, fTemp10);
360 double fTemp12 = (0 - fTemp11);
361 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
362 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
363 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
364 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
365 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
366 fVec1[0] = fTemp15;
367 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
368 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
369 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
370 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
371 fVec2[0] = fTemp16;
372 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
373 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
374 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
375 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
376 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
377 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
378 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
379 fVec3[0] = fTemp18;
380 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
381 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
382 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
383 double fTemp20 = (fConst9 * fRec28[1]);
384 double fTemp21 = (fConst15 * fRec29[1]);
385 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
386 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
387 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
388 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
389 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
390 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
391 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
392 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
393 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
394 fVec4[0] = fTemp24;
395 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
396 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
397 fVec5[0] = fTemp25;
398 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
399 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
400 double fTemp27 = (1 - fRec23[0]);
401 fRec11[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fTemp13 * ((fTemp27 * (0.024937655860349125 + (fSlow12 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))) + (fSlow11 * fRec23[0]))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 2.617752999999999)) - 153.04618518518518);
402 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
403 double fTemp28 = (1e-15 + (0.015 * fRec36[1]));
404 fVec6[0] = fTemp28;
405 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
406 fRec36[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec37[0] + fRec9[1]) - 1.887331999999999)) - 124.17786666666666);
407 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
408 fRec9[0] = ((0.6 * fRec35[0]) - fRec10[0]);
409 double fTemp29 = (fRec9[0] * fRec8[0]);
410 fVec7[0] = fTemp29;
411 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
412 double fTemp30 = (1e-15 + (0.015 * fRec6[1]));
413 fVec8[0] = fTemp30;
414 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
415 fRec6[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec38[0] + fRec7[0]) - 1.887331999999999)) - 124.17786666666666);
416 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
417 double fTemp31 = (1e-15 + (0.0082 * fRec40[1]));
418 fVec9[0] = fTemp31;
419 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
420 fRec40[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec41[0] + fRec4[1]) - 1.2569619999999988)) - 96.7119512195122);
421 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
422 fRec4[0] = ((0.6 * fRec39[0]) + fRec5[0]);
423 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
424 double fTemp32 = (1e-15 + (0.0082 * fRec2[1]));
425 fVec10[0] = fTemp32;
426 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
427 fRec2[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec42[0] + fRec3[0]) - 1.2569619999999988)) - 96.7119512195122);
428 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
429 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
430 // post processing
431 fRec1[1] = fRec1[0];
432 fRec2[1] = fRec2[0];
433 fRec42[1] = fRec42[0];
434 fVec10[1] = fVec10[0];
435 fRec3[1] = fRec3[0];
436 fRec4[1] = fRec4[0];
437 fRec39[1] = fRec39[0];
438 fRec40[1] = fRec40[0];
439 fRec41[1] = fRec41[0];
440 fVec9[1] = fVec9[0];
441 fRec5[1] = fRec5[0];
442 fRec6[1] = fRec6[0];
443 fRec38[1] = fRec38[0];
444 fVec8[1] = fVec8[0];
445 fRec7[1] = fRec7[0];
446 fVec7[1] = fVec7[0];
447 fRec9[1] = fRec9[0];
448 fRec35[1] = fRec35[0];
449 fRec36[1] = fRec36[0];
450 fRec37[1] = fRec37[0];
451 fVec6[1] = fVec6[0];
452 fRec10[1] = fRec10[0];
453 fRec11[1] = fRec11[0];
454 fRec34[1] = fRec34[0];
455 fVec5[1] = fVec5[0];
456 fRec12[1] = fRec12[0];
457 fVec4[1] = fVec4[0];
458 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
459 fRec33[1] = fRec33[0];
460 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
461 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
462 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
463 fRec31[1] = fRec31[0];
464 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
465 fRec25[1] = fRec25[0];
466 fVec3[1] = fVec3[0];
467 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
468 fRec27[1] = fRec27[0];
469 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
470 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
471 fRec15[1] = fRec15[0];
472 fVec2[1] = fVec2[0];
473 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
474 fRec17[1] = fRec17[0];
475 fRec18[1] = fRec18[0];
476 fVec1[1] = fVec1[0];
477 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
478 fRec23[1] = fRec23[0];
479 fRec20[1] = fRec20[0];
480 fRec21[1] = fRec21[0];
481 IOTA = IOTA+1;
482 fRec22[1] = fRec22[0];
483 fRec8[1] = fRec8[0];
484 fRec0[1] = fRec0[0];
485 }
486 #undef fslider0
487 #undef fslider1
488 #undef fslider2
489 #undef fslider3
490 }
491
492 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
493 {
494 static_cast<Dsp*>(p)->compute(count, input0, output0);
495 }
496
497
498 void Dsp::connect(uint32_t port,void* data)
499 {
500 switch ((PortIndex)port)
501 {
502 case DRIVE:
503 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
504 break;
505 case WET_DRY:
506 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
507 break;
508 case PREGAIN:
509 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
510 break;
511 case GAIN1:
512 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
513 break;
514 default:
515 break;
516 }
517 }
518
519 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
520 {
521 static_cast<Dsp*>(p)->connect(port, data);
522 }
523
524
525 PluginLV2 *plugin() {
526 return new Dsp();
527 }
528
529 void Dsp::del_instance(PluginLV2 *p)
530 {
531 delete static_cast<Dsp*>(p);
532 }
533
534 /*
535 typedef enum
536 {
537 DRIVE,
538 WET_DRY,
539 PREGAIN,
540 GAIN1,
541 } PortIndex;
542 */
543
544 } // end namespace gxamp17
0 // generated from file '../src/LV2/faust/gxamp17_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp17_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 double fRec63[2];
144 double fVec11[32768];
145 double fRec62[2];
146 double fRec61[2];
147 double fRec60[3];
148 double fVec12[2];
149 double fRec59[2];
150 double fRec58[2];
151 double fRec57[3];
152 double fVec13[2];
153 double fRec56[2];
154 double fRec55[3];
155 double fRec54[3];
156 double fRec67[2];
157 double fRec66[3];
158 double fVec14[2];
159 double fRec65[2];
160 double fRec64[3];
161 double fRec71[2];
162 double fRec70[3];
163 double fRec69[3];
164 double fRec68[3];
165 double fRec73[2];
166 double fRec72[3];
167 double fVec15[2];
168 double fRec53[2];
169 double fVec16[2];
170 double fRec74[2];
171 double fRec52[2];
172 double fRec51[2];
173 double fVec17[2];
174 double fRec77[2];
175 double fRec76[2];
176 double fRec75[2];
177 double fRec50[2];
178 double fVec18[2];
179 double fRec49[2];
180 double fVec19[2];
181 double fRec78[2];
182 double fRec48[2];
183 double fRec47[2];
184 double fVec20[2];
185 double fRec81[2];
186 double fRec80[2];
187 double fRec79[2];
188 double fRec46[2];
189 double fRec45[2];
190 double fVec21[2];
191 double fRec82[2];
192 double fRec44[2];
193 double fRec43[2];
194 void connect(uint32_t port,void* data);
195 void clear_state_f();
196 void init(uint32_t samplingFreq);
197 void compute(int count, float *input0, float *input1, float *output0, float *output1);
198
199 static void clear_state_f_static(PluginLV2*);
200 static void init_static(uint32_t samplingFreq, PluginLV2*);
201 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
202 static void del_instance(PluginLV2 *p);
203 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
204 public:
205 Dsp();
206 ~Dsp();
207 };
208
209
210
211 Dsp::Dsp()
212 : PluginLV2() {
213 version = PLUGINLV2_VERSION;
214 id = "12AT7 feedback";
215 name = N_("12AT7 feedback");
216 mono_audio = 0;
217 stereo_audio = compute_static;
218 set_samplerate = init_static;
219 activate_plugin = 0;
220 connect_ports = connect_static;
221 clear_state = clear_state_f_static;
222 delete_instance = del_instance;
223 }
224
225 Dsp::~Dsp() {
226 }
227
228 inline void Dsp::clear_state_f()
229 {
230 for (int i=0; i<2; i++) fRec0[i] = 0;
231 for (int i=0; i<2; i++) fRec8[i] = 0;
232 for (int i=0; i<2; i++) fRec22[i] = 0;
233 for (int i=0; i<32768; i++) fVec0[i] = 0;
234 for (int i=0; i<2; i++) fRec21[i] = 0;
235 for (int i=0; i<2; i++) fRec20[i] = 0;
236 for (int i=0; i<2; i++) fRec23[i] = 0;
237 for (int i=0; i<3; i++) fRec19[i] = 0;
238 for (int i=0; i<2; i++) fVec1[i] = 0;
239 for (int i=0; i<2; i++) fRec18[i] = 0;
240 for (int i=0; i<2; i++) fRec17[i] = 0;
241 for (int i=0; i<3; i++) fRec16[i] = 0;
242 for (int i=0; i<2; i++) fVec2[i] = 0;
243 for (int i=0; i<2; i++) fRec15[i] = 0;
244 for (int i=0; i<3; i++) fRec14[i] = 0;
245 for (int i=0; i<3; i++) fRec13[i] = 0;
246 for (int i=0; i<2; i++) fRec27[i] = 0;
247 for (int i=0; i<3; i++) fRec26[i] = 0;
248 for (int i=0; i<2; i++) fVec3[i] = 0;
249 for (int i=0; i<2; i++) fRec25[i] = 0;
250 for (int i=0; i<3; i++) fRec24[i] = 0;
251 for (int i=0; i<2; i++) fRec31[i] = 0;
252 for (int i=0; i<3; i++) fRec30[i] = 0;
253 for (int i=0; i<3; i++) fRec29[i] = 0;
254 for (int i=0; i<3; i++) fRec28[i] = 0;
255 for (int i=0; i<2; i++) fRec33[i] = 0;
256 for (int i=0; i<3; i++) fRec32[i] = 0;
257 for (int i=0; i<2; i++) fVec4[i] = 0;
258 for (int i=0; i<2; i++) fRec12[i] = 0;
259 for (int i=0; i<2; i++) fVec5[i] = 0;
260 for (int i=0; i<2; i++) fRec34[i] = 0;
261 for (int i=0; i<2; i++) fRec11[i] = 0;
262 for (int i=0; i<2; i++) fRec10[i] = 0;
263 for (int i=0; i<2; i++) fVec6[i] = 0;
264 for (int i=0; i<2; i++) fRec37[i] = 0;
265 for (int i=0; i<2; i++) fRec36[i] = 0;
266 for (int i=0; i<2; i++) fRec35[i] = 0;
267 for (int i=0; i<2; i++) fRec9[i] = 0;
268 for (int i=0; i<2; i++) fVec7[i] = 0;
269 for (int i=0; i<2; i++) fRec7[i] = 0;
270 for (int i=0; i<2; i++) fVec8[i] = 0;
271 for (int i=0; i<2; i++) fRec38[i] = 0;
272 for (int i=0; i<2; i++) fRec6[i] = 0;
273 for (int i=0; i<2; i++) fRec5[i] = 0;
274 for (int i=0; i<2; i++) fVec9[i] = 0;
275 for (int i=0; i<2; i++) fRec41[i] = 0;
276 for (int i=0; i<2; i++) fRec40[i] = 0;
277 for (int i=0; i<2; i++) fRec39[i] = 0;
278 for (int i=0; i<2; i++) fRec4[i] = 0;
279 for (int i=0; i<2; i++) fRec3[i] = 0;
280 for (int i=0; i<2; i++) fVec10[i] = 0;
281 for (int i=0; i<2; i++) fRec42[i] = 0;
282 for (int i=0; i<2; i++) fRec2[i] = 0;
283 for (int i=0; i<2; i++) fRec1[i] = 0;
284 for (int i=0; i<2; i++) fRec63[i] = 0;
285 for (int i=0; i<32768; i++) fVec11[i] = 0;
286 for (int i=0; i<2; i++) fRec62[i] = 0;
287 for (int i=0; i<2; i++) fRec61[i] = 0;
288 for (int i=0; i<3; i++) fRec60[i] = 0;
289 for (int i=0; i<2; i++) fVec12[i] = 0;
290 for (int i=0; i<2; i++) fRec59[i] = 0;
291 for (int i=0; i<2; i++) fRec58[i] = 0;
292 for (int i=0; i<3; i++) fRec57[i] = 0;
293 for (int i=0; i<2; i++) fVec13[i] = 0;
294 for (int i=0; i<2; i++) fRec56[i] = 0;
295 for (int i=0; i<3; i++) fRec55[i] = 0;
296 for (int i=0; i<3; i++) fRec54[i] = 0;
297 for (int i=0; i<2; i++) fRec67[i] = 0;
298 for (int i=0; i<3; i++) fRec66[i] = 0;
299 for (int i=0; i<2; i++) fVec14[i] = 0;
300 for (int i=0; i<2; i++) fRec65[i] = 0;
301 for (int i=0; i<3; i++) fRec64[i] = 0;
302 for (int i=0; i<2; i++) fRec71[i] = 0;
303 for (int i=0; i<3; i++) fRec70[i] = 0;
304 for (int i=0; i<3; i++) fRec69[i] = 0;
305 for (int i=0; i<3; i++) fRec68[i] = 0;
306 for (int i=0; i<2; i++) fRec73[i] = 0;
307 for (int i=0; i<3; i++) fRec72[i] = 0;
308 for (int i=0; i<2; i++) fVec15[i] = 0;
309 for (int i=0; i<2; i++) fRec53[i] = 0;
310 for (int i=0; i<2; i++) fVec16[i] = 0;
311 for (int i=0; i<2; i++) fRec74[i] = 0;
312 for (int i=0; i<2; i++) fRec52[i] = 0;
313 for (int i=0; i<2; i++) fRec51[i] = 0;
314 for (int i=0; i<2; i++) fVec17[i] = 0;
315 for (int i=0; i<2; i++) fRec77[i] = 0;
316 for (int i=0; i<2; i++) fRec76[i] = 0;
317 for (int i=0; i<2; i++) fRec75[i] = 0;
318 for (int i=0; i<2; i++) fRec50[i] = 0;
319 for (int i=0; i<2; i++) fVec18[i] = 0;
320 for (int i=0; i<2; i++) fRec49[i] = 0;
321 for (int i=0; i<2; i++) fVec19[i] = 0;
322 for (int i=0; i<2; i++) fRec78[i] = 0;
323 for (int i=0; i<2; i++) fRec48[i] = 0;
324 for (int i=0; i<2; i++) fRec47[i] = 0;
325 for (int i=0; i<2; i++) fVec20[i] = 0;
326 for (int i=0; i<2; i++) fRec81[i] = 0;
327 for (int i=0; i<2; i++) fRec80[i] = 0;
328 for (int i=0; i<2; i++) fRec79[i] = 0;
329 for (int i=0; i<2; i++) fRec46[i] = 0;
330 for (int i=0; i<2; i++) fRec45[i] = 0;
331 for (int i=0; i<2; i++) fVec21[i] = 0;
332 for (int i=0; i<2; i++) fRec82[i] = 0;
333 for (int i=0; i<2; i++) fRec44[i] = 0;
334 for (int i=0; i<2; i++) fRec43[i] = 0;
335 }
336
337 void Dsp::clear_state_f_static(PluginLV2 *p)
338 {
339 static_cast<Dsp*>(p)->clear_state_f();
340 }
341
342 inline void Dsp::init(uint32_t samplingFreq)
343 {
344 fSamplingFreq = samplingFreq;
345 iConst0 = min(192000, max(1, fSamplingFreq));
346 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
347 fConst2 = (1 + fConst1);
348 fConst3 = (0 - ((1 - fConst1) / fConst2));
349 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
350 fConst5 = (1 + fConst4);
351 fConst6 = (0 - ((1 - fConst4) / fConst5));
352 fConst7 = tan((942.4777960769379 / iConst0));
353 fConst8 = (1.0 / faustpower<2>(fConst7));
354 fConst9 = (2 * (1 - fConst8));
355 fConst10 = (1.0 / fConst7);
356 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
357 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
358 fConst13 = tan((3769.9111843077517 / iConst0));
359 fConst14 = (1.0 / faustpower<2>(fConst13));
360 fConst15 = (2 * (1 - fConst14));
361 fConst16 = (1.0 / fConst13);
362 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
363 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
364 fConst19 = (1.0 / fConst18);
365 fConst20 = (1 + fConst16);
366 fConst21 = (0 - ((1 - fConst16) / fConst20));
367 fConst22 = tan((10053.096491487338 / iConst0));
368 fConst23 = (1.0 / faustpower<2>(fConst22));
369 fConst24 = (2 * (1 - fConst23));
370 fConst25 = (1.0 / fConst22);
371 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
372 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
373 fConst28 = (1.0 / fConst27);
374 fConst29 = (1 + fConst25);
375 fConst30 = (0 - ((1 - fConst25) / fConst29));
376 fConst31 = tan((47123.8898038469 / iConst0));
377 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
378 fConst33 = (1.0 / fConst31);
379 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
380 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
381 fConst36 = (1.0 / fConst35);
382 IOTA = 0;
383 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
384 fConst38 = (0.009000000000000008 / iConst0);
385 fConst39 = (0 - fConst1);
386 fConst40 = (1.0 / (fConst2 * fConst35));
387 fConst41 = (1.0 / fConst29);
388 fConst42 = (0 - fConst16);
389 fConst43 = (1.0 / (fConst20 * fConst27));
390 fConst44 = (2 * (0 - fConst14));
391 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
392 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
393 fConst47 = (1 + fConst10);
394 fConst48 = (0 - ((1 - fConst10) / fConst47));
395 fConst49 = (0 - fConst10);
396 fConst50 = (1.0 / (fConst47 * fConst18));
397 fConst51 = (2 * (0 - fConst8));
398 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
399 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
400 fConst54 = (0 - fConst25);
401 fConst55 = (2 * (0 - fConst23));
402 fConst56 = (1.0 / fConst5);
403 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
404 fConst58 = (1 + fConst57);
405 fConst59 = (0 - ((1 - fConst57) / fConst58));
406 fConst60 = (1.0 / fConst58);
407 fConst61 = (0.025 / fConst2);
408 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
409 fConst63 = (1 + fConst62);
410 fConst64 = (0 - ((1 - fConst62) / fConst63));
411 fConst65 = (1.0 / fConst63);
412 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
413 fConst67 = (1 + fConst66);
414 fConst68 = (0 - ((1 - fConst66) / fConst67));
415 fConst69 = (1.0 / fConst67);
416 clear_state_f();
417 }
418
419 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
420 {
421 static_cast<Dsp*>(p)->init(samplingFreq);
422 }
423
424 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
425 {
426 #define fslider0 (*fslider0_)
427 #define fslider1 (*fslider1_)
428 #define fslider2 (*fslider2_)
429 #define fslider3 (*fslider3_)
430 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
431 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
432 double fSlow2 = (1.000000000000001e-05 * fslider2);
433 double fSlow3 = fslider3;
434 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
435 double fSlow5 = pow(1e+01,(2 * fSlow3));
436 double fSlow6 = (fConst46 * fSlow5);
437 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
438 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
439 double fSlow9 = (2 * (fSlow3 - 0.5));
440 double fSlow10 = (1 - max(0, (0 - fSlow9)));
441 double fSlow11 = (1.25 * fSlow3);
442 double fSlow12 = (0.024937655860349125 * (1 - max(0, fSlow9)));
443 for (int i=0; i<count; i++) {
444 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
445 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
446 double fTemp0 = (fConst9 * fRec13[1]);
447 double fTemp1 = (double)input0[i];
448 double fTemp2 = fabs(fTemp1);
449 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
450 double fTemp3 = max(fRec22[0], fTemp2);
451 fVec0[IOTA&32767] = fTemp3;
452 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
453 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
454 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
455 double fTemp5 = (0 - fTemp4);
456 double fTemp6 = (40.1 * fTemp5);
457 double fTemp7 = max(-600, fTemp6);
458 double fTemp8 = (0 - fTemp7);
459 double fTemp9 = (fTemp1 - fTemp4);
460 double fTemp10 = (40.1 * fTemp9);
461 double fTemp11 = max(-600, fTemp10);
462 double fTemp12 = (0 - fTemp11);
463 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
464 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
465 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
466 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
467 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
468 fVec1[0] = fTemp15;
469 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
470 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
471 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
472 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
473 fVec2[0] = fTemp16;
474 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
475 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
476 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
477 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
478 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
479 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
480 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
481 fVec3[0] = fTemp18;
482 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
483 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
484 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
485 double fTemp20 = (fConst9 * fRec28[1]);
486 double fTemp21 = (fConst15 * fRec29[1]);
487 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
488 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
489 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
490 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
491 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
492 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
493 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
494 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
495 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
496 fVec4[0] = fTemp24;
497 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
498 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
499 fVec5[0] = fTemp25;
500 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
501 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
502 double fTemp27 = (1 - fRec23[0]);
503 double fTemp28 = (fSlow12 * fRec23[0]);
504 fRec11[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fTemp13 * (fTemp28 + (fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 2.617752999999999)) - 153.04618518518518);
505 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
506 double fTemp29 = (1e-15 + (0.015 * fRec36[1]));
507 fVec6[0] = fTemp29;
508 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
509 fRec36[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec37[0] + fRec9[1]) - 1.887331999999999)) - 124.17786666666666);
510 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
511 fRec9[0] = ((0.6 * fRec35[0]) - fRec10[0]);
512 double fTemp30 = (fRec9[0] * fRec8[0]);
513 fVec7[0] = fTemp30;
514 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
515 double fTemp31 = (1e-15 + (0.015 * fRec6[1]));
516 fVec8[0] = fTemp31;
517 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
518 fRec6[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec38[0] + fRec7[0]) - 1.887331999999999)) - 124.17786666666666);
519 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
520 double fTemp32 = (1e-15 + (0.0082 * fRec40[1]));
521 fVec9[0] = fTemp32;
522 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
523 fRec40[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec41[0] + fRec4[1]) - 1.2569619999999988)) - 96.7119512195122);
524 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
525 fRec4[0] = ((0.6 * fRec39[0]) + fRec5[0]);
526 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
527 double fTemp33 = (1e-15 + (0.0082 * fRec2[1]));
528 fVec10[0] = fTemp33;
529 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
530 fRec2[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec42[0] + fRec3[0]) - 1.2569619999999988)) - 96.7119512195122);
531 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
532 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
533 double fTemp34 = (fConst9 * fRec54[1]);
534 double fTemp35 = (double)input1[i];
535 double fTemp36 = fabs(fTemp35);
536 fRec63[0] = ((9.999999999998899e-05 * fTemp36) + (0.9999 * fRec63[1]));
537 double fTemp37 = max(fRec63[0], fTemp36);
538 fVec11[IOTA&32767] = fTemp37;
539 fRec62[0] = ((fVec11[IOTA&32767] + fRec62[1]) - fVec11[(IOTA-iConst37)&32767]);
540 fRec61[0] = ((fConst38 * fRec62[0]) + (0.999 * fRec61[1]));
541 double fTemp38 = max(-1, min(-0.01, (fVec11[IOTA&32767] - (1.0 + (1.02 * fRec61[0])))));
542 double fTemp39 = (0 - fTemp38);
543 double fTemp40 = (40.1 * fTemp39);
544 double fTemp41 = max(-600, fTemp40);
545 double fTemp42 = (0 - fTemp41);
546 double fTemp43 = (fTemp35 - fTemp38);
547 double fTemp44 = (40.1 * fTemp43);
548 double fTemp45 = max(-600, fTemp44);
549 double fTemp46 = (0 - fTemp45);
550 double fTemp47 = (((int((fabs(fTemp44) > 0.0001)))?((int((fTemp45 < -50)))?(exp(fTemp45) * fTemp46):(fTemp45 / (1 - exp(fTemp46)))):(1 + (fTemp43 * (20.05 + (134.00083333333336 * fTemp43))))) - ((int((fabs(fTemp40) > 0.0001)))?((int((fTemp41 < -50)))?(exp(fTemp41) * fTemp42):(fTemp41 / (1 - exp(fTemp42)))):(1 + (fTemp39 * (20.05 + (134.00083333333336 * fTemp39))))));
551 double fTemp48 = (0.024937655860349125 * (fRec23[0] * fTemp47));
552 fRec60[0] = (fTemp48 - (fConst36 * ((fConst34 * fRec60[2]) + (fConst32 * fRec60[1]))));
553 double fTemp49 = (fRec60[2] + (fRec60[0] + (2 * fRec60[1])));
554 fVec12[0] = fTemp49;
555 fRec59[0] = ((fConst40 * ((fConst39 * fVec12[1]) + (fConst1 * fVec12[0]))) + (fConst3 * fRec59[1]));
556 fRec58[0] = ((fConst41 * (fRec59[0] + fRec59[1])) + (fConst30 * fRec58[1]));
557 fRec57[0] = (fRec58[0] - (fConst28 * ((fConst26 * fRec57[2]) + (fConst24 * fRec57[1]))));
558 double fTemp50 = (fRec57[2] + (fRec57[0] + (2 * fRec57[1])));
559 fVec13[0] = fTemp50;
560 fRec56[0] = ((fConst43 * ((fConst42 * fVec13[1]) + (fConst16 * fVec13[0]))) + (fConst21 * fRec56[1]));
561 fRec55[0] = (fRec56[0] - (fConst19 * ((fConst17 * fRec55[2]) + (fConst15 * fRec55[1]))));
562 fRec54[0] = ((fConst19 * (((fConst14 * fRec55[0]) + (fConst44 * fRec55[1])) + (fConst14 * fRec55[2]))) - (fConst12 * ((fConst11 * fRec54[2]) + fTemp34)));
563 double fTemp51 = max(-1, min(1, (fSlow4 * (fRec54[2] + (fConst12 * (fTemp34 + (fConst11 * fRec54[0])))))));
564 fRec67[0] = ((fConst43 * (fVec13[0] + fVec13[1])) + (fConst21 * fRec67[1]));
565 fRec66[0] = (fRec67[0] - (fConst19 * ((fConst17 * fRec66[2]) + (fConst15 * fRec66[1]))));
566 double fTemp52 = (fRec66[2] + (fRec66[0] + (2 * fRec66[1])));
567 fVec14[0] = fTemp52;
568 fRec65[0] = ((fConst50 * ((fConst49 * fVec14[1]) + (fConst10 * fVec14[0]))) + (fConst48 * fRec65[1]));
569 fRec64[0] = (fRec65[0] - (fConst46 * ((fConst45 * fRec64[2]) + (fConst9 * fRec64[1]))));
570 double fTemp53 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec64[0]) + (fConst51 * fRec64[1])) + (fConst8 * fRec64[2])))));
571 double fTemp54 = (fConst9 * fRec68[1]);
572 double fTemp55 = (fConst15 * fRec69[1]);
573 fRec71[0] = ((fConst41 * ((fConst54 * fRec59[1]) + (fConst25 * fRec59[0]))) + (fConst30 * fRec71[1]));
574 fRec70[0] = (fRec71[0] - (fConst28 * ((fConst26 * fRec70[2]) + (fConst24 * fRec70[1]))));
575 fRec69[0] = ((fConst28 * (((fConst23 * fRec70[0]) + (fConst55 * fRec70[1])) + (fConst23 * fRec70[2]))) - (fConst53 * ((fConst52 * fRec69[2]) + fTemp55)));
576 fRec68[0] = ((fRec69[2] + (fConst53 * (fTemp55 + (fConst52 * fRec69[0])))) - (fConst12 * ((fConst11 * fRec68[2]) + fTemp54)));
577 double fTemp56 = max(-1, min(1, (fSlow7 * (fRec68[2] + (fConst12 * (fTemp54 + (fConst11 * fRec68[0])))))));
578 fRec73[0] = ((fConst50 * (fVec14[0] + fVec14[1])) + (fConst48 * fRec73[1]));
579 fRec72[0] = (fRec73[0] - (fConst46 * ((fConst45 * fRec72[2]) + (fConst9 * fRec72[1]))));
580 double fTemp57 = max(-1, min(1, (fSlow8 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1]))))));
581 double fTemp58 = ((1.2589412 * (fTemp57 * (1 - (0.3333333333333333 * faustpower<2>(fTemp57))))) + (1.584893192 * ((fTemp56 * (1 - (0.3333333333333333 * faustpower<2>(fTemp56)))) + ((fTemp53 * (1 - (0.3333333333333333 * faustpower<2>(fTemp53)))) + (0.8413951417869425 * (fTemp51 * (1 - (0.3333333333333333 * faustpower<2>(fTemp51)))))))));
582 fVec15[0] = fTemp58;
583 fRec53[0] = ((fConst56 * (fVec15[0] + fVec15[1])) + (fConst6 * fRec53[1]));
584 double fTemp59 = (1e-15 + (0.027 * fRec52[1]));
585 fVec16[0] = fTemp59;
586 fRec74[0] = ((fConst60 * (fVec16[0] + fVec16[1])) + (fConst59 * fRec74[1]));
587 double fTemp60 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp48)))));
588 fRec52[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fTemp47 * ((fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp47))))) - 0.024937655860349125)))) + fTemp28)) + ((0.5 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60))))) + (fRec74[0] + (fSlow10 * fRec53[0])))) - 2.617752999999999)) - 153.04618518518518);
589 fRec51[0] = ((fConst61 * ((fConst39 * fRec52[1]) + (fConst1 * fRec52[0]))) + (fConst3 * fRec51[1]));
590 double fTemp61 = (1e-15 + (0.015 * fRec76[1]));
591 fVec17[0] = fTemp61;
592 fRec77[0] = ((fConst65 * (fVec17[0] + fVec17[1])) + (fConst64 * fRec77[1]));
593 fRec76[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec77[0] + fRec50[1]) - 1.887331999999999)) - 124.17786666666666);
594 fRec75[0] = ((fConst61 * ((fConst39 * fRec76[1]) + (fConst1 * fRec76[0]))) + (fConst3 * fRec75[1]));
595 fRec50[0] = ((0.6 * fRec75[0]) - fRec51[0]);
596 double fTemp62 = (fRec8[0] * fRec50[0]);
597 fVec18[0] = fTemp62;
598 fRec49[0] = ((fConst56 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec49[1]));
599 double fTemp63 = (1e-15 + (0.015 * fRec48[1]));
600 fVec19[0] = fTemp63;
601 fRec78[0] = ((fConst65 * (fVec19[0] + fVec19[1])) + (fConst64 * fRec78[1]));
602 fRec48[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec78[0] + fRec49[0]) - 1.887331999999999)) - 124.17786666666666);
603 fRec47[0] = ((fConst61 * ((fConst39 * fRec48[1]) + (fConst1 * fRec48[0]))) + (fConst3 * fRec47[1]));
604 double fTemp64 = (1e-15 + (0.0082 * fRec80[1]));
605 fVec20[0] = fTemp64;
606 fRec81[0] = ((fConst69 * (fVec20[0] + fVec20[1])) + (fConst68 * fRec81[1]));
607 fRec80[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec81[0] + fRec46[1]) - 1.2569619999999988)) - 96.7119512195122);
608 fRec79[0] = ((fConst61 * ((fConst39 * fRec80[1]) + (fConst1 * fRec80[0]))) + (fConst3 * fRec79[1]));
609 fRec46[0] = ((0.6 * fRec79[0]) + fRec47[0]);
610 fRec45[0] = ((fConst56 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
611 double fTemp65 = (1e-15 + (0.0082 * fRec44[1]));
612 fVec21[0] = fTemp65;
613 fRec82[0] = ((fConst69 * (fVec21[0] + fVec21[1])) + (fConst68 * fRec82[1]));
614 fRec44[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec82[0] + fRec45[0]) - 1.2569619999999988)) - 96.7119512195122);
615 fRec43[0] = ((fConst61 * ((fConst39 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
616 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec43[0]);
617 // post processing
618 fRec43[1] = fRec43[0];
619 fRec44[1] = fRec44[0];
620 fRec82[1] = fRec82[0];
621 fVec21[1] = fVec21[0];
622 fRec45[1] = fRec45[0];
623 fRec46[1] = fRec46[0];
624 fRec79[1] = fRec79[0];
625 fRec80[1] = fRec80[0];
626 fRec81[1] = fRec81[0];
627 fVec20[1] = fVec20[0];
628 fRec47[1] = fRec47[0];
629 fRec48[1] = fRec48[0];
630 fRec78[1] = fRec78[0];
631 fVec19[1] = fVec19[0];
632 fRec49[1] = fRec49[0];
633 fVec18[1] = fVec18[0];
634 fRec50[1] = fRec50[0];
635 fRec75[1] = fRec75[0];
636 fRec76[1] = fRec76[0];
637 fRec77[1] = fRec77[0];
638 fVec17[1] = fVec17[0];
639 fRec51[1] = fRec51[0];
640 fRec52[1] = fRec52[0];
641 fRec74[1] = fRec74[0];
642 fVec16[1] = fVec16[0];
643 fRec53[1] = fRec53[0];
644 fVec15[1] = fVec15[0];
645 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
646 fRec73[1] = fRec73[0];
647 fRec68[2] = fRec68[1]; fRec68[1] = fRec68[0];
648 fRec69[2] = fRec69[1]; fRec69[1] = fRec69[0];
649 fRec70[2] = fRec70[1]; fRec70[1] = fRec70[0];
650 fRec71[1] = fRec71[0];
651 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
652 fRec65[1] = fRec65[0];
653 fVec14[1] = fVec14[0];
654 fRec66[2] = fRec66[1]; fRec66[1] = fRec66[0];
655 fRec67[1] = fRec67[0];
656 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
657 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
658 fRec56[1] = fRec56[0];
659 fVec13[1] = fVec13[0];
660 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
661 fRec58[1] = fRec58[0];
662 fRec59[1] = fRec59[0];
663 fVec12[1] = fVec12[0];
664 fRec60[2] = fRec60[1]; fRec60[1] = fRec60[0];
665 fRec61[1] = fRec61[0];
666 fRec62[1] = fRec62[0];
667 fRec63[1] = fRec63[0];
668 fRec1[1] = fRec1[0];
669 fRec2[1] = fRec2[0];
670 fRec42[1] = fRec42[0];
671 fVec10[1] = fVec10[0];
672 fRec3[1] = fRec3[0];
673 fRec4[1] = fRec4[0];
674 fRec39[1] = fRec39[0];
675 fRec40[1] = fRec40[0];
676 fRec41[1] = fRec41[0];
677 fVec9[1] = fVec9[0];
678 fRec5[1] = fRec5[0];
679 fRec6[1] = fRec6[0];
680 fRec38[1] = fRec38[0];
681 fVec8[1] = fVec8[0];
682 fRec7[1] = fRec7[0];
683 fVec7[1] = fVec7[0];
684 fRec9[1] = fRec9[0];
685 fRec35[1] = fRec35[0];
686 fRec36[1] = fRec36[0];
687 fRec37[1] = fRec37[0];
688 fVec6[1] = fVec6[0];
689 fRec10[1] = fRec10[0];
690 fRec11[1] = fRec11[0];
691 fRec34[1] = fRec34[0];
692 fVec5[1] = fVec5[0];
693 fRec12[1] = fRec12[0];
694 fVec4[1] = fVec4[0];
695 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
696 fRec33[1] = fRec33[0];
697 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
698 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
699 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
700 fRec31[1] = fRec31[0];
701 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
702 fRec25[1] = fRec25[0];
703 fVec3[1] = fVec3[0];
704 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
705 fRec27[1] = fRec27[0];
706 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
707 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
708 fRec15[1] = fRec15[0];
709 fVec2[1] = fVec2[0];
710 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
711 fRec17[1] = fRec17[0];
712 fRec18[1] = fRec18[0];
713 fVec1[1] = fVec1[0];
714 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
715 fRec23[1] = fRec23[0];
716 fRec20[1] = fRec20[0];
717 fRec21[1] = fRec21[0];
718 IOTA = IOTA+1;
719 fRec22[1] = fRec22[0];
720 fRec8[1] = fRec8[0];
721 fRec0[1] = fRec0[0];
722 }
723 #undef fslider0
724 #undef fslider1
725 #undef fslider2
726 #undef fslider3
727 }
728
729 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
730 {
731 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
732 }
733
734
735 void Dsp::connect(uint32_t port,void* data)
736 {
737 switch ((PortIndex)port)
738 {
739 case DRIVE:
740 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
741 break;
742 case WET_DRY:
743 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
744 break;
745 case PREGAIN:
746 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
747 break;
748 case GAIN1:
749 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
750 break;
751 default:
752 break;
753 }
754 }
755
756 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
757 {
758 static_cast<Dsp*>(p)->connect(port, data);
759 }
760
761
762 PluginLV2 *plugin() {
763 return new Dsp();
764 }
765
766 void Dsp::del_instance(PluginLV2 *p)
767 {
768 delete static_cast<Dsp*>(p);
769 }
770
771 /*
772 typedef enum
773 {
774 DRIVE,
775 WET_DRY,
776 PREGAIN,
777 GAIN1,
778 } PortIndex;
779 */
780
781 } // end namespace gxamp17_stereo
0 // generated from file '../src/LV2/faust/gxamp18.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp18 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fRec6[2];
109 double fConst60;
110 double fConst61;
111 double fConst62;
112 double fVec6[2];
113 double fConst63;
114 double fRec30[2];
115 double fRec5[2];
116 double fRec4[2];
117 double fVec7[2];
118 double fRec3[2];
119 double fConst64;
120 double fConst65;
121 double fConst66;
122 double fVec8[2];
123 double fConst67;
124 double fRec31[2];
125 double fRec2[2];
126 double fRec1[2];
127 void connect(uint32_t port,void* data);
128 void clear_state_f();
129 void init(uint32_t samplingFreq);
130 void compute(int count, float *input0, float *output0);
131
132 static void clear_state_f_static(PluginLV2*);
133 static void init_static(uint32_t samplingFreq, PluginLV2*);
134 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
135 static void del_instance(PluginLV2 *p);
136 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
137 public:
138 Dsp();
139 ~Dsp();
140 };
141
142
143
144 Dsp::Dsp()
145 : PluginLV2() {
146 version = PLUGINLV2_VERSION;
147 id = "6C16";
148 name = N_("6C16");
149 mono_audio = compute_static;
150 stereo_audio = 0;
151 set_samplerate = init_static;
152 activate_plugin = 0;
153 connect_ports = connect_static;
154 clear_state = clear_state_f_static;
155 delete_instance = del_instance;
156 }
157
158 Dsp::~Dsp() {
159 }
160
161 inline void Dsp::clear_state_f()
162 {
163 for (int i=0; i<2; i++) fRec0[i] = 0;
164 for (int i=0; i<2; i++) fRec7[i] = 0;
165 for (int i=0; i<2; i++) fRec10[i] = 0;
166 for (int i=0; i<2; i++) fVec0[i] = 0;
167 for (int i=0; i<2; i++) fRec11[i] = 0;
168 for (int i=0; i<3; i++) fRec19[i] = 0;
169 for (int i=0; i<2; i++) fVec1[i] = 0;
170 for (int i=0; i<2; i++) fRec18[i] = 0;
171 for (int i=0; i<2; i++) fRec17[i] = 0;
172 for (int i=0; i<3; i++) fRec16[i] = 0;
173 for (int i=0; i<2; i++) fVec2[i] = 0;
174 for (int i=0; i<2; i++) fRec15[i] = 0;
175 for (int i=0; i<3; i++) fRec14[i] = 0;
176 for (int i=0; i<3; i++) fRec13[i] = 0;
177 for (int i=0; i<2; i++) fRec23[i] = 0;
178 for (int i=0; i<3; i++) fRec22[i] = 0;
179 for (int i=0; i<2; i++) fVec3[i] = 0;
180 for (int i=0; i<2; i++) fRec21[i] = 0;
181 for (int i=0; i<3; i++) fRec20[i] = 0;
182 for (int i=0; i<2; i++) fRec27[i] = 0;
183 for (int i=0; i<3; i++) fRec26[i] = 0;
184 for (int i=0; i<3; i++) fRec25[i] = 0;
185 for (int i=0; i<3; i++) fRec24[i] = 0;
186 for (int i=0; i<2; i++) fRec29[i] = 0;
187 for (int i=0; i<3; i++) fRec28[i] = 0;
188 for (int i=0; i<2; i++) fVec4[i] = 0;
189 for (int i=0; i<2; i++) fRec12[i] = 0;
190 for (int i=0; i<2; i++) fRec9[i] = 0;
191 for (int i=0; i<2; i++) fRec8[i] = 0;
192 for (int i=0; i<2; i++) fVec5[i] = 0;
193 for (int i=0; i<2; i++) fRec6[i] = 0;
194 for (int i=0; i<2; i++) fVec6[i] = 0;
195 for (int i=0; i<2; i++) fRec30[i] = 0;
196 for (int i=0; i<2; i++) fRec5[i] = 0;
197 for (int i=0; i<2; i++) fRec4[i] = 0;
198 for (int i=0; i<2; i++) fVec7[i] = 0;
199 for (int i=0; i<2; i++) fRec3[i] = 0;
200 for (int i=0; i<2; i++) fVec8[i] = 0;
201 for (int i=0; i<2; i++) fRec31[i] = 0;
202 for (int i=0; i<2; i++) fRec2[i] = 0;
203 for (int i=0; i<2; i++) fRec1[i] = 0;
204 }
205
206 void Dsp::clear_state_f_static(PluginLV2 *p)
207 {
208 static_cast<Dsp*>(p)->clear_state_f();
209 }
210
211 inline void Dsp::init(uint32_t samplingFreq)
212 {
213 fSamplingFreq = samplingFreq;
214 iConst0 = min(192000, max(1, fSamplingFreq));
215 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
216 fConst2 = (1 + fConst1);
217 fConst3 = (0 - ((1 - fConst1) / fConst2));
218 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
219 fConst5 = (1 + fConst4);
220 fConst6 = (0 - ((1 - fConst4) / fConst5));
221 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
222 fConst8 = (1 + fConst7);
223 fConst9 = (0 - ((1 - fConst7) / fConst8));
224 fConst10 = (1.0 / fConst8);
225 fConst11 = tan((942.4777960769379 / iConst0));
226 fConst12 = (1.0 / faustpower<2>(fConst11));
227 fConst13 = (2 * (1 - fConst12));
228 fConst14 = (1.0 / fConst11);
229 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
230 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
231 fConst17 = tan((3769.9111843077517 / iConst0));
232 fConst18 = (1.0 / faustpower<2>(fConst17));
233 fConst19 = (2 * (1 - fConst18));
234 fConst20 = (1.0 / fConst17);
235 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
236 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
237 fConst23 = (1.0 / fConst22);
238 fConst24 = (1 + fConst20);
239 fConst25 = (0 - ((1 - fConst20) / fConst24));
240 fConst26 = tan((10053.096491487338 / iConst0));
241 fConst27 = (1.0 / faustpower<2>(fConst26));
242 fConst28 = (2 * (1 - fConst27));
243 fConst29 = (1.0 / fConst26);
244 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
245 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
246 fConst32 = (1.0 / fConst31);
247 fConst33 = (1 + fConst29);
248 fConst34 = (0 - ((1 - fConst29) / fConst33));
249 fConst35 = tan((47123.8898038469 / iConst0));
250 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
251 fConst37 = (1.0 / fConst35);
252 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
253 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
254 fConst40 = (1.0 / fConst39);
255 fConst41 = (0 - fConst1);
256 fConst42 = (1.0 / (fConst2 * fConst39));
257 fConst43 = (1.0 / fConst33);
258 fConst44 = (0 - fConst20);
259 fConst45 = (1.0 / (fConst24 * fConst31));
260 fConst46 = (2 * (0 - fConst18));
261 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
262 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
263 fConst49 = (1 + fConst14);
264 fConst50 = (0 - ((1 - fConst14) / fConst49));
265 fConst51 = (0 - fConst14);
266 fConst52 = (1.0 / (fConst49 * fConst22));
267 fConst53 = (2 * (0 - fConst12));
268 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
269 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
270 fConst56 = (0 - fConst29);
271 fConst57 = (2 * (0 - fConst27));
272 fConst58 = (1.0 / fConst5);
273 fConst59 = (0.025 / fConst2);
274 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
275 fConst61 = (1 + fConst60);
276 fConst62 = (0 - ((1 - fConst60) / fConst61));
277 fConst63 = (1.0 / fConst61);
278 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
279 fConst65 = (1 + fConst64);
280 fConst66 = (0 - ((1 - fConst64) / fConst65));
281 fConst67 = (1.0 / fConst65);
282 clear_state_f();
283 }
284
285 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
286 {
287 static_cast<Dsp*>(p)->init(samplingFreq);
288 }
289
290 inline void Dsp::compute(int count, float *input0, float *output0)
291 {
292 #define fslider0 (*fslider0_)
293 #define fslider1 (*fslider1_)
294 #define fslider2 (*fslider2_)
295 #define fslider3 (*fslider3_)
296 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
297 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
298 double fSlow2 = (1.000000000000001e-05 * fslider2);
299 double fSlow3 = fslider3;
300 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
301 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
302 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
303 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
304 double fSlow8 = (2 * (fSlow3 - 0.5));
305 double fSlow9 = (1 - max(0, (0 - fSlow8)));
306 double fSlow10 = (1 - max(0, fSlow8));
307 double fSlow11 = (1.25 * fSlow3);
308 for (int i=0; i<count; i++) {
309 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
310 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
311 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
312 double fTemp0 = (double)input0[i];
313 double fTemp1 = (fTemp0 * (1 - fRec10[0]));
314 double fTemp2 = (1e-15 + (0.027 * fRec9[1]));
315 fVec0[0] = fTemp2;
316 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
317 double fTemp3 = (fConst13 * fRec13[1]);
318 double fTemp4 = (1e-15 + (fTemp0 * fRec10[0]));
319 fRec19[0] = (fTemp4 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
320 double fTemp5 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
321 fVec1[0] = fTemp5;
322 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
323 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
324 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
325 double fTemp6 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
326 fVec2[0] = fTemp6;
327 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
328 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
329 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp3)));
330 double fTemp7 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp3 + (fConst15 * fRec13[0])))))));
331 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
332 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
333 double fTemp8 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
334 fVec3[0] = fTemp8;
335 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
336 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
337 double fTemp9 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
338 double fTemp10 = (fConst13 * fRec24[1]);
339 double fTemp11 = (fConst19 * fRec25[1]);
340 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
341 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
342 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp11)));
343 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp11 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp10)));
344 double fTemp12 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp10 + (fConst15 * fRec24[0])))))));
345 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
346 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
347 double fTemp13 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
348 double fTemp14 = ((1.2589412 * (fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13))))) + (1.584893192 * ((fTemp12 * (1 - (0.3333333333333333 * faustpower<2>(fTemp12)))) + ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + (0.8413951417869425 * (fTemp7 * (1 - (0.3333333333333333 * faustpower<2>(fTemp7)))))))));
349 fVec4[0] = fTemp14;
350 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
351 double fTemp15 = (1e-15 + fTemp1);
352 fRec9[0] = (Ftube(TUBE_TABLE_6C16_68k, (((fSlow11 * ((fTemp15 * (4 - (4 * fabs(fTemp15)))) - fTemp15)) + ((fSlow10 * fTemp4) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp1)))) - 2.921805999999998)) - 141.78496296296294);
353 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
354 double fTemp16 = (fRec8[0] * fRec7[0]);
355 fVec5[0] = fTemp16;
356 fRec6[0] = ((fConst58 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
357 double fTemp17 = (1e-15 + (0.015 * fRec5[1]));
358 fVec6[0] = fTemp17;
359 fRec30[0] = ((fConst63 * (fVec6[0] + fVec6[1])) + (fConst62 * fRec30[1]));
360 fRec5[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec30[0] + fRec6[0]) - 2.097742999999999)) - 110.15046666666666);
361 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
362 double fTemp18 = (fRec7[0] * fRec4[0]);
363 fVec7[0] = fTemp18;
364 fRec3[0] = ((fConst58 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
365 double fTemp19 = (1e-15 + (0.0082 * fRec2[1]));
366 fVec8[0] = fTemp19;
367 fRec31[0] = ((fConst67 * (fVec8[0] + fVec8[1])) + (fConst66 * fRec31[1]));
368 fRec2[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec31[0] + fRec3[0]) - 1.3787419999999988)) - 81.86073170731709);
369 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
370 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
371 // post processing
372 fRec1[1] = fRec1[0];
373 fRec2[1] = fRec2[0];
374 fRec31[1] = fRec31[0];
375 fVec8[1] = fVec8[0];
376 fRec3[1] = fRec3[0];
377 fVec7[1] = fVec7[0];
378 fRec4[1] = fRec4[0];
379 fRec5[1] = fRec5[0];
380 fRec30[1] = fRec30[0];
381 fVec6[1] = fVec6[0];
382 fRec6[1] = fRec6[0];
383 fVec5[1] = fVec5[0];
384 fRec8[1] = fRec8[0];
385 fRec9[1] = fRec9[0];
386 fRec12[1] = fRec12[0];
387 fVec4[1] = fVec4[0];
388 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
389 fRec29[1] = fRec29[0];
390 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
391 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
392 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
393 fRec27[1] = fRec27[0];
394 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
395 fRec21[1] = fRec21[0];
396 fVec3[1] = fVec3[0];
397 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
398 fRec23[1] = fRec23[0];
399 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
400 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
401 fRec15[1] = fRec15[0];
402 fVec2[1] = fVec2[0];
403 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
404 fRec17[1] = fRec17[0];
405 fRec18[1] = fRec18[0];
406 fVec1[1] = fVec1[0];
407 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
408 fRec11[1] = fRec11[0];
409 fVec0[1] = fVec0[0];
410 fRec10[1] = fRec10[0];
411 fRec7[1] = fRec7[0];
412 fRec0[1] = fRec0[0];
413 }
414 #undef fslider0
415 #undef fslider1
416 #undef fslider2
417 #undef fslider3
418 }
419
420 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
421 {
422 static_cast<Dsp*>(p)->compute(count, input0, output0);
423 }
424
425
426 void Dsp::connect(uint32_t port,void* data)
427 {
428 switch ((PortIndex)port)
429 {
430 case DRIVE:
431 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
432 break;
433 case WET_DRY:
434 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
435 break;
436 case PREGAIN:
437 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
438 break;
439 case GAIN1:
440 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
441 break;
442 default:
443 break;
444 }
445 }
446
447 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
448 {
449 static_cast<Dsp*>(p)->connect(port, data);
450 }
451
452
453 PluginLV2 *plugin() {
454 return new Dsp();
455 }
456
457 void Dsp::del_instance(PluginLV2 *p)
458 {
459 delete static_cast<Dsp*>(p);
460 }
461
462 /*
463 typedef enum
464 {
465 DRIVE,
466 WET_DRY,
467 PREGAIN,
468 GAIN1,
469 } PortIndex;
470 */
471
472 } // end namespace gxamp18
0 // generated from file '../src/LV2/faust/gxamp18_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp18_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fRec6[2];
109 double fConst60;
110 double fConst61;
111 double fConst62;
112 double fVec6[2];
113 double fConst63;
114 double fRec30[2];
115 double fRec5[2];
116 double fRec4[2];
117 double fVec7[2];
118 double fRec3[2];
119 double fConst64;
120 double fConst65;
121 double fConst66;
122 double fVec8[2];
123 double fConst67;
124 double fRec31[2];
125 double fRec2[2];
126 double fRec1[2];
127 double fVec9[2];
128 double fRec40[2];
129 double fRec48[3];
130 double fVec10[2];
131 double fRec47[2];
132 double fRec46[2];
133 double fRec45[3];
134 double fVec11[2];
135 double fRec44[2];
136 double fRec43[3];
137 double fRec42[3];
138 double fRec52[2];
139 double fRec51[3];
140 double fVec12[2];
141 double fRec50[2];
142 double fRec49[3];
143 double fRec56[2];
144 double fRec55[3];
145 double fRec54[3];
146 double fRec53[3];
147 double fRec58[2];
148 double fRec57[3];
149 double fVec13[2];
150 double fRec41[2];
151 double fRec39[2];
152 double fRec38[2];
153 double fVec14[2];
154 double fRec37[2];
155 double fVec15[2];
156 double fRec59[2];
157 double fRec36[2];
158 double fRec35[2];
159 double fVec16[2];
160 double fRec34[2];
161 double fVec17[2];
162 double fRec60[2];
163 double fRec33[2];
164 double fRec32[2];
165 void connect(uint32_t port,void* data);
166 void clear_state_f();
167 void init(uint32_t samplingFreq);
168 void compute(int count, float *input0, float *input1, float *output0, float *output1);
169
170 static void clear_state_f_static(PluginLV2*);
171 static void init_static(uint32_t samplingFreq, PluginLV2*);
172 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
173 static void del_instance(PluginLV2 *p);
174 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
175 public:
176 Dsp();
177 ~Dsp();
178 };
179
180
181
182 Dsp::Dsp()
183 : PluginLV2() {
184 version = PLUGINLV2_VERSION;
185 id = "6C16";
186 name = N_("6C16");
187 mono_audio = 0;
188 stereo_audio = compute_static;
189 set_samplerate = init_static;
190 activate_plugin = 0;
191 connect_ports = connect_static;
192 clear_state = clear_state_f_static;
193 delete_instance = del_instance;
194 }
195
196 Dsp::~Dsp() {
197 }
198
199 inline void Dsp::clear_state_f()
200 {
201 for (int i=0; i<2; i++) fRec0[i] = 0;
202 for (int i=0; i<2; i++) fRec7[i] = 0;
203 for (int i=0; i<2; i++) fRec10[i] = 0;
204 for (int i=0; i<2; i++) fVec0[i] = 0;
205 for (int i=0; i<2; i++) fRec11[i] = 0;
206 for (int i=0; i<3; i++) fRec19[i] = 0;
207 for (int i=0; i<2; i++) fVec1[i] = 0;
208 for (int i=0; i<2; i++) fRec18[i] = 0;
209 for (int i=0; i<2; i++) fRec17[i] = 0;
210 for (int i=0; i<3; i++) fRec16[i] = 0;
211 for (int i=0; i<2; i++) fVec2[i] = 0;
212 for (int i=0; i<2; i++) fRec15[i] = 0;
213 for (int i=0; i<3; i++) fRec14[i] = 0;
214 for (int i=0; i<3; i++) fRec13[i] = 0;
215 for (int i=0; i<2; i++) fRec23[i] = 0;
216 for (int i=0; i<3; i++) fRec22[i] = 0;
217 for (int i=0; i<2; i++) fVec3[i] = 0;
218 for (int i=0; i<2; i++) fRec21[i] = 0;
219 for (int i=0; i<3; i++) fRec20[i] = 0;
220 for (int i=0; i<2; i++) fRec27[i] = 0;
221 for (int i=0; i<3; i++) fRec26[i] = 0;
222 for (int i=0; i<3; i++) fRec25[i] = 0;
223 for (int i=0; i<3; i++) fRec24[i] = 0;
224 for (int i=0; i<2; i++) fRec29[i] = 0;
225 for (int i=0; i<3; i++) fRec28[i] = 0;
226 for (int i=0; i<2; i++) fVec4[i] = 0;
227 for (int i=0; i<2; i++) fRec12[i] = 0;
228 for (int i=0; i<2; i++) fRec9[i] = 0;
229 for (int i=0; i<2; i++) fRec8[i] = 0;
230 for (int i=0; i<2; i++) fVec5[i] = 0;
231 for (int i=0; i<2; i++) fRec6[i] = 0;
232 for (int i=0; i<2; i++) fVec6[i] = 0;
233 for (int i=0; i<2; i++) fRec30[i] = 0;
234 for (int i=0; i<2; i++) fRec5[i] = 0;
235 for (int i=0; i<2; i++) fRec4[i] = 0;
236 for (int i=0; i<2; i++) fVec7[i] = 0;
237 for (int i=0; i<2; i++) fRec3[i] = 0;
238 for (int i=0; i<2; i++) fVec8[i] = 0;
239 for (int i=0; i<2; i++) fRec31[i] = 0;
240 for (int i=0; i<2; i++) fRec2[i] = 0;
241 for (int i=0; i<2; i++) fRec1[i] = 0;
242 for (int i=0; i<2; i++) fVec9[i] = 0;
243 for (int i=0; i<2; i++) fRec40[i] = 0;
244 for (int i=0; i<3; i++) fRec48[i] = 0;
245 for (int i=0; i<2; i++) fVec10[i] = 0;
246 for (int i=0; i<2; i++) fRec47[i] = 0;
247 for (int i=0; i<2; i++) fRec46[i] = 0;
248 for (int i=0; i<3; i++) fRec45[i] = 0;
249 for (int i=0; i<2; i++) fVec11[i] = 0;
250 for (int i=0; i<2; i++) fRec44[i] = 0;
251 for (int i=0; i<3; i++) fRec43[i] = 0;
252 for (int i=0; i<3; i++) fRec42[i] = 0;
253 for (int i=0; i<2; i++) fRec52[i] = 0;
254 for (int i=0; i<3; i++) fRec51[i] = 0;
255 for (int i=0; i<2; i++) fVec12[i] = 0;
256 for (int i=0; i<2; i++) fRec50[i] = 0;
257 for (int i=0; i<3; i++) fRec49[i] = 0;
258 for (int i=0; i<2; i++) fRec56[i] = 0;
259 for (int i=0; i<3; i++) fRec55[i] = 0;
260 for (int i=0; i<3; i++) fRec54[i] = 0;
261 for (int i=0; i<3; i++) fRec53[i] = 0;
262 for (int i=0; i<2; i++) fRec58[i] = 0;
263 for (int i=0; i<3; i++) fRec57[i] = 0;
264 for (int i=0; i<2; i++) fVec13[i] = 0;
265 for (int i=0; i<2; i++) fRec41[i] = 0;
266 for (int i=0; i<2; i++) fRec39[i] = 0;
267 for (int i=0; i<2; i++) fRec38[i] = 0;
268 for (int i=0; i<2; i++) fVec14[i] = 0;
269 for (int i=0; i<2; i++) fRec37[i] = 0;
270 for (int i=0; i<2; i++) fVec15[i] = 0;
271 for (int i=0; i<2; i++) fRec59[i] = 0;
272 for (int i=0; i<2; i++) fRec36[i] = 0;
273 for (int i=0; i<2; i++) fRec35[i] = 0;
274 for (int i=0; i<2; i++) fVec16[i] = 0;
275 for (int i=0; i<2; i++) fRec34[i] = 0;
276 for (int i=0; i<2; i++) fVec17[i] = 0;
277 for (int i=0; i<2; i++) fRec60[i] = 0;
278 for (int i=0; i<2; i++) fRec33[i] = 0;
279 for (int i=0; i<2; i++) fRec32[i] = 0;
280 }
281
282 void Dsp::clear_state_f_static(PluginLV2 *p)
283 {
284 static_cast<Dsp*>(p)->clear_state_f();
285 }
286
287 inline void Dsp::init(uint32_t samplingFreq)
288 {
289 fSamplingFreq = samplingFreq;
290 iConst0 = min(192000, max(1, fSamplingFreq));
291 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
292 fConst2 = (1 + fConst1);
293 fConst3 = (0 - ((1 - fConst1) / fConst2));
294 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
295 fConst5 = (1 + fConst4);
296 fConst6 = (0 - ((1 - fConst4) / fConst5));
297 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
298 fConst8 = (1 + fConst7);
299 fConst9 = (0 - ((1 - fConst7) / fConst8));
300 fConst10 = (1.0 / fConst8);
301 fConst11 = tan((942.4777960769379 / iConst0));
302 fConst12 = (1.0 / faustpower<2>(fConst11));
303 fConst13 = (2 * (1 - fConst12));
304 fConst14 = (1.0 / fConst11);
305 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
306 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
307 fConst17 = tan((3769.9111843077517 / iConst0));
308 fConst18 = (1.0 / faustpower<2>(fConst17));
309 fConst19 = (2 * (1 - fConst18));
310 fConst20 = (1.0 / fConst17);
311 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
312 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
313 fConst23 = (1.0 / fConst22);
314 fConst24 = (1 + fConst20);
315 fConst25 = (0 - ((1 - fConst20) / fConst24));
316 fConst26 = tan((10053.096491487338 / iConst0));
317 fConst27 = (1.0 / faustpower<2>(fConst26));
318 fConst28 = (2 * (1 - fConst27));
319 fConst29 = (1.0 / fConst26);
320 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
321 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
322 fConst32 = (1.0 / fConst31);
323 fConst33 = (1 + fConst29);
324 fConst34 = (0 - ((1 - fConst29) / fConst33));
325 fConst35 = tan((47123.8898038469 / iConst0));
326 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
327 fConst37 = (1.0 / fConst35);
328 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
329 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
330 fConst40 = (1.0 / fConst39);
331 fConst41 = (0 - fConst1);
332 fConst42 = (1.0 / (fConst2 * fConst39));
333 fConst43 = (1.0 / fConst33);
334 fConst44 = (0 - fConst20);
335 fConst45 = (1.0 / (fConst24 * fConst31));
336 fConst46 = (2 * (0 - fConst18));
337 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
338 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
339 fConst49 = (1 + fConst14);
340 fConst50 = (0 - ((1 - fConst14) / fConst49));
341 fConst51 = (0 - fConst14);
342 fConst52 = (1.0 / (fConst49 * fConst22));
343 fConst53 = (2 * (0 - fConst12));
344 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
345 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
346 fConst56 = (0 - fConst29);
347 fConst57 = (2 * (0 - fConst27));
348 fConst58 = (1.0 / fConst5);
349 fConst59 = (0.025 / fConst2);
350 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
351 fConst61 = (1 + fConst60);
352 fConst62 = (0 - ((1 - fConst60) / fConst61));
353 fConst63 = (1.0 / fConst61);
354 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
355 fConst65 = (1 + fConst64);
356 fConst66 = (0 - ((1 - fConst64) / fConst65));
357 fConst67 = (1.0 / fConst65);
358 clear_state_f();
359 }
360
361 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
362 {
363 static_cast<Dsp*>(p)->init(samplingFreq);
364 }
365
366 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
367 {
368 #define fslider0 (*fslider0_)
369 #define fslider1 (*fslider1_)
370 #define fslider2 (*fslider2_)
371 #define fslider3 (*fslider3_)
372 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
373 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
374 double fSlow2 = (1.000000000000001e-05 * fslider2);
375 double fSlow3 = fslider3;
376 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
377 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
378 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
379 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
380 double fSlow8 = (2 * (fSlow3 - 0.5));
381 double fSlow9 = (1 - max(0, (0 - fSlow8)));
382 double fSlow10 = (1 - max(0, fSlow8));
383 double fSlow11 = (1.25 * fSlow3);
384 for (int i=0; i<count; i++) {
385 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
386 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
387 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
388 double fTemp0 = (1 - fRec10[0]);
389 double fTemp1 = (double)input0[i];
390 double fTemp2 = (fTemp1 * fTemp0);
391 double fTemp3 = (1e-15 + (0.027 * fRec9[1]));
392 fVec0[0] = fTemp3;
393 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
394 double fTemp4 = (fConst13 * fRec13[1]);
395 double fTemp5 = (1e-15 + (fTemp1 * fRec10[0]));
396 fRec19[0] = (fTemp5 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
397 double fTemp6 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
398 fVec1[0] = fTemp6;
399 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
400 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
401 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
402 double fTemp7 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
403 fVec2[0] = fTemp7;
404 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
405 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
406 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp4)));
407 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp4 + (fConst15 * fRec13[0])))))));
408 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
409 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
410 double fTemp9 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
411 fVec3[0] = fTemp9;
412 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
413 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
414 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
415 double fTemp11 = (fConst13 * fRec24[1]);
416 double fTemp12 = (fConst19 * fRec25[1]);
417 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
418 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
419 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp12)));
420 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp12 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp11)));
421 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp11 + (fConst15 * fRec24[0])))))));
422 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
423 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
424 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
425 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
426 fVec4[0] = fTemp15;
427 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
428 double fTemp16 = (1e-15 + fTemp2);
429 fRec9[0] = (Ftube(TUBE_TABLE_6C16_68k, (((fSlow11 * ((fTemp16 * (4 - (4 * fabs(fTemp16)))) - fTemp16)) + ((fSlow10 * fTemp5) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp2)))) - 2.921805999999998)) - 141.78496296296294);
430 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
431 double fTemp17 = (fRec8[0] * fRec7[0]);
432 fVec5[0] = fTemp17;
433 fRec6[0] = ((fConst58 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
434 double fTemp18 = (1e-15 + (0.015 * fRec5[1]));
435 fVec6[0] = fTemp18;
436 fRec30[0] = ((fConst63 * (fVec6[0] + fVec6[1])) + (fConst62 * fRec30[1]));
437 fRec5[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec30[0] + fRec6[0]) - 2.097742999999999)) - 110.15046666666666);
438 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
439 double fTemp19 = (fRec7[0] * fRec4[0]);
440 fVec7[0] = fTemp19;
441 fRec3[0] = ((fConst58 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
442 double fTemp20 = (1e-15 + (0.0082 * fRec2[1]));
443 fVec8[0] = fTemp20;
444 fRec31[0] = ((fConst67 * (fVec8[0] + fVec8[1])) + (fConst66 * fRec31[1]));
445 fRec2[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec31[0] + fRec3[0]) - 1.3787419999999988)) - 81.86073170731709);
446 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
447 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
448 double fTemp21 = (double)input1[i];
449 double fTemp22 = (fTemp21 * fTemp0);
450 double fTemp23 = (1e-15 + (0.027 * fRec39[1]));
451 fVec9[0] = fTemp23;
452 fRec40[0] = ((fConst10 * (fVec9[0] + fVec9[1])) + (fConst9 * fRec40[1]));
453 double fTemp24 = (fConst13 * fRec42[1]);
454 double fTemp25 = (1e-15 + (fTemp21 * fRec10[0]));
455 fRec48[0] = (fTemp25 - (fConst40 * ((fConst38 * fRec48[2]) + (fConst36 * fRec48[1]))));
456 double fTemp26 = (fRec48[2] + (fRec48[0] + (2 * fRec48[1])));
457 fVec10[0] = fTemp26;
458 fRec47[0] = ((fConst42 * ((fConst41 * fVec10[1]) + (fConst1 * fVec10[0]))) + (fConst3 * fRec47[1]));
459 fRec46[0] = ((fConst43 * (fRec47[0] + fRec47[1])) + (fConst34 * fRec46[1]));
460 fRec45[0] = (fRec46[0] - (fConst32 * ((fConst30 * fRec45[2]) + (fConst28 * fRec45[1]))));
461 double fTemp27 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
462 fVec11[0] = fTemp27;
463 fRec44[0] = ((fConst45 * ((fConst44 * fVec11[1]) + (fConst20 * fVec11[0]))) + (fConst25 * fRec44[1]));
464 fRec43[0] = (fRec44[0] - (fConst23 * ((fConst21 * fRec43[2]) + (fConst19 * fRec43[1]))));
465 fRec42[0] = ((fConst23 * (((fConst18 * fRec43[0]) + (fConst46 * fRec43[1])) + (fConst18 * fRec43[2]))) - (fConst16 * ((fConst15 * fRec42[2]) + fTemp24)));
466 double fTemp28 = max(-1, min(1, (fSlow4 * (fRec42[2] + (fConst16 * (fTemp24 + (fConst15 * fRec42[0])))))));
467 fRec52[0] = ((fConst45 * (fVec11[0] + fVec11[1])) + (fConst25 * fRec52[1]));
468 fRec51[0] = (fRec52[0] - (fConst23 * ((fConst21 * fRec51[2]) + (fConst19 * fRec51[1]))));
469 double fTemp29 = (fRec51[2] + (fRec51[0] + (2 * fRec51[1])));
470 fVec12[0] = fTemp29;
471 fRec50[0] = ((fConst52 * ((fConst51 * fVec12[1]) + (fConst14 * fVec12[0]))) + (fConst50 * fRec50[1]));
472 fRec49[0] = (fRec50[0] - (fConst48 * ((fConst47 * fRec49[2]) + (fConst13 * fRec49[1]))));
473 double fTemp30 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec49[0]) + (fConst53 * fRec49[1])) + (fConst12 * fRec49[2])))));
474 double fTemp31 = (fConst13 * fRec53[1]);
475 double fTemp32 = (fConst19 * fRec54[1]);
476 fRec56[0] = ((fConst43 * ((fConst56 * fRec47[1]) + (fConst29 * fRec47[0]))) + (fConst34 * fRec56[1]));
477 fRec55[0] = (fRec56[0] - (fConst32 * ((fConst30 * fRec55[2]) + (fConst28 * fRec55[1]))));
478 fRec54[0] = ((fConst32 * (((fConst27 * fRec55[0]) + (fConst57 * fRec55[1])) + (fConst27 * fRec55[2]))) - (fConst55 * ((fConst54 * fRec54[2]) + fTemp32)));
479 fRec53[0] = ((fRec54[2] + (fConst55 * (fTemp32 + (fConst54 * fRec54[0])))) - (fConst16 * ((fConst15 * fRec53[2]) + fTemp31)));
480 double fTemp33 = max(-1, min(1, (fSlow6 * (fRec53[2] + (fConst16 * (fTemp31 + (fConst15 * fRec53[0])))))));
481 fRec58[0] = ((fConst52 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec58[1]));
482 fRec57[0] = (fRec58[0] - (fConst48 * ((fConst47 * fRec57[2]) + (fConst13 * fRec57[1]))));
483 double fTemp34 = max(-1, min(1, (fSlow7 * (fRec57[2] + (fRec57[0] + (2 * fRec57[1]))))));
484 double fTemp35 = ((1.2589412 * (fTemp34 * (1 - (0.3333333333333333 * faustpower<2>(fTemp34))))) + (1.584893192 * ((fTemp33 * (1 - (0.3333333333333333 * faustpower<2>(fTemp33)))) + ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + (0.8413951417869425 * (fTemp28 * (1 - (0.3333333333333333 * faustpower<2>(fTemp28)))))))));
485 fVec13[0] = fTemp35;
486 fRec41[0] = ((fConst58 * (fVec13[0] + fVec13[1])) + (fConst6 * fRec41[1]));
487 double fTemp36 = (1e-15 + fTemp22);
488 fRec39[0] = (Ftube(TUBE_TABLE_6C16_68k, (((fSlow11 * ((fTemp36 * (4 - (4 * fabs(fTemp36)))) - fTemp36)) + ((fSlow10 * fTemp25) + ((fSlow9 * fRec41[0]) + (fRec40[0] + fTemp22)))) - 2.921805999999998)) - 141.78496296296294);
489 fRec38[0] = ((fConst59 * ((fConst41 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
490 double fTemp37 = (fRec7[0] * fRec38[0]);
491 fVec14[0] = fTemp37;
492 fRec37[0] = ((fConst58 * (fVec14[0] + fVec14[1])) + (fConst6 * fRec37[1]));
493 double fTemp38 = (1e-15 + (0.015 * fRec36[1]));
494 fVec15[0] = fTemp38;
495 fRec59[0] = ((fConst63 * (fVec15[0] + fVec15[1])) + (fConst62 * fRec59[1]));
496 fRec36[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec59[0] + fRec37[0]) - 2.097742999999999)) - 110.15046666666666);
497 fRec35[0] = ((fConst59 * ((fConst41 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
498 double fTemp39 = (fRec7[0] * fRec35[0]);
499 fVec16[0] = fTemp39;
500 fRec34[0] = ((fConst58 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec34[1]));
501 double fTemp40 = (1e-15 + (0.0082 * fRec33[1]));
502 fVec17[0] = fTemp40;
503 fRec60[0] = ((fConst67 * (fVec17[0] + fVec17[1])) + (fConst66 * fRec60[1]));
504 fRec33[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec60[0] + fRec34[0]) - 1.3787419999999988)) - 81.86073170731709);
505 fRec32[0] = ((fConst59 * ((fConst41 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
506 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec32[0]);
507 // post processing
508 fRec32[1] = fRec32[0];
509 fRec33[1] = fRec33[0];
510 fRec60[1] = fRec60[0];
511 fVec17[1] = fVec17[0];
512 fRec34[1] = fRec34[0];
513 fVec16[1] = fVec16[0];
514 fRec35[1] = fRec35[0];
515 fRec36[1] = fRec36[0];
516 fRec59[1] = fRec59[0];
517 fVec15[1] = fVec15[0];
518 fRec37[1] = fRec37[0];
519 fVec14[1] = fVec14[0];
520 fRec38[1] = fRec38[0];
521 fRec39[1] = fRec39[0];
522 fRec41[1] = fRec41[0];
523 fVec13[1] = fVec13[0];
524 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
525 fRec58[1] = fRec58[0];
526 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
527 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
528 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
529 fRec56[1] = fRec56[0];
530 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
531 fRec50[1] = fRec50[0];
532 fVec12[1] = fVec12[0];
533 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
534 fRec52[1] = fRec52[0];
535 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
536 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
537 fRec44[1] = fRec44[0];
538 fVec11[1] = fVec11[0];
539 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
540 fRec46[1] = fRec46[0];
541 fRec47[1] = fRec47[0];
542 fVec10[1] = fVec10[0];
543 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
544 fRec40[1] = fRec40[0];
545 fVec9[1] = fVec9[0];
546 fRec1[1] = fRec1[0];
547 fRec2[1] = fRec2[0];
548 fRec31[1] = fRec31[0];
549 fVec8[1] = fVec8[0];
550 fRec3[1] = fRec3[0];
551 fVec7[1] = fVec7[0];
552 fRec4[1] = fRec4[0];
553 fRec5[1] = fRec5[0];
554 fRec30[1] = fRec30[0];
555 fVec6[1] = fVec6[0];
556 fRec6[1] = fRec6[0];
557 fVec5[1] = fVec5[0];
558 fRec8[1] = fRec8[0];
559 fRec9[1] = fRec9[0];
560 fRec12[1] = fRec12[0];
561 fVec4[1] = fVec4[0];
562 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
563 fRec29[1] = fRec29[0];
564 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
565 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
566 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
567 fRec27[1] = fRec27[0];
568 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
569 fRec21[1] = fRec21[0];
570 fVec3[1] = fVec3[0];
571 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
572 fRec23[1] = fRec23[0];
573 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
574 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
575 fRec15[1] = fRec15[0];
576 fVec2[1] = fVec2[0];
577 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
578 fRec17[1] = fRec17[0];
579 fRec18[1] = fRec18[0];
580 fVec1[1] = fVec1[0];
581 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
582 fRec11[1] = fRec11[0];
583 fVec0[1] = fVec0[0];
584 fRec10[1] = fRec10[0];
585 fRec7[1] = fRec7[0];
586 fRec0[1] = fRec0[0];
587 }
588 #undef fslider0
589 #undef fslider1
590 #undef fslider2
591 #undef fslider3
592 }
593
594 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
595 {
596 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
597 }
598
599
600 void Dsp::connect(uint32_t port,void* data)
601 {
602 switch ((PortIndex)port)
603 {
604 case DRIVE:
605 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
606 break;
607 case WET_DRY:
608 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
609 break;
610 case PREGAIN:
611 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
612 break;
613 case GAIN1:
614 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
615 break;
616 default:
617 break;
618 }
619 }
620
621 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
622 {
623 static_cast<Dsp*>(p)->connect(port, data);
624 }
625
626
627 PluginLV2 *plugin() {
628 return new Dsp();
629 }
630
631 void Dsp::del_instance(PluginLV2 *p)
632 {
633 delete static_cast<Dsp*>(p);
634 }
635
636 /*
637 typedef enum
638 {
639 DRIVE,
640 WET_DRY,
641 PREGAIN,
642 GAIN1,
643 } PortIndex;
644 */
645
646 } // end namespace gxamp18_stereo
0 // generated from file '../src/LV2/faust/gxamp2.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp2 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 FAUSTFLOAT fslider0;
17 FAUSTFLOAT *fslider0_;
18 double fRec3[2];
19 double fConst6;
20 double fConst7;
21 double fConst8;
22 double fConst9;
23 double fConst10;
24 double fConst11;
25 double fConst12;
26 double fConst13;
27 double fConst14;
28 double fConst15;
29 double fConst16;
30 double fConst17;
31 double fConst18;
32 double fConst19;
33 double fConst20;
34 double fConst21;
35 double fConst22;
36 double fConst23;
37 double fConst24;
38 double fConst25;
39 double fConst26;
40 double fConst27;
41 double fConst28;
42 double fConst29;
43 double fConst30;
44 double fConst31;
45 double fConst32;
46 double fConst33;
47 double fConst34;
48 double fConst35;
49 double fConst36;
50 double fConst37;
51 double fConst38;
52 FAUSTFLOAT fslider1;
53 FAUSTFLOAT *fslider1_;
54 double fRec18[2];
55 double fRec17[3];
56 double fVec0[2];
57 double fConst39;
58 double fConst40;
59 double fRec16[2];
60 double fConst41;
61 double fRec15[2];
62 double fRec14[3];
63 double fVec1[2];
64 double fConst42;
65 double fConst43;
66 double fRec13[2];
67 double fRec12[3];
68 double fConst44;
69 double fRec11[3];
70 FAUSTFLOAT fslider2;
71 FAUSTFLOAT *fslider2_;
72 double fConst45;
73 double fConst46;
74 double fConst47;
75 double fConst48;
76 double fRec22[2];
77 double fRec21[3];
78 double fVec2[2];
79 double fConst49;
80 double fConst50;
81 double fRec20[2];
82 double fRec19[3];
83 double fConst51;
84 double fConst52;
85 double fConst53;
86 double fConst54;
87 double fRec26[2];
88 double fRec25[3];
89 double fConst55;
90 double fRec24[3];
91 double fRec23[3];
92 double fRec28[2];
93 double fRec27[3];
94 double fVec3[2];
95 double fConst56;
96 double fRec10[2];
97 FAUSTFLOAT fslider3;
98 FAUSTFLOAT *fslider3_;
99 double fRec29[2];
100 double fConst57;
101 double fConst58;
102 double fConst59;
103 double fVec4[2];
104 double fConst60;
105 double fRec30[2];
106 double fRec9[2];
107 double fConst61;
108 double fRec8[2];
109 double fConst62;
110 double fRec7[2];
111 double fConst63;
112 double fConst64;
113 double fConst65;
114 double fVec5[2];
115 double fConst66;
116 double fRec31[2];
117 double fRec6[2];
118 double fRec5[2];
119 double fRec4[2];
120 double fRec2[3];
121 double fConst67;
122 double fConst68;
123 double fConst69;
124 double fVec6[2];
125 double fConst70;
126 double fRec32[2];
127 double fRec1[2];
128 double fRec0[2];
129 void connect(uint32_t port,void* data);
130 void clear_state_f();
131 void init(uint32_t samplingFreq);
132 void compute(int count, float *input0, float *output0);
133
134 static void clear_state_f_static(PluginLV2*);
135 static void init_static(uint32_t samplingFreq, PluginLV2*);
136 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
137 static void del_instance(PluginLV2 *p);
138 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
139 public:
140 Dsp();
141 ~Dsp();
142 };
143
144
145
146 Dsp::Dsp()
147 : PluginLV2() {
148 version = PLUGINLV2_VERSION;
149 id = "6V6";
150 name = N_("6V6");
151 mono_audio = compute_static;
152 stereo_audio = 0;
153 set_samplerate = init_static;
154 activate_plugin = 0;
155 connect_ports = connect_static;
156 clear_state = clear_state_f_static;
157 delete_instance = del_instance;
158 }
159
160 Dsp::~Dsp() {
161 }
162
163 inline void Dsp::clear_state_f()
164 {
165 for (int i=0; i<2; i++) fRec3[i] = 0;
166 for (int i=0; i<2; i++) fRec18[i] = 0;
167 for (int i=0; i<3; i++) fRec17[i] = 0;
168 for (int i=0; i<2; i++) fVec0[i] = 0;
169 for (int i=0; i<2; i++) fRec16[i] = 0;
170 for (int i=0; i<2; i++) fRec15[i] = 0;
171 for (int i=0; i<3; i++) fRec14[i] = 0;
172 for (int i=0; i<2; i++) fVec1[i] = 0;
173 for (int i=0; i<2; i++) fRec13[i] = 0;
174 for (int i=0; i<3; i++) fRec12[i] = 0;
175 for (int i=0; i<3; i++) fRec11[i] = 0;
176 for (int i=0; i<2; i++) fRec22[i] = 0;
177 for (int i=0; i<3; i++) fRec21[i] = 0;
178 for (int i=0; i<2; i++) fVec2[i] = 0;
179 for (int i=0; i<2; i++) fRec20[i] = 0;
180 for (int i=0; i<3; i++) fRec19[i] = 0;
181 for (int i=0; i<2; i++) fRec26[i] = 0;
182 for (int i=0; i<3; i++) fRec25[i] = 0;
183 for (int i=0; i<3; i++) fRec24[i] = 0;
184 for (int i=0; i<3; i++) fRec23[i] = 0;
185 for (int i=0; i<2; i++) fRec28[i] = 0;
186 for (int i=0; i<3; i++) fRec27[i] = 0;
187 for (int i=0; i<2; i++) fVec3[i] = 0;
188 for (int i=0; i<2; i++) fRec10[i] = 0;
189 for (int i=0; i<2; i++) fRec29[i] = 0;
190 for (int i=0; i<2; i++) fVec4[i] = 0;
191 for (int i=0; i<2; i++) fRec30[i] = 0;
192 for (int i=0; i<2; i++) fRec9[i] = 0;
193 for (int i=0; i<2; i++) fRec8[i] = 0;
194 for (int i=0; i<2; i++) fRec7[i] = 0;
195 for (int i=0; i<2; i++) fVec5[i] = 0;
196 for (int i=0; i<2; i++) fRec31[i] = 0;
197 for (int i=0; i<2; i++) fRec6[i] = 0;
198 for (int i=0; i<2; i++) fRec5[i] = 0;
199 for (int i=0; i<2; i++) fRec4[i] = 0;
200 for (int i=0; i<3; i++) fRec2[i] = 0;
201 for (int i=0; i<2; i++) fVec6[i] = 0;
202 for (int i=0; i<2; i++) fRec32[i] = 0;
203 for (int i=0; i<2; i++) fRec1[i] = 0;
204 for (int i=0; i<2; i++) fRec0[i] = 0;
205 }
206
207 void Dsp::clear_state_f_static(PluginLV2 *p)
208 {
209 static_cast<Dsp*>(p)->clear_state_f();
210 }
211
212 inline void Dsp::init(uint32_t samplingFreq)
213 {
214 fSamplingFreq = samplingFreq;
215 iConst0 = min(192000, max(1, fSamplingFreq));
216 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
217 fConst2 = (1 + fConst1);
218 fConst3 = (0 - ((1 - fConst1) / fConst2));
219 fConst4 = log((7539.822368615503 / iConst0));
220 fConst5 = (0 - (1.8442 * cos(exp((0.07238887 + (fConst4 * (1.31282248 + (fConst4 * (0.43359433 + (fConst4 * (0.27547621 + (fConst4 * (0.06446806 + (0.00506158 * fConst4))))))))))))));
221 fConst6 = (1.0 / tan((20517.741620594938 / iConst0)));
222 fConst7 = (1 + fConst6);
223 fConst8 = (0 - ((1 - fConst6) / fConst7));
224 fConst9 = tan((942.4777960769379 / iConst0));
225 fConst10 = (1.0 / faustpower<2>(fConst9));
226 fConst11 = (2 * (1 - fConst10));
227 fConst12 = (1.0 / fConst9);
228 fConst13 = (1 + ((fConst12 - 1.0) / fConst9));
229 fConst14 = (1.0 / (1 + ((1.0 + fConst12) / fConst9)));
230 fConst15 = tan((3769.9111843077517 / iConst0));
231 fConst16 = (1.0 / faustpower<2>(fConst15));
232 fConst17 = (2 * (1 - fConst16));
233 fConst18 = (1.0 / fConst15);
234 fConst19 = (1 + ((fConst18 - 1.0000000000000004) / fConst15));
235 fConst20 = (1 + ((fConst18 + 1.0000000000000004) / fConst15));
236 fConst21 = (1.0 / fConst20);
237 fConst22 = (1 + fConst18);
238 fConst23 = (0 - ((1 - fConst18) / fConst22));
239 fConst24 = tan((10053.096491487338 / iConst0));
240 fConst25 = (1.0 / faustpower<2>(fConst24));
241 fConst26 = (2 * (1 - fConst25));
242 fConst27 = (1.0 / fConst24);
243 fConst28 = (1 + ((fConst27 - 1.0000000000000004) / fConst24));
244 fConst29 = (1 + ((1.0000000000000004 + fConst27) / fConst24));
245 fConst30 = (1.0 / fConst29);
246 fConst31 = (1 + fConst27);
247 fConst32 = (0 - ((1 - fConst27) / fConst31));
248 fConst33 = tan((47123.8898038469 / iConst0));
249 fConst34 = (2 * (1 - (1.0 / faustpower<2>(fConst33))));
250 fConst35 = (1.0 / fConst33);
251 fConst36 = (1 + ((fConst35 - 1.414213562373095) / fConst33));
252 fConst37 = (1 + ((1.414213562373095 + fConst35) / fConst33));
253 fConst38 = (1.0 / fConst37);
254 fConst39 = (0 - fConst1);
255 fConst40 = (1.0 / (fConst2 * fConst37));
256 fConst41 = (1.0 / fConst31);
257 fConst42 = (0 - fConst18);
258 fConst43 = (1.0 / (fConst22 * fConst29));
259 fConst44 = (2 * (0 - fConst16));
260 fConst45 = (1 + ((fConst12 - 1.0000000000000004) / fConst9));
261 fConst46 = (1.0 / (1 + ((fConst12 + 1.0000000000000004) / fConst9)));
262 fConst47 = (1 + fConst12);
263 fConst48 = (0 - ((1 - fConst12) / fConst47));
264 fConst49 = (0 - fConst12);
265 fConst50 = (1.0 / (fConst47 * fConst20));
266 fConst51 = (2 * (0 - fConst10));
267 fConst52 = (1 + ((fConst18 - 1.0) / fConst15));
268 fConst53 = (1.0 / (1 + ((1.0 + fConst18) / fConst15)));
269 fConst54 = (0 - fConst27);
270 fConst55 = (2 * (0 - fConst25));
271 fConst56 = (1.0 / fConst7);
272 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
273 fConst58 = (1 + fConst57);
274 fConst59 = (0 - ((1 - fConst57) / fConst58));
275 fConst60 = (1.0 / fConst58);
276 fConst61 = (0.025 / fConst2);
277 fConst62 = (0.77 / fConst7);
278 fConst63 = (1.0 / tan((414.6902302738527 / iConst0)));
279 fConst64 = (1 + fConst63);
280 fConst65 = (0 - ((1 - fConst63) / fConst64));
281 fConst66 = (1.0 / fConst64);
282 fConst67 = (1.0 / tan((609.4689747964198 / iConst0)));
283 fConst68 = (1 + fConst67);
284 fConst69 = (0 - ((1 - fConst67) / fConst68));
285 fConst70 = (1.0 / fConst68);
286 clear_state_f();
287 }
288
289 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
290 {
291 static_cast<Dsp*>(p)->init(samplingFreq);
292 }
293
294 inline void Dsp::compute(int count, float *input0, float *output0)
295 {
296 #define fslider0 (*fslider0_)
297 #define fslider1 (*fslider1_)
298 #define fslider2 (*fslider2_)
299 #define fslider3 (*fslider3_)
300 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
301 double fSlow1 = (1.000000000000001e-05 * fslider1);
302 double fSlow2 = fslider2;
303 double fSlow3 = pow(1e+01,(1.2 * fSlow2));
304 double fSlow4 = (fConst46 * pow(1e+01,(2 * fSlow2)));
305 double fSlow5 = pow(1e+01,(0.8 * fSlow2));
306 double fSlow6 = (fConst46 * pow(1e+01,(0.9 * fSlow2)));
307 double fSlow7 = (2 * (fSlow2 - 0.5));
308 double fSlow8 = (1 - max(0, (0 - fSlow7)));
309 double fSlow9 = (1 - max(0, fSlow7));
310 double fSlow10 = (1.25 * fSlow2);
311 double fSlow11 = (0.0010000000000000009 * pow(10,(0.05 * fslider3)));
312 for (int i=0; i<count; i++) {
313 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
314 double fTemp0 = (fConst11 * fRec11[1]);
315 fRec18[0] = (fSlow1 + (0.999 * fRec18[1]));
316 double fTemp1 = (double)input0[i];
317 double fTemp2 = (1e-15 + (fTemp1 * fRec18[0]));
318 fRec17[0] = (fTemp2 - (fConst38 * ((fConst36 * fRec17[2]) + (fConst34 * fRec17[1]))));
319 double fTemp3 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
320 fVec0[0] = fTemp3;
321 fRec16[0] = ((fConst40 * ((fConst39 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
322 fRec15[0] = ((fConst41 * (fRec16[0] + fRec16[1])) + (fConst32 * fRec15[1]));
323 fRec14[0] = (fRec15[0] - (fConst30 * ((fConst28 * fRec14[2]) + (fConst26 * fRec14[1]))));
324 double fTemp4 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
325 fVec1[0] = fTemp4;
326 fRec13[0] = ((fConst43 * ((fConst42 * fVec1[1]) + (fConst18 * fVec1[0]))) + (fConst23 * fRec13[1]));
327 fRec12[0] = (fRec13[0] - (fConst21 * ((fConst19 * fRec12[2]) + (fConst17 * fRec12[1]))));
328 fRec11[0] = ((fConst21 * (((fConst16 * fRec12[0]) + (fConst44 * fRec12[1])) + (fConst16 * fRec12[2]))) - (fConst14 * ((fConst13 * fRec11[2]) + fTemp0)));
329 double fTemp5 = max(-1, min(1, (fSlow3 * (fRec11[2] + (fConst14 * (fTemp0 + (fConst13 * fRec11[0])))))));
330 fRec22[0] = ((fConst43 * (fVec1[0] + fVec1[1])) + (fConst23 * fRec22[1]));
331 fRec21[0] = (fRec22[0] - (fConst21 * ((fConst19 * fRec21[2]) + (fConst17 * fRec21[1]))));
332 double fTemp6 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
333 fVec2[0] = fTemp6;
334 fRec20[0] = ((fConst50 * ((fConst49 * fVec2[1]) + (fConst12 * fVec2[0]))) + (fConst48 * fRec20[1]));
335 fRec19[0] = (fRec20[0] - (fConst46 * ((fConst45 * fRec19[2]) + (fConst11 * fRec19[1]))));
336 double fTemp7 = max(-1, min(1, (fSlow4 * (((fConst10 * fRec19[0]) + (fConst51 * fRec19[1])) + (fConst10 * fRec19[2])))));
337 double fTemp8 = (fConst11 * fRec23[1]);
338 double fTemp9 = (fConst17 * fRec24[1]);
339 fRec26[0] = ((fConst41 * ((fConst54 * fRec16[1]) + (fConst27 * fRec16[0]))) + (fConst32 * fRec26[1]));
340 fRec25[0] = (fRec26[0] - (fConst30 * ((fConst28 * fRec25[2]) + (fConst26 * fRec25[1]))));
341 fRec24[0] = ((fConst30 * (((fConst25 * fRec25[0]) + (fConst55 * fRec25[1])) + (fConst25 * fRec25[2]))) - (fConst53 * ((fConst52 * fRec24[2]) + fTemp9)));
342 fRec23[0] = ((fRec24[2] + (fConst53 * (fTemp9 + (fConst52 * fRec24[0])))) - (fConst14 * ((fConst13 * fRec23[2]) + fTemp8)));
343 double fTemp10 = max(-1, min(1, (fSlow5 * (fRec23[2] + (fConst14 * (fTemp8 + (fConst13 * fRec23[0])))))));
344 fRec28[0] = ((fConst50 * (fVec2[0] + fVec2[1])) + (fConst48 * fRec28[1]));
345 fRec27[0] = (fRec28[0] - (fConst46 * ((fConst45 * fRec27[2]) + (fConst11 * fRec27[1]))));
346 double fTemp11 = max(-1, min(1, (fSlow6 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
347 double fTemp12 = ((1.2589412 * (fTemp11 * (1 - (0.3333333333333333 * faustpower<2>(fTemp11))))) + (1.584893192 * ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + ((fTemp7 * (1 - (0.3333333333333333 * faustpower<2>(fTemp7)))) + (0.8413951417869425 * (fTemp5 * (1 - (0.3333333333333333 * faustpower<2>(fTemp5)))))))));
348 fVec3[0] = fTemp12;
349 fRec10[0] = ((fConst56 * (fVec3[0] + fVec3[1])) + (fConst8 * fRec10[1]));
350 double fTemp13 = (fTemp1 * (1 - fRec18[0]));
351 double fTemp14 = (1e-15 + fTemp13);
352 fRec29[0] = (fSlow11 + (0.999 * fRec29[1]));
353 double fTemp15 = (1e-15 + (0.027 * fRec9[1]));
354 fVec4[0] = fTemp15;
355 fRec30[0] = ((fConst60 * (fVec4[0] + fVec4[1])) + (fConst59 * fRec30[1]));
356 fRec9[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec30[0] + (fRec29[0] * (1e-15 + ((fSlow10 * ((fTemp14 * (4 - (4 * fabs(fTemp14)))) - fTemp14)) + ((fSlow9 * fTemp2) + (fTemp13 + (fSlow8 * fRec10[0]))))))) - 2.296149999999999)) - 164.9574074074074);
357 fRec8[0] = ((fConst61 * ((fConst39 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
358 fRec7[0] = ((fConst62 * (fRec8[0] + fRec8[1])) + (fConst8 * fRec7[1]));
359 double fTemp16 = (1e-15 + (0.015 * fRec6[1]));
360 fVec5[0] = fTemp16;
361 fRec31[0] = ((fConst66 * (fVec5[0] + fVec5[1])) + (fConst65 * fRec31[1]));
362 fRec6[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec31[0] + (fRec29[0] * fRec7[0])) - 1.6755869999999988)) - 138.2942);
363 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
364 fRec4[0] = ((fConst62 * (fRec5[0] + fRec5[1])) + (fConst8 * fRec4[1]));
365 fRec2[0] = ((fRec4[0] * fRec3[0]) - ((0.8502684100000001 * fRec2[2]) + (fConst5 * fRec2[1])));
366 double fTemp17 = (1e-15 + (0.0082 * fRec1[1]));
367 fVec6[0] = fTemp17;
368 fRec32[0] = ((fConst70 * (fVec6[0] + fVec6[1])) + (fConst69 * fRec32[1]));
369 fRec1[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec32[0] + fRec2[0]) - ((1.059 * fRec2[1]) + 1.130461999999999))) - 112.13878048780487);
370 fRec0[0] = ((fConst61 * ((fConst39 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
371 output0[i] = (FAUSTFLOAT)(0.77 * fRec0[0]);
372 // post processing
373 fRec0[1] = fRec0[0];
374 fRec1[1] = fRec1[0];
375 fRec32[1] = fRec32[0];
376 fVec6[1] = fVec6[0];
377 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
378 fRec4[1] = fRec4[0];
379 fRec5[1] = fRec5[0];
380 fRec6[1] = fRec6[0];
381 fRec31[1] = fRec31[0];
382 fVec5[1] = fVec5[0];
383 fRec7[1] = fRec7[0];
384 fRec8[1] = fRec8[0];
385 fRec9[1] = fRec9[0];
386 fRec30[1] = fRec30[0];
387 fVec4[1] = fVec4[0];
388 fRec29[1] = fRec29[0];
389 fRec10[1] = fRec10[0];
390 fVec3[1] = fVec3[0];
391 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
392 fRec28[1] = fRec28[0];
393 fRec23[2] = fRec23[1]; fRec23[1] = fRec23[0];
394 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
395 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
396 fRec26[1] = fRec26[0];
397 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
398 fRec20[1] = fRec20[0];
399 fVec2[1] = fVec2[0];
400 fRec21[2] = fRec21[1]; fRec21[1] = fRec21[0];
401 fRec22[1] = fRec22[0];
402 fRec11[2] = fRec11[1]; fRec11[1] = fRec11[0];
403 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
404 fRec13[1] = fRec13[0];
405 fVec1[1] = fVec1[0];
406 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
407 fRec15[1] = fRec15[0];
408 fRec16[1] = fRec16[0];
409 fVec0[1] = fVec0[0];
410 fRec17[2] = fRec17[1]; fRec17[1] = fRec17[0];
411 fRec18[1] = fRec18[0];
412 fRec3[1] = fRec3[0];
413 }
414 #undef fslider0
415 #undef fslider1
416 #undef fslider2
417 #undef fslider3
418 }
419
420 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
421 {
422 static_cast<Dsp*>(p)->compute(count, input0, output0);
423 }
424
425
426 void Dsp::connect(uint32_t port,void* data)
427 {
428 switch ((PortIndex)port)
429 {
430 case PREGAIN:
431 fslider3_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
432 break;
433 case DRIVE:
434 fslider2_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
435 break;
436 case WET_DRY:
437 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
438 break;
439 case GAIN1:
440 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
441 break;
442 default:
443 break;
444 }
445 }
446
447 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
448 {
449 static_cast<Dsp*>(p)->connect(port, data);
450 }
451
452
453 PluginLV2 *plugin() {
454 return new Dsp();
455 }
456
457 void Dsp::del_instance(PluginLV2 *p)
458 {
459 delete static_cast<Dsp*>(p);
460 }
461
462 /*
463 typedef enum
464 {
465 PREGAIN,
466 DRIVE,
467 WET_DRY,
468 GAIN1,
469 } PortIndex;
470 */
471
472 } // end namespace gxamp2
0 // generated from file '../src/LV2/faust/gxamp2_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp2_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 FAUSTFLOAT fslider0;
17 FAUSTFLOAT *fslider0_;
18 double fRec3[2];
19 double fConst6;
20 double fConst7;
21 double fConst8;
22 double fConst9;
23 double fConst10;
24 double fConst11;
25 double fConst12;
26 double fConst13;
27 double fConst14;
28 double fConst15;
29 double fConst16;
30 double fConst17;
31 double fConst18;
32 double fConst19;
33 double fConst20;
34 double fConst21;
35 double fConst22;
36 double fConst23;
37 double fConst24;
38 double fConst25;
39 double fConst26;
40 double fConst27;
41 double fConst28;
42 double fConst29;
43 double fConst30;
44 double fConst31;
45 double fConst32;
46 double fConst33;
47 double fConst34;
48 double fConst35;
49 double fConst36;
50 double fConst37;
51 double fConst38;
52 FAUSTFLOAT fslider1;
53 FAUSTFLOAT *fslider1_;
54 double fRec18[2];
55 double fRec17[3];
56 double fVec0[2];
57 double fConst39;
58 double fConst40;
59 double fRec16[2];
60 double fConst41;
61 double fRec15[2];
62 double fRec14[3];
63 double fVec1[2];
64 double fConst42;
65 double fConst43;
66 double fRec13[2];
67 double fRec12[3];
68 double fConst44;
69 double fRec11[3];
70 FAUSTFLOAT fslider2;
71 FAUSTFLOAT *fslider2_;
72 double fConst45;
73 double fConst46;
74 double fConst47;
75 double fConst48;
76 double fRec22[2];
77 double fRec21[3];
78 double fVec2[2];
79 double fConst49;
80 double fConst50;
81 double fRec20[2];
82 double fRec19[3];
83 double fConst51;
84 double fConst52;
85 double fConst53;
86 double fConst54;
87 double fRec26[2];
88 double fRec25[3];
89 double fConst55;
90 double fRec24[3];
91 double fRec23[3];
92 double fRec28[2];
93 double fRec27[3];
94 double fVec3[2];
95 double fConst56;
96 double fRec10[2];
97 FAUSTFLOAT fslider3;
98 FAUSTFLOAT *fslider3_;
99 double fRec29[2];
100 double fConst57;
101 double fConst58;
102 double fConst59;
103 double fVec4[2];
104 double fConst60;
105 double fRec30[2];
106 double fRec9[2];
107 double fConst61;
108 double fRec8[2];
109 double fConst62;
110 double fRec7[2];
111 double fConst63;
112 double fConst64;
113 double fConst65;
114 double fVec5[2];
115 double fConst66;
116 double fRec31[2];
117 double fRec6[2];
118 double fRec5[2];
119 double fRec4[2];
120 double fRec2[3];
121 double fConst67;
122 double fConst68;
123 double fConst69;
124 double fVec6[2];
125 double fConst70;
126 double fRec32[2];
127 double fRec1[2];
128 double fRec0[2];
129 double fRec49[3];
130 double fVec7[2];
131 double fRec48[2];
132 double fRec47[2];
133 double fRec46[3];
134 double fVec8[2];
135 double fRec45[2];
136 double fRec44[3];
137 double fRec43[3];
138 double fRec53[2];
139 double fRec52[3];
140 double fVec9[2];
141 double fRec51[2];
142 double fRec50[3];
143 double fRec57[2];
144 double fRec56[3];
145 double fRec55[3];
146 double fRec54[3];
147 double fRec59[2];
148 double fRec58[3];
149 double fVec10[2];
150 double fRec42[2];
151 double fVec11[2];
152 double fRec60[2];
153 double fRec41[2];
154 double fRec40[2];
155 double fRec39[2];
156 double fVec12[2];
157 double fRec61[2];
158 double fRec38[2];
159 double fRec37[2];
160 double fRec36[2];
161 double fRec35[3];
162 double fVec13[2];
163 double fRec62[2];
164 double fRec34[2];
165 double fRec33[2];
166 void connect(uint32_t port,void* data);
167 void clear_state_f();
168 void init(uint32_t samplingFreq);
169 void compute(int count, float *input0, float *input1, float *output0, float *output1);
170
171 static void clear_state_f_static(PluginLV2*);
172 static void init_static(uint32_t samplingFreq, PluginLV2*);
173 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
174 static void del_instance(PluginLV2 *p);
175 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
176 public:
177 Dsp();
178 ~Dsp();
179 };
180
181
182
183 Dsp::Dsp()
184 : PluginLV2() {
185 version = PLUGINLV2_VERSION;
186 id = "6V6";
187 name = N_("6V6");
188 mono_audio = 0;
189 stereo_audio = compute_static;
190 set_samplerate = init_static;
191 activate_plugin = 0;
192 connect_ports = connect_static;
193 clear_state = clear_state_f_static;
194 delete_instance = del_instance;
195 }
196
197 Dsp::~Dsp() {
198 }
199
200 inline void Dsp::clear_state_f()
201 {
202 for (int i=0; i<2; i++) fRec3[i] = 0;
203 for (int i=0; i<2; i++) fRec18[i] = 0;
204 for (int i=0; i<3; i++) fRec17[i] = 0;
205 for (int i=0; i<2; i++) fVec0[i] = 0;
206 for (int i=0; i<2; i++) fRec16[i] = 0;
207 for (int i=0; i<2; i++) fRec15[i] = 0;
208 for (int i=0; i<3; i++) fRec14[i] = 0;
209 for (int i=0; i<2; i++) fVec1[i] = 0;
210 for (int i=0; i<2; i++) fRec13[i] = 0;
211 for (int i=0; i<3; i++) fRec12[i] = 0;
212 for (int i=0; i<3; i++) fRec11[i] = 0;
213 for (int i=0; i<2; i++) fRec22[i] = 0;
214 for (int i=0; i<3; i++) fRec21[i] = 0;
215 for (int i=0; i<2; i++) fVec2[i] = 0;
216 for (int i=0; i<2; i++) fRec20[i] = 0;
217 for (int i=0; i<3; i++) fRec19[i] = 0;
218 for (int i=0; i<2; i++) fRec26[i] = 0;
219 for (int i=0; i<3; i++) fRec25[i] = 0;
220 for (int i=0; i<3; i++) fRec24[i] = 0;
221 for (int i=0; i<3; i++) fRec23[i] = 0;
222 for (int i=0; i<2; i++) fRec28[i] = 0;
223 for (int i=0; i<3; i++) fRec27[i] = 0;
224 for (int i=0; i<2; i++) fVec3[i] = 0;
225 for (int i=0; i<2; i++) fRec10[i] = 0;
226 for (int i=0; i<2; i++) fRec29[i] = 0;
227 for (int i=0; i<2; i++) fVec4[i] = 0;
228 for (int i=0; i<2; i++) fRec30[i] = 0;
229 for (int i=0; i<2; i++) fRec9[i] = 0;
230 for (int i=0; i<2; i++) fRec8[i] = 0;
231 for (int i=0; i<2; i++) fRec7[i] = 0;
232 for (int i=0; i<2; i++) fVec5[i] = 0;
233 for (int i=0; i<2; i++) fRec31[i] = 0;
234 for (int i=0; i<2; i++) fRec6[i] = 0;
235 for (int i=0; i<2; i++) fRec5[i] = 0;
236 for (int i=0; i<2; i++) fRec4[i] = 0;
237 for (int i=0; i<3; i++) fRec2[i] = 0;
238 for (int i=0; i<2; i++) fVec6[i] = 0;
239 for (int i=0; i<2; i++) fRec32[i] = 0;
240 for (int i=0; i<2; i++) fRec1[i] = 0;
241 for (int i=0; i<2; i++) fRec0[i] = 0;
242 for (int i=0; i<3; i++) fRec49[i] = 0;
243 for (int i=0; i<2; i++) fVec7[i] = 0;
244 for (int i=0; i<2; i++) fRec48[i] = 0;
245 for (int i=0; i<2; i++) fRec47[i] = 0;
246 for (int i=0; i<3; i++) fRec46[i] = 0;
247 for (int i=0; i<2; i++) fVec8[i] = 0;
248 for (int i=0; i<2; i++) fRec45[i] = 0;
249 for (int i=0; i<3; i++) fRec44[i] = 0;
250 for (int i=0; i<3; i++) fRec43[i] = 0;
251 for (int i=0; i<2; i++) fRec53[i] = 0;
252 for (int i=0; i<3; i++) fRec52[i] = 0;
253 for (int i=0; i<2; i++) fVec9[i] = 0;
254 for (int i=0; i<2; i++) fRec51[i] = 0;
255 for (int i=0; i<3; i++) fRec50[i] = 0;
256 for (int i=0; i<2; i++) fRec57[i] = 0;
257 for (int i=0; i<3; i++) fRec56[i] = 0;
258 for (int i=0; i<3; i++) fRec55[i] = 0;
259 for (int i=0; i<3; i++) fRec54[i] = 0;
260 for (int i=0; i<2; i++) fRec59[i] = 0;
261 for (int i=0; i<3; i++) fRec58[i] = 0;
262 for (int i=0; i<2; i++) fVec10[i] = 0;
263 for (int i=0; i<2; i++) fRec42[i] = 0;
264 for (int i=0; i<2; i++) fVec11[i] = 0;
265 for (int i=0; i<2; i++) fRec60[i] = 0;
266 for (int i=0; i<2; i++) fRec41[i] = 0;
267 for (int i=0; i<2; i++) fRec40[i] = 0;
268 for (int i=0; i<2; i++) fRec39[i] = 0;
269 for (int i=0; i<2; i++) fVec12[i] = 0;
270 for (int i=0; i<2; i++) fRec61[i] = 0;
271 for (int i=0; i<2; i++) fRec38[i] = 0;
272 for (int i=0; i<2; i++) fRec37[i] = 0;
273 for (int i=0; i<2; i++) fRec36[i] = 0;
274 for (int i=0; i<3; i++) fRec35[i] = 0;
275 for (int i=0; i<2; i++) fVec13[i] = 0;
276 for (int i=0; i<2; i++) fRec62[i] = 0;
277 for (int i=0; i<2; i++) fRec34[i] = 0;
278 for (int i=0; i<2; i++) fRec33[i] = 0;
279 }
280
281 void Dsp::clear_state_f_static(PluginLV2 *p)
282 {
283 static_cast<Dsp*>(p)->clear_state_f();
284 }
285
286 inline void Dsp::init(uint32_t samplingFreq)
287 {
288 fSamplingFreq = samplingFreq;
289 iConst0 = min(192000, max(1, fSamplingFreq));
290 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
291 fConst2 = (1 + fConst1);
292 fConst3 = (0 - ((1 - fConst1) / fConst2));
293 fConst4 = log((7539.822368615503 / iConst0));
294 fConst5 = (0 - (1.8442 * cos(exp((0.07238887 + (fConst4 * (1.31282248 + (fConst4 * (0.43359433 + (fConst4 * (0.27547621 + (fConst4 * (0.06446806 + (0.00506158 * fConst4))))))))))))));
295 fConst6 = (1.0 / tan((20517.741620594938 / iConst0)));
296 fConst7 = (1 + fConst6);
297 fConst8 = (0 - ((1 - fConst6) / fConst7));
298 fConst9 = tan((942.4777960769379 / iConst0));
299 fConst10 = (1.0 / faustpower<2>(fConst9));
300 fConst11 = (2 * (1 - fConst10));
301 fConst12 = (1.0 / fConst9);
302 fConst13 = (1 + ((fConst12 - 1.0) / fConst9));
303 fConst14 = (1.0 / (1 + ((1.0 + fConst12) / fConst9)));
304 fConst15 = tan((3769.9111843077517 / iConst0));
305 fConst16 = (1.0 / faustpower<2>(fConst15));
306 fConst17 = (2 * (1 - fConst16));
307 fConst18 = (1.0 / fConst15);
308 fConst19 = (1 + ((fConst18 - 1.0000000000000004) / fConst15));
309 fConst20 = (1 + ((fConst18 + 1.0000000000000004) / fConst15));
310 fConst21 = (1.0 / fConst20);
311 fConst22 = (1 + fConst18);
312 fConst23 = (0 - ((1 - fConst18) / fConst22));
313 fConst24 = tan((10053.096491487338 / iConst0));
314 fConst25 = (1.0 / faustpower<2>(fConst24));
315 fConst26 = (2 * (1 - fConst25));
316 fConst27 = (1.0 / fConst24);
317 fConst28 = (1 + ((fConst27 - 1.0000000000000004) / fConst24));
318 fConst29 = (1 + ((1.0000000000000004 + fConst27) / fConst24));
319 fConst30 = (1.0 / fConst29);
320 fConst31 = (1 + fConst27);
321 fConst32 = (0 - ((1 - fConst27) / fConst31));
322 fConst33 = tan((47123.8898038469 / iConst0));
323 fConst34 = (2 * (1 - (1.0 / faustpower<2>(fConst33))));
324 fConst35 = (1.0 / fConst33);
325 fConst36 = (1 + ((fConst35 - 1.414213562373095) / fConst33));
326 fConst37 = (1 + ((1.414213562373095 + fConst35) / fConst33));
327 fConst38 = (1.0 / fConst37);
328 fConst39 = (0 - fConst1);
329 fConst40 = (1.0 / (fConst2 * fConst37));
330 fConst41 = (1.0 / fConst31);
331 fConst42 = (0 - fConst18);
332 fConst43 = (1.0 / (fConst22 * fConst29));
333 fConst44 = (2 * (0 - fConst16));
334 fConst45 = (1 + ((fConst12 - 1.0000000000000004) / fConst9));
335 fConst46 = (1.0 / (1 + ((fConst12 + 1.0000000000000004) / fConst9)));
336 fConst47 = (1 + fConst12);
337 fConst48 = (0 - ((1 - fConst12) / fConst47));
338 fConst49 = (0 - fConst12);
339 fConst50 = (1.0 / (fConst47 * fConst20));
340 fConst51 = (2 * (0 - fConst10));
341 fConst52 = (1 + ((fConst18 - 1.0) / fConst15));
342 fConst53 = (1.0 / (1 + ((1.0 + fConst18) / fConst15)));
343 fConst54 = (0 - fConst27);
344 fConst55 = (2 * (0 - fConst25));
345 fConst56 = (1.0 / fConst7);
346 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
347 fConst58 = (1 + fConst57);
348 fConst59 = (0 - ((1 - fConst57) / fConst58));
349 fConst60 = (1.0 / fConst58);
350 fConst61 = (0.025 / fConst2);
351 fConst62 = (0.77 / fConst7);
352 fConst63 = (1.0 / tan((414.6902302738527 / iConst0)));
353 fConst64 = (1 + fConst63);
354 fConst65 = (0 - ((1 - fConst63) / fConst64));
355 fConst66 = (1.0 / fConst64);
356 fConst67 = (1.0 / tan((609.4689747964198 / iConst0)));
357 fConst68 = (1 + fConst67);
358 fConst69 = (0 - ((1 - fConst67) / fConst68));
359 fConst70 = (1.0 / fConst68);
360 clear_state_f();
361 }
362
363 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
364 {
365 static_cast<Dsp*>(p)->init(samplingFreq);
366 }
367
368 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
369 {
370 #define fslider0 (*fslider0_)
371 #define fslider1 (*fslider1_)
372 #define fslider2 (*fslider2_)
373 #define fslider3 (*fslider3_)
374 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
375 double fSlow1 = (1.000000000000001e-05 * fslider1);
376 double fSlow2 = fslider2;
377 double fSlow3 = pow(1e+01,(1.2 * fSlow2));
378 double fSlow4 = (fConst46 * pow(1e+01,(2 * fSlow2)));
379 double fSlow5 = pow(1e+01,(0.8 * fSlow2));
380 double fSlow6 = (fConst46 * pow(1e+01,(0.9 * fSlow2)));
381 double fSlow7 = (2 * (fSlow2 - 0.5));
382 double fSlow8 = (1 - max(0, (0 - fSlow7)));
383 double fSlow9 = (1 - max(0, fSlow7));
384 double fSlow10 = (1.25 * fSlow2);
385 double fSlow11 = (0.0010000000000000009 * pow(10,(0.05 * fslider3)));
386 for (int i=0; i<count; i++) {
387 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
388 double fTemp0 = (fConst11 * fRec11[1]);
389 fRec18[0] = (fSlow1 + (0.999 * fRec18[1]));
390 double fTemp1 = (double)input0[i];
391 double fTemp2 = (1e-15 + (fTemp1 * fRec18[0]));
392 fRec17[0] = (fTemp2 - (fConst38 * ((fConst36 * fRec17[2]) + (fConst34 * fRec17[1]))));
393 double fTemp3 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
394 fVec0[0] = fTemp3;
395 fRec16[0] = ((fConst40 * ((fConst39 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
396 fRec15[0] = ((fConst41 * (fRec16[0] + fRec16[1])) + (fConst32 * fRec15[1]));
397 fRec14[0] = (fRec15[0] - (fConst30 * ((fConst28 * fRec14[2]) + (fConst26 * fRec14[1]))));
398 double fTemp4 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
399 fVec1[0] = fTemp4;
400 fRec13[0] = ((fConst43 * ((fConst42 * fVec1[1]) + (fConst18 * fVec1[0]))) + (fConst23 * fRec13[1]));
401 fRec12[0] = (fRec13[0] - (fConst21 * ((fConst19 * fRec12[2]) + (fConst17 * fRec12[1]))));
402 fRec11[0] = ((fConst21 * (((fConst16 * fRec12[0]) + (fConst44 * fRec12[1])) + (fConst16 * fRec12[2]))) - (fConst14 * ((fConst13 * fRec11[2]) + fTemp0)));
403 double fTemp5 = max(-1, min(1, (fSlow3 * (fRec11[2] + (fConst14 * (fTemp0 + (fConst13 * fRec11[0])))))));
404 fRec22[0] = ((fConst43 * (fVec1[0] + fVec1[1])) + (fConst23 * fRec22[1]));
405 fRec21[0] = (fRec22[0] - (fConst21 * ((fConst19 * fRec21[2]) + (fConst17 * fRec21[1]))));
406 double fTemp6 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
407 fVec2[0] = fTemp6;
408 fRec20[0] = ((fConst50 * ((fConst49 * fVec2[1]) + (fConst12 * fVec2[0]))) + (fConst48 * fRec20[1]));
409 fRec19[0] = (fRec20[0] - (fConst46 * ((fConst45 * fRec19[2]) + (fConst11 * fRec19[1]))));
410 double fTemp7 = max(-1, min(1, (fSlow4 * (((fConst10 * fRec19[0]) + (fConst51 * fRec19[1])) + (fConst10 * fRec19[2])))));
411 double fTemp8 = (fConst11 * fRec23[1]);
412 double fTemp9 = (fConst17 * fRec24[1]);
413 fRec26[0] = ((fConst41 * ((fConst54 * fRec16[1]) + (fConst27 * fRec16[0]))) + (fConst32 * fRec26[1]));
414 fRec25[0] = (fRec26[0] - (fConst30 * ((fConst28 * fRec25[2]) + (fConst26 * fRec25[1]))));
415 fRec24[0] = ((fConst30 * (((fConst25 * fRec25[0]) + (fConst55 * fRec25[1])) + (fConst25 * fRec25[2]))) - (fConst53 * ((fConst52 * fRec24[2]) + fTemp9)));
416 fRec23[0] = ((fRec24[2] + (fConst53 * (fTemp9 + (fConst52 * fRec24[0])))) - (fConst14 * ((fConst13 * fRec23[2]) + fTemp8)));
417 double fTemp10 = max(-1, min(1, (fSlow5 * (fRec23[2] + (fConst14 * (fTemp8 + (fConst13 * fRec23[0])))))));
418 fRec28[0] = ((fConst50 * (fVec2[0] + fVec2[1])) + (fConst48 * fRec28[1]));
419 fRec27[0] = (fRec28[0] - (fConst46 * ((fConst45 * fRec27[2]) + (fConst11 * fRec27[1]))));
420 double fTemp11 = max(-1, min(1, (fSlow6 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
421 double fTemp12 = ((1.2589412 * (fTemp11 * (1 - (0.3333333333333333 * faustpower<2>(fTemp11))))) + (1.584893192 * ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + ((fTemp7 * (1 - (0.3333333333333333 * faustpower<2>(fTemp7)))) + (0.8413951417869425 * (fTemp5 * (1 - (0.3333333333333333 * faustpower<2>(fTemp5)))))))));
422 fVec3[0] = fTemp12;
423 fRec10[0] = ((fConst56 * (fVec3[0] + fVec3[1])) + (fConst8 * fRec10[1]));
424 double fTemp13 = (1 - fRec18[0]);
425 double fTemp14 = (fTemp1 * fTemp13);
426 double fTemp15 = (1e-15 + fTemp14);
427 fRec29[0] = (fSlow11 + (0.999 * fRec29[1]));
428 double fTemp16 = (1e-15 + (0.027 * fRec9[1]));
429 fVec4[0] = fTemp16;
430 fRec30[0] = ((fConst60 * (fVec4[0] + fVec4[1])) + (fConst59 * fRec30[1]));
431 fRec9[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec30[0] + (fRec29[0] * (1e-15 + ((fSlow10 * ((fTemp15 * (4 - (4 * fabs(fTemp15)))) - fTemp15)) + ((fSlow9 * fTemp2) + (fTemp14 + (fSlow8 * fRec10[0]))))))) - 2.296149999999999)) - 164.9574074074074);
432 fRec8[0] = ((fConst61 * ((fConst39 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
433 fRec7[0] = ((fConst62 * (fRec8[0] + fRec8[1])) + (fConst8 * fRec7[1]));
434 double fTemp17 = (1e-15 + (0.015 * fRec6[1]));
435 fVec5[0] = fTemp17;
436 fRec31[0] = ((fConst66 * (fVec5[0] + fVec5[1])) + (fConst65 * fRec31[1]));
437 fRec6[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec31[0] + (fRec29[0] * fRec7[0])) - 1.6755869999999988)) - 138.2942);
438 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
439 fRec4[0] = ((fConst62 * (fRec5[0] + fRec5[1])) + (fConst8 * fRec4[1]));
440 fRec2[0] = ((fRec4[0] * fRec3[0]) - ((0.8502684100000001 * fRec2[2]) + (fConst5 * fRec2[1])));
441 double fTemp18 = (1e-15 + (0.0082 * fRec1[1]));
442 fVec6[0] = fTemp18;
443 fRec32[0] = ((fConst70 * (fVec6[0] + fVec6[1])) + (fConst69 * fRec32[1]));
444 fRec1[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec32[0] + fRec2[0]) - (1.130461999999999 + (1.059 * fRec2[1])))) - 112.13878048780487);
445 fRec0[0] = ((fConst61 * ((fConst39 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
446 output0[i] = (FAUSTFLOAT)(0.77 * fRec0[0]);
447 double fTemp19 = (fConst11 * fRec43[1]);
448 double fTemp20 = (double)input1[i];
449 double fTemp21 = (1e-15 + (fTemp20 * fRec18[0]));
450 fRec49[0] = (fTemp21 - (fConst38 * ((fConst36 * fRec49[2]) + (fConst34 * fRec49[1]))));
451 double fTemp22 = (fRec49[2] + (fRec49[0] + (2 * fRec49[1])));
452 fVec7[0] = fTemp22;
453 fRec48[0] = ((fConst40 * ((fConst39 * fVec7[1]) + (fConst1 * fVec7[0]))) + (fConst3 * fRec48[1]));
454 fRec47[0] = ((fConst41 * (fRec48[0] + fRec48[1])) + (fConst32 * fRec47[1]));
455 fRec46[0] = (fRec47[0] - (fConst30 * ((fConst28 * fRec46[2]) + (fConst26 * fRec46[1]))));
456 double fTemp23 = (fRec46[2] + (fRec46[0] + (2 * fRec46[1])));
457 fVec8[0] = fTemp23;
458 fRec45[0] = ((fConst43 * ((fConst42 * fVec8[1]) + (fConst18 * fVec8[0]))) + (fConst23 * fRec45[1]));
459 fRec44[0] = (fRec45[0] - (fConst21 * ((fConst19 * fRec44[2]) + (fConst17 * fRec44[1]))));
460 fRec43[0] = ((fConst21 * (((fConst16 * fRec44[0]) + (fConst44 * fRec44[1])) + (fConst16 * fRec44[2]))) - (fConst14 * ((fConst13 * fRec43[2]) + fTemp19)));
461 double fTemp24 = max(-1, min(1, (fSlow3 * (fRec43[2] + (fConst14 * (fTemp19 + (fConst13 * fRec43[0])))))));
462 fRec53[0] = ((fConst43 * (fVec8[0] + fVec8[1])) + (fConst23 * fRec53[1]));
463 fRec52[0] = (fRec53[0] - (fConst21 * ((fConst19 * fRec52[2]) + (fConst17 * fRec52[1]))));
464 double fTemp25 = (fRec52[2] + (fRec52[0] + (2 * fRec52[1])));
465 fVec9[0] = fTemp25;
466 fRec51[0] = ((fConst50 * ((fConst49 * fVec9[1]) + (fConst12 * fVec9[0]))) + (fConst48 * fRec51[1]));
467 fRec50[0] = (fRec51[0] - (fConst46 * ((fConst45 * fRec50[2]) + (fConst11 * fRec50[1]))));
468 double fTemp26 = max(-1, min(1, (fSlow4 * (((fConst10 * fRec50[0]) + (fConst51 * fRec50[1])) + (fConst10 * fRec50[2])))));
469 double fTemp27 = (fConst11 * fRec54[1]);
470 double fTemp28 = (fConst17 * fRec55[1]);
471 fRec57[0] = ((fConst41 * ((fConst54 * fRec48[1]) + (fConst27 * fRec48[0]))) + (fConst32 * fRec57[1]));
472 fRec56[0] = (fRec57[0] - (fConst30 * ((fConst28 * fRec56[2]) + (fConst26 * fRec56[1]))));
473 fRec55[0] = ((fConst30 * (((fConst25 * fRec56[0]) + (fConst55 * fRec56[1])) + (fConst25 * fRec56[2]))) - (fConst53 * ((fConst52 * fRec55[2]) + fTemp28)));
474 fRec54[0] = ((fRec55[2] + (fConst53 * (fTemp28 + (fConst52 * fRec55[0])))) - (fConst14 * ((fConst13 * fRec54[2]) + fTemp27)));
475 double fTemp29 = max(-1, min(1, (fSlow5 * (fRec54[2] + (fConst14 * (fTemp27 + (fConst13 * fRec54[0])))))));
476 fRec59[0] = ((fConst50 * (fVec9[0] + fVec9[1])) + (fConst48 * fRec59[1]));
477 fRec58[0] = (fRec59[0] - (fConst46 * ((fConst45 * fRec58[2]) + (fConst11 * fRec58[1]))));
478 double fTemp30 = max(-1, min(1, (fSlow6 * (fRec58[2] + (fRec58[0] + (2 * fRec58[1]))))));
479 double fTemp31 = ((1.2589412 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30))))) + (1.584893192 * ((fTemp29 * (1 - (0.3333333333333333 * faustpower<2>(fTemp29)))) + ((fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26)))) + (0.8413951417869425 * (fTemp24 * (1 - (0.3333333333333333 * faustpower<2>(fTemp24)))))))));
480 fVec10[0] = fTemp31;
481 fRec42[0] = ((fConst56 * (fVec10[0] + fVec10[1])) + (fConst8 * fRec42[1]));
482 double fTemp32 = (fTemp20 * fTemp13);
483 double fTemp33 = (1e-15 + fTemp32);
484 double fTemp34 = (1e-15 + (0.027 * fRec41[1]));
485 fVec11[0] = fTemp34;
486 fRec60[0] = ((fConst60 * (fVec11[0] + fVec11[1])) + (fConst59 * fRec60[1]));
487 fRec41[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec60[0] + (fRec29[0] * (1e-15 + ((fSlow10 * ((fTemp33 * (4 - (4 * fabs(fTemp33)))) - fTemp33)) + ((fSlow9 * fTemp21) + (fTemp32 + (fSlow8 * fRec42[0]))))))) - 2.296149999999999)) - 164.9574074074074);
488 fRec40[0] = ((fConst61 * ((fConst39 * fRec41[1]) + (fConst1 * fRec41[0]))) + (fConst3 * fRec40[1]));
489 fRec39[0] = ((fConst62 * (fRec40[0] + fRec40[1])) + (fConst8 * fRec39[1]));
490 double fTemp35 = (1e-15 + (0.015 * fRec38[1]));
491 fVec12[0] = fTemp35;
492 fRec61[0] = ((fConst66 * (fVec12[0] + fVec12[1])) + (fConst65 * fRec61[1]));
493 fRec38[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec61[0] + (fRec29[0] * fRec39[0])) - 1.6755869999999988)) - 138.2942);
494 fRec37[0] = ((fConst61 * ((fConst39 * fRec38[1]) + (fConst1 * fRec38[0]))) + (fConst3 * fRec37[1]));
495 fRec36[0] = ((fConst62 * (fRec37[0] + fRec37[1])) + (fConst8 * fRec36[1]));
496 fRec35[0] = ((fRec3[0] * fRec36[0]) - ((0.8502684100000001 * fRec35[2]) + (fConst5 * fRec35[1])));
497 double fTemp36 = (1e-15 + (0.0082 * fRec34[1]));
498 fVec13[0] = fTemp36;
499 fRec62[0] = ((fConst70 * (fVec13[0] + fVec13[1])) + (fConst69 * fRec62[1]));
500 fRec34[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec62[0] + fRec35[0]) - ((1.059 * fRec35[1]) + 1.130461999999999))) - 112.13878048780487);
501 fRec33[0] = ((fConst61 * ((fConst39 * fRec34[1]) + (fConst1 * fRec34[0]))) + (fConst3 * fRec33[1]));
502 output1[i] = (FAUSTFLOAT)(0.77 * fRec33[0]);
503 // post processing
504 fRec33[1] = fRec33[0];
505 fRec34[1] = fRec34[0];
506 fRec62[1] = fRec62[0];
507 fVec13[1] = fVec13[0];
508 fRec35[2] = fRec35[1]; fRec35[1] = fRec35[0];
509 fRec36[1] = fRec36[0];
510 fRec37[1] = fRec37[0];
511 fRec38[1] = fRec38[0];
512 fRec61[1] = fRec61[0];
513 fVec12[1] = fVec12[0];
514 fRec39[1] = fRec39[0];
515 fRec40[1] = fRec40[0];
516 fRec41[1] = fRec41[0];
517 fRec60[1] = fRec60[0];
518 fVec11[1] = fVec11[0];
519 fRec42[1] = fRec42[0];
520 fVec10[1] = fVec10[0];
521 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
522 fRec59[1] = fRec59[0];
523 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
524 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
525 fRec56[2] = fRec56[1]; fRec56[1] = fRec56[0];
526 fRec57[1] = fRec57[0];
527 fRec50[2] = fRec50[1]; fRec50[1] = fRec50[0];
528 fRec51[1] = fRec51[0];
529 fVec9[1] = fVec9[0];
530 fRec52[2] = fRec52[1]; fRec52[1] = fRec52[0];
531 fRec53[1] = fRec53[0];
532 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
533 fRec44[2] = fRec44[1]; fRec44[1] = fRec44[0];
534 fRec45[1] = fRec45[0];
535 fVec8[1] = fVec8[0];
536 fRec46[2] = fRec46[1]; fRec46[1] = fRec46[0];
537 fRec47[1] = fRec47[0];
538 fRec48[1] = fRec48[0];
539 fVec7[1] = fVec7[0];
540 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
541 fRec0[1] = fRec0[0];
542 fRec1[1] = fRec1[0];
543 fRec32[1] = fRec32[0];
544 fVec6[1] = fVec6[0];
545 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
546 fRec4[1] = fRec4[0];
547 fRec5[1] = fRec5[0];
548 fRec6[1] = fRec6[0];
549 fRec31[1] = fRec31[0];
550 fVec5[1] = fVec5[0];
551 fRec7[1] = fRec7[0];
552 fRec8[1] = fRec8[0];
553 fRec9[1] = fRec9[0];
554 fRec30[1] = fRec30[0];
555 fVec4[1] = fVec4[0];
556 fRec29[1] = fRec29[0];
557 fRec10[1] = fRec10[0];
558 fVec3[1] = fVec3[0];
559 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
560 fRec28[1] = fRec28[0];
561 fRec23[2] = fRec23[1]; fRec23[1] = fRec23[0];
562 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
563 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
564 fRec26[1] = fRec26[0];
565 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
566 fRec20[1] = fRec20[0];
567 fVec2[1] = fVec2[0];
568 fRec21[2] = fRec21[1]; fRec21[1] = fRec21[0];
569 fRec22[1] = fRec22[0];
570 fRec11[2] = fRec11[1]; fRec11[1] = fRec11[0];
571 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
572 fRec13[1] = fRec13[0];
573 fVec1[1] = fVec1[0];
574 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
575 fRec15[1] = fRec15[0];
576 fRec16[1] = fRec16[0];
577 fVec0[1] = fVec0[0];
578 fRec17[2] = fRec17[1]; fRec17[1] = fRec17[0];
579 fRec18[1] = fRec18[0];
580 fRec3[1] = fRec3[0];
581 }
582 #undef fslider0
583 #undef fslider1
584 #undef fslider2
585 #undef fslider3
586 }
587
588 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
589 {
590 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
591 }
592
593
594 void Dsp::connect(uint32_t port,void* data)
595 {
596 switch ((PortIndex)port)
597 {
598 case PREGAIN:
599 fslider3_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
600 break;
601 case DRIVE:
602 fslider2_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
603 break;
604 case WET_DRY:
605 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
606 break;
607 case GAIN1:
608 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
609 break;
610 default:
611 break;
612 }
613 }
614
615 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
616 {
617 static_cast<Dsp*>(p)->connect(port, data);
618 }
619
620
621 PluginLV2 *plugin() {
622 return new Dsp();
623 }
624
625 void Dsp::del_instance(PluginLV2 *p)
626 {
627 delete static_cast<Dsp*>(p);
628 }
629
630 /*
631 typedef enum
632 {
633 PREGAIN,
634 DRIVE,
635 WET_DRY,
636 GAIN1,
637 } PortIndex;
638 */
639
640 } // end namespace gxamp2_stereo
0 // generated from file '../src/LV2/faust/gxamp3.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp3 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fConst60;
109 double fRec6[2];
110 double fConst61;
111 double fConst62;
112 double fConst63;
113 double fVec6[2];
114 double fConst64;
115 double fRec30[2];
116 double fRec5[2];
117 double fRec4[2];
118 double fVec7[2];
119 double fRec3[2];
120 double fConst65;
121 double fConst66;
122 double fConst67;
123 double fVec8[2];
124 double fConst68;
125 double fRec31[2];
126 double fRec2[2];
127 double fRec1[2];
128 void connect(uint32_t port,void* data);
129 void clear_state_f();
130 void init(uint32_t samplingFreq);
131 void compute(int count, float *input0, float *output0);
132
133 static void clear_state_f_static(PluginLV2*);
134 static void init_static(uint32_t samplingFreq, PluginLV2*);
135 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
136 static void del_instance(PluginLV2 *p);
137 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
138 public:
139 Dsp();
140 ~Dsp();
141 };
142
143
144
145 Dsp::Dsp()
146 : PluginLV2() {
147 version = PLUGINLV2_VERSION;
148 id = "12AU7";
149 name = N_("12AU7");
150 mono_audio = compute_static;
151 stereo_audio = 0;
152 set_samplerate = init_static;
153 activate_plugin = 0;
154 connect_ports = connect_static;
155 clear_state = clear_state_f_static;
156 delete_instance = del_instance;
157 }
158
159 Dsp::~Dsp() {
160 }
161
162 inline void Dsp::clear_state_f()
163 {
164 for (int i=0; i<2; i++) fRec0[i] = 0;
165 for (int i=0; i<2; i++) fRec7[i] = 0;
166 for (int i=0; i<2; i++) fRec10[i] = 0;
167 for (int i=0; i<2; i++) fVec0[i] = 0;
168 for (int i=0; i<2; i++) fRec11[i] = 0;
169 for (int i=0; i<3; i++) fRec19[i] = 0;
170 for (int i=0; i<2; i++) fVec1[i] = 0;
171 for (int i=0; i<2; i++) fRec18[i] = 0;
172 for (int i=0; i<2; i++) fRec17[i] = 0;
173 for (int i=0; i<3; i++) fRec16[i] = 0;
174 for (int i=0; i<2; i++) fVec2[i] = 0;
175 for (int i=0; i<2; i++) fRec15[i] = 0;
176 for (int i=0; i<3; i++) fRec14[i] = 0;
177 for (int i=0; i<3; i++) fRec13[i] = 0;
178 for (int i=0; i<2; i++) fRec23[i] = 0;
179 for (int i=0; i<3; i++) fRec22[i] = 0;
180 for (int i=0; i<2; i++) fVec3[i] = 0;
181 for (int i=0; i<2; i++) fRec21[i] = 0;
182 for (int i=0; i<3; i++) fRec20[i] = 0;
183 for (int i=0; i<2; i++) fRec27[i] = 0;
184 for (int i=0; i<3; i++) fRec26[i] = 0;
185 for (int i=0; i<3; i++) fRec25[i] = 0;
186 for (int i=0; i<3; i++) fRec24[i] = 0;
187 for (int i=0; i<2; i++) fRec29[i] = 0;
188 for (int i=0; i<3; i++) fRec28[i] = 0;
189 for (int i=0; i<2; i++) fVec4[i] = 0;
190 for (int i=0; i<2; i++) fRec12[i] = 0;
191 for (int i=0; i<2; i++) fRec9[i] = 0;
192 for (int i=0; i<2; i++) fRec8[i] = 0;
193 for (int i=0; i<2; i++) fVec5[i] = 0;
194 for (int i=0; i<2; i++) fRec6[i] = 0;
195 for (int i=0; i<2; i++) fVec6[i] = 0;
196 for (int i=0; i<2; i++) fRec30[i] = 0;
197 for (int i=0; i<2; i++) fRec5[i] = 0;
198 for (int i=0; i<2; i++) fRec4[i] = 0;
199 for (int i=0; i<2; i++) fVec7[i] = 0;
200 for (int i=0; i<2; i++) fRec3[i] = 0;
201 for (int i=0; i<2; i++) fVec8[i] = 0;
202 for (int i=0; i<2; i++) fRec31[i] = 0;
203 for (int i=0; i<2; i++) fRec2[i] = 0;
204 for (int i=0; i<2; i++) fRec1[i] = 0;
205 }
206
207 void Dsp::clear_state_f_static(PluginLV2 *p)
208 {
209 static_cast<Dsp*>(p)->clear_state_f();
210 }
211
212 inline void Dsp::init(uint32_t samplingFreq)
213 {
214 fSamplingFreq = samplingFreq;
215 iConst0 = min(192000, max(1, fSamplingFreq));
216 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
217 fConst2 = (1 + fConst1);
218 fConst3 = (0 - ((1 - fConst1) / fConst2));
219 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
220 fConst5 = (1 + fConst4);
221 fConst6 = (0 - ((1 - fConst4) / fConst5));
222 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
223 fConst8 = (1 + fConst7);
224 fConst9 = (0 - ((1 - fConst7) / fConst8));
225 fConst10 = (1.0 / fConst8);
226 fConst11 = tan((942.4777960769379 / iConst0));
227 fConst12 = (1.0 / faustpower<2>(fConst11));
228 fConst13 = (2 * (1 - fConst12));
229 fConst14 = (1.0 / fConst11);
230 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
231 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
232 fConst17 = tan((3769.9111843077517 / iConst0));
233 fConst18 = (1.0 / faustpower<2>(fConst17));
234 fConst19 = (2 * (1 - fConst18));
235 fConst20 = (1.0 / fConst17);
236 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
237 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
238 fConst23 = (1.0 / fConst22);
239 fConst24 = (1 + fConst20);
240 fConst25 = (0 - ((1 - fConst20) / fConst24));
241 fConst26 = tan((10053.096491487338 / iConst0));
242 fConst27 = (1.0 / faustpower<2>(fConst26));
243 fConst28 = (2 * (1 - fConst27));
244 fConst29 = (1.0 / fConst26);
245 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
246 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
247 fConst32 = (1.0 / fConst31);
248 fConst33 = (1 + fConst29);
249 fConst34 = (0 - ((1 - fConst29) / fConst33));
250 fConst35 = tan((47123.8898038469 / iConst0));
251 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
252 fConst37 = (1.0 / fConst35);
253 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
254 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
255 fConst40 = (1.0 / fConst39);
256 fConst41 = (0 - fConst1);
257 fConst42 = (1.0 / (fConst2 * fConst39));
258 fConst43 = (1.0 / fConst33);
259 fConst44 = (0 - fConst20);
260 fConst45 = (1.0 / (fConst24 * fConst31));
261 fConst46 = (2 * (0 - fConst18));
262 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
263 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
264 fConst49 = (1 + fConst14);
265 fConst50 = (0 - ((1 - fConst14) / fConst49));
266 fConst51 = (0 - fConst14);
267 fConst52 = (1.0 / (fConst49 * fConst22));
268 fConst53 = (2 * (0 - fConst12));
269 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
270 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
271 fConst56 = (0 - fConst29);
272 fConst57 = (2 * (0 - fConst27));
273 fConst58 = (1.0 / fConst5);
274 fConst59 = (0.025 / fConst2);
275 fConst60 = (2.0 / fConst5);
276 fConst61 = (1.0 / tan((414.6902302738527 / iConst0)));
277 fConst62 = (1 + fConst61);
278 fConst63 = (0 - ((1 - fConst61) / fConst62));
279 fConst64 = (1.0 / fConst62);
280 fConst65 = (1.0 / tan((609.4689747964198 / iConst0)));
281 fConst66 = (1 + fConst65);
282 fConst67 = (0 - ((1 - fConst65) / fConst66));
283 fConst68 = (1.0 / fConst66);
284 clear_state_f();
285 }
286
287 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
288 {
289 static_cast<Dsp*>(p)->init(samplingFreq);
290 }
291
292 inline void Dsp::compute(int count, float *input0, float *output0)
293 {
294 #define fslider0 (*fslider0_)
295 #define fslider1 (*fslider1_)
296 #define fslider2 (*fslider2_)
297 #define fslider3 (*fslider3_)
298 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
299 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
300 double fSlow2 = (1.000000000000001e-05 * fslider2);
301 double fSlow3 = fslider3;
302 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
303 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
304 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
305 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
306 double fSlow8 = (2 * (fSlow3 - 0.5));
307 double fSlow9 = (1 - max(0, (0 - fSlow8)));
308 double fSlow10 = (1 - max(0, fSlow8));
309 double fSlow11 = (1.25 * fSlow3);
310 for (int i=0; i<count; i++) {
311 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
312 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
313 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
314 double fTemp0 = (double)input0[i];
315 double fTemp1 = (fTemp0 * (1 - fRec10[0]));
316 double fTemp2 = (1e-15 + (0.027 * fRec9[1]));
317 fVec0[0] = fTemp2;
318 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
319 double fTemp3 = (fConst13 * fRec13[1]);
320 double fTemp4 = (1e-15 + (fTemp0 * fRec10[0]));
321 fRec19[0] = (fTemp4 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
322 double fTemp5 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
323 fVec1[0] = fTemp5;
324 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
325 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
326 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
327 double fTemp6 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
328 fVec2[0] = fTemp6;
329 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
330 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
331 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp3)));
332 double fTemp7 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp3 + (fConst15 * fRec13[0])))))));
333 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
334 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
335 double fTemp8 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
336 fVec3[0] = fTemp8;
337 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
338 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
339 double fTemp9 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
340 double fTemp10 = (fConst13 * fRec24[1]);
341 double fTemp11 = (fConst19 * fRec25[1]);
342 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
343 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
344 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp11)));
345 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp11 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp10)));
346 double fTemp12 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp10 + (fConst15 * fRec24[0])))))));
347 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
348 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
349 double fTemp13 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
350 double fTemp14 = ((1.2589412 * (fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13))))) + (1.584893192 * ((fTemp12 * (1 - (0.3333333333333333 * faustpower<2>(fTemp12)))) + ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + (0.8413951417869425 * (fTemp7 * (1 - (0.3333333333333333 * faustpower<2>(fTemp7)))))))));
351 fVec4[0] = fTemp14;
352 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
353 double fTemp15 = (1e-15 + fTemp1);
354 fRec9[0] = (Ftube(TUBE_TABLE_12AU7_68k, (((fSlow11 * ((fTemp15 * (4 - (4 * fabs(fTemp15)))) - fTemp15)) + ((fSlow10 * fTemp4) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp1)))) - 3.7189619999999977)) - 112.26066666666668);
355 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
356 double fTemp16 = (fRec8[0] * fRec7[0]);
357 fVec5[0] = fTemp16;
358 fRec6[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
359 double fTemp17 = (1e-15 + (0.015 * fRec5[1]));
360 fVec6[0] = fTemp17;
361 fRec30[0] = ((fConst64 * (fVec6[0] + fVec6[1])) + (fConst63 * fRec30[1]));
362 fRec5[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec30[0] + fRec6[0]) - 2.314843999999999)) - 95.67706666666666);
363 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
364 double fTemp18 = (fRec7[0] * fRec4[0]);
365 fVec7[0] = fTemp18;
366 fRec3[0] = ((fConst60 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
367 double fTemp19 = (1e-15 + (0.0082 * fRec2[1]));
368 fVec8[0] = fTemp19;
369 fRec31[0] = ((fConst68 * (fVec8[0] + fVec8[1])) + (fConst67 * fRec31[1]));
370 fRec2[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec31[0] + fRec3[0]) - 1.356566999999999)) - 84.565);
371 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
372 output0[i] = (FAUSTFLOAT)(2.0 * (fRec1[0] * fRec0[0]));
373 // post processing
374 fRec1[1] = fRec1[0];
375 fRec2[1] = fRec2[0];
376 fRec31[1] = fRec31[0];
377 fVec8[1] = fVec8[0];
378 fRec3[1] = fRec3[0];
379 fVec7[1] = fVec7[0];
380 fRec4[1] = fRec4[0];
381 fRec5[1] = fRec5[0];
382 fRec30[1] = fRec30[0];
383 fVec6[1] = fVec6[0];
384 fRec6[1] = fRec6[0];
385 fVec5[1] = fVec5[0];
386 fRec8[1] = fRec8[0];
387 fRec9[1] = fRec9[0];
388 fRec12[1] = fRec12[0];
389 fVec4[1] = fVec4[0];
390 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
391 fRec29[1] = fRec29[0];
392 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
393 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
394 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
395 fRec27[1] = fRec27[0];
396 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
397 fRec21[1] = fRec21[0];
398 fVec3[1] = fVec3[0];
399 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
400 fRec23[1] = fRec23[0];
401 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
402 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
403 fRec15[1] = fRec15[0];
404 fVec2[1] = fVec2[0];
405 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
406 fRec17[1] = fRec17[0];
407 fRec18[1] = fRec18[0];
408 fVec1[1] = fVec1[0];
409 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
410 fRec11[1] = fRec11[0];
411 fVec0[1] = fVec0[0];
412 fRec10[1] = fRec10[0];
413 fRec7[1] = fRec7[0];
414 fRec0[1] = fRec0[0];
415 }
416 #undef fslider0
417 #undef fslider1
418 #undef fslider2
419 #undef fslider3
420 }
421
422 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
423 {
424 static_cast<Dsp*>(p)->compute(count, input0, output0);
425 }
426
427
428 void Dsp::connect(uint32_t port,void* data)
429 {
430 switch ((PortIndex)port)
431 {
432 case DRIVE:
433 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
434 break;
435 case WET_DRY:
436 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
437 break;
438 case PREGAIN:
439 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
440 break;
441 case GAIN1:
442 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
443 break;
444 default:
445 break;
446 }
447 }
448
449 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
450 {
451 static_cast<Dsp*>(p)->connect(port, data);
452 }
453
454
455 PluginLV2 *plugin() {
456 return new Dsp();
457 }
458
459 void Dsp::del_instance(PluginLV2 *p)
460 {
461 delete static_cast<Dsp*>(p);
462 }
463
464 /*
465 typedef enum
466 {
467 DRIVE,
468 WET_DRY,
469 PREGAIN,
470 GAIN1,
471 } PortIndex;
472 */
473
474 } // end namespace gxamp3
0 // generated from file '../src/LV2/faust/gxamp3_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp3_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fConst60;
109 double fRec6[2];
110 double fConst61;
111 double fConst62;
112 double fConst63;
113 double fVec6[2];
114 double fConst64;
115 double fRec30[2];
116 double fRec5[2];
117 double fRec4[2];
118 double fVec7[2];
119 double fRec3[2];
120 double fConst65;
121 double fConst66;
122 double fConst67;
123 double fVec8[2];
124 double fConst68;
125 double fRec31[2];
126 double fRec2[2];
127 double fRec1[2];
128 double fVec9[2];
129 double fRec40[2];
130 double fRec48[3];
131 double fVec10[2];
132 double fRec47[2];
133 double fRec46[2];
134 double fRec45[3];
135 double fVec11[2];
136 double fRec44[2];
137 double fRec43[3];
138 double fRec42[3];
139 double fRec52[2];
140 double fRec51[3];
141 double fVec12[2];
142 double fRec50[2];
143 double fRec49[3];
144 double fRec56[2];
145 double fRec55[3];
146 double fRec54[3];
147 double fRec53[3];
148 double fRec58[2];
149 double fRec57[3];
150 double fVec13[2];
151 double fRec41[2];
152 double fRec39[2];
153 double fRec38[2];
154 double fVec14[2];
155 double fRec37[2];
156 double fVec15[2];
157 double fRec59[2];
158 double fRec36[2];
159 double fRec35[2];
160 double fVec16[2];
161 double fRec34[2];
162 double fVec17[2];
163 double fRec60[2];
164 double fRec33[2];
165 double fRec32[2];
166 void connect(uint32_t port,void* data);
167 void clear_state_f();
168 void init(uint32_t samplingFreq);
169 void compute(int count, float *input0, float *input1, float *output0, float *output1);
170
171 static void clear_state_f_static(PluginLV2*);
172 static void init_static(uint32_t samplingFreq, PluginLV2*);
173 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
174 static void del_instance(PluginLV2 *p);
175 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
176 public:
177 Dsp();
178 ~Dsp();
179 };
180
181
182
183 Dsp::Dsp()
184 : PluginLV2() {
185 version = PLUGINLV2_VERSION;
186 id = "12AU7";
187 name = N_("12AU7");
188 mono_audio = 0;
189 stereo_audio = compute_static;
190 set_samplerate = init_static;
191 activate_plugin = 0;
192 connect_ports = connect_static;
193 clear_state = clear_state_f_static;
194 delete_instance = del_instance;
195 }
196
197 Dsp::~Dsp() {
198 }
199
200 inline void Dsp::clear_state_f()
201 {
202 for (int i=0; i<2; i++) fRec0[i] = 0;
203 for (int i=0; i<2; i++) fRec7[i] = 0;
204 for (int i=0; i<2; i++) fRec10[i] = 0;
205 for (int i=0; i<2; i++) fVec0[i] = 0;
206 for (int i=0; i<2; i++) fRec11[i] = 0;
207 for (int i=0; i<3; i++) fRec19[i] = 0;
208 for (int i=0; i<2; i++) fVec1[i] = 0;
209 for (int i=0; i<2; i++) fRec18[i] = 0;
210 for (int i=0; i<2; i++) fRec17[i] = 0;
211 for (int i=0; i<3; i++) fRec16[i] = 0;
212 for (int i=0; i<2; i++) fVec2[i] = 0;
213 for (int i=0; i<2; i++) fRec15[i] = 0;
214 for (int i=0; i<3; i++) fRec14[i] = 0;
215 for (int i=0; i<3; i++) fRec13[i] = 0;
216 for (int i=0; i<2; i++) fRec23[i] = 0;
217 for (int i=0; i<3; i++) fRec22[i] = 0;
218 for (int i=0; i<2; i++) fVec3[i] = 0;
219 for (int i=0; i<2; i++) fRec21[i] = 0;
220 for (int i=0; i<3; i++) fRec20[i] = 0;
221 for (int i=0; i<2; i++) fRec27[i] = 0;
222 for (int i=0; i<3; i++) fRec26[i] = 0;
223 for (int i=0; i<3; i++) fRec25[i] = 0;
224 for (int i=0; i<3; i++) fRec24[i] = 0;
225 for (int i=0; i<2; i++) fRec29[i] = 0;
226 for (int i=0; i<3; i++) fRec28[i] = 0;
227 for (int i=0; i<2; i++) fVec4[i] = 0;
228 for (int i=0; i<2; i++) fRec12[i] = 0;
229 for (int i=0; i<2; i++) fRec9[i] = 0;
230 for (int i=0; i<2; i++) fRec8[i] = 0;
231 for (int i=0; i<2; i++) fVec5[i] = 0;
232 for (int i=0; i<2; i++) fRec6[i] = 0;
233 for (int i=0; i<2; i++) fVec6[i] = 0;
234 for (int i=0; i<2; i++) fRec30[i] = 0;
235 for (int i=0; i<2; i++) fRec5[i] = 0;
236 for (int i=0; i<2; i++) fRec4[i] = 0;
237 for (int i=0; i<2; i++) fVec7[i] = 0;
238 for (int i=0; i<2; i++) fRec3[i] = 0;
239 for (int i=0; i<2; i++) fVec8[i] = 0;
240 for (int i=0; i<2; i++) fRec31[i] = 0;
241 for (int i=0; i<2; i++) fRec2[i] = 0;
242 for (int i=0; i<2; i++) fRec1[i] = 0;
243 for (int i=0; i<2; i++) fVec9[i] = 0;
244 for (int i=0; i<2; i++) fRec40[i] = 0;
245 for (int i=0; i<3; i++) fRec48[i] = 0;
246 for (int i=0; i<2; i++) fVec10[i] = 0;
247 for (int i=0; i<2; i++) fRec47[i] = 0;
248 for (int i=0; i<2; i++) fRec46[i] = 0;
249 for (int i=0; i<3; i++) fRec45[i] = 0;
250 for (int i=0; i<2; i++) fVec11[i] = 0;
251 for (int i=0; i<2; i++) fRec44[i] = 0;
252 for (int i=0; i<3; i++) fRec43[i] = 0;
253 for (int i=0; i<3; i++) fRec42[i] = 0;
254 for (int i=0; i<2; i++) fRec52[i] = 0;
255 for (int i=0; i<3; i++) fRec51[i] = 0;
256 for (int i=0; i<2; i++) fVec12[i] = 0;
257 for (int i=0; i<2; i++) fRec50[i] = 0;
258 for (int i=0; i<3; i++) fRec49[i] = 0;
259 for (int i=0; i<2; i++) fRec56[i] = 0;
260 for (int i=0; i<3; i++) fRec55[i] = 0;
261 for (int i=0; i<3; i++) fRec54[i] = 0;
262 for (int i=0; i<3; i++) fRec53[i] = 0;
263 for (int i=0; i<2; i++) fRec58[i] = 0;
264 for (int i=0; i<3; i++) fRec57[i] = 0;
265 for (int i=0; i<2; i++) fVec13[i] = 0;
266 for (int i=0; i<2; i++) fRec41[i] = 0;
267 for (int i=0; i<2; i++) fRec39[i] = 0;
268 for (int i=0; i<2; i++) fRec38[i] = 0;
269 for (int i=0; i<2; i++) fVec14[i] = 0;
270 for (int i=0; i<2; i++) fRec37[i] = 0;
271 for (int i=0; i<2; i++) fVec15[i] = 0;
272 for (int i=0; i<2; i++) fRec59[i] = 0;
273 for (int i=0; i<2; i++) fRec36[i] = 0;
274 for (int i=0; i<2; i++) fRec35[i] = 0;
275 for (int i=0; i<2; i++) fVec16[i] = 0;
276 for (int i=0; i<2; i++) fRec34[i] = 0;
277 for (int i=0; i<2; i++) fVec17[i] = 0;
278 for (int i=0; i<2; i++) fRec60[i] = 0;
279 for (int i=0; i<2; i++) fRec33[i] = 0;
280 for (int i=0; i<2; i++) fRec32[i] = 0;
281 }
282
283 void Dsp::clear_state_f_static(PluginLV2 *p)
284 {
285 static_cast<Dsp*>(p)->clear_state_f();
286 }
287
288 inline void Dsp::init(uint32_t samplingFreq)
289 {
290 fSamplingFreq = samplingFreq;
291 iConst0 = min(192000, max(1, fSamplingFreq));
292 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
293 fConst2 = (1 + fConst1);
294 fConst3 = (0 - ((1 - fConst1) / fConst2));
295 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
296 fConst5 = (1 + fConst4);
297 fConst6 = (0 - ((1 - fConst4) / fConst5));
298 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
299 fConst8 = (1 + fConst7);
300 fConst9 = (0 - ((1 - fConst7) / fConst8));
301 fConst10 = (1.0 / fConst8);
302 fConst11 = tan((942.4777960769379 / iConst0));
303 fConst12 = (1.0 / faustpower<2>(fConst11));
304 fConst13 = (2 * (1 - fConst12));
305 fConst14 = (1.0 / fConst11);
306 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
307 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
308 fConst17 = tan((3769.9111843077517 / iConst0));
309 fConst18 = (1.0 / faustpower<2>(fConst17));
310 fConst19 = (2 * (1 - fConst18));
311 fConst20 = (1.0 / fConst17);
312 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
313 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
314 fConst23 = (1.0 / fConst22);
315 fConst24 = (1 + fConst20);
316 fConst25 = (0 - ((1 - fConst20) / fConst24));
317 fConst26 = tan((10053.096491487338 / iConst0));
318 fConst27 = (1.0 / faustpower<2>(fConst26));
319 fConst28 = (2 * (1 - fConst27));
320 fConst29 = (1.0 / fConst26);
321 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
322 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
323 fConst32 = (1.0 / fConst31);
324 fConst33 = (1 + fConst29);
325 fConst34 = (0 - ((1 - fConst29) / fConst33));
326 fConst35 = tan((47123.8898038469 / iConst0));
327 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
328 fConst37 = (1.0 / fConst35);
329 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
330 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
331 fConst40 = (1.0 / fConst39);
332 fConst41 = (0 - fConst1);
333 fConst42 = (1.0 / (fConst2 * fConst39));
334 fConst43 = (1.0 / fConst33);
335 fConst44 = (0 - fConst20);
336 fConst45 = (1.0 / (fConst24 * fConst31));
337 fConst46 = (2 * (0 - fConst18));
338 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
339 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
340 fConst49 = (1 + fConst14);
341 fConst50 = (0 - ((1 - fConst14) / fConst49));
342 fConst51 = (0 - fConst14);
343 fConst52 = (1.0 / (fConst49 * fConst22));
344 fConst53 = (2 * (0 - fConst12));
345 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
346 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
347 fConst56 = (0 - fConst29);
348 fConst57 = (2 * (0 - fConst27));
349 fConst58 = (1.0 / fConst5);
350 fConst59 = (0.025 / fConst2);
351 fConst60 = (2.0 / fConst5);
352 fConst61 = (1.0 / tan((414.6902302738527 / iConst0)));
353 fConst62 = (1 + fConst61);
354 fConst63 = (0 - ((1 - fConst61) / fConst62));
355 fConst64 = (1.0 / fConst62);
356 fConst65 = (1.0 / tan((609.4689747964198 / iConst0)));
357 fConst66 = (1 + fConst65);
358 fConst67 = (0 - ((1 - fConst65) / fConst66));
359 fConst68 = (1.0 / fConst66);
360 clear_state_f();
361 }
362
363 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
364 {
365 static_cast<Dsp*>(p)->init(samplingFreq);
366 }
367
368 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
369 {
370 #define fslider0 (*fslider0_)
371 #define fslider1 (*fslider1_)
372 #define fslider2 (*fslider2_)
373 #define fslider3 (*fslider3_)
374 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
375 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
376 double fSlow2 = (1.000000000000001e-05 * fslider2);
377 double fSlow3 = fslider3;
378 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
379 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
380 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
381 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
382 double fSlow8 = (2 * (fSlow3 - 0.5));
383 double fSlow9 = (1 - max(0, (0 - fSlow8)));
384 double fSlow10 = (1 - max(0, fSlow8));
385 double fSlow11 = (1.25 * fSlow3);
386 for (int i=0; i<count; i++) {
387 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
388 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
389 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
390 double fTemp0 = (1 - fRec10[0]);
391 double fTemp1 = (double)input0[i];
392 double fTemp2 = (fTemp1 * fTemp0);
393 double fTemp3 = (1e-15 + (0.027 * fRec9[1]));
394 fVec0[0] = fTemp3;
395 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
396 double fTemp4 = (fConst13 * fRec13[1]);
397 double fTemp5 = (1e-15 + (fTemp1 * fRec10[0]));
398 fRec19[0] = (fTemp5 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
399 double fTemp6 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
400 fVec1[0] = fTemp6;
401 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
402 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
403 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
404 double fTemp7 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
405 fVec2[0] = fTemp7;
406 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
407 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
408 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp4)));
409 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp4 + (fConst15 * fRec13[0])))))));
410 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
411 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
412 double fTemp9 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
413 fVec3[0] = fTemp9;
414 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
415 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
416 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
417 double fTemp11 = (fConst13 * fRec24[1]);
418 double fTemp12 = (fConst19 * fRec25[1]);
419 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
420 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
421 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp12)));
422 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp12 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp11)));
423 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp11 + (fConst15 * fRec24[0])))))));
424 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
425 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
426 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
427 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
428 fVec4[0] = fTemp15;
429 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
430 double fTemp16 = (1e-15 + fTemp2);
431 fRec9[0] = (Ftube(TUBE_TABLE_12AU7_68k, (((fSlow11 * ((fTemp16 * (4 - (4 * fabs(fTemp16)))) - fTemp16)) + ((fSlow10 * fTemp5) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp2)))) - 3.7189619999999977)) - 112.26066666666668);
432 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
433 double fTemp17 = (fRec8[0] * fRec7[0]);
434 fVec5[0] = fTemp17;
435 fRec6[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
436 double fTemp18 = (1e-15 + (0.015 * fRec5[1]));
437 fVec6[0] = fTemp18;
438 fRec30[0] = ((fConst64 * (fVec6[0] + fVec6[1])) + (fConst63 * fRec30[1]));
439 fRec5[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec30[0] + fRec6[0]) - 2.314843999999999)) - 95.67706666666666);
440 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
441 double fTemp19 = (fRec7[0] * fRec4[0]);
442 fVec7[0] = fTemp19;
443 fRec3[0] = ((fConst60 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
444 double fTemp20 = (1e-15 + (0.0082 * fRec2[1]));
445 fVec8[0] = fTemp20;
446 fRec31[0] = ((fConst68 * (fVec8[0] + fVec8[1])) + (fConst67 * fRec31[1]));
447 fRec2[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec31[0] + fRec3[0]) - 1.356566999999999)) - 84.565);
448 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
449 output0[i] = (FAUSTFLOAT)(2.0 * (fRec1[0] * fRec0[0]));
450 double fTemp21 = (double)input1[i];
451 double fTemp22 = (fTemp21 * fTemp0);
452 double fTemp23 = (1e-15 + (0.027 * fRec39[1]));
453 fVec9[0] = fTemp23;
454 fRec40[0] = ((fConst10 * (fVec9[0] + fVec9[1])) + (fConst9 * fRec40[1]));
455 double fTemp24 = (fConst13 * fRec42[1]);
456 double fTemp25 = (1e-15 + (fTemp21 * fRec10[0]));
457 fRec48[0] = (fTemp25 - (fConst40 * ((fConst38 * fRec48[2]) + (fConst36 * fRec48[1]))));
458 double fTemp26 = (fRec48[2] + (fRec48[0] + (2 * fRec48[1])));
459 fVec10[0] = fTemp26;
460 fRec47[0] = ((fConst42 * ((fConst41 * fVec10[1]) + (fConst1 * fVec10[0]))) + (fConst3 * fRec47[1]));
461 fRec46[0] = ((fConst43 * (fRec47[0] + fRec47[1])) + (fConst34 * fRec46[1]));
462 fRec45[0] = (fRec46[0] - (fConst32 * ((fConst30 * fRec45[2]) + (fConst28 * fRec45[1]))));
463 double fTemp27 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
464 fVec11[0] = fTemp27;
465 fRec44[0] = ((fConst45 * ((fConst44 * fVec11[1]) + (fConst20 * fVec11[0]))) + (fConst25 * fRec44[1]));
466 fRec43[0] = (fRec44[0] - (fConst23 * ((fConst21 * fRec43[2]) + (fConst19 * fRec43[1]))));
467 fRec42[0] = ((fConst23 * (((fConst18 * fRec43[0]) + (fConst46 * fRec43[1])) + (fConst18 * fRec43[2]))) - (fConst16 * ((fConst15 * fRec42[2]) + fTemp24)));
468 double fTemp28 = max(-1, min(1, (fSlow4 * (fRec42[2] + (fConst16 * (fTemp24 + (fConst15 * fRec42[0])))))));
469 fRec52[0] = ((fConst45 * (fVec11[0] + fVec11[1])) + (fConst25 * fRec52[1]));
470 fRec51[0] = (fRec52[0] - (fConst23 * ((fConst21 * fRec51[2]) + (fConst19 * fRec51[1]))));
471 double fTemp29 = (fRec51[2] + (fRec51[0] + (2 * fRec51[1])));
472 fVec12[0] = fTemp29;
473 fRec50[0] = ((fConst52 * ((fConst51 * fVec12[1]) + (fConst14 * fVec12[0]))) + (fConst50 * fRec50[1]));
474 fRec49[0] = (fRec50[0] - (fConst48 * ((fConst47 * fRec49[2]) + (fConst13 * fRec49[1]))));
475 double fTemp30 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec49[0]) + (fConst53 * fRec49[1])) + (fConst12 * fRec49[2])))));
476 double fTemp31 = (fConst13 * fRec53[1]);
477 double fTemp32 = (fConst19 * fRec54[1]);
478 fRec56[0] = ((fConst43 * ((fConst56 * fRec47[1]) + (fConst29 * fRec47[0]))) + (fConst34 * fRec56[1]));
479 fRec55[0] = (fRec56[0] - (fConst32 * ((fConst30 * fRec55[2]) + (fConst28 * fRec55[1]))));
480 fRec54[0] = ((fConst32 * (((fConst27 * fRec55[0]) + (fConst57 * fRec55[1])) + (fConst27 * fRec55[2]))) - (fConst55 * ((fConst54 * fRec54[2]) + fTemp32)));
481 fRec53[0] = ((fRec54[2] + (fConst55 * (fTemp32 + (fConst54 * fRec54[0])))) - (fConst16 * ((fConst15 * fRec53[2]) + fTemp31)));
482 double fTemp33 = max(-1, min(1, (fSlow6 * (fRec53[2] + (fConst16 * (fTemp31 + (fConst15 * fRec53[0])))))));
483 fRec58[0] = ((fConst52 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec58[1]));
484 fRec57[0] = (fRec58[0] - (fConst48 * ((fConst47 * fRec57[2]) + (fConst13 * fRec57[1]))));
485 double fTemp34 = max(-1, min(1, (fSlow7 * (fRec57[2] + (fRec57[0] + (2 * fRec57[1]))))));
486 double fTemp35 = ((1.2589412 * (fTemp34 * (1 - (0.3333333333333333 * faustpower<2>(fTemp34))))) + (1.584893192 * ((fTemp33 * (1 - (0.3333333333333333 * faustpower<2>(fTemp33)))) + ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + (0.8413951417869425 * (fTemp28 * (1 - (0.3333333333333333 * faustpower<2>(fTemp28)))))))));
487 fVec13[0] = fTemp35;
488 fRec41[0] = ((fConst58 * (fVec13[0] + fVec13[1])) + (fConst6 * fRec41[1]));
489 double fTemp36 = (1e-15 + fTemp22);
490 fRec39[0] = (Ftube(TUBE_TABLE_12AU7_68k, (((fSlow11 * ((fTemp36 * (4 - (4 * fabs(fTemp36)))) - fTemp36)) + ((fSlow10 * fTemp25) + ((fSlow9 * fRec41[0]) + (fRec40[0] + fTemp22)))) - 3.7189619999999977)) - 112.26066666666668);
491 fRec38[0] = ((fConst59 * ((fConst41 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
492 double fTemp37 = (fRec7[0] * fRec38[0]);
493 fVec14[0] = fTemp37;
494 fRec37[0] = ((fConst60 * (fVec14[0] + fVec14[1])) + (fConst6 * fRec37[1]));
495 double fTemp38 = (1e-15 + (0.015 * fRec36[1]));
496 fVec15[0] = fTemp38;
497 fRec59[0] = ((fConst64 * (fVec15[0] + fVec15[1])) + (fConst63 * fRec59[1]));
498 fRec36[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec59[0] + fRec37[0]) - 2.314843999999999)) - 95.67706666666666);
499 fRec35[0] = ((fConst59 * ((fConst41 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
500 double fTemp39 = (fRec7[0] * fRec35[0]);
501 fVec16[0] = fTemp39;
502 fRec34[0] = ((fConst60 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec34[1]));
503 double fTemp40 = (1e-15 + (0.0082 * fRec33[1]));
504 fVec17[0] = fTemp40;
505 fRec60[0] = ((fConst68 * (fVec17[0] + fVec17[1])) + (fConst67 * fRec60[1]));
506 fRec33[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec60[0] + fRec34[0]) - 1.356566999999999)) - 84.565);
507 fRec32[0] = ((fConst59 * ((fConst41 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
508 output1[i] = (FAUSTFLOAT)(2.0 * (fRec0[0] * fRec32[0]));
509 // post processing
510 fRec32[1] = fRec32[0];
511 fRec33[1] = fRec33[0];
512 fRec60[1] = fRec60[0];
513 fVec17[1] = fVec17[0];
514 fRec34[1] = fRec34[0];
515 fVec16[1] = fVec16[0];
516 fRec35[1] = fRec35[0];
517 fRec36[1] = fRec36[0];
518 fRec59[1] = fRec59[0];
519 fVec15[1] = fVec15[0];
520 fRec37[1] = fRec37[0];
521 fVec14[1] = fVec14[0];
522 fRec38[1] = fRec38[0];
523 fRec39[1] = fRec39[0];
524 fRec41[1] = fRec41[0];
525 fVec13[1] = fVec13[0];
526 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
527 fRec58[1] = fRec58[0];
528 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
529 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
530 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
531 fRec56[1] = fRec56[0];
532 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
533 fRec50[1] = fRec50[0];
534 fVec12[1] = fVec12[0];
535 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
536 fRec52[1] = fRec52[0];
537 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
538 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
539 fRec44[1] = fRec44[0];
540 fVec11[1] = fVec11[0];
541 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
542 fRec46[1] = fRec46[0];
543 fRec47[1] = fRec47[0];
544 fVec10[1] = fVec10[0];
545 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
546 fRec40[1] = fRec40[0];
547 fVec9[1] = fVec9[0];
548 fRec1[1] = fRec1[0];
549 fRec2[1] = fRec2[0];
550 fRec31[1] = fRec31[0];
551 fVec8[1] = fVec8[0];
552 fRec3[1] = fRec3[0];
553 fVec7[1] = fVec7[0];
554 fRec4[1] = fRec4[0];
555 fRec5[1] = fRec5[0];
556 fRec30[1] = fRec30[0];
557 fVec6[1] = fVec6[0];
558 fRec6[1] = fRec6[0];
559 fVec5[1] = fVec5[0];
560 fRec8[1] = fRec8[0];
561 fRec9[1] = fRec9[0];
562 fRec12[1] = fRec12[0];
563 fVec4[1] = fVec4[0];
564 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
565 fRec29[1] = fRec29[0];
566 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
567 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
568 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
569 fRec27[1] = fRec27[0];
570 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
571 fRec21[1] = fRec21[0];
572 fVec3[1] = fVec3[0];
573 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
574 fRec23[1] = fRec23[0];
575 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
576 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
577 fRec15[1] = fRec15[0];
578 fVec2[1] = fVec2[0];
579 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
580 fRec17[1] = fRec17[0];
581 fRec18[1] = fRec18[0];
582 fVec1[1] = fVec1[0];
583 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
584 fRec11[1] = fRec11[0];
585 fVec0[1] = fVec0[0];
586 fRec10[1] = fRec10[0];
587 fRec7[1] = fRec7[0];
588 fRec0[1] = fRec0[0];
589 }
590 #undef fslider0
591 #undef fslider1
592 #undef fslider2
593 #undef fslider3
594 }
595
596 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
597 {
598 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
599 }
600
601
602 void Dsp::connect(uint32_t port,void* data)
603 {
604 switch ((PortIndex)port)
605 {
606 case DRIVE:
607 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
608 break;
609 case WET_DRY:
610 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
611 break;
612 case PREGAIN:
613 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
614 break;
615 case GAIN1:
616 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
617 break;
618 default:
619 break;
620 }
621 }
622
623 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
624 {
625 static_cast<Dsp*>(p)->connect(port, data);
626 }
627
628
629 PluginLV2 *plugin() {
630 return new Dsp();
631 }
632
633 void Dsp::del_instance(PluginLV2 *p)
634 {
635 delete static_cast<Dsp*>(p);
636 }
637
638 /*
639 typedef enum
640 {
641 DRIVE,
642 WET_DRY,
643 PREGAIN,
644 GAIN1,
645 } PortIndex;
646 */
647
648 } // end namespace gxamp3_stereo
0 // generated from file '../src/LV2/faust/gxamp4.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp4 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fConst68;
130 double fRec0[2];
131 double fVec9[2];
132 double fRec37[2];
133 double fRec36[2];
134 double fRec35[2];
135 void connect(uint32_t port,void* data);
136 void clear_state_f();
137 void init(uint32_t samplingFreq);
138 void compute(int count, float *input0, float *output0);
139
140 static void clear_state_f_static(PluginLV2*);
141 static void init_static(uint32_t samplingFreq, PluginLV2*);
142 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
143 static void del_instance(PluginLV2 *p);
144 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
145 public:
146 Dsp();
147 ~Dsp();
148 };
149
150
151
152 Dsp::Dsp()
153 : PluginLV2() {
154 version = PLUGINLV2_VERSION;
155 id = "pre 12AU7/ master 6V6";
156 name = N_("pre 12AU7/ master 6V6");
157 mono_audio = compute_static;
158 stereo_audio = 0;
159 set_samplerate = init_static;
160 activate_plugin = 0;
161 connect_ports = connect_static;
162 clear_state = clear_state_f_static;
163 delete_instance = del_instance;
164 }
165
166 Dsp::~Dsp() {
167 }
168
169 inline void Dsp::clear_state_f()
170 {
171 for (int i=0; i<2; i++) fVec0[i] = 0;
172 for (int i=0; i<2; i++) fRec2[i] = 0;
173 for (int i=0; i<2; i++) fRec3[i] = 0;
174 for (int i=0; i<2; i++) fRec13[i] = 0;
175 for (int i=0; i<2; i++) fRec21[i] = 0;
176 for (int i=0; i<2; i++) fVec1[i] = 0;
177 for (int i=0; i<2; i++) fRec22[i] = 0;
178 for (int i=0; i<2; i++) fRec20[i] = 0;
179 for (int i=0; i<2; i++) fRec19[i] = 0;
180 for (int i=0; i<2; i++) fRec18[i] = 0;
181 for (int i=0; i<2; i++) fVec2[i] = 0;
182 for (int i=0; i<2; i++) fRec23[i] = 0;
183 for (int i=0; i<2; i++) fRec17[i] = 0;
184 for (int i=0; i<2; i++) fRec16[i] = 0;
185 for (int i=0; i<2; i++) fVec3[i] = 0;
186 for (int i=0; i<2; i++) fRec24[i] = 0;
187 for (int i=0; i<2; i++) fRec15[i] = 0;
188 for (int i=0; i<2; i++) fRec14[i] = 0;
189 for (int i=0; i<3; i++) fRec12[i] = 0;
190 for (int i=0; i<2; i++) fVec4[i] = 0;
191 for (int i=0; i<2; i++) fRec11[i] = 0;
192 for (int i=0; i<2; i++) fRec10[i] = 0;
193 for (int i=0; i<3; i++) fRec9[i] = 0;
194 for (int i=0; i<2; i++) fVec5[i] = 0;
195 for (int i=0; i<2; i++) fRec8[i] = 0;
196 for (int i=0; i<3; i++) fRec7[i] = 0;
197 for (int i=0; i<3; i++) fRec6[i] = 0;
198 for (int i=0; i<2; i++) fRec28[i] = 0;
199 for (int i=0; i<3; i++) fRec27[i] = 0;
200 for (int i=0; i<2; i++) fVec6[i] = 0;
201 for (int i=0; i<2; i++) fRec26[i] = 0;
202 for (int i=0; i<3; i++) fRec25[i] = 0;
203 for (int i=0; i<2; i++) fRec32[i] = 0;
204 for (int i=0; i<3; i++) fRec31[i] = 0;
205 for (int i=0; i<3; i++) fRec30[i] = 0;
206 for (int i=0; i<3; i++) fRec29[i] = 0;
207 for (int i=0; i<2; i++) fRec34[i] = 0;
208 for (int i=0; i<3; i++) fRec33[i] = 0;
209 for (int i=0; i<2; i++) fVec7[i] = 0;
210 for (int i=0; i<2; i++) fRec5[i] = 0;
211 for (int i=0; i<2; i++) fVec8[i] = 0;
212 for (int i=0; i<2; i++) fRec4[i] = 0;
213 for (int i=0; i<2; i++) fRec1[i] = 0;
214 for (int i=0; i<2; i++) fRec0[i] = 0;
215 for (int i=0; i<2; i++) fVec9[i] = 0;
216 for (int i=0; i<2; i++) fRec37[i] = 0;
217 for (int i=0; i<2; i++) fRec36[i] = 0;
218 for (int i=0; i<2; i++) fRec35[i] = 0;
219 }
220
221 void Dsp::clear_state_f_static(PluginLV2 *p)
222 {
223 static_cast<Dsp*>(p)->clear_state_f();
224 }
225
226 inline void Dsp::init(uint32_t samplingFreq)
227 {
228 fSamplingFreq = samplingFreq;
229 iConst0 = min(192000, max(1, fSamplingFreq));
230 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
231 fConst2 = (1 + fConst1);
232 fConst3 = (0 - ((1 - fConst1) / fConst2));
233 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
234 fConst5 = (1 + fConst4);
235 fConst6 = (0 - ((1 - fConst4) / fConst5));
236 fConst7 = (1.0 / fConst5);
237 fConst8 = tan((942.4777960769379 / iConst0));
238 fConst9 = (1.0 / faustpower<2>(fConst8));
239 fConst10 = (2 * (1 - fConst9));
240 fConst11 = (1.0 / fConst8);
241 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
242 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
243 fConst14 = tan((3769.9111843077517 / iConst0));
244 fConst15 = (1.0 / faustpower<2>(fConst14));
245 fConst16 = (2 * (1 - fConst15));
246 fConst17 = (1.0 / fConst14);
247 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
248 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
249 fConst20 = (1.0 / fConst19);
250 fConst21 = (1 + fConst17);
251 fConst22 = (0 - ((1 - fConst17) / fConst21));
252 fConst23 = tan((10053.096491487338 / iConst0));
253 fConst24 = (1.0 / faustpower<2>(fConst23));
254 fConst25 = (2 * (1 - fConst24));
255 fConst26 = (1.0 / fConst23);
256 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
257 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
258 fConst29 = (1.0 / fConst28);
259 fConst30 = (1 + fConst26);
260 fConst31 = (0 - ((1 - fConst26) / fConst30));
261 fConst32 = tan((47123.8898038469 / iConst0));
262 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
263 fConst34 = (1.0 / fConst32);
264 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
265 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
266 fConst37 = (1.0 / fConst36);
267 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
268 fConst39 = (1 + fConst38);
269 fConst40 = (0 - ((1 - fConst38) / fConst39));
270 fConst41 = (1.0 / fConst39);
271 fConst42 = (0 - fConst1);
272 fConst43 = (0.1 / fConst2);
273 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
274 fConst45 = (1 + fConst44);
275 fConst46 = (0 - ((1 - fConst44) / fConst45));
276 fConst47 = (1.0 / fConst45);
277 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
278 fConst49 = (1 + fConst48);
279 fConst50 = (0 - ((1 - fConst48) / fConst49));
280 fConst51 = (1.0 / fConst49);
281 fConst52 = (1.0 / (fConst2 * fConst36));
282 fConst53 = (1.0 / fConst30);
283 fConst54 = (0 - fConst17);
284 fConst55 = (1.0 / (fConst21 * fConst28));
285 fConst56 = (2 * (0 - fConst15));
286 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
287 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
288 fConst59 = (1 + fConst11);
289 fConst60 = (0 - ((1 - fConst11) / fConst59));
290 fConst61 = (0 - fConst11);
291 fConst62 = (1.0 / (fConst59 * fConst19));
292 fConst63 = (2 * (0 - fConst9));
293 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
294 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
295 fConst66 = (0 - fConst26);
296 fConst67 = (2 * (0 - fConst24));
297 fConst68 = (0.025 / fConst2);
298 clear_state_f();
299 }
300
301 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
302 {
303 static_cast<Dsp*>(p)->init(samplingFreq);
304 }
305
306 inline void Dsp::compute(int count, float *input0, float *output0)
307 {
308 #define fslider0 (*fslider0_)
309 #define fslider1 (*fslider1_)
310 #define fslider2 (*fslider2_)
311 #define fslider3 (*fslider3_)
312 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
313 double fSlow1 = (1.000000000000001e-05 * fslider1);
314 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
315 double fSlow3 = fslider3;
316 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
317 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
318 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
319 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
320 double fSlow8 = (2 * (fSlow3 - 0.5));
321 double fSlow9 = (1 - max(0, (0 - fSlow8)));
322 double fSlow10 = (1 - max(0, fSlow8));
323 double fSlow11 = (1.25 * fSlow3);
324 for (int i=0; i<count; i++) {
325 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
326 fVec0[0] = fTemp0;
327 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
328 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
329 double fTemp1 = (fConst10 * fRec6[1]);
330 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
331 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
332 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
333 fVec1[0] = fTemp2;
334 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
335 fRec20[0] = (Ftube(TUBE_TABLE_12AU7_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 1.2572399999999988)) - 83.43555555555557);
336 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
337 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
338 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
339 fVec2[0] = fTemp3;
340 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
341 fRec17[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec23[0] + fRec18[0]) - 0.776161999999999)) - 78.25586666666666);
342 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
343 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
344 fVec3[0] = fTemp4;
345 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
346 fRec15[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec24[0] + fRec16[0]) - 0.445486999999999)) - 75.67231707317073);
347 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
348 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
349 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
350 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
351 fVec4[0] = fTemp6;
352 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
353 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
354 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
355 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
356 fVec5[0] = fTemp7;
357 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
358 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
359 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
360 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
361 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
362 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
363 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
364 fVec6[0] = fTemp9;
365 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
366 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
367 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
368 double fTemp11 = (fConst10 * fRec29[1]);
369 double fTemp12 = (fConst16 * fRec30[1]);
370 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
371 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
372 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
373 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
374 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
375 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
376 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
377 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
378 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
379 fVec7[0] = fTemp15;
380 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
381 double fTemp16 = (fRec14[0] * (1 - fRec13[0]));
382 double fTemp17 = (1e-15 + fTemp16);
383 double fTemp18 = (1e-15 + ((fSlow11 * ((fTemp17 * (4 - (4 * fabs(fTemp17)))) - fTemp17)) + ((fSlow10 * fTemp5) + (fTemp16 + (fSlow9 * fRec5[0])))));
384 fVec8[0] = fTemp18;
385 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
386 double fTemp19 = (fRec4[0] * fRec3[0]);
387 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp19 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
388 fRec0[0] = ((fConst68 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
389 double fTemp20 = (1e-15 + (0.0082 * fRec36[1]));
390 fVec9[0] = fTemp20;
391 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
392 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp19) - 1.130461999999999)) - 112.13878048780487);
393 fRec35[0] = ((fConst68 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
394 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
395 // post processing
396 fRec35[1] = fRec35[0];
397 fRec36[1] = fRec36[0];
398 fRec37[1] = fRec37[0];
399 fVec9[1] = fVec9[0];
400 fRec0[1] = fRec0[0];
401 fRec1[1] = fRec1[0];
402 fRec4[1] = fRec4[0];
403 fVec8[1] = fVec8[0];
404 fRec5[1] = fRec5[0];
405 fVec7[1] = fVec7[0];
406 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
407 fRec34[1] = fRec34[0];
408 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
409 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
410 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
411 fRec32[1] = fRec32[0];
412 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
413 fRec26[1] = fRec26[0];
414 fVec6[1] = fVec6[0];
415 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
416 fRec28[1] = fRec28[0];
417 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
418 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
419 fRec8[1] = fRec8[0];
420 fVec5[1] = fVec5[0];
421 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
422 fRec10[1] = fRec10[0];
423 fRec11[1] = fRec11[0];
424 fVec4[1] = fVec4[0];
425 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
426 fRec14[1] = fRec14[0];
427 fRec15[1] = fRec15[0];
428 fRec24[1] = fRec24[0];
429 fVec3[1] = fVec3[0];
430 fRec16[1] = fRec16[0];
431 fRec17[1] = fRec17[0];
432 fRec23[1] = fRec23[0];
433 fVec2[1] = fVec2[0];
434 fRec18[1] = fRec18[0];
435 fRec19[1] = fRec19[0];
436 fRec20[1] = fRec20[0];
437 fRec22[1] = fRec22[0];
438 fVec1[1] = fVec1[0];
439 fRec21[1] = fRec21[0];
440 fRec13[1] = fRec13[0];
441 fRec3[1] = fRec3[0];
442 fRec2[1] = fRec2[0];
443 fVec0[1] = fVec0[0];
444 }
445 #undef fslider0
446 #undef fslider1
447 #undef fslider2
448 #undef fslider3
449 }
450
451 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
452 {
453 static_cast<Dsp*>(p)->compute(count, input0, output0);
454 }
455
456
457 void Dsp::connect(uint32_t port,void* data)
458 {
459 switch ((PortIndex)port)
460 {
461 case DRIVE:
462 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
463 break;
464 case PREGAIN:
465 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
466 break;
467 case WET_DRY:
468 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
469 break;
470 case GAIN1:
471 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
472 break;
473 default:
474 break;
475 }
476 }
477
478 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
479 {
480 static_cast<Dsp*>(p)->connect(port, data);
481 }
482
483
484 PluginLV2 *plugin() {
485 return new Dsp();
486 }
487
488 void Dsp::del_instance(PluginLV2 *p)
489 {
490 delete static_cast<Dsp*>(p);
491 }
492
493 /*
494 typedef enum
495 {
496 DRIVE,
497 PREGAIN,
498 WET_DRY,
499 GAIN1,
500 } PortIndex;
501 */
502
503 } // end namespace gxamp4
0 // generated from file '../src/LV2/faust/gxamp4_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp4_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fConst68;
130 double fRec0[2];
131 double fVec9[2];
132 double fRec37[2];
133 double fRec36[2];
134 double fRec35[2];
135 double fVec10[2];
136 double fRec48[2];
137 double fRec47[2];
138 double fRec46[2];
139 double fRec45[2];
140 double fVec11[2];
141 double fRec49[2];
142 double fRec44[2];
143 double fRec43[2];
144 double fVec12[2];
145 double fRec50[2];
146 double fRec42[2];
147 double fRec41[2];
148 double fRec58[3];
149 double fVec13[2];
150 double fRec57[2];
151 double fRec56[2];
152 double fRec55[3];
153 double fVec14[2];
154 double fRec54[2];
155 double fRec53[3];
156 double fRec52[3];
157 double fRec62[2];
158 double fRec61[3];
159 double fVec15[2];
160 double fRec60[2];
161 double fRec59[3];
162 double fRec66[2];
163 double fRec65[3];
164 double fRec64[3];
165 double fRec63[3];
166 double fRec68[2];
167 double fRec67[3];
168 double fVec16[2];
169 double fRec51[2];
170 double fVec17[2];
171 double fRec40[2];
172 double fVec18[2];
173 double fRec69[2];
174 double fRec39[2];
175 double fRec38[2];
176 double fVec19[2];
177 double fRec72[2];
178 double fRec71[2];
179 double fRec70[2];
180 void connect(uint32_t port,void* data);
181 void clear_state_f();
182 void init(uint32_t samplingFreq);
183 void compute(int count, float *input0, float *input1, float *output0, float *output1);
184
185 static void clear_state_f_static(PluginLV2*);
186 static void init_static(uint32_t samplingFreq, PluginLV2*);
187 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
188 static void del_instance(PluginLV2 *p);
189 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
190 public:
191 Dsp();
192 ~Dsp();
193 };
194
195
196
197 Dsp::Dsp()
198 : PluginLV2() {
199 version = PLUGINLV2_VERSION;
200 id = "pre 12AU7/ master 6V6";
201 name = N_("pre 12AU7/ master 6V6");
202 mono_audio = 0;
203 stereo_audio = compute_static;
204 set_samplerate = init_static;
205 activate_plugin = 0;
206 connect_ports = connect_static;
207 clear_state = clear_state_f_static;
208 delete_instance = del_instance;
209 }
210
211 Dsp::~Dsp() {
212 }
213
214 inline void Dsp::clear_state_f()
215 {
216 for (int i=0; i<2; i++) fVec0[i] = 0;
217 for (int i=0; i<2; i++) fRec2[i] = 0;
218 for (int i=0; i<2; i++) fRec3[i] = 0;
219 for (int i=0; i<2; i++) fRec13[i] = 0;
220 for (int i=0; i<2; i++) fRec21[i] = 0;
221 for (int i=0; i<2; i++) fVec1[i] = 0;
222 for (int i=0; i<2; i++) fRec22[i] = 0;
223 for (int i=0; i<2; i++) fRec20[i] = 0;
224 for (int i=0; i<2; i++) fRec19[i] = 0;
225 for (int i=0; i<2; i++) fRec18[i] = 0;
226 for (int i=0; i<2; i++) fVec2[i] = 0;
227 for (int i=0; i<2; i++) fRec23[i] = 0;
228 for (int i=0; i<2; i++) fRec17[i] = 0;
229 for (int i=0; i<2; i++) fRec16[i] = 0;
230 for (int i=0; i<2; i++) fVec3[i] = 0;
231 for (int i=0; i<2; i++) fRec24[i] = 0;
232 for (int i=0; i<2; i++) fRec15[i] = 0;
233 for (int i=0; i<2; i++) fRec14[i] = 0;
234 for (int i=0; i<3; i++) fRec12[i] = 0;
235 for (int i=0; i<2; i++) fVec4[i] = 0;
236 for (int i=0; i<2; i++) fRec11[i] = 0;
237 for (int i=0; i<2; i++) fRec10[i] = 0;
238 for (int i=0; i<3; i++) fRec9[i] = 0;
239 for (int i=0; i<2; i++) fVec5[i] = 0;
240 for (int i=0; i<2; i++) fRec8[i] = 0;
241 for (int i=0; i<3; i++) fRec7[i] = 0;
242 for (int i=0; i<3; i++) fRec6[i] = 0;
243 for (int i=0; i<2; i++) fRec28[i] = 0;
244 for (int i=0; i<3; i++) fRec27[i] = 0;
245 for (int i=0; i<2; i++) fVec6[i] = 0;
246 for (int i=0; i<2; i++) fRec26[i] = 0;
247 for (int i=0; i<3; i++) fRec25[i] = 0;
248 for (int i=0; i<2; i++) fRec32[i] = 0;
249 for (int i=0; i<3; i++) fRec31[i] = 0;
250 for (int i=0; i<3; i++) fRec30[i] = 0;
251 for (int i=0; i<3; i++) fRec29[i] = 0;
252 for (int i=0; i<2; i++) fRec34[i] = 0;
253 for (int i=0; i<3; i++) fRec33[i] = 0;
254 for (int i=0; i<2; i++) fVec7[i] = 0;
255 for (int i=0; i<2; i++) fRec5[i] = 0;
256 for (int i=0; i<2; i++) fVec8[i] = 0;
257 for (int i=0; i<2; i++) fRec4[i] = 0;
258 for (int i=0; i<2; i++) fRec1[i] = 0;
259 for (int i=0; i<2; i++) fRec0[i] = 0;
260 for (int i=0; i<2; i++) fVec9[i] = 0;
261 for (int i=0; i<2; i++) fRec37[i] = 0;
262 for (int i=0; i<2; i++) fRec36[i] = 0;
263 for (int i=0; i<2; i++) fRec35[i] = 0;
264 for (int i=0; i<2; i++) fVec10[i] = 0;
265 for (int i=0; i<2; i++) fRec48[i] = 0;
266 for (int i=0; i<2; i++) fRec47[i] = 0;
267 for (int i=0; i<2; i++) fRec46[i] = 0;
268 for (int i=0; i<2; i++) fRec45[i] = 0;
269 for (int i=0; i<2; i++) fVec11[i] = 0;
270 for (int i=0; i<2; i++) fRec49[i] = 0;
271 for (int i=0; i<2; i++) fRec44[i] = 0;
272 for (int i=0; i<2; i++) fRec43[i] = 0;
273 for (int i=0; i<2; i++) fVec12[i] = 0;
274 for (int i=0; i<2; i++) fRec50[i] = 0;
275 for (int i=0; i<2; i++) fRec42[i] = 0;
276 for (int i=0; i<2; i++) fRec41[i] = 0;
277 for (int i=0; i<3; i++) fRec58[i] = 0;
278 for (int i=0; i<2; i++) fVec13[i] = 0;
279 for (int i=0; i<2; i++) fRec57[i] = 0;
280 for (int i=0; i<2; i++) fRec56[i] = 0;
281 for (int i=0; i<3; i++) fRec55[i] = 0;
282 for (int i=0; i<2; i++) fVec14[i] = 0;
283 for (int i=0; i<2; i++) fRec54[i] = 0;
284 for (int i=0; i<3; i++) fRec53[i] = 0;
285 for (int i=0; i<3; i++) fRec52[i] = 0;
286 for (int i=0; i<2; i++) fRec62[i] = 0;
287 for (int i=0; i<3; i++) fRec61[i] = 0;
288 for (int i=0; i<2; i++) fVec15[i] = 0;
289 for (int i=0; i<2; i++) fRec60[i] = 0;
290 for (int i=0; i<3; i++) fRec59[i] = 0;
291 for (int i=0; i<2; i++) fRec66[i] = 0;
292 for (int i=0; i<3; i++) fRec65[i] = 0;
293 for (int i=0; i<3; i++) fRec64[i] = 0;
294 for (int i=0; i<3; i++) fRec63[i] = 0;
295 for (int i=0; i<2; i++) fRec68[i] = 0;
296 for (int i=0; i<3; i++) fRec67[i] = 0;
297 for (int i=0; i<2; i++) fVec16[i] = 0;
298 for (int i=0; i<2; i++) fRec51[i] = 0;
299 for (int i=0; i<2; i++) fVec17[i] = 0;
300 for (int i=0; i<2; i++) fRec40[i] = 0;
301 for (int i=0; i<2; i++) fVec18[i] = 0;
302 for (int i=0; i<2; i++) fRec69[i] = 0;
303 for (int i=0; i<2; i++) fRec39[i] = 0;
304 for (int i=0; i<2; i++) fRec38[i] = 0;
305 for (int i=0; i<2; i++) fVec19[i] = 0;
306 for (int i=0; i<2; i++) fRec72[i] = 0;
307 for (int i=0; i<2; i++) fRec71[i] = 0;
308 for (int i=0; i<2; i++) fRec70[i] = 0;
309 }
310
311 void Dsp::clear_state_f_static(PluginLV2 *p)
312 {
313 static_cast<Dsp*>(p)->clear_state_f();
314 }
315
316 inline void Dsp::init(uint32_t samplingFreq)
317 {
318 fSamplingFreq = samplingFreq;
319 iConst0 = min(192000, max(1, fSamplingFreq));
320 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
321 fConst2 = (1 + fConst1);
322 fConst3 = (0 - ((1 - fConst1) / fConst2));
323 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
324 fConst5 = (1 + fConst4);
325 fConst6 = (0 - ((1 - fConst4) / fConst5));
326 fConst7 = (1.0 / fConst5);
327 fConst8 = tan((942.4777960769379 / iConst0));
328 fConst9 = (1.0 / faustpower<2>(fConst8));
329 fConst10 = (2 * (1 - fConst9));
330 fConst11 = (1.0 / fConst8);
331 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
332 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
333 fConst14 = tan((3769.9111843077517 / iConst0));
334 fConst15 = (1.0 / faustpower<2>(fConst14));
335 fConst16 = (2 * (1 - fConst15));
336 fConst17 = (1.0 / fConst14);
337 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
338 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
339 fConst20 = (1.0 / fConst19);
340 fConst21 = (1 + fConst17);
341 fConst22 = (0 - ((1 - fConst17) / fConst21));
342 fConst23 = tan((10053.096491487338 / iConst0));
343 fConst24 = (1.0 / faustpower<2>(fConst23));
344 fConst25 = (2 * (1 - fConst24));
345 fConst26 = (1.0 / fConst23);
346 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
347 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
348 fConst29 = (1.0 / fConst28);
349 fConst30 = (1 + fConst26);
350 fConst31 = (0 - ((1 - fConst26) / fConst30));
351 fConst32 = tan((47123.8898038469 / iConst0));
352 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
353 fConst34 = (1.0 / fConst32);
354 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
355 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
356 fConst37 = (1.0 / fConst36);
357 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
358 fConst39 = (1 + fConst38);
359 fConst40 = (0 - ((1 - fConst38) / fConst39));
360 fConst41 = (1.0 / fConst39);
361 fConst42 = (0 - fConst1);
362 fConst43 = (0.1 / fConst2);
363 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
364 fConst45 = (1 + fConst44);
365 fConst46 = (0 - ((1 - fConst44) / fConst45));
366 fConst47 = (1.0 / fConst45);
367 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
368 fConst49 = (1 + fConst48);
369 fConst50 = (0 - ((1 - fConst48) / fConst49));
370 fConst51 = (1.0 / fConst49);
371 fConst52 = (1.0 / (fConst2 * fConst36));
372 fConst53 = (1.0 / fConst30);
373 fConst54 = (0 - fConst17);
374 fConst55 = (1.0 / (fConst21 * fConst28));
375 fConst56 = (2 * (0 - fConst15));
376 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
377 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
378 fConst59 = (1 + fConst11);
379 fConst60 = (0 - ((1 - fConst11) / fConst59));
380 fConst61 = (0 - fConst11);
381 fConst62 = (1.0 / (fConst59 * fConst19));
382 fConst63 = (2 * (0 - fConst9));
383 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
384 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
385 fConst66 = (0 - fConst26);
386 fConst67 = (2 * (0 - fConst24));
387 fConst68 = (0.025 / fConst2);
388 clear_state_f();
389 }
390
391 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
392 {
393 static_cast<Dsp*>(p)->init(samplingFreq);
394 }
395
396 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
397 {
398 #define fslider0 (*fslider0_)
399 #define fslider1 (*fslider1_)
400 #define fslider2 (*fslider2_)
401 #define fslider3 (*fslider3_)
402 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
403 double fSlow1 = (1.000000000000001e-05 * fslider1);
404 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
405 double fSlow3 = fslider3;
406 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
407 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
408 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
409 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
410 double fSlow8 = (2 * (fSlow3 - 0.5));
411 double fSlow9 = (1 - max(0, (0 - fSlow8)));
412 double fSlow10 = (1 - max(0, fSlow8));
413 double fSlow11 = (1.25 * fSlow3);
414 for (int i=0; i<count; i++) {
415 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
416 fVec0[0] = fTemp0;
417 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
418 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
419 double fTemp1 = (fConst10 * fRec6[1]);
420 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
421 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
422 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
423 fVec1[0] = fTemp2;
424 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
425 fRec20[0] = (Ftube(TUBE_TABLE_12AU7_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 1.2572399999999988)) - 83.43555555555557);
426 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
427 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
428 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
429 fVec2[0] = fTemp3;
430 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
431 fRec17[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec23[0] + fRec18[0]) - 0.776161999999999)) - 78.25586666666666);
432 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
433 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
434 fVec3[0] = fTemp4;
435 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
436 fRec15[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec24[0] + fRec16[0]) - 0.445486999999999)) - 75.67231707317073);
437 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
438 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
439 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
440 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
441 fVec4[0] = fTemp6;
442 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
443 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
444 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
445 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
446 fVec5[0] = fTemp7;
447 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
448 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
449 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
450 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
451 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
452 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
453 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
454 fVec6[0] = fTemp9;
455 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
456 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
457 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
458 double fTemp11 = (fConst10 * fRec29[1]);
459 double fTemp12 = (fConst16 * fRec30[1]);
460 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
461 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
462 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
463 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
464 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
465 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
466 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
467 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
468 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
469 fVec7[0] = fTemp15;
470 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
471 double fTemp16 = (1 - fRec13[0]);
472 double fTemp17 = (fRec14[0] * fTemp16);
473 double fTemp18 = (1e-15 + fTemp17);
474 double fTemp19 = (1e-15 + ((fSlow11 * ((fTemp18 * (4 - (4 * fabs(fTemp18)))) - fTemp18)) + ((fSlow10 * fTemp5) + (fTemp17 + (fSlow9 * fRec5[0])))));
475 fVec8[0] = fTemp19;
476 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
477 double fTemp20 = (fRec4[0] * fRec3[0]);
478 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp20 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
479 fRec0[0] = ((fConst68 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
480 double fTemp21 = (1e-15 + (0.0082 * fRec36[1]));
481 fVec9[0] = fTemp21;
482 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
483 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp20) - 1.130461999999999)) - 112.13878048780487);
484 fRec35[0] = ((fConst68 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
485 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
486 double fTemp22 = (1e-15 + (0.027 * fRec47[1]));
487 fVec10[0] = fTemp22;
488 fRec48[0] = ((fConst41 * (fVec10[0] + fVec10[1])) + (fConst40 * fRec48[1]));
489 fRec47[0] = (Ftube(TUBE_TABLE_12AU7_68k, ((fRec48[0] + ((double)input1[i] * fRec21[0])) - 1.2572399999999988)) - 83.43555555555557);
490 fRec46[0] = ((fConst43 * ((fConst42 * fRec47[1]) + (fConst1 * fRec47[0]))) + (fConst3 * fRec46[1]));
491 fRec45[0] = ((fConst7 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
492 double fTemp23 = (1e-15 + (0.015 * fRec44[1]));
493 fVec11[0] = fTemp23;
494 fRec49[0] = ((fConst47 * (fVec11[0] + fVec11[1])) + (fConst46 * fRec49[1]));
495 fRec44[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec49[0] + fRec45[0]) - 0.776161999999999)) - 78.25586666666666);
496 fRec43[0] = ((fConst43 * ((fConst42 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
497 double fTemp24 = (1e-15 + (0.0082 * fRec42[1]));
498 fVec12[0] = fTemp24;
499 fRec50[0] = ((fConst51 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec50[1]));
500 fRec42[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec50[0] + fRec43[0]) - 0.445486999999999)) - 75.67231707317073);
501 fRec41[0] = ((fConst43 * ((fConst42 * fRec42[1]) + (fConst1 * fRec42[0]))) + (fConst3 * fRec41[1]));
502 double fTemp25 = (fTemp16 * fRec41[0]);
503 double fTemp26 = (1e-15 + (fRec13[0] * fRec41[0]));
504 double fTemp27 = (fConst10 * fRec52[1]);
505 fRec58[0] = (fTemp26 - (fConst37 * ((fConst35 * fRec58[2]) + (fConst33 * fRec58[1]))));
506 double fTemp28 = (fRec58[2] + (fRec58[0] + (2 * fRec58[1])));
507 fVec13[0] = fTemp28;
508 fRec57[0] = ((fConst52 * ((fConst42 * fVec13[1]) + (fConst1 * fVec13[0]))) + (fConst3 * fRec57[1]));
509 fRec56[0] = ((fConst53 * (fRec57[0] + fRec57[1])) + (fConst31 * fRec56[1]));
510 fRec55[0] = (fRec56[0] - (fConst29 * ((fConst27 * fRec55[2]) + (fConst25 * fRec55[1]))));
511 double fTemp29 = (fRec55[2] + (fRec55[0] + (2 * fRec55[1])));
512 fVec14[0] = fTemp29;
513 fRec54[0] = ((fConst55 * ((fConst54 * fVec14[1]) + (fConst17 * fVec14[0]))) + (fConst22 * fRec54[1]));
514 fRec53[0] = (fRec54[0] - (fConst20 * ((fConst18 * fRec53[2]) + (fConst16 * fRec53[1]))));
515 fRec52[0] = ((fConst20 * (((fConst15 * fRec53[0]) + (fConst56 * fRec53[1])) + (fConst15 * fRec53[2]))) - (fConst13 * ((fConst12 * fRec52[2]) + fTemp27)));
516 double fTemp30 = max(-1, min(1, (fSlow4 * (fRec52[2] + (fConst13 * (fTemp27 + (fConst12 * fRec52[0])))))));
517 fRec62[0] = ((fConst55 * (fVec14[0] + fVec14[1])) + (fConst22 * fRec62[1]));
518 fRec61[0] = (fRec62[0] - (fConst20 * ((fConst18 * fRec61[2]) + (fConst16 * fRec61[1]))));
519 double fTemp31 = (fRec61[2] + (fRec61[0] + (2 * fRec61[1])));
520 fVec15[0] = fTemp31;
521 fRec60[0] = ((fConst62 * ((fConst61 * fVec15[1]) + (fConst11 * fVec15[0]))) + (fConst60 * fRec60[1]));
522 fRec59[0] = (fRec60[0] - (fConst58 * ((fConst57 * fRec59[2]) + (fConst10 * fRec59[1]))));
523 double fTemp32 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec59[0]) + (fConst63 * fRec59[1])) + (fConst9 * fRec59[2])))));
524 double fTemp33 = (fConst10 * fRec63[1]);
525 double fTemp34 = (fConst16 * fRec64[1]);
526 fRec66[0] = ((fConst53 * ((fConst66 * fRec57[1]) + (fConst26 * fRec57[0]))) + (fConst31 * fRec66[1]));
527 fRec65[0] = (fRec66[0] - (fConst29 * ((fConst27 * fRec65[2]) + (fConst25 * fRec65[1]))));
528 fRec64[0] = ((fConst29 * (((fConst24 * fRec65[0]) + (fConst67 * fRec65[1])) + (fConst24 * fRec65[2]))) - (fConst65 * ((fConst64 * fRec64[2]) + fTemp34)));
529 fRec63[0] = ((fRec64[2] + (fConst65 * (fTemp34 + (fConst64 * fRec64[0])))) - (fConst13 * ((fConst12 * fRec63[2]) + fTemp33)));
530 double fTemp35 = max(-1, min(1, (fSlow6 * (fRec63[2] + (fConst13 * (fTemp33 + (fConst12 * fRec63[0])))))));
531 fRec68[0] = ((fConst62 * (fVec15[0] + fVec15[1])) + (fConst60 * fRec68[1]));
532 fRec67[0] = (fRec68[0] - (fConst58 * ((fConst57 * fRec67[2]) + (fConst10 * fRec67[1]))));
533 double fTemp36 = max(-1, min(1, (fSlow7 * (fRec67[2] + (fRec67[0] + (2 * fRec67[1]))))));
534 double fTemp37 = ((1.2589412 * (fTemp36 * (1 - (0.3333333333333333 * faustpower<2>(fTemp36))))) + (1.584893192 * ((fTemp35 * (1 - (0.3333333333333333 * faustpower<2>(fTemp35)))) + ((fTemp32 * (1 - (0.3333333333333333 * faustpower<2>(fTemp32)))) + (0.8413951417869425 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))))))));
535 fVec16[0] = fTemp37;
536 fRec51[0] = ((fConst7 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec51[1]));
537 double fTemp38 = (1e-15 + fTemp25);
538 double fTemp39 = (1e-15 + ((fSlow11 * ((fTemp38 * (4 - (4 * fabs(fTemp38)))) - fTemp38)) + (((fSlow9 * fRec51[0]) + (fSlow10 * fTemp26)) + fTemp25)));
539 fVec17[0] = fTemp39;
540 fRec40[0] = ((fConst7 * (fVec17[0] + fVec17[1])) + (fConst6 * fRec40[1]));
541 double fTemp40 = (fRec3[0] * fRec40[0]);
542 double fTemp41 = (1e-15 + (0.0082 * fRec39[1]));
543 fVec18[0] = fTemp41;
544 fRec69[0] = ((fConst7 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec69[1]));
545 fRec39[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec69[0] + fTemp40) - 1.130739999999999)) - 112.10487804878048);
546 fRec38[0] = ((fConst68 * ((fConst42 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
547 double fTemp42 = (1e-15 + (0.0082 * fRec71[1]));
548 fVec19[0] = fTemp42;
549 fRec72[0] = ((fConst7 * (fVec19[0] + fVec19[1])) + (fConst6 * fRec72[1]));
550 fRec71[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec72[0] + fTemp40) - 1.130461999999999)) - 112.13878048780487);
551 fRec70[0] = ((fConst68 * ((fConst42 * fRec71[1]) + (fConst1 * fRec71[0]))) + (fConst3 * fRec70[1]));
552 output1[i] = (FAUSTFLOAT)(fRec70[0] + fRec38[0]);
553 // post processing
554 fRec70[1] = fRec70[0];
555 fRec71[1] = fRec71[0];
556 fRec72[1] = fRec72[0];
557 fVec19[1] = fVec19[0];
558 fRec38[1] = fRec38[0];
559 fRec39[1] = fRec39[0];
560 fRec69[1] = fRec69[0];
561 fVec18[1] = fVec18[0];
562 fRec40[1] = fRec40[0];
563 fVec17[1] = fVec17[0];
564 fRec51[1] = fRec51[0];
565 fVec16[1] = fVec16[0];
566 fRec67[2] = fRec67[1]; fRec67[1] = fRec67[0];
567 fRec68[1] = fRec68[0];
568 fRec63[2] = fRec63[1]; fRec63[1] = fRec63[0];
569 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
570 fRec65[2] = fRec65[1]; fRec65[1] = fRec65[0];
571 fRec66[1] = fRec66[0];
572 fRec59[2] = fRec59[1]; fRec59[1] = fRec59[0];
573 fRec60[1] = fRec60[0];
574 fVec15[1] = fVec15[0];
575 fRec61[2] = fRec61[1]; fRec61[1] = fRec61[0];
576 fRec62[1] = fRec62[0];
577 fRec52[2] = fRec52[1]; fRec52[1] = fRec52[0];
578 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
579 fRec54[1] = fRec54[0];
580 fVec14[1] = fVec14[0];
581 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
582 fRec56[1] = fRec56[0];
583 fRec57[1] = fRec57[0];
584 fVec13[1] = fVec13[0];
585 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
586 fRec41[1] = fRec41[0];
587 fRec42[1] = fRec42[0];
588 fRec50[1] = fRec50[0];
589 fVec12[1] = fVec12[0];
590 fRec43[1] = fRec43[0];
591 fRec44[1] = fRec44[0];
592 fRec49[1] = fRec49[0];
593 fVec11[1] = fVec11[0];
594 fRec45[1] = fRec45[0];
595 fRec46[1] = fRec46[0];
596 fRec47[1] = fRec47[0];
597 fRec48[1] = fRec48[0];
598 fVec10[1] = fVec10[0];
599 fRec35[1] = fRec35[0];
600 fRec36[1] = fRec36[0];
601 fRec37[1] = fRec37[0];
602 fVec9[1] = fVec9[0];
603 fRec0[1] = fRec0[0];
604 fRec1[1] = fRec1[0];
605 fRec4[1] = fRec4[0];
606 fVec8[1] = fVec8[0];
607 fRec5[1] = fRec5[0];
608 fVec7[1] = fVec7[0];
609 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
610 fRec34[1] = fRec34[0];
611 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
612 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
613 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
614 fRec32[1] = fRec32[0];
615 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
616 fRec26[1] = fRec26[0];
617 fVec6[1] = fVec6[0];
618 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
619 fRec28[1] = fRec28[0];
620 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
621 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
622 fRec8[1] = fRec8[0];
623 fVec5[1] = fVec5[0];
624 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
625 fRec10[1] = fRec10[0];
626 fRec11[1] = fRec11[0];
627 fVec4[1] = fVec4[0];
628 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
629 fRec14[1] = fRec14[0];
630 fRec15[1] = fRec15[0];
631 fRec24[1] = fRec24[0];
632 fVec3[1] = fVec3[0];
633 fRec16[1] = fRec16[0];
634 fRec17[1] = fRec17[0];
635 fRec23[1] = fRec23[0];
636 fVec2[1] = fVec2[0];
637 fRec18[1] = fRec18[0];
638 fRec19[1] = fRec19[0];
639 fRec20[1] = fRec20[0];
640 fRec22[1] = fRec22[0];
641 fVec1[1] = fVec1[0];
642 fRec21[1] = fRec21[0];
643 fRec13[1] = fRec13[0];
644 fRec3[1] = fRec3[0];
645 fRec2[1] = fRec2[0];
646 fVec0[1] = fVec0[0];
647 }
648 #undef fslider0
649 #undef fslider1
650 #undef fslider2
651 #undef fslider3
652 }
653
654 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
655 {
656 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
657 }
658
659
660 void Dsp::connect(uint32_t port,void* data)
661 {
662 switch ((PortIndex)port)
663 {
664 case DRIVE:
665 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
666 break;
667 case PREGAIN:
668 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
669 break;
670 case WET_DRY:
671 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
672 break;
673 case GAIN1:
674 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
675 break;
676 default:
677 break;
678 }
679 }
680
681 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
682 {
683 static_cast<Dsp*>(p)->connect(port, data);
684 }
685
686
687 PluginLV2 *plugin() {
688 return new Dsp();
689 }
690
691 void Dsp::del_instance(PluginLV2 *p)
692 {
693 delete static_cast<Dsp*>(p);
694 }
695
696 /*
697 typedef enum
698 {
699 DRIVE,
700 PREGAIN,
701 WET_DRY,
702 GAIN1,
703 } PortIndex;
704 */
705
706 } // end namespace gxamp4_stereo
0 // generated from file '../src/LV2/faust/gxamp5.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp5 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fRec0[2];
130 double fVec9[2];
131 double fRec37[2];
132 double fRec36[2];
133 double fRec35[2];
134 void connect(uint32_t port,void* data);
135 void clear_state_f();
136 void init(uint32_t samplingFreq);
137 void compute(int count, float *input0, float *output0);
138
139 static void clear_state_f_static(PluginLV2*);
140 static void init_static(uint32_t samplingFreq, PluginLV2*);
141 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
142 static void del_instance(PluginLV2 *p);
143 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
144 public:
145 Dsp();
146 ~Dsp();
147 };
148
149
150
151 Dsp::Dsp()
152 : PluginLV2() {
153 version = PLUGINLV2_VERSION;
154 id = "pre 12ax7/ master 6V6";
155 name = N_("pre 12ax7/ master 6V6");
156 mono_audio = compute_static;
157 stereo_audio = 0;
158 set_samplerate = init_static;
159 activate_plugin = 0;
160 connect_ports = connect_static;
161 clear_state = clear_state_f_static;
162 delete_instance = del_instance;
163 }
164
165 Dsp::~Dsp() {
166 }
167
168 inline void Dsp::clear_state_f()
169 {
170 for (int i=0; i<2; i++) fVec0[i] = 0;
171 for (int i=0; i<2; i++) fRec2[i] = 0;
172 for (int i=0; i<2; i++) fRec3[i] = 0;
173 for (int i=0; i<2; i++) fRec13[i] = 0;
174 for (int i=0; i<2; i++) fRec21[i] = 0;
175 for (int i=0; i<2; i++) fVec1[i] = 0;
176 for (int i=0; i<2; i++) fRec22[i] = 0;
177 for (int i=0; i<2; i++) fRec20[i] = 0;
178 for (int i=0; i<2; i++) fRec19[i] = 0;
179 for (int i=0; i<2; i++) fRec18[i] = 0;
180 for (int i=0; i<2; i++) fVec2[i] = 0;
181 for (int i=0; i<2; i++) fRec23[i] = 0;
182 for (int i=0; i<2; i++) fRec17[i] = 0;
183 for (int i=0; i<2; i++) fRec16[i] = 0;
184 for (int i=0; i<2; i++) fVec3[i] = 0;
185 for (int i=0; i<2; i++) fRec24[i] = 0;
186 for (int i=0; i<2; i++) fRec15[i] = 0;
187 for (int i=0; i<2; i++) fRec14[i] = 0;
188 for (int i=0; i<3; i++) fRec12[i] = 0;
189 for (int i=0; i<2; i++) fVec4[i] = 0;
190 for (int i=0; i<2; i++) fRec11[i] = 0;
191 for (int i=0; i<2; i++) fRec10[i] = 0;
192 for (int i=0; i<3; i++) fRec9[i] = 0;
193 for (int i=0; i<2; i++) fVec5[i] = 0;
194 for (int i=0; i<2; i++) fRec8[i] = 0;
195 for (int i=0; i<3; i++) fRec7[i] = 0;
196 for (int i=0; i<3; i++) fRec6[i] = 0;
197 for (int i=0; i<2; i++) fRec28[i] = 0;
198 for (int i=0; i<3; i++) fRec27[i] = 0;
199 for (int i=0; i<2; i++) fVec6[i] = 0;
200 for (int i=0; i<2; i++) fRec26[i] = 0;
201 for (int i=0; i<3; i++) fRec25[i] = 0;
202 for (int i=0; i<2; i++) fRec32[i] = 0;
203 for (int i=0; i<3; i++) fRec31[i] = 0;
204 for (int i=0; i<3; i++) fRec30[i] = 0;
205 for (int i=0; i<3; i++) fRec29[i] = 0;
206 for (int i=0; i<2; i++) fRec34[i] = 0;
207 for (int i=0; i<3; i++) fRec33[i] = 0;
208 for (int i=0; i<2; i++) fVec7[i] = 0;
209 for (int i=0; i<2; i++) fRec5[i] = 0;
210 for (int i=0; i<2; i++) fVec8[i] = 0;
211 for (int i=0; i<2; i++) fRec4[i] = 0;
212 for (int i=0; i<2; i++) fRec1[i] = 0;
213 for (int i=0; i<2; i++) fRec0[i] = 0;
214 for (int i=0; i<2; i++) fVec9[i] = 0;
215 for (int i=0; i<2; i++) fRec37[i] = 0;
216 for (int i=0; i<2; i++) fRec36[i] = 0;
217 for (int i=0; i<2; i++) fRec35[i] = 0;
218 }
219
220 void Dsp::clear_state_f_static(PluginLV2 *p)
221 {
222 static_cast<Dsp*>(p)->clear_state_f();
223 }
224
225 inline void Dsp::init(uint32_t samplingFreq)
226 {
227 fSamplingFreq = samplingFreq;
228 iConst0 = min(192000, max(1, fSamplingFreq));
229 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
230 fConst2 = (1 + fConst1);
231 fConst3 = (0 - ((1 - fConst1) / fConst2));
232 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
233 fConst5 = (1 + fConst4);
234 fConst6 = (0 - ((1 - fConst4) / fConst5));
235 fConst7 = (1.0 / fConst5);
236 fConst8 = tan((942.4777960769379 / iConst0));
237 fConst9 = (1.0 / faustpower<2>(fConst8));
238 fConst10 = (2 * (1 - fConst9));
239 fConst11 = (1.0 / fConst8);
240 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
241 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
242 fConst14 = tan((3769.9111843077517 / iConst0));
243 fConst15 = (1.0 / faustpower<2>(fConst14));
244 fConst16 = (2 * (1 - fConst15));
245 fConst17 = (1.0 / fConst14);
246 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
247 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
248 fConst20 = (1.0 / fConst19);
249 fConst21 = (1 + fConst17);
250 fConst22 = (0 - ((1 - fConst17) / fConst21));
251 fConst23 = tan((10053.096491487338 / iConst0));
252 fConst24 = (1.0 / faustpower<2>(fConst23));
253 fConst25 = (2 * (1 - fConst24));
254 fConst26 = (1.0 / fConst23);
255 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
256 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
257 fConst29 = (1.0 / fConst28);
258 fConst30 = (1 + fConst26);
259 fConst31 = (0 - ((1 - fConst26) / fConst30));
260 fConst32 = tan((47123.8898038469 / iConst0));
261 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
262 fConst34 = (1.0 / fConst32);
263 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
264 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
265 fConst37 = (1.0 / fConst36);
266 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
267 fConst39 = (1 + fConst38);
268 fConst40 = (0 - ((1 - fConst38) / fConst39));
269 fConst41 = (1.0 / fConst39);
270 fConst42 = (0 - fConst1);
271 fConst43 = (0.025 / fConst2);
272 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
273 fConst45 = (1 + fConst44);
274 fConst46 = (0 - ((1 - fConst44) / fConst45));
275 fConst47 = (1.0 / fConst45);
276 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
277 fConst49 = (1 + fConst48);
278 fConst50 = (0 - ((1 - fConst48) / fConst49));
279 fConst51 = (1.0 / fConst49);
280 fConst52 = (1.0 / (fConst2 * fConst36));
281 fConst53 = (1.0 / fConst30);
282 fConst54 = (0 - fConst17);
283 fConst55 = (1.0 / (fConst21 * fConst28));
284 fConst56 = (2 * (0 - fConst15));
285 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
286 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
287 fConst59 = (1 + fConst11);
288 fConst60 = (0 - ((1 - fConst11) / fConst59));
289 fConst61 = (0 - fConst11);
290 fConst62 = (1.0 / (fConst59 * fConst19));
291 fConst63 = (2 * (0 - fConst9));
292 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
293 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
294 fConst66 = (0 - fConst26);
295 fConst67 = (2 * (0 - fConst24));
296 clear_state_f();
297 }
298
299 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
300 {
301 static_cast<Dsp*>(p)->init(samplingFreq);
302 }
303
304 inline void Dsp::compute(int count, float *input0, float *output0)
305 {
306 #define fslider0 (*fslider0_)
307 #define fslider1 (*fslider1_)
308 #define fslider2 (*fslider2_)
309 #define fslider3 (*fslider3_)
310 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
311 double fSlow1 = (1.000000000000001e-05 * fslider1);
312 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
313 double fSlow3 = fslider3;
314 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
315 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
316 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
317 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
318 double fSlow8 = (2 * (fSlow3 - 0.5));
319 double fSlow9 = (1 - max(0, (0 - fSlow8)));
320 double fSlow10 = (1 - max(0, fSlow8));
321 double fSlow11 = (1.25 * fSlow3);
322 for (int i=0; i<count; i++) {
323 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
324 fVec0[0] = fTemp0;
325 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
326 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
327 double fTemp1 = (fConst10 * fRec6[1]);
328 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
329 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
330 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
331 fVec1[0] = fTemp2;
332 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
333 fRec20[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 1.5816559999999988)) - 191.42014814814814);
334 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
335 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
336 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
337 fVec2[0] = fTemp3;
338 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
339 fRec17[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec23[0] + fRec18[0]) - 1.204284999999999)) - 169.71433333333334);
340 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
341 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
342 fVec3[0] = fTemp4;
343 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
344 fRec15[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec24[0] + fRec16[0]) - 0.840702999999999)) - 147.47524390243905);
345 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
346 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
347 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
348 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
349 fVec4[0] = fTemp6;
350 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
351 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
352 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
353 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
354 fVec5[0] = fTemp7;
355 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
356 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
357 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
358 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
359 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
360 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
361 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
362 fVec6[0] = fTemp9;
363 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
364 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
365 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
366 double fTemp11 = (fConst10 * fRec29[1]);
367 double fTemp12 = (fConst16 * fRec30[1]);
368 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
369 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
370 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
371 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
372 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
373 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
374 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
375 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
376 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
377 fVec7[0] = fTemp15;
378 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
379 double fTemp16 = (fRec14[0] * (1 - fRec13[0]));
380 double fTemp17 = (1e-15 + fTemp16);
381 double fTemp18 = (1e-15 + ((fSlow11 * ((fTemp17 * (4 - (4 * fabs(fTemp17)))) - fTemp17)) + ((fSlow10 * fTemp5) + (fTemp16 + (fSlow9 * fRec5[0])))));
382 fVec8[0] = fTemp18;
383 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
384 double fTemp19 = (fRec4[0] * fRec3[0]);
385 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp19 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
386 fRec0[0] = ((fConst43 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
387 double fTemp20 = (1e-15 + (0.0082 * fRec36[1]));
388 fVec9[0] = fTemp20;
389 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
390 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp19) - 1.130461999999999)) - 112.13878048780487);
391 fRec35[0] = ((fConst43 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
392 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
393 // post processing
394 fRec35[1] = fRec35[0];
395 fRec36[1] = fRec36[0];
396 fRec37[1] = fRec37[0];
397 fVec9[1] = fVec9[0];
398 fRec0[1] = fRec0[0];
399 fRec1[1] = fRec1[0];
400 fRec4[1] = fRec4[0];
401 fVec8[1] = fVec8[0];
402 fRec5[1] = fRec5[0];
403 fVec7[1] = fVec7[0];
404 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
405 fRec34[1] = fRec34[0];
406 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
407 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
408 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
409 fRec32[1] = fRec32[0];
410 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
411 fRec26[1] = fRec26[0];
412 fVec6[1] = fVec6[0];
413 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
414 fRec28[1] = fRec28[0];
415 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
416 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
417 fRec8[1] = fRec8[0];
418 fVec5[1] = fVec5[0];
419 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
420 fRec10[1] = fRec10[0];
421 fRec11[1] = fRec11[0];
422 fVec4[1] = fVec4[0];
423 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
424 fRec14[1] = fRec14[0];
425 fRec15[1] = fRec15[0];
426 fRec24[1] = fRec24[0];
427 fVec3[1] = fVec3[0];
428 fRec16[1] = fRec16[0];
429 fRec17[1] = fRec17[0];
430 fRec23[1] = fRec23[0];
431 fVec2[1] = fVec2[0];
432 fRec18[1] = fRec18[0];
433 fRec19[1] = fRec19[0];
434 fRec20[1] = fRec20[0];
435 fRec22[1] = fRec22[0];
436 fVec1[1] = fVec1[0];
437 fRec21[1] = fRec21[0];
438 fRec13[1] = fRec13[0];
439 fRec3[1] = fRec3[0];
440 fRec2[1] = fRec2[0];
441 fVec0[1] = fVec0[0];
442 }
443 #undef fslider0
444 #undef fslider1
445 #undef fslider2
446 #undef fslider3
447 }
448
449 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
450 {
451 static_cast<Dsp*>(p)->compute(count, input0, output0);
452 }
453
454
455 void Dsp::connect(uint32_t port,void* data)
456 {
457 switch ((PortIndex)port)
458 {
459 case DRIVE:
460 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
461 break;
462 case PREGAIN:
463 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
464 break;
465 case WET_DRY:
466 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
467 break;
468 case GAIN1:
469 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
470 break;
471 default:
472 break;
473 }
474 }
475
476 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
477 {
478 static_cast<Dsp*>(p)->connect(port, data);
479 }
480
481
482 PluginLV2 *plugin() {
483 return new Dsp();
484 }
485
486 void Dsp::del_instance(PluginLV2 *p)
487 {
488 delete static_cast<Dsp*>(p);
489 }
490
491 /*
492 typedef enum
493 {
494 DRIVE,
495 PREGAIN,
496 WET_DRY,
497 GAIN1,
498 } PortIndex;
499 */
500
501 } // end namespace gxamp5
0 // generated from file '../src/LV2/faust/gxamp5_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp5_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fVec0[2];
18 double fConst7;
19 double fRec2[2];
20 FAUSTFLOAT fslider0;
21 FAUSTFLOAT *fslider0_;
22 double fRec3[2];
23 double fConst8;
24 double fConst9;
25 double fConst10;
26 double fConst11;
27 double fConst12;
28 double fConst13;
29 double fConst14;
30 double fConst15;
31 double fConst16;
32 double fConst17;
33 double fConst18;
34 double fConst19;
35 double fConst20;
36 double fConst21;
37 double fConst22;
38 double fConst23;
39 double fConst24;
40 double fConst25;
41 double fConst26;
42 double fConst27;
43 double fConst28;
44 double fConst29;
45 double fConst30;
46 double fConst31;
47 double fConst32;
48 double fConst33;
49 double fConst34;
50 double fConst35;
51 double fConst36;
52 double fConst37;
53 FAUSTFLOAT fslider1;
54 FAUSTFLOAT *fslider1_;
55 double fRec13[2];
56 FAUSTFLOAT fslider2;
57 FAUSTFLOAT *fslider2_;
58 double fRec21[2];
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fVec1[2];
63 double fConst41;
64 double fRec22[2];
65 double fRec20[2];
66 double fConst42;
67 double fConst43;
68 double fRec19[2];
69 double fRec18[2];
70 double fConst44;
71 double fConst45;
72 double fConst46;
73 double fVec2[2];
74 double fConst47;
75 double fRec23[2];
76 double fRec17[2];
77 double fRec16[2];
78 double fConst48;
79 double fConst49;
80 double fConst50;
81 double fVec3[2];
82 double fConst51;
83 double fRec24[2];
84 double fRec15[2];
85 double fRec14[2];
86 double fRec12[3];
87 double fVec4[2];
88 double fConst52;
89 double fRec11[2];
90 double fConst53;
91 double fRec10[2];
92 double fRec9[3];
93 double fVec5[2];
94 double fConst54;
95 double fConst55;
96 double fRec8[2];
97 double fRec7[3];
98 double fConst56;
99 double fRec6[3];
100 FAUSTFLOAT fslider3;
101 FAUSTFLOAT *fslider3_;
102 double fConst57;
103 double fConst58;
104 double fConst59;
105 double fConst60;
106 double fRec28[2];
107 double fRec27[3];
108 double fVec6[2];
109 double fConst61;
110 double fConst62;
111 double fRec26[2];
112 double fRec25[3];
113 double fConst63;
114 double fConst64;
115 double fConst65;
116 double fConst66;
117 double fRec32[2];
118 double fRec31[3];
119 double fConst67;
120 double fRec30[3];
121 double fRec29[3];
122 double fRec34[2];
123 double fRec33[3];
124 double fVec7[2];
125 double fRec5[2];
126 double fVec8[2];
127 double fRec4[2];
128 double fRec1[2];
129 double fRec0[2];
130 double fVec9[2];
131 double fRec37[2];
132 double fRec36[2];
133 double fRec35[2];
134 double fVec10[2];
135 double fRec48[2];
136 double fRec47[2];
137 double fRec46[2];
138 double fRec45[2];
139 double fVec11[2];
140 double fRec49[2];
141 double fRec44[2];
142 double fRec43[2];
143 double fVec12[2];
144 double fRec50[2];
145 double fRec42[2];
146 double fRec41[2];
147 double fRec58[3];
148 double fVec13[2];
149 double fRec57[2];
150 double fRec56[2];
151 double fRec55[3];
152 double fVec14[2];
153 double fRec54[2];
154 double fRec53[3];
155 double fRec52[3];
156 double fRec62[2];
157 double fRec61[3];
158 double fVec15[2];
159 double fRec60[2];
160 double fRec59[3];
161 double fRec66[2];
162 double fRec65[3];
163 double fRec64[3];
164 double fRec63[3];
165 double fRec68[2];
166 double fRec67[3];
167 double fVec16[2];
168 double fRec51[2];
169 double fVec17[2];
170 double fRec40[2];
171 double fVec18[2];
172 double fRec69[2];
173 double fRec39[2];
174 double fRec38[2];
175 double fVec19[2];
176 double fRec72[2];
177 double fRec71[2];
178 double fRec70[2];
179 void connect(uint32_t port,void* data);
180 void clear_state_f();
181 void init(uint32_t samplingFreq);
182 void compute(int count, float *input0, float *input1, float *output0, float *output1);
183
184 static void clear_state_f_static(PluginLV2*);
185 static void init_static(uint32_t samplingFreq, PluginLV2*);
186 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
187 static void del_instance(PluginLV2 *p);
188 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
189 public:
190 Dsp();
191 ~Dsp();
192 };
193
194
195
196 Dsp::Dsp()
197 : PluginLV2() {
198 version = PLUGINLV2_VERSION;
199 id = "pre 12ax7/ master 6V6";
200 name = N_("pre 12ax7/ master 6V6");
201 mono_audio = 0;
202 stereo_audio = compute_static;
203 set_samplerate = init_static;
204 activate_plugin = 0;
205 connect_ports = connect_static;
206 clear_state = clear_state_f_static;
207 delete_instance = del_instance;
208 }
209
210 Dsp::~Dsp() {
211 }
212
213 inline void Dsp::clear_state_f()
214 {
215 for (int i=0; i<2; i++) fVec0[i] = 0;
216 for (int i=0; i<2; i++) fRec2[i] = 0;
217 for (int i=0; i<2; i++) fRec3[i] = 0;
218 for (int i=0; i<2; i++) fRec13[i] = 0;
219 for (int i=0; i<2; i++) fRec21[i] = 0;
220 for (int i=0; i<2; i++) fVec1[i] = 0;
221 for (int i=0; i<2; i++) fRec22[i] = 0;
222 for (int i=0; i<2; i++) fRec20[i] = 0;
223 for (int i=0; i<2; i++) fRec19[i] = 0;
224 for (int i=0; i<2; i++) fRec18[i] = 0;
225 for (int i=0; i<2; i++) fVec2[i] = 0;
226 for (int i=0; i<2; i++) fRec23[i] = 0;
227 for (int i=0; i<2; i++) fRec17[i] = 0;
228 for (int i=0; i<2; i++) fRec16[i] = 0;
229 for (int i=0; i<2; i++) fVec3[i] = 0;
230 for (int i=0; i<2; i++) fRec24[i] = 0;
231 for (int i=0; i<2; i++) fRec15[i] = 0;
232 for (int i=0; i<2; i++) fRec14[i] = 0;
233 for (int i=0; i<3; i++) fRec12[i] = 0;
234 for (int i=0; i<2; i++) fVec4[i] = 0;
235 for (int i=0; i<2; i++) fRec11[i] = 0;
236 for (int i=0; i<2; i++) fRec10[i] = 0;
237 for (int i=0; i<3; i++) fRec9[i] = 0;
238 for (int i=0; i<2; i++) fVec5[i] = 0;
239 for (int i=0; i<2; i++) fRec8[i] = 0;
240 for (int i=0; i<3; i++) fRec7[i] = 0;
241 for (int i=0; i<3; i++) fRec6[i] = 0;
242 for (int i=0; i<2; i++) fRec28[i] = 0;
243 for (int i=0; i<3; i++) fRec27[i] = 0;
244 for (int i=0; i<2; i++) fVec6[i] = 0;
245 for (int i=0; i<2; i++) fRec26[i] = 0;
246 for (int i=0; i<3; i++) fRec25[i] = 0;
247 for (int i=0; i<2; i++) fRec32[i] = 0;
248 for (int i=0; i<3; i++) fRec31[i] = 0;
249 for (int i=0; i<3; i++) fRec30[i] = 0;
250 for (int i=0; i<3; i++) fRec29[i] = 0;
251 for (int i=0; i<2; i++) fRec34[i] = 0;
252 for (int i=0; i<3; i++) fRec33[i] = 0;
253 for (int i=0; i<2; i++) fVec7[i] = 0;
254 for (int i=0; i<2; i++) fRec5[i] = 0;
255 for (int i=0; i<2; i++) fVec8[i] = 0;
256 for (int i=0; i<2; i++) fRec4[i] = 0;
257 for (int i=0; i<2; i++) fRec1[i] = 0;
258 for (int i=0; i<2; i++) fRec0[i] = 0;
259 for (int i=0; i<2; i++) fVec9[i] = 0;
260 for (int i=0; i<2; i++) fRec37[i] = 0;
261 for (int i=0; i<2; i++) fRec36[i] = 0;
262 for (int i=0; i<2; i++) fRec35[i] = 0;
263 for (int i=0; i<2; i++) fVec10[i] = 0;
264 for (int i=0; i<2; i++) fRec48[i] = 0;
265 for (int i=0; i<2; i++) fRec47[i] = 0;
266 for (int i=0; i<2; i++) fRec46[i] = 0;
267 for (int i=0; i<2; i++) fRec45[i] = 0;
268 for (int i=0; i<2; i++) fVec11[i] = 0;
269 for (int i=0; i<2; i++) fRec49[i] = 0;
270 for (int i=0; i<2; i++) fRec44[i] = 0;
271 for (int i=0; i<2; i++) fRec43[i] = 0;
272 for (int i=0; i<2; i++) fVec12[i] = 0;
273 for (int i=0; i<2; i++) fRec50[i] = 0;
274 for (int i=0; i<2; i++) fRec42[i] = 0;
275 for (int i=0; i<2; i++) fRec41[i] = 0;
276 for (int i=0; i<3; i++) fRec58[i] = 0;
277 for (int i=0; i<2; i++) fVec13[i] = 0;
278 for (int i=0; i<2; i++) fRec57[i] = 0;
279 for (int i=0; i<2; i++) fRec56[i] = 0;
280 for (int i=0; i<3; i++) fRec55[i] = 0;
281 for (int i=0; i<2; i++) fVec14[i] = 0;
282 for (int i=0; i<2; i++) fRec54[i] = 0;
283 for (int i=0; i<3; i++) fRec53[i] = 0;
284 for (int i=0; i<3; i++) fRec52[i] = 0;
285 for (int i=0; i<2; i++) fRec62[i] = 0;
286 for (int i=0; i<3; i++) fRec61[i] = 0;
287 for (int i=0; i<2; i++) fVec15[i] = 0;
288 for (int i=0; i<2; i++) fRec60[i] = 0;
289 for (int i=0; i<3; i++) fRec59[i] = 0;
290 for (int i=0; i<2; i++) fRec66[i] = 0;
291 for (int i=0; i<3; i++) fRec65[i] = 0;
292 for (int i=0; i<3; i++) fRec64[i] = 0;
293 for (int i=0; i<3; i++) fRec63[i] = 0;
294 for (int i=0; i<2; i++) fRec68[i] = 0;
295 for (int i=0; i<3; i++) fRec67[i] = 0;
296 for (int i=0; i<2; i++) fVec16[i] = 0;
297 for (int i=0; i<2; i++) fRec51[i] = 0;
298 for (int i=0; i<2; i++) fVec17[i] = 0;
299 for (int i=0; i<2; i++) fRec40[i] = 0;
300 for (int i=0; i<2; i++) fVec18[i] = 0;
301 for (int i=0; i<2; i++) fRec69[i] = 0;
302 for (int i=0; i<2; i++) fRec39[i] = 0;
303 for (int i=0; i<2; i++) fRec38[i] = 0;
304 for (int i=0; i<2; i++) fVec19[i] = 0;
305 for (int i=0; i<2; i++) fRec72[i] = 0;
306 for (int i=0; i<2; i++) fRec71[i] = 0;
307 for (int i=0; i<2; i++) fRec70[i] = 0;
308 }
309
310 void Dsp::clear_state_f_static(PluginLV2 *p)
311 {
312 static_cast<Dsp*>(p)->clear_state_f();
313 }
314
315 inline void Dsp::init(uint32_t samplingFreq)
316 {
317 fSamplingFreq = samplingFreq;
318 iConst0 = min(192000, max(1, fSamplingFreq));
319 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
320 fConst2 = (1 + fConst1);
321 fConst3 = (0 - ((1 - fConst1) / fConst2));
322 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
323 fConst5 = (1 + fConst4);
324 fConst6 = (0 - ((1 - fConst4) / fConst5));
325 fConst7 = (1.0 / fConst5);
326 fConst8 = tan((942.4777960769379 / iConst0));
327 fConst9 = (1.0 / faustpower<2>(fConst8));
328 fConst10 = (2 * (1 - fConst9));
329 fConst11 = (1.0 / fConst8);
330 fConst12 = (1 + ((fConst11 - 1.0) / fConst8));
331 fConst13 = (1.0 / (1 + ((1.0 + fConst11) / fConst8)));
332 fConst14 = tan((3769.9111843077517 / iConst0));
333 fConst15 = (1.0 / faustpower<2>(fConst14));
334 fConst16 = (2 * (1 - fConst15));
335 fConst17 = (1.0 / fConst14);
336 fConst18 = (1 + ((fConst17 - 1.0000000000000004) / fConst14));
337 fConst19 = (1 + ((fConst17 + 1.0000000000000004) / fConst14));
338 fConst20 = (1.0 / fConst19);
339 fConst21 = (1 + fConst17);
340 fConst22 = (0 - ((1 - fConst17) / fConst21));
341 fConst23 = tan((10053.096491487338 / iConst0));
342 fConst24 = (1.0 / faustpower<2>(fConst23));
343 fConst25 = (2 * (1 - fConst24));
344 fConst26 = (1.0 / fConst23);
345 fConst27 = (1 + ((fConst26 - 1.0000000000000004) / fConst23));
346 fConst28 = (1 + ((1.0000000000000004 + fConst26) / fConst23));
347 fConst29 = (1.0 / fConst28);
348 fConst30 = (1 + fConst26);
349 fConst31 = (0 - ((1 - fConst26) / fConst30));
350 fConst32 = tan((47123.8898038469 / iConst0));
351 fConst33 = (2 * (1 - (1.0 / faustpower<2>(fConst32))));
352 fConst34 = (1.0 / fConst32);
353 fConst35 = (1 + ((fConst34 - 1.414213562373095) / fConst32));
354 fConst36 = (1 + ((1.414213562373095 + fConst34) / fConst32));
355 fConst37 = (1.0 / fConst36);
356 fConst38 = (1.0 / tan((270.1769682087222 / iConst0)));
357 fConst39 = (1 + fConst38);
358 fConst40 = (0 - ((1 - fConst38) / fConst39));
359 fConst41 = (1.0 / fConst39);
360 fConst42 = (0 - fConst1);
361 fConst43 = (0.025 / fConst2);
362 fConst44 = (1.0 / tan((414.6902302738527 / iConst0)));
363 fConst45 = (1 + fConst44);
364 fConst46 = (0 - ((1 - fConst44) / fConst45));
365 fConst47 = (1.0 / fConst45);
366 fConst48 = (1.0 / tan((609.4689747964198 / iConst0)));
367 fConst49 = (1 + fConst48);
368 fConst50 = (0 - ((1 - fConst48) / fConst49));
369 fConst51 = (1.0 / fConst49);
370 fConst52 = (1.0 / (fConst2 * fConst36));
371 fConst53 = (1.0 / fConst30);
372 fConst54 = (0 - fConst17);
373 fConst55 = (1.0 / (fConst21 * fConst28));
374 fConst56 = (2 * (0 - fConst15));
375 fConst57 = (1 + ((fConst11 - 1.0000000000000004) / fConst8));
376 fConst58 = (1.0 / (1 + ((fConst11 + 1.0000000000000004) / fConst8)));
377 fConst59 = (1 + fConst11);
378 fConst60 = (0 - ((1 - fConst11) / fConst59));
379 fConst61 = (0 - fConst11);
380 fConst62 = (1.0 / (fConst59 * fConst19));
381 fConst63 = (2 * (0 - fConst9));
382 fConst64 = (1 + ((fConst17 - 1.0) / fConst14));
383 fConst65 = (1.0 / (1 + ((1.0 + fConst17) / fConst14)));
384 fConst66 = (0 - fConst26);
385 fConst67 = (2 * (0 - fConst24));
386 clear_state_f();
387 }
388
389 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
390 {
391 static_cast<Dsp*>(p)->init(samplingFreq);
392 }
393
394 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
395 {
396 #define fslider0 (*fslider0_)
397 #define fslider1 (*fslider1_)
398 #define fslider2 (*fslider2_)
399 #define fslider3 (*fslider3_)
400 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
401 double fSlow1 = (1.000000000000001e-05 * fslider1);
402 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
403 double fSlow3 = fslider3;
404 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
405 double fSlow5 = (fConst58 * pow(1e+01,(2 * fSlow3)));
406 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
407 double fSlow7 = (fConst58 * pow(1e+01,(0.9 * fSlow3)));
408 double fSlow8 = (2 * (fSlow3 - 0.5));
409 double fSlow9 = (1 - max(0, (0 - fSlow8)));
410 double fSlow10 = (1 - max(0, fSlow8));
411 double fSlow11 = (1.25 * fSlow3);
412 for (int i=0; i<count; i++) {
413 double fTemp0 = (1e-15 + (0.0082 * fRec1[1]));
414 fVec0[0] = fTemp0;
415 fRec2[0] = ((fConst7 * (fVec0[0] + fVec0[1])) + (fConst6 * fRec2[1]));
416 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
417 double fTemp1 = (fConst10 * fRec6[1]);
418 fRec13[0] = (fSlow1 + (0.999 * fRec13[1]));
419 fRec21[0] = (fSlow2 + (0.999 * fRec21[1]));
420 double fTemp2 = (1e-15 + (0.027 * fRec20[1]));
421 fVec1[0] = fTemp2;
422 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst40 * fRec22[1]));
423 fRec20[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec22[0] + ((double)input0[i] * fRec21[0])) - 1.5816559999999988)) - 191.42014814814814);
424 fRec19[0] = ((fConst43 * ((fConst42 * fRec20[1]) + (fConst1 * fRec20[0]))) + (fConst3 * fRec19[1]));
425 fRec18[0] = ((fConst7 * (fRec19[0] + fRec19[1])) + (fConst6 * fRec18[1]));
426 double fTemp3 = (1e-15 + (0.015 * fRec17[1]));
427 fVec2[0] = fTemp3;
428 fRec23[0] = ((fConst47 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec23[1]));
429 fRec17[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec23[0] + fRec18[0]) - 1.204284999999999)) - 169.71433333333334);
430 fRec16[0] = ((fConst43 * ((fConst42 * fRec17[1]) + (fConst1 * fRec17[0]))) + (fConst3 * fRec16[1]));
431 double fTemp4 = (1e-15 + (0.0082 * fRec15[1]));
432 fVec3[0] = fTemp4;
433 fRec24[0] = ((fConst51 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec24[1]));
434 fRec15[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec24[0] + fRec16[0]) - 0.840702999999999)) - 147.47524390243905);
435 fRec14[0] = ((fConst43 * ((fConst42 * fRec15[1]) + (fConst1 * fRec15[0]))) + (fConst3 * fRec14[1]));
436 double fTemp5 = (1e-15 + (fRec14[0] * fRec13[0]));
437 fRec12[0] = (fTemp5 - (fConst37 * ((fConst35 * fRec12[2]) + (fConst33 * fRec12[1]))));
438 double fTemp6 = (fRec12[2] + (fRec12[0] + (2 * fRec12[1])));
439 fVec4[0] = fTemp6;
440 fRec11[0] = ((fConst52 * ((fConst42 * fVec4[1]) + (fConst1 * fVec4[0]))) + (fConst3 * fRec11[1]));
441 fRec10[0] = ((fConst53 * (fRec11[0] + fRec11[1])) + (fConst31 * fRec10[1]));
442 fRec9[0] = (fRec10[0] - (fConst29 * ((fConst27 * fRec9[2]) + (fConst25 * fRec9[1]))));
443 double fTemp7 = (fRec9[2] + (fRec9[0] + (2 * fRec9[1])));
444 fVec5[0] = fTemp7;
445 fRec8[0] = ((fConst55 * ((fConst54 * fVec5[1]) + (fConst17 * fVec5[0]))) + (fConst22 * fRec8[1]));
446 fRec7[0] = (fRec8[0] - (fConst20 * ((fConst18 * fRec7[2]) + (fConst16 * fRec7[1]))));
447 fRec6[0] = ((fConst20 * (((fConst15 * fRec7[0]) + (fConst56 * fRec7[1])) + (fConst15 * fRec7[2]))) - (fConst13 * ((fConst12 * fRec6[2]) + fTemp1)));
448 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec6[2] + (fConst13 * (fTemp1 + (fConst12 * fRec6[0])))))));
449 fRec28[0] = ((fConst55 * (fVec5[0] + fVec5[1])) + (fConst22 * fRec28[1]));
450 fRec27[0] = (fRec28[0] - (fConst20 * ((fConst18 * fRec27[2]) + (fConst16 * fRec27[1]))));
451 double fTemp9 = (fRec27[2] + (fRec27[0] + (2 * fRec27[1])));
452 fVec6[0] = fTemp9;
453 fRec26[0] = ((fConst62 * ((fConst61 * fVec6[1]) + (fConst11 * fVec6[0]))) + (fConst60 * fRec26[1]));
454 fRec25[0] = (fRec26[0] - (fConst58 * ((fConst57 * fRec25[2]) + (fConst10 * fRec25[1]))));
455 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec25[0]) + (fConst63 * fRec25[1])) + (fConst9 * fRec25[2])))));
456 double fTemp11 = (fConst10 * fRec29[1]);
457 double fTemp12 = (fConst16 * fRec30[1]);
458 fRec32[0] = ((fConst53 * ((fConst66 * fRec11[1]) + (fConst26 * fRec11[0]))) + (fConst31 * fRec32[1]));
459 fRec31[0] = (fRec32[0] - (fConst29 * ((fConst27 * fRec31[2]) + (fConst25 * fRec31[1]))));
460 fRec30[0] = ((fConst29 * (((fConst24 * fRec31[0]) + (fConst67 * fRec31[1])) + (fConst24 * fRec31[2]))) - (fConst65 * ((fConst64 * fRec30[2]) + fTemp12)));
461 fRec29[0] = ((fRec30[2] + (fConst65 * (fTemp12 + (fConst64 * fRec30[0])))) - (fConst13 * ((fConst12 * fRec29[2]) + fTemp11)));
462 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec29[2] + (fConst13 * (fTemp11 + (fConst12 * fRec29[0])))))));
463 fRec34[0] = ((fConst62 * (fVec6[0] + fVec6[1])) + (fConst60 * fRec34[1]));
464 fRec33[0] = (fRec34[0] - (fConst58 * ((fConst57 * fRec33[2]) + (fConst10 * fRec33[1]))));
465 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec33[2] + (fRec33[0] + (2 * fRec33[1]))))));
466 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
467 fVec7[0] = fTemp15;
468 fRec5[0] = ((fConst7 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec5[1]));
469 double fTemp16 = (1 - fRec13[0]);
470 double fTemp17 = (fRec14[0] * fTemp16);
471 double fTemp18 = (1e-15 + fTemp17);
472 double fTemp19 = (1e-15 + ((fSlow11 * ((fTemp18 * (4 - (4 * fabs(fTemp18)))) - fTemp18)) + ((fSlow10 * fTemp5) + (fTemp17 + (fSlow9 * fRec5[0])))));
473 fVec8[0] = fTemp19;
474 fRec4[0] = ((fConst7 * (fVec8[0] + fVec8[1])) + (fConst6 * fRec4[1]));
475 double fTemp20 = (fRec4[0] * fRec3[0]);
476 fRec1[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp20 + fRec2[0]) - 1.130739999999999)) - 112.10487804878048);
477 fRec0[0] = ((fConst43 * ((fConst42 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
478 double fTemp21 = (1e-15 + (0.0082 * fRec36[1]));
479 fVec9[0] = fTemp21;
480 fRec37[0] = ((fConst7 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec37[1]));
481 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec37[0] + fTemp20) - 1.130461999999999)) - 112.13878048780487);
482 fRec35[0] = ((fConst43 * ((fConst42 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
483 output0[i] = (FAUSTFLOAT)(fRec35[0] + fRec0[0]);
484 double fTemp22 = (1e-15 + (0.027 * fRec47[1]));
485 fVec10[0] = fTemp22;
486 fRec48[0] = ((fConst41 * (fVec10[0] + fVec10[1])) + (fConst40 * fRec48[1]));
487 fRec47[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec48[0] + ((double)input1[i] * fRec21[0])) - 1.5816559999999988)) - 191.42014814814814);
488 fRec46[0] = ((fConst43 * ((fConst42 * fRec47[1]) + (fConst1 * fRec47[0]))) + (fConst3 * fRec46[1]));
489 fRec45[0] = ((fConst7 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
490 double fTemp23 = (1e-15 + (0.015 * fRec44[1]));
491 fVec11[0] = fTemp23;
492 fRec49[0] = ((fConst47 * (fVec11[0] + fVec11[1])) + (fConst46 * fRec49[1]));
493 fRec44[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec49[0] + fRec45[0]) - 1.204284999999999)) - 169.71433333333334);
494 fRec43[0] = ((fConst43 * ((fConst42 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
495 double fTemp24 = (1e-15 + (0.0082 * fRec42[1]));
496 fVec12[0] = fTemp24;
497 fRec50[0] = ((fConst51 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec50[1]));
498 fRec42[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec50[0] + fRec43[0]) - 0.840702999999999)) - 147.47524390243905);
499 fRec41[0] = ((fConst43 * ((fConst42 * fRec42[1]) + (fConst1 * fRec42[0]))) + (fConst3 * fRec41[1]));
500 double fTemp25 = (fTemp16 * fRec41[0]);
501 double fTemp26 = (1e-15 + (fRec13[0] * fRec41[0]));
502 double fTemp27 = (fConst10 * fRec52[1]);
503 fRec58[0] = (fTemp26 - (fConst37 * ((fConst35 * fRec58[2]) + (fConst33 * fRec58[1]))));
504 double fTemp28 = (fRec58[2] + (fRec58[0] + (2 * fRec58[1])));
505 fVec13[0] = fTemp28;
506 fRec57[0] = ((fConst52 * ((fConst42 * fVec13[1]) + (fConst1 * fVec13[0]))) + (fConst3 * fRec57[1]));
507 fRec56[0] = ((fConst53 * (fRec57[0] + fRec57[1])) + (fConst31 * fRec56[1]));
508 fRec55[0] = (fRec56[0] - (fConst29 * ((fConst27 * fRec55[2]) + (fConst25 * fRec55[1]))));
509 double fTemp29 = (fRec55[2] + (fRec55[0] + (2 * fRec55[1])));
510 fVec14[0] = fTemp29;
511 fRec54[0] = ((fConst55 * ((fConst54 * fVec14[1]) + (fConst17 * fVec14[0]))) + (fConst22 * fRec54[1]));
512 fRec53[0] = (fRec54[0] - (fConst20 * ((fConst18 * fRec53[2]) + (fConst16 * fRec53[1]))));
513 fRec52[0] = ((fConst20 * (((fConst15 * fRec53[0]) + (fConst56 * fRec53[1])) + (fConst15 * fRec53[2]))) - (fConst13 * ((fConst12 * fRec52[2]) + fTemp27)));
514 double fTemp30 = max(-1, min(1, (fSlow4 * (fRec52[2] + (fConst13 * (fTemp27 + (fConst12 * fRec52[0])))))));
515 fRec62[0] = ((fConst55 * (fVec14[0] + fVec14[1])) + (fConst22 * fRec62[1]));
516 fRec61[0] = (fRec62[0] - (fConst20 * ((fConst18 * fRec61[2]) + (fConst16 * fRec61[1]))));
517 double fTemp31 = (fRec61[2] + (fRec61[0] + (2 * fRec61[1])));
518 fVec15[0] = fTemp31;
519 fRec60[0] = ((fConst62 * ((fConst61 * fVec15[1]) + (fConst11 * fVec15[0]))) + (fConst60 * fRec60[1]));
520 fRec59[0] = (fRec60[0] - (fConst58 * ((fConst57 * fRec59[2]) + (fConst10 * fRec59[1]))));
521 double fTemp32 = max(-1, min(1, (fSlow5 * (((fConst9 * fRec59[0]) + (fConst63 * fRec59[1])) + (fConst9 * fRec59[2])))));
522 double fTemp33 = (fConst10 * fRec63[1]);
523 double fTemp34 = (fConst16 * fRec64[1]);
524 fRec66[0] = ((fConst53 * ((fConst66 * fRec57[1]) + (fConst26 * fRec57[0]))) + (fConst31 * fRec66[1]));
525 fRec65[0] = (fRec66[0] - (fConst29 * ((fConst27 * fRec65[2]) + (fConst25 * fRec65[1]))));
526 fRec64[0] = ((fConst29 * (((fConst24 * fRec65[0]) + (fConst67 * fRec65[1])) + (fConst24 * fRec65[2]))) - (fConst65 * ((fConst64 * fRec64[2]) + fTemp34)));
527 fRec63[0] = ((fRec64[2] + (fConst65 * (fTemp34 + (fConst64 * fRec64[0])))) - (fConst13 * ((fConst12 * fRec63[2]) + fTemp33)));
528 double fTemp35 = max(-1, min(1, (fSlow6 * (fRec63[2] + (fConst13 * (fTemp33 + (fConst12 * fRec63[0])))))));
529 fRec68[0] = ((fConst62 * (fVec15[0] + fVec15[1])) + (fConst60 * fRec68[1]));
530 fRec67[0] = (fRec68[0] - (fConst58 * ((fConst57 * fRec67[2]) + (fConst10 * fRec67[1]))));
531 double fTemp36 = max(-1, min(1, (fSlow7 * (fRec67[2] + (fRec67[0] + (2 * fRec67[1]))))));
532 double fTemp37 = ((1.2589412 * (fTemp36 * (1 - (0.3333333333333333 * faustpower<2>(fTemp36))))) + (1.584893192 * ((fTemp35 * (1 - (0.3333333333333333 * faustpower<2>(fTemp35)))) + ((fTemp32 * (1 - (0.3333333333333333 * faustpower<2>(fTemp32)))) + (0.8413951417869425 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))))))));
533 fVec16[0] = fTemp37;
534 fRec51[0] = ((fConst7 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec51[1]));
535 double fTemp38 = (1e-15 + fTemp25);
536 double fTemp39 = (1e-15 + ((fSlow11 * ((fTemp38 * (4 - (4 * fabs(fTemp38)))) - fTemp38)) + (((fSlow9 * fRec51[0]) + (fSlow10 * fTemp26)) + fTemp25)));
537 fVec17[0] = fTemp39;
538 fRec40[0] = ((fConst7 * (fVec17[0] + fVec17[1])) + (fConst6 * fRec40[1]));
539 double fTemp40 = (fRec3[0] * fRec40[0]);
540 double fTemp41 = (1e-15 + (0.0082 * fRec39[1]));
541 fVec18[0] = fTemp41;
542 fRec69[0] = ((fConst7 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec69[1]));
543 fRec39[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec69[0] + fTemp40) - 1.130739999999999)) - 112.10487804878048);
544 fRec38[0] = ((fConst43 * ((fConst42 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
545 double fTemp42 = (1e-15 + (0.0082 * fRec71[1]));
546 fVec19[0] = fTemp42;
547 fRec72[0] = ((fConst7 * (fVec19[0] + fVec19[1])) + (fConst6 * fRec72[1]));
548 fRec71[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec72[0] + fTemp40) - 1.130461999999999)) - 112.13878048780487);
549 fRec70[0] = ((fConst43 * ((fConst42 * fRec71[1]) + (fConst1 * fRec71[0]))) + (fConst3 * fRec70[1]));
550 output1[i] = (FAUSTFLOAT)(fRec70[0] + fRec38[0]);
551 // post processing
552 fRec70[1] = fRec70[0];
553 fRec71[1] = fRec71[0];
554 fRec72[1] = fRec72[0];
555 fVec19[1] = fVec19[0];
556 fRec38[1] = fRec38[0];
557 fRec39[1] = fRec39[0];
558 fRec69[1] = fRec69[0];
559 fVec18[1] = fVec18[0];
560 fRec40[1] = fRec40[0];
561 fVec17[1] = fVec17[0];
562 fRec51[1] = fRec51[0];
563 fVec16[1] = fVec16[0];
564 fRec67[2] = fRec67[1]; fRec67[1] = fRec67[0];
565 fRec68[1] = fRec68[0];
566 fRec63[2] = fRec63[1]; fRec63[1] = fRec63[0];
567 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
568 fRec65[2] = fRec65[1]; fRec65[1] = fRec65[0];
569 fRec66[1] = fRec66[0];
570 fRec59[2] = fRec59[1]; fRec59[1] = fRec59[0];
571 fRec60[1] = fRec60[0];
572 fVec15[1] = fVec15[0];
573 fRec61[2] = fRec61[1]; fRec61[1] = fRec61[0];
574 fRec62[1] = fRec62[0];
575 fRec52[2] = fRec52[1]; fRec52[1] = fRec52[0];
576 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
577 fRec54[1] = fRec54[0];
578 fVec14[1] = fVec14[0];
579 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
580 fRec56[1] = fRec56[0];
581 fRec57[1] = fRec57[0];
582 fVec13[1] = fVec13[0];
583 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
584 fRec41[1] = fRec41[0];
585 fRec42[1] = fRec42[0];
586 fRec50[1] = fRec50[0];
587 fVec12[1] = fVec12[0];
588 fRec43[1] = fRec43[0];
589 fRec44[1] = fRec44[0];
590 fRec49[1] = fRec49[0];
591 fVec11[1] = fVec11[0];
592 fRec45[1] = fRec45[0];
593 fRec46[1] = fRec46[0];
594 fRec47[1] = fRec47[0];
595 fRec48[1] = fRec48[0];
596 fVec10[1] = fVec10[0];
597 fRec35[1] = fRec35[0];
598 fRec36[1] = fRec36[0];
599 fRec37[1] = fRec37[0];
600 fVec9[1] = fVec9[0];
601 fRec0[1] = fRec0[0];
602 fRec1[1] = fRec1[0];
603 fRec4[1] = fRec4[0];
604 fVec8[1] = fVec8[0];
605 fRec5[1] = fRec5[0];
606 fVec7[1] = fVec7[0];
607 fRec33[2] = fRec33[1]; fRec33[1] = fRec33[0];
608 fRec34[1] = fRec34[0];
609 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
610 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
611 fRec31[2] = fRec31[1]; fRec31[1] = fRec31[0];
612 fRec32[1] = fRec32[0];
613 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
614 fRec26[1] = fRec26[0];
615 fVec6[1] = fVec6[0];
616 fRec27[2] = fRec27[1]; fRec27[1] = fRec27[0];
617 fRec28[1] = fRec28[0];
618 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
619 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
620 fRec8[1] = fRec8[0];
621 fVec5[1] = fVec5[0];
622 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
623 fRec10[1] = fRec10[0];
624 fRec11[1] = fRec11[0];
625 fVec4[1] = fVec4[0];
626 fRec12[2] = fRec12[1]; fRec12[1] = fRec12[0];
627 fRec14[1] = fRec14[0];
628 fRec15[1] = fRec15[0];
629 fRec24[1] = fRec24[0];
630 fVec3[1] = fVec3[0];
631 fRec16[1] = fRec16[0];
632 fRec17[1] = fRec17[0];
633 fRec23[1] = fRec23[0];
634 fVec2[1] = fVec2[0];
635 fRec18[1] = fRec18[0];
636 fRec19[1] = fRec19[0];
637 fRec20[1] = fRec20[0];
638 fRec22[1] = fRec22[0];
639 fVec1[1] = fVec1[0];
640 fRec21[1] = fRec21[0];
641 fRec13[1] = fRec13[0];
642 fRec3[1] = fRec3[0];
643 fRec2[1] = fRec2[0];
644 fVec0[1] = fVec0[0];
645 }
646 #undef fslider0
647 #undef fslider1
648 #undef fslider2
649 #undef fslider3
650 }
651
652 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
653 {
654 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
655 }
656
657
658 void Dsp::connect(uint32_t port,void* data)
659 {
660 switch ((PortIndex)port)
661 {
662 case DRIVE:
663 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
664 break;
665 case PREGAIN:
666 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
667 break;
668 case WET_DRY:
669 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
670 break;
671 case GAIN1:
672 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
673 break;
674 default:
675 break;
676 }
677 }
678
679 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
680 {
681 static_cast<Dsp*>(p)->connect(port, data);
682 }
683
684
685 PluginLV2 *plugin() {
686 return new Dsp();
687 }
688
689 void Dsp::del_instance(PluginLV2 *p)
690 {
691 delete static_cast<Dsp*>(p);
692 }
693
694 /*
695 typedef enum
696 {
697 DRIVE,
698 PREGAIN,
699 WET_DRY,
700 GAIN1,
701 } PortIndex;
702 */
703
704 } // end namespace gxamp5_stereo
0 // generated from file '../src/LV2/faust/gxamp6.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp6 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fVec1[2];
48 double fConst29;
49 double fRec21[2];
50 double fRec20[2];
51 double fRec19[3];
52 double fRec18[3];
53 FAUSTFLOAT fslider2;
54 FAUSTFLOAT *fslider2_;
55 double fRec22[2];
56 double fConst30;
57 double fConst31;
58 double fConst32;
59 double fVec2[2];
60 double fConst33;
61 double fRec23[2];
62 double fRec17[2];
63 double fConst34;
64 double fConst35;
65 double fRec16[2];
66 double fConst36;
67 double fConst37;
68 double fConst38;
69 double fVec3[2];
70 double fConst39;
71 double fRec26[2];
72 double fRec25[2];
73 double fRec24[2];
74 double fRec15[2];
75 double fRec14[2];
76 double fVec4[2];
77 double fRec27[2];
78 double fRec13[2];
79 double fRec12[2];
80 double fConst40;
81 double fConst41;
82 double fConst42;
83 double fVec5[2];
84 double fConst43;
85 double fRec30[2];
86 double fRec29[2];
87 double fRec28[2];
88 double fRec11[2];
89 double fVec6[2];
90 double fRec31[2];
91 double fRec10[2];
92 double fRec9[2];
93 FAUSTFLOAT fslider3;
94 FAUSTFLOAT *fslider3_;
95 double fRec34[2];
96 int IOTA;
97 double fVec7[32768];
98 int iConst44;
99 double fRec33[2];
100 double fConst45;
101 double fRec32[2];
102 double fConst46;
103 double fConst47;
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fRec42[3];
133 double fVec8[2];
134 double fConst76;
135 double fRec41[2];
136 double fConst77;
137 double fRec40[2];
138 double fRec39[3];
139 double fVec9[2];
140 double fConst78;
141 double fConst79;
142 double fRec38[2];
143 double fRec37[3];
144 double fConst80;
145 double fRec36[3];
146 double fConst81;
147 double fConst82;
148 double fConst83;
149 double fConst84;
150 double fRec46[2];
151 double fRec45[3];
152 double fVec10[2];
153 double fConst85;
154 double fConst86;
155 double fRec44[2];
156 double fRec43[3];
157 double fConst87;
158 double fConst88;
159 double fConst89;
160 double fConst90;
161 double fRec50[2];
162 double fRec49[3];
163 double fConst91;
164 double fRec48[3];
165 double fRec47[3];
166 double fRec52[2];
167 double fRec51[3];
168 double fVec11[2];
169 double fRec35[2];
170 double fVec12[2];
171 double fRec7[2];
172 double fRec4[2];
173 double fConst92;
174 double fRec3[2];
175 double fVec13[2];
176 double fRec55[2];
177 double fRec54[2];
178 double fRec53[2];
179 double fVec14[3];
180 double fConst93;
181 double fConst94;
182 double fRec2[3];
183 double fConst95;
184 double fConst96;
185 double fRec1[3];
186 double fConst97;
187 double fConst98;
188 double fRec0[3];
189 void connect(uint32_t port,void* data);
190 void clear_state_f();
191 void init(uint32_t samplingFreq);
192 void compute(int count, float *input0, float *output0);
193
194 static void clear_state_f_static(PluginLV2*);
195 static void init_static(uint32_t samplingFreq, PluginLV2*);
196 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
197 static void del_instance(PluginLV2 *p);
198 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
199 public:
200 Dsp();
201 ~Dsp();
202 };
203
204
205
206 Dsp::Dsp()
207 : PluginLV2() {
208 version = PLUGINLV2_VERSION;
209 id = "pre 6DJ8/ push-pull 6V6";
210 name = N_("pre 6DJ8/ push-pull 6V6");
211 mono_audio = compute_static;
212 stereo_audio = 0;
213 set_samplerate = init_static;
214 activate_plugin = 0;
215 connect_ports = connect_static;
216 clear_state = clear_state_f_static;
217 delete_instance = del_instance;
218 }
219
220 Dsp::~Dsp() {
221 }
222
223 inline void Dsp::clear_state_f()
224 {
225 for (int i=0; i<2; i++) fVec0[i] = 0;
226 for (int i=0; i<2; i++) fRec5[i] = 0;
227 for (int i=0; i<2; i++) fRec6[i] = 0;
228 for (int i=0; i<2; i++) fRec8[i] = 0;
229 for (int i=0; i<2; i++) fVec1[i] = 0;
230 for (int i=0; i<2; i++) fRec21[i] = 0;
231 for (int i=0; i<2; i++) fRec20[i] = 0;
232 for (int i=0; i<3; i++) fRec19[i] = 0;
233 for (int i=0; i<3; i++) fRec18[i] = 0;
234 for (int i=0; i<2; i++) fRec22[i] = 0;
235 for (int i=0; i<2; i++) fVec2[i] = 0;
236 for (int i=0; i<2; i++) fRec23[i] = 0;
237 for (int i=0; i<2; i++) fRec17[i] = 0;
238 for (int i=0; i<2; i++) fRec16[i] = 0;
239 for (int i=0; i<2; i++) fVec3[i] = 0;
240 for (int i=0; i<2; i++) fRec26[i] = 0;
241 for (int i=0; i<2; i++) fRec25[i] = 0;
242 for (int i=0; i<2; i++) fRec24[i] = 0;
243 for (int i=0; i<2; i++) fRec15[i] = 0;
244 for (int i=0; i<2; i++) fRec14[i] = 0;
245 for (int i=0; i<2; i++) fVec4[i] = 0;
246 for (int i=0; i<2; i++) fRec27[i] = 0;
247 for (int i=0; i<2; i++) fRec13[i] = 0;
248 for (int i=0; i<2; i++) fRec12[i] = 0;
249 for (int i=0; i<2; i++) fVec5[i] = 0;
250 for (int i=0; i<2; i++) fRec30[i] = 0;
251 for (int i=0; i<2; i++) fRec29[i] = 0;
252 for (int i=0; i<2; i++) fRec28[i] = 0;
253 for (int i=0; i<2; i++) fRec11[i] = 0;
254 for (int i=0; i<2; i++) fVec6[i] = 0;
255 for (int i=0; i<2; i++) fRec31[i] = 0;
256 for (int i=0; i<2; i++) fRec10[i] = 0;
257 for (int i=0; i<2; i++) fRec9[i] = 0;
258 for (int i=0; i<2; i++) fRec34[i] = 0;
259 for (int i=0; i<32768; i++) fVec7[i] = 0;
260 for (int i=0; i<2; i++) fRec33[i] = 0;
261 for (int i=0; i<2; i++) fRec32[i] = 0;
262 for (int i=0; i<3; i++) fRec42[i] = 0;
263 for (int i=0; i<2; i++) fVec8[i] = 0;
264 for (int i=0; i<2; i++) fRec41[i] = 0;
265 for (int i=0; i<2; i++) fRec40[i] = 0;
266 for (int i=0; i<3; i++) fRec39[i] = 0;
267 for (int i=0; i<2; i++) fVec9[i] = 0;
268 for (int i=0; i<2; i++) fRec38[i] = 0;
269 for (int i=0; i<3; i++) fRec37[i] = 0;
270 for (int i=0; i<3; i++) fRec36[i] = 0;
271 for (int i=0; i<2; i++) fRec46[i] = 0;
272 for (int i=0; i<3; i++) fRec45[i] = 0;
273 for (int i=0; i<2; i++) fVec10[i] = 0;
274 for (int i=0; i<2; i++) fRec44[i] = 0;
275 for (int i=0; i<3; i++) fRec43[i] = 0;
276 for (int i=0; i<2; i++) fRec50[i] = 0;
277 for (int i=0; i<3; i++) fRec49[i] = 0;
278 for (int i=0; i<3; i++) fRec48[i] = 0;
279 for (int i=0; i<3; i++) fRec47[i] = 0;
280 for (int i=0; i<2; i++) fRec52[i] = 0;
281 for (int i=0; i<3; i++) fRec51[i] = 0;
282 for (int i=0; i<2; i++) fVec11[i] = 0;
283 for (int i=0; i<2; i++) fRec35[i] = 0;
284 for (int i=0; i<2; i++) fVec12[i] = 0;
285 for (int i=0; i<2; i++) fRec7[i] = 0;
286 for (int i=0; i<2; i++) fRec4[i] = 0;
287 for (int i=0; i<2; i++) fRec3[i] = 0;
288 for (int i=0; i<2; i++) fVec13[i] = 0;
289 for (int i=0; i<2; i++) fRec55[i] = 0;
290 for (int i=0; i<2; i++) fRec54[i] = 0;
291 for (int i=0; i<2; i++) fRec53[i] = 0;
292 for (int i=0; i<3; i++) fVec14[i] = 0;
293 for (int i=0; i<3; i++) fRec2[i] = 0;
294 for (int i=0; i<3; i++) fRec1[i] = 0;
295 for (int i=0; i<3; i++) fRec0[i] = 0;
296 }
297
298 void Dsp::clear_state_f_static(PluginLV2 *p)
299 {
300 static_cast<Dsp*>(p)->clear_state_f();
301 }
302
303 inline void Dsp::init(uint32_t samplingFreq)
304 {
305 fSamplingFreq = samplingFreq;
306 iConst0 = min(192000, max(1, fSamplingFreq));
307 fConst1 = (31704.95306002819 / iConst0);
308 fConst2 = (2 * cos(fConst1));
309 fConst3 = (0.026178010471204185 * sin(fConst1));
310 fConst4 = (fConst3 - 1);
311 fConst5 = (49574.33207364693 / iConst0);
312 fConst6 = (2 * cos(fConst5));
313 fConst7 = (0.07042253521126761 * sin(fConst5));
314 fConst8 = (fConst7 - 1);
315 fConst9 = (60601.32228774711 / iConst0);
316 fConst10 = (2 * cos(fConst9));
317 fConst11 = (0.03546099290780142 * sin(fConst9));
318 fConst12 = (fConst11 - 1);
319 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
320 fConst14 = (1 + fConst13);
321 fConst15 = (0 - ((1 - fConst13) / fConst14));
322 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
323 fConst17 = (1 + fConst16);
324 fConst18 = (0 - ((1 - fConst16) / fConst17));
325 fConst19 = (1.0 / fConst17);
326 fConst20 = tan((37699.11184307752 / iConst0));
327 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
328 fConst22 = (1.0 / fConst20);
329 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
330 fConst24 = (1.0 / (1 + ((0.7653668647301795 + fConst22) / fConst20)));
331 fConst25 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
332 fConst26 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
333 fConst27 = (973.8937226128359 / iConst0);
334 fConst28 = (1 - fConst27);
335 fConst29 = (1.0 / (1 + fConst27));
336 fConst30 = (1.0 / tan((270.1769682087222 / iConst0)));
337 fConst31 = (1 + fConst30);
338 fConst32 = (0 - ((1 - fConst30) / fConst31));
339 fConst33 = (1.0 / fConst31);
340 fConst34 = (0 - fConst13);
341 fConst35 = (0.05 / fConst14);
342 fConst36 = (1.0 / tan((414.6902302738527 / iConst0)));
343 fConst37 = (1 + fConst36);
344 fConst38 = (0 - ((1 - fConst36) / fConst37));
345 fConst39 = (1.0 / fConst37);
346 fConst40 = (1.0 / tan((609.4689747964198 / iConst0)));
347 fConst41 = (1 + fConst40);
348 fConst42 = (0 - ((1 - fConst40) / fConst41));
349 fConst43 = (1.0 / fConst41);
350 IOTA = 0;
351 iConst44 = int((int((0.1111111111111111 * iConst0)) & 65535));
352 fConst45 = (0.009000000000000008 / iConst0);
353 fConst46 = tan((942.4777960769379 / iConst0));
354 fConst47 = (1.0 / faustpower<2>(fConst46));
355 fConst48 = (2 * (1 - fConst47));
356 fConst49 = (1.0 / fConst46);
357 fConst50 = (1 + ((fConst49 - 1.0) / fConst46));
358 fConst51 = (1.0 / (1 + ((1.0 + fConst49) / fConst46)));
359 fConst52 = tan((3769.9111843077517 / iConst0));
360 fConst53 = (1.0 / faustpower<2>(fConst52));
361 fConst54 = (2 * (1 - fConst53));
362 fConst55 = (1.0 / fConst52);
363 fConst56 = (1 + ((fConst55 - 1.0000000000000004) / fConst52));
364 fConst57 = (1 + ((fConst55 + 1.0000000000000004) / fConst52));
365 fConst58 = (1.0 / fConst57);
366 fConst59 = (1 + fConst55);
367 fConst60 = (0 - ((1 - fConst55) / fConst59));
368 fConst61 = tan((10053.096491487338 / iConst0));
369 fConst62 = (1.0 / faustpower<2>(fConst61));
370 fConst63 = (2 * (1 - fConst62));
371 fConst64 = (1.0 / fConst61);
372 fConst65 = (1 + ((fConst64 - 1.0000000000000004) / fConst61));
373 fConst66 = (1 + ((1.0000000000000004 + fConst64) / fConst61));
374 fConst67 = (1.0 / fConst66);
375 fConst68 = (1 + fConst64);
376 fConst69 = (0 - ((1 - fConst64) / fConst68));
377 fConst70 = tan((47123.8898038469 / iConst0));
378 fConst71 = (2 * (1 - (1.0 / faustpower<2>(fConst70))));
379 fConst72 = (1.0 / fConst70);
380 fConst73 = (1 + ((fConst72 - 1.414213562373095) / fConst70));
381 fConst74 = (1 + ((1.414213562373095 + fConst72) / fConst70));
382 fConst75 = (1.0 / fConst74);
383 fConst76 = (1.0 / (fConst14 * fConst74));
384 fConst77 = (1.0 / fConst68);
385 fConst78 = (0 - fConst55);
386 fConst79 = (1.0 / (fConst59 * fConst66));
387 fConst80 = (2 * (0 - fConst53));
388 fConst81 = (1 + ((fConst49 - 1.0000000000000004) / fConst46));
389 fConst82 = (1.0 / (1 + ((fConst49 + 1.0000000000000004) / fConst46)));
390 fConst83 = (1 + fConst49);
391 fConst84 = (0 - ((1 - fConst49) / fConst83));
392 fConst85 = (0 - fConst49);
393 fConst86 = (1.0 / (fConst83 * fConst57));
394 fConst87 = (2 * (0 - fConst47));
395 fConst88 = (1 + ((fConst55 - 1.0) / fConst52));
396 fConst89 = (1.0 / (1 + ((1.0 + fConst55) / fConst52)));
397 fConst90 = (0 - fConst64);
398 fConst91 = (2 * (0 - fConst62));
399 fConst92 = (0.025 / fConst14);
400 fConst93 = (0 - fConst10);
401 fConst94 = (1.0 / (1 + fConst11));
402 fConst95 = (0 - fConst6);
403 fConst96 = (1.0 / (1 + fConst7));
404 fConst97 = (0 - fConst2);
405 fConst98 = (1.0 / (1 + fConst3));
406 clear_state_f();
407 }
408
409 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
410 {
411 static_cast<Dsp*>(p)->init(samplingFreq);
412 }
413
414 inline void Dsp::compute(int count, float *input0, float *output0)
415 {
416 #define fslider0 (*fslider0_)
417 #define fslider1 (*fslider1_)
418 #define fslider2 (*fslider2_)
419 #define fslider3 (*fslider3_)
420 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
421 double fSlow1 = (1.000000000000001e-05 * fslider1);
422 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
423 double fSlow3 = fslider3;
424 double fSlow4 = (1.25 * fSlow3);
425 double fSlow5 = (2 * (fSlow3 - 0.5));
426 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
427 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
428 double fSlow8 = (fConst82 * pow(1e+01,(2 * fSlow3)));
429 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
430 double fSlow10 = (fConst82 * pow(1e+01,(0.9 * fSlow3)));
431 double fSlow11 = (1 - max(0, (0 - fSlow5)));
432 for (int i=0; i<count; i++) {
433 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
434 fVec0[0] = fTemp0;
435 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
436 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
437 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
438 double fTemp1 = (double)input0[i];
439 fVec1[0] = fTemp1;
440 fRec21[0] = (fConst29 * ((fVec1[0] - fVec1[1]) + (fConst28 * fRec21[1])));
441 fRec20[0] = (fConst29 * ((fRec21[0] - fRec21[1]) + (fConst28 * fRec20[1])));
442 fRec19[0] = (fRec20[0] - (fConst26 * ((fConst25 * fRec19[2]) + (fConst21 * fRec19[1]))));
443 fRec18[0] = ((fConst26 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst24 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
444 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
445 double fTemp2 = (1e-15 + (0.027 * fRec17[1]));
446 fVec2[0] = fTemp2;
447 fRec23[0] = ((fConst33 * (fVec2[0] + fVec2[1])) + (fConst32 * fRec23[1]));
448 fRec17[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec23[0] + (fConst24 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 1.863945999999999)) - 60.96496296296296);
449 fRec16[0] = ((fConst35 * ((fConst34 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
450 double fTemp3 = (1e-15 + (0.015 * fRec25[1]));
451 fVec3[0] = fTemp3;
452 fRec26[0] = ((fConst39 * (fVec3[0] + fVec3[1])) + (fConst38 * fRec26[1]));
453 fRec25[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec26[0] + fRec15[1]) - 1.2716089999999989)) - 45.22606666666667);
454 fRec24[0] = ((fConst35 * ((fConst34 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
455 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
456 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
457 double fTemp4 = (1e-15 + (0.015 * fRec13[1]));
458 fVec4[0] = fTemp4;
459 fRec27[0] = ((fConst39 * (fVec4[0] + fVec4[1])) + (fConst38 * fRec27[1]));
460 fRec13[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec27[0] + fRec14[0]) - 1.2716089999999989)) - 45.22606666666667);
461 fRec12[0] = ((fConst35 * ((fConst34 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
462 double fTemp5 = (1e-15 + (0.0082 * fRec29[1]));
463 fVec5[0] = fTemp5;
464 fRec30[0] = ((fConst43 * (fVec5[0] + fVec5[1])) + (fConst42 * fRec30[1]));
465 fRec29[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec30[0] + fRec11[1]) - 0.797042999999999)) - 32.799634146341475);
466 fRec28[0] = ((fConst35 * ((fConst34 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
467 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
468 double fTemp6 = (1e-15 + (0.0082 * fRec10[1]));
469 fVec6[0] = fTemp6;
470 fRec31[0] = ((fConst43 * (fVec6[0] + fVec6[1])) + (fConst42 * fRec31[1]));
471 fRec10[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec31[0] + fRec11[0]) - 0.797042999999999)) - 32.799634146341475);
472 fRec9[0] = ((fConst35 * ((fConst34 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
473 double fTemp7 = (fRec9[0] * (1 - fRec8[0]));
474 double fTemp8 = (fRec9[0] * fRec8[0]);
475 double fTemp9 = fabs(fTemp8);
476 fRec34[0] = ((9.999999999998899e-05 * fTemp9) + (0.9999 * fRec34[1]));
477 double fTemp10 = max(fRec34[0], fTemp9);
478 fVec7[IOTA&32767] = fTemp10;
479 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst44)&32767]);
480 fRec32[0] = ((fConst45 * fRec33[0]) + (0.999 * fRec32[1]));
481 double fTemp11 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
482 double fTemp12 = (0 - fTemp11);
483 double fTemp13 = (40.1 * fTemp12);
484 double fTemp14 = max(-600, fTemp13);
485 double fTemp15 = (0 - fTemp14);
486 double fTemp16 = (fTemp8 - fTemp11);
487 double fTemp17 = (40.1 * fTemp16);
488 double fTemp18 = max(-600, fTemp17);
489 double fTemp19 = (0 - fTemp18);
490 double fTemp20 = (((int((fabs(fTemp17) > 0.0001)))?((int((fTemp18 < -50)))?(exp(fTemp18) * fTemp19):(fTemp18 / (1 - exp(fTemp19)))):(1 + (fTemp16 * (20.05 + (134.00083333333336 * fTemp16))))) - ((int((fabs(fTemp13) > 0.0001)))?((int((fTemp14 < -50)))?(exp(fTemp14) * fTemp15):(fTemp14 / (1 - exp(fTemp15)))):(1 + (fTemp12 * (20.05 + (134.00083333333336 * fTemp12))))));
491 double fTemp21 = (fConst48 * fRec36[1]);
492 fRec42[0] = ((0.024937655860349125 * fTemp20) - (fConst75 * ((fConst73 * fRec42[2]) + (fConst71 * fRec42[1]))));
493 double fTemp22 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
494 fVec8[0] = fTemp22;
495 fRec41[0] = ((fConst76 * ((fConst34 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
496 fRec40[0] = ((fConst77 * (fRec41[0] + fRec41[1])) + (fConst69 * fRec40[1]));
497 fRec39[0] = (fRec40[0] - (fConst67 * ((fConst65 * fRec39[2]) + (fConst63 * fRec39[1]))));
498 double fTemp23 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
499 fVec9[0] = fTemp23;
500 fRec38[0] = ((fConst79 * ((fConst78 * fVec9[1]) + (fConst55 * fVec9[0]))) + (fConst60 * fRec38[1]));
501 fRec37[0] = (fRec38[0] - (fConst58 * ((fConst56 * fRec37[2]) + (fConst54 * fRec37[1]))));
502 fRec36[0] = ((fConst58 * (((fConst53 * fRec37[0]) + (fConst80 * fRec37[1])) + (fConst53 * fRec37[2]))) - (fConst51 * ((fConst50 * fRec36[2]) + fTemp21)));
503 double fTemp24 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst51 * (fTemp21 + (fConst50 * fRec36[0])))))));
504 fRec46[0] = ((fConst79 * (fVec9[0] + fVec9[1])) + (fConst60 * fRec46[1]));
505 fRec45[0] = (fRec46[0] - (fConst58 * ((fConst56 * fRec45[2]) + (fConst54 * fRec45[1]))));
506 double fTemp25 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
507 fVec10[0] = fTemp25;
508 fRec44[0] = ((fConst86 * ((fConst85 * fVec10[1]) + (fConst49 * fVec10[0]))) + (fConst84 * fRec44[1]));
509 fRec43[0] = (fRec44[0] - (fConst82 * ((fConst81 * fRec43[2]) + (fConst48 * fRec43[1]))));
510 double fTemp26 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec43[0]) + (fConst87 * fRec43[1])) + (fConst47 * fRec43[2])))));
511 double fTemp27 = (fConst48 * fRec47[1]);
512 double fTemp28 = (fConst54 * fRec48[1]);
513 fRec50[0] = ((fConst77 * ((fConst90 * fRec41[1]) + (fConst64 * fRec41[0]))) + (fConst69 * fRec50[1]));
514 fRec49[0] = (fRec50[0] - (fConst67 * ((fConst65 * fRec49[2]) + (fConst63 * fRec49[1]))));
515 fRec48[0] = ((fConst67 * (((fConst62 * fRec49[0]) + (fConst91 * fRec49[1])) + (fConst62 * fRec49[2]))) - (fConst89 * ((fConst88 * fRec48[2]) + fTemp28)));
516 fRec47[0] = ((fRec48[2] + (fConst89 * (fTemp28 + (fConst88 * fRec48[0])))) - (fConst51 * ((fConst50 * fRec47[2]) + fTemp27)));
517 double fTemp29 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst51 * (fTemp27 + (fConst50 * fRec47[0])))))));
518 fRec52[0] = ((fConst86 * (fVec10[0] + fVec10[1])) + (fConst84 * fRec52[1]));
519 fRec51[0] = (fRec52[0] - (fConst82 * ((fConst81 * fRec51[2]) + (fConst48 * fRec51[1]))));
520 double fTemp30 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
521 double fTemp31 = ((1.2589412 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30))))) + (1.584893192 * ((fTemp29 * (1 - (0.3333333333333333 * faustpower<2>(fTemp29)))) + ((fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26)))) + (0.8413951417869425 * (fTemp24 * (1 - (0.3333333333333333 * faustpower<2>(fTemp24)))))))));
522 fVec11[0] = fTemp31;
523 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
524 double fTemp32 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp20)) + (fTemp7 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp7))) - 1)))));
525 fVec12[0] = fTemp32;
526 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
527 double fTemp33 = (fRec7[0] * fRec6[0]);
528 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp33 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
529 fRec3[0] = ((fConst92 * ((fConst34 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
530 double fTemp34 = (1e-15 + (0.0041 * fRec54[1]));
531 fVec13[0] = fTemp34;
532 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
533 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp33) - 0.659760999999999)) - 89.08268292682925);
534 fRec53[0] = ((fConst92 * ((fConst34 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
535 double fTemp35 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
536 fVec14[0] = fTemp35;
537 fRec2[0] = (fConst94 * ((fVec14[2] + (fVec14[0] + (fConst93 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
538 fRec1[0] = (fConst96 * ((fRec2[2] + (fRec2[0] + (fConst95 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
539 fRec0[0] = (fConst98 * ((fRec1[2] + (fRec1[0] + (fConst97 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
540 output0[i] = (FAUSTFLOAT)fRec0[0];
541 // post processing
542 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
543 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
544 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
545 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
546 fRec53[1] = fRec53[0];
547 fRec54[1] = fRec54[0];
548 fRec55[1] = fRec55[0];
549 fVec13[1] = fVec13[0];
550 fRec3[1] = fRec3[0];
551 fRec4[1] = fRec4[0];
552 fRec7[1] = fRec7[0];
553 fVec12[1] = fVec12[0];
554 fRec35[1] = fRec35[0];
555 fVec11[1] = fVec11[0];
556 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
557 fRec52[1] = fRec52[0];
558 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
559 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
560 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
561 fRec50[1] = fRec50[0];
562 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
563 fRec44[1] = fRec44[0];
564 fVec10[1] = fVec10[0];
565 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
566 fRec46[1] = fRec46[0];
567 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
568 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
569 fRec38[1] = fRec38[0];
570 fVec9[1] = fVec9[0];
571 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
572 fRec40[1] = fRec40[0];
573 fRec41[1] = fRec41[0];
574 fVec8[1] = fVec8[0];
575 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
576 fRec32[1] = fRec32[0];
577 fRec33[1] = fRec33[0];
578 IOTA = IOTA+1;
579 fRec34[1] = fRec34[0];
580 fRec9[1] = fRec9[0];
581 fRec10[1] = fRec10[0];
582 fRec31[1] = fRec31[0];
583 fVec6[1] = fVec6[0];
584 fRec11[1] = fRec11[0];
585 fRec28[1] = fRec28[0];
586 fRec29[1] = fRec29[0];
587 fRec30[1] = fRec30[0];
588 fVec5[1] = fVec5[0];
589 fRec12[1] = fRec12[0];
590 fRec13[1] = fRec13[0];
591 fRec27[1] = fRec27[0];
592 fVec4[1] = fVec4[0];
593 fRec14[1] = fRec14[0];
594 fRec15[1] = fRec15[0];
595 fRec24[1] = fRec24[0];
596 fRec25[1] = fRec25[0];
597 fRec26[1] = fRec26[0];
598 fVec3[1] = fVec3[0];
599 fRec16[1] = fRec16[0];
600 fRec17[1] = fRec17[0];
601 fRec23[1] = fRec23[0];
602 fVec2[1] = fVec2[0];
603 fRec22[1] = fRec22[0];
604 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
605 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
606 fRec20[1] = fRec20[0];
607 fRec21[1] = fRec21[0];
608 fVec1[1] = fVec1[0];
609 fRec8[1] = fRec8[0];
610 fRec6[1] = fRec6[0];
611 fRec5[1] = fRec5[0];
612 fVec0[1] = fVec0[0];
613 }
614 #undef fslider0
615 #undef fslider1
616 #undef fslider2
617 #undef fslider3
618 }
619
620 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
621 {
622 static_cast<Dsp*>(p)->compute(count, input0, output0);
623 }
624
625
626 void Dsp::connect(uint32_t port,void* data)
627 {
628 switch ((PortIndex)port)
629 {
630 case DRIVE:
631 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
632 break;
633 case PREGAIN:
634 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
635 break;
636 case WET_DRY:
637 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
638 break;
639 case GAIN1:
640 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
641 break;
642 default:
643 break;
644 }
645 }
646
647 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
648 {
649 static_cast<Dsp*>(p)->connect(port, data);
650 }
651
652
653 PluginLV2 *plugin() {
654 return new Dsp();
655 }
656
657 void Dsp::del_instance(PluginLV2 *p)
658 {
659 delete static_cast<Dsp*>(p);
660 }
661
662 /*
663 typedef enum
664 {
665 DRIVE,
666 PREGAIN,
667 WET_DRY,
668 GAIN1,
669 } PortIndex;
670 */
671
672 } // end namespace gxamp6
0 // generated from file '../src/LV2/faust/gxamp6_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp6_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fVec1[2];
48 double fConst29;
49 double fRec21[2];
50 double fRec20[2];
51 double fRec19[3];
52 double fRec18[3];
53 FAUSTFLOAT fslider2;
54 FAUSTFLOAT *fslider2_;
55 double fRec22[2];
56 double fConst30;
57 double fConst31;
58 double fConst32;
59 double fVec2[2];
60 double fConst33;
61 double fRec23[2];
62 double fRec17[2];
63 double fConst34;
64 double fConst35;
65 double fRec16[2];
66 double fConst36;
67 double fConst37;
68 double fConst38;
69 double fVec3[2];
70 double fConst39;
71 double fRec26[2];
72 double fRec25[2];
73 double fRec24[2];
74 double fRec15[2];
75 double fRec14[2];
76 double fVec4[2];
77 double fRec27[2];
78 double fRec13[2];
79 double fRec12[2];
80 double fConst40;
81 double fConst41;
82 double fConst42;
83 double fVec5[2];
84 double fConst43;
85 double fRec30[2];
86 double fRec29[2];
87 double fRec28[2];
88 double fRec11[2];
89 double fVec6[2];
90 double fRec31[2];
91 double fRec10[2];
92 double fRec9[2];
93 FAUSTFLOAT fslider3;
94 FAUSTFLOAT *fslider3_;
95 double fRec34[2];
96 int IOTA;
97 double fVec7[32768];
98 int iConst44;
99 double fRec33[2];
100 double fConst45;
101 double fRec32[2];
102 double fConst46;
103 double fConst47;
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fRec42[3];
133 double fVec8[2];
134 double fConst76;
135 double fRec41[2];
136 double fConst77;
137 double fRec40[2];
138 double fRec39[3];
139 double fVec9[2];
140 double fConst78;
141 double fConst79;
142 double fRec38[2];
143 double fRec37[3];
144 double fConst80;
145 double fRec36[3];
146 double fConst81;
147 double fConst82;
148 double fConst83;
149 double fConst84;
150 double fRec46[2];
151 double fRec45[3];
152 double fVec10[2];
153 double fConst85;
154 double fConst86;
155 double fRec44[2];
156 double fRec43[3];
157 double fConst87;
158 double fConst88;
159 double fConst89;
160 double fConst90;
161 double fRec50[2];
162 double fRec49[3];
163 double fConst91;
164 double fRec48[3];
165 double fRec47[3];
166 double fRec52[2];
167 double fRec51[3];
168 double fVec11[2];
169 double fRec35[2];
170 double fVec12[2];
171 double fRec7[2];
172 double fRec4[2];
173 double fConst92;
174 double fRec3[2];
175 double fVec13[2];
176 double fRec55[2];
177 double fRec54[2];
178 double fRec53[2];
179 double fVec14[3];
180 double fConst93;
181 double fConst94;
182 double fRec2[3];
183 double fConst95;
184 double fConst96;
185 double fRec1[3];
186 double fConst97;
187 double fConst98;
188 double fRec0[3];
189 double fVec15[2];
190 double fRec74[2];
191 double fRec73[2];
192 double fRec72[3];
193 double fRec71[3];
194 double fVec16[2];
195 double fRec75[2];
196 double fRec70[2];
197 double fRec69[2];
198 double fVec17[2];
199 double fRec78[2];
200 double fRec77[2];
201 double fRec76[2];
202 double fRec68[2];
203 double fRec67[2];
204 double fVec18[2];
205 double fRec79[2];
206 double fRec66[2];
207 double fRec65[2];
208 double fVec19[2];
209 double fRec82[2];
210 double fRec81[2];
211 double fRec80[2];
212 double fRec64[2];
213 double fVec20[2];
214 double fRec83[2];
215 double fRec63[2];
216 double fRec62[2];
217 double fRec86[2];
218 double fVec21[32768];
219 double fRec85[2];
220 double fRec84[2];
221 double fRec94[3];
222 double fVec22[2];
223 double fRec93[2];
224 double fRec92[2];
225 double fRec91[3];
226 double fVec23[2];
227 double fRec90[2];
228 double fRec89[3];
229 double fRec88[3];
230 double fRec98[2];
231 double fRec97[3];
232 double fVec24[2];
233 double fRec96[2];
234 double fRec95[3];
235 double fRec102[2];
236 double fRec101[3];
237 double fRec100[3];
238 double fRec99[3];
239 double fRec104[2];
240 double fRec103[3];
241 double fVec25[2];
242 double fRec87[2];
243 double fVec26[2];
244 double fRec61[2];
245 double fVec27[2];
246 double fRec105[2];
247 double fRec60[2];
248 double fRec59[2];
249 double fVec28[2];
250 double fRec108[2];
251 double fRec107[2];
252 double fRec106[2];
253 double fVec29[3];
254 double fRec58[3];
255 double fRec57[3];
256 double fRec56[3];
257 void connect(uint32_t port,void* data);
258 void clear_state_f();
259 void init(uint32_t samplingFreq);
260 void compute(int count, float *input0, float *input1, float *output0, float *output1);
261
262 static void clear_state_f_static(PluginLV2*);
263 static void init_static(uint32_t samplingFreq, PluginLV2*);
264 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
265 static void del_instance(PluginLV2 *p);
266 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
267 public:
268 Dsp();
269 ~Dsp();
270 };
271
272
273
274 Dsp::Dsp()
275 : PluginLV2() {
276 version = PLUGINLV2_VERSION;
277 id = "pre 6DJ8/ push-pull 6V6";
278 name = N_("pre 6DJ8/ push-pull 6V6");
279 mono_audio = 0;
280 stereo_audio = compute_static;
281 set_samplerate = init_static;
282 activate_plugin = 0;
283 connect_ports = connect_static;
284 clear_state = clear_state_f_static;
285 delete_instance = del_instance;
286 }
287
288 Dsp::~Dsp() {
289 }
290
291 inline void Dsp::clear_state_f()
292 {
293 for (int i=0; i<2; i++) fVec0[i] = 0;
294 for (int i=0; i<2; i++) fRec5[i] = 0;
295 for (int i=0; i<2; i++) fRec6[i] = 0;
296 for (int i=0; i<2; i++) fRec8[i] = 0;
297 for (int i=0; i<2; i++) fVec1[i] = 0;
298 for (int i=0; i<2; i++) fRec21[i] = 0;
299 for (int i=0; i<2; i++) fRec20[i] = 0;
300 for (int i=0; i<3; i++) fRec19[i] = 0;
301 for (int i=0; i<3; i++) fRec18[i] = 0;
302 for (int i=0; i<2; i++) fRec22[i] = 0;
303 for (int i=0; i<2; i++) fVec2[i] = 0;
304 for (int i=0; i<2; i++) fRec23[i] = 0;
305 for (int i=0; i<2; i++) fRec17[i] = 0;
306 for (int i=0; i<2; i++) fRec16[i] = 0;
307 for (int i=0; i<2; i++) fVec3[i] = 0;
308 for (int i=0; i<2; i++) fRec26[i] = 0;
309 for (int i=0; i<2; i++) fRec25[i] = 0;
310 for (int i=0; i<2; i++) fRec24[i] = 0;
311 for (int i=0; i<2; i++) fRec15[i] = 0;
312 for (int i=0; i<2; i++) fRec14[i] = 0;
313 for (int i=0; i<2; i++) fVec4[i] = 0;
314 for (int i=0; i<2; i++) fRec27[i] = 0;
315 for (int i=0; i<2; i++) fRec13[i] = 0;
316 for (int i=0; i<2; i++) fRec12[i] = 0;
317 for (int i=0; i<2; i++) fVec5[i] = 0;
318 for (int i=0; i<2; i++) fRec30[i] = 0;
319 for (int i=0; i<2; i++) fRec29[i] = 0;
320 for (int i=0; i<2; i++) fRec28[i] = 0;
321 for (int i=0; i<2; i++) fRec11[i] = 0;
322 for (int i=0; i<2; i++) fVec6[i] = 0;
323 for (int i=0; i<2; i++) fRec31[i] = 0;
324 for (int i=0; i<2; i++) fRec10[i] = 0;
325 for (int i=0; i<2; i++) fRec9[i] = 0;
326 for (int i=0; i<2; i++) fRec34[i] = 0;
327 for (int i=0; i<32768; i++) fVec7[i] = 0;
328 for (int i=0; i<2; i++) fRec33[i] = 0;
329 for (int i=0; i<2; i++) fRec32[i] = 0;
330 for (int i=0; i<3; i++) fRec42[i] = 0;
331 for (int i=0; i<2; i++) fVec8[i] = 0;
332 for (int i=0; i<2; i++) fRec41[i] = 0;
333 for (int i=0; i<2; i++) fRec40[i] = 0;
334 for (int i=0; i<3; i++) fRec39[i] = 0;
335 for (int i=0; i<2; i++) fVec9[i] = 0;
336 for (int i=0; i<2; i++) fRec38[i] = 0;
337 for (int i=0; i<3; i++) fRec37[i] = 0;
338 for (int i=0; i<3; i++) fRec36[i] = 0;
339 for (int i=0; i<2; i++) fRec46[i] = 0;
340 for (int i=0; i<3; i++) fRec45[i] = 0;
341 for (int i=0; i<2; i++) fVec10[i] = 0;
342 for (int i=0; i<2; i++) fRec44[i] = 0;
343 for (int i=0; i<3; i++) fRec43[i] = 0;
344 for (int i=0; i<2; i++) fRec50[i] = 0;
345 for (int i=0; i<3; i++) fRec49[i] = 0;
346 for (int i=0; i<3; i++) fRec48[i] = 0;
347 for (int i=0; i<3; i++) fRec47[i] = 0;
348 for (int i=0; i<2; i++) fRec52[i] = 0;
349 for (int i=0; i<3; i++) fRec51[i] = 0;
350 for (int i=0; i<2; i++) fVec11[i] = 0;
351 for (int i=0; i<2; i++) fRec35[i] = 0;
352 for (int i=0; i<2; i++) fVec12[i] = 0;
353 for (int i=0; i<2; i++) fRec7[i] = 0;
354 for (int i=0; i<2; i++) fRec4[i] = 0;
355 for (int i=0; i<2; i++) fRec3[i] = 0;
356 for (int i=0; i<2; i++) fVec13[i] = 0;
357 for (int i=0; i<2; i++) fRec55[i] = 0;
358 for (int i=0; i<2; i++) fRec54[i] = 0;
359 for (int i=0; i<2; i++) fRec53[i] = 0;
360 for (int i=0; i<3; i++) fVec14[i] = 0;
361 for (int i=0; i<3; i++) fRec2[i] = 0;
362 for (int i=0; i<3; i++) fRec1[i] = 0;
363 for (int i=0; i<3; i++) fRec0[i] = 0;
364 for (int i=0; i<2; i++) fVec15[i] = 0;
365 for (int i=0; i<2; i++) fRec74[i] = 0;
366 for (int i=0; i<2; i++) fRec73[i] = 0;
367 for (int i=0; i<3; i++) fRec72[i] = 0;
368 for (int i=0; i<3; i++) fRec71[i] = 0;
369 for (int i=0; i<2; i++) fVec16[i] = 0;
370 for (int i=0; i<2; i++) fRec75[i] = 0;
371 for (int i=0; i<2; i++) fRec70[i] = 0;
372 for (int i=0; i<2; i++) fRec69[i] = 0;
373 for (int i=0; i<2; i++) fVec17[i] = 0;
374 for (int i=0; i<2; i++) fRec78[i] = 0;
375 for (int i=0; i<2; i++) fRec77[i] = 0;
376 for (int i=0; i<2; i++) fRec76[i] = 0;
377 for (int i=0; i<2; i++) fRec68[i] = 0;
378 for (int i=0; i<2; i++) fRec67[i] = 0;
379 for (int i=0; i<2; i++) fVec18[i] = 0;
380 for (int i=0; i<2; i++) fRec79[i] = 0;
381 for (int i=0; i<2; i++) fRec66[i] = 0;
382 for (int i=0; i<2; i++) fRec65[i] = 0;
383 for (int i=0; i<2; i++) fVec19[i] = 0;
384 for (int i=0; i<2; i++) fRec82[i] = 0;
385 for (int i=0; i<2; i++) fRec81[i] = 0;
386 for (int i=0; i<2; i++) fRec80[i] = 0;
387 for (int i=0; i<2; i++) fRec64[i] = 0;
388 for (int i=0; i<2; i++) fVec20[i] = 0;
389 for (int i=0; i<2; i++) fRec83[i] = 0;
390 for (int i=0; i<2; i++) fRec63[i] = 0;
391 for (int i=0; i<2; i++) fRec62[i] = 0;
392 for (int i=0; i<2; i++) fRec86[i] = 0;
393 for (int i=0; i<32768; i++) fVec21[i] = 0;
394 for (int i=0; i<2; i++) fRec85[i] = 0;
395 for (int i=0; i<2; i++) fRec84[i] = 0;
396 for (int i=0; i<3; i++) fRec94[i] = 0;
397 for (int i=0; i<2; i++) fVec22[i] = 0;
398 for (int i=0; i<2; i++) fRec93[i] = 0;
399 for (int i=0; i<2; i++) fRec92[i] = 0;
400 for (int i=0; i<3; i++) fRec91[i] = 0;
401 for (int i=0; i<2; i++) fVec23[i] = 0;
402 for (int i=0; i<2; i++) fRec90[i] = 0;
403 for (int i=0; i<3; i++) fRec89[i] = 0;
404 for (int i=0; i<3; i++) fRec88[i] = 0;
405 for (int i=0; i<2; i++) fRec98[i] = 0;
406 for (int i=0; i<3; i++) fRec97[i] = 0;
407 for (int i=0; i<2; i++) fVec24[i] = 0;
408 for (int i=0; i<2; i++) fRec96[i] = 0;
409 for (int i=0; i<3; i++) fRec95[i] = 0;
410 for (int i=0; i<2; i++) fRec102[i] = 0;
411 for (int i=0; i<3; i++) fRec101[i] = 0;
412 for (int i=0; i<3; i++) fRec100[i] = 0;
413 for (int i=0; i<3; i++) fRec99[i] = 0;
414 for (int i=0; i<2; i++) fRec104[i] = 0;
415 for (int i=0; i<3; i++) fRec103[i] = 0;
416 for (int i=0; i<2; i++) fVec25[i] = 0;
417 for (int i=0; i<2; i++) fRec87[i] = 0;
418 for (int i=0; i<2; i++) fVec26[i] = 0;
419 for (int i=0; i<2; i++) fRec61[i] = 0;
420 for (int i=0; i<2; i++) fVec27[i] = 0;
421 for (int i=0; i<2; i++) fRec105[i] = 0;
422 for (int i=0; i<2; i++) fRec60[i] = 0;
423 for (int i=0; i<2; i++) fRec59[i] = 0;
424 for (int i=0; i<2; i++) fVec28[i] = 0;
425 for (int i=0; i<2; i++) fRec108[i] = 0;
426 for (int i=0; i<2; i++) fRec107[i] = 0;
427 for (int i=0; i<2; i++) fRec106[i] = 0;
428 for (int i=0; i<3; i++) fVec29[i] = 0;
429 for (int i=0; i<3; i++) fRec58[i] = 0;
430 for (int i=0; i<3; i++) fRec57[i] = 0;
431 for (int i=0; i<3; i++) fRec56[i] = 0;
432 }
433
434 void Dsp::clear_state_f_static(PluginLV2 *p)
435 {
436 static_cast<Dsp*>(p)->clear_state_f();
437 }
438
439 inline void Dsp::init(uint32_t samplingFreq)
440 {
441 fSamplingFreq = samplingFreq;
442 iConst0 = min(192000, max(1, fSamplingFreq));
443 fConst1 = (31704.95306002819 / iConst0);
444 fConst2 = (2 * cos(fConst1));
445 fConst3 = (0.026178010471204185 * sin(fConst1));
446 fConst4 = (fConst3 - 1);
447 fConst5 = (49574.33207364693 / iConst0);
448 fConst6 = (2 * cos(fConst5));
449 fConst7 = (0.07042253521126761 * sin(fConst5));
450 fConst8 = (fConst7 - 1);
451 fConst9 = (60601.32228774711 / iConst0);
452 fConst10 = (2 * cos(fConst9));
453 fConst11 = (0.03546099290780142 * sin(fConst9));
454 fConst12 = (fConst11 - 1);
455 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
456 fConst14 = (1 + fConst13);
457 fConst15 = (0 - ((1 - fConst13) / fConst14));
458 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
459 fConst17 = (1 + fConst16);
460 fConst18 = (0 - ((1 - fConst16) / fConst17));
461 fConst19 = (1.0 / fConst17);
462 fConst20 = tan((37699.11184307752 / iConst0));
463 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
464 fConst22 = (1.0 / fConst20);
465 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
466 fConst24 = (1.0 / (1 + ((0.7653668647301795 + fConst22) / fConst20)));
467 fConst25 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
468 fConst26 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
469 fConst27 = (973.8937226128359 / iConst0);
470 fConst28 = (1 - fConst27);
471 fConst29 = (1.0 / (1 + fConst27));
472 fConst30 = (1.0 / tan((270.1769682087222 / iConst0)));
473 fConst31 = (1 + fConst30);
474 fConst32 = (0 - ((1 - fConst30) / fConst31));
475 fConst33 = (1.0 / fConst31);
476 fConst34 = (0 - fConst13);
477 fConst35 = (0.05 / fConst14);
478 fConst36 = (1.0 / tan((414.6902302738527 / iConst0)));
479 fConst37 = (1 + fConst36);
480 fConst38 = (0 - ((1 - fConst36) / fConst37));
481 fConst39 = (1.0 / fConst37);
482 fConst40 = (1.0 / tan((609.4689747964198 / iConst0)));
483 fConst41 = (1 + fConst40);
484 fConst42 = (0 - ((1 - fConst40) / fConst41));
485 fConst43 = (1.0 / fConst41);
486 IOTA = 0;
487 iConst44 = int((int((0.1111111111111111 * iConst0)) & 65535));
488 fConst45 = (0.009000000000000008 / iConst0);
489 fConst46 = tan((942.4777960769379 / iConst0));
490 fConst47 = (1.0 / faustpower<2>(fConst46));
491 fConst48 = (2 * (1 - fConst47));
492 fConst49 = (1.0 / fConst46);
493 fConst50 = (1 + ((fConst49 - 1.0) / fConst46));
494 fConst51 = (1.0 / (1 + ((1.0 + fConst49) / fConst46)));
495 fConst52 = tan((3769.9111843077517 / iConst0));
496 fConst53 = (1.0 / faustpower<2>(fConst52));
497 fConst54 = (2 * (1 - fConst53));
498 fConst55 = (1.0 / fConst52);
499 fConst56 = (1 + ((fConst55 - 1.0000000000000004) / fConst52));
500 fConst57 = (1 + ((fConst55 + 1.0000000000000004) / fConst52));
501 fConst58 = (1.0 / fConst57);
502 fConst59 = (1 + fConst55);
503 fConst60 = (0 - ((1 - fConst55) / fConst59));
504 fConst61 = tan((10053.096491487338 / iConst0));
505 fConst62 = (1.0 / faustpower<2>(fConst61));
506 fConst63 = (2 * (1 - fConst62));
507 fConst64 = (1.0 / fConst61);
508 fConst65 = (1 + ((fConst64 - 1.0000000000000004) / fConst61));
509 fConst66 = (1 + ((1.0000000000000004 + fConst64) / fConst61));
510 fConst67 = (1.0 / fConst66);
511 fConst68 = (1 + fConst64);
512 fConst69 = (0 - ((1 - fConst64) / fConst68));
513 fConst70 = tan((47123.8898038469 / iConst0));
514 fConst71 = (2 * (1 - (1.0 / faustpower<2>(fConst70))));
515 fConst72 = (1.0 / fConst70);
516 fConst73 = (1 + ((fConst72 - 1.414213562373095) / fConst70));
517 fConst74 = (1 + ((1.414213562373095 + fConst72) / fConst70));
518 fConst75 = (1.0 / fConst74);
519 fConst76 = (1.0 / (fConst14 * fConst74));
520 fConst77 = (1.0 / fConst68);
521 fConst78 = (0 - fConst55);
522 fConst79 = (1.0 / (fConst59 * fConst66));
523 fConst80 = (2 * (0 - fConst53));
524 fConst81 = (1 + ((fConst49 - 1.0000000000000004) / fConst46));
525 fConst82 = (1.0 / (1 + ((fConst49 + 1.0000000000000004) / fConst46)));
526 fConst83 = (1 + fConst49);
527 fConst84 = (0 - ((1 - fConst49) / fConst83));
528 fConst85 = (0 - fConst49);
529 fConst86 = (1.0 / (fConst83 * fConst57));
530 fConst87 = (2 * (0 - fConst47));
531 fConst88 = (1 + ((fConst55 - 1.0) / fConst52));
532 fConst89 = (1.0 / (1 + ((1.0 + fConst55) / fConst52)));
533 fConst90 = (0 - fConst64);
534 fConst91 = (2 * (0 - fConst62));
535 fConst92 = (0.025 / fConst14);
536 fConst93 = (0 - fConst10);
537 fConst94 = (1.0 / (1 + fConst11));
538 fConst95 = (0 - fConst6);
539 fConst96 = (1.0 / (1 + fConst7));
540 fConst97 = (0 - fConst2);
541 fConst98 = (1.0 / (1 + fConst3));
542 clear_state_f();
543 }
544
545 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
546 {
547 static_cast<Dsp*>(p)->init(samplingFreq);
548 }
549
550 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
551 {
552 #define fslider0 (*fslider0_)
553 #define fslider1 (*fslider1_)
554 #define fslider2 (*fslider2_)
555 #define fslider3 (*fslider3_)
556 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
557 double fSlow1 = (1.000000000000001e-05 * fslider1);
558 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
559 double fSlow3 = fslider3;
560 double fSlow4 = (1.25 * fSlow3);
561 double fSlow5 = (2 * (fSlow3 - 0.5));
562 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
563 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
564 double fSlow8 = (fConst82 * pow(1e+01,(2 * fSlow3)));
565 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
566 double fSlow10 = (fConst82 * pow(1e+01,(0.9 * fSlow3)));
567 double fSlow11 = (1 - max(0, (0 - fSlow5)));
568 for (int i=0; i<count; i++) {
569 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
570 fVec0[0] = fTemp0;
571 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
572 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
573 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
574 double fTemp1 = (1 - fRec8[0]);
575 double fTemp2 = (double)input0[i];
576 fVec1[0] = fTemp2;
577 fRec21[0] = (fConst29 * ((fVec1[0] - fVec1[1]) + (fConst28 * fRec21[1])));
578 fRec20[0] = (fConst29 * ((fRec21[0] - fRec21[1]) + (fConst28 * fRec20[1])));
579 fRec19[0] = (fRec20[0] - (fConst26 * ((fConst25 * fRec19[2]) + (fConst21 * fRec19[1]))));
580 fRec18[0] = ((fConst26 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst24 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
581 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
582 double fTemp3 = (1e-15 + (0.027 * fRec17[1]));
583 fVec2[0] = fTemp3;
584 fRec23[0] = ((fConst33 * (fVec2[0] + fVec2[1])) + (fConst32 * fRec23[1]));
585 fRec17[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec23[0] + (fConst24 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 1.863945999999999)) - 60.96496296296296);
586 fRec16[0] = ((fConst35 * ((fConst34 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
587 double fTemp4 = (1e-15 + (0.015 * fRec25[1]));
588 fVec3[0] = fTemp4;
589 fRec26[0] = ((fConst39 * (fVec3[0] + fVec3[1])) + (fConst38 * fRec26[1]));
590 fRec25[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec26[0] + fRec15[1]) - 1.2716089999999989)) - 45.22606666666667);
591 fRec24[0] = ((fConst35 * ((fConst34 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
592 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
593 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
594 double fTemp5 = (1e-15 + (0.015 * fRec13[1]));
595 fVec4[0] = fTemp5;
596 fRec27[0] = ((fConst39 * (fVec4[0] + fVec4[1])) + (fConst38 * fRec27[1]));
597 fRec13[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec27[0] + fRec14[0]) - 1.2716089999999989)) - 45.22606666666667);
598 fRec12[0] = ((fConst35 * ((fConst34 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
599 double fTemp6 = (1e-15 + (0.0082 * fRec29[1]));
600 fVec5[0] = fTemp6;
601 fRec30[0] = ((fConst43 * (fVec5[0] + fVec5[1])) + (fConst42 * fRec30[1]));
602 fRec29[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec30[0] + fRec11[1]) - 0.797042999999999)) - 32.799634146341475);
603 fRec28[0] = ((fConst35 * ((fConst34 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
604 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
605 double fTemp7 = (1e-15 + (0.0082 * fRec10[1]));
606 fVec6[0] = fTemp7;
607 fRec31[0] = ((fConst43 * (fVec6[0] + fVec6[1])) + (fConst42 * fRec31[1]));
608 fRec10[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec31[0] + fRec11[0]) - 0.797042999999999)) - 32.799634146341475);
609 fRec9[0] = ((fConst35 * ((fConst34 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
610 double fTemp8 = (fRec9[0] * fTemp1);
611 double fTemp9 = (fRec9[0] * fRec8[0]);
612 double fTemp10 = fabs(fTemp9);
613 fRec34[0] = ((9.999999999998899e-05 * fTemp10) + (0.9999 * fRec34[1]));
614 double fTemp11 = max(fRec34[0], fTemp10);
615 fVec7[IOTA&32767] = fTemp11;
616 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst44)&32767]);
617 fRec32[0] = ((fConst45 * fRec33[0]) + (0.999 * fRec32[1]));
618 double fTemp12 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
619 double fTemp13 = (0 - fTemp12);
620 double fTemp14 = (40.1 * fTemp13);
621 double fTemp15 = max(-600, fTemp14);
622 double fTemp16 = (0 - fTemp15);
623 double fTemp17 = (fTemp9 - fTemp12);
624 double fTemp18 = (40.1 * fTemp17);
625 double fTemp19 = max(-600, fTemp18);
626 double fTemp20 = (0 - fTemp19);
627 double fTemp21 = (((int((fabs(fTemp18) > 0.0001)))?((int((fTemp19 < -50)))?(exp(fTemp19) * fTemp20):(fTemp19 / (1 - exp(fTemp20)))):(1 + (fTemp17 * (20.05 + (134.00083333333336 * fTemp17))))) - ((int((fabs(fTemp14) > 0.0001)))?((int((fTemp15 < -50)))?(exp(fTemp15) * fTemp16):(fTemp15 / (1 - exp(fTemp16)))):(1 + (fTemp13 * (20.05 + (134.00083333333336 * fTemp13))))));
628 double fTemp22 = (fConst48 * fRec36[1]);
629 fRec42[0] = ((0.024937655860349125 * fTemp21) - (fConst75 * ((fConst73 * fRec42[2]) + (fConst71 * fRec42[1]))));
630 double fTemp23 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
631 fVec8[0] = fTemp23;
632 fRec41[0] = ((fConst76 * ((fConst34 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
633 fRec40[0] = ((fConst77 * (fRec41[0] + fRec41[1])) + (fConst69 * fRec40[1]));
634 fRec39[0] = (fRec40[0] - (fConst67 * ((fConst65 * fRec39[2]) + (fConst63 * fRec39[1]))));
635 double fTemp24 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
636 fVec9[0] = fTemp24;
637 fRec38[0] = ((fConst79 * ((fConst78 * fVec9[1]) + (fConst55 * fVec9[0]))) + (fConst60 * fRec38[1]));
638 fRec37[0] = (fRec38[0] - (fConst58 * ((fConst56 * fRec37[2]) + (fConst54 * fRec37[1]))));
639 fRec36[0] = ((fConst58 * (((fConst53 * fRec37[0]) + (fConst80 * fRec37[1])) + (fConst53 * fRec37[2]))) - (fConst51 * ((fConst50 * fRec36[2]) + fTemp22)));
640 double fTemp25 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst51 * (fTemp22 + (fConst50 * fRec36[0])))))));
641 fRec46[0] = ((fConst79 * (fVec9[0] + fVec9[1])) + (fConst60 * fRec46[1]));
642 fRec45[0] = (fRec46[0] - (fConst58 * ((fConst56 * fRec45[2]) + (fConst54 * fRec45[1]))));
643 double fTemp26 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
644 fVec10[0] = fTemp26;
645 fRec44[0] = ((fConst86 * ((fConst85 * fVec10[1]) + (fConst49 * fVec10[0]))) + (fConst84 * fRec44[1]));
646 fRec43[0] = (fRec44[0] - (fConst82 * ((fConst81 * fRec43[2]) + (fConst48 * fRec43[1]))));
647 double fTemp27 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec43[0]) + (fConst87 * fRec43[1])) + (fConst47 * fRec43[2])))));
648 double fTemp28 = (fConst48 * fRec47[1]);
649 double fTemp29 = (fConst54 * fRec48[1]);
650 fRec50[0] = ((fConst77 * ((fConst90 * fRec41[1]) + (fConst64 * fRec41[0]))) + (fConst69 * fRec50[1]));
651 fRec49[0] = (fRec50[0] - (fConst67 * ((fConst65 * fRec49[2]) + (fConst63 * fRec49[1]))));
652 fRec48[0] = ((fConst67 * (((fConst62 * fRec49[0]) + (fConst91 * fRec49[1])) + (fConst62 * fRec49[2]))) - (fConst89 * ((fConst88 * fRec48[2]) + fTemp29)));
653 fRec47[0] = ((fRec48[2] + (fConst89 * (fTemp29 + (fConst88 * fRec48[0])))) - (fConst51 * ((fConst50 * fRec47[2]) + fTemp28)));
654 double fTemp30 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst51 * (fTemp28 + (fConst50 * fRec47[0])))))));
655 fRec52[0] = ((fConst86 * (fVec10[0] + fVec10[1])) + (fConst84 * fRec52[1]));
656 fRec51[0] = (fRec52[0] - (fConst82 * ((fConst81 * fRec51[2]) + (fConst48 * fRec51[1]))));
657 double fTemp31 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
658 double fTemp32 = ((1.2589412 * (fTemp31 * (1 - (0.3333333333333333 * faustpower<2>(fTemp31))))) + (1.584893192 * ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + ((fTemp27 * (1 - (0.3333333333333333 * faustpower<2>(fTemp27)))) + (0.8413951417869425 * (fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))))))));
659 fVec11[0] = fTemp32;
660 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
661 double fTemp33 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp21)) + (fTemp8 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp8))) - 1)))));
662 fVec12[0] = fTemp33;
663 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
664 double fTemp34 = (fRec7[0] * fRec6[0]);
665 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp34 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
666 fRec3[0] = ((fConst92 * ((fConst34 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
667 double fTemp35 = (1e-15 + (0.0041 * fRec54[1]));
668 fVec13[0] = fTemp35;
669 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
670 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp34) - 0.659760999999999)) - 89.08268292682925);
671 fRec53[0] = ((fConst92 * ((fConst34 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
672 double fTemp36 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
673 fVec14[0] = fTemp36;
674 fRec2[0] = (fConst94 * ((fVec14[2] + (fVec14[0] + (fConst93 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
675 fRec1[0] = (fConst96 * ((fRec2[2] + (fRec2[0] + (fConst95 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
676 fRec0[0] = (fConst98 * ((fRec1[2] + (fRec1[0] + (fConst97 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
677 output0[i] = (FAUSTFLOAT)fRec0[0];
678 double fTemp37 = (double)input1[i];
679 fVec15[0] = fTemp37;
680 fRec74[0] = (fConst29 * ((fVec15[0] - fVec15[1]) + (fConst28 * fRec74[1])));
681 fRec73[0] = (fConst29 * ((fRec74[0] - fRec74[1]) + (fConst28 * fRec73[1])));
682 fRec72[0] = (fRec73[0] - (fConst26 * ((fConst25 * fRec72[2]) + (fConst21 * fRec72[1]))));
683 fRec71[0] = ((fConst26 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1])))) - (fConst24 * ((fConst23 * fRec71[2]) + (fConst21 * fRec71[1]))));
684 double fTemp38 = (1e-15 + (0.027 * fRec70[1]));
685 fVec16[0] = fTemp38;
686 fRec75[0] = ((fConst33 * (fVec16[0] + fVec16[1])) + (fConst32 * fRec75[1]));
687 fRec70[0] = (Ftube(TUBE_TABLE_6DJ8_68k, ((fRec75[0] + (fConst24 * (fRec22[0] * (fRec71[2] + (fRec71[0] + (2 * fRec71[1])))))) - 1.863945999999999)) - 60.96496296296296);
688 fRec69[0] = ((fConst35 * ((fConst34 * fRec70[1]) + (fConst13 * fRec70[0]))) + (fConst15 * fRec69[1]));
689 double fTemp39 = (1e-15 + (0.015 * fRec77[1]));
690 fVec17[0] = fTemp39;
691 fRec78[0] = ((fConst39 * (fVec17[0] + fVec17[1])) + (fConst38 * fRec78[1]));
692 fRec77[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec78[0] + fRec68[1]) - 1.2716089999999989)) - 45.22606666666667);
693 fRec76[0] = ((fConst35 * ((fConst34 * fRec77[1]) + (fConst13 * fRec77[0]))) + (fConst15 * fRec76[1]));
694 fRec68[0] = ((0.6 * fRec76[0]) + fRec69[0]);
695 fRec67[0] = ((fConst19 * (fRec68[0] + fRec68[1])) + (fConst18 * fRec67[1]));
696 double fTemp40 = (1e-15 + (0.015 * fRec66[1]));
697 fVec18[0] = fTemp40;
698 fRec79[0] = ((fConst39 * (fVec18[0] + fVec18[1])) + (fConst38 * fRec79[1]));
699 fRec66[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec79[0] + fRec67[0]) - 1.2716089999999989)) - 45.22606666666667);
700 fRec65[0] = ((fConst35 * ((fConst34 * fRec66[1]) + (fConst13 * fRec66[0]))) + (fConst15 * fRec65[1]));
701 double fTemp41 = (1e-15 + (0.0082 * fRec81[1]));
702 fVec19[0] = fTemp41;
703 fRec82[0] = ((fConst43 * (fVec19[0] + fVec19[1])) + (fConst42 * fRec82[1]));
704 fRec81[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec82[0] + fRec64[1]) - 0.797042999999999)) - 32.799634146341475);
705 fRec80[0] = ((fConst35 * ((fConst34 * fRec81[1]) + (fConst13 * fRec81[0]))) + (fConst15 * fRec80[1]));
706 fRec64[0] = ((0.6 * fRec80[0]) + fRec65[0]);
707 double fTemp42 = (1e-15 + (0.0082 * fRec63[1]));
708 fVec20[0] = fTemp42;
709 fRec83[0] = ((fConst43 * (fVec20[0] + fVec20[1])) + (fConst42 * fRec83[1]));
710 fRec63[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec83[0] + fRec64[0]) - 0.797042999999999)) - 32.799634146341475);
711 fRec62[0] = ((fConst35 * ((fConst34 * fRec63[1]) + (fConst13 * fRec63[0]))) + (fConst15 * fRec62[1]));
712 double fTemp43 = (fTemp1 * fRec62[0]);
713 double fTemp44 = (fRec8[0] * fRec62[0]);
714 double fTemp45 = fabs(fTemp44);
715 fRec86[0] = ((9.999999999998899e-05 * fTemp45) + (0.9999 * fRec86[1]));
716 double fTemp46 = max(fRec86[0], fTemp45);
717 fVec21[IOTA&32767] = fTemp46;
718 fRec85[0] = ((fVec21[IOTA&32767] + fRec85[1]) - fVec21[(IOTA-iConst44)&32767]);
719 fRec84[0] = ((fConst45 * fRec85[0]) + (0.999 * fRec84[1]));
720 double fTemp47 = max(-1.0, min(-0.01, (fVec21[IOTA&32767] - (1.0 + (1.02 * fRec84[0])))));
721 double fTemp48 = (0 - fTemp47);
722 double fTemp49 = (40.1 * fTemp48);
723 double fTemp50 = max(-600, fTemp49);
724 double fTemp51 = (0 - fTemp50);
725 double fTemp52 = (fTemp44 - fTemp47);
726 double fTemp53 = (40.1 * fTemp52);
727 double fTemp54 = max(-600, fTemp53);
728 double fTemp55 = (0 - fTemp54);
729 double fTemp56 = (((int((fabs(fTemp53) > 0.0001)))?((int((fTemp54 < -50)))?(exp(fTemp54) * fTemp55):(fTemp54 / (1 - exp(fTemp55)))):(1 + (fTemp52 * (20.05 + (134.00083333333336 * fTemp52))))) - ((int((fabs(fTemp49) > 0.0001)))?((int((fTemp50 < -50)))?(exp(fTemp50) * fTemp51):(fTemp50 / (1 - exp(fTemp51)))):(1 + (fTemp48 * (20.05 + (134.00083333333336 * fTemp48))))));
730 double fTemp57 = (fConst48 * fRec88[1]);
731 fRec94[0] = ((0.024937655860349125 * fTemp56) - (fConst75 * ((fConst73 * fRec94[2]) + (fConst71 * fRec94[1]))));
732 double fTemp58 = (fRec94[2] + (fRec94[0] + (2 * fRec94[1])));
733 fVec22[0] = fTemp58;
734 fRec93[0] = ((fConst76 * ((fConst34 * fVec22[1]) + (fConst13 * fVec22[0]))) + (fConst15 * fRec93[1]));
735 fRec92[0] = ((fConst77 * (fRec93[0] + fRec93[1])) + (fConst69 * fRec92[1]));
736 fRec91[0] = (fRec92[0] - (fConst67 * ((fConst65 * fRec91[2]) + (fConst63 * fRec91[1]))));
737 double fTemp59 = (fRec91[2] + (fRec91[0] + (2 * fRec91[1])));
738 fVec23[0] = fTemp59;
739 fRec90[0] = ((fConst79 * ((fConst78 * fVec23[1]) + (fConst55 * fVec23[0]))) + (fConst60 * fRec90[1]));
740 fRec89[0] = (fRec90[0] - (fConst58 * ((fConst56 * fRec89[2]) + (fConst54 * fRec89[1]))));
741 fRec88[0] = ((fConst58 * (((fConst53 * fRec89[0]) + (fConst80 * fRec89[1])) + (fConst53 * fRec89[2]))) - (fConst51 * ((fConst50 * fRec88[2]) + fTemp57)));
742 double fTemp60 = max(-1, min(1, (fSlow7 * (fRec88[2] + (fConst51 * (fTemp57 + (fConst50 * fRec88[0])))))));
743 fRec98[0] = ((fConst79 * (fVec23[0] + fVec23[1])) + (fConst60 * fRec98[1]));
744 fRec97[0] = (fRec98[0] - (fConst58 * ((fConst56 * fRec97[2]) + (fConst54 * fRec97[1]))));
745 double fTemp61 = (fRec97[2] + (fRec97[0] + (2 * fRec97[1])));
746 fVec24[0] = fTemp61;
747 fRec96[0] = ((fConst86 * ((fConst85 * fVec24[1]) + (fConst49 * fVec24[0]))) + (fConst84 * fRec96[1]));
748 fRec95[0] = (fRec96[0] - (fConst82 * ((fConst81 * fRec95[2]) + (fConst48 * fRec95[1]))));
749 double fTemp62 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec95[0]) + (fConst87 * fRec95[1])) + (fConst47 * fRec95[2])))));
750 double fTemp63 = (fConst48 * fRec99[1]);
751 double fTemp64 = (fConst54 * fRec100[1]);
752 fRec102[0] = ((fConst77 * ((fConst90 * fRec93[1]) + (fConst64 * fRec93[0]))) + (fConst69 * fRec102[1]));
753 fRec101[0] = (fRec102[0] - (fConst67 * ((fConst65 * fRec101[2]) + (fConst63 * fRec101[1]))));
754 fRec100[0] = ((fConst67 * (((fConst62 * fRec101[0]) + (fConst91 * fRec101[1])) + (fConst62 * fRec101[2]))) - (fConst89 * ((fConst88 * fRec100[2]) + fTemp64)));
755 fRec99[0] = ((fRec100[2] + (fConst89 * (fTemp64 + (fConst88 * fRec100[0])))) - (fConst51 * ((fConst50 * fRec99[2]) + fTemp63)));
756 double fTemp65 = max(-1, min(1, (fSlow9 * (fRec99[2] + (fConst51 * (fTemp63 + (fConst50 * fRec99[0])))))));
757 fRec104[0] = ((fConst86 * (fVec24[0] + fVec24[1])) + (fConst84 * fRec104[1]));
758 fRec103[0] = (fRec104[0] - (fConst82 * ((fConst81 * fRec103[2]) + (fConst48 * fRec103[1]))));
759 double fTemp66 = max(-1, min(1, (fSlow10 * (fRec103[2] + (fRec103[0] + (2 * fRec103[1]))))));
760 double fTemp67 = ((1.2589412 * (fTemp66 * (1 - (0.3333333333333333 * faustpower<2>(fTemp66))))) + (1.584893192 * ((fTemp65 * (1 - (0.3333333333333333 * faustpower<2>(fTemp65)))) + ((fTemp62 * (1 - (0.3333333333333333 * faustpower<2>(fTemp62)))) + (0.8413951417869425 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60)))))))));
761 fVec25[0] = fTemp67;
762 fRec87[0] = ((fConst19 * (fVec25[0] + fVec25[1])) + (fConst18 * fRec87[1]));
763 double fTemp68 = (((fSlow11 * fRec87[0]) + (fSlow6 * fTemp56)) + (fTemp43 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp43))) - 1)))));
764 fVec26[0] = fTemp68;
765 fRec61[0] = ((fConst19 * (fVec26[0] + fVec26[1])) + (fConst18 * fRec61[1]));
766 double fTemp69 = (fRec6[0] * fRec61[0]);
767 double fTemp70 = (1e-15 + (0.0041 * fRec60[1]));
768 fVec27[0] = fTemp70;
769 fRec105[0] = ((fConst19 * (fVec27[0] + fVec27[1])) + (fConst18 * fRec105[1]));
770 fRec60[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec105[0] + fTemp69) - 0.664540999999999)) - 87.91682926829267);
771 fRec59[0] = ((fConst92 * ((fConst34 * fRec60[1]) + (fConst13 * fRec60[0]))) + (fConst15 * fRec59[1]));
772 double fTemp71 = (1e-15 + (0.0041 * fRec107[1]));
773 fVec28[0] = fTemp71;
774 fRec108[0] = ((fConst19 * (fVec28[0] + fVec28[1])) + (fConst18 * fRec108[1]));
775 fRec107[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec108[0] + fTemp69) - 0.659760999999999)) - 89.08268292682925);
776 fRec106[0] = ((fConst92 * ((fConst34 * fRec107[1]) + (fConst13 * fRec107[0]))) + (fConst15 * fRec106[1]));
777 double fTemp72 = (min(0.7, fRec106[0]) + max(-0.75, fRec59[0]));
778 fVec29[0] = fTemp72;
779 fRec58[0] = (fConst94 * ((fVec29[2] + (fVec29[0] + (fConst93 * fVec29[1]))) + ((fConst12 * fRec58[2]) + (fConst10 * fRec58[1]))));
780 fRec57[0] = (fConst96 * ((fRec58[2] + (fRec58[0] + (fConst95 * fRec58[1]))) + ((fConst8 * fRec57[2]) + (fConst6 * fRec57[1]))));
781 fRec56[0] = (fConst98 * ((fRec57[2] + (fRec57[0] + (fConst97 * fRec57[1]))) + ((fConst4 * fRec56[2]) + (fConst2 * fRec56[1]))));
782 output1[i] = (FAUSTFLOAT)fRec56[0];
783 // post processing
784 fRec56[2] = fRec56[1]; fRec56[1] = fRec56[0];
785 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
786 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
787 fVec29[2] = fVec29[1]; fVec29[1] = fVec29[0];
788 fRec106[1] = fRec106[0];
789 fRec107[1] = fRec107[0];
790 fRec108[1] = fRec108[0];
791 fVec28[1] = fVec28[0];
792 fRec59[1] = fRec59[0];
793 fRec60[1] = fRec60[0];
794 fRec105[1] = fRec105[0];
795 fVec27[1] = fVec27[0];
796 fRec61[1] = fRec61[0];
797 fVec26[1] = fVec26[0];
798 fRec87[1] = fRec87[0];
799 fVec25[1] = fVec25[0];
800 fRec103[2] = fRec103[1]; fRec103[1] = fRec103[0];
801 fRec104[1] = fRec104[0];
802 fRec99[2] = fRec99[1]; fRec99[1] = fRec99[0];
803 fRec100[2] = fRec100[1]; fRec100[1] = fRec100[0];
804 fRec101[2] = fRec101[1]; fRec101[1] = fRec101[0];
805 fRec102[1] = fRec102[0];
806 fRec95[2] = fRec95[1]; fRec95[1] = fRec95[0];
807 fRec96[1] = fRec96[0];
808 fVec24[1] = fVec24[0];
809 fRec97[2] = fRec97[1]; fRec97[1] = fRec97[0];
810 fRec98[1] = fRec98[0];
811 fRec88[2] = fRec88[1]; fRec88[1] = fRec88[0];
812 fRec89[2] = fRec89[1]; fRec89[1] = fRec89[0];
813 fRec90[1] = fRec90[0];
814 fVec23[1] = fVec23[0];
815 fRec91[2] = fRec91[1]; fRec91[1] = fRec91[0];
816 fRec92[1] = fRec92[0];
817 fRec93[1] = fRec93[0];
818 fVec22[1] = fVec22[0];
819 fRec94[2] = fRec94[1]; fRec94[1] = fRec94[0];
820 fRec84[1] = fRec84[0];
821 fRec85[1] = fRec85[0];
822 fRec86[1] = fRec86[0];
823 fRec62[1] = fRec62[0];
824 fRec63[1] = fRec63[0];
825 fRec83[1] = fRec83[0];
826 fVec20[1] = fVec20[0];
827 fRec64[1] = fRec64[0];
828 fRec80[1] = fRec80[0];
829 fRec81[1] = fRec81[0];
830 fRec82[1] = fRec82[0];
831 fVec19[1] = fVec19[0];
832 fRec65[1] = fRec65[0];
833 fRec66[1] = fRec66[0];
834 fRec79[1] = fRec79[0];
835 fVec18[1] = fVec18[0];
836 fRec67[1] = fRec67[0];
837 fRec68[1] = fRec68[0];
838 fRec76[1] = fRec76[0];
839 fRec77[1] = fRec77[0];
840 fRec78[1] = fRec78[0];
841 fVec17[1] = fVec17[0];
842 fRec69[1] = fRec69[0];
843 fRec70[1] = fRec70[0];
844 fRec75[1] = fRec75[0];
845 fVec16[1] = fVec16[0];
846 fRec71[2] = fRec71[1]; fRec71[1] = fRec71[0];
847 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
848 fRec73[1] = fRec73[0];
849 fRec74[1] = fRec74[0];
850 fVec15[1] = fVec15[0];
851 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
852 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
853 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
854 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
855 fRec53[1] = fRec53[0];
856 fRec54[1] = fRec54[0];
857 fRec55[1] = fRec55[0];
858 fVec13[1] = fVec13[0];
859 fRec3[1] = fRec3[0];
860 fRec4[1] = fRec4[0];
861 fRec7[1] = fRec7[0];
862 fVec12[1] = fVec12[0];
863 fRec35[1] = fRec35[0];
864 fVec11[1] = fVec11[0];
865 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
866 fRec52[1] = fRec52[0];
867 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
868 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
869 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
870 fRec50[1] = fRec50[0];
871 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
872 fRec44[1] = fRec44[0];
873 fVec10[1] = fVec10[0];
874 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
875 fRec46[1] = fRec46[0];
876 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
877 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
878 fRec38[1] = fRec38[0];
879 fVec9[1] = fVec9[0];
880 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
881 fRec40[1] = fRec40[0];
882 fRec41[1] = fRec41[0];
883 fVec8[1] = fVec8[0];
884 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
885 fRec32[1] = fRec32[0];
886 fRec33[1] = fRec33[0];
887 IOTA = IOTA+1;
888 fRec34[1] = fRec34[0];
889 fRec9[1] = fRec9[0];
890 fRec10[1] = fRec10[0];
891 fRec31[1] = fRec31[0];
892 fVec6[1] = fVec6[0];
893 fRec11[1] = fRec11[0];
894 fRec28[1] = fRec28[0];
895 fRec29[1] = fRec29[0];
896 fRec30[1] = fRec30[0];
897 fVec5[1] = fVec5[0];
898 fRec12[1] = fRec12[0];
899 fRec13[1] = fRec13[0];
900 fRec27[1] = fRec27[0];
901 fVec4[1] = fVec4[0];
902 fRec14[1] = fRec14[0];
903 fRec15[1] = fRec15[0];
904 fRec24[1] = fRec24[0];
905 fRec25[1] = fRec25[0];
906 fRec26[1] = fRec26[0];
907 fVec3[1] = fVec3[0];
908 fRec16[1] = fRec16[0];
909 fRec17[1] = fRec17[0];
910 fRec23[1] = fRec23[0];
911 fVec2[1] = fVec2[0];
912 fRec22[1] = fRec22[0];
913 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
914 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
915 fRec20[1] = fRec20[0];
916 fRec21[1] = fRec21[0];
917 fVec1[1] = fVec1[0];
918 fRec8[1] = fRec8[0];
919 fRec6[1] = fRec6[0];
920 fRec5[1] = fRec5[0];
921 fVec0[1] = fVec0[0];
922 }
923 #undef fslider0
924 #undef fslider1
925 #undef fslider2
926 #undef fslider3
927 }
928
929 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
930 {
931 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
932 }
933
934
935 void Dsp::connect(uint32_t port,void* data)
936 {
937 switch ((PortIndex)port)
938 {
939 case DRIVE:
940 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
941 break;
942 case PREGAIN:
943 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
944 break;
945 case WET_DRY:
946 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
947 break;
948 case GAIN1:
949 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
950 break;
951 default:
952 break;
953 }
954 }
955
956 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
957 {
958 static_cast<Dsp*>(p)->connect(port, data);
959 }
960
961
962 PluginLV2 *plugin() {
963 return new Dsp();
964 }
965
966 void Dsp::del_instance(PluginLV2 *p)
967 {
968 delete static_cast<Dsp*>(p);
969 }
970
971 /*
972 typedef enum
973 {
974 DRIVE,
975 PREGAIN,
976 WET_DRY,
977 GAIN1,
978 } PortIndex;
979 */
980
981 } // end namespace gxamp6_stereo
0 // generated from file '../src/LV2/faust/gxamp7.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp7 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fVec1[2];
48 double fConst29;
49 double fRec21[2];
50 double fRec20[2];
51 double fRec19[3];
52 double fRec18[3];
53 FAUSTFLOAT fslider2;
54 FAUSTFLOAT *fslider2_;
55 double fRec22[2];
56 double fConst30;
57 double fConst31;
58 double fConst32;
59 double fVec2[2];
60 double fConst33;
61 double fRec23[2];
62 double fRec17[2];
63 double fConst34;
64 double fConst35;
65 double fRec16[2];
66 double fConst36;
67 double fConst37;
68 double fConst38;
69 double fVec3[2];
70 double fConst39;
71 double fRec26[2];
72 double fRec25[2];
73 double fRec24[2];
74 double fRec15[2];
75 double fRec14[2];
76 double fVec4[2];
77 double fRec27[2];
78 double fRec13[2];
79 double fRec12[2];
80 double fConst40;
81 double fConst41;
82 double fConst42;
83 double fVec5[2];
84 double fConst43;
85 double fRec30[2];
86 double fRec29[2];
87 double fRec28[2];
88 double fRec11[2];
89 double fVec6[2];
90 double fRec31[2];
91 double fRec10[2];
92 double fRec9[2];
93 FAUSTFLOAT fslider3;
94 FAUSTFLOAT *fslider3_;
95 double fRec34[2];
96 int IOTA;
97 double fVec7[32768];
98 int iConst44;
99 double fRec33[2];
100 double fConst45;
101 double fRec32[2];
102 double fConst46;
103 double fConst47;
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fRec42[3];
133 double fVec8[2];
134 double fConst76;
135 double fRec41[2];
136 double fConst77;
137 double fRec40[2];
138 double fRec39[3];
139 double fVec9[2];
140 double fConst78;
141 double fConst79;
142 double fRec38[2];
143 double fRec37[3];
144 double fConst80;
145 double fRec36[3];
146 double fConst81;
147 double fConst82;
148 double fConst83;
149 double fConst84;
150 double fRec46[2];
151 double fRec45[3];
152 double fVec10[2];
153 double fConst85;
154 double fConst86;
155 double fRec44[2];
156 double fRec43[3];
157 double fConst87;
158 double fConst88;
159 double fConst89;
160 double fConst90;
161 double fRec50[2];
162 double fRec49[3];
163 double fConst91;
164 double fRec48[3];
165 double fRec47[3];
166 double fRec52[2];
167 double fRec51[3];
168 double fVec11[2];
169 double fRec35[2];
170 double fVec12[2];
171 double fRec7[2];
172 double fRec4[2];
173 double fRec3[2];
174 double fVec13[2];
175 double fRec55[2];
176 double fRec54[2];
177 double fRec53[2];
178 double fVec14[3];
179 double fConst92;
180 double fConst93;
181 double fRec2[3];
182 double fConst94;
183 double fConst95;
184 double fRec1[3];
185 double fConst96;
186 double fConst97;
187 double fRec0[3];
188 void connect(uint32_t port,void* data);
189 void clear_state_f();
190 void init(uint32_t samplingFreq);
191 void compute(int count, float *input0, float *output0);
192
193 static void clear_state_f_static(PluginLV2*);
194 static void init_static(uint32_t samplingFreq, PluginLV2*);
195 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
196 static void del_instance(PluginLV2 *p);
197 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
198 public:
199 Dsp();
200 ~Dsp();
201 };
202
203
204
205 Dsp::Dsp()
206 : PluginLV2() {
207 version = PLUGINLV2_VERSION;
208 id = "pre 12ax7/ push-pull 6V6";
209 name = N_("pre 12ax7/ push-pull 6V6");
210 mono_audio = compute_static;
211 stereo_audio = 0;
212 set_samplerate = init_static;
213 activate_plugin = 0;
214 connect_ports = connect_static;
215 clear_state = clear_state_f_static;
216 delete_instance = del_instance;
217 }
218
219 Dsp::~Dsp() {
220 }
221
222 inline void Dsp::clear_state_f()
223 {
224 for (int i=0; i<2; i++) fVec0[i] = 0;
225 for (int i=0; i<2; i++) fRec5[i] = 0;
226 for (int i=0; i<2; i++) fRec6[i] = 0;
227 for (int i=0; i<2; i++) fRec8[i] = 0;
228 for (int i=0; i<2; i++) fVec1[i] = 0;
229 for (int i=0; i<2; i++) fRec21[i] = 0;
230 for (int i=0; i<2; i++) fRec20[i] = 0;
231 for (int i=0; i<3; i++) fRec19[i] = 0;
232 for (int i=0; i<3; i++) fRec18[i] = 0;
233 for (int i=0; i<2; i++) fRec22[i] = 0;
234 for (int i=0; i<2; i++) fVec2[i] = 0;
235 for (int i=0; i<2; i++) fRec23[i] = 0;
236 for (int i=0; i<2; i++) fRec17[i] = 0;
237 for (int i=0; i<2; i++) fRec16[i] = 0;
238 for (int i=0; i<2; i++) fVec3[i] = 0;
239 for (int i=0; i<2; i++) fRec26[i] = 0;
240 for (int i=0; i<2; i++) fRec25[i] = 0;
241 for (int i=0; i<2; i++) fRec24[i] = 0;
242 for (int i=0; i<2; i++) fRec15[i] = 0;
243 for (int i=0; i<2; i++) fRec14[i] = 0;
244 for (int i=0; i<2; i++) fVec4[i] = 0;
245 for (int i=0; i<2; i++) fRec27[i] = 0;
246 for (int i=0; i<2; i++) fRec13[i] = 0;
247 for (int i=0; i<2; i++) fRec12[i] = 0;
248 for (int i=0; i<2; i++) fVec5[i] = 0;
249 for (int i=0; i<2; i++) fRec30[i] = 0;
250 for (int i=0; i<2; i++) fRec29[i] = 0;
251 for (int i=0; i<2; i++) fRec28[i] = 0;
252 for (int i=0; i<2; i++) fRec11[i] = 0;
253 for (int i=0; i<2; i++) fVec6[i] = 0;
254 for (int i=0; i<2; i++) fRec31[i] = 0;
255 for (int i=0; i<2; i++) fRec10[i] = 0;
256 for (int i=0; i<2; i++) fRec9[i] = 0;
257 for (int i=0; i<2; i++) fRec34[i] = 0;
258 for (int i=0; i<32768; i++) fVec7[i] = 0;
259 for (int i=0; i<2; i++) fRec33[i] = 0;
260 for (int i=0; i<2; i++) fRec32[i] = 0;
261 for (int i=0; i<3; i++) fRec42[i] = 0;
262 for (int i=0; i<2; i++) fVec8[i] = 0;
263 for (int i=0; i<2; i++) fRec41[i] = 0;
264 for (int i=0; i<2; i++) fRec40[i] = 0;
265 for (int i=0; i<3; i++) fRec39[i] = 0;
266 for (int i=0; i<2; i++) fVec9[i] = 0;
267 for (int i=0; i<2; i++) fRec38[i] = 0;
268 for (int i=0; i<3; i++) fRec37[i] = 0;
269 for (int i=0; i<3; i++) fRec36[i] = 0;
270 for (int i=0; i<2; i++) fRec46[i] = 0;
271 for (int i=0; i<3; i++) fRec45[i] = 0;
272 for (int i=0; i<2; i++) fVec10[i] = 0;
273 for (int i=0; i<2; i++) fRec44[i] = 0;
274 for (int i=0; i<3; i++) fRec43[i] = 0;
275 for (int i=0; i<2; i++) fRec50[i] = 0;
276 for (int i=0; i<3; i++) fRec49[i] = 0;
277 for (int i=0; i<3; i++) fRec48[i] = 0;
278 for (int i=0; i<3; i++) fRec47[i] = 0;
279 for (int i=0; i<2; i++) fRec52[i] = 0;
280 for (int i=0; i<3; i++) fRec51[i] = 0;
281 for (int i=0; i<2; i++) fVec11[i] = 0;
282 for (int i=0; i<2; i++) fRec35[i] = 0;
283 for (int i=0; i<2; i++) fVec12[i] = 0;
284 for (int i=0; i<2; i++) fRec7[i] = 0;
285 for (int i=0; i<2; i++) fRec4[i] = 0;
286 for (int i=0; i<2; i++) fRec3[i] = 0;
287 for (int i=0; i<2; i++) fVec13[i] = 0;
288 for (int i=0; i<2; i++) fRec55[i] = 0;
289 for (int i=0; i<2; i++) fRec54[i] = 0;
290 for (int i=0; i<2; i++) fRec53[i] = 0;
291 for (int i=0; i<3; i++) fVec14[i] = 0;
292 for (int i=0; i<3; i++) fRec2[i] = 0;
293 for (int i=0; i<3; i++) fRec1[i] = 0;
294 for (int i=0; i<3; i++) fRec0[i] = 0;
295 }
296
297 void Dsp::clear_state_f_static(PluginLV2 *p)
298 {
299 static_cast<Dsp*>(p)->clear_state_f();
300 }
301
302 inline void Dsp::init(uint32_t samplingFreq)
303 {
304 fSamplingFreq = samplingFreq;
305 iConst0 = min(192000, max(1, fSamplingFreq));
306 fConst1 = (31704.95306002819 / iConst0);
307 fConst2 = (2 * cos(fConst1));
308 fConst3 = (0.026178010471204185 * sin(fConst1));
309 fConst4 = (fConst3 - 1);
310 fConst5 = (49574.33207364693 / iConst0);
311 fConst6 = (2 * cos(fConst5));
312 fConst7 = (0.07042253521126761 * sin(fConst5));
313 fConst8 = (fConst7 - 1);
314 fConst9 = (60601.32228774711 / iConst0);
315 fConst10 = (2 * cos(fConst9));
316 fConst11 = (0.03546099290780142 * sin(fConst9));
317 fConst12 = (fConst11 - 1);
318 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
319 fConst14 = (1 + fConst13);
320 fConst15 = (0 - ((1 - fConst13) / fConst14));
321 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
322 fConst17 = (1 + fConst16);
323 fConst18 = (0 - ((1 - fConst16) / fConst17));
324 fConst19 = (1.0 / fConst17);
325 fConst20 = tan((37699.11184307752 / iConst0));
326 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
327 fConst22 = (1.0 / fConst20);
328 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
329 fConst24 = (1.0 / (1 + ((0.7653668647301795 + fConst22) / fConst20)));
330 fConst25 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
331 fConst26 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
332 fConst27 = (973.8937226128359 / iConst0);
333 fConst28 = (1 - fConst27);
334 fConst29 = (1.0 / (1 + fConst27));
335 fConst30 = (1.0 / tan((270.1769682087222 / iConst0)));
336 fConst31 = (1 + fConst30);
337 fConst32 = (0 - ((1 - fConst30) / fConst31));
338 fConst33 = (1.0 / fConst31);
339 fConst34 = (0 - fConst13);
340 fConst35 = (0.025 / fConst14);
341 fConst36 = (1.0 / tan((414.6902302738527 / iConst0)));
342 fConst37 = (1 + fConst36);
343 fConst38 = (0 - ((1 - fConst36) / fConst37));
344 fConst39 = (1.0 / fConst37);
345 fConst40 = (1.0 / tan((609.4689747964198 / iConst0)));
346 fConst41 = (1 + fConst40);
347 fConst42 = (0 - ((1 - fConst40) / fConst41));
348 fConst43 = (1.0 / fConst41);
349 IOTA = 0;
350 iConst44 = int((int((0.1111111111111111 * iConst0)) & 65535));
351 fConst45 = (0.009000000000000008 / iConst0);
352 fConst46 = tan((942.4777960769379 / iConst0));
353 fConst47 = (1.0 / faustpower<2>(fConst46));
354 fConst48 = (2 * (1 - fConst47));
355 fConst49 = (1.0 / fConst46);
356 fConst50 = (1 + ((fConst49 - 1.0) / fConst46));
357 fConst51 = (1.0 / (1 + ((1.0 + fConst49) / fConst46)));
358 fConst52 = tan((3769.9111843077517 / iConst0));
359 fConst53 = (1.0 / faustpower<2>(fConst52));
360 fConst54 = (2 * (1 - fConst53));
361 fConst55 = (1.0 / fConst52);
362 fConst56 = (1 + ((fConst55 - 1.0000000000000004) / fConst52));
363 fConst57 = (1 + ((fConst55 + 1.0000000000000004) / fConst52));
364 fConst58 = (1.0 / fConst57);
365 fConst59 = (1 + fConst55);
366 fConst60 = (0 - ((1 - fConst55) / fConst59));
367 fConst61 = tan((10053.096491487338 / iConst0));
368 fConst62 = (1.0 / faustpower<2>(fConst61));
369 fConst63 = (2 * (1 - fConst62));
370 fConst64 = (1.0 / fConst61);
371 fConst65 = (1 + ((fConst64 - 1.0000000000000004) / fConst61));
372 fConst66 = (1 + ((1.0000000000000004 + fConst64) / fConst61));
373 fConst67 = (1.0 / fConst66);
374 fConst68 = (1 + fConst64);
375 fConst69 = (0 - ((1 - fConst64) / fConst68));
376 fConst70 = tan((47123.8898038469 / iConst0));
377 fConst71 = (2 * (1 - (1.0 / faustpower<2>(fConst70))));
378 fConst72 = (1.0 / fConst70);
379 fConst73 = (1 + ((fConst72 - 1.414213562373095) / fConst70));
380 fConst74 = (1 + ((1.414213562373095 + fConst72) / fConst70));
381 fConst75 = (1.0 / fConst74);
382 fConst76 = (1.0 / (fConst14 * fConst74));
383 fConst77 = (1.0 / fConst68);
384 fConst78 = (0 - fConst55);
385 fConst79 = (1.0 / (fConst59 * fConst66));
386 fConst80 = (2 * (0 - fConst53));
387 fConst81 = (1 + ((fConst49 - 1.0000000000000004) / fConst46));
388 fConst82 = (1.0 / (1 + ((fConst49 + 1.0000000000000004) / fConst46)));
389 fConst83 = (1 + fConst49);
390 fConst84 = (0 - ((1 - fConst49) / fConst83));
391 fConst85 = (0 - fConst49);
392 fConst86 = (1.0 / (fConst83 * fConst57));
393 fConst87 = (2 * (0 - fConst47));
394 fConst88 = (1 + ((fConst55 - 1.0) / fConst52));
395 fConst89 = (1.0 / (1 + ((1.0 + fConst55) / fConst52)));
396 fConst90 = (0 - fConst64);
397 fConst91 = (2 * (0 - fConst62));
398 fConst92 = (0 - fConst10);
399 fConst93 = (1.0 / (1 + fConst11));
400 fConst94 = (0 - fConst6);
401 fConst95 = (1.0 / (1 + fConst7));
402 fConst96 = (0 - fConst2);
403 fConst97 = (1.0 / (1 + fConst3));
404 clear_state_f();
405 }
406
407 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
408 {
409 static_cast<Dsp*>(p)->init(samplingFreq);
410 }
411
412 inline void Dsp::compute(int count, float *input0, float *output0)
413 {
414 #define fslider0 (*fslider0_)
415 #define fslider1 (*fslider1_)
416 #define fslider2 (*fslider2_)
417 #define fslider3 (*fslider3_)
418 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
419 double fSlow1 = (1.000000000000001e-05 * fslider1);
420 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
421 double fSlow3 = fslider3;
422 double fSlow4 = (1.25 * fSlow3);
423 double fSlow5 = (2 * (fSlow3 - 0.5));
424 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
425 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
426 double fSlow8 = (fConst82 * pow(1e+01,(2 * fSlow3)));
427 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
428 double fSlow10 = (fConst82 * pow(1e+01,(0.9 * fSlow3)));
429 double fSlow11 = (1 - max(0, (0 - fSlow5)));
430 for (int i=0; i<count; i++) {
431 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
432 fVec0[0] = fTemp0;
433 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
434 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
435 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
436 double fTemp1 = (double)input0[i];
437 fVec1[0] = fTemp1;
438 fRec21[0] = (fConst29 * ((fVec1[0] - fVec1[1]) + (fConst28 * fRec21[1])));
439 fRec20[0] = (fConst29 * ((fRec21[0] - fRec21[1]) + (fConst28 * fRec20[1])));
440 fRec19[0] = (fRec20[0] - (fConst26 * ((fConst25 * fRec19[2]) + (fConst21 * fRec19[1]))));
441 fRec18[0] = ((fConst26 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst24 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
442 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
443 double fTemp2 = (1e-15 + (0.027 * fRec17[1]));
444 fVec2[0] = fTemp2;
445 fRec23[0] = ((fConst33 * (fVec2[0] + fVec2[1])) + (fConst32 * fRec23[1]));
446 fRec17[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec23[0] + (fConst24 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 1.5816559999999988)) - 191.42014814814814);
447 fRec16[0] = ((fConst35 * ((fConst34 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
448 double fTemp3 = (1e-15 + (0.015 * fRec25[1]));
449 fVec3[0] = fTemp3;
450 fRec26[0] = ((fConst39 * (fVec3[0] + fVec3[1])) + (fConst38 * fRec26[1]));
451 fRec25[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec26[0] + fRec15[1]) - 1.204284999999999)) - 169.71433333333334);
452 fRec24[0] = ((fConst35 * ((fConst34 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
453 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
454 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
455 double fTemp4 = (1e-15 + (0.015 * fRec13[1]));
456 fVec4[0] = fTemp4;
457 fRec27[0] = ((fConst39 * (fVec4[0] + fVec4[1])) + (fConst38 * fRec27[1]));
458 fRec13[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec27[0] + fRec14[0]) - 1.204284999999999)) - 169.71433333333334);
459 fRec12[0] = ((fConst35 * ((fConst34 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
460 double fTemp5 = (1e-15 + (0.0082 * fRec29[1]));
461 fVec5[0] = fTemp5;
462 fRec30[0] = ((fConst43 * (fVec5[0] + fVec5[1])) + (fConst42 * fRec30[1]));
463 fRec29[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec30[0] + fRec11[1]) - 0.840702999999999)) - 147.47524390243905);
464 fRec28[0] = ((fConst35 * ((fConst34 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
465 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
466 double fTemp6 = (1e-15 + (0.0082 * fRec10[1]));
467 fVec6[0] = fTemp6;
468 fRec31[0] = ((fConst43 * (fVec6[0] + fVec6[1])) + (fConst42 * fRec31[1]));
469 fRec10[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec31[0] + fRec11[0]) - 0.840702999999999)) - 147.47524390243905);
470 fRec9[0] = ((fConst35 * ((fConst34 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
471 double fTemp7 = (fRec9[0] * (1 - fRec8[0]));
472 double fTemp8 = (fRec9[0] * fRec8[0]);
473 double fTemp9 = fabs(fTemp8);
474 fRec34[0] = ((9.999999999998899e-05 * fTemp9) + (0.9999 * fRec34[1]));
475 double fTemp10 = max(fRec34[0], fTemp9);
476 fVec7[IOTA&32767] = fTemp10;
477 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst44)&32767]);
478 fRec32[0] = ((fConst45 * fRec33[0]) + (0.999 * fRec32[1]));
479 double fTemp11 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
480 double fTemp12 = (0 - fTemp11);
481 double fTemp13 = (40.1 * fTemp12);
482 double fTemp14 = max(-600, fTemp13);
483 double fTemp15 = (0 - fTemp14);
484 double fTemp16 = (fTemp8 - fTemp11);
485 double fTemp17 = (40.1 * fTemp16);
486 double fTemp18 = max(-600, fTemp17);
487 double fTemp19 = (0 - fTemp18);
488 double fTemp20 = (((int((fabs(fTemp17) > 0.0001)))?((int((fTemp18 < -50)))?(exp(fTemp18) * fTemp19):(fTemp18 / (1 - exp(fTemp19)))):(1 + (fTemp16 * (20.05 + (134.00083333333336 * fTemp16))))) - ((int((fabs(fTemp13) > 0.0001)))?((int((fTemp14 < -50)))?(exp(fTemp14) * fTemp15):(fTemp14 / (1 - exp(fTemp15)))):(1 + (fTemp12 * (20.05 + (134.00083333333336 * fTemp12))))));
489 double fTemp21 = (fConst48 * fRec36[1]);
490 fRec42[0] = ((0.024937655860349125 * fTemp20) - (fConst75 * ((fConst73 * fRec42[2]) + (fConst71 * fRec42[1]))));
491 double fTemp22 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
492 fVec8[0] = fTemp22;
493 fRec41[0] = ((fConst76 * ((fConst34 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
494 fRec40[0] = ((fConst77 * (fRec41[0] + fRec41[1])) + (fConst69 * fRec40[1]));
495 fRec39[0] = (fRec40[0] - (fConst67 * ((fConst65 * fRec39[2]) + (fConst63 * fRec39[1]))));
496 double fTemp23 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
497 fVec9[0] = fTemp23;
498 fRec38[0] = ((fConst79 * ((fConst78 * fVec9[1]) + (fConst55 * fVec9[0]))) + (fConst60 * fRec38[1]));
499 fRec37[0] = (fRec38[0] - (fConst58 * ((fConst56 * fRec37[2]) + (fConst54 * fRec37[1]))));
500 fRec36[0] = ((fConst58 * (((fConst53 * fRec37[0]) + (fConst80 * fRec37[1])) + (fConst53 * fRec37[2]))) - (fConst51 * ((fConst50 * fRec36[2]) + fTemp21)));
501 double fTemp24 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst51 * (fTemp21 + (fConst50 * fRec36[0])))))));
502 fRec46[0] = ((fConst79 * (fVec9[0] + fVec9[1])) + (fConst60 * fRec46[1]));
503 fRec45[0] = (fRec46[0] - (fConst58 * ((fConst56 * fRec45[2]) + (fConst54 * fRec45[1]))));
504 double fTemp25 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
505 fVec10[0] = fTemp25;
506 fRec44[0] = ((fConst86 * ((fConst85 * fVec10[1]) + (fConst49 * fVec10[0]))) + (fConst84 * fRec44[1]));
507 fRec43[0] = (fRec44[0] - (fConst82 * ((fConst81 * fRec43[2]) + (fConst48 * fRec43[1]))));
508 double fTemp26 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec43[0]) + (fConst87 * fRec43[1])) + (fConst47 * fRec43[2])))));
509 double fTemp27 = (fConst48 * fRec47[1]);
510 double fTemp28 = (fConst54 * fRec48[1]);
511 fRec50[0] = ((fConst77 * ((fConst90 * fRec41[1]) + (fConst64 * fRec41[0]))) + (fConst69 * fRec50[1]));
512 fRec49[0] = (fRec50[0] - (fConst67 * ((fConst65 * fRec49[2]) + (fConst63 * fRec49[1]))));
513 fRec48[0] = ((fConst67 * (((fConst62 * fRec49[0]) + (fConst91 * fRec49[1])) + (fConst62 * fRec49[2]))) - (fConst89 * ((fConst88 * fRec48[2]) + fTemp28)));
514 fRec47[0] = ((fRec48[2] + (fConst89 * (fTemp28 + (fConst88 * fRec48[0])))) - (fConst51 * ((fConst50 * fRec47[2]) + fTemp27)));
515 double fTemp29 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst51 * (fTemp27 + (fConst50 * fRec47[0])))))));
516 fRec52[0] = ((fConst86 * (fVec10[0] + fVec10[1])) + (fConst84 * fRec52[1]));
517 fRec51[0] = (fRec52[0] - (fConst82 * ((fConst81 * fRec51[2]) + (fConst48 * fRec51[1]))));
518 double fTemp30 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
519 double fTemp31 = ((1.2589412 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30))))) + (1.584893192 * ((fTemp29 * (1 - (0.3333333333333333 * faustpower<2>(fTemp29)))) + ((fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26)))) + (0.8413951417869425 * (fTemp24 * (1 - (0.3333333333333333 * faustpower<2>(fTemp24)))))))));
520 fVec11[0] = fTemp31;
521 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
522 double fTemp32 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp20)) + (fTemp7 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp7))) - 1)))));
523 fVec12[0] = fTemp32;
524 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
525 double fTemp33 = (fRec7[0] * fRec6[0]);
526 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp33 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
527 fRec3[0] = ((fConst35 * ((fConst34 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
528 double fTemp34 = (1e-15 + (0.0041 * fRec54[1]));
529 fVec13[0] = fTemp34;
530 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
531 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp33) - 0.659760999999999)) - 89.08268292682925);
532 fRec53[0] = ((fConst35 * ((fConst34 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
533 double fTemp35 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
534 fVec14[0] = fTemp35;
535 fRec2[0] = (fConst93 * ((fVec14[2] + (fVec14[0] + (fConst92 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
536 fRec1[0] = (fConst95 * ((fRec2[2] + (fRec2[0] + (fConst94 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
537 fRec0[0] = (fConst97 * ((fRec1[2] + (fRec1[0] + (fConst96 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
538 output0[i] = (FAUSTFLOAT)fRec0[0];
539 // post processing
540 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
541 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
542 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
543 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
544 fRec53[1] = fRec53[0];
545 fRec54[1] = fRec54[0];
546 fRec55[1] = fRec55[0];
547 fVec13[1] = fVec13[0];
548 fRec3[1] = fRec3[0];
549 fRec4[1] = fRec4[0];
550 fRec7[1] = fRec7[0];
551 fVec12[1] = fVec12[0];
552 fRec35[1] = fRec35[0];
553 fVec11[1] = fVec11[0];
554 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
555 fRec52[1] = fRec52[0];
556 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
557 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
558 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
559 fRec50[1] = fRec50[0];
560 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
561 fRec44[1] = fRec44[0];
562 fVec10[1] = fVec10[0];
563 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
564 fRec46[1] = fRec46[0];
565 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
566 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
567 fRec38[1] = fRec38[0];
568 fVec9[1] = fVec9[0];
569 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
570 fRec40[1] = fRec40[0];
571 fRec41[1] = fRec41[0];
572 fVec8[1] = fVec8[0];
573 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
574 fRec32[1] = fRec32[0];
575 fRec33[1] = fRec33[0];
576 IOTA = IOTA+1;
577 fRec34[1] = fRec34[0];
578 fRec9[1] = fRec9[0];
579 fRec10[1] = fRec10[0];
580 fRec31[1] = fRec31[0];
581 fVec6[1] = fVec6[0];
582 fRec11[1] = fRec11[0];
583 fRec28[1] = fRec28[0];
584 fRec29[1] = fRec29[0];
585 fRec30[1] = fRec30[0];
586 fVec5[1] = fVec5[0];
587 fRec12[1] = fRec12[0];
588 fRec13[1] = fRec13[0];
589 fRec27[1] = fRec27[0];
590 fVec4[1] = fVec4[0];
591 fRec14[1] = fRec14[0];
592 fRec15[1] = fRec15[0];
593 fRec24[1] = fRec24[0];
594 fRec25[1] = fRec25[0];
595 fRec26[1] = fRec26[0];
596 fVec3[1] = fVec3[0];
597 fRec16[1] = fRec16[0];
598 fRec17[1] = fRec17[0];
599 fRec23[1] = fRec23[0];
600 fVec2[1] = fVec2[0];
601 fRec22[1] = fRec22[0];
602 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
603 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
604 fRec20[1] = fRec20[0];
605 fRec21[1] = fRec21[0];
606 fVec1[1] = fVec1[0];
607 fRec8[1] = fRec8[0];
608 fRec6[1] = fRec6[0];
609 fRec5[1] = fRec5[0];
610 fVec0[1] = fVec0[0];
611 }
612 #undef fslider0
613 #undef fslider1
614 #undef fslider2
615 #undef fslider3
616 }
617
618 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
619 {
620 static_cast<Dsp*>(p)->compute(count, input0, output0);
621 }
622
623
624 void Dsp::connect(uint32_t port,void* data)
625 {
626 switch ((PortIndex)port)
627 {
628 case DRIVE:
629 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
630 break;
631 case PREGAIN:
632 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
633 break;
634 case WET_DRY:
635 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
636 break;
637 case GAIN1:
638 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
639 break;
640 default:
641 break;
642 }
643 }
644
645 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
646 {
647 static_cast<Dsp*>(p)->connect(port, data);
648 }
649
650
651 PluginLV2 *plugin() {
652 return new Dsp();
653 }
654
655 void Dsp::del_instance(PluginLV2 *p)
656 {
657 delete static_cast<Dsp*>(p);
658 }
659
660 /*
661 typedef enum
662 {
663 DRIVE,
664 PREGAIN,
665 WET_DRY,
666 GAIN1,
667 } PortIndex;
668 */
669
670 } // end namespace gxamp7
0 // generated from file '../src/LV2/faust/gxamp7_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp7_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fVec1[2];
48 double fConst29;
49 double fRec21[2];
50 double fRec20[2];
51 double fRec19[3];
52 double fRec18[3];
53 FAUSTFLOAT fslider2;
54 FAUSTFLOAT *fslider2_;
55 double fRec22[2];
56 double fConst30;
57 double fConst31;
58 double fConst32;
59 double fVec2[2];
60 double fConst33;
61 double fRec23[2];
62 double fRec17[2];
63 double fConst34;
64 double fConst35;
65 double fRec16[2];
66 double fConst36;
67 double fConst37;
68 double fConst38;
69 double fVec3[2];
70 double fConst39;
71 double fRec26[2];
72 double fRec25[2];
73 double fRec24[2];
74 double fRec15[2];
75 double fRec14[2];
76 double fVec4[2];
77 double fRec27[2];
78 double fRec13[2];
79 double fRec12[2];
80 double fConst40;
81 double fConst41;
82 double fConst42;
83 double fVec5[2];
84 double fConst43;
85 double fRec30[2];
86 double fRec29[2];
87 double fRec28[2];
88 double fRec11[2];
89 double fVec6[2];
90 double fRec31[2];
91 double fRec10[2];
92 double fRec9[2];
93 FAUSTFLOAT fslider3;
94 FAUSTFLOAT *fslider3_;
95 double fRec34[2];
96 int IOTA;
97 double fVec7[32768];
98 int iConst44;
99 double fRec33[2];
100 double fConst45;
101 double fRec32[2];
102 double fConst46;
103 double fConst47;
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fRec42[3];
133 double fVec8[2];
134 double fConst76;
135 double fRec41[2];
136 double fConst77;
137 double fRec40[2];
138 double fRec39[3];
139 double fVec9[2];
140 double fConst78;
141 double fConst79;
142 double fRec38[2];
143 double fRec37[3];
144 double fConst80;
145 double fRec36[3];
146 double fConst81;
147 double fConst82;
148 double fConst83;
149 double fConst84;
150 double fRec46[2];
151 double fRec45[3];
152 double fVec10[2];
153 double fConst85;
154 double fConst86;
155 double fRec44[2];
156 double fRec43[3];
157 double fConst87;
158 double fConst88;
159 double fConst89;
160 double fConst90;
161 double fRec50[2];
162 double fRec49[3];
163 double fConst91;
164 double fRec48[3];
165 double fRec47[3];
166 double fRec52[2];
167 double fRec51[3];
168 double fVec11[2];
169 double fRec35[2];
170 double fVec12[2];
171 double fRec7[2];
172 double fRec4[2];
173 double fRec3[2];
174 double fVec13[2];
175 double fRec55[2];
176 double fRec54[2];
177 double fRec53[2];
178 double fVec14[3];
179 double fConst92;
180 double fConst93;
181 double fRec2[3];
182 double fConst94;
183 double fConst95;
184 double fRec1[3];
185 double fConst96;
186 double fConst97;
187 double fRec0[3];
188 double fVec15[2];
189 double fRec74[2];
190 double fRec73[2];
191 double fRec72[3];
192 double fRec71[3];
193 double fVec16[2];
194 double fRec75[2];
195 double fRec70[2];
196 double fRec69[2];
197 double fVec17[2];
198 double fRec78[2];
199 double fRec77[2];
200 double fRec76[2];
201 double fRec68[2];
202 double fRec67[2];
203 double fVec18[2];
204 double fRec79[2];
205 double fRec66[2];
206 double fRec65[2];
207 double fVec19[2];
208 double fRec82[2];
209 double fRec81[2];
210 double fRec80[2];
211 double fRec64[2];
212 double fVec20[2];
213 double fRec83[2];
214 double fRec63[2];
215 double fRec62[2];
216 double fRec86[2];
217 double fVec21[32768];
218 double fRec85[2];
219 double fRec84[2];
220 double fRec94[3];
221 double fVec22[2];
222 double fRec93[2];
223 double fRec92[2];
224 double fRec91[3];
225 double fVec23[2];
226 double fRec90[2];
227 double fRec89[3];
228 double fRec88[3];
229 double fRec98[2];
230 double fRec97[3];
231 double fVec24[2];
232 double fRec96[2];
233 double fRec95[3];
234 double fRec102[2];
235 double fRec101[3];
236 double fRec100[3];
237 double fRec99[3];
238 double fRec104[2];
239 double fRec103[3];
240 double fVec25[2];
241 double fRec87[2];
242 double fVec26[2];
243 double fRec61[2];
244 double fVec27[2];
245 double fRec105[2];
246 double fRec60[2];
247 double fRec59[2];
248 double fVec28[2];
249 double fRec108[2];
250 double fRec107[2];
251 double fRec106[2];
252 double fVec29[3];
253 double fRec58[3];
254 double fRec57[3];
255 double fRec56[3];
256 void connect(uint32_t port,void* data);
257 void clear_state_f();
258 void init(uint32_t samplingFreq);
259 void compute(int count, float *input0, float *input1, float *output0, float *output1);
260
261 static void clear_state_f_static(PluginLV2*);
262 static void init_static(uint32_t samplingFreq, PluginLV2*);
263 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
264 static void del_instance(PluginLV2 *p);
265 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
266 public:
267 Dsp();
268 ~Dsp();
269 };
270
271
272
273 Dsp::Dsp()
274 : PluginLV2() {
275 version = PLUGINLV2_VERSION;
276 id = "pre 12ax7/ push-pull 6V6";
277 name = N_("pre 12ax7/ push-pull 6V6");
278 mono_audio = 0;
279 stereo_audio = compute_static;
280 set_samplerate = init_static;
281 activate_plugin = 0;
282 connect_ports = connect_static;
283 clear_state = clear_state_f_static;
284 delete_instance = del_instance;
285 }
286
287 Dsp::~Dsp() {
288 }
289
290 inline void Dsp::clear_state_f()
291 {
292 for (int i=0; i<2; i++) fVec0[i] = 0;
293 for (int i=0; i<2; i++) fRec5[i] = 0;
294 for (int i=0; i<2; i++) fRec6[i] = 0;
295 for (int i=0; i<2; i++) fRec8[i] = 0;
296 for (int i=0; i<2; i++) fVec1[i] = 0;
297 for (int i=0; i<2; i++) fRec21[i] = 0;
298 for (int i=0; i<2; i++) fRec20[i] = 0;
299 for (int i=0; i<3; i++) fRec19[i] = 0;
300 for (int i=0; i<3; i++) fRec18[i] = 0;
301 for (int i=0; i<2; i++) fRec22[i] = 0;
302 for (int i=0; i<2; i++) fVec2[i] = 0;
303 for (int i=0; i<2; i++) fRec23[i] = 0;
304 for (int i=0; i<2; i++) fRec17[i] = 0;
305 for (int i=0; i<2; i++) fRec16[i] = 0;
306 for (int i=0; i<2; i++) fVec3[i] = 0;
307 for (int i=0; i<2; i++) fRec26[i] = 0;
308 for (int i=0; i<2; i++) fRec25[i] = 0;
309 for (int i=0; i<2; i++) fRec24[i] = 0;
310 for (int i=0; i<2; i++) fRec15[i] = 0;
311 for (int i=0; i<2; i++) fRec14[i] = 0;
312 for (int i=0; i<2; i++) fVec4[i] = 0;
313 for (int i=0; i<2; i++) fRec27[i] = 0;
314 for (int i=0; i<2; i++) fRec13[i] = 0;
315 for (int i=0; i<2; i++) fRec12[i] = 0;
316 for (int i=0; i<2; i++) fVec5[i] = 0;
317 for (int i=0; i<2; i++) fRec30[i] = 0;
318 for (int i=0; i<2; i++) fRec29[i] = 0;
319 for (int i=0; i<2; i++) fRec28[i] = 0;
320 for (int i=0; i<2; i++) fRec11[i] = 0;
321 for (int i=0; i<2; i++) fVec6[i] = 0;
322 for (int i=0; i<2; i++) fRec31[i] = 0;
323 for (int i=0; i<2; i++) fRec10[i] = 0;
324 for (int i=0; i<2; i++) fRec9[i] = 0;
325 for (int i=0; i<2; i++) fRec34[i] = 0;
326 for (int i=0; i<32768; i++) fVec7[i] = 0;
327 for (int i=0; i<2; i++) fRec33[i] = 0;
328 for (int i=0; i<2; i++) fRec32[i] = 0;
329 for (int i=0; i<3; i++) fRec42[i] = 0;
330 for (int i=0; i<2; i++) fVec8[i] = 0;
331 for (int i=0; i<2; i++) fRec41[i] = 0;
332 for (int i=0; i<2; i++) fRec40[i] = 0;
333 for (int i=0; i<3; i++) fRec39[i] = 0;
334 for (int i=0; i<2; i++) fVec9[i] = 0;
335 for (int i=0; i<2; i++) fRec38[i] = 0;
336 for (int i=0; i<3; i++) fRec37[i] = 0;
337 for (int i=0; i<3; i++) fRec36[i] = 0;
338 for (int i=0; i<2; i++) fRec46[i] = 0;
339 for (int i=0; i<3; i++) fRec45[i] = 0;
340 for (int i=0; i<2; i++) fVec10[i] = 0;
341 for (int i=0; i<2; i++) fRec44[i] = 0;
342 for (int i=0; i<3; i++) fRec43[i] = 0;
343 for (int i=0; i<2; i++) fRec50[i] = 0;
344 for (int i=0; i<3; i++) fRec49[i] = 0;
345 for (int i=0; i<3; i++) fRec48[i] = 0;
346 for (int i=0; i<3; i++) fRec47[i] = 0;
347 for (int i=0; i<2; i++) fRec52[i] = 0;
348 for (int i=0; i<3; i++) fRec51[i] = 0;
349 for (int i=0; i<2; i++) fVec11[i] = 0;
350 for (int i=0; i<2; i++) fRec35[i] = 0;
351 for (int i=0; i<2; i++) fVec12[i] = 0;
352 for (int i=0; i<2; i++) fRec7[i] = 0;
353 for (int i=0; i<2; i++) fRec4[i] = 0;
354 for (int i=0; i<2; i++) fRec3[i] = 0;
355 for (int i=0; i<2; i++) fVec13[i] = 0;
356 for (int i=0; i<2; i++) fRec55[i] = 0;
357 for (int i=0; i<2; i++) fRec54[i] = 0;
358 for (int i=0; i<2; i++) fRec53[i] = 0;
359 for (int i=0; i<3; i++) fVec14[i] = 0;
360 for (int i=0; i<3; i++) fRec2[i] = 0;
361 for (int i=0; i<3; i++) fRec1[i] = 0;
362 for (int i=0; i<3; i++) fRec0[i] = 0;
363 for (int i=0; i<2; i++) fVec15[i] = 0;
364 for (int i=0; i<2; i++) fRec74[i] = 0;
365 for (int i=0; i<2; i++) fRec73[i] = 0;
366 for (int i=0; i<3; i++) fRec72[i] = 0;
367 for (int i=0; i<3; i++) fRec71[i] = 0;
368 for (int i=0; i<2; i++) fVec16[i] = 0;
369 for (int i=0; i<2; i++) fRec75[i] = 0;
370 for (int i=0; i<2; i++) fRec70[i] = 0;
371 for (int i=0; i<2; i++) fRec69[i] = 0;
372 for (int i=0; i<2; i++) fVec17[i] = 0;
373 for (int i=0; i<2; i++) fRec78[i] = 0;
374 for (int i=0; i<2; i++) fRec77[i] = 0;
375 for (int i=0; i<2; i++) fRec76[i] = 0;
376 for (int i=0; i<2; i++) fRec68[i] = 0;
377 for (int i=0; i<2; i++) fRec67[i] = 0;
378 for (int i=0; i<2; i++) fVec18[i] = 0;
379 for (int i=0; i<2; i++) fRec79[i] = 0;
380 for (int i=0; i<2; i++) fRec66[i] = 0;
381 for (int i=0; i<2; i++) fRec65[i] = 0;
382 for (int i=0; i<2; i++) fVec19[i] = 0;
383 for (int i=0; i<2; i++) fRec82[i] = 0;
384 for (int i=0; i<2; i++) fRec81[i] = 0;
385 for (int i=0; i<2; i++) fRec80[i] = 0;
386 for (int i=0; i<2; i++) fRec64[i] = 0;
387 for (int i=0; i<2; i++) fVec20[i] = 0;
388 for (int i=0; i<2; i++) fRec83[i] = 0;
389 for (int i=0; i<2; i++) fRec63[i] = 0;
390 for (int i=0; i<2; i++) fRec62[i] = 0;
391 for (int i=0; i<2; i++) fRec86[i] = 0;
392 for (int i=0; i<32768; i++) fVec21[i] = 0;
393 for (int i=0; i<2; i++) fRec85[i] = 0;
394 for (int i=0; i<2; i++) fRec84[i] = 0;
395 for (int i=0; i<3; i++) fRec94[i] = 0;
396 for (int i=0; i<2; i++) fVec22[i] = 0;
397 for (int i=0; i<2; i++) fRec93[i] = 0;
398 for (int i=0; i<2; i++) fRec92[i] = 0;
399 for (int i=0; i<3; i++) fRec91[i] = 0;
400 for (int i=0; i<2; i++) fVec23[i] = 0;
401 for (int i=0; i<2; i++) fRec90[i] = 0;
402 for (int i=0; i<3; i++) fRec89[i] = 0;
403 for (int i=0; i<3; i++) fRec88[i] = 0;
404 for (int i=0; i<2; i++) fRec98[i] = 0;
405 for (int i=0; i<3; i++) fRec97[i] = 0;
406 for (int i=0; i<2; i++) fVec24[i] = 0;
407 for (int i=0; i<2; i++) fRec96[i] = 0;
408 for (int i=0; i<3; i++) fRec95[i] = 0;
409 for (int i=0; i<2; i++) fRec102[i] = 0;
410 for (int i=0; i<3; i++) fRec101[i] = 0;
411 for (int i=0; i<3; i++) fRec100[i] = 0;
412 for (int i=0; i<3; i++) fRec99[i] = 0;
413 for (int i=0; i<2; i++) fRec104[i] = 0;
414 for (int i=0; i<3; i++) fRec103[i] = 0;
415 for (int i=0; i<2; i++) fVec25[i] = 0;
416 for (int i=0; i<2; i++) fRec87[i] = 0;
417 for (int i=0; i<2; i++) fVec26[i] = 0;
418 for (int i=0; i<2; i++) fRec61[i] = 0;
419 for (int i=0; i<2; i++) fVec27[i] = 0;
420 for (int i=0; i<2; i++) fRec105[i] = 0;
421 for (int i=0; i<2; i++) fRec60[i] = 0;
422 for (int i=0; i<2; i++) fRec59[i] = 0;
423 for (int i=0; i<2; i++) fVec28[i] = 0;
424 for (int i=0; i<2; i++) fRec108[i] = 0;
425 for (int i=0; i<2; i++) fRec107[i] = 0;
426 for (int i=0; i<2; i++) fRec106[i] = 0;
427 for (int i=0; i<3; i++) fVec29[i] = 0;
428 for (int i=0; i<3; i++) fRec58[i] = 0;
429 for (int i=0; i<3; i++) fRec57[i] = 0;
430 for (int i=0; i<3; i++) fRec56[i] = 0;
431 }
432
433 void Dsp::clear_state_f_static(PluginLV2 *p)
434 {
435 static_cast<Dsp*>(p)->clear_state_f();
436 }
437
438 inline void Dsp::init(uint32_t samplingFreq)
439 {
440 fSamplingFreq = samplingFreq;
441 iConst0 = min(192000, max(1, fSamplingFreq));
442 fConst1 = (31704.95306002819 / iConst0);
443 fConst2 = (2 * cos(fConst1));
444 fConst3 = (0.026178010471204185 * sin(fConst1));
445 fConst4 = (fConst3 - 1);
446 fConst5 = (49574.33207364693 / iConst0);
447 fConst6 = (2 * cos(fConst5));
448 fConst7 = (0.07042253521126761 * sin(fConst5));
449 fConst8 = (fConst7 - 1);
450 fConst9 = (60601.32228774711 / iConst0);
451 fConst10 = (2 * cos(fConst9));
452 fConst11 = (0.03546099290780142 * sin(fConst9));
453 fConst12 = (fConst11 - 1);
454 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
455 fConst14 = (1 + fConst13);
456 fConst15 = (0 - ((1 - fConst13) / fConst14));
457 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
458 fConst17 = (1 + fConst16);
459 fConst18 = (0 - ((1 - fConst16) / fConst17));
460 fConst19 = (1.0 / fConst17);
461 fConst20 = tan((37699.11184307752 / iConst0));
462 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
463 fConst22 = (1.0 / fConst20);
464 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
465 fConst24 = (1.0 / (1 + ((0.7653668647301795 + fConst22) / fConst20)));
466 fConst25 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
467 fConst26 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
468 fConst27 = (973.8937226128359 / iConst0);
469 fConst28 = (1 - fConst27);
470 fConst29 = (1.0 / (1 + fConst27));
471 fConst30 = (1.0 / tan((270.1769682087222 / iConst0)));
472 fConst31 = (1 + fConst30);
473 fConst32 = (0 - ((1 - fConst30) / fConst31));
474 fConst33 = (1.0 / fConst31);
475 fConst34 = (0 - fConst13);
476 fConst35 = (0.025 / fConst14);
477 fConst36 = (1.0 / tan((414.6902302738527 / iConst0)));
478 fConst37 = (1 + fConst36);
479 fConst38 = (0 - ((1 - fConst36) / fConst37));
480 fConst39 = (1.0 / fConst37);
481 fConst40 = (1.0 / tan((609.4689747964198 / iConst0)));
482 fConst41 = (1 + fConst40);
483 fConst42 = (0 - ((1 - fConst40) / fConst41));
484 fConst43 = (1.0 / fConst41);
485 IOTA = 0;
486 iConst44 = int((int((0.1111111111111111 * iConst0)) & 65535));
487 fConst45 = (0.009000000000000008 / iConst0);
488 fConst46 = tan((942.4777960769379 / iConst0));
489 fConst47 = (1.0 / faustpower<2>(fConst46));
490 fConst48 = (2 * (1 - fConst47));
491 fConst49 = (1.0 / fConst46);
492 fConst50 = (1 + ((fConst49 - 1.0) / fConst46));
493 fConst51 = (1.0 / (1 + ((1.0 + fConst49) / fConst46)));
494 fConst52 = tan((3769.9111843077517 / iConst0));
495 fConst53 = (1.0 / faustpower<2>(fConst52));
496 fConst54 = (2 * (1 - fConst53));
497 fConst55 = (1.0 / fConst52);
498 fConst56 = (1 + ((fConst55 - 1.0000000000000004) / fConst52));
499 fConst57 = (1 + ((fConst55 + 1.0000000000000004) / fConst52));
500 fConst58 = (1.0 / fConst57);
501 fConst59 = (1 + fConst55);
502 fConst60 = (0 - ((1 - fConst55) / fConst59));
503 fConst61 = tan((10053.096491487338 / iConst0));
504 fConst62 = (1.0 / faustpower<2>(fConst61));
505 fConst63 = (2 * (1 - fConst62));
506 fConst64 = (1.0 / fConst61);
507 fConst65 = (1 + ((fConst64 - 1.0000000000000004) / fConst61));
508 fConst66 = (1 + ((1.0000000000000004 + fConst64) / fConst61));
509 fConst67 = (1.0 / fConst66);
510 fConst68 = (1 + fConst64);
511 fConst69 = (0 - ((1 - fConst64) / fConst68));
512 fConst70 = tan((47123.8898038469 / iConst0));
513 fConst71 = (2 * (1 - (1.0 / faustpower<2>(fConst70))));
514 fConst72 = (1.0 / fConst70);
515 fConst73 = (1 + ((fConst72 - 1.414213562373095) / fConst70));
516 fConst74 = (1 + ((1.414213562373095 + fConst72) / fConst70));
517 fConst75 = (1.0 / fConst74);
518 fConst76 = (1.0 / (fConst14 * fConst74));
519 fConst77 = (1.0 / fConst68);
520 fConst78 = (0 - fConst55);
521 fConst79 = (1.0 / (fConst59 * fConst66));
522 fConst80 = (2 * (0 - fConst53));
523 fConst81 = (1 + ((fConst49 - 1.0000000000000004) / fConst46));
524 fConst82 = (1.0 / (1 + ((fConst49 + 1.0000000000000004) / fConst46)));
525 fConst83 = (1 + fConst49);
526 fConst84 = (0 - ((1 - fConst49) / fConst83));
527 fConst85 = (0 - fConst49);
528 fConst86 = (1.0 / (fConst83 * fConst57));
529 fConst87 = (2 * (0 - fConst47));
530 fConst88 = (1 + ((fConst55 - 1.0) / fConst52));
531 fConst89 = (1.0 / (1 + ((1.0 + fConst55) / fConst52)));
532 fConst90 = (0 - fConst64);
533 fConst91 = (2 * (0 - fConst62));
534 fConst92 = (0 - fConst10);
535 fConst93 = (1.0 / (1 + fConst11));
536 fConst94 = (0 - fConst6);
537 fConst95 = (1.0 / (1 + fConst7));
538 fConst96 = (0 - fConst2);
539 fConst97 = (1.0 / (1 + fConst3));
540 clear_state_f();
541 }
542
543 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
544 {
545 static_cast<Dsp*>(p)->init(samplingFreq);
546 }
547
548 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
549 {
550 #define fslider0 (*fslider0_)
551 #define fslider1 (*fslider1_)
552 #define fslider2 (*fslider2_)
553 #define fslider3 (*fslider3_)
554 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
555 double fSlow1 = (1.000000000000001e-05 * fslider1);
556 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
557 double fSlow3 = fslider3;
558 double fSlow4 = (1.25 * fSlow3);
559 double fSlow5 = (2 * (fSlow3 - 0.5));
560 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
561 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
562 double fSlow8 = (fConst82 * pow(1e+01,(2 * fSlow3)));
563 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
564 double fSlow10 = (fConst82 * pow(1e+01,(0.9 * fSlow3)));
565 double fSlow11 = (1 - max(0, (0 - fSlow5)));
566 for (int i=0; i<count; i++) {
567 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
568 fVec0[0] = fTemp0;
569 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
570 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
571 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
572 double fTemp1 = (1 - fRec8[0]);
573 double fTemp2 = (double)input0[i];
574 fVec1[0] = fTemp2;
575 fRec21[0] = (fConst29 * ((fVec1[0] - fVec1[1]) + (fConst28 * fRec21[1])));
576 fRec20[0] = (fConst29 * ((fRec21[0] - fRec21[1]) + (fConst28 * fRec20[1])));
577 fRec19[0] = (fRec20[0] - (fConst26 * ((fConst25 * fRec19[2]) + (fConst21 * fRec19[1]))));
578 fRec18[0] = ((fConst26 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst24 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
579 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
580 double fTemp3 = (1e-15 + (0.027 * fRec17[1]));
581 fVec2[0] = fTemp3;
582 fRec23[0] = ((fConst33 * (fVec2[0] + fVec2[1])) + (fConst32 * fRec23[1]));
583 fRec17[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec23[0] + (fConst24 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 1.5816559999999988)) - 191.42014814814814);
584 fRec16[0] = ((fConst35 * ((fConst34 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
585 double fTemp4 = (1e-15 + (0.015 * fRec25[1]));
586 fVec3[0] = fTemp4;
587 fRec26[0] = ((fConst39 * (fVec3[0] + fVec3[1])) + (fConst38 * fRec26[1]));
588 fRec25[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec26[0] + fRec15[1]) - 1.204284999999999)) - 169.71433333333334);
589 fRec24[0] = ((fConst35 * ((fConst34 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
590 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
591 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
592 double fTemp5 = (1e-15 + (0.015 * fRec13[1]));
593 fVec4[0] = fTemp5;
594 fRec27[0] = ((fConst39 * (fVec4[0] + fVec4[1])) + (fConst38 * fRec27[1]));
595 fRec13[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec27[0] + fRec14[0]) - 1.204284999999999)) - 169.71433333333334);
596 fRec12[0] = ((fConst35 * ((fConst34 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
597 double fTemp6 = (1e-15 + (0.0082 * fRec29[1]));
598 fVec5[0] = fTemp6;
599 fRec30[0] = ((fConst43 * (fVec5[0] + fVec5[1])) + (fConst42 * fRec30[1]));
600 fRec29[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec30[0] + fRec11[1]) - 0.840702999999999)) - 147.47524390243905);
601 fRec28[0] = ((fConst35 * ((fConst34 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
602 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
603 double fTemp7 = (1e-15 + (0.0082 * fRec10[1]));
604 fVec6[0] = fTemp7;
605 fRec31[0] = ((fConst43 * (fVec6[0] + fVec6[1])) + (fConst42 * fRec31[1]));
606 fRec10[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec31[0] + fRec11[0]) - 0.840702999999999)) - 147.47524390243905);
607 fRec9[0] = ((fConst35 * ((fConst34 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
608 double fTemp8 = (fRec9[0] * fTemp1);
609 double fTemp9 = (fRec9[0] * fRec8[0]);
610 double fTemp10 = fabs(fTemp9);
611 fRec34[0] = ((9.999999999998899e-05 * fTemp10) + (0.9999 * fRec34[1]));
612 double fTemp11 = max(fRec34[0], fTemp10);
613 fVec7[IOTA&32767] = fTemp11;
614 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst44)&32767]);
615 fRec32[0] = ((fConst45 * fRec33[0]) + (0.999 * fRec32[1]));
616 double fTemp12 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
617 double fTemp13 = (0 - fTemp12);
618 double fTemp14 = (40.1 * fTemp13);
619 double fTemp15 = max(-600, fTemp14);
620 double fTemp16 = (0 - fTemp15);
621 double fTemp17 = (fTemp9 - fTemp12);
622 double fTemp18 = (40.1 * fTemp17);
623 double fTemp19 = max(-600, fTemp18);
624 double fTemp20 = (0 - fTemp19);
625 double fTemp21 = (((int((fabs(fTemp18) > 0.0001)))?((int((fTemp19 < -50)))?(exp(fTemp19) * fTemp20):(fTemp19 / (1 - exp(fTemp20)))):(1 + (fTemp17 * (20.05 + (134.00083333333336 * fTemp17))))) - ((int((fabs(fTemp14) > 0.0001)))?((int((fTemp15 < -50)))?(exp(fTemp15) * fTemp16):(fTemp15 / (1 - exp(fTemp16)))):(1 + (fTemp13 * (20.05 + (134.00083333333336 * fTemp13))))));
626 double fTemp22 = (fConst48 * fRec36[1]);
627 fRec42[0] = ((0.024937655860349125 * fTemp21) - (fConst75 * ((fConst73 * fRec42[2]) + (fConst71 * fRec42[1]))));
628 double fTemp23 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
629 fVec8[0] = fTemp23;
630 fRec41[0] = ((fConst76 * ((fConst34 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
631 fRec40[0] = ((fConst77 * (fRec41[0] + fRec41[1])) + (fConst69 * fRec40[1]));
632 fRec39[0] = (fRec40[0] - (fConst67 * ((fConst65 * fRec39[2]) + (fConst63 * fRec39[1]))));
633 double fTemp24 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
634 fVec9[0] = fTemp24;
635 fRec38[0] = ((fConst79 * ((fConst78 * fVec9[1]) + (fConst55 * fVec9[0]))) + (fConst60 * fRec38[1]));
636 fRec37[0] = (fRec38[0] - (fConst58 * ((fConst56 * fRec37[2]) + (fConst54 * fRec37[1]))));
637 fRec36[0] = ((fConst58 * (((fConst53 * fRec37[0]) + (fConst80 * fRec37[1])) + (fConst53 * fRec37[2]))) - (fConst51 * ((fConst50 * fRec36[2]) + fTemp22)));
638 double fTemp25 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst51 * (fTemp22 + (fConst50 * fRec36[0])))))));
639 fRec46[0] = ((fConst79 * (fVec9[0] + fVec9[1])) + (fConst60 * fRec46[1]));
640 fRec45[0] = (fRec46[0] - (fConst58 * ((fConst56 * fRec45[2]) + (fConst54 * fRec45[1]))));
641 double fTemp26 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
642 fVec10[0] = fTemp26;
643 fRec44[0] = ((fConst86 * ((fConst85 * fVec10[1]) + (fConst49 * fVec10[0]))) + (fConst84 * fRec44[1]));
644 fRec43[0] = (fRec44[0] - (fConst82 * ((fConst81 * fRec43[2]) + (fConst48 * fRec43[1]))));
645 double fTemp27 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec43[0]) + (fConst87 * fRec43[1])) + (fConst47 * fRec43[2])))));
646 double fTemp28 = (fConst48 * fRec47[1]);
647 double fTemp29 = (fConst54 * fRec48[1]);
648 fRec50[0] = ((fConst77 * ((fConst90 * fRec41[1]) + (fConst64 * fRec41[0]))) + (fConst69 * fRec50[1]));
649 fRec49[0] = (fRec50[0] - (fConst67 * ((fConst65 * fRec49[2]) + (fConst63 * fRec49[1]))));
650 fRec48[0] = ((fConst67 * (((fConst62 * fRec49[0]) + (fConst91 * fRec49[1])) + (fConst62 * fRec49[2]))) - (fConst89 * ((fConst88 * fRec48[2]) + fTemp29)));
651 fRec47[0] = ((fRec48[2] + (fConst89 * (fTemp29 + (fConst88 * fRec48[0])))) - (fConst51 * ((fConst50 * fRec47[2]) + fTemp28)));
652 double fTemp30 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst51 * (fTemp28 + (fConst50 * fRec47[0])))))));
653 fRec52[0] = ((fConst86 * (fVec10[0] + fVec10[1])) + (fConst84 * fRec52[1]));
654 fRec51[0] = (fRec52[0] - (fConst82 * ((fConst81 * fRec51[2]) + (fConst48 * fRec51[1]))));
655 double fTemp31 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
656 double fTemp32 = ((1.2589412 * (fTemp31 * (1 - (0.3333333333333333 * faustpower<2>(fTemp31))))) + (1.584893192 * ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + ((fTemp27 * (1 - (0.3333333333333333 * faustpower<2>(fTemp27)))) + (0.8413951417869425 * (fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))))))));
657 fVec11[0] = fTemp32;
658 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
659 double fTemp33 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp21)) + (fTemp8 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp8))) - 1)))));
660 fVec12[0] = fTemp33;
661 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
662 double fTemp34 = (fRec7[0] * fRec6[0]);
663 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp34 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
664 fRec3[0] = ((fConst35 * ((fConst34 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
665 double fTemp35 = (1e-15 + (0.0041 * fRec54[1]));
666 fVec13[0] = fTemp35;
667 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
668 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp34) - 0.659760999999999)) - 89.08268292682925);
669 fRec53[0] = ((fConst35 * ((fConst34 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
670 double fTemp36 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
671 fVec14[0] = fTemp36;
672 fRec2[0] = (fConst93 * ((fVec14[2] + (fVec14[0] + (fConst92 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
673 fRec1[0] = (fConst95 * ((fRec2[2] + (fRec2[0] + (fConst94 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
674 fRec0[0] = (fConst97 * ((fRec1[2] + (fRec1[0] + (fConst96 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
675 output0[i] = (FAUSTFLOAT)fRec0[0];
676 double fTemp37 = (double)input1[i];
677 fVec15[0] = fTemp37;
678 fRec74[0] = (fConst29 * ((fVec15[0] - fVec15[1]) + (fConst28 * fRec74[1])));
679 fRec73[0] = (fConst29 * ((fRec74[0] - fRec74[1]) + (fConst28 * fRec73[1])));
680 fRec72[0] = (fRec73[0] - (fConst26 * ((fConst25 * fRec72[2]) + (fConst21 * fRec72[1]))));
681 fRec71[0] = ((fConst26 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1])))) - (fConst24 * ((fConst23 * fRec71[2]) + (fConst21 * fRec71[1]))));
682 double fTemp38 = (1e-15 + (0.027 * fRec70[1]));
683 fVec16[0] = fTemp38;
684 fRec75[0] = ((fConst33 * (fVec16[0] + fVec16[1])) + (fConst32 * fRec75[1]));
685 fRec70[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec75[0] + (fConst24 * (fRec22[0] * (fRec71[2] + (fRec71[0] + (2 * fRec71[1])))))) - 1.5816559999999988)) - 191.42014814814814);
686 fRec69[0] = ((fConst35 * ((fConst34 * fRec70[1]) + (fConst13 * fRec70[0]))) + (fConst15 * fRec69[1]));
687 double fTemp39 = (1e-15 + (0.015 * fRec77[1]));
688 fVec17[0] = fTemp39;
689 fRec78[0] = ((fConst39 * (fVec17[0] + fVec17[1])) + (fConst38 * fRec78[1]));
690 fRec77[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec78[0] + fRec68[1]) - 1.204284999999999)) - 169.71433333333334);
691 fRec76[0] = ((fConst35 * ((fConst34 * fRec77[1]) + (fConst13 * fRec77[0]))) + (fConst15 * fRec76[1]));
692 fRec68[0] = ((0.6 * fRec76[0]) + fRec69[0]);
693 fRec67[0] = ((fConst19 * (fRec68[0] + fRec68[1])) + (fConst18 * fRec67[1]));
694 double fTemp40 = (1e-15 + (0.015 * fRec66[1]));
695 fVec18[0] = fTemp40;
696 fRec79[0] = ((fConst39 * (fVec18[0] + fVec18[1])) + (fConst38 * fRec79[1]));
697 fRec66[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec79[0] + fRec67[0]) - 1.204284999999999)) - 169.71433333333334);
698 fRec65[0] = ((fConst35 * ((fConst34 * fRec66[1]) + (fConst13 * fRec66[0]))) + (fConst15 * fRec65[1]));
699 double fTemp41 = (1e-15 + (0.0082 * fRec81[1]));
700 fVec19[0] = fTemp41;
701 fRec82[0] = ((fConst43 * (fVec19[0] + fVec19[1])) + (fConst42 * fRec82[1]));
702 fRec81[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec82[0] + fRec64[1]) - 0.840702999999999)) - 147.47524390243905);
703 fRec80[0] = ((fConst35 * ((fConst34 * fRec81[1]) + (fConst13 * fRec81[0]))) + (fConst15 * fRec80[1]));
704 fRec64[0] = ((0.6 * fRec80[0]) + fRec65[0]);
705 double fTemp42 = (1e-15 + (0.0082 * fRec63[1]));
706 fVec20[0] = fTemp42;
707 fRec83[0] = ((fConst43 * (fVec20[0] + fVec20[1])) + (fConst42 * fRec83[1]));
708 fRec63[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec83[0] + fRec64[0]) - 0.840702999999999)) - 147.47524390243905);
709 fRec62[0] = ((fConst35 * ((fConst34 * fRec63[1]) + (fConst13 * fRec63[0]))) + (fConst15 * fRec62[1]));
710 double fTemp43 = (fTemp1 * fRec62[0]);
711 double fTemp44 = (fRec8[0] * fRec62[0]);
712 double fTemp45 = fabs(fTemp44);
713 fRec86[0] = ((9.999999999998899e-05 * fTemp45) + (0.9999 * fRec86[1]));
714 double fTemp46 = max(fRec86[0], fTemp45);
715 fVec21[IOTA&32767] = fTemp46;
716 fRec85[0] = ((fVec21[IOTA&32767] + fRec85[1]) - fVec21[(IOTA-iConst44)&32767]);
717 fRec84[0] = ((fConst45 * fRec85[0]) + (0.999 * fRec84[1]));
718 double fTemp47 = max(-1.0, min(-0.01, (fVec21[IOTA&32767] - (1.0 + (1.02 * fRec84[0])))));
719 double fTemp48 = (0 - fTemp47);
720 double fTemp49 = (40.1 * fTemp48);
721 double fTemp50 = max(-600, fTemp49);
722 double fTemp51 = (0 - fTemp50);
723 double fTemp52 = (fTemp44 - fTemp47);
724 double fTemp53 = (40.1 * fTemp52);
725 double fTemp54 = max(-600, fTemp53);
726 double fTemp55 = (0 - fTemp54);
727 double fTemp56 = (((int((fabs(fTemp53) > 0.0001)))?((int((fTemp54 < -50)))?(exp(fTemp54) * fTemp55):(fTemp54 / (1 - exp(fTemp55)))):(1 + (fTemp52 * (20.05 + (134.00083333333336 * fTemp52))))) - ((int((fabs(fTemp49) > 0.0001)))?((int((fTemp50 < -50)))?(exp(fTemp50) * fTemp51):(fTemp50 / (1 - exp(fTemp51)))):(1 + (fTemp48 * (20.05 + (134.00083333333336 * fTemp48))))));
728 double fTemp57 = (fConst48 * fRec88[1]);
729 fRec94[0] = ((0.024937655860349125 * fTemp56) - (fConst75 * ((fConst73 * fRec94[2]) + (fConst71 * fRec94[1]))));
730 double fTemp58 = (fRec94[2] + (fRec94[0] + (2 * fRec94[1])));
731 fVec22[0] = fTemp58;
732 fRec93[0] = ((fConst76 * ((fConst34 * fVec22[1]) + (fConst13 * fVec22[0]))) + (fConst15 * fRec93[1]));
733 fRec92[0] = ((fConst77 * (fRec93[0] + fRec93[1])) + (fConst69 * fRec92[1]));
734 fRec91[0] = (fRec92[0] - (fConst67 * ((fConst65 * fRec91[2]) + (fConst63 * fRec91[1]))));
735 double fTemp59 = (fRec91[2] + (fRec91[0] + (2 * fRec91[1])));
736 fVec23[0] = fTemp59;
737 fRec90[0] = ((fConst79 * ((fConst78 * fVec23[1]) + (fConst55 * fVec23[0]))) + (fConst60 * fRec90[1]));
738 fRec89[0] = (fRec90[0] - (fConst58 * ((fConst56 * fRec89[2]) + (fConst54 * fRec89[1]))));
739 fRec88[0] = ((fConst58 * (((fConst53 * fRec89[0]) + (fConst80 * fRec89[1])) + (fConst53 * fRec89[2]))) - (fConst51 * ((fConst50 * fRec88[2]) + fTemp57)));
740 double fTemp60 = max(-1, min(1, (fSlow7 * (fRec88[2] + (fConst51 * (fTemp57 + (fConst50 * fRec88[0])))))));
741 fRec98[0] = ((fConst79 * (fVec23[0] + fVec23[1])) + (fConst60 * fRec98[1]));
742 fRec97[0] = (fRec98[0] - (fConst58 * ((fConst56 * fRec97[2]) + (fConst54 * fRec97[1]))));
743 double fTemp61 = (fRec97[2] + (fRec97[0] + (2 * fRec97[1])));
744 fVec24[0] = fTemp61;
745 fRec96[0] = ((fConst86 * ((fConst85 * fVec24[1]) + (fConst49 * fVec24[0]))) + (fConst84 * fRec96[1]));
746 fRec95[0] = (fRec96[0] - (fConst82 * ((fConst81 * fRec95[2]) + (fConst48 * fRec95[1]))));
747 double fTemp62 = max(-1, min(1, (fSlow8 * (((fConst47 * fRec95[0]) + (fConst87 * fRec95[1])) + (fConst47 * fRec95[2])))));
748 double fTemp63 = (fConst48 * fRec99[1]);
749 double fTemp64 = (fConst54 * fRec100[1]);
750 fRec102[0] = ((fConst77 * ((fConst90 * fRec93[1]) + (fConst64 * fRec93[0]))) + (fConst69 * fRec102[1]));
751 fRec101[0] = (fRec102[0] - (fConst67 * ((fConst65 * fRec101[2]) + (fConst63 * fRec101[1]))));
752 fRec100[0] = ((fConst67 * (((fConst62 * fRec101[0]) + (fConst91 * fRec101[1])) + (fConst62 * fRec101[2]))) - (fConst89 * ((fConst88 * fRec100[2]) + fTemp64)));
753 fRec99[0] = ((fRec100[2] + (fConst89 * (fTemp64 + (fConst88 * fRec100[0])))) - (fConst51 * ((fConst50 * fRec99[2]) + fTemp63)));
754 double fTemp65 = max(-1, min(1, (fSlow9 * (fRec99[2] + (fConst51 * (fTemp63 + (fConst50 * fRec99[0])))))));
755 fRec104[0] = ((fConst86 * (fVec24[0] + fVec24[1])) + (fConst84 * fRec104[1]));
756 fRec103[0] = (fRec104[0] - (fConst82 * ((fConst81 * fRec103[2]) + (fConst48 * fRec103[1]))));
757 double fTemp66 = max(-1, min(1, (fSlow10 * (fRec103[2] + (fRec103[0] + (2 * fRec103[1]))))));
758 double fTemp67 = ((1.2589412 * (fTemp66 * (1 - (0.3333333333333333 * faustpower<2>(fTemp66))))) + (1.584893192 * ((fTemp65 * (1 - (0.3333333333333333 * faustpower<2>(fTemp65)))) + ((fTemp62 * (1 - (0.3333333333333333 * faustpower<2>(fTemp62)))) + (0.8413951417869425 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60)))))))));
759 fVec25[0] = fTemp67;
760 fRec87[0] = ((fConst19 * (fVec25[0] + fVec25[1])) + (fConst18 * fRec87[1]));
761 double fTemp68 = (((fSlow11 * fRec87[0]) + (fSlow6 * fTemp56)) + (fTemp43 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp43))) - 1)))));
762 fVec26[0] = fTemp68;
763 fRec61[0] = ((fConst19 * (fVec26[0] + fVec26[1])) + (fConst18 * fRec61[1]));
764 double fTemp69 = (fRec6[0] * fRec61[0]);
765 double fTemp70 = (1e-15 + (0.0041 * fRec60[1]));
766 fVec27[0] = fTemp70;
767 fRec105[0] = ((fConst19 * (fVec27[0] + fVec27[1])) + (fConst18 * fRec105[1]));
768 fRec60[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec105[0] + fTemp69) - 0.664540999999999)) - 87.91682926829267);
769 fRec59[0] = ((fConst35 * ((fConst34 * fRec60[1]) + (fConst13 * fRec60[0]))) + (fConst15 * fRec59[1]));
770 double fTemp71 = (1e-15 + (0.0041 * fRec107[1]));
771 fVec28[0] = fTemp71;
772 fRec108[0] = ((fConst19 * (fVec28[0] + fVec28[1])) + (fConst18 * fRec108[1]));
773 fRec107[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec108[0] + fTemp69) - 0.659760999999999)) - 89.08268292682925);
774 fRec106[0] = ((fConst35 * ((fConst34 * fRec107[1]) + (fConst13 * fRec107[0]))) + (fConst15 * fRec106[1]));
775 double fTemp72 = (min(0.7, fRec106[0]) + max(-0.75, fRec59[0]));
776 fVec29[0] = fTemp72;
777 fRec58[0] = (fConst93 * ((fVec29[2] + (fVec29[0] + (fConst92 * fVec29[1]))) + ((fConst12 * fRec58[2]) + (fConst10 * fRec58[1]))));
778 fRec57[0] = (fConst95 * ((fRec58[2] + (fRec58[0] + (fConst94 * fRec58[1]))) + ((fConst8 * fRec57[2]) + (fConst6 * fRec57[1]))));
779 fRec56[0] = (fConst97 * ((fRec57[2] + (fRec57[0] + (fConst96 * fRec57[1]))) + ((fConst4 * fRec56[2]) + (fConst2 * fRec56[1]))));
780 output1[i] = (FAUSTFLOAT)fRec56[0];
781 // post processing
782 fRec56[2] = fRec56[1]; fRec56[1] = fRec56[0];
783 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
784 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
785 fVec29[2] = fVec29[1]; fVec29[1] = fVec29[0];
786 fRec106[1] = fRec106[0];
787 fRec107[1] = fRec107[0];
788 fRec108[1] = fRec108[0];
789 fVec28[1] = fVec28[0];
790 fRec59[1] = fRec59[0];
791 fRec60[1] = fRec60[0];
792 fRec105[1] = fRec105[0];
793 fVec27[1] = fVec27[0];
794 fRec61[1] = fRec61[0];
795 fVec26[1] = fVec26[0];
796 fRec87[1] = fRec87[0];
797 fVec25[1] = fVec25[0];
798 fRec103[2] = fRec103[1]; fRec103[1] = fRec103[0];
799 fRec104[1] = fRec104[0];
800 fRec99[2] = fRec99[1]; fRec99[1] = fRec99[0];
801 fRec100[2] = fRec100[1]; fRec100[1] = fRec100[0];
802 fRec101[2] = fRec101[1]; fRec101[1] = fRec101[0];
803 fRec102[1] = fRec102[0];
804 fRec95[2] = fRec95[1]; fRec95[1] = fRec95[0];
805 fRec96[1] = fRec96[0];
806 fVec24[1] = fVec24[0];
807 fRec97[2] = fRec97[1]; fRec97[1] = fRec97[0];
808 fRec98[1] = fRec98[0];
809 fRec88[2] = fRec88[1]; fRec88[1] = fRec88[0];
810 fRec89[2] = fRec89[1]; fRec89[1] = fRec89[0];
811 fRec90[1] = fRec90[0];
812 fVec23[1] = fVec23[0];
813 fRec91[2] = fRec91[1]; fRec91[1] = fRec91[0];
814 fRec92[1] = fRec92[0];
815 fRec93[1] = fRec93[0];
816 fVec22[1] = fVec22[0];
817 fRec94[2] = fRec94[1]; fRec94[1] = fRec94[0];
818 fRec84[1] = fRec84[0];
819 fRec85[1] = fRec85[0];
820 fRec86[1] = fRec86[0];
821 fRec62[1] = fRec62[0];
822 fRec63[1] = fRec63[0];
823 fRec83[1] = fRec83[0];
824 fVec20[1] = fVec20[0];
825 fRec64[1] = fRec64[0];
826 fRec80[1] = fRec80[0];
827 fRec81[1] = fRec81[0];
828 fRec82[1] = fRec82[0];
829 fVec19[1] = fVec19[0];
830 fRec65[1] = fRec65[0];
831 fRec66[1] = fRec66[0];
832 fRec79[1] = fRec79[0];
833 fVec18[1] = fVec18[0];
834 fRec67[1] = fRec67[0];
835 fRec68[1] = fRec68[0];
836 fRec76[1] = fRec76[0];
837 fRec77[1] = fRec77[0];
838 fRec78[1] = fRec78[0];
839 fVec17[1] = fVec17[0];
840 fRec69[1] = fRec69[0];
841 fRec70[1] = fRec70[0];
842 fRec75[1] = fRec75[0];
843 fVec16[1] = fVec16[0];
844 fRec71[2] = fRec71[1]; fRec71[1] = fRec71[0];
845 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
846 fRec73[1] = fRec73[0];
847 fRec74[1] = fRec74[0];
848 fVec15[1] = fVec15[0];
849 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
850 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
851 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
852 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
853 fRec53[1] = fRec53[0];
854 fRec54[1] = fRec54[0];
855 fRec55[1] = fRec55[0];
856 fVec13[1] = fVec13[0];
857 fRec3[1] = fRec3[0];
858 fRec4[1] = fRec4[0];
859 fRec7[1] = fRec7[0];
860 fVec12[1] = fVec12[0];
861 fRec35[1] = fRec35[0];
862 fVec11[1] = fVec11[0];
863 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
864 fRec52[1] = fRec52[0];
865 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
866 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
867 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
868 fRec50[1] = fRec50[0];
869 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
870 fRec44[1] = fRec44[0];
871 fVec10[1] = fVec10[0];
872 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
873 fRec46[1] = fRec46[0];
874 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
875 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
876 fRec38[1] = fRec38[0];
877 fVec9[1] = fVec9[0];
878 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
879 fRec40[1] = fRec40[0];
880 fRec41[1] = fRec41[0];
881 fVec8[1] = fVec8[0];
882 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
883 fRec32[1] = fRec32[0];
884 fRec33[1] = fRec33[0];
885 IOTA = IOTA+1;
886 fRec34[1] = fRec34[0];
887 fRec9[1] = fRec9[0];
888 fRec10[1] = fRec10[0];
889 fRec31[1] = fRec31[0];
890 fVec6[1] = fVec6[0];
891 fRec11[1] = fRec11[0];
892 fRec28[1] = fRec28[0];
893 fRec29[1] = fRec29[0];
894 fRec30[1] = fRec30[0];
895 fVec5[1] = fVec5[0];
896 fRec12[1] = fRec12[0];
897 fRec13[1] = fRec13[0];
898 fRec27[1] = fRec27[0];
899 fVec4[1] = fVec4[0];
900 fRec14[1] = fRec14[0];
901 fRec15[1] = fRec15[0];
902 fRec24[1] = fRec24[0];
903 fRec25[1] = fRec25[0];
904 fRec26[1] = fRec26[0];
905 fVec3[1] = fVec3[0];
906 fRec16[1] = fRec16[0];
907 fRec17[1] = fRec17[0];
908 fRec23[1] = fRec23[0];
909 fVec2[1] = fVec2[0];
910 fRec22[1] = fRec22[0];
911 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
912 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
913 fRec20[1] = fRec20[0];
914 fRec21[1] = fRec21[0];
915 fVec1[1] = fVec1[0];
916 fRec8[1] = fRec8[0];
917 fRec6[1] = fRec6[0];
918 fRec5[1] = fRec5[0];
919 fVec0[1] = fVec0[0];
920 }
921 #undef fslider0
922 #undef fslider1
923 #undef fslider2
924 #undef fslider3
925 }
926
927 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
928 {
929 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
930 }
931
932
933 void Dsp::connect(uint32_t port,void* data)
934 {
935 switch ((PortIndex)port)
936 {
937 case DRIVE:
938 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
939 break;
940 case PREGAIN:
941 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
942 break;
943 case WET_DRY:
944 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
945 break;
946 case GAIN1:
947 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
948 break;
949 default:
950 break;
951 }
952 }
953
954 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
955 {
956 static_cast<Dsp*>(p)->connect(port, data);
957 }
958
959
960 PluginLV2 *plugin() {
961 return new Dsp();
962 }
963
964 void Dsp::del_instance(PluginLV2 *p)
965 {
966 delete static_cast<Dsp*>(p);
967 }
968
969 /*
970 typedef enum
971 {
972 DRIVE,
973 PREGAIN,
974 WET_DRY,
975 GAIN1,
976 } PortIndex;
977 */
978
979 } // end namespace gxamp7_stereo
0 // generated from file '../src/LV2/faust/gxamp8.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp8 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fConst29;
48 double fVec1[2];
49 double fConst30;
50 double fRec21[2];
51 double fRec20[2];
52 double fRec19[3];
53 double fRec18[3];
54 FAUSTFLOAT fslider2;
55 FAUSTFLOAT *fslider2_;
56 double fRec22[2];
57 double fConst31;
58 double fConst32;
59 double fConst33;
60 double fConst34;
61 double fVec2[2];
62 double fConst35;
63 double fRec23[2];
64 double fRec17[2];
65 double fConst36;
66 double fConst37;
67 double fRec16[2];
68 double fConst38;
69 double fConst39;
70 double fConst40;
71 double fVec3[2];
72 double fConst41;
73 double fRec26[2];
74 double fRec25[2];
75 double fRec24[2];
76 double fRec15[2];
77 double fRec14[2];
78 double fVec4[2];
79 double fRec27[2];
80 double fRec13[2];
81 double fRec12[2];
82 double fConst42;
83 double fConst43;
84 double fConst44;
85 double fVec5[2];
86 double fConst45;
87 double fRec30[2];
88 double fRec29[2];
89 double fRec28[2];
90 double fRec11[2];
91 double fVec6[2];
92 double fRec31[2];
93 double fRec10[2];
94 double fRec9[2];
95 FAUSTFLOAT fslider3;
96 FAUSTFLOAT *fslider3_;
97 double fRec34[2];
98 int IOTA;
99 double fVec7[32768];
100 int iConst46;
101 double fRec33[2];
102 double fConst47;
103 double fRec32[2];
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fConst76;
133 double fConst77;
134 double fRec42[3];
135 double fVec8[2];
136 double fConst78;
137 double fRec41[2];
138 double fConst79;
139 double fRec40[2];
140 double fRec39[3];
141 double fVec9[2];
142 double fConst80;
143 double fConst81;
144 double fRec38[2];
145 double fRec37[3];
146 double fConst82;
147 double fRec36[3];
148 double fConst83;
149 double fConst84;
150 double fConst85;
151 double fConst86;
152 double fRec46[2];
153 double fRec45[3];
154 double fVec10[2];
155 double fConst87;
156 double fConst88;
157 double fRec44[2];
158 double fRec43[3];
159 double fConst89;
160 double fConst90;
161 double fConst91;
162 double fConst92;
163 double fRec50[2];
164 double fRec49[3];
165 double fConst93;
166 double fRec48[3];
167 double fRec47[3];
168 double fRec52[2];
169 double fRec51[3];
170 double fVec11[2];
171 double fRec35[2];
172 double fVec12[2];
173 double fRec7[2];
174 double fRec4[2];
175 double fConst94;
176 double fRec3[2];
177 double fVec13[2];
178 double fRec55[2];
179 double fRec54[2];
180 double fRec53[2];
181 double fVec14[3];
182 double fConst95;
183 double fConst96;
184 double fRec2[3];
185 double fConst97;
186 double fConst98;
187 double fRec1[3];
188 double fConst99;
189 double fConst100;
190 double fRec0[3];
191 void connect(uint32_t port,void* data);
192 void clear_state_f();
193 void init(uint32_t samplingFreq);
194 void compute(int count, float *input0, float *output0);
195
196 static void clear_state_f_static(PluginLV2*);
197 static void init_static(uint32_t samplingFreq, PluginLV2*);
198 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
199 static void del_instance(PluginLV2 *p);
200 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
201 public:
202 Dsp();
203 ~Dsp();
204 };
205
206
207
208 Dsp::Dsp()
209 : PluginLV2() {
210 version = PLUGINLV2_VERSION;
211 id = "pre 12AU7/ push-pull 6V6";
212 name = N_("pre 12AU7/ push-pull 6V6");
213 mono_audio = compute_static;
214 stereo_audio = 0;
215 set_samplerate = init_static;
216 activate_plugin = 0;
217 connect_ports = connect_static;
218 clear_state = clear_state_f_static;
219 delete_instance = del_instance;
220 }
221
222 Dsp::~Dsp() {
223 }
224
225 inline void Dsp::clear_state_f()
226 {
227 for (int i=0; i<2; i++) fVec0[i] = 0;
228 for (int i=0; i<2; i++) fRec5[i] = 0;
229 for (int i=0; i<2; i++) fRec6[i] = 0;
230 for (int i=0; i<2; i++) fRec8[i] = 0;
231 for (int i=0; i<2; i++) fVec1[i] = 0;
232 for (int i=0; i<2; i++) fRec21[i] = 0;
233 for (int i=0; i<2; i++) fRec20[i] = 0;
234 for (int i=0; i<3; i++) fRec19[i] = 0;
235 for (int i=0; i<3; i++) fRec18[i] = 0;
236 for (int i=0; i<2; i++) fRec22[i] = 0;
237 for (int i=0; i<2; i++) fVec2[i] = 0;
238 for (int i=0; i<2; i++) fRec23[i] = 0;
239 for (int i=0; i<2; i++) fRec17[i] = 0;
240 for (int i=0; i<2; i++) fRec16[i] = 0;
241 for (int i=0; i<2; i++) fVec3[i] = 0;
242 for (int i=0; i<2; i++) fRec26[i] = 0;
243 for (int i=0; i<2; i++) fRec25[i] = 0;
244 for (int i=0; i<2; i++) fRec24[i] = 0;
245 for (int i=0; i<2; i++) fRec15[i] = 0;
246 for (int i=0; i<2; i++) fRec14[i] = 0;
247 for (int i=0; i<2; i++) fVec4[i] = 0;
248 for (int i=0; i<2; i++) fRec27[i] = 0;
249 for (int i=0; i<2; i++) fRec13[i] = 0;
250 for (int i=0; i<2; i++) fRec12[i] = 0;
251 for (int i=0; i<2; i++) fVec5[i] = 0;
252 for (int i=0; i<2; i++) fRec30[i] = 0;
253 for (int i=0; i<2; i++) fRec29[i] = 0;
254 for (int i=0; i<2; i++) fRec28[i] = 0;
255 for (int i=0; i<2; i++) fRec11[i] = 0;
256 for (int i=0; i<2; i++) fVec6[i] = 0;
257 for (int i=0; i<2; i++) fRec31[i] = 0;
258 for (int i=0; i<2; i++) fRec10[i] = 0;
259 for (int i=0; i<2; i++) fRec9[i] = 0;
260 for (int i=0; i<2; i++) fRec34[i] = 0;
261 for (int i=0; i<32768; i++) fVec7[i] = 0;
262 for (int i=0; i<2; i++) fRec33[i] = 0;
263 for (int i=0; i<2; i++) fRec32[i] = 0;
264 for (int i=0; i<3; i++) fRec42[i] = 0;
265 for (int i=0; i<2; i++) fVec8[i] = 0;
266 for (int i=0; i<2; i++) fRec41[i] = 0;
267 for (int i=0; i<2; i++) fRec40[i] = 0;
268 for (int i=0; i<3; i++) fRec39[i] = 0;
269 for (int i=0; i<2; i++) fVec9[i] = 0;
270 for (int i=0; i<2; i++) fRec38[i] = 0;
271 for (int i=0; i<3; i++) fRec37[i] = 0;
272 for (int i=0; i<3; i++) fRec36[i] = 0;
273 for (int i=0; i<2; i++) fRec46[i] = 0;
274 for (int i=0; i<3; i++) fRec45[i] = 0;
275 for (int i=0; i<2; i++) fVec10[i] = 0;
276 for (int i=0; i<2; i++) fRec44[i] = 0;
277 for (int i=0; i<3; i++) fRec43[i] = 0;
278 for (int i=0; i<2; i++) fRec50[i] = 0;
279 for (int i=0; i<3; i++) fRec49[i] = 0;
280 for (int i=0; i<3; i++) fRec48[i] = 0;
281 for (int i=0; i<3; i++) fRec47[i] = 0;
282 for (int i=0; i<2; i++) fRec52[i] = 0;
283 for (int i=0; i<3; i++) fRec51[i] = 0;
284 for (int i=0; i<2; i++) fVec11[i] = 0;
285 for (int i=0; i<2; i++) fRec35[i] = 0;
286 for (int i=0; i<2; i++) fVec12[i] = 0;
287 for (int i=0; i<2; i++) fRec7[i] = 0;
288 for (int i=0; i<2; i++) fRec4[i] = 0;
289 for (int i=0; i<2; i++) fRec3[i] = 0;
290 for (int i=0; i<2; i++) fVec13[i] = 0;
291 for (int i=0; i<2; i++) fRec55[i] = 0;
292 for (int i=0; i<2; i++) fRec54[i] = 0;
293 for (int i=0; i<2; i++) fRec53[i] = 0;
294 for (int i=0; i<3; i++) fVec14[i] = 0;
295 for (int i=0; i<3; i++) fRec2[i] = 0;
296 for (int i=0; i<3; i++) fRec1[i] = 0;
297 for (int i=0; i<3; i++) fRec0[i] = 0;
298 }
299
300 void Dsp::clear_state_f_static(PluginLV2 *p)
301 {
302 static_cast<Dsp*>(p)->clear_state_f();
303 }
304
305 inline void Dsp::init(uint32_t samplingFreq)
306 {
307 fSamplingFreq = samplingFreq;
308 iConst0 = min(192000, max(1, fSamplingFreq));
309 fConst1 = (31704.95306002819 / iConst0);
310 fConst2 = (2 * cos(fConst1));
311 fConst3 = (0.026178010471204185 * sin(fConst1));
312 fConst4 = (fConst3 - 1);
313 fConst5 = (49574.33207364693 / iConst0);
314 fConst6 = (2 * cos(fConst5));
315 fConst7 = (0.07042253521126761 * sin(fConst5));
316 fConst8 = (fConst7 - 1);
317 fConst9 = (60601.32228774711 / iConst0);
318 fConst10 = (2 * cos(fConst9));
319 fConst11 = (0.03546099290780142 * sin(fConst9));
320 fConst12 = (fConst11 - 1);
321 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
322 fConst14 = (1 + fConst13);
323 fConst15 = (0 - ((1 - fConst13) / fConst14));
324 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
325 fConst17 = (1 + fConst16);
326 fConst18 = (0 - ((1 - fConst16) / fConst17));
327 fConst19 = (1.0 / fConst17);
328 fConst20 = tan((37699.11184307752 / iConst0));
329 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
330 fConst22 = (1.0 / fConst20);
331 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
332 fConst24 = (1 + ((0.7653668647301795 + fConst22) / fConst20));
333 fConst25 = (1.0 / fConst24);
334 fConst26 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
335 fConst27 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
336 fConst28 = (973.8937226128359 / iConst0);
337 fConst29 = (1 - fConst28);
338 fConst30 = (1.0 / (1 + fConst28));
339 fConst31 = (2.0 / fConst24);
340 fConst32 = (1.0 / tan((270.1769682087222 / iConst0)));
341 fConst33 = (1 + fConst32);
342 fConst34 = (0 - ((1 - fConst32) / fConst33));
343 fConst35 = (1.0 / fConst33);
344 fConst36 = (0 - fConst13);
345 fConst37 = (0.1 / fConst14);
346 fConst38 = (1.0 / tan((414.6902302738527 / iConst0)));
347 fConst39 = (1 + fConst38);
348 fConst40 = (0 - ((1 - fConst38) / fConst39));
349 fConst41 = (1.0 / fConst39);
350 fConst42 = (1.0 / tan((609.4689747964198 / iConst0)));
351 fConst43 = (1 + fConst42);
352 fConst44 = (0 - ((1 - fConst42) / fConst43));
353 fConst45 = (1.0 / fConst43);
354 IOTA = 0;
355 iConst46 = int((int((0.1111111111111111 * iConst0)) & 65535));
356 fConst47 = (0.009000000000000008 / iConst0);
357 fConst48 = tan((942.4777960769379 / iConst0));
358 fConst49 = (1.0 / faustpower<2>(fConst48));
359 fConst50 = (2 * (1 - fConst49));
360 fConst51 = (1.0 / fConst48);
361 fConst52 = (1 + ((fConst51 - 1.0) / fConst48));
362 fConst53 = (1.0 / (1 + ((1.0 + fConst51) / fConst48)));
363 fConst54 = tan((3769.9111843077517 / iConst0));
364 fConst55 = (1.0 / faustpower<2>(fConst54));
365 fConst56 = (2 * (1 - fConst55));
366 fConst57 = (1.0 / fConst54);
367 fConst58 = (1 + ((fConst57 - 1.0000000000000004) / fConst54));
368 fConst59 = (1 + ((fConst57 + 1.0000000000000004) / fConst54));
369 fConst60 = (1.0 / fConst59);
370 fConst61 = (1 + fConst57);
371 fConst62 = (0 - ((1 - fConst57) / fConst61));
372 fConst63 = tan((10053.096491487338 / iConst0));
373 fConst64 = (1.0 / faustpower<2>(fConst63));
374 fConst65 = (2 * (1 - fConst64));
375 fConst66 = (1.0 / fConst63);
376 fConst67 = (1 + ((fConst66 - 1.0000000000000004) / fConst63));
377 fConst68 = (1 + ((1.0000000000000004 + fConst66) / fConst63));
378 fConst69 = (1.0 / fConst68);
379 fConst70 = (1 + fConst66);
380 fConst71 = (0 - ((1 - fConst66) / fConst70));
381 fConst72 = tan((47123.8898038469 / iConst0));
382 fConst73 = (2 * (1 - (1.0 / faustpower<2>(fConst72))));
383 fConst74 = (1.0 / fConst72);
384 fConst75 = (1 + ((fConst74 - 1.414213562373095) / fConst72));
385 fConst76 = (1 + ((1.414213562373095 + fConst74) / fConst72));
386 fConst77 = (1.0 / fConst76);
387 fConst78 = (1.0 / (fConst14 * fConst76));
388 fConst79 = (1.0 / fConst70);
389 fConst80 = (0 - fConst57);
390 fConst81 = (1.0 / (fConst61 * fConst68));
391 fConst82 = (2 * (0 - fConst55));
392 fConst83 = (1 + ((fConst51 - 1.0000000000000004) / fConst48));
393 fConst84 = (1.0 / (1 + ((fConst51 + 1.0000000000000004) / fConst48)));
394 fConst85 = (1 + fConst51);
395 fConst86 = (0 - ((1 - fConst51) / fConst85));
396 fConst87 = (0 - fConst51);
397 fConst88 = (1.0 / (fConst85 * fConst59));
398 fConst89 = (2 * (0 - fConst49));
399 fConst90 = (1 + ((fConst57 - 1.0) / fConst54));
400 fConst91 = (1.0 / (1 + ((1.0 + fConst57) / fConst54)));
401 fConst92 = (0 - fConst66);
402 fConst93 = (2 * (0 - fConst64));
403 fConst94 = (0.025 / fConst14);
404 fConst95 = (0 - fConst10);
405 fConst96 = (1.0 / (1 + fConst11));
406 fConst97 = (0 - fConst6);
407 fConst98 = (1.0 / (1 + fConst7));
408 fConst99 = (0 - fConst2);
409 fConst100 = (1.0 / (1 + fConst3));
410 clear_state_f();
411 }
412
413 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
414 {
415 static_cast<Dsp*>(p)->init(samplingFreq);
416 }
417
418 inline void Dsp::compute(int count, float *input0, float *output0)
419 {
420 #define fslider0 (*fslider0_)
421 #define fslider1 (*fslider1_)
422 #define fslider2 (*fslider2_)
423 #define fslider3 (*fslider3_)
424 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
425 double fSlow1 = (1.000000000000001e-05 * fslider1);
426 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
427 double fSlow3 = fslider3;
428 double fSlow4 = (1.25 * fSlow3);
429 double fSlow5 = (2 * (fSlow3 - 0.5));
430 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
431 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
432 double fSlow8 = (fConst84 * pow(1e+01,(2 * fSlow3)));
433 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
434 double fSlow10 = (fConst84 * pow(1e+01,(0.9 * fSlow3)));
435 double fSlow11 = (1 - max(0, (0 - fSlow5)));
436 for (int i=0; i<count; i++) {
437 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
438 fVec0[0] = fTemp0;
439 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
440 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
441 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
442 double fTemp1 = (double)input0[i];
443 fVec1[0] = fTemp1;
444 fRec21[0] = (fConst30 * ((fVec1[0] - fVec1[1]) + (fConst29 * fRec21[1])));
445 fRec20[0] = (fConst30 * ((fRec21[0] - fRec21[1]) + (fConst29 * fRec20[1])));
446 fRec19[0] = (fRec20[0] - (fConst27 * ((fConst26 * fRec19[2]) + (fConst21 * fRec19[1]))));
447 fRec18[0] = ((fConst27 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst25 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
448 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
449 double fTemp2 = (1e-15 + (0.027 * fRec17[1]));
450 fVec2[0] = fTemp2;
451 fRec23[0] = ((fConst35 * (fVec2[0] + fVec2[1])) + (fConst34 * fRec23[1]));
452 fRec17[0] = (Ftube(TUBE_TABLE_12AU7_68k, ((fRec23[0] + (fConst31 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 1.2572399999999988)) - 83.43555555555557);
453 fRec16[0] = ((fConst37 * ((fConst36 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
454 double fTemp3 = (1e-15 + (0.015 * fRec25[1]));
455 fVec3[0] = fTemp3;
456 fRec26[0] = ((fConst41 * (fVec3[0] + fVec3[1])) + (fConst40 * fRec26[1]));
457 fRec25[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec26[0] + fRec15[1]) - 0.776161999999999)) - 78.25586666666666);
458 fRec24[0] = ((fConst37 * ((fConst36 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
459 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
460 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
461 double fTemp4 = (1e-15 + (0.015 * fRec13[1]));
462 fVec4[0] = fTemp4;
463 fRec27[0] = ((fConst41 * (fVec4[0] + fVec4[1])) + (fConst40 * fRec27[1]));
464 fRec13[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec27[0] + fRec14[0]) - 0.776161999999999)) - 78.25586666666666);
465 fRec12[0] = ((fConst37 * ((fConst36 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
466 double fTemp5 = (1e-15 + (0.0082 * fRec29[1]));
467 fVec5[0] = fTemp5;
468 fRec30[0] = ((fConst45 * (fVec5[0] + fVec5[1])) + (fConst44 * fRec30[1]));
469 fRec29[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec30[0] + fRec11[1]) - 0.445486999999999)) - 75.67231707317073);
470 fRec28[0] = ((fConst37 * ((fConst36 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
471 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
472 double fTemp6 = (1e-15 + (0.0082 * fRec10[1]));
473 fVec6[0] = fTemp6;
474 fRec31[0] = ((fConst45 * (fVec6[0] + fVec6[1])) + (fConst44 * fRec31[1]));
475 fRec10[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec31[0] + fRec11[0]) - 0.445486999999999)) - 75.67231707317073);
476 fRec9[0] = ((fConst37 * ((fConst36 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
477 double fTemp7 = (fRec9[0] * (1 - fRec8[0]));
478 double fTemp8 = (fRec9[0] * fRec8[0]);
479 double fTemp9 = fabs(fTemp8);
480 fRec34[0] = ((9.999999999998899e-05 * fTemp9) + (0.9999 * fRec34[1]));
481 double fTemp10 = max(fRec34[0], fTemp9);
482 fVec7[IOTA&32767] = fTemp10;
483 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst46)&32767]);
484 fRec32[0] = ((fConst47 * fRec33[0]) + (0.999 * fRec32[1]));
485 double fTemp11 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
486 double fTemp12 = (0 - fTemp11);
487 double fTemp13 = (40.1 * fTemp12);
488 double fTemp14 = max(-600, fTemp13);
489 double fTemp15 = (0 - fTemp14);
490 double fTemp16 = (fTemp8 - fTemp11);
491 double fTemp17 = (40.1 * fTemp16);
492 double fTemp18 = max(-600, fTemp17);
493 double fTemp19 = (0 - fTemp18);
494 double fTemp20 = (((int((fabs(fTemp17) > 0.0001)))?((int((fTemp18 < -50)))?(exp(fTemp18) * fTemp19):(fTemp18 / (1 - exp(fTemp19)))):(1 + (fTemp16 * (20.05 + (134.00083333333336 * fTemp16))))) - ((int((fabs(fTemp13) > 0.0001)))?((int((fTemp14 < -50)))?(exp(fTemp14) * fTemp15):(fTemp14 / (1 - exp(fTemp15)))):(1 + (fTemp12 * (20.05 + (134.00083333333336 * fTemp12))))));
495 double fTemp21 = (fConst50 * fRec36[1]);
496 fRec42[0] = ((0.024937655860349125 * fTemp20) - (fConst77 * ((fConst75 * fRec42[2]) + (fConst73 * fRec42[1]))));
497 double fTemp22 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
498 fVec8[0] = fTemp22;
499 fRec41[0] = ((fConst78 * ((fConst36 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
500 fRec40[0] = ((fConst79 * (fRec41[0] + fRec41[1])) + (fConst71 * fRec40[1]));
501 fRec39[0] = (fRec40[0] - (fConst69 * ((fConst67 * fRec39[2]) + (fConst65 * fRec39[1]))));
502 double fTemp23 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
503 fVec9[0] = fTemp23;
504 fRec38[0] = ((fConst81 * ((fConst80 * fVec9[1]) + (fConst57 * fVec9[0]))) + (fConst62 * fRec38[1]));
505 fRec37[0] = (fRec38[0] - (fConst60 * ((fConst58 * fRec37[2]) + (fConst56 * fRec37[1]))));
506 fRec36[0] = ((fConst60 * (((fConst55 * fRec37[0]) + (fConst82 * fRec37[1])) + (fConst55 * fRec37[2]))) - (fConst53 * ((fConst52 * fRec36[2]) + fTemp21)));
507 double fTemp24 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst53 * (fTemp21 + (fConst52 * fRec36[0])))))));
508 fRec46[0] = ((fConst81 * (fVec9[0] + fVec9[1])) + (fConst62 * fRec46[1]));
509 fRec45[0] = (fRec46[0] - (fConst60 * ((fConst58 * fRec45[2]) + (fConst56 * fRec45[1]))));
510 double fTemp25 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
511 fVec10[0] = fTemp25;
512 fRec44[0] = ((fConst88 * ((fConst87 * fVec10[1]) + (fConst51 * fVec10[0]))) + (fConst86 * fRec44[1]));
513 fRec43[0] = (fRec44[0] - (fConst84 * ((fConst83 * fRec43[2]) + (fConst50 * fRec43[1]))));
514 double fTemp26 = max(-1, min(1, (fSlow8 * (((fConst49 * fRec43[0]) + (fConst89 * fRec43[1])) + (fConst49 * fRec43[2])))));
515 double fTemp27 = (fConst50 * fRec47[1]);
516 double fTemp28 = (fConst56 * fRec48[1]);
517 fRec50[0] = ((fConst79 * ((fConst92 * fRec41[1]) + (fConst66 * fRec41[0]))) + (fConst71 * fRec50[1]));
518 fRec49[0] = (fRec50[0] - (fConst69 * ((fConst67 * fRec49[2]) + (fConst65 * fRec49[1]))));
519 fRec48[0] = ((fConst69 * (((fConst64 * fRec49[0]) + (fConst93 * fRec49[1])) + (fConst64 * fRec49[2]))) - (fConst91 * ((fConst90 * fRec48[2]) + fTemp28)));
520 fRec47[0] = ((fRec48[2] + (fConst91 * (fTemp28 + (fConst90 * fRec48[0])))) - (fConst53 * ((fConst52 * fRec47[2]) + fTemp27)));
521 double fTemp29 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst53 * (fTemp27 + (fConst52 * fRec47[0])))))));
522 fRec52[0] = ((fConst88 * (fVec10[0] + fVec10[1])) + (fConst86 * fRec52[1]));
523 fRec51[0] = (fRec52[0] - (fConst84 * ((fConst83 * fRec51[2]) + (fConst50 * fRec51[1]))));
524 double fTemp30 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
525 double fTemp31 = ((1.2589412 * (fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30))))) + (1.584893192 * ((fTemp29 * (1 - (0.3333333333333333 * faustpower<2>(fTemp29)))) + ((fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26)))) + (0.8413951417869425 * (fTemp24 * (1 - (0.3333333333333333 * faustpower<2>(fTemp24)))))))));
526 fVec11[0] = fTemp31;
527 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
528 double fTemp32 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp20)) + (fTemp7 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp7))) - 1)))));
529 fVec12[0] = fTemp32;
530 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
531 double fTemp33 = (fRec7[0] * fRec6[0]);
532 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp33 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
533 fRec3[0] = ((fConst94 * ((fConst36 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
534 double fTemp34 = (1e-15 + (0.0041 * fRec54[1]));
535 fVec13[0] = fTemp34;
536 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
537 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp33) - 0.659760999999999)) - 89.08268292682925);
538 fRec53[0] = ((fConst94 * ((fConst36 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
539 double fTemp35 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
540 fVec14[0] = fTemp35;
541 fRec2[0] = (fConst96 * ((fVec14[2] + (fVec14[0] + (fConst95 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
542 fRec1[0] = (fConst98 * ((fRec2[2] + (fRec2[0] + (fConst97 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
543 fRec0[0] = (fConst100 * ((fRec1[2] + (fRec1[0] + (fConst99 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
544 output0[i] = (FAUSTFLOAT)fRec0[0];
545 // post processing
546 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
547 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
548 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
549 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
550 fRec53[1] = fRec53[0];
551 fRec54[1] = fRec54[0];
552 fRec55[1] = fRec55[0];
553 fVec13[1] = fVec13[0];
554 fRec3[1] = fRec3[0];
555 fRec4[1] = fRec4[0];
556 fRec7[1] = fRec7[0];
557 fVec12[1] = fVec12[0];
558 fRec35[1] = fRec35[0];
559 fVec11[1] = fVec11[0];
560 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
561 fRec52[1] = fRec52[0];
562 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
563 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
564 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
565 fRec50[1] = fRec50[0];
566 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
567 fRec44[1] = fRec44[0];
568 fVec10[1] = fVec10[0];
569 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
570 fRec46[1] = fRec46[0];
571 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
572 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
573 fRec38[1] = fRec38[0];
574 fVec9[1] = fVec9[0];
575 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
576 fRec40[1] = fRec40[0];
577 fRec41[1] = fRec41[0];
578 fVec8[1] = fVec8[0];
579 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
580 fRec32[1] = fRec32[0];
581 fRec33[1] = fRec33[0];
582 IOTA = IOTA+1;
583 fRec34[1] = fRec34[0];
584 fRec9[1] = fRec9[0];
585 fRec10[1] = fRec10[0];
586 fRec31[1] = fRec31[0];
587 fVec6[1] = fVec6[0];
588 fRec11[1] = fRec11[0];
589 fRec28[1] = fRec28[0];
590 fRec29[1] = fRec29[0];
591 fRec30[1] = fRec30[0];
592 fVec5[1] = fVec5[0];
593 fRec12[1] = fRec12[0];
594 fRec13[1] = fRec13[0];
595 fRec27[1] = fRec27[0];
596 fVec4[1] = fVec4[0];
597 fRec14[1] = fRec14[0];
598 fRec15[1] = fRec15[0];
599 fRec24[1] = fRec24[0];
600 fRec25[1] = fRec25[0];
601 fRec26[1] = fRec26[0];
602 fVec3[1] = fVec3[0];
603 fRec16[1] = fRec16[0];
604 fRec17[1] = fRec17[0];
605 fRec23[1] = fRec23[0];
606 fVec2[1] = fVec2[0];
607 fRec22[1] = fRec22[0];
608 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
609 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
610 fRec20[1] = fRec20[0];
611 fRec21[1] = fRec21[0];
612 fVec1[1] = fVec1[0];
613 fRec8[1] = fRec8[0];
614 fRec6[1] = fRec6[0];
615 fRec5[1] = fRec5[0];
616 fVec0[1] = fVec0[0];
617 }
618 #undef fslider0
619 #undef fslider1
620 #undef fslider2
621 #undef fslider3
622 }
623
624 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
625 {
626 static_cast<Dsp*>(p)->compute(count, input0, output0);
627 }
628
629
630 void Dsp::connect(uint32_t port,void* data)
631 {
632 switch ((PortIndex)port)
633 {
634 case DRIVE:
635 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
636 break;
637 case PREGAIN:
638 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
639 break;
640 case WET_DRY:
641 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
642 break;
643 case GAIN1:
644 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
645 break;
646 default:
647 break;
648 }
649 }
650
651 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
652 {
653 static_cast<Dsp*>(p)->connect(port, data);
654 }
655
656
657 PluginLV2 *plugin() {
658 return new Dsp();
659 }
660
661 void Dsp::del_instance(PluginLV2 *p)
662 {
663 delete static_cast<Dsp*>(p);
664 }
665
666 /*
667 typedef enum
668 {
669 DRIVE,
670 PREGAIN,
671 WET_DRY,
672 GAIN1,
673 } PortIndex;
674 */
675
676 } // end namespace gxamp8
0 // generated from file '../src/LV2/faust/gxamp8_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp8_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 double fConst7;
18 double fConst8;
19 double fConst9;
20 double fConst10;
21 double fConst11;
22 double fConst12;
23 double fConst13;
24 double fConst14;
25 double fConst15;
26 double fConst16;
27 double fConst17;
28 double fConst18;
29 double fVec0[2];
30 double fConst19;
31 double fRec5[2];
32 FAUSTFLOAT fslider0;
33 FAUSTFLOAT *fslider0_;
34 double fRec6[2];
35 FAUSTFLOAT fslider1;
36 FAUSTFLOAT *fslider1_;
37 double fRec8[2];
38 double fConst20;
39 double fConst21;
40 double fConst22;
41 double fConst23;
42 double fConst24;
43 double fConst25;
44 double fConst26;
45 double fConst27;
46 double fConst28;
47 double fConst29;
48 double fVec1[2];
49 double fConst30;
50 double fRec21[2];
51 double fRec20[2];
52 double fRec19[3];
53 double fRec18[3];
54 FAUSTFLOAT fslider2;
55 FAUSTFLOAT *fslider2_;
56 double fRec22[2];
57 double fConst31;
58 double fConst32;
59 double fConst33;
60 double fConst34;
61 double fVec2[2];
62 double fConst35;
63 double fRec23[2];
64 double fRec17[2];
65 double fConst36;
66 double fConst37;
67 double fRec16[2];
68 double fConst38;
69 double fConst39;
70 double fConst40;
71 double fVec3[2];
72 double fConst41;
73 double fRec26[2];
74 double fRec25[2];
75 double fRec24[2];
76 double fRec15[2];
77 double fRec14[2];
78 double fVec4[2];
79 double fRec27[2];
80 double fRec13[2];
81 double fRec12[2];
82 double fConst42;
83 double fConst43;
84 double fConst44;
85 double fVec5[2];
86 double fConst45;
87 double fRec30[2];
88 double fRec29[2];
89 double fRec28[2];
90 double fRec11[2];
91 double fVec6[2];
92 double fRec31[2];
93 double fRec10[2];
94 double fRec9[2];
95 FAUSTFLOAT fslider3;
96 FAUSTFLOAT *fslider3_;
97 double fRec34[2];
98 int IOTA;
99 double fVec7[32768];
100 int iConst46;
101 double fRec33[2];
102 double fConst47;
103 double fRec32[2];
104 double fConst48;
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fConst53;
110 double fConst54;
111 double fConst55;
112 double fConst56;
113 double fConst57;
114 double fConst58;
115 double fConst59;
116 double fConst60;
117 double fConst61;
118 double fConst62;
119 double fConst63;
120 double fConst64;
121 double fConst65;
122 double fConst66;
123 double fConst67;
124 double fConst68;
125 double fConst69;
126 double fConst70;
127 double fConst71;
128 double fConst72;
129 double fConst73;
130 double fConst74;
131 double fConst75;
132 double fConst76;
133 double fConst77;
134 double fRec42[3];
135 double fVec8[2];
136 double fConst78;
137 double fRec41[2];
138 double fConst79;
139 double fRec40[2];
140 double fRec39[3];
141 double fVec9[2];
142 double fConst80;
143 double fConst81;
144 double fRec38[2];
145 double fRec37[3];
146 double fConst82;
147 double fRec36[3];
148 double fConst83;
149 double fConst84;
150 double fConst85;
151 double fConst86;
152 double fRec46[2];
153 double fRec45[3];
154 double fVec10[2];
155 double fConst87;
156 double fConst88;
157 double fRec44[2];
158 double fRec43[3];
159 double fConst89;
160 double fConst90;
161 double fConst91;
162 double fConst92;
163 double fRec50[2];
164 double fRec49[3];
165 double fConst93;
166 double fRec48[3];
167 double fRec47[3];
168 double fRec52[2];
169 double fRec51[3];
170 double fVec11[2];
171 double fRec35[2];
172 double fVec12[2];
173 double fRec7[2];
174 double fRec4[2];
175 double fConst94;
176 double fRec3[2];
177 double fVec13[2];
178 double fRec55[2];
179 double fRec54[2];
180 double fRec53[2];
181 double fVec14[3];
182 double fConst95;
183 double fConst96;
184 double fRec2[3];
185 double fConst97;
186 double fConst98;
187 double fRec1[3];
188 double fConst99;
189 double fConst100;
190 double fRec0[3];
191 double fVec15[2];
192 double fRec74[2];
193 double fRec73[2];
194 double fRec72[3];
195 double fRec71[3];
196 double fVec16[2];
197 double fRec75[2];
198 double fRec70[2];
199 double fRec69[2];
200 double fVec17[2];
201 double fRec78[2];
202 double fRec77[2];
203 double fRec76[2];
204 double fRec68[2];
205 double fRec67[2];
206 double fVec18[2];
207 double fRec79[2];
208 double fRec66[2];
209 double fRec65[2];
210 double fVec19[2];
211 double fRec82[2];
212 double fRec81[2];
213 double fRec80[2];
214 double fRec64[2];
215 double fVec20[2];
216 double fRec83[2];
217 double fRec63[2];
218 double fRec62[2];
219 double fRec86[2];
220 double fVec21[32768];
221 double fRec85[2];
222 double fRec84[2];
223 double fRec94[3];
224 double fVec22[2];
225 double fRec93[2];
226 double fRec92[2];
227 double fRec91[3];
228 double fVec23[2];
229 double fRec90[2];
230 double fRec89[3];
231 double fRec88[3];
232 double fRec98[2];
233 double fRec97[3];
234 double fVec24[2];
235 double fRec96[2];
236 double fRec95[3];
237 double fRec102[2];
238 double fRec101[3];
239 double fRec100[3];
240 double fRec99[3];
241 double fRec104[2];
242 double fRec103[3];
243 double fVec25[2];
244 double fRec87[2];
245 double fVec26[2];
246 double fRec61[2];
247 double fVec27[2];
248 double fRec105[2];
249 double fRec60[2];
250 double fRec59[2];
251 double fVec28[2];
252 double fRec108[2];
253 double fRec107[2];
254 double fRec106[2];
255 double fVec29[3];
256 double fRec58[3];
257 double fRec57[3];
258 double fRec56[3];
259 void connect(uint32_t port,void* data);
260 void clear_state_f();
261 void init(uint32_t samplingFreq);
262 void compute(int count, float *input0, float *input1, float *output0, float *output1);
263
264 static void clear_state_f_static(PluginLV2*);
265 static void init_static(uint32_t samplingFreq, PluginLV2*);
266 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
267 static void del_instance(PluginLV2 *p);
268 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
269 public:
270 Dsp();
271 ~Dsp();
272 };
273
274
275
276 Dsp::Dsp()
277 : PluginLV2() {
278 version = PLUGINLV2_VERSION;
279 id = "pre 12AU7/ push-pull 6V6";
280 name = N_("pre 12AU7/ push-pull 6V6");
281 mono_audio = 0;
282 stereo_audio = compute_static;
283 set_samplerate = init_static;
284 activate_plugin = 0;
285 connect_ports = connect_static;
286 clear_state = clear_state_f_static;
287 delete_instance = del_instance;
288 }
289
290 Dsp::~Dsp() {
291 }
292
293 inline void Dsp::clear_state_f()
294 {
295 for (int i=0; i<2; i++) fVec0[i] = 0;
296 for (int i=0; i<2; i++) fRec5[i] = 0;
297 for (int i=0; i<2; i++) fRec6[i] = 0;
298 for (int i=0; i<2; i++) fRec8[i] = 0;
299 for (int i=0; i<2; i++) fVec1[i] = 0;
300 for (int i=0; i<2; i++) fRec21[i] = 0;
301 for (int i=0; i<2; i++) fRec20[i] = 0;
302 for (int i=0; i<3; i++) fRec19[i] = 0;
303 for (int i=0; i<3; i++) fRec18[i] = 0;
304 for (int i=0; i<2; i++) fRec22[i] = 0;
305 for (int i=0; i<2; i++) fVec2[i] = 0;
306 for (int i=0; i<2; i++) fRec23[i] = 0;
307 for (int i=0; i<2; i++) fRec17[i] = 0;
308 for (int i=0; i<2; i++) fRec16[i] = 0;
309 for (int i=0; i<2; i++) fVec3[i] = 0;
310 for (int i=0; i<2; i++) fRec26[i] = 0;
311 for (int i=0; i<2; i++) fRec25[i] = 0;
312 for (int i=0; i<2; i++) fRec24[i] = 0;
313 for (int i=0; i<2; i++) fRec15[i] = 0;
314 for (int i=0; i<2; i++) fRec14[i] = 0;
315 for (int i=0; i<2; i++) fVec4[i] = 0;
316 for (int i=0; i<2; i++) fRec27[i] = 0;
317 for (int i=0; i<2; i++) fRec13[i] = 0;
318 for (int i=0; i<2; i++) fRec12[i] = 0;
319 for (int i=0; i<2; i++) fVec5[i] = 0;
320 for (int i=0; i<2; i++) fRec30[i] = 0;
321 for (int i=0; i<2; i++) fRec29[i] = 0;
322 for (int i=0; i<2; i++) fRec28[i] = 0;
323 for (int i=0; i<2; i++) fRec11[i] = 0;
324 for (int i=0; i<2; i++) fVec6[i] = 0;
325 for (int i=0; i<2; i++) fRec31[i] = 0;
326 for (int i=0; i<2; i++) fRec10[i] = 0;
327 for (int i=0; i<2; i++) fRec9[i] = 0;
328 for (int i=0; i<2; i++) fRec34[i] = 0;
329 for (int i=0; i<32768; i++) fVec7[i] = 0;
330 for (int i=0; i<2; i++) fRec33[i] = 0;
331 for (int i=0; i<2; i++) fRec32[i] = 0;
332 for (int i=0; i<3; i++) fRec42[i] = 0;
333 for (int i=0; i<2; i++) fVec8[i] = 0;
334 for (int i=0; i<2; i++) fRec41[i] = 0;
335 for (int i=0; i<2; i++) fRec40[i] = 0;
336 for (int i=0; i<3; i++) fRec39[i] = 0;
337 for (int i=0; i<2; i++) fVec9[i] = 0;
338 for (int i=0; i<2; i++) fRec38[i] = 0;
339 for (int i=0; i<3; i++) fRec37[i] = 0;
340 for (int i=0; i<3; i++) fRec36[i] = 0;
341 for (int i=0; i<2; i++) fRec46[i] = 0;
342 for (int i=0; i<3; i++) fRec45[i] = 0;
343 for (int i=0; i<2; i++) fVec10[i] = 0;
344 for (int i=0; i<2; i++) fRec44[i] = 0;
345 for (int i=0; i<3; i++) fRec43[i] = 0;
346 for (int i=0; i<2; i++) fRec50[i] = 0;
347 for (int i=0; i<3; i++) fRec49[i] = 0;
348 for (int i=0; i<3; i++) fRec48[i] = 0;
349 for (int i=0; i<3; i++) fRec47[i] = 0;
350 for (int i=0; i<2; i++) fRec52[i] = 0;
351 for (int i=0; i<3; i++) fRec51[i] = 0;
352 for (int i=0; i<2; i++) fVec11[i] = 0;
353 for (int i=0; i<2; i++) fRec35[i] = 0;
354 for (int i=0; i<2; i++) fVec12[i] = 0;
355 for (int i=0; i<2; i++) fRec7[i] = 0;
356 for (int i=0; i<2; i++) fRec4[i] = 0;
357 for (int i=0; i<2; i++) fRec3[i] = 0;
358 for (int i=0; i<2; i++) fVec13[i] = 0;
359 for (int i=0; i<2; i++) fRec55[i] = 0;
360 for (int i=0; i<2; i++) fRec54[i] = 0;
361 for (int i=0; i<2; i++) fRec53[i] = 0;
362 for (int i=0; i<3; i++) fVec14[i] = 0;
363 for (int i=0; i<3; i++) fRec2[i] = 0;
364 for (int i=0; i<3; i++) fRec1[i] = 0;
365 for (int i=0; i<3; i++) fRec0[i] = 0;
366 for (int i=0; i<2; i++) fVec15[i] = 0;
367 for (int i=0; i<2; i++) fRec74[i] = 0;
368 for (int i=0; i<2; i++) fRec73[i] = 0;
369 for (int i=0; i<3; i++) fRec72[i] = 0;
370 for (int i=0; i<3; i++) fRec71[i] = 0;
371 for (int i=0; i<2; i++) fVec16[i] = 0;
372 for (int i=0; i<2; i++) fRec75[i] = 0;
373 for (int i=0; i<2; i++) fRec70[i] = 0;
374 for (int i=0; i<2; i++) fRec69[i] = 0;
375 for (int i=0; i<2; i++) fVec17[i] = 0;
376 for (int i=0; i<2; i++) fRec78[i] = 0;
377 for (int i=0; i<2; i++) fRec77[i] = 0;
378 for (int i=0; i<2; i++) fRec76[i] = 0;
379 for (int i=0; i<2; i++) fRec68[i] = 0;
380 for (int i=0; i<2; i++) fRec67[i] = 0;
381 for (int i=0; i<2; i++) fVec18[i] = 0;
382 for (int i=0; i<2; i++) fRec79[i] = 0;
383 for (int i=0; i<2; i++) fRec66[i] = 0;
384 for (int i=0; i<2; i++) fRec65[i] = 0;
385 for (int i=0; i<2; i++) fVec19[i] = 0;
386 for (int i=0; i<2; i++) fRec82[i] = 0;
387 for (int i=0; i<2; i++) fRec81[i] = 0;
388 for (int i=0; i<2; i++) fRec80[i] = 0;
389 for (int i=0; i<2; i++) fRec64[i] = 0;
390 for (int i=0; i<2; i++) fVec20[i] = 0;
391 for (int i=0; i<2; i++) fRec83[i] = 0;
392 for (int i=0; i<2; i++) fRec63[i] = 0;
393 for (int i=0; i<2; i++) fRec62[i] = 0;
394 for (int i=0; i<2; i++) fRec86[i] = 0;
395 for (int i=0; i<32768; i++) fVec21[i] = 0;
396 for (int i=0; i<2; i++) fRec85[i] = 0;
397 for (int i=0; i<2; i++) fRec84[i] = 0;
398 for (int i=0; i<3; i++) fRec94[i] = 0;
399 for (int i=0; i<2; i++) fVec22[i] = 0;
400 for (int i=0; i<2; i++) fRec93[i] = 0;
401 for (int i=0; i<2; i++) fRec92[i] = 0;
402 for (int i=0; i<3; i++) fRec91[i] = 0;
403 for (int i=0; i<2; i++) fVec23[i] = 0;
404 for (int i=0; i<2; i++) fRec90[i] = 0;
405 for (int i=0; i<3; i++) fRec89[i] = 0;
406 for (int i=0; i<3; i++) fRec88[i] = 0;
407 for (int i=0; i<2; i++) fRec98[i] = 0;
408 for (int i=0; i<3; i++) fRec97[i] = 0;
409 for (int i=0; i<2; i++) fVec24[i] = 0;
410 for (int i=0; i<2; i++) fRec96[i] = 0;
411 for (int i=0; i<3; i++) fRec95[i] = 0;
412 for (int i=0; i<2; i++) fRec102[i] = 0;
413 for (int i=0; i<3; i++) fRec101[i] = 0;
414 for (int i=0; i<3; i++) fRec100[i] = 0;
415 for (int i=0; i<3; i++) fRec99[i] = 0;
416 for (int i=0; i<2; i++) fRec104[i] = 0;
417 for (int i=0; i<3; i++) fRec103[i] = 0;
418 for (int i=0; i<2; i++) fVec25[i] = 0;
419 for (int i=0; i<2; i++) fRec87[i] = 0;
420 for (int i=0; i<2; i++) fVec26[i] = 0;
421 for (int i=0; i<2; i++) fRec61[i] = 0;
422 for (int i=0; i<2; i++) fVec27[i] = 0;
423 for (int i=0; i<2; i++) fRec105[i] = 0;
424 for (int i=0; i<2; i++) fRec60[i] = 0;
425 for (int i=0; i<2; i++) fRec59[i] = 0;
426 for (int i=0; i<2; i++) fVec28[i] = 0;
427 for (int i=0; i<2; i++) fRec108[i] = 0;
428 for (int i=0; i<2; i++) fRec107[i] = 0;
429 for (int i=0; i<2; i++) fRec106[i] = 0;
430 for (int i=0; i<3; i++) fVec29[i] = 0;
431 for (int i=0; i<3; i++) fRec58[i] = 0;
432 for (int i=0; i<3; i++) fRec57[i] = 0;
433 for (int i=0; i<3; i++) fRec56[i] = 0;
434 }
435
436 void Dsp::clear_state_f_static(PluginLV2 *p)
437 {
438 static_cast<Dsp*>(p)->clear_state_f();
439 }
440
441 inline void Dsp::init(uint32_t samplingFreq)
442 {
443 fSamplingFreq = samplingFreq;
444 iConst0 = min(192000, max(1, fSamplingFreq));
445 fConst1 = (31704.95306002819 / iConst0);
446 fConst2 = (2 * cos(fConst1));
447 fConst3 = (0.026178010471204185 * sin(fConst1));
448 fConst4 = (fConst3 - 1);
449 fConst5 = (49574.33207364693 / iConst0);
450 fConst6 = (2 * cos(fConst5));
451 fConst7 = (0.07042253521126761 * sin(fConst5));
452 fConst8 = (fConst7 - 1);
453 fConst9 = (60601.32228774711 / iConst0);
454 fConst10 = (2 * cos(fConst9));
455 fConst11 = (0.03546099290780142 * sin(fConst9));
456 fConst12 = (fConst11 - 1);
457 fConst13 = (1.0 / tan((97.38937226128358 / iConst0)));
458 fConst14 = (1 + fConst13);
459 fConst15 = (0 - ((1 - fConst13) / fConst14));
460 fConst16 = (1.0 / tan((20517.741620594938 / iConst0)));
461 fConst17 = (1 + fConst16);
462 fConst18 = (0 - ((1 - fConst16) / fConst17));
463 fConst19 = (1.0 / fConst17);
464 fConst20 = tan((37699.11184307752 / iConst0));
465 fConst21 = (2 * (1 - (1.0 / faustpower<2>(fConst20))));
466 fConst22 = (1.0 / fConst20);
467 fConst23 = (1 + ((fConst22 - 0.7653668647301795) / fConst20));
468 fConst24 = (1 + ((0.7653668647301795 + fConst22) / fConst20));
469 fConst25 = (1.0 / fConst24);
470 fConst26 = (1 + ((fConst22 - 1.8477590650225735) / fConst20));
471 fConst27 = (1.0 / (1 + ((fConst22 + 1.8477590650225735) / fConst20)));
472 fConst28 = (973.8937226128359 / iConst0);
473 fConst29 = (1 - fConst28);
474 fConst30 = (1.0 / (1 + fConst28));
475 fConst31 = (2.0 / fConst24);
476 fConst32 = (1.0 / tan((270.1769682087222 / iConst0)));
477 fConst33 = (1 + fConst32);
478 fConst34 = (0 - ((1 - fConst32) / fConst33));
479 fConst35 = (1.0 / fConst33);
480 fConst36 = (0 - fConst13);
481 fConst37 = (0.1 / fConst14);
482 fConst38 = (1.0 / tan((414.6902302738527 / iConst0)));
483 fConst39 = (1 + fConst38);
484 fConst40 = (0 - ((1 - fConst38) / fConst39));
485 fConst41 = (1.0 / fConst39);
486 fConst42 = (1.0 / tan((609.4689747964198 / iConst0)));
487 fConst43 = (1 + fConst42);
488 fConst44 = (0 - ((1 - fConst42) / fConst43));
489 fConst45 = (1.0 / fConst43);
490 IOTA = 0;
491 iConst46 = int((int((0.1111111111111111 * iConst0)) & 65535));
492 fConst47 = (0.009000000000000008 / iConst0);
493 fConst48 = tan((942.4777960769379 / iConst0));
494 fConst49 = (1.0 / faustpower<2>(fConst48));
495 fConst50 = (2 * (1 - fConst49));
496 fConst51 = (1.0 / fConst48);
497 fConst52 = (1 + ((fConst51 - 1.0) / fConst48));
498 fConst53 = (1.0 / (1 + ((1.0 + fConst51) / fConst48)));
499 fConst54 = tan((3769.9111843077517 / iConst0));
500 fConst55 = (1.0 / faustpower<2>(fConst54));
501 fConst56 = (2 * (1 - fConst55));
502 fConst57 = (1.0 / fConst54);
503 fConst58 = (1 + ((fConst57 - 1.0000000000000004) / fConst54));
504 fConst59 = (1 + ((fConst57 + 1.0000000000000004) / fConst54));
505 fConst60 = (1.0 / fConst59);
506 fConst61 = (1 + fConst57);
507 fConst62 = (0 - ((1 - fConst57) / fConst61));
508 fConst63 = tan((10053.096491487338 / iConst0));
509 fConst64 = (1.0 / faustpower<2>(fConst63));
510 fConst65 = (2 * (1 - fConst64));
511 fConst66 = (1.0 / fConst63);
512 fConst67 = (1 + ((fConst66 - 1.0000000000000004) / fConst63));
513 fConst68 = (1 + ((1.0000000000000004 + fConst66) / fConst63));
514 fConst69 = (1.0 / fConst68);
515 fConst70 = (1 + fConst66);
516 fConst71 = (0 - ((1 - fConst66) / fConst70));
517 fConst72 = tan((47123.8898038469 / iConst0));
518 fConst73 = (2 * (1 - (1.0 / faustpower<2>(fConst72))));
519 fConst74 = (1.0 / fConst72);
520 fConst75 = (1 + ((fConst74 - 1.414213562373095) / fConst72));
521 fConst76 = (1 + ((1.414213562373095 + fConst74) / fConst72));
522 fConst77 = (1.0 / fConst76);
523 fConst78 = (1.0 / (fConst14 * fConst76));
524 fConst79 = (1.0 / fConst70);
525 fConst80 = (0 - fConst57);
526 fConst81 = (1.0 / (fConst61 * fConst68));
527 fConst82 = (2 * (0 - fConst55));
528 fConst83 = (1 + ((fConst51 - 1.0000000000000004) / fConst48));
529 fConst84 = (1.0 / (1 + ((fConst51 + 1.0000000000000004) / fConst48)));
530 fConst85 = (1 + fConst51);
531 fConst86 = (0 - ((1 - fConst51) / fConst85));
532 fConst87 = (0 - fConst51);
533 fConst88 = (1.0 / (fConst85 * fConst59));
534 fConst89 = (2 * (0 - fConst49));
535 fConst90 = (1 + ((fConst57 - 1.0) / fConst54));
536 fConst91 = (1.0 / (1 + ((1.0 + fConst57) / fConst54)));
537 fConst92 = (0 - fConst66);
538 fConst93 = (2 * (0 - fConst64));
539 fConst94 = (0.025 / fConst14);
540 fConst95 = (0 - fConst10);
541 fConst96 = (1.0 / (1 + fConst11));
542 fConst97 = (0 - fConst6);
543 fConst98 = (1.0 / (1 + fConst7));
544 fConst99 = (0 - fConst2);
545 fConst100 = (1.0 / (1 + fConst3));
546 clear_state_f();
547 }
548
549 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
550 {
551 static_cast<Dsp*>(p)->init(samplingFreq);
552 }
553
554 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
555 {
556 #define fslider0 (*fslider0_)
557 #define fslider1 (*fslider1_)
558 #define fslider2 (*fslider2_)
559 #define fslider3 (*fslider3_)
560 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
561 double fSlow1 = (1.000000000000001e-05 * fslider1);
562 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
563 double fSlow3 = fslider3;
564 double fSlow4 = (1.25 * fSlow3);
565 double fSlow5 = (2 * (fSlow3 - 0.5));
566 double fSlow6 = (0.024937655860349125 * (1 - max(0, fSlow5)));
567 double fSlow7 = pow(1e+01,(1.2 * fSlow3));
568 double fSlow8 = (fConst84 * pow(1e+01,(2 * fSlow3)));
569 double fSlow9 = pow(1e+01,(0.8 * fSlow3));
570 double fSlow10 = (fConst84 * pow(1e+01,(0.9 * fSlow3)));
571 double fSlow11 = (1 - max(0, (0 - fSlow5)));
572 for (int i=0; i<count; i++) {
573 double fTemp0 = (1e-15 + (0.0041 * fRec4[1]));
574 fVec0[0] = fTemp0;
575 fRec5[0] = ((fConst19 * (fVec0[0] + fVec0[1])) + (fConst18 * fRec5[1]));
576 fRec6[0] = (fSlow0 + (0.999 * fRec6[1]));
577 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
578 double fTemp1 = (1 - fRec8[0]);
579 double fTemp2 = (double)input0[i];
580 fVec1[0] = fTemp2;
581 fRec21[0] = (fConst30 * ((fVec1[0] - fVec1[1]) + (fConst29 * fRec21[1])));
582 fRec20[0] = (fConst30 * ((fRec21[0] - fRec21[1]) + (fConst29 * fRec20[1])));
583 fRec19[0] = (fRec20[0] - (fConst27 * ((fConst26 * fRec19[2]) + (fConst21 * fRec19[1]))));
584 fRec18[0] = ((fConst27 * (fRec19[2] + (fRec19[0] + (2 * fRec19[1])))) - (fConst25 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
585 fRec22[0] = (fSlow2 + (0.999 * fRec22[1]));
586 double fTemp3 = (1e-15 + (0.027 * fRec17[1]));
587 fVec2[0] = fTemp3;
588 fRec23[0] = ((fConst35 * (fVec2[0] + fVec2[1])) + (fConst34 * fRec23[1]));
589 fRec17[0] = (Ftube(TUBE_TABLE_12AU7_68k, ((fRec23[0] + (fConst31 * (fRec22[0] * (fRec18[2] + (fRec18[0] + (2 * fRec18[1])))))) - 1.2572399999999988)) - 83.43555555555557);
590 fRec16[0] = ((fConst37 * ((fConst36 * fRec17[1]) + (fConst13 * fRec17[0]))) + (fConst15 * fRec16[1]));
591 double fTemp4 = (1e-15 + (0.015 * fRec25[1]));
592 fVec3[0] = fTemp4;
593 fRec26[0] = ((fConst41 * (fVec3[0] + fVec3[1])) + (fConst40 * fRec26[1]));
594 fRec25[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec26[0] + fRec15[1]) - 0.776161999999999)) - 78.25586666666666);
595 fRec24[0] = ((fConst37 * ((fConst36 * fRec25[1]) + (fConst13 * fRec25[0]))) + (fConst15 * fRec24[1]));
596 fRec15[0] = ((0.6 * fRec24[0]) + fRec16[0]);
597 fRec14[0] = ((fConst19 * (fRec15[0] + fRec15[1])) + (fConst18 * fRec14[1]));
598 double fTemp5 = (1e-15 + (0.015 * fRec13[1]));
599 fVec4[0] = fTemp5;
600 fRec27[0] = ((fConst41 * (fVec4[0] + fVec4[1])) + (fConst40 * fRec27[1]));
601 fRec13[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec27[0] + fRec14[0]) - 0.776161999999999)) - 78.25586666666666);
602 fRec12[0] = ((fConst37 * ((fConst36 * fRec13[1]) + (fConst13 * fRec13[0]))) + (fConst15 * fRec12[1]));
603 double fTemp6 = (1e-15 + (0.0082 * fRec29[1]));
604 fVec5[0] = fTemp6;
605 fRec30[0] = ((fConst45 * (fVec5[0] + fVec5[1])) + (fConst44 * fRec30[1]));
606 fRec29[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec30[0] + fRec11[1]) - 0.445486999999999)) - 75.67231707317073);
607 fRec28[0] = ((fConst37 * ((fConst36 * fRec29[1]) + (fConst13 * fRec29[0]))) + (fConst15 * fRec28[1]));
608 fRec11[0] = ((0.6 * fRec28[0]) + fRec12[0]);
609 double fTemp7 = (1e-15 + (0.0082 * fRec10[1]));
610 fVec6[0] = fTemp7;
611 fRec31[0] = ((fConst45 * (fVec6[0] + fVec6[1])) + (fConst44 * fRec31[1]));
612 fRec10[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec31[0] + fRec11[0]) - 0.445486999999999)) - 75.67231707317073);
613 fRec9[0] = ((fConst37 * ((fConst36 * fRec10[1]) + (fConst13 * fRec10[0]))) + (fConst15 * fRec9[1]));
614 double fTemp8 = (fRec9[0] * fTemp1);
615 double fTemp9 = (fRec9[0] * fRec8[0]);
616 double fTemp10 = fabs(fTemp9);
617 fRec34[0] = ((9.999999999998899e-05 * fTemp10) + (0.9999 * fRec34[1]));
618 double fTemp11 = max(fRec34[0], fTemp10);
619 fVec7[IOTA&32767] = fTemp11;
620 fRec33[0] = ((fVec7[IOTA&32767] + fRec33[1]) - fVec7[(IOTA-iConst46)&32767]);
621 fRec32[0] = ((fConst47 * fRec33[0]) + (0.999 * fRec32[1]));
622 double fTemp12 = max(-1.0, min(-0.01, (fVec7[IOTA&32767] - (1.0 + (1.02 * fRec32[0])))));
623 double fTemp13 = (0 - fTemp12);
624 double fTemp14 = (40.1 * fTemp13);
625 double fTemp15 = max(-600, fTemp14);
626 double fTemp16 = (0 - fTemp15);
627 double fTemp17 = (fTemp9 - fTemp12);
628 double fTemp18 = (40.1 * fTemp17);
629 double fTemp19 = max(-600, fTemp18);
630 double fTemp20 = (0 - fTemp19);
631 double fTemp21 = (((int((fabs(fTemp18) > 0.0001)))?((int((fTemp19 < -50)))?(exp(fTemp19) * fTemp20):(fTemp19 / (1 - exp(fTemp20)))):(1 + (fTemp17 * (20.05 + (134.00083333333336 * fTemp17))))) - ((int((fabs(fTemp14) > 0.0001)))?((int((fTemp15 < -50)))?(exp(fTemp15) * fTemp16):(fTemp15 / (1 - exp(fTemp16)))):(1 + (fTemp13 * (20.05 + (134.00083333333336 * fTemp13))))));
632 double fTemp22 = (fConst50 * fRec36[1]);
633 fRec42[0] = ((0.024937655860349125 * fTemp21) - (fConst77 * ((fConst75 * fRec42[2]) + (fConst73 * fRec42[1]))));
634 double fTemp23 = (fRec42[2] + (fRec42[0] + (2 * fRec42[1])));
635 fVec8[0] = fTemp23;
636 fRec41[0] = ((fConst78 * ((fConst36 * fVec8[1]) + (fConst13 * fVec8[0]))) + (fConst15 * fRec41[1]));
637 fRec40[0] = ((fConst79 * (fRec41[0] + fRec41[1])) + (fConst71 * fRec40[1]));
638 fRec39[0] = (fRec40[0] - (fConst69 * ((fConst67 * fRec39[2]) + (fConst65 * fRec39[1]))));
639 double fTemp24 = (fRec39[2] + (fRec39[0] + (2 * fRec39[1])));
640 fVec9[0] = fTemp24;
641 fRec38[0] = ((fConst81 * ((fConst80 * fVec9[1]) + (fConst57 * fVec9[0]))) + (fConst62 * fRec38[1]));
642 fRec37[0] = (fRec38[0] - (fConst60 * ((fConst58 * fRec37[2]) + (fConst56 * fRec37[1]))));
643 fRec36[0] = ((fConst60 * (((fConst55 * fRec37[0]) + (fConst82 * fRec37[1])) + (fConst55 * fRec37[2]))) - (fConst53 * ((fConst52 * fRec36[2]) + fTemp22)));
644 double fTemp25 = max(-1, min(1, (fSlow7 * (fRec36[2] + (fConst53 * (fTemp22 + (fConst52 * fRec36[0])))))));
645 fRec46[0] = ((fConst81 * (fVec9[0] + fVec9[1])) + (fConst62 * fRec46[1]));
646 fRec45[0] = (fRec46[0] - (fConst60 * ((fConst58 * fRec45[2]) + (fConst56 * fRec45[1]))));
647 double fTemp26 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
648 fVec10[0] = fTemp26;
649 fRec44[0] = ((fConst88 * ((fConst87 * fVec10[1]) + (fConst51 * fVec10[0]))) + (fConst86 * fRec44[1]));
650 fRec43[0] = (fRec44[0] - (fConst84 * ((fConst83 * fRec43[2]) + (fConst50 * fRec43[1]))));
651 double fTemp27 = max(-1, min(1, (fSlow8 * (((fConst49 * fRec43[0]) + (fConst89 * fRec43[1])) + (fConst49 * fRec43[2])))));
652 double fTemp28 = (fConst50 * fRec47[1]);
653 double fTemp29 = (fConst56 * fRec48[1]);
654 fRec50[0] = ((fConst79 * ((fConst92 * fRec41[1]) + (fConst66 * fRec41[0]))) + (fConst71 * fRec50[1]));
655 fRec49[0] = (fRec50[0] - (fConst69 * ((fConst67 * fRec49[2]) + (fConst65 * fRec49[1]))));
656 fRec48[0] = ((fConst69 * (((fConst64 * fRec49[0]) + (fConst93 * fRec49[1])) + (fConst64 * fRec49[2]))) - (fConst91 * ((fConst90 * fRec48[2]) + fTemp29)));
657 fRec47[0] = ((fRec48[2] + (fConst91 * (fTemp29 + (fConst90 * fRec48[0])))) - (fConst53 * ((fConst52 * fRec47[2]) + fTemp28)));
658 double fTemp30 = max(-1, min(1, (fSlow9 * (fRec47[2] + (fConst53 * (fTemp28 + (fConst52 * fRec47[0])))))));
659 fRec52[0] = ((fConst88 * (fVec10[0] + fVec10[1])) + (fConst86 * fRec52[1]));
660 fRec51[0] = (fRec52[0] - (fConst84 * ((fConst83 * fRec51[2]) + (fConst50 * fRec51[1]))));
661 double fTemp31 = max(-1, min(1, (fSlow10 * (fRec51[2] + (fRec51[0] + (2 * fRec51[1]))))));
662 double fTemp32 = ((1.2589412 * (fTemp31 * (1 - (0.3333333333333333 * faustpower<2>(fTemp31))))) + (1.584893192 * ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + ((fTemp27 * (1 - (0.3333333333333333 * faustpower<2>(fTemp27)))) + (0.8413951417869425 * (fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))))))));
663 fVec11[0] = fTemp32;
664 fRec35[0] = ((fConst19 * (fVec11[0] + fVec11[1])) + (fConst18 * fRec35[1]));
665 double fTemp33 = (((fSlow11 * fRec35[0]) + (fSlow6 * fTemp21)) + (fTemp8 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp8))) - 1)))));
666 fVec12[0] = fTemp33;
667 fRec7[0] = ((fConst19 * (fVec12[0] + fVec12[1])) + (fConst18 * fRec7[1]));
668 double fTemp34 = (fRec7[0] * fRec6[0]);
669 fRec4[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp34 + fRec5[0]) - 0.664540999999999)) - 87.91682926829267);
670 fRec3[0] = ((fConst94 * ((fConst36 * fRec4[1]) + (fConst13 * fRec4[0]))) + (fConst15 * fRec3[1]));
671 double fTemp35 = (1e-15 + (0.0041 * fRec54[1]));
672 fVec13[0] = fTemp35;
673 fRec55[0] = ((fConst19 * (fVec13[0] + fVec13[1])) + (fConst18 * fRec55[1]));
674 fRec54[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec55[0] + fTemp34) - 0.659760999999999)) - 89.08268292682925);
675 fRec53[0] = ((fConst94 * ((fConst36 * fRec54[1]) + (fConst13 * fRec54[0]))) + (fConst15 * fRec53[1]));
676 double fTemp36 = (min(0.7, fRec53[0]) + max(-0.75, fRec3[0]));
677 fVec14[0] = fTemp36;
678 fRec2[0] = (fConst96 * ((fVec14[2] + (fVec14[0] + (fConst95 * fVec14[1]))) + ((fConst12 * fRec2[2]) + (fConst10 * fRec2[1]))));
679 fRec1[0] = (fConst98 * ((fRec2[2] + (fRec2[0] + (fConst97 * fRec2[1]))) + ((fConst8 * fRec1[2]) + (fConst6 * fRec1[1]))));
680 fRec0[0] = (fConst100 * ((fRec1[2] + (fRec1[0] + (fConst99 * fRec1[1]))) + ((fConst4 * fRec0[2]) + (fConst2 * fRec0[1]))));
681 output0[i] = (FAUSTFLOAT)fRec0[0];
682 double fTemp37 = (double)input1[i];
683 fVec15[0] = fTemp37;
684 fRec74[0] = (fConst30 * ((fVec15[0] - fVec15[1]) + (fConst29 * fRec74[1])));
685 fRec73[0] = (fConst30 * ((fRec74[0] - fRec74[1]) + (fConst29 * fRec73[1])));
686 fRec72[0] = (fRec73[0] - (fConst27 * ((fConst26 * fRec72[2]) + (fConst21 * fRec72[1]))));
687 fRec71[0] = ((fConst27 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1])))) - (fConst25 * ((fConst23 * fRec71[2]) + (fConst21 * fRec71[1]))));
688 double fTemp38 = (1e-15 + (0.027 * fRec70[1]));
689 fVec16[0] = fTemp38;
690 fRec75[0] = ((fConst35 * (fVec16[0] + fVec16[1])) + (fConst34 * fRec75[1]));
691 fRec70[0] = (Ftube(TUBE_TABLE_12AU7_68k, ((fRec75[0] + (fConst31 * (fRec22[0] * (fRec71[2] + (fRec71[0] + (2 * fRec71[1])))))) - 1.2572399999999988)) - 83.43555555555557);
692 fRec69[0] = ((fConst37 * ((fConst36 * fRec70[1]) + (fConst13 * fRec70[0]))) + (fConst15 * fRec69[1]));
693 double fTemp39 = (1e-15 + (0.015 * fRec77[1]));
694 fVec17[0] = fTemp39;
695 fRec78[0] = ((fConst41 * (fVec17[0] + fVec17[1])) + (fConst40 * fRec78[1]));
696 fRec77[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec78[0] + fRec68[1]) - 0.776161999999999)) - 78.25586666666666);
697 fRec76[0] = ((fConst37 * ((fConst36 * fRec77[1]) + (fConst13 * fRec77[0]))) + (fConst15 * fRec76[1]));
698 fRec68[0] = ((0.6 * fRec76[0]) + fRec69[0]);
699 fRec67[0] = ((fConst19 * (fRec68[0] + fRec68[1])) + (fConst18 * fRec67[1]));
700 double fTemp40 = (1e-15 + (0.015 * fRec66[1]));
701 fVec18[0] = fTemp40;
702 fRec79[0] = ((fConst41 * (fVec18[0] + fVec18[1])) + (fConst40 * fRec79[1]));
703 fRec66[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec79[0] + fRec67[0]) - 0.776161999999999)) - 78.25586666666666);
704 fRec65[0] = ((fConst37 * ((fConst36 * fRec66[1]) + (fConst13 * fRec66[0]))) + (fConst15 * fRec65[1]));
705 double fTemp41 = (1e-15 + (0.0082 * fRec81[1]));
706 fVec19[0] = fTemp41;
707 fRec82[0] = ((fConst45 * (fVec19[0] + fVec19[1])) + (fConst44 * fRec82[1]));
708 fRec81[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec82[0] + fRec64[1]) - 0.445486999999999)) - 75.67231707317073);
709 fRec80[0] = ((fConst37 * ((fConst36 * fRec81[1]) + (fConst13 * fRec81[0]))) + (fConst15 * fRec80[1]));
710 fRec64[0] = ((0.6 * fRec80[0]) + fRec65[0]);
711 double fTemp42 = (1e-15 + (0.0082 * fRec63[1]));
712 fVec20[0] = fTemp42;
713 fRec83[0] = ((fConst45 * (fVec20[0] + fVec20[1])) + (fConst44 * fRec83[1]));
714 fRec63[0] = (Ftube(TUBE_TABLE_12AU7_250k, ((fRec83[0] + fRec64[0]) - 0.445486999999999)) - 75.67231707317073);
715 fRec62[0] = ((fConst37 * ((fConst36 * fRec63[1]) + (fConst13 * fRec63[0]))) + (fConst15 * fRec62[1]));
716 double fTemp43 = (fTemp1 * fRec62[0]);
717 double fTemp44 = (fRec8[0] * fRec62[0]);
718 double fTemp45 = fabs(fTemp44);
719 fRec86[0] = ((9.999999999998899e-05 * fTemp45) + (0.9999 * fRec86[1]));
720 double fTemp46 = max(fRec86[0], fTemp45);
721 fVec21[IOTA&32767] = fTemp46;
722 fRec85[0] = ((fVec21[IOTA&32767] + fRec85[1]) - fVec21[(IOTA-iConst46)&32767]);
723 fRec84[0] = ((fConst47 * fRec85[0]) + (0.999 * fRec84[1]));
724 double fTemp47 = max(-1.0, min(-0.01, (fVec21[IOTA&32767] - (1.0 + (1.02 * fRec84[0])))));
725 double fTemp48 = (0 - fTemp47);
726 double fTemp49 = (40.1 * fTemp48);
727 double fTemp50 = max(-600, fTemp49);
728 double fTemp51 = (0 - fTemp50);
729 double fTemp52 = (fTemp44 - fTemp47);
730 double fTemp53 = (40.1 * fTemp52);
731 double fTemp54 = max(-600, fTemp53);
732 double fTemp55 = (0 - fTemp54);
733 double fTemp56 = (((int((fabs(fTemp53) > 0.0001)))?((int((fTemp54 < -50)))?(exp(fTemp54) * fTemp55):(fTemp54 / (1 - exp(fTemp55)))):(1 + (fTemp52 * (20.05 + (134.00083333333336 * fTemp52))))) - ((int((fabs(fTemp49) > 0.0001)))?((int((fTemp50 < -50)))?(exp(fTemp50) * fTemp51):(fTemp50 / (1 - exp(fTemp51)))):(1 + (fTemp48 * (20.05 + (134.00083333333336 * fTemp48))))));
734 double fTemp57 = (fConst50 * fRec88[1]);
735 fRec94[0] = ((0.024937655860349125 * fTemp56) - (fConst77 * ((fConst75 * fRec94[2]) + (fConst73 * fRec94[1]))));
736 double fTemp58 = (fRec94[2] + (fRec94[0] + (2 * fRec94[1])));
737 fVec22[0] = fTemp58;
738 fRec93[0] = ((fConst78 * ((fConst36 * fVec22[1]) + (fConst13 * fVec22[0]))) + (fConst15 * fRec93[1]));
739 fRec92[0] = ((fConst79 * (fRec93[0] + fRec93[1])) + (fConst71 * fRec92[1]));
740 fRec91[0] = (fRec92[0] - (fConst69 * ((fConst67 * fRec91[2]) + (fConst65 * fRec91[1]))));
741 double fTemp59 = (fRec91[2] + (fRec91[0] + (2 * fRec91[1])));
742 fVec23[0] = fTemp59;
743 fRec90[0] = ((fConst81 * ((fConst80 * fVec23[1]) + (fConst57 * fVec23[0]))) + (fConst62 * fRec90[1]));
744 fRec89[0] = (fRec90[0] - (fConst60 * ((fConst58 * fRec89[2]) + (fConst56 * fRec89[1]))));
745 fRec88[0] = ((fConst60 * (((fConst55 * fRec89[0]) + (fConst82 * fRec89[1])) + (fConst55 * fRec89[2]))) - (fConst53 * ((fConst52 * fRec88[2]) + fTemp57)));
746 double fTemp60 = max(-1, min(1, (fSlow7 * (fRec88[2] + (fConst53 * (fTemp57 + (fConst52 * fRec88[0])))))));
747 fRec98[0] = ((fConst81 * (fVec23[0] + fVec23[1])) + (fConst62 * fRec98[1]));
748 fRec97[0] = (fRec98[0] - (fConst60 * ((fConst58 * fRec97[2]) + (fConst56 * fRec97[1]))));
749 double fTemp61 = (fRec97[2] + (fRec97[0] + (2 * fRec97[1])));
750 fVec24[0] = fTemp61;
751 fRec96[0] = ((fConst88 * ((fConst87 * fVec24[1]) + (fConst51 * fVec24[0]))) + (fConst86 * fRec96[1]));
752 fRec95[0] = (fRec96[0] - (fConst84 * ((fConst83 * fRec95[2]) + (fConst50 * fRec95[1]))));
753 double fTemp62 = max(-1, min(1, (fSlow8 * (((fConst49 * fRec95[0]) + (fConst89 * fRec95[1])) + (fConst49 * fRec95[2])))));
754 double fTemp63 = (fConst50 * fRec99[1]);
755 double fTemp64 = (fConst56 * fRec100[1]);
756 fRec102[0] = ((fConst79 * ((fConst92 * fRec93[1]) + (fConst66 * fRec93[0]))) + (fConst71 * fRec102[1]));
757 fRec101[0] = (fRec102[0] - (fConst69 * ((fConst67 * fRec101[2]) + (fConst65 * fRec101[1]))));
758 fRec100[0] = ((fConst69 * (((fConst64 * fRec101[0]) + (fConst93 * fRec101[1])) + (fConst64 * fRec101[2]))) - (fConst91 * ((fConst90 * fRec100[2]) + fTemp64)));
759 fRec99[0] = ((fRec100[2] + (fConst91 * (fTemp64 + (fConst90 * fRec100[0])))) - (fConst53 * ((fConst52 * fRec99[2]) + fTemp63)));
760 double fTemp65 = max(-1, min(1, (fSlow9 * (fRec99[2] + (fConst53 * (fTemp63 + (fConst52 * fRec99[0])))))));
761 fRec104[0] = ((fConst88 * (fVec24[0] + fVec24[1])) + (fConst86 * fRec104[1]));
762 fRec103[0] = (fRec104[0] - (fConst84 * ((fConst83 * fRec103[2]) + (fConst50 * fRec103[1]))));
763 double fTemp66 = max(-1, min(1, (fSlow10 * (fRec103[2] + (fRec103[0] + (2 * fRec103[1]))))));
764 double fTemp67 = ((1.2589412 * (fTemp66 * (1 - (0.3333333333333333 * faustpower<2>(fTemp66))))) + (1.584893192 * ((fTemp65 * (1 - (0.3333333333333333 * faustpower<2>(fTemp65)))) + ((fTemp62 * (1 - (0.3333333333333333 * faustpower<2>(fTemp62)))) + (0.8413951417869425 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60)))))))));
765 fVec25[0] = fTemp67;
766 fRec87[0] = ((fConst19 * (fVec25[0] + fVec25[1])) + (fConst18 * fRec87[1]));
767 double fTemp68 = (((fSlow11 * fRec87[0]) + (fSlow6 * fTemp56)) + (fTemp43 * (1 + (fSlow4 * ((4 - (4 * fabs(fTemp43))) - 1)))));
768 fVec26[0] = fTemp68;
769 fRec61[0] = ((fConst19 * (fVec26[0] + fVec26[1])) + (fConst18 * fRec61[1]));
770 double fTemp69 = (fRec6[0] * fRec61[0]);
771 double fTemp70 = (1e-15 + (0.0041 * fRec60[1]));
772 fVec27[0] = fTemp70;
773 fRec105[0] = ((fConst19 * (fVec27[0] + fVec27[1])) + (fConst18 * fRec105[1]));
774 fRec60[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec105[0] + fTemp69) - 0.664540999999999)) - 87.91682926829267);
775 fRec59[0] = ((fConst94 * ((fConst36 * fRec60[1]) + (fConst13 * fRec60[0]))) + (fConst15 * fRec59[1]));
776 double fTemp71 = (1e-15 + (0.0041 * fRec107[1]));
777 fVec28[0] = fTemp71;
778 fRec108[0] = ((fConst19 * (fVec28[0] + fVec28[1])) + (fConst18 * fRec108[1]));
779 fRec107[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec108[0] + fTemp69) - 0.659760999999999)) - 89.08268292682925);
780 fRec106[0] = ((fConst94 * ((fConst36 * fRec107[1]) + (fConst13 * fRec107[0]))) + (fConst15 * fRec106[1]));
781 double fTemp72 = (min(0.7, fRec106[0]) + max(-0.75, fRec59[0]));
782 fVec29[0] = fTemp72;
783 fRec58[0] = (fConst96 * ((fVec29[2] + (fVec29[0] + (fConst95 * fVec29[1]))) + ((fConst12 * fRec58[2]) + (fConst10 * fRec58[1]))));
784 fRec57[0] = (fConst98 * ((fRec58[2] + (fRec58[0] + (fConst97 * fRec58[1]))) + ((fConst8 * fRec57[2]) + (fConst6 * fRec57[1]))));
785 fRec56[0] = (fConst100 * ((fRec57[2] + (fRec57[0] + (fConst99 * fRec57[1]))) + ((fConst4 * fRec56[2]) + (fConst2 * fRec56[1]))));
786 output1[i] = (FAUSTFLOAT)fRec56[0];
787 // post processing
788 fRec56[2] = fRec56[1]; fRec56[1] = fRec56[0];
789 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
790 fRec58[2] = fRec58[1]; fRec58[1] = fRec58[0];
791 fVec29[2] = fVec29[1]; fVec29[1] = fVec29[0];
792 fRec106[1] = fRec106[0];
793 fRec107[1] = fRec107[0];
794 fRec108[1] = fRec108[0];
795 fVec28[1] = fVec28[0];
796 fRec59[1] = fRec59[0];
797 fRec60[1] = fRec60[0];
798 fRec105[1] = fRec105[0];
799 fVec27[1] = fVec27[0];
800 fRec61[1] = fRec61[0];
801 fVec26[1] = fVec26[0];
802 fRec87[1] = fRec87[0];
803 fVec25[1] = fVec25[0];
804 fRec103[2] = fRec103[1]; fRec103[1] = fRec103[0];
805 fRec104[1] = fRec104[0];
806 fRec99[2] = fRec99[1]; fRec99[1] = fRec99[0];
807 fRec100[2] = fRec100[1]; fRec100[1] = fRec100[0];
808 fRec101[2] = fRec101[1]; fRec101[1] = fRec101[0];
809 fRec102[1] = fRec102[0];
810 fRec95[2] = fRec95[1]; fRec95[1] = fRec95[0];
811 fRec96[1] = fRec96[0];
812 fVec24[1] = fVec24[0];
813 fRec97[2] = fRec97[1]; fRec97[1] = fRec97[0];
814 fRec98[1] = fRec98[0];
815 fRec88[2] = fRec88[1]; fRec88[1] = fRec88[0];
816 fRec89[2] = fRec89[1]; fRec89[1] = fRec89[0];
817 fRec90[1] = fRec90[0];
818 fVec23[1] = fVec23[0];
819 fRec91[2] = fRec91[1]; fRec91[1] = fRec91[0];
820 fRec92[1] = fRec92[0];
821 fRec93[1] = fRec93[0];
822 fVec22[1] = fVec22[0];
823 fRec94[2] = fRec94[1]; fRec94[1] = fRec94[0];
824 fRec84[1] = fRec84[0];
825 fRec85[1] = fRec85[0];
826 fRec86[1] = fRec86[0];
827 fRec62[1] = fRec62[0];
828 fRec63[1] = fRec63[0];
829 fRec83[1] = fRec83[0];
830 fVec20[1] = fVec20[0];
831 fRec64[1] = fRec64[0];
832 fRec80[1] = fRec80[0];
833 fRec81[1] = fRec81[0];
834 fRec82[1] = fRec82[0];
835 fVec19[1] = fVec19[0];
836 fRec65[1] = fRec65[0];
837 fRec66[1] = fRec66[0];
838 fRec79[1] = fRec79[0];
839 fVec18[1] = fVec18[0];
840 fRec67[1] = fRec67[0];
841 fRec68[1] = fRec68[0];
842 fRec76[1] = fRec76[0];
843 fRec77[1] = fRec77[0];
844 fRec78[1] = fRec78[0];
845 fVec17[1] = fVec17[0];
846 fRec69[1] = fRec69[0];
847 fRec70[1] = fRec70[0];
848 fRec75[1] = fRec75[0];
849 fVec16[1] = fVec16[0];
850 fRec71[2] = fRec71[1]; fRec71[1] = fRec71[0];
851 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
852 fRec73[1] = fRec73[0];
853 fRec74[1] = fRec74[0];
854 fVec15[1] = fVec15[0];
855 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
856 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
857 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
858 fVec14[2] = fVec14[1]; fVec14[1] = fVec14[0];
859 fRec53[1] = fRec53[0];
860 fRec54[1] = fRec54[0];
861 fRec55[1] = fRec55[0];
862 fVec13[1] = fVec13[0];
863 fRec3[1] = fRec3[0];
864 fRec4[1] = fRec4[0];
865 fRec7[1] = fRec7[0];
866 fVec12[1] = fVec12[0];
867 fRec35[1] = fRec35[0];
868 fVec11[1] = fVec11[0];
869 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
870 fRec52[1] = fRec52[0];
871 fRec47[2] = fRec47[1]; fRec47[1] = fRec47[0];
872 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
873 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
874 fRec50[1] = fRec50[0];
875 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
876 fRec44[1] = fRec44[0];
877 fVec10[1] = fVec10[0];
878 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
879 fRec46[1] = fRec46[0];
880 fRec36[2] = fRec36[1]; fRec36[1] = fRec36[0];
881 fRec37[2] = fRec37[1]; fRec37[1] = fRec37[0];
882 fRec38[1] = fRec38[0];
883 fVec9[1] = fVec9[0];
884 fRec39[2] = fRec39[1]; fRec39[1] = fRec39[0];
885 fRec40[1] = fRec40[0];
886 fRec41[1] = fRec41[0];
887 fVec8[1] = fVec8[0];
888 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
889 fRec32[1] = fRec32[0];
890 fRec33[1] = fRec33[0];
891 IOTA = IOTA+1;
892 fRec34[1] = fRec34[0];
893 fRec9[1] = fRec9[0];
894 fRec10[1] = fRec10[0];
895 fRec31[1] = fRec31[0];
896 fVec6[1] = fVec6[0];
897 fRec11[1] = fRec11[0];
898 fRec28[1] = fRec28[0];
899 fRec29[1] = fRec29[0];
900 fRec30[1] = fRec30[0];
901 fVec5[1] = fVec5[0];
902 fRec12[1] = fRec12[0];
903 fRec13[1] = fRec13[0];
904 fRec27[1] = fRec27[0];
905 fVec4[1] = fVec4[0];
906 fRec14[1] = fRec14[0];
907 fRec15[1] = fRec15[0];
908 fRec24[1] = fRec24[0];
909 fRec25[1] = fRec25[0];
910 fRec26[1] = fRec26[0];
911 fVec3[1] = fVec3[0];
912 fRec16[1] = fRec16[0];
913 fRec17[1] = fRec17[0];
914 fRec23[1] = fRec23[0];
915 fVec2[1] = fVec2[0];
916 fRec22[1] = fRec22[0];
917 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
918 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
919 fRec20[1] = fRec20[0];
920 fRec21[1] = fRec21[0];
921 fVec1[1] = fVec1[0];
922 fRec8[1] = fRec8[0];
923 fRec6[1] = fRec6[0];
924 fRec5[1] = fRec5[0];
925 fVec0[1] = fVec0[0];
926 }
927 #undef fslider0
928 #undef fslider1
929 #undef fslider2
930 #undef fslider3
931 }
932
933 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
934 {
935 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
936 }
937
938
939 void Dsp::connect(uint32_t port,void* data)
940 {
941 switch ((PortIndex)port)
942 {
943 case DRIVE:
944 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
945 break;
946 case PREGAIN:
947 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
948 break;
949 case WET_DRY:
950 fslider1_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
951 break;
952 case GAIN1:
953 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
954 break;
955 default:
956 break;
957 }
958 }
959
960 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
961 {
962 static_cast<Dsp*>(p)->connect(port, data);
963 }
964
965
966 PluginLV2 *plugin() {
967 return new Dsp();
968 }
969
970 void Dsp::del_instance(PluginLV2 *p)
971 {
972 delete static_cast<Dsp*>(p);
973 }
974
975 /*
976 typedef enum
977 {
978 DRIVE,
979 PREGAIN,
980 WET_DRY,
981 GAIN1,
982 } PortIndex;
983 */
984
985 } // end namespace gxamp8_stereo
0 // generated from file '../src/LV2/faust/gxamp9.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp9 {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 void connect(uint32_t port,void* data);
144 void clear_state_f();
145 void init(uint32_t samplingFreq);
146 void compute(int count, float *input0, float *output0);
147
148 static void clear_state_f_static(PluginLV2*);
149 static void init_static(uint32_t samplingFreq, PluginLV2*);
150 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
151 static void del_instance(PluginLV2 *p);
152 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
153 public:
154 Dsp();
155 ~Dsp();
156 };
157
158
159
160 Dsp::Dsp()
161 : PluginLV2() {
162 version = PLUGINLV2_VERSION;
163 id = "12ax7 feedback";
164 name = N_("12ax7 feedback");
165 mono_audio = compute_static;
166 stereo_audio = 0;
167 set_samplerate = init_static;
168 activate_plugin = 0;
169 connect_ports = connect_static;
170 clear_state = clear_state_f_static;
171 delete_instance = del_instance;
172 }
173
174 Dsp::~Dsp() {
175 }
176
177 inline void Dsp::clear_state_f()
178 {
179 for (int i=0; i<2; i++) fRec0[i] = 0;
180 for (int i=0; i<2; i++) fRec8[i] = 0;
181 for (int i=0; i<2; i++) fRec22[i] = 0;
182 for (int i=0; i<32768; i++) fVec0[i] = 0;
183 for (int i=0; i<2; i++) fRec21[i] = 0;
184 for (int i=0; i<2; i++) fRec20[i] = 0;
185 for (int i=0; i<2; i++) fRec23[i] = 0;
186 for (int i=0; i<3; i++) fRec19[i] = 0;
187 for (int i=0; i<2; i++) fVec1[i] = 0;
188 for (int i=0; i<2; i++) fRec18[i] = 0;
189 for (int i=0; i<2; i++) fRec17[i] = 0;
190 for (int i=0; i<3; i++) fRec16[i] = 0;
191 for (int i=0; i<2; i++) fVec2[i] = 0;
192 for (int i=0; i<2; i++) fRec15[i] = 0;
193 for (int i=0; i<3; i++) fRec14[i] = 0;
194 for (int i=0; i<3; i++) fRec13[i] = 0;
195 for (int i=0; i<2; i++) fRec27[i] = 0;
196 for (int i=0; i<3; i++) fRec26[i] = 0;
197 for (int i=0; i<2; i++) fVec3[i] = 0;
198 for (int i=0; i<2; i++) fRec25[i] = 0;
199 for (int i=0; i<3; i++) fRec24[i] = 0;
200 for (int i=0; i<2; i++) fRec31[i] = 0;
201 for (int i=0; i<3; i++) fRec30[i] = 0;
202 for (int i=0; i<3; i++) fRec29[i] = 0;
203 for (int i=0; i<3; i++) fRec28[i] = 0;
204 for (int i=0; i<2; i++) fRec33[i] = 0;
205 for (int i=0; i<3; i++) fRec32[i] = 0;
206 for (int i=0; i<2; i++) fVec4[i] = 0;
207 for (int i=0; i<2; i++) fRec12[i] = 0;
208 for (int i=0; i<2; i++) fVec5[i] = 0;
209 for (int i=0; i<2; i++) fRec34[i] = 0;
210 for (int i=0; i<2; i++) fRec11[i] = 0;
211 for (int i=0; i<2; i++) fRec10[i] = 0;
212 for (int i=0; i<2; i++) fVec6[i] = 0;
213 for (int i=0; i<2; i++) fRec37[i] = 0;
214 for (int i=0; i<2; i++) fRec36[i] = 0;
215 for (int i=0; i<2; i++) fRec35[i] = 0;
216 for (int i=0; i<2; i++) fRec9[i] = 0;
217 for (int i=0; i<2; i++) fVec7[i] = 0;
218 for (int i=0; i<2; i++) fRec7[i] = 0;
219 for (int i=0; i<2; i++) fVec8[i] = 0;
220 for (int i=0; i<2; i++) fRec38[i] = 0;
221 for (int i=0; i<2; i++) fRec6[i] = 0;
222 for (int i=0; i<2; i++) fRec5[i] = 0;
223 for (int i=0; i<2; i++) fVec9[i] = 0;
224 for (int i=0; i<2; i++) fRec41[i] = 0;
225 for (int i=0; i<2; i++) fRec40[i] = 0;
226 for (int i=0; i<2; i++) fRec39[i] = 0;
227 for (int i=0; i<2; i++) fRec4[i] = 0;
228 for (int i=0; i<2; i++) fRec3[i] = 0;
229 for (int i=0; i<2; i++) fVec10[i] = 0;
230 for (int i=0; i<2; i++) fRec42[i] = 0;
231 for (int i=0; i<2; i++) fRec2[i] = 0;
232 for (int i=0; i<2; i++) fRec1[i] = 0;
233 }
234
235 void Dsp::clear_state_f_static(PluginLV2 *p)
236 {
237 static_cast<Dsp*>(p)->clear_state_f();
238 }
239
240 inline void Dsp::init(uint32_t samplingFreq)
241 {
242 fSamplingFreq = samplingFreq;
243 iConst0 = min(192000, max(1, fSamplingFreq));
244 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
245 fConst2 = (1 + fConst1);
246 fConst3 = (0 - ((1 - fConst1) / fConst2));
247 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
248 fConst5 = (1 + fConst4);
249 fConst6 = (0 - ((1 - fConst4) / fConst5));
250 fConst7 = tan((942.4777960769379 / iConst0));
251 fConst8 = (1.0 / faustpower<2>(fConst7));
252 fConst9 = (2 * (1 - fConst8));
253 fConst10 = (1.0 / fConst7);
254 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
255 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
256 fConst13 = tan((3769.9111843077517 / iConst0));
257 fConst14 = (1.0 / faustpower<2>(fConst13));
258 fConst15 = (2 * (1 - fConst14));
259 fConst16 = (1.0 / fConst13);
260 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
261 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
262 fConst19 = (1.0 / fConst18);
263 fConst20 = (1 + fConst16);
264 fConst21 = (0 - ((1 - fConst16) / fConst20));
265 fConst22 = tan((10053.096491487338 / iConst0));
266 fConst23 = (1.0 / faustpower<2>(fConst22));
267 fConst24 = (2 * (1 - fConst23));
268 fConst25 = (1.0 / fConst22);
269 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
270 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
271 fConst28 = (1.0 / fConst27);
272 fConst29 = (1 + fConst25);
273 fConst30 = (0 - ((1 - fConst25) / fConst29));
274 fConst31 = tan((47123.8898038469 / iConst0));
275 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
276 fConst33 = (1.0 / fConst31);
277 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
278 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
279 fConst36 = (1.0 / fConst35);
280 IOTA = 0;
281 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
282 fConst38 = (0.009000000000000008 / iConst0);
283 fConst39 = (0 - fConst1);
284 fConst40 = (1.0 / (fConst2 * fConst35));
285 fConst41 = (1.0 / fConst29);
286 fConst42 = (0 - fConst16);
287 fConst43 = (1.0 / (fConst20 * fConst27));
288 fConst44 = (2 * (0 - fConst14));
289 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
290 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
291 fConst47 = (1 + fConst10);
292 fConst48 = (0 - ((1 - fConst10) / fConst47));
293 fConst49 = (0 - fConst10);
294 fConst50 = (1.0 / (fConst47 * fConst18));
295 fConst51 = (2 * (0 - fConst8));
296 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
297 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
298 fConst54 = (0 - fConst25);
299 fConst55 = (2 * (0 - fConst23));
300 fConst56 = (1.0 / fConst5);
301 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
302 fConst58 = (1 + fConst57);
303 fConst59 = (0 - ((1 - fConst57) / fConst58));
304 fConst60 = (1.0 / fConst58);
305 fConst61 = (0.025 / fConst2);
306 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
307 fConst63 = (1 + fConst62);
308 fConst64 = (0 - ((1 - fConst62) / fConst63));
309 fConst65 = (1.0 / fConst63);
310 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
311 fConst67 = (1 + fConst66);
312 fConst68 = (0 - ((1 - fConst66) / fConst67));
313 fConst69 = (1.0 / fConst67);
314 clear_state_f();
315 }
316
317 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
318 {
319 static_cast<Dsp*>(p)->init(samplingFreq);
320 }
321
322 inline void Dsp::compute(int count, float *input0, float *output0)
323 {
324 #define fslider0 (*fslider0_)
325 #define fslider1 (*fslider1_)
326 #define fslider2 (*fslider2_)
327 #define fslider3 (*fslider3_)
328 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
329 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
330 double fSlow2 = (1.000000000000001e-05 * fslider2);
331 double fSlow3 = fslider3;
332 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
333 double fSlow5 = pow(1e+01,(2 * fSlow3));
334 double fSlow6 = (fConst46 * fSlow5);
335 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
336 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
337 double fSlow9 = (2 * (fSlow3 - 0.5));
338 double fSlow10 = (1 - max(0, (0 - fSlow9)));
339 double fSlow11 = (0.024937655860349125 * (1 - max(0, fSlow9)));
340 double fSlow12 = (1.25 * fSlow3);
341 for (int i=0; i<count; i++) {
342 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
343 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
344 double fTemp0 = (fConst9 * fRec13[1]);
345 double fTemp1 = (double)input0[i];
346 double fTemp2 = fabs(fTemp1);
347 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
348 double fTemp3 = max(fRec22[0], fTemp2);
349 fVec0[IOTA&32767] = fTemp3;
350 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
351 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
352 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
353 double fTemp5 = (0 - fTemp4);
354 double fTemp6 = (40.1 * fTemp5);
355 double fTemp7 = max(-600, fTemp6);
356 double fTemp8 = (0 - fTemp7);
357 double fTemp9 = (fTemp1 - fTemp4);
358 double fTemp10 = (40.1 * fTemp9);
359 double fTemp11 = max(-600, fTemp10);
360 double fTemp12 = (0 - fTemp11);
361 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
362 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
363 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
364 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
365 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
366 fVec1[0] = fTemp15;
367 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
368 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
369 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
370 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
371 fVec2[0] = fTemp16;
372 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
373 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
374 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
375 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
376 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
377 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
378 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
379 fVec3[0] = fTemp18;
380 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
381 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
382 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
383 double fTemp20 = (fConst9 * fRec28[1]);
384 double fTemp21 = (fConst15 * fRec29[1]);
385 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
386 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
387 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
388 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
389 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
390 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
391 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
392 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
393 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
394 fVec4[0] = fTemp24;
395 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
396 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
397 fVec5[0] = fTemp25;
398 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
399 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
400 double fTemp27 = (1 - fRec23[0]);
401 fRec11[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fTemp13 * ((fTemp27 * (0.024937655860349125 + (fSlow12 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))) + (fSlow11 * fRec23[0]))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 1.5816559999999988)) - 191.42014814814814);
402 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
403 double fTemp28 = (1e-15 + (0.015 * fRec36[1]));
404 fVec6[0] = fTemp28;
405 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
406 fRec36[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec37[0] + fRec9[1]) - 1.204284999999999)) - 169.71433333333334);
407 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
408 fRec9[0] = ((0.6 * fRec35[0]) - fRec10[0]);
409 double fTemp29 = (fRec9[0] * fRec8[0]);
410 fVec7[0] = fTemp29;
411 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
412 double fTemp30 = (1e-15 + (0.015 * fRec6[1]));
413 fVec8[0] = fTemp30;
414 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
415 fRec6[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec38[0] + fRec7[0]) - 1.204284999999999)) - 169.71433333333334);
416 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
417 double fTemp31 = (1e-15 + (0.0082 * fRec40[1]));
418 fVec9[0] = fTemp31;
419 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
420 fRec40[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec41[0] + fRec4[1]) - 0.840701999999999)) - 147.47536585365856);
421 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
422 fRec4[0] = ((0.6 * fRec39[0]) + fRec5[0]);
423 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
424 double fTemp32 = (1e-15 + (0.0082 * fRec2[1]));
425 fVec10[0] = fTemp32;
426 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
427 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec42[0] + fRec3[0]) - 0.840701999999999)) - 147.47536585365856);
428 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
429 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
430 // post processing
431 fRec1[1] = fRec1[0];
432 fRec2[1] = fRec2[0];
433 fRec42[1] = fRec42[0];
434 fVec10[1] = fVec10[0];
435 fRec3[1] = fRec3[0];
436 fRec4[1] = fRec4[0];
437 fRec39[1] = fRec39[0];
438 fRec40[1] = fRec40[0];
439 fRec41[1] = fRec41[0];
440 fVec9[1] = fVec9[0];
441 fRec5[1] = fRec5[0];
442 fRec6[1] = fRec6[0];
443 fRec38[1] = fRec38[0];
444 fVec8[1] = fVec8[0];
445 fRec7[1] = fRec7[0];
446 fVec7[1] = fVec7[0];
447 fRec9[1] = fRec9[0];
448 fRec35[1] = fRec35[0];
449 fRec36[1] = fRec36[0];
450 fRec37[1] = fRec37[0];
451 fVec6[1] = fVec6[0];
452 fRec10[1] = fRec10[0];
453 fRec11[1] = fRec11[0];
454 fRec34[1] = fRec34[0];
455 fVec5[1] = fVec5[0];
456 fRec12[1] = fRec12[0];
457 fVec4[1] = fVec4[0];
458 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
459 fRec33[1] = fRec33[0];
460 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
461 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
462 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
463 fRec31[1] = fRec31[0];
464 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
465 fRec25[1] = fRec25[0];
466 fVec3[1] = fVec3[0];
467 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
468 fRec27[1] = fRec27[0];
469 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
470 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
471 fRec15[1] = fRec15[0];
472 fVec2[1] = fVec2[0];
473 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
474 fRec17[1] = fRec17[0];
475 fRec18[1] = fRec18[0];
476 fVec1[1] = fVec1[0];
477 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
478 fRec23[1] = fRec23[0];
479 fRec20[1] = fRec20[0];
480 fRec21[1] = fRec21[0];
481 IOTA = IOTA+1;
482 fRec22[1] = fRec22[0];
483 fRec8[1] = fRec8[0];
484 fRec0[1] = fRec0[0];
485 }
486 #undef fslider0
487 #undef fslider1
488 #undef fslider2
489 #undef fslider3
490 }
491
492 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
493 {
494 static_cast<Dsp*>(p)->compute(count, input0, output0);
495 }
496
497
498 void Dsp::connect(uint32_t port,void* data)
499 {
500 switch ((PortIndex)port)
501 {
502 case DRIVE:
503 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
504 break;
505 case WET_DRY:
506 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
507 break;
508 case PREGAIN:
509 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
510 break;
511 case GAIN1:
512 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
513 break;
514 default:
515 break;
516 }
517 }
518
519 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
520 {
521 static_cast<Dsp*>(p)->connect(port, data);
522 }
523
524
525 PluginLV2 *plugin() {
526 return new Dsp();
527 }
528
529 void Dsp::del_instance(PluginLV2 *p)
530 {
531 delete static_cast<Dsp*>(p);
532 }
533
534 /*
535 typedef enum
536 {
537 DRIVE,
538 WET_DRY,
539 PREGAIN,
540 GAIN1,
541 } PortIndex;
542 */
543
544 } // end namespace gxamp9
0 // generated from file '../src/LV2/faust/gxamp9_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp9_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec8[2];
23 double fConst7;
24 double fConst8;
25 double fConst9;
26 double fConst10;
27 double fConst11;
28 double fConst12;
29 double fConst13;
30 double fConst14;
31 double fConst15;
32 double fConst16;
33 double fConst17;
34 double fConst18;
35 double fConst19;
36 double fConst20;
37 double fConst21;
38 double fConst22;
39 double fConst23;
40 double fConst24;
41 double fConst25;
42 double fConst26;
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fConst30;
47 double fConst31;
48 double fConst32;
49 double fConst33;
50 double fConst34;
51 double fConst35;
52 double fConst36;
53 double fRec22[2];
54 int IOTA;
55 double fVec0[32768];
56 int iConst37;
57 double fRec21[2];
58 double fConst38;
59 double fRec20[2];
60 FAUSTFLOAT fslider2;
61 FAUSTFLOAT *fslider2_;
62 double fRec23[2];
63 double fRec19[3];
64 double fVec1[2];
65 double fConst39;
66 double fConst40;
67 double fRec18[2];
68 double fConst41;
69 double fRec17[2];
70 double fRec16[3];
71 double fVec2[2];
72 double fConst42;
73 double fConst43;
74 double fRec15[2];
75 double fRec14[3];
76 double fConst44;
77 double fRec13[3];
78 FAUSTFLOAT fslider3;
79 FAUSTFLOAT *fslider3_;
80 double fConst45;
81 double fConst46;
82 double fConst47;
83 double fConst48;
84 double fRec27[2];
85 double fRec26[3];
86 double fVec3[2];
87 double fConst49;
88 double fConst50;
89 double fRec25[2];
90 double fRec24[3];
91 double fConst51;
92 double fConst52;
93 double fConst53;
94 double fConst54;
95 double fRec31[2];
96 double fRec30[3];
97 double fConst55;
98 double fRec29[3];
99 double fRec28[3];
100 double fRec33[2];
101 double fRec32[3];
102 double fVec4[2];
103 double fConst56;
104 double fRec12[2];
105 double fConst57;
106 double fConst58;
107 double fConst59;
108 double fVec5[2];
109 double fConst60;
110 double fRec34[2];
111 double fRec11[2];
112 double fConst61;
113 double fRec10[2];
114 double fConst62;
115 double fConst63;
116 double fConst64;
117 double fVec6[2];
118 double fConst65;
119 double fRec37[2];
120 double fRec36[2];
121 double fRec35[2];
122 double fRec9[2];
123 double fVec7[2];
124 double fRec7[2];
125 double fVec8[2];
126 double fRec38[2];
127 double fRec6[2];
128 double fRec5[2];
129 double fConst66;
130 double fConst67;
131 double fConst68;
132 double fVec9[2];
133 double fConst69;
134 double fRec41[2];
135 double fRec40[2];
136 double fRec39[2];
137 double fRec4[2];
138 double fRec3[2];
139 double fVec10[2];
140 double fRec42[2];
141 double fRec2[2];
142 double fRec1[2];
143 double fRec63[2];
144 double fVec11[32768];
145 double fRec62[2];
146 double fRec61[2];
147 double fRec60[3];
148 double fVec12[2];
149 double fRec59[2];
150 double fRec58[2];
151 double fRec57[3];
152 double fVec13[2];
153 double fRec56[2];
154 double fRec55[3];
155 double fRec54[3];
156 double fRec67[2];
157 double fRec66[3];
158 double fVec14[2];
159 double fRec65[2];
160 double fRec64[3];
161 double fRec71[2];
162 double fRec70[3];
163 double fRec69[3];
164 double fRec68[3];
165 double fRec73[2];
166 double fRec72[3];
167 double fVec15[2];
168 double fRec53[2];
169 double fVec16[2];
170 double fRec74[2];
171 double fRec52[2];
172 double fRec51[2];
173 double fVec17[2];
174 double fRec77[2];
175 double fRec76[2];
176 double fRec75[2];
177 double fRec50[2];
178 double fVec18[2];
179 double fRec49[2];
180 double fVec19[2];
181 double fRec78[2];
182 double fRec48[2];
183 double fRec47[2];
184 double fVec20[2];
185 double fRec81[2];
186 double fRec80[2];
187 double fRec79[2];
188 double fRec46[2];
189 double fRec45[2];
190 double fVec21[2];
191 double fRec82[2];
192 double fRec44[2];
193 double fRec43[2];
194 void connect(uint32_t port,void* data);
195 void clear_state_f();
196 void init(uint32_t samplingFreq);
197 void compute(int count, float *input0, float *input1, float *output0, float *output1);
198
199 static void clear_state_f_static(PluginLV2*);
200 static void init_static(uint32_t samplingFreq, PluginLV2*);
201 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
202 static void del_instance(PluginLV2 *p);
203 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
204 public:
205 Dsp();
206 ~Dsp();
207 };
208
209
210
211 Dsp::Dsp()
212 : PluginLV2() {
213 version = PLUGINLV2_VERSION;
214 id = "12ax7 feedback";
215 name = N_("12ax7 feedback");
216 mono_audio = 0;
217 stereo_audio = compute_static;
218 set_samplerate = init_static;
219 activate_plugin = 0;
220 connect_ports = connect_static;
221 clear_state = clear_state_f_static;
222 delete_instance = del_instance;
223 }
224
225 Dsp::~Dsp() {
226 }
227
228 inline void Dsp::clear_state_f()
229 {
230 for (int i=0; i<2; i++) fRec0[i] = 0;
231 for (int i=0; i<2; i++) fRec8[i] = 0;
232 for (int i=0; i<2; i++) fRec22[i] = 0;
233 for (int i=0; i<32768; i++) fVec0[i] = 0;
234 for (int i=0; i<2; i++) fRec21[i] = 0;
235 for (int i=0; i<2; i++) fRec20[i] = 0;
236 for (int i=0; i<2; i++) fRec23[i] = 0;
237 for (int i=0; i<3; i++) fRec19[i] = 0;
238 for (int i=0; i<2; i++) fVec1[i] = 0;
239 for (int i=0; i<2; i++) fRec18[i] = 0;
240 for (int i=0; i<2; i++) fRec17[i] = 0;
241 for (int i=0; i<3; i++) fRec16[i] = 0;
242 for (int i=0; i<2; i++) fVec2[i] = 0;
243 for (int i=0; i<2; i++) fRec15[i] = 0;
244 for (int i=0; i<3; i++) fRec14[i] = 0;
245 for (int i=0; i<3; i++) fRec13[i] = 0;
246 for (int i=0; i<2; i++) fRec27[i] = 0;
247 for (int i=0; i<3; i++) fRec26[i] = 0;
248 for (int i=0; i<2; i++) fVec3[i] = 0;
249 for (int i=0; i<2; i++) fRec25[i] = 0;
250 for (int i=0; i<3; i++) fRec24[i] = 0;
251 for (int i=0; i<2; i++) fRec31[i] = 0;
252 for (int i=0; i<3; i++) fRec30[i] = 0;
253 for (int i=0; i<3; i++) fRec29[i] = 0;
254 for (int i=0; i<3; i++) fRec28[i] = 0;
255 for (int i=0; i<2; i++) fRec33[i] = 0;
256 for (int i=0; i<3; i++) fRec32[i] = 0;
257 for (int i=0; i<2; i++) fVec4[i] = 0;
258 for (int i=0; i<2; i++) fRec12[i] = 0;
259 for (int i=0; i<2; i++) fVec5[i] = 0;
260 for (int i=0; i<2; i++) fRec34[i] = 0;
261 for (int i=0; i<2; i++) fRec11[i] = 0;
262 for (int i=0; i<2; i++) fRec10[i] = 0;
263 for (int i=0; i<2; i++) fVec6[i] = 0;
264 for (int i=0; i<2; i++) fRec37[i] = 0;
265 for (int i=0; i<2; i++) fRec36[i] = 0;
266 for (int i=0; i<2; i++) fRec35[i] = 0;
267 for (int i=0; i<2; i++) fRec9[i] = 0;
268 for (int i=0; i<2; i++) fVec7[i] = 0;
269 for (int i=0; i<2; i++) fRec7[i] = 0;
270 for (int i=0; i<2; i++) fVec8[i] = 0;
271 for (int i=0; i<2; i++) fRec38[i] = 0;
272 for (int i=0; i<2; i++) fRec6[i] = 0;
273 for (int i=0; i<2; i++) fRec5[i] = 0;
274 for (int i=0; i<2; i++) fVec9[i] = 0;
275 for (int i=0; i<2; i++) fRec41[i] = 0;
276 for (int i=0; i<2; i++) fRec40[i] = 0;
277 for (int i=0; i<2; i++) fRec39[i] = 0;
278 for (int i=0; i<2; i++) fRec4[i] = 0;
279 for (int i=0; i<2; i++) fRec3[i] = 0;
280 for (int i=0; i<2; i++) fVec10[i] = 0;
281 for (int i=0; i<2; i++) fRec42[i] = 0;
282 for (int i=0; i<2; i++) fRec2[i] = 0;
283 for (int i=0; i<2; i++) fRec1[i] = 0;
284 for (int i=0; i<2; i++) fRec63[i] = 0;
285 for (int i=0; i<32768; i++) fVec11[i] = 0;
286 for (int i=0; i<2; i++) fRec62[i] = 0;
287 for (int i=0; i<2; i++) fRec61[i] = 0;
288 for (int i=0; i<3; i++) fRec60[i] = 0;
289 for (int i=0; i<2; i++) fVec12[i] = 0;
290 for (int i=0; i<2; i++) fRec59[i] = 0;
291 for (int i=0; i<2; i++) fRec58[i] = 0;
292 for (int i=0; i<3; i++) fRec57[i] = 0;
293 for (int i=0; i<2; i++) fVec13[i] = 0;
294 for (int i=0; i<2; i++) fRec56[i] = 0;
295 for (int i=0; i<3; i++) fRec55[i] = 0;
296 for (int i=0; i<3; i++) fRec54[i] = 0;
297 for (int i=0; i<2; i++) fRec67[i] = 0;
298 for (int i=0; i<3; i++) fRec66[i] = 0;
299 for (int i=0; i<2; i++) fVec14[i] = 0;
300 for (int i=0; i<2; i++) fRec65[i] = 0;
301 for (int i=0; i<3; i++) fRec64[i] = 0;
302 for (int i=0; i<2; i++) fRec71[i] = 0;
303 for (int i=0; i<3; i++) fRec70[i] = 0;
304 for (int i=0; i<3; i++) fRec69[i] = 0;
305 for (int i=0; i<3; i++) fRec68[i] = 0;
306 for (int i=0; i<2; i++) fRec73[i] = 0;
307 for (int i=0; i<3; i++) fRec72[i] = 0;
308 for (int i=0; i<2; i++) fVec15[i] = 0;
309 for (int i=0; i<2; i++) fRec53[i] = 0;
310 for (int i=0; i<2; i++) fVec16[i] = 0;
311 for (int i=0; i<2; i++) fRec74[i] = 0;
312 for (int i=0; i<2; i++) fRec52[i] = 0;
313 for (int i=0; i<2; i++) fRec51[i] = 0;
314 for (int i=0; i<2; i++) fVec17[i] = 0;
315 for (int i=0; i<2; i++) fRec77[i] = 0;
316 for (int i=0; i<2; i++) fRec76[i] = 0;
317 for (int i=0; i<2; i++) fRec75[i] = 0;
318 for (int i=0; i<2; i++) fRec50[i] = 0;
319 for (int i=0; i<2; i++) fVec18[i] = 0;
320 for (int i=0; i<2; i++) fRec49[i] = 0;
321 for (int i=0; i<2; i++) fVec19[i] = 0;
322 for (int i=0; i<2; i++) fRec78[i] = 0;
323 for (int i=0; i<2; i++) fRec48[i] = 0;
324 for (int i=0; i<2; i++) fRec47[i] = 0;
325 for (int i=0; i<2; i++) fVec20[i] = 0;
326 for (int i=0; i<2; i++) fRec81[i] = 0;
327 for (int i=0; i<2; i++) fRec80[i] = 0;
328 for (int i=0; i<2; i++) fRec79[i] = 0;
329 for (int i=0; i<2; i++) fRec46[i] = 0;
330 for (int i=0; i<2; i++) fRec45[i] = 0;
331 for (int i=0; i<2; i++) fVec21[i] = 0;
332 for (int i=0; i<2; i++) fRec82[i] = 0;
333 for (int i=0; i<2; i++) fRec44[i] = 0;
334 for (int i=0; i<2; i++) fRec43[i] = 0;
335 }
336
337 void Dsp::clear_state_f_static(PluginLV2 *p)
338 {
339 static_cast<Dsp*>(p)->clear_state_f();
340 }
341
342 inline void Dsp::init(uint32_t samplingFreq)
343 {
344 fSamplingFreq = samplingFreq;
345 iConst0 = min(192000, max(1, fSamplingFreq));
346 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
347 fConst2 = (1 + fConst1);
348 fConst3 = (0 - ((1 - fConst1) / fConst2));
349 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
350 fConst5 = (1 + fConst4);
351 fConst6 = (0 - ((1 - fConst4) / fConst5));
352 fConst7 = tan((942.4777960769379 / iConst0));
353 fConst8 = (1.0 / faustpower<2>(fConst7));
354 fConst9 = (2 * (1 - fConst8));
355 fConst10 = (1.0 / fConst7);
356 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
357 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
358 fConst13 = tan((3769.9111843077517 / iConst0));
359 fConst14 = (1.0 / faustpower<2>(fConst13));
360 fConst15 = (2 * (1 - fConst14));
361 fConst16 = (1.0 / fConst13);
362 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
363 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
364 fConst19 = (1.0 / fConst18);
365 fConst20 = (1 + fConst16);
366 fConst21 = (0 - ((1 - fConst16) / fConst20));
367 fConst22 = tan((10053.096491487338 / iConst0));
368 fConst23 = (1.0 / faustpower<2>(fConst22));
369 fConst24 = (2 * (1 - fConst23));
370 fConst25 = (1.0 / fConst22);
371 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
372 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
373 fConst28 = (1.0 / fConst27);
374 fConst29 = (1 + fConst25);
375 fConst30 = (0 - ((1 - fConst25) / fConst29));
376 fConst31 = tan((47123.8898038469 / iConst0));
377 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
378 fConst33 = (1.0 / fConst31);
379 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
380 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
381 fConst36 = (1.0 / fConst35);
382 IOTA = 0;
383 iConst37 = int((int((0.1111111111111111 * iConst0)) & 65535));
384 fConst38 = (0.009000000000000008 / iConst0);
385 fConst39 = (0 - fConst1);
386 fConst40 = (1.0 / (fConst2 * fConst35));
387 fConst41 = (1.0 / fConst29);
388 fConst42 = (0 - fConst16);
389 fConst43 = (1.0 / (fConst20 * fConst27));
390 fConst44 = (2 * (0 - fConst14));
391 fConst45 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
392 fConst46 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
393 fConst47 = (1 + fConst10);
394 fConst48 = (0 - ((1 - fConst10) / fConst47));
395 fConst49 = (0 - fConst10);
396 fConst50 = (1.0 / (fConst47 * fConst18));
397 fConst51 = (2 * (0 - fConst8));
398 fConst52 = (1 + ((fConst16 - 1.0) / fConst13));
399 fConst53 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
400 fConst54 = (0 - fConst25);
401 fConst55 = (2 * (0 - fConst23));
402 fConst56 = (1.0 / fConst5);
403 fConst57 = (1.0 / tan((270.1769682087222 / iConst0)));
404 fConst58 = (1 + fConst57);
405 fConst59 = (0 - ((1 - fConst57) / fConst58));
406 fConst60 = (1.0 / fConst58);
407 fConst61 = (0.025 / fConst2);
408 fConst62 = (1.0 / tan((414.6902302738527 / iConst0)));
409 fConst63 = (1 + fConst62);
410 fConst64 = (0 - ((1 - fConst62) / fConst63));
411 fConst65 = (1.0 / fConst63);
412 fConst66 = (1.0 / tan((609.4689747964198 / iConst0)));
413 fConst67 = (1 + fConst66);
414 fConst68 = (0 - ((1 - fConst66) / fConst67));
415 fConst69 = (1.0 / fConst67);
416 clear_state_f();
417 }
418
419 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
420 {
421 static_cast<Dsp*>(p)->init(samplingFreq);
422 }
423
424 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
425 {
426 #define fslider0 (*fslider0_)
427 #define fslider1 (*fslider1_)
428 #define fslider2 (*fslider2_)
429 #define fslider3 (*fslider3_)
430 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
431 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
432 double fSlow2 = (1.000000000000001e-05 * fslider2);
433 double fSlow3 = fslider3;
434 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
435 double fSlow5 = pow(1e+01,(2 * fSlow3));
436 double fSlow6 = (fConst46 * fSlow5);
437 double fSlow7 = pow(1e+01,(0.8 * fSlow3));
438 double fSlow8 = (fConst46 * pow(1e+01,(0.9 * fSlow3)));
439 double fSlow9 = (2 * (fSlow3 - 0.5));
440 double fSlow10 = (1 - max(0, (0 - fSlow9)));
441 double fSlow11 = (1.25 * fSlow3);
442 double fSlow12 = (0.024937655860349125 * (1 - max(0, fSlow9)));
443 for (int i=0; i<count; i++) {
444 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
445 fRec8[0] = (fSlow1 + (0.999 * fRec8[1]));
446 double fTemp0 = (fConst9 * fRec13[1]);
447 double fTemp1 = (double)input0[i];
448 double fTemp2 = fabs(fTemp1);
449 fRec22[0] = ((9.999999999998899e-05 * fTemp2) + (0.9999 * fRec22[1]));
450 double fTemp3 = max(fRec22[0], fTemp2);
451 fVec0[IOTA&32767] = fTemp3;
452 fRec21[0] = ((fVec0[IOTA&32767] + fRec21[1]) - fVec0[(IOTA-iConst37)&32767]);
453 fRec20[0] = ((fConst38 * fRec21[0]) + (0.999 * fRec20[1]));
454 double fTemp4 = max(-1, min(-0.01, (fVec0[IOTA&32767] - (1.0 + (1.02 * fRec20[0])))));
455 double fTemp5 = (0 - fTemp4);
456 double fTemp6 = (40.1 * fTemp5);
457 double fTemp7 = max(-600, fTemp6);
458 double fTemp8 = (0 - fTemp7);
459 double fTemp9 = (fTemp1 - fTemp4);
460 double fTemp10 = (40.1 * fTemp9);
461 double fTemp11 = max(-600, fTemp10);
462 double fTemp12 = (0 - fTemp11);
463 double fTemp13 = (((int((fabs(fTemp10) > 0.0001)))?((int((fTemp11 < -50)))?(exp(fTemp11) * fTemp12):(fTemp11 / (1 - exp(fTemp12)))):(1 + (fTemp9 * (20.05 + (134.00083333333336 * fTemp9))))) - ((int((fabs(fTemp6) > 0.0001)))?((int((fTemp7 < -50)))?(exp(fTemp7) * fTemp8):(fTemp7 / (1 - exp(fTemp8)))):(1 + (fTemp5 * (20.05 + (134.00083333333336 * fTemp5))))));
464 fRec23[0] = (fSlow2 + (0.999 * fRec23[1]));
465 double fTemp14 = (0.024937655860349125 * (fRec23[0] * fTemp13));
466 fRec19[0] = (fTemp14 - (fConst36 * ((fConst34 * fRec19[2]) + (fConst32 * fRec19[1]))));
467 double fTemp15 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
468 fVec1[0] = fTemp15;
469 fRec18[0] = ((fConst40 * ((fConst39 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
470 fRec17[0] = ((fConst41 * (fRec18[0] + fRec18[1])) + (fConst30 * fRec17[1]));
471 fRec16[0] = (fRec17[0] - (fConst28 * ((fConst26 * fRec16[2]) + (fConst24 * fRec16[1]))));
472 double fTemp16 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
473 fVec2[0] = fTemp16;
474 fRec15[0] = ((fConst43 * ((fConst42 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst21 * fRec15[1]));
475 fRec14[0] = (fRec15[0] - (fConst19 * ((fConst17 * fRec14[2]) + (fConst15 * fRec14[1]))));
476 fRec13[0] = ((fConst19 * (((fConst14 * fRec14[0]) + (fConst44 * fRec14[1])) + (fConst14 * fRec14[2]))) - (fConst12 * ((fConst11 * fRec13[2]) + fTemp0)));
477 double fTemp17 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst12 * (fTemp0 + (fConst11 * fRec13[0])))))));
478 fRec27[0] = ((fConst43 * (fVec2[0] + fVec2[1])) + (fConst21 * fRec27[1]));
479 fRec26[0] = (fRec27[0] - (fConst19 * ((fConst17 * fRec26[2]) + (fConst15 * fRec26[1]))));
480 double fTemp18 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
481 fVec3[0] = fTemp18;
482 fRec25[0] = ((fConst50 * ((fConst49 * fVec3[1]) + (fConst10 * fVec3[0]))) + (fConst48 * fRec25[1]));
483 fRec24[0] = (fRec25[0] - (fConst46 * ((fConst45 * fRec24[2]) + (fConst9 * fRec24[1]))));
484 double fTemp19 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec24[0]) + (fConst51 * fRec24[1])) + (fConst8 * fRec24[2])))));
485 double fTemp20 = (fConst9 * fRec28[1]);
486 double fTemp21 = (fConst15 * fRec29[1]);
487 fRec31[0] = ((fConst41 * ((fConst54 * fRec18[1]) + (fConst25 * fRec18[0]))) + (fConst30 * fRec31[1]));
488 fRec30[0] = (fRec31[0] - (fConst28 * ((fConst26 * fRec30[2]) + (fConst24 * fRec30[1]))));
489 fRec29[0] = ((fConst28 * (((fConst23 * fRec30[0]) + (fConst55 * fRec30[1])) + (fConst23 * fRec30[2]))) - (fConst53 * ((fConst52 * fRec29[2]) + fTemp21)));
490 fRec28[0] = ((fRec29[2] + (fConst53 * (fTemp21 + (fConst52 * fRec29[0])))) - (fConst12 * ((fConst11 * fRec28[2]) + fTemp20)));
491 double fTemp22 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fConst12 * (fTemp20 + (fConst11 * fRec28[0])))))));
492 fRec33[0] = ((fConst50 * (fVec3[0] + fVec3[1])) + (fConst48 * fRec33[1]));
493 fRec32[0] = (fRec33[0] - (fConst46 * ((fConst45 * fRec32[2]) + (fConst9 * fRec32[1]))));
494 double fTemp23 = max(-1, min(1, (fSlow8 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
495 double fTemp24 = ((1.2589412 * (fTemp23 * (1 - (0.3333333333333333 * faustpower<2>(fTemp23))))) + (1.584893192 * ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + ((fTemp19 * (1 - (0.3333333333333333 * faustpower<2>(fTemp19)))) + (0.8413951417869425 * (fTemp17 * (1 - (0.3333333333333333 * faustpower<2>(fTemp17)))))))));
496 fVec4[0] = fTemp24;
497 fRec12[0] = ((fConst56 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
498 double fTemp25 = (1e-15 + (0.027 * fRec11[1]));
499 fVec5[0] = fTemp25;
500 fRec34[0] = ((fConst60 * (fVec5[0] + fVec5[1])) + (fConst59 * fRec34[1]));
501 double fTemp26 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp14)))));
502 double fTemp27 = (1 - fRec23[0]);
503 double fTemp28 = (fSlow12 * fRec23[0]);
504 fRec11[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fTemp13 * (fTemp28 + (fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp13))))) - 0.024937655860349125)))))) + ((0.5 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (fRec34[0] + (fSlow10 * fRec12[0])))) - 1.5816559999999988)) - 191.42014814814814);
505 fRec10[0] = ((fConst61 * ((fConst39 * fRec11[1]) + (fConst1 * fRec11[0]))) + (fConst3 * fRec10[1]));
506 double fTemp29 = (1e-15 + (0.015 * fRec36[1]));
507 fVec6[0] = fTemp29;
508 fRec37[0] = ((fConst65 * (fVec6[0] + fVec6[1])) + (fConst64 * fRec37[1]));
509 fRec36[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec37[0] + fRec9[1]) - 1.204284999999999)) - 169.71433333333334);
510 fRec35[0] = ((fConst61 * ((fConst39 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
511 fRec9[0] = ((0.6 * fRec35[0]) - fRec10[0]);
512 double fTemp30 = (fRec9[0] * fRec8[0]);
513 fVec7[0] = fTemp30;
514 fRec7[0] = ((fConst56 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec7[1]));
515 double fTemp31 = (1e-15 + (0.015 * fRec6[1]));
516 fVec8[0] = fTemp31;
517 fRec38[0] = ((fConst65 * (fVec8[0] + fVec8[1])) + (fConst64 * fRec38[1]));
518 fRec6[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec38[0] + fRec7[0]) - 1.204284999999999)) - 169.71433333333334);
519 fRec5[0] = ((fConst61 * ((fConst39 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
520 double fTemp32 = (1e-15 + (0.0082 * fRec40[1]));
521 fVec9[0] = fTemp32;
522 fRec41[0] = ((fConst69 * (fVec9[0] + fVec9[1])) + (fConst68 * fRec41[1]));
523 fRec40[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec41[0] + fRec4[1]) - 0.840701999999999)) - 147.47536585365856);
524 fRec39[0] = ((fConst61 * ((fConst39 * fRec40[1]) + (fConst1 * fRec40[0]))) + (fConst3 * fRec39[1]));
525 fRec4[0] = ((0.6 * fRec39[0]) + fRec5[0]);
526 fRec3[0] = ((fConst56 * (fRec4[0] + fRec4[1])) + (fConst6 * fRec3[1]));
527 double fTemp33 = (1e-15 + (0.0082 * fRec2[1]));
528 fVec10[0] = fTemp33;
529 fRec42[0] = ((fConst69 * (fVec10[0] + fVec10[1])) + (fConst68 * fRec42[1]));
530 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec42[0] + fRec3[0]) - 0.840701999999999)) - 147.47536585365856);
531 fRec1[0] = ((fConst61 * ((fConst39 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
532 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
533 double fTemp34 = (fConst9 * fRec54[1]);
534 double fTemp35 = (double)input1[i];
535 double fTemp36 = fabs(fTemp35);
536 fRec63[0] = ((9.999999999998899e-05 * fTemp36) + (0.9999 * fRec63[1]));
537 double fTemp37 = max(fRec63[0], fTemp36);
538 fVec11[IOTA&32767] = fTemp37;
539 fRec62[0] = ((fVec11[IOTA&32767] + fRec62[1]) - fVec11[(IOTA-iConst37)&32767]);
540 fRec61[0] = ((fConst38 * fRec62[0]) + (0.999 * fRec61[1]));
541 double fTemp38 = max(-1, min(-0.01, (fVec11[IOTA&32767] - (1.0 + (1.02 * fRec61[0])))));
542 double fTemp39 = (0 - fTemp38);
543 double fTemp40 = (40.1 * fTemp39);
544 double fTemp41 = max(-600, fTemp40);
545 double fTemp42 = (0 - fTemp41);
546 double fTemp43 = (fTemp35 - fTemp38);
547 double fTemp44 = (40.1 * fTemp43);
548 double fTemp45 = max(-600, fTemp44);
549 double fTemp46 = (0 - fTemp45);
550 double fTemp47 = (((int((fabs(fTemp44) > 0.0001)))?((int((fTemp45 < -50)))?(exp(fTemp45) * fTemp46):(fTemp45 / (1 - exp(fTemp46)))):(1 + (fTemp43 * (20.05 + (134.00083333333336 * fTemp43))))) - ((int((fabs(fTemp40) > 0.0001)))?((int((fTemp41 < -50)))?(exp(fTemp41) * fTemp42):(fTemp41 / (1 - exp(fTemp42)))):(1 + (fTemp39 * (20.05 + (134.00083333333336 * fTemp39))))));
551 double fTemp48 = (0.024937655860349125 * (fRec23[0] * fTemp47));
552 fRec60[0] = (fTemp48 - (fConst36 * ((fConst34 * fRec60[2]) + (fConst32 * fRec60[1]))));
553 double fTemp49 = (fRec60[2] + (fRec60[0] + (2 * fRec60[1])));
554 fVec12[0] = fTemp49;
555 fRec59[0] = ((fConst40 * ((fConst39 * fVec12[1]) + (fConst1 * fVec12[0]))) + (fConst3 * fRec59[1]));
556 fRec58[0] = ((fConst41 * (fRec59[0] + fRec59[1])) + (fConst30 * fRec58[1]));
557 fRec57[0] = (fRec58[0] - (fConst28 * ((fConst26 * fRec57[2]) + (fConst24 * fRec57[1]))));
558 double fTemp50 = (fRec57[2] + (fRec57[0] + (2 * fRec57[1])));
559 fVec13[0] = fTemp50;
560 fRec56[0] = ((fConst43 * ((fConst42 * fVec13[1]) + (fConst16 * fVec13[0]))) + (fConst21 * fRec56[1]));
561 fRec55[0] = (fRec56[0] - (fConst19 * ((fConst17 * fRec55[2]) + (fConst15 * fRec55[1]))));
562 fRec54[0] = ((fConst19 * (((fConst14 * fRec55[0]) + (fConst44 * fRec55[1])) + (fConst14 * fRec55[2]))) - (fConst12 * ((fConst11 * fRec54[2]) + fTemp34)));
563 double fTemp51 = max(-1, min(1, (fSlow4 * (fRec54[2] + (fConst12 * (fTemp34 + (fConst11 * fRec54[0])))))));
564 fRec67[0] = ((fConst43 * (fVec13[0] + fVec13[1])) + (fConst21 * fRec67[1]));
565 fRec66[0] = (fRec67[0] - (fConst19 * ((fConst17 * fRec66[2]) + (fConst15 * fRec66[1]))));
566 double fTemp52 = (fRec66[2] + (fRec66[0] + (2 * fRec66[1])));
567 fVec14[0] = fTemp52;
568 fRec65[0] = ((fConst50 * ((fConst49 * fVec14[1]) + (fConst10 * fVec14[0]))) + (fConst48 * fRec65[1]));
569 fRec64[0] = (fRec65[0] - (fConst46 * ((fConst45 * fRec64[2]) + (fConst9 * fRec64[1]))));
570 double fTemp53 = max(-1, min(1, (fSlow6 * (((fConst8 * fRec64[0]) + (fConst51 * fRec64[1])) + (fConst8 * fRec64[2])))));
571 double fTemp54 = (fConst9 * fRec68[1]);
572 double fTemp55 = (fConst15 * fRec69[1]);
573 fRec71[0] = ((fConst41 * ((fConst54 * fRec59[1]) + (fConst25 * fRec59[0]))) + (fConst30 * fRec71[1]));
574 fRec70[0] = (fRec71[0] - (fConst28 * ((fConst26 * fRec70[2]) + (fConst24 * fRec70[1]))));
575 fRec69[0] = ((fConst28 * (((fConst23 * fRec70[0]) + (fConst55 * fRec70[1])) + (fConst23 * fRec70[2]))) - (fConst53 * ((fConst52 * fRec69[2]) + fTemp55)));
576 fRec68[0] = ((fRec69[2] + (fConst53 * (fTemp55 + (fConst52 * fRec69[0])))) - (fConst12 * ((fConst11 * fRec68[2]) + fTemp54)));
577 double fTemp56 = max(-1, min(1, (fSlow7 * (fRec68[2] + (fConst12 * (fTemp54 + (fConst11 * fRec68[0])))))));
578 fRec73[0] = ((fConst50 * (fVec14[0] + fVec14[1])) + (fConst48 * fRec73[1]));
579 fRec72[0] = (fRec73[0] - (fConst46 * ((fConst45 * fRec72[2]) + (fConst9 * fRec72[1]))));
580 double fTemp57 = max(-1, min(1, (fSlow8 * (fRec72[2] + (fRec72[0] + (2 * fRec72[1]))))));
581 double fTemp58 = ((1.2589412 * (fTemp57 * (1 - (0.3333333333333333 * faustpower<2>(fTemp57))))) + (1.584893192 * ((fTemp56 * (1 - (0.3333333333333333 * faustpower<2>(fTemp56)))) + ((fTemp53 * (1 - (0.3333333333333333 * faustpower<2>(fTemp53)))) + (0.8413951417869425 * (fTemp51 * (1 - (0.3333333333333333 * faustpower<2>(fTemp51)))))))));
582 fVec15[0] = fTemp58;
583 fRec53[0] = ((fConst56 * (fVec15[0] + fVec15[1])) + (fConst6 * fRec53[1]));
584 double fTemp59 = (1e-15 + (0.027 * fRec52[1]));
585 fVec16[0] = fTemp59;
586 fRec74[0] = ((fConst60 * (fVec16[0] + fVec16[1])) + (fConst59 * fRec74[1]));
587 double fTemp60 = max(-1, min(1, (fSlow5 * max(-0.7, min(0.7, fTemp48)))));
588 fRec52[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fTemp47 * ((fTemp27 * (0.024937655860349125 + (fSlow11 * ((0.0997506234413965 - (0.0997506234413965 * fabs((0.024937655860349125 * (fTemp27 * fTemp47))))) - 0.024937655860349125)))) + fTemp28)) + ((0.5 * (fTemp60 * (1 - (0.3333333333333333 * faustpower<2>(fTemp60))))) + (fRec74[0] + (fSlow10 * fRec53[0])))) - 1.5816559999999988)) - 191.42014814814814);
589 fRec51[0] = ((fConst61 * ((fConst39 * fRec52[1]) + (fConst1 * fRec52[0]))) + (fConst3 * fRec51[1]));
590 double fTemp61 = (1e-15 + (0.015 * fRec76[1]));
591 fVec17[0] = fTemp61;
592 fRec77[0] = ((fConst65 * (fVec17[0] + fVec17[1])) + (fConst64 * fRec77[1]));
593 fRec76[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec77[0] + fRec50[1]) - 1.204284999999999)) - 169.71433333333334);
594 fRec75[0] = ((fConst61 * ((fConst39 * fRec76[1]) + (fConst1 * fRec76[0]))) + (fConst3 * fRec75[1]));
595 fRec50[0] = ((0.6 * fRec75[0]) - fRec51[0]);
596 double fTemp62 = (fRec8[0] * fRec50[0]);
597 fVec18[0] = fTemp62;
598 fRec49[0] = ((fConst56 * (fVec18[0] + fVec18[1])) + (fConst6 * fRec49[1]));
599 double fTemp63 = (1e-15 + (0.015 * fRec48[1]));
600 fVec19[0] = fTemp63;
601 fRec78[0] = ((fConst65 * (fVec19[0] + fVec19[1])) + (fConst64 * fRec78[1]));
602 fRec48[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec78[0] + fRec49[0]) - 1.204284999999999)) - 169.71433333333334);
603 fRec47[0] = ((fConst61 * ((fConst39 * fRec48[1]) + (fConst1 * fRec48[0]))) + (fConst3 * fRec47[1]));
604 double fTemp64 = (1e-15 + (0.0082 * fRec80[1]));
605 fVec20[0] = fTemp64;
606 fRec81[0] = ((fConst69 * (fVec20[0] + fVec20[1])) + (fConst68 * fRec81[1]));
607 fRec80[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec81[0] + fRec46[1]) - 0.840701999999999)) - 147.47536585365856);
608 fRec79[0] = ((fConst61 * ((fConst39 * fRec80[1]) + (fConst1 * fRec80[0]))) + (fConst3 * fRec79[1]));
609 fRec46[0] = ((0.6 * fRec79[0]) + fRec47[0]);
610 fRec45[0] = ((fConst56 * (fRec46[0] + fRec46[1])) + (fConst6 * fRec45[1]));
611 double fTemp65 = (1e-15 + (0.0082 * fRec44[1]));
612 fVec21[0] = fTemp65;
613 fRec82[0] = ((fConst69 * (fVec21[0] + fVec21[1])) + (fConst68 * fRec82[1]));
614 fRec44[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec82[0] + fRec45[0]) - 0.840701999999999)) - 147.47536585365856);
615 fRec43[0] = ((fConst61 * ((fConst39 * fRec44[1]) + (fConst1 * fRec44[0]))) + (fConst3 * fRec43[1]));
616 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec43[0]);
617 // post processing
618 fRec43[1] = fRec43[0];
619 fRec44[1] = fRec44[0];
620 fRec82[1] = fRec82[0];
621 fVec21[1] = fVec21[0];
622 fRec45[1] = fRec45[0];
623 fRec46[1] = fRec46[0];
624 fRec79[1] = fRec79[0];
625 fRec80[1] = fRec80[0];
626 fRec81[1] = fRec81[0];
627 fVec20[1] = fVec20[0];
628 fRec47[1] = fRec47[0];
629 fRec48[1] = fRec48[0];
630 fRec78[1] = fRec78[0];
631 fVec19[1] = fVec19[0];
632 fRec49[1] = fRec49[0];
633 fVec18[1] = fVec18[0];
634 fRec50[1] = fRec50[0];
635 fRec75[1] = fRec75[0];
636 fRec76[1] = fRec76[0];
637 fRec77[1] = fRec77[0];
638 fVec17[1] = fVec17[0];
639 fRec51[1] = fRec51[0];
640 fRec52[1] = fRec52[0];
641 fRec74[1] = fRec74[0];
642 fVec16[1] = fVec16[0];
643 fRec53[1] = fRec53[0];
644 fVec15[1] = fVec15[0];
645 fRec72[2] = fRec72[1]; fRec72[1] = fRec72[0];
646 fRec73[1] = fRec73[0];
647 fRec68[2] = fRec68[1]; fRec68[1] = fRec68[0];
648 fRec69[2] = fRec69[1]; fRec69[1] = fRec69[0];
649 fRec70[2] = fRec70[1]; fRec70[1] = fRec70[0];
650 fRec71[1] = fRec71[0];
651 fRec64[2] = fRec64[1]; fRec64[1] = fRec64[0];
652 fRec65[1] = fRec65[0];
653 fVec14[1] = fVec14[0];
654 fRec66[2] = fRec66[1]; fRec66[1] = fRec66[0];
655 fRec67[1] = fRec67[0];
656 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
657 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
658 fRec56[1] = fRec56[0];
659 fVec13[1] = fVec13[0];
660 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
661 fRec58[1] = fRec58[0];
662 fRec59[1] = fRec59[0];
663 fVec12[1] = fVec12[0];
664 fRec60[2] = fRec60[1]; fRec60[1] = fRec60[0];
665 fRec61[1] = fRec61[0];
666 fRec62[1] = fRec62[0];
667 fRec63[1] = fRec63[0];
668 fRec1[1] = fRec1[0];
669 fRec2[1] = fRec2[0];
670 fRec42[1] = fRec42[0];
671 fVec10[1] = fVec10[0];
672 fRec3[1] = fRec3[0];
673 fRec4[1] = fRec4[0];
674 fRec39[1] = fRec39[0];
675 fRec40[1] = fRec40[0];
676 fRec41[1] = fRec41[0];
677 fVec9[1] = fVec9[0];
678 fRec5[1] = fRec5[0];
679 fRec6[1] = fRec6[0];
680 fRec38[1] = fRec38[0];
681 fVec8[1] = fVec8[0];
682 fRec7[1] = fRec7[0];
683 fVec7[1] = fVec7[0];
684 fRec9[1] = fRec9[0];
685 fRec35[1] = fRec35[0];
686 fRec36[1] = fRec36[0];
687 fRec37[1] = fRec37[0];
688 fVec6[1] = fVec6[0];
689 fRec10[1] = fRec10[0];
690 fRec11[1] = fRec11[0];
691 fRec34[1] = fRec34[0];
692 fVec5[1] = fVec5[0];
693 fRec12[1] = fRec12[0];
694 fVec4[1] = fVec4[0];
695 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
696 fRec33[1] = fRec33[0];
697 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
698 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
699 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
700 fRec31[1] = fRec31[0];
701 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
702 fRec25[1] = fRec25[0];
703 fVec3[1] = fVec3[0];
704 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
705 fRec27[1] = fRec27[0];
706 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
707 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
708 fRec15[1] = fRec15[0];
709 fVec2[1] = fVec2[0];
710 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
711 fRec17[1] = fRec17[0];
712 fRec18[1] = fRec18[0];
713 fVec1[1] = fVec1[0];
714 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
715 fRec23[1] = fRec23[0];
716 fRec20[1] = fRec20[0];
717 fRec21[1] = fRec21[0];
718 IOTA = IOTA+1;
719 fRec22[1] = fRec22[0];
720 fRec8[1] = fRec8[0];
721 fRec0[1] = fRec0[0];
722 }
723 #undef fslider0
724 #undef fslider1
725 #undef fslider2
726 #undef fslider3
727 }
728
729 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
730 {
731 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
732 }
733
734
735 void Dsp::connect(uint32_t port,void* data)
736 {
737 switch ((PortIndex)port)
738 {
739 case DRIVE:
740 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
741 break;
742 case WET_DRY:
743 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
744 break;
745 case PREGAIN:
746 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
747 break;
748 case GAIN1:
749 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
750 break;
751 default:
752 break;
753 }
754 }
755
756 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
757 {
758 static_cast<Dsp*>(p)->connect(port, data);
759 }
760
761
762 PluginLV2 *plugin() {
763 return new Dsp();
764 }
765
766 void Dsp::del_instance(PluginLV2 *p)
767 {
768 delete static_cast<Dsp*>(p);
769 }
770
771 /*
772 typedef enum
773 {
774 DRIVE,
775 WET_DRY,
776 PREGAIN,
777 GAIN1,
778 } PortIndex;
779 */
780
781 } // end namespace gxamp9_stereo
0 // generated from file '../src/LV2/faust/gxamp_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxamp_stereo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fRec7[2];
23 FAUSTFLOAT fslider2;
24 FAUSTFLOAT *fslider2_;
25 double fRec10[2];
26 double fConst7;
27 double fConst8;
28 double fConst9;
29 double fVec0[2];
30 double fConst10;
31 double fRec11[2];
32 double fConst11;
33 double fConst12;
34 double fConst13;
35 double fConst14;
36 double fConst15;
37 double fConst16;
38 double fConst17;
39 double fConst18;
40 double fConst19;
41 double fConst20;
42 double fConst21;
43 double fConst22;
44 double fConst23;
45 double fConst24;
46 double fConst25;
47 double fConst26;
48 double fConst27;
49 double fConst28;
50 double fConst29;
51 double fConst30;
52 double fConst31;
53 double fConst32;
54 double fConst33;
55 double fConst34;
56 double fConst35;
57 double fConst36;
58 double fConst37;
59 double fConst38;
60 double fConst39;
61 double fConst40;
62 double fRec19[3];
63 double fVec1[2];
64 double fConst41;
65 double fConst42;
66 double fRec18[2];
67 double fConst43;
68 double fRec17[2];
69 double fRec16[3];
70 double fVec2[2];
71 double fConst44;
72 double fConst45;
73 double fRec15[2];
74 double fRec14[3];
75 double fConst46;
76 double fRec13[3];
77 FAUSTFLOAT fslider3;
78 FAUSTFLOAT *fslider3_;
79 double fConst47;
80 double fConst48;
81 double fConst49;
82 double fConst50;
83 double fRec23[2];
84 double fRec22[3];
85 double fVec3[2];
86 double fConst51;
87 double fConst52;
88 double fRec21[2];
89 double fRec20[3];
90 double fConst53;
91 double fConst54;
92 double fConst55;
93 double fConst56;
94 double fRec27[2];
95 double fRec26[3];
96 double fConst57;
97 double fRec25[3];
98 double fRec24[3];
99 double fRec29[2];
100 double fRec28[3];
101 double fVec4[2];
102 double fConst58;
103 double fRec12[2];
104 double fRec9[2];
105 double fConst59;
106 double fRec8[2];
107 double fVec5[2];
108 double fRec6[2];
109 double fConst60;
110 double fConst61;
111 double fConst62;
112 double fVec6[2];
113 double fConst63;
114 double fRec30[2];
115 double fRec5[2];
116 double fRec4[2];
117 double fVec7[2];
118 double fRec3[2];
119 double fConst64;
120 double fConst65;
121 double fConst66;
122 double fVec8[2];
123 double fConst67;
124 double fRec31[2];
125 double fRec2[2];
126 double fRec1[2];
127 double fVec9[2];
128 double fRec40[2];
129 double fRec48[3];
130 double fVec10[2];
131 double fRec47[2];
132 double fRec46[2];
133 double fRec45[3];
134 double fVec11[2];
135 double fRec44[2];
136 double fRec43[3];
137 double fRec42[3];
138 double fRec52[2];
139 double fRec51[3];
140 double fVec12[2];
141 double fRec50[2];
142 double fRec49[3];
143 double fRec56[2];
144 double fRec55[3];
145 double fRec54[3];
146 double fRec53[3];
147 double fRec58[2];
148 double fRec57[3];
149 double fVec13[2];
150 double fRec41[2];
151 double fRec39[2];
152 double fRec38[2];
153 double fVec14[2];
154 double fRec37[2];
155 double fVec15[2];
156 double fRec59[2];
157 double fRec36[2];
158 double fRec35[2];
159 double fVec16[2];
160 double fRec34[2];
161 double fVec17[2];
162 double fRec60[2];
163 double fRec33[2];
164 double fRec32[2];
165 void connect(uint32_t port,void* data);
166 void clear_state_f();
167 void init(uint32_t samplingFreq);
168 void compute(int count, float *input0, float *input1, float *output0, float *output1);
169
170 static void clear_state_f_static(PluginLV2*);
171 static void init_static(uint32_t samplingFreq, PluginLV2*);
172 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
173 static void del_instance(PluginLV2 *p);
174 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
175 public:
176 Dsp();
177 ~Dsp();
178 };
179
180
181
182 Dsp::Dsp()
183 : PluginLV2() {
184 version = PLUGINLV2_VERSION;
185 id = "12ax7";
186 name = N_("12ax7");
187 mono_audio = 0;
188 stereo_audio = compute_static;
189 set_samplerate = init_static;
190 activate_plugin = 0;
191 connect_ports = connect_static;
192 clear_state = clear_state_f_static;
193 delete_instance = del_instance;
194 }
195
196 Dsp::~Dsp() {
197 }
198
199 inline void Dsp::clear_state_f()
200 {
201 for (int i=0; i<2; i++) fRec0[i] = 0;
202 for (int i=0; i<2; i++) fRec7[i] = 0;
203 for (int i=0; i<2; i++) fRec10[i] = 0;
204 for (int i=0; i<2; i++) fVec0[i] = 0;
205 for (int i=0; i<2; i++) fRec11[i] = 0;
206 for (int i=0; i<3; i++) fRec19[i] = 0;
207 for (int i=0; i<2; i++) fVec1[i] = 0;
208 for (int i=0; i<2; i++) fRec18[i] = 0;
209 for (int i=0; i<2; i++) fRec17[i] = 0;
210 for (int i=0; i<3; i++) fRec16[i] = 0;
211 for (int i=0; i<2; i++) fVec2[i] = 0;
212 for (int i=0; i<2; i++) fRec15[i] = 0;
213 for (int i=0; i<3; i++) fRec14[i] = 0;
214 for (int i=0; i<3; i++) fRec13[i] = 0;
215 for (int i=0; i<2; i++) fRec23[i] = 0;
216 for (int i=0; i<3; i++) fRec22[i] = 0;
217 for (int i=0; i<2; i++) fVec3[i] = 0;
218 for (int i=0; i<2; i++) fRec21[i] = 0;
219 for (int i=0; i<3; i++) fRec20[i] = 0;
220 for (int i=0; i<2; i++) fRec27[i] = 0;
221 for (int i=0; i<3; i++) fRec26[i] = 0;
222 for (int i=0; i<3; i++) fRec25[i] = 0;
223 for (int i=0; i<3; i++) fRec24[i] = 0;
224 for (int i=0; i<2; i++) fRec29[i] = 0;
225 for (int i=0; i<3; i++) fRec28[i] = 0;
226 for (int i=0; i<2; i++) fVec4[i] = 0;
227 for (int i=0; i<2; i++) fRec12[i] = 0;
228 for (int i=0; i<2; i++) fRec9[i] = 0;
229 for (int i=0; i<2; i++) fRec8[i] = 0;
230 for (int i=0; i<2; i++) fVec5[i] = 0;
231 for (int i=0; i<2; i++) fRec6[i] = 0;
232 for (int i=0; i<2; i++) fVec6[i] = 0;
233 for (int i=0; i<2; i++) fRec30[i] = 0;
234 for (int i=0; i<2; i++) fRec5[i] = 0;
235 for (int i=0; i<2; i++) fRec4[i] = 0;
236 for (int i=0; i<2; i++) fVec7[i] = 0;
237 for (int i=0; i<2; i++) fRec3[i] = 0;
238 for (int i=0; i<2; i++) fVec8[i] = 0;
239 for (int i=0; i<2; i++) fRec31[i] = 0;
240 for (int i=0; i<2; i++) fRec2[i] = 0;
241 for (int i=0; i<2; i++) fRec1[i] = 0;
242 for (int i=0; i<2; i++) fVec9[i] = 0;
243 for (int i=0; i<2; i++) fRec40[i] = 0;
244 for (int i=0; i<3; i++) fRec48[i] = 0;
245 for (int i=0; i<2; i++) fVec10[i] = 0;
246 for (int i=0; i<2; i++) fRec47[i] = 0;
247 for (int i=0; i<2; i++) fRec46[i] = 0;
248 for (int i=0; i<3; i++) fRec45[i] = 0;
249 for (int i=0; i<2; i++) fVec11[i] = 0;
250 for (int i=0; i<2; i++) fRec44[i] = 0;
251 for (int i=0; i<3; i++) fRec43[i] = 0;
252 for (int i=0; i<3; i++) fRec42[i] = 0;
253 for (int i=0; i<2; i++) fRec52[i] = 0;
254 for (int i=0; i<3; i++) fRec51[i] = 0;
255 for (int i=0; i<2; i++) fVec12[i] = 0;
256 for (int i=0; i<2; i++) fRec50[i] = 0;
257 for (int i=0; i<3; i++) fRec49[i] = 0;
258 for (int i=0; i<2; i++) fRec56[i] = 0;
259 for (int i=0; i<3; i++) fRec55[i] = 0;
260 for (int i=0; i<3; i++) fRec54[i] = 0;
261 for (int i=0; i<3; i++) fRec53[i] = 0;
262 for (int i=0; i<2; i++) fRec58[i] = 0;
263 for (int i=0; i<3; i++) fRec57[i] = 0;
264 for (int i=0; i<2; i++) fVec13[i] = 0;
265 for (int i=0; i<2; i++) fRec41[i] = 0;
266 for (int i=0; i<2; i++) fRec39[i] = 0;
267 for (int i=0; i<2; i++) fRec38[i] = 0;
268 for (int i=0; i<2; i++) fVec14[i] = 0;
269 for (int i=0; i<2; i++) fRec37[i] = 0;
270 for (int i=0; i<2; i++) fVec15[i] = 0;
271 for (int i=0; i<2; i++) fRec59[i] = 0;
272 for (int i=0; i<2; i++) fRec36[i] = 0;
273 for (int i=0; i<2; i++) fRec35[i] = 0;
274 for (int i=0; i<2; i++) fVec16[i] = 0;
275 for (int i=0; i<2; i++) fRec34[i] = 0;
276 for (int i=0; i<2; i++) fVec17[i] = 0;
277 for (int i=0; i<2; i++) fRec60[i] = 0;
278 for (int i=0; i<2; i++) fRec33[i] = 0;
279 for (int i=0; i<2; i++) fRec32[i] = 0;
280 }
281
282 void Dsp::clear_state_f_static(PluginLV2 *p)
283 {
284 static_cast<Dsp*>(p)->clear_state_f();
285 }
286
287 inline void Dsp::init(uint32_t samplingFreq)
288 {
289 fSamplingFreq = samplingFreq;
290 iConst0 = min(192000, max(1, fSamplingFreq));
291 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
292 fConst2 = (1 + fConst1);
293 fConst3 = (0 - ((1 - fConst1) / fConst2));
294 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
295 fConst5 = (1 + fConst4);
296 fConst6 = (0 - ((1 - fConst4) / fConst5));
297 fConst7 = (1.0 / tan((270.1769682087222 / iConst0)));
298 fConst8 = (1 + fConst7);
299 fConst9 = (0 - ((1 - fConst7) / fConst8));
300 fConst10 = (1.0 / fConst8);
301 fConst11 = tan((942.4777960769379 / iConst0));
302 fConst12 = (1.0 / faustpower<2>(fConst11));
303 fConst13 = (2 * (1 - fConst12));
304 fConst14 = (1.0 / fConst11);
305 fConst15 = (1 + ((fConst14 - 1.0) / fConst11));
306 fConst16 = (1.0 / (1 + ((1.0 + fConst14) / fConst11)));
307 fConst17 = tan((3769.9111843077517 / iConst0));
308 fConst18 = (1.0 / faustpower<2>(fConst17));
309 fConst19 = (2 * (1 - fConst18));
310 fConst20 = (1.0 / fConst17);
311 fConst21 = (1 + ((fConst20 - 1.0000000000000004) / fConst17));
312 fConst22 = (1 + ((fConst20 + 1.0000000000000004) / fConst17));
313 fConst23 = (1.0 / fConst22);
314 fConst24 = (1 + fConst20);
315 fConst25 = (0 - ((1 - fConst20) / fConst24));
316 fConst26 = tan((10053.096491487338 / iConst0));
317 fConst27 = (1.0 / faustpower<2>(fConst26));
318 fConst28 = (2 * (1 - fConst27));
319 fConst29 = (1.0 / fConst26);
320 fConst30 = (1 + ((fConst29 - 1.0000000000000004) / fConst26));
321 fConst31 = (1 + ((1.0000000000000004 + fConst29) / fConst26));
322 fConst32 = (1.0 / fConst31);
323 fConst33 = (1 + fConst29);
324 fConst34 = (0 - ((1 - fConst29) / fConst33));
325 fConst35 = tan((47123.8898038469 / iConst0));
326 fConst36 = (2 * (1 - (1.0 / faustpower<2>(fConst35))));
327 fConst37 = (1.0 / fConst35);
328 fConst38 = (1 + ((fConst37 - 1.414213562373095) / fConst35));
329 fConst39 = (1 + ((1.414213562373095 + fConst37) / fConst35));
330 fConst40 = (1.0 / fConst39);
331 fConst41 = (0 - fConst1);
332 fConst42 = (1.0 / (fConst2 * fConst39));
333 fConst43 = (1.0 / fConst33);
334 fConst44 = (0 - fConst20);
335 fConst45 = (1.0 / (fConst24 * fConst31));
336 fConst46 = (2 * (0 - fConst18));
337 fConst47 = (1 + ((fConst14 - 1.0000000000000004) / fConst11));
338 fConst48 = (1.0 / (1 + ((fConst14 + 1.0000000000000004) / fConst11)));
339 fConst49 = (1 + fConst14);
340 fConst50 = (0 - ((1 - fConst14) / fConst49));
341 fConst51 = (0 - fConst14);
342 fConst52 = (1.0 / (fConst49 * fConst22));
343 fConst53 = (2 * (0 - fConst12));
344 fConst54 = (1 + ((fConst20 - 1.0) / fConst17));
345 fConst55 = (1.0 / (1 + ((1.0 + fConst20) / fConst17)));
346 fConst56 = (0 - fConst29);
347 fConst57 = (2 * (0 - fConst27));
348 fConst58 = (1.0 / fConst5);
349 fConst59 = (0.025 / fConst2);
350 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
351 fConst61 = (1 + fConst60);
352 fConst62 = (0 - ((1 - fConst60) / fConst61));
353 fConst63 = (1.0 / fConst61);
354 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
355 fConst65 = (1 + fConst64);
356 fConst66 = (0 - ((1 - fConst64) / fConst65));
357 fConst67 = (1.0 / fConst65);
358 clear_state_f();
359 }
360
361 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
362 {
363 static_cast<Dsp*>(p)->init(samplingFreq);
364 }
365
366 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
367 {
368 #define fslider0 (*fslider0_)
369 #define fslider1 (*fslider1_)
370 #define fslider2 (*fslider2_)
371 #define fslider3 (*fslider3_)
372 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
373 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
374 double fSlow2 = (1.000000000000001e-05 * fslider2);
375 double fSlow3 = fslider3;
376 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
377 double fSlow5 = (fConst48 * pow(1e+01,(2 * fSlow3)));
378 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
379 double fSlow7 = (fConst48 * pow(1e+01,(0.9 * fSlow3)));
380 double fSlow8 = (2 * (fSlow3 - 0.5));
381 double fSlow9 = (1 - max(0, (0 - fSlow8)));
382 double fSlow10 = (1 - max(0, fSlow8));
383 double fSlow11 = (1.25 * fSlow3);
384 for (int i=0; i<count; i++) {
385 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
386 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
387 fRec10[0] = (fSlow2 + (0.999 * fRec10[1]));
388 double fTemp0 = (1 - fRec10[0]);
389 double fTemp1 = (double)input0[i];
390 double fTemp2 = (fTemp1 * fTemp0);
391 double fTemp3 = (1e-15 + (0.027 * fRec9[1]));
392 fVec0[0] = fTemp3;
393 fRec11[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec11[1]));
394 double fTemp4 = (fConst13 * fRec13[1]);
395 double fTemp5 = (1e-15 + (fTemp1 * fRec10[0]));
396 fRec19[0] = (fTemp5 - (fConst40 * ((fConst38 * fRec19[2]) + (fConst36 * fRec19[1]))));
397 double fTemp6 = (fRec19[2] + (fRec19[0] + (2 * fRec19[1])));
398 fVec1[0] = fTemp6;
399 fRec18[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst1 * fVec1[0]))) + (fConst3 * fRec18[1]));
400 fRec17[0] = ((fConst43 * (fRec18[0] + fRec18[1])) + (fConst34 * fRec17[1]));
401 fRec16[0] = (fRec17[0] - (fConst32 * ((fConst30 * fRec16[2]) + (fConst28 * fRec16[1]))));
402 double fTemp7 = (fRec16[2] + (fRec16[0] + (2 * fRec16[1])));
403 fVec2[0] = fTemp7;
404 fRec15[0] = ((fConst45 * ((fConst44 * fVec2[1]) + (fConst20 * fVec2[0]))) + (fConst25 * fRec15[1]));
405 fRec14[0] = (fRec15[0] - (fConst23 * ((fConst21 * fRec14[2]) + (fConst19 * fRec14[1]))));
406 fRec13[0] = ((fConst23 * (((fConst18 * fRec14[0]) + (fConst46 * fRec14[1])) + (fConst18 * fRec14[2]))) - (fConst16 * ((fConst15 * fRec13[2]) + fTemp4)));
407 double fTemp8 = max(-1, min(1, (fSlow4 * (fRec13[2] + (fConst16 * (fTemp4 + (fConst15 * fRec13[0])))))));
408 fRec23[0] = ((fConst45 * (fVec2[0] + fVec2[1])) + (fConst25 * fRec23[1]));
409 fRec22[0] = (fRec23[0] - (fConst23 * ((fConst21 * fRec22[2]) + (fConst19 * fRec22[1]))));
410 double fTemp9 = (fRec22[2] + (fRec22[0] + (2 * fRec22[1])));
411 fVec3[0] = fTemp9;
412 fRec21[0] = ((fConst52 * ((fConst51 * fVec3[1]) + (fConst14 * fVec3[0]))) + (fConst50 * fRec21[1]));
413 fRec20[0] = (fRec21[0] - (fConst48 * ((fConst47 * fRec20[2]) + (fConst13 * fRec20[1]))));
414 double fTemp10 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec20[0]) + (fConst53 * fRec20[1])) + (fConst12 * fRec20[2])))));
415 double fTemp11 = (fConst13 * fRec24[1]);
416 double fTemp12 = (fConst19 * fRec25[1]);
417 fRec27[0] = ((fConst43 * ((fConst56 * fRec18[1]) + (fConst29 * fRec18[0]))) + (fConst34 * fRec27[1]));
418 fRec26[0] = (fRec27[0] - (fConst32 * ((fConst30 * fRec26[2]) + (fConst28 * fRec26[1]))));
419 fRec25[0] = ((fConst32 * (((fConst27 * fRec26[0]) + (fConst57 * fRec26[1])) + (fConst27 * fRec26[2]))) - (fConst55 * ((fConst54 * fRec25[2]) + fTemp12)));
420 fRec24[0] = ((fRec25[2] + (fConst55 * (fTemp12 + (fConst54 * fRec25[0])))) - (fConst16 * ((fConst15 * fRec24[2]) + fTemp11)));
421 double fTemp13 = max(-1, min(1, (fSlow6 * (fRec24[2] + (fConst16 * (fTemp11 + (fConst15 * fRec24[0])))))));
422 fRec29[0] = ((fConst52 * (fVec3[0] + fVec3[1])) + (fConst50 * fRec29[1]));
423 fRec28[0] = (fRec29[0] - (fConst48 * ((fConst47 * fRec28[2]) + (fConst13 * fRec28[1]))));
424 double fTemp14 = max(-1, min(1, (fSlow7 * (fRec28[2] + (fRec28[0] + (2 * fRec28[1]))))));
425 double fTemp15 = ((1.2589412 * (fTemp14 * (1 - (0.3333333333333333 * faustpower<2>(fTemp14))))) + (1.584893192 * ((fTemp13 * (1 - (0.3333333333333333 * faustpower<2>(fTemp13)))) + ((fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10)))) + (0.8413951417869425 * (fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))))))));
426 fVec4[0] = fTemp15;
427 fRec12[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec12[1]));
428 double fTemp16 = (1e-15 + fTemp2);
429 fRec9[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fSlow11 * ((fTemp16 * (4 - (4 * fabs(fTemp16)))) - fTemp16)) + ((fSlow10 * fTemp5) + ((fSlow9 * fRec12[0]) + (fRec11[0] + fTemp2)))) - 1.581655999999998)) - 191.42014814814814);
430 fRec8[0] = ((fConst59 * ((fConst41 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
431 double fTemp17 = (fRec8[0] * fRec7[0]);
432 fVec5[0] = fTemp17;
433 fRec6[0] = ((fConst58 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
434 double fTemp18 = (1e-15 + (0.015 * fRec5[1]));
435 fVec6[0] = fTemp18;
436 fRec30[0] = ((fConst63 * (fVec6[0] + fVec6[1])) + (fConst62 * fRec30[1]));
437 fRec5[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec30[0] + fRec6[0]) - 1.204284999999999)) - 169.71433333333334);
438 fRec4[0] = ((fConst59 * ((fConst41 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
439 double fTemp19 = (fRec7[0] * fRec4[0]);
440 fVec7[0] = fTemp19;
441 fRec3[0] = ((fConst58 * (fVec7[0] + fVec7[1])) + (fConst6 * fRec3[1]));
442 double fTemp20 = (1e-15 + (0.0082 * fRec2[1]));
443 fVec8[0] = fTemp20;
444 fRec31[0] = ((fConst67 * (fVec8[0] + fVec8[1])) + (fConst66 * fRec31[1]));
445 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec31[0] + fRec3[0]) - 0.840702999999999)) - 147.47524390243905);
446 fRec1[0] = ((fConst59 * ((fConst41 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
447 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
448 double fTemp21 = (double)input1[i];
449 double fTemp22 = (fTemp21 * fTemp0);
450 double fTemp23 = (1e-15 + (0.027 * fRec39[1]));
451 fVec9[0] = fTemp23;
452 fRec40[0] = ((fConst10 * (fVec9[0] + fVec9[1])) + (fConst9 * fRec40[1]));
453 double fTemp24 = (fConst13 * fRec42[1]);
454 double fTemp25 = (1e-15 + (fTemp21 * fRec10[0]));
455 fRec48[0] = (fTemp25 - (fConst40 * ((fConst38 * fRec48[2]) + (fConst36 * fRec48[1]))));
456 double fTemp26 = (fRec48[2] + (fRec48[0] + (2 * fRec48[1])));
457 fVec10[0] = fTemp26;
458 fRec47[0] = ((fConst42 * ((fConst41 * fVec10[1]) + (fConst1 * fVec10[0]))) + (fConst3 * fRec47[1]));
459 fRec46[0] = ((fConst43 * (fRec47[0] + fRec47[1])) + (fConst34 * fRec46[1]));
460 fRec45[0] = (fRec46[0] - (fConst32 * ((fConst30 * fRec45[2]) + (fConst28 * fRec45[1]))));
461 double fTemp27 = (fRec45[2] + (fRec45[0] + (2 * fRec45[1])));
462 fVec11[0] = fTemp27;
463 fRec44[0] = ((fConst45 * ((fConst44 * fVec11[1]) + (fConst20 * fVec11[0]))) + (fConst25 * fRec44[1]));
464 fRec43[0] = (fRec44[0] - (fConst23 * ((fConst21 * fRec43[2]) + (fConst19 * fRec43[1]))));
465 fRec42[0] = ((fConst23 * (((fConst18 * fRec43[0]) + (fConst46 * fRec43[1])) + (fConst18 * fRec43[2]))) - (fConst16 * ((fConst15 * fRec42[2]) + fTemp24)));
466 double fTemp28 = max(-1, min(1, (fSlow4 * (fRec42[2] + (fConst16 * (fTemp24 + (fConst15 * fRec42[0])))))));
467 fRec52[0] = ((fConst45 * (fVec11[0] + fVec11[1])) + (fConst25 * fRec52[1]));
468 fRec51[0] = (fRec52[0] - (fConst23 * ((fConst21 * fRec51[2]) + (fConst19 * fRec51[1]))));
469 double fTemp29 = (fRec51[2] + (fRec51[0] + (2 * fRec51[1])));
470 fVec12[0] = fTemp29;
471 fRec50[0] = ((fConst52 * ((fConst51 * fVec12[1]) + (fConst14 * fVec12[0]))) + (fConst50 * fRec50[1]));
472 fRec49[0] = (fRec50[0] - (fConst48 * ((fConst47 * fRec49[2]) + (fConst13 * fRec49[1]))));
473 double fTemp30 = max(-1, min(1, (fSlow5 * (((fConst12 * fRec49[0]) + (fConst53 * fRec49[1])) + (fConst12 * fRec49[2])))));
474 double fTemp31 = (fConst13 * fRec53[1]);
475 double fTemp32 = (fConst19 * fRec54[1]);
476 fRec56[0] = ((fConst43 * ((fConst56 * fRec47[1]) + (fConst29 * fRec47[0]))) + (fConst34 * fRec56[1]));
477 fRec55[0] = (fRec56[0] - (fConst32 * ((fConst30 * fRec55[2]) + (fConst28 * fRec55[1]))));
478 fRec54[0] = ((fConst32 * (((fConst27 * fRec55[0]) + (fConst57 * fRec55[1])) + (fConst27 * fRec55[2]))) - (fConst55 * ((fConst54 * fRec54[2]) + fTemp32)));
479 fRec53[0] = ((fRec54[2] + (fConst55 * (fTemp32 + (fConst54 * fRec54[0])))) - (fConst16 * ((fConst15 * fRec53[2]) + fTemp31)));
480 double fTemp33 = max(-1, min(1, (fSlow6 * (fRec53[2] + (fConst16 * (fTemp31 + (fConst15 * fRec53[0])))))));
481 fRec58[0] = ((fConst52 * (fVec12[0] + fVec12[1])) + (fConst50 * fRec58[1]));
482 fRec57[0] = (fRec58[0] - (fConst48 * ((fConst47 * fRec57[2]) + (fConst13 * fRec57[1]))));
483 double fTemp34 = max(-1, min(1, (fSlow7 * (fRec57[2] + (fRec57[0] + (2 * fRec57[1]))))));
484 double fTemp35 = ((1.2589412 * (fTemp34 * (1 - (0.3333333333333333 * faustpower<2>(fTemp34))))) + (1.584893192 * ((fTemp33 * (1 - (0.3333333333333333 * faustpower<2>(fTemp33)))) + ((fTemp30 * (1 - (0.3333333333333333 * faustpower<2>(fTemp30)))) + (0.8413951417869425 * (fTemp28 * (1 - (0.3333333333333333 * faustpower<2>(fTemp28)))))))));
485 fVec13[0] = fTemp35;
486 fRec41[0] = ((fConst58 * (fVec13[0] + fVec13[1])) + (fConst6 * fRec41[1]));
487 double fTemp36 = (1e-15 + fTemp22);
488 fRec39[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fSlow11 * ((fTemp36 * (4 - (4 * fabs(fTemp36)))) - fTemp36)) + ((fSlow10 * fTemp25) + ((fSlow9 * fRec41[0]) + (fRec40[0] + fTemp22)))) - 1.581655999999998)) - 191.42014814814814);
489 fRec38[0] = ((fConst59 * ((fConst41 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
490 double fTemp37 = (fRec7[0] * fRec38[0]);
491 fVec14[0] = fTemp37;
492 fRec37[0] = ((fConst58 * (fVec14[0] + fVec14[1])) + (fConst6 * fRec37[1]));
493 double fTemp38 = (1e-15 + (0.015 * fRec36[1]));
494 fVec15[0] = fTemp38;
495 fRec59[0] = ((fConst63 * (fVec15[0] + fVec15[1])) + (fConst62 * fRec59[1]));
496 fRec36[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec59[0] + fRec37[0]) - 1.204284999999999)) - 169.71433333333334);
497 fRec35[0] = ((fConst59 * ((fConst41 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
498 double fTemp39 = (fRec7[0] * fRec35[0]);
499 fVec16[0] = fTemp39;
500 fRec34[0] = ((fConst58 * (fVec16[0] + fVec16[1])) + (fConst6 * fRec34[1]));
501 double fTemp40 = (1e-15 + (0.0082 * fRec33[1]));
502 fVec17[0] = fTemp40;
503 fRec60[0] = ((fConst67 * (fVec17[0] + fVec17[1])) + (fConst66 * fRec60[1]));
504 fRec33[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec60[0] + fRec34[0]) - 0.840702999999999)) - 147.47524390243905);
505 fRec32[0] = ((fConst59 * ((fConst41 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
506 output1[i] = (FAUSTFLOAT)(fRec0[0] * fRec32[0]);
507 // post processing
508 fRec32[1] = fRec32[0];
509 fRec33[1] = fRec33[0];
510 fRec60[1] = fRec60[0];
511 fVec17[1] = fVec17[0];
512 fRec34[1] = fRec34[0];
513 fVec16[1] = fVec16[0];
514 fRec35[1] = fRec35[0];
515 fRec36[1] = fRec36[0];
516 fRec59[1] = fRec59[0];
517 fVec15[1] = fVec15[0];
518 fRec37[1] = fRec37[0];
519 fVec14[1] = fVec14[0];
520 fRec38[1] = fRec38[0];
521 fRec39[1] = fRec39[0];
522 fRec41[1] = fRec41[0];
523 fVec13[1] = fVec13[0];
524 fRec57[2] = fRec57[1]; fRec57[1] = fRec57[0];
525 fRec58[1] = fRec58[0];
526 fRec53[2] = fRec53[1]; fRec53[1] = fRec53[0];
527 fRec54[2] = fRec54[1]; fRec54[1] = fRec54[0];
528 fRec55[2] = fRec55[1]; fRec55[1] = fRec55[0];
529 fRec56[1] = fRec56[0];
530 fRec49[2] = fRec49[1]; fRec49[1] = fRec49[0];
531 fRec50[1] = fRec50[0];
532 fVec12[1] = fVec12[0];
533 fRec51[2] = fRec51[1]; fRec51[1] = fRec51[0];
534 fRec52[1] = fRec52[0];
535 fRec42[2] = fRec42[1]; fRec42[1] = fRec42[0];
536 fRec43[2] = fRec43[1]; fRec43[1] = fRec43[0];
537 fRec44[1] = fRec44[0];
538 fVec11[1] = fVec11[0];
539 fRec45[2] = fRec45[1]; fRec45[1] = fRec45[0];
540 fRec46[1] = fRec46[0];
541 fRec47[1] = fRec47[0];
542 fVec10[1] = fVec10[0];
543 fRec48[2] = fRec48[1]; fRec48[1] = fRec48[0];
544 fRec40[1] = fRec40[0];
545 fVec9[1] = fVec9[0];
546 fRec1[1] = fRec1[0];
547 fRec2[1] = fRec2[0];
548 fRec31[1] = fRec31[0];
549 fVec8[1] = fVec8[0];
550 fRec3[1] = fRec3[0];
551 fVec7[1] = fVec7[0];
552 fRec4[1] = fRec4[0];
553 fRec5[1] = fRec5[0];
554 fRec30[1] = fRec30[0];
555 fVec6[1] = fVec6[0];
556 fRec6[1] = fRec6[0];
557 fVec5[1] = fVec5[0];
558 fRec8[1] = fRec8[0];
559 fRec9[1] = fRec9[0];
560 fRec12[1] = fRec12[0];
561 fVec4[1] = fVec4[0];
562 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
563 fRec29[1] = fRec29[0];
564 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
565 fRec25[2] = fRec25[1]; fRec25[1] = fRec25[0];
566 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
567 fRec27[1] = fRec27[0];
568 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
569 fRec21[1] = fRec21[0];
570 fVec3[1] = fVec3[0];
571 fRec22[2] = fRec22[1]; fRec22[1] = fRec22[0];
572 fRec23[1] = fRec23[0];
573 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
574 fRec14[2] = fRec14[1]; fRec14[1] = fRec14[0];
575 fRec15[1] = fRec15[0];
576 fVec2[1] = fVec2[0];
577 fRec16[2] = fRec16[1]; fRec16[1] = fRec16[0];
578 fRec17[1] = fRec17[0];
579 fRec18[1] = fRec18[0];
580 fVec1[1] = fVec1[0];
581 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
582 fRec11[1] = fRec11[0];
583 fVec0[1] = fVec0[0];
584 fRec10[1] = fRec10[0];
585 fRec7[1] = fRec7[0];
586 fRec0[1] = fRec0[0];
587 }
588 #undef fslider0
589 #undef fslider1
590 #undef fslider2
591 #undef fslider3
592 }
593
594 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
595 {
596 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
597 }
598
599
600 void Dsp::connect(uint32_t port,void* data)
601 {
602 switch ((PortIndex)port)
603 {
604 case DRIVE:
605 fslider3_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
606 break;
607 case WET_DRY:
608 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
609 break;
610 case PREGAIN:
611 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
612 break;
613 case GAIN1:
614 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
615 break;
616 default:
617 break;
618 }
619 }
620
621 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
622 {
623 static_cast<Dsp*>(p)->connect(port, data);
624 }
625
626
627 PluginLV2 *plugin() {
628 return new Dsp();
629 }
630
631 void Dsp::del_instance(PluginLV2 *p)
632 {
633 delete static_cast<Dsp*>(p);
634 }
635
636 /*
637 typedef enum
638 {
639 DRIVE,
640 WET_DRY,
641 PREGAIN,
642 GAIN1,
643 } PortIndex;
644 */
645
646 } // end namespace gxamp_stereo
0 // generated from file '../src/LV2/faust/gxechocat.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxechocat {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iVec0[2];
11 int iConst0;
12 double fConst1;
13 double fConst2;
14 double fConst3;
15 double fConst4;
16 double fConst5;
17 double fConst6;
18 double fConst7;
19 double fConst8;
20 double fConst9;
21 double fConst10;
22 double fConst11;
23 double fConst12;
24 double fConst13;
25 double fConst14;
26 double fConst15;
27 double fConst16;
28 double fConst17;
29 double fConst18;
30 double fConst19;
31 double fConst20;
32 double fConst21;
33 double fConst22;
34 double fConst23;
35 double fRec10[2];
36 FAUSTFLOAT fslider0;
37 FAUSTFLOAT *fslider0_;
38 double fConst24;
39 double fVec1[2];
40 double fConst25;
41 double fConst26;
42 double fRec9[2];
43 double fConst27;
44 double fConst28;
45 double fConst29;
46 double fVec2[2];
47 double fConst30;
48 double fConst31;
49 double fRec13[2];
50 FAUSTFLOAT fslider1;
51 FAUSTFLOAT *fslider1_;
52 double fConst32;
53 double fConst33;
54 double fConst34;
55 double fVec3[2];
56 double fConst35;
57 double fRec14[2];
58 double fRec12[2];
59 double fConst36;
60 double fConst37;
61 double fRec11[2];
62 double fRec8[3];
63 double fConst38;
64 double fRec7[3];
65 int IOTA;
66 double *fVec4;
67 double fConst39;
68 double fConst40;
69 double fConst41;
70 double fRec21[2];
71 double fRec20[2];
72 double fRec19[2];
73 double fConst42;
74 double fRec15[2];
75 double fRec16[2];
76 double fRec17[2];
77 double fRec18[2];
78 FAUSTFLOAT fcheckbox0;
79 FAUSTFLOAT *fcheckbox0_;
80 double fConst43;
81 double fRec22[2];
82 double fRec23[2];
83 double fRec24[2];
84 double fRec25[2];
85 FAUSTFLOAT fcheckbox1;
86 FAUSTFLOAT *fcheckbox1_;
87 double fConst44;
88 double fRec26[2];
89 double fRec27[2];
90 double fRec28[2];
91 double fRec29[2];
92 FAUSTFLOAT fcheckbox2;
93 FAUSTFLOAT *fcheckbox2_;
94 double fVec5[2];
95 double fConst45;
96 double fRec6[2];
97 double fRec5[2];
98 FAUSTFLOAT fslider2;
99 FAUSTFLOAT *fslider2_;
100 double fVec6[2];
101 double fRec30[2];
102 double fRec4[2];
103 double fRec3[2];
104 double fVec7[2];
105 double fRec31[2];
106 double fRec2[2];
107 double fRec1[2];
108 double fRec0[3];
109 FAUSTFLOAT fslider3;
110 FAUSTFLOAT *fslider3_;
111 bool mem_allocated;
112 void mem_alloc();
113 void mem_free();
114 void connect(uint32_t port,void* data);
115 void clear_state_f();
116 int activate(bool start);
117 void init(uint32_t samplingFreq);
118 void compute(int count, float *input0, float *output0);
119
120 static void clear_state_f_static(PluginLV2*);
121 static int activate_static(bool start, PluginLV2*);
122 static void init_static(uint32_t samplingFreq, PluginLV2*);
123 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
124 static void del_instance(PluginLV2 *p);
125 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
126 public:
127 Dsp();
128 ~Dsp();
129 };
130
131
132
133 Dsp::Dsp()
134 : PluginLV2(),
135 fVec4(0),
136 mem_allocated(false) {
137 version = PLUGINLV2_VERSION;
138 id = "gxechocat";
139 name = N_("Tape Delay");
140 mono_audio = compute_static;
141 stereo_audio = 0;
142 set_samplerate = init_static;
143 activate_plugin = activate_static;
144 connect_ports = connect_static;
145 clear_state = clear_state_f_static;
146 delete_instance = del_instance;
147 }
148
149 Dsp::~Dsp() {
150 }
151
152 inline void Dsp::clear_state_f()
153 {
154 for (int i=0; i<2; i++) iVec0[i] = 0;
155 for (int i=0; i<2; i++) fRec10[i] = 0;
156 for (int i=0; i<2; i++) fVec1[i] = 0;
157 for (int i=0; i<2; i++) fRec9[i] = 0;
158 for (int i=0; i<2; i++) fVec2[i] = 0;
159 for (int i=0; i<2; i++) fRec13[i] = 0;
160 for (int i=0; i<2; i++) fVec3[i] = 0;
161 for (int i=0; i<2; i++) fRec14[i] = 0;
162 for (int i=0; i<2; i++) fRec12[i] = 0;
163 for (int i=0; i<2; i++) fRec11[i] = 0;
164 for (int i=0; i<3; i++) fRec8[i] = 0;
165 for (int i=0; i<3; i++) fRec7[i] = 0;
166 for (int i=0; i<524288; i++) fVec4[i] = 0;
167 for (int i=0; i<2; i++) fRec21[i] = 0;
168 for (int i=0; i<2; i++) fRec20[i] = 0;
169 for (int i=0; i<2; i++) fRec19[i] = 0;
170 for (int i=0; i<2; i++) fRec15[i] = 0;
171 for (int i=0; i<2; i++) fRec16[i] = 0;
172 for (int i=0; i<2; i++) fRec17[i] = 0;
173 for (int i=0; i<2; i++) fRec18[i] = 0;
174 for (int i=0; i<2; i++) fRec22[i] = 0;
175 for (int i=0; i<2; i++) fRec23[i] = 0;
176 for (int i=0; i<2; i++) fRec24[i] = 0;
177 for (int i=0; i<2; i++) fRec25[i] = 0;
178 for (int i=0; i<2; i++) fRec26[i] = 0;
179 for (int i=0; i<2; i++) fRec27[i] = 0;
180 for (int i=0; i<2; i++) fRec28[i] = 0;
181 for (int i=0; i<2; i++) fRec29[i] = 0;
182 for (int i=0; i<2; i++) fVec5[i] = 0;
183 for (int i=0; i<2; i++) fRec6[i] = 0;
184 for (int i=0; i<2; i++) fRec5[i] = 0;
185 for (int i=0; i<2; i++) fVec6[i] = 0;
186 for (int i=0; i<2; i++) fRec30[i] = 0;
187 for (int i=0; i<2; i++) fRec4[i] = 0;
188 for (int i=0; i<2; i++) fRec3[i] = 0;
189 for (int i=0; i<2; i++) fVec7[i] = 0;
190 for (int i=0; i<2; i++) fRec31[i] = 0;
191 for (int i=0; i<2; i++) fRec2[i] = 0;
192 for (int i=0; i<2; i++) fRec1[i] = 0;
193 for (int i=0; i<3; i++) fRec0[i] = 0;
194 }
195
196 void Dsp::clear_state_f_static(PluginLV2 *p)
197 {
198 static_cast<Dsp*>(p)->clear_state_f();
199 }
200
201 inline void Dsp::init(uint32_t samplingFreq)
202 {
203 fSamplingFreq = samplingFreq;
204 iConst0 = min(192000, max(1, fSamplingFreq));
205 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
206 fConst2 = (1 + fConst1);
207 fConst3 = (0 - ((1 - fConst1) / fConst2));
208 fConst4 = (1.0 / tan((20420.352248333656 / iConst0)));
209 fConst5 = (1 + fConst4);
210 fConst6 = (0 - ((1 - fConst4) / fConst5));
211 fConst7 = tan((125.66370614359172 / iConst0));
212 fConst8 = (1.0 / faustpower<2>(fConst7));
213 fConst9 = (2 * (1 - fConst8));
214 fConst10 = (1.0 / fConst7);
215 fConst11 = (1 + ((fConst10 - 0.7653668647301795) / fConst7));
216 fConst12 = (1 + ((0.7653668647301795 + fConst10) / fConst7));
217 fConst13 = (1.0 / fConst12);
218 fConst14 = (1 + ((fConst10 - 1.8477590650225735) / fConst7));
219 fConst15 = (1.0 / (1 + ((fConst10 + 1.8477590650225735) / fConst7)));
220 fConst16 = tan((392.6990816987241 / iConst0));
221 fConst17 = (1.0 / fConst16);
222 fConst18 = (1 + fConst17);
223 fConst19 = (0 - ((1 - fConst17) / fConst18));
224 fConst20 = (1.0 / tan((23561.94490192345 / iConst0)));
225 fConst21 = (1 + fConst20);
226 fConst22 = (0 - ((1 - fConst20) / fConst21));
227 fConst23 = (1.0 / fConst21);
228 fConst24 = (0.5 / fConst16);
229 fConst25 = (0 - fConst17);
230 fConst26 = (1.0 / fConst18);
231 fConst27 = (1.0 / tan((251.32741228718345 / iConst0)));
232 fConst28 = (1 + fConst27);
233 fConst29 = (0 - ((1 - fConst27) / fConst28));
234 fConst30 = (0 - fConst27);
235 fConst31 = (1.0 / fConst28);
236 fConst32 = (1.0 / tan((6.5973445725385655 / iConst0)));
237 fConst33 = (1 + fConst32);
238 fConst34 = (0 - ((1 - fConst32) / fConst33));
239 fConst35 = (1.0 / fConst33);
240 fConst36 = (0 - fConst1);
241 fConst37 = (0.025 / fConst2);
242 fConst38 = (2 * (0 - fConst8));
243 IOTA = 0;
244 fConst39 = (1e+01 / iConst0);
245 fConst40 = (0 - fConst39);
246 fConst41 = (25.132741228718345 / iConst0);
247 fConst42 = (4.5 * iConst0);
248 fConst43 = (1.5 * iConst0);
249 fConst44 = (3.0 * iConst0);
250 fConst45 = (1.0 / (fConst5 * fConst12));
251 }
252
253 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
254 {
255 static_cast<Dsp*>(p)->init(samplingFreq);
256 }
257
258 void Dsp::mem_alloc()
259 {
260 if (!fVec4) fVec4 = new double[524288];
261 mem_allocated = true;
262 }
263
264 void Dsp::mem_free()
265 {
266 mem_allocated = false;
267 if (fVec4) { delete fVec4; fVec4 = 0; }
268 }
269
270 int Dsp::activate(bool start)
271 {
272 if (start) {
273 if (!mem_allocated) {
274 mem_alloc();
275 clear_state_f();
276 }
277 } else if (!mem_allocated) {
278 mem_free();
279 }
280 return 0;
281 }
282
283 int Dsp::activate_static(bool start, PluginLV2 *p)
284 {
285 return static_cast<Dsp*>(p)->activate(start);
286 }
287
288 inline void Dsp::compute(int count, float *input0, float *output0)
289 {
290 #define fslider0 (*fslider0_)
291 #define fslider1 (*fslider1_)
292 #define fcheckbox0 (*fcheckbox0_)
293 #define fcheckbox1 (*fcheckbox1_)
294 #define fcheckbox2 (*fcheckbox2_)
295 #define fslider2 (*fslider2_)
296 #define fslider3 (*fslider3_)
297 double fSlow0 = fslider0;
298 double fSlow1 = (fConst24 * fSlow0);
299 double fSlow2 = (0.5 * fSlow0);
300 double fSlow3 = fslider1;
301 double fSlow4 = fcheckbox0;
302 double fSlow5 = fcheckbox1;
303 double fSlow6 = fcheckbox2;
304 double fSlow7 = fslider2;
305 double fSlow8 = fslider3;
306 for (int i=0; i<count; i++) {
307 iVec0[0] = 1;
308 fRec10[0] = ((fConst23 * (fRec0[1] + fRec0[2])) + (fConst22 * fRec10[1]));
309 fVec1[0] = (fSlow2 * fRec10[0]);
310 fRec9[0] = ((fConst26 * ((fConst25 * fVec1[1]) + (fSlow1 * fRec10[0]))) + (fConst19 * fRec9[1]));
311 double fTemp0 = (double)input0[i];
312 fVec2[0] = fTemp0;
313 fRec13[0] = ((fConst31 * ((fConst30 * fVec2[1]) + (fConst27 * fVec2[0]))) + (fConst29 * fRec13[1]));
314 double fTemp1 = (1e-15 + (0.015 * fRec12[1]));
315 fVec3[0] = fTemp1;
316 fRec14[0] = ((fConst35 * (fVec3[0] + fVec3[1])) + (fConst34 * fRec14[1]));
317 fRec12[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec14[0] + (fSlow3 * fRec13[0])) - 1.204540999999999)) - 169.69726666666665);
318 fRec11[0] = ((fConst37 * ((fConst36 * fRec12[1]) + (fConst1 * fRec12[0]))) + (fConst3 * fRec11[1]));
319 fRec8[0] = ((fRec11[0] + fRec9[0]) - (fConst15 * ((fConst14 * fRec8[2]) + (fConst9 * fRec8[1]))));
320 fRec7[0] = ((fConst15 * (((fConst8 * fRec8[0]) + (fConst38 * fRec8[1])) + (fConst8 * fRec8[2]))) - (fConst13 * ((fConst11 * fRec7[2]) + (fConst9 * fRec7[1]))));
321 double fTemp2 = (((fConst8 * fRec7[0]) + (fConst38 * fRec7[1])) + (fConst8 * fRec7[2]));
322 fVec4[IOTA&524287] = fTemp2;
323 fRec21[0] = ((fConst41 * (0 - fRec19[1])) + fRec21[1]);
324 fRec20[0] = ((1 + ((fConst41 * fRec21[0]) + fRec20[1])) - iVec0[1]);
325 fRec19[0] = fRec20[0];
326 double fTemp3 = (7.5 + (0.005 * max(0, (0.5 * (1 + fRec19[0])))));
327 double fTemp4 = (fConst42 / fTemp3);
328 double fTemp5 = ((int((fRec15[1] != 0.0)))?((int(((fRec16[1] > 0.0) & (fRec16[1] < 1.0))))?fRec15[1]:0):((int(((fRec16[1] == 0.0) & (fTemp4 != fRec17[1]))))?fConst39:((int(((fRec16[1] == 1.0) & (fTemp4 != fRec18[1]))))?fConst40:0)));
329 fRec15[0] = fTemp5;
330 fRec16[0] = max(0.0, min(1.0, (fRec16[1] + fTemp5)));
331 fRec17[0] = ((int(((fRec16[1] >= 1.0) & (fRec18[1] != fTemp4))))?fTemp4:fRec17[1]);
332 fRec18[0] = ((int(((fRec16[1] <= 0.0) & (fRec17[1] != fTemp4))))?fTemp4:fRec18[1]);
333 double fTemp6 = (fConst43 / fTemp3);
334 double fTemp7 = ((int((fRec22[1] != 0.0)))?((int(((fRec23[1] > 0.0) & (fRec23[1] < 1.0))))?fRec22[1]:0):((int(((fRec23[1] == 0.0) & (fTemp6 != fRec24[1]))))?fConst39:((int(((fRec23[1] == 1.0) & (fTemp6 != fRec25[1]))))?fConst40:0)));
335 fRec22[0] = fTemp7;
336 fRec23[0] = max(0.0, min(1.0, (fRec23[1] + fTemp7)));
337 fRec24[0] = ((int(((fRec23[1] >= 1.0) & (fRec25[1] != fTemp6))))?fTemp6:fRec24[1]);
338 fRec25[0] = ((int(((fRec23[1] <= 0.0) & (fRec24[1] != fTemp6))))?fTemp6:fRec25[1]);
339 double fTemp8 = (fConst44 / fTemp3);
340 double fTemp9 = ((int((fRec26[1] != 0.0)))?((int(((fRec27[1] > 0.0) & (fRec27[1] < 1.0))))?fRec26[1]:0):((int(((fRec27[1] == 0.0) & (fTemp8 != fRec28[1]))))?fConst39:((int(((fRec27[1] == 1.0) & (fTemp8 != fRec29[1]))))?fConst40:0)));
341 fRec26[0] = fTemp9;
342 fRec27[0] = max(0.0, min(1.0, (fRec27[1] + fTemp9)));
343 fRec28[0] = ((int(((fRec27[1] >= 1.0) & (fRec29[1] != fTemp8))))?fTemp8:fRec28[1]);
344 fRec29[0] = ((int(((fRec27[1] <= 0.0) & (fRec28[1] != fTemp8))))?fTemp8:fRec29[1]);
345 double fTemp10 = (((fSlow6 * ((fRec27[0] * fVec4[(IOTA-int((int(fRec29[0]) & 524287)))&524287]) + ((1.0 - fRec27[0]) * fVec4[(IOTA-int((int(fRec28[0]) & 524287)))&524287]))) + (fSlow5 * ((fRec23[0] * fVec4[(IOTA-int((int(fRec25[0]) & 524287)))&524287]) + ((1.0 - fRec23[0]) * fVec4[(IOTA-int((int(fRec24[0]) & 524287)))&524287])))) + (fSlow4 * ((fRec16[0] * fVec4[(IOTA-int((int(fRec18[0]) & 524287)))&524287]) + ((1.0 - fRec16[0]) * fVec4[(IOTA-int((int(fRec17[0]) & 524287)))&524287]))));
346 fVec5[0] = fTemp10;
347 fRec6[0] = ((fConst45 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec6[1]));
348 fRec5[0] = ((fRec6[0] + (0.995 * fRec5[1])) - fRec6[1]);
349 double fTemp11 = (1e-15 + (0.033 * fRec4[1]));
350 fVec6[0] = fTemp11;
351 fRec30[0] = ((fConst35 * (fVec6[0] + fVec6[1])) + (fConst34 * fRec30[1]));
352 fRec4[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec30[0] + (fSlow7 * fRec5[0])) - 2.637333999999999)) - 170.08078787878787);
353 fRec3[0] = ((fConst37 * ((fConst36 * fRec4[1]) + (fConst1 * fRec4[0]))) + (fConst3 * fRec3[1]));
354 double fTemp12 = (1e-15 + (0.022 * fRec2[1]));
355 fVec7[0] = fTemp12;
356 fRec31[0] = ((fConst35 * (fVec7[0] + fVec7[1])) + (fConst34 * fRec31[1]));
357 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec31[0] + fRec3[0]) - 2.4268639999999992)) - 139.688);
358 fRec1[0] = ((fConst37 * ((fConst36 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
359 fRec0[0] = fRec1[0];
360 output0[i] = (FAUSTFLOAT)(fSlow8 * (fRec11[0] + fRec0[0]));
361 // post processing
362 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
363 fRec1[1] = fRec1[0];
364 fRec2[1] = fRec2[0];
365 fRec31[1] = fRec31[0];
366 fVec7[1] = fVec7[0];
367 fRec3[1] = fRec3[0];
368 fRec4[1] = fRec4[0];
369 fRec30[1] = fRec30[0];
370 fVec6[1] = fVec6[0];
371 fRec5[1] = fRec5[0];
372 fRec6[1] = fRec6[0];
373 fVec5[1] = fVec5[0];
374 fRec29[1] = fRec29[0];
375 fRec28[1] = fRec28[0];
376 fRec27[1] = fRec27[0];
377 fRec26[1] = fRec26[0];
378 fRec25[1] = fRec25[0];
379 fRec24[1] = fRec24[0];
380 fRec23[1] = fRec23[0];
381 fRec22[1] = fRec22[0];
382 fRec18[1] = fRec18[0];
383 fRec17[1] = fRec17[0];
384 fRec16[1] = fRec16[0];
385 fRec15[1] = fRec15[0];
386 fRec19[1] = fRec19[0];
387 fRec20[1] = fRec20[0];
388 fRec21[1] = fRec21[0];
389 IOTA = IOTA+1;
390 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
391 fRec8[2] = fRec8[1]; fRec8[1] = fRec8[0];
392 fRec11[1] = fRec11[0];
393 fRec12[1] = fRec12[0];
394 fRec14[1] = fRec14[0];
395 fVec3[1] = fVec3[0];
396 fRec13[1] = fRec13[0];
397 fVec2[1] = fVec2[0];
398 fRec9[1] = fRec9[0];
399 fVec1[1] = fVec1[0];
400 fRec10[1] = fRec10[0];
401 iVec0[1] = iVec0[0];
402 }
403 #undef fslider0
404 #undef fslider1
405 #undef fcheckbox0
406 #undef fcheckbox1
407 #undef fcheckbox2
408 #undef fslider2
409 #undef fslider3
410 }
411
412 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
413 {
414 static_cast<Dsp*>(p)->compute(count, input0, output0);
415 }
416
417
418 void Dsp::connect(uint32_t port,void* data)
419 {
420 switch ((PortIndex)port)
421 {
422 case HEAD1:
423 fcheckbox1_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
424 break;
425 case HEAD3:
426 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
427 break;
428 case HEAD2:
429 fcheckbox2_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
430 break;
431 case OUTPUTGAIN:
432 fslider3_ = (float*)data; // , 0.0, 0.0, 1.0, 0.01
433 break;
434 case SWELL:
435 fslider2_ = (float*)data; // , 0.0, 0.0, 1.0, 0.1
436 break;
437 case INPUTGAIN:
438 fslider1_ = (float*)data; // , 0.0, 0.0, 1.0, 0.01
439 break;
440 case SUSTAIN:
441 fslider0_ = (float*)data; // , 0.0, 0.0, 0.95, 0.01
442 break;
443 default:
444 break;
445 }
446 }
447
448 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
449 {
450 static_cast<Dsp*>(p)->connect(port, data);
451 }
452
453
454 PluginLV2 *plugin() {
455 return new Dsp();
456 }
457
458 void Dsp::del_instance(PluginLV2 *p)
459 {
460 delete static_cast<Dsp*>(p);
461 }
462
463 /*
464 typedef enum
465 {
466 HEAD1,
467 HEAD3,
468 HEAD2,
469 OUTPUTGAIN,
470 SWELL,
471 INPUTGAIN,
472 SUSTAIN,
473 } PortIndex;
474 */
475
476 } // end namespace gxechocat
0 // generated from file '../src/LV2/faust/gxfeed.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gxfeed {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int IOTA;
12 double fVec0[1024];
13 double fRec6[2];
14 double fVec1[1024];
15 double fRec8[2];
16 double fVec2[1024];
17 double fRec10[2];
18 double fVec3[2048];
19 double fRec12[2];
20 double fVec4[128];
21 double fRec4[2];
22 double fVec5[64];
23 double fRec2[2];
24 double fVec6[12];
25 double fRec0[2];
26 FAUSTFLOAT fcheckbox0;
27 FAUSTFLOAT *fcheckbox0_;
28 void connect(uint32_t port,void* data);
29 void clear_state_f();
30 void init(uint32_t samplingFreq);
31 void compute(int count, float *input0, float *input1, float *output0, float *output1);
32
33 static void clear_state_f_static(PluginLV2*);
34 static void init_static(uint32_t samplingFreq, PluginLV2*);
35 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
36 static void del_instance(PluginLV2 *p);
37 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
38 public:
39 Dsp();
40 ~Dsp();
41 };
42
43
44
45 Dsp::Dsp()
46 : PluginLV2() {
47 version = PLUGINLV2_VERSION;
48 id = "gxfeed";
49 name = "?gxfeed";
50 mono_audio = 0;
51 stereo_audio = compute_static;
52 set_samplerate = init_static;
53 activate_plugin = 0;
54 connect_ports = connect_static;
55 clear_state = clear_state_f_static;
56 delete_instance = del_instance;
57 }
58
59 Dsp::~Dsp() {
60 }
61
62 inline void Dsp::clear_state_f()
63 {
64 for (int i=0; i<1024; i++) fVec0[i] = 0;
65 for (int i=0; i<2; i++) fRec6[i] = 0;
66 for (int i=0; i<1024; i++) fVec1[i] = 0;
67 for (int i=0; i<2; i++) fRec8[i] = 0;
68 for (int i=0; i<1024; i++) fVec2[i] = 0;
69 for (int i=0; i<2; i++) fRec10[i] = 0;
70 for (int i=0; i<2048; i++) fVec3[i] = 0;
71 for (int i=0; i<2; i++) fRec12[i] = 0;
72 for (int i=0; i<128; i++) fVec4[i] = 0;
73 for (int i=0; i<2; i++) fRec4[i] = 0;
74 for (int i=0; i<64; i++) fVec5[i] = 0;
75 for (int i=0; i<2; i++) fRec2[i] = 0;
76 for (int i=0; i<12; i++) fVec6[i] = 0;
77 for (int i=0; i<2; i++) fRec0[i] = 0;
78 }
79
80 void Dsp::clear_state_f_static(PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->clear_state_f();
83 }
84
85 inline void Dsp::init(uint32_t samplingFreq)
86 {
87 fSamplingFreq = samplingFreq;
88 IOTA = 0;
89 clear_state_f();
90 }
91
92 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
93 {
94 static_cast<Dsp*>(p)->init(samplingFreq);
95 }
96
97 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
98 {
99 #define fslider0 (*fslider0_)
100 #define fcheckbox0 (*fcheckbox0_)
101 double fSlow0 = fslider0;
102 double fSlow1 = (1 - max(0, fSlow0));
103 double fSlow2 = (1 - max(0, (0 - fSlow0)));
104 int iSlow3 = int(fcheckbox0);
105 for (int i=0; i<count; i++) {
106 double fTemp0 = (double)input1[i];
107 double fTemp1 = (0.2 * fTemp0);
108 double fTemp2 = (fTemp1 + (0.805 * fRec6[1]));
109 fVec0[IOTA&1023] = fTemp2;
110 fRec6[0] = fVec0[(IOTA-901)&1023];
111 double fRec7 = fVec0[IOTA&1023];
112 double fTemp3 = (fTemp1 + (0.827 * fRec8[1]));
113 fVec1[IOTA&1023] = fTemp3;
114 fRec8[0] = fVec1[(IOTA-778)&1023];
115 double fRec9 = fVec1[IOTA&1023];
116 double fTemp4 = (fTemp1 + (0.783 * fRec10[1]));
117 fVec2[IOTA&1023] = fTemp4;
118 fRec10[0] = fVec2[(IOTA-1011)&1023];
119 double fRec11 = fVec2[IOTA&1023];
120 double fTemp5 = (fTemp1 + (0.764 * fRec12[1]));
121 fVec3[IOTA&2047] = fTemp5;
122 fRec12[0] = fVec3[(IOTA-1123)&2047];
123 double fRec13 = fVec3[IOTA&2047];
124 double fTemp6 = ((fRec13 + (fRec11 + (fRec9 + fRec7))) + (0.7 * fRec4[1]));
125 fVec4[IOTA&127] = fTemp6;
126 fRec4[0] = fVec4[(IOTA-124)&127];
127 double fRec5 = (0 - (0.7 * fVec4[IOTA&127]));
128 double fTemp7 = ((fRec5 + fRec4[1]) + (0.7 * fRec2[1]));
129 fVec5[IOTA&63] = fTemp7;
130 fRec2[0] = fVec5[(IOTA-41)&63];
131 double fRec3 = (0 - (0.7 * fVec5[IOTA&63]));
132 double fTemp8 = ((fRec3 + fRec2[1]) + (0.7 * fRec0[1]));
133 fVec6[0] = fTemp8;
134 fRec0[0] = fVec6[11];
135 double fRec1 = (0 - (0.7 * fVec6[0]));
136 double fTemp9 = ((iSlow3)?((fSlow2 * (fRec1 + fRec0[1])) + (fSlow1 * fTemp0)):(double)input0[i]);
137 output0[i] = (FAUSTFLOAT)fTemp9;
138 output1[i] = (FAUSTFLOAT)fTemp9;
139 // post processing
140 fRec0[1] = fRec0[0];
141 for (int i=11; i>0; i--) fVec6[i] = fVec6[i-1];
142 fRec2[1] = fRec2[0];
143 fRec4[1] = fRec4[0];
144 fRec12[1] = fRec12[0];
145 fRec10[1] = fRec10[0];
146 fRec8[1] = fRec8[0];
147 fRec6[1] = fRec6[0];
148 IOTA = IOTA+1;
149 }
150 #undef fslider0
151 #undef fcheckbox0
152 }
153
154 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
155 {
156 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
157 }
158
159
160 void Dsp::connect(uint32_t port,void* data)
161 {
162 switch ((PortIndex)port)
163 {
164 case FEED_ON_OFF:
165 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
166 break;
167 case WET_DRY:
168 fslider0_ = (float*)data; // , 0.0, -1.0, 1.0, 0.01
169 break;
170 default:
171 break;
172 }
173 }
174
175 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
176 {
177 static_cast<Dsp*>(p)->connect(port, data);
178 }
179
180
181 PluginLV2 *plugin() {
182 return new Dsp();
183 }
184
185 void Dsp::del_instance(PluginLV2 *p)
186 {
187 delete static_cast<Dsp*>(p);
188 }
189
190 /*
191 typedef enum
192 {
193 FEED_ON_OFF,
194 WET_DRY,
195 } PortIndex;
196 */
197
198 } // end namespace gxfeed
0 // generated from file '../src/LV2/faust/gxmetal_amp.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxmetal_amp {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 double fConst7;
23 double fConst8;
24 double fConst9;
25 FAUSTFLOAT fslider2;
26 FAUSTFLOAT *fslider2_;
27 double fRec6[2];
28 FAUSTFLOAT fslider3;
29 FAUSTFLOAT *fslider3_;
30 double fRec13[2];
31 double fVec0[2];
32 double fConst10;
33 double fRec16[2];
34 double fConst11;
35 double fConst12;
36 double fConst13;
37 double fVec1[2];
38 double fConst14;
39 double fRec17[2];
40 double fRec15[2];
41 double fConst15;
42 double fConst16;
43 double fRec14[2];
44 double fVec2[2];
45 double fRec12[2];
46 double fConst17;
47 double fConst18;
48 double fConst19;
49 double fVec3[2];
50 double fConst20;
51 double fRec18[2];
52 double fRec11[2];
53 double fRec10[2];
54 double fRec9[2];
55 double fConst21;
56 double fConst22;
57 double fConst23;
58 double fVec4[2];
59 double fConst24;
60 double fRec19[2];
61 double fRec8[2];
62 double fRec7[2];
63 double fRec5[4];
64 double fConst25;
65 double fConst26;
66 double fRec4[2];
67 double fVec5[2];
68 double fRec20[2];
69 double fRec3[2];
70 double fRec2[2];
71 double fVec6[2];
72 double fRec23[2];
73 double fRec22[2];
74 double fRec21[2];
75 double fVec7[2];
76 double fRec1[2];
77 void connect(uint32_t port,void* data);
78 void clear_state_f();
79 void init(uint32_t samplingFreq);
80 void compute(int count, float *input0, float *output0);
81
82 static void clear_state_f_static(PluginLV2*);
83 static void init_static(uint32_t samplingFreq, PluginLV2*);
84 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
85 static void del_instance(PluginLV2 *p);
86 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
87 public:
88 Dsp();
89 ~Dsp();
90 };
91
92
93
94 Dsp::Dsp()
95 : PluginLV2() {
96 version = PLUGINLV2_VERSION;
97 id = "metal";
98 name = N_("GxMetal_head");
99 mono_audio = compute_static;
100 stereo_audio = 0;
101 set_samplerate = init_static;
102 activate_plugin = 0;
103 connect_ports = connect_static;
104 clear_state = clear_state_f_static;
105 delete_instance = del_instance;
106 }
107
108 Dsp::~Dsp() {
109 }
110
111 inline void Dsp::clear_state_f()
112 {
113 for (int i=0; i<2; i++) fRec0[i] = 0;
114 for (int i=0; i<2; i++) fRec6[i] = 0;
115 for (int i=0; i<2; i++) fRec13[i] = 0;
116 for (int i=0; i<2; i++) fVec0[i] = 0;
117 for (int i=0; i<2; i++) fRec16[i] = 0;
118 for (int i=0; i<2; i++) fVec1[i] = 0;
119 for (int i=0; i<2; i++) fRec17[i] = 0;
120 for (int i=0; i<2; i++) fRec15[i] = 0;
121 for (int i=0; i<2; i++) fRec14[i] = 0;
122 for (int i=0; i<2; i++) fVec2[i] = 0;
123 for (int i=0; i<2; i++) fRec12[i] = 0;
124 for (int i=0; i<2; i++) fVec3[i] = 0;
125 for (int i=0; i<2; i++) fRec18[i] = 0;
126 for (int i=0; i<2; i++) fRec11[i] = 0;
127 for (int i=0; i<2; i++) fRec10[i] = 0;
128 for (int i=0; i<2; i++) fRec9[i] = 0;
129 for (int i=0; i<2; i++) fVec4[i] = 0;
130 for (int i=0; i<2; i++) fRec19[i] = 0;
131 for (int i=0; i<2; i++) fRec8[i] = 0;
132 for (int i=0; i<2; i++) fRec7[i] = 0;
133 for (int i=0; i<4; i++) fRec5[i] = 0;
134 for (int i=0; i<2; i++) fRec4[i] = 0;
135 for (int i=0; i<2; i++) fVec5[i] = 0;
136 for (int i=0; i<2; i++) fRec20[i] = 0;
137 for (int i=0; i<2; i++) fRec3[i] = 0;
138 for (int i=0; i<2; i++) fRec2[i] = 0;
139 for (int i=0; i<2; i++) fVec6[i] = 0;
140 for (int i=0; i<2; i++) fRec23[i] = 0;
141 for (int i=0; i<2; i++) fRec22[i] = 0;
142 for (int i=0; i<2; i++) fRec21[i] = 0;
143 for (int i=0; i<2; i++) fVec7[i] = 0;
144 for (int i=0; i<2; i++) fRec1[i] = 0;
145 }
146
147 void Dsp::clear_state_f_static(PluginLV2 *p)
148 {
149 static_cast<Dsp*>(p)->clear_state_f();
150 }
151
152 inline void Dsp::init(uint32_t samplingFreq)
153 {
154 fSamplingFreq = samplingFreq;
155 iConst0 = min(192000, max(1, fSamplingFreq));
156 fConst1 = (1.0 / tan((20517.741620594938 / iConst0)));
157 fConst2 = (1 + fConst1);
158 fConst3 = (0 - ((1 - fConst1) / fConst2));
159 fConst4 = (1.0 / tan((97.38937226128358 / iConst0)));
160 fConst5 = (1 + fConst4);
161 fConst6 = (0 - ((1 - fConst4) / fConst5));
162 fConst7 = (2 * double(iConst0));
163 fConst8 = faustpower<2>(fConst7);
164 fConst9 = (3 * fConst7);
165 fConst10 = (1.0 / fConst2);
166 fConst11 = (1.0 / tan((270.1769682087222 / iConst0)));
167 fConst12 = (1 + fConst11);
168 fConst13 = (0 - ((1 - fConst11) / fConst12));
169 fConst14 = (1.0 / fConst12);
170 fConst15 = (0 - fConst4);
171 fConst16 = (0.025 / fConst5);
172 fConst17 = (1.0 / tan((414.6902302738527 / iConst0)));
173 fConst18 = (1 + fConst17);
174 fConst19 = (0 - ((1 - fConst17) / fConst18));
175 fConst20 = (1.0 / fConst18);
176 fConst21 = (1.0 / tan((609.4689747964198 / iConst0)));
177 fConst22 = (1 + fConst21);
178 fConst23 = (0 - ((1 - fConst21) / fConst22));
179 fConst24 = (1.0 / fConst22);
180 fConst25 = exp((0 - (2e+02 / iConst0)));
181 fConst26 = exp((0 - (0.1 / iConst0)));
182 clear_state_f();
183 }
184
185 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
186 {
187 static_cast<Dsp*>(p)->init(samplingFreq);
188 }
189
190 inline void Dsp::compute(int count, float *input0, float *output0)
191 {
192 #define fslider0 (*fslider0_)
193 #define fslider1 (*fslider1_)
194 #define fslider2 (*fslider2_)
195 #define fslider3 (*fslider3_)
196 double fSlow0 = fslider0;
197 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * (0 - (0.4 * fSlow0)))));
198 double fSlow2 = fslider1;
199 double fSlow3 = exp((3.4 * (0 - fSlow2)));
200 double fSlow4 = ((8.09459375e-05 * fSlow3) + 5.183421875000001e-06);
201 double fSlow5 = ((5.121875000000001e-09 * fSlow3) + 2.5609375e-10);
202 double fSlow6 = (fConst7 * fSlow5);
203 double fSlow7 = (0.0250625 * fSlow3);
204 double fSlow8 = (fConst7 * (fSlow7 + 0.01870375));
205 double fSlow9 = ((fSlow8 + (fConst8 * (fSlow6 - fSlow4))) - 1);
206 double fSlow10 = (fConst9 * fSlow5);
207 double fSlow11 = ((fConst8 * (fSlow4 + fSlow10)) - (3 + fSlow8));
208 double fSlow12 = ((fSlow8 + (fConst8 * (fSlow4 - fSlow10))) - 3);
209 double fSlow13 = (1.0 / (0 - (1 + (fSlow8 + (fConst8 * (fSlow4 + fSlow6))))));
210 double fSlow14 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
211 double fSlow15 = (0.0010000000000000009 * pow(10,(0.05 * fslider3)));
212 double fSlow16 = (fSlow0 - 1);
213 double fSlow17 = (3.265625e-11 + ((6.531250000000001e-10 * fSlow3) + (fSlow2 * ((4.468750000000001e-09 * fSlow3) + 2.234375e-10))));
214 double fSlow18 = (fConst9 * fSlow17);
215 double fSlow19 = (((9.912500000000003e-07 * fSlow2) + (9.445937500000003e-06 * fSlow3)) + 6.17171875e-07);
216 double fSlow20 = ((fSlow7 + (6.25e-05 * fSlow2)) + 0.0027812500000000003);
217 double fSlow21 = (fConst7 * fSlow20);
218 double fSlow22 = (fSlow21 + (fConst8 * (fSlow19 - fSlow18)));
219 double fSlow23 = (fConst7 * fSlow17);
220 double fSlow24 = (fSlow21 + (fConst8 * (fSlow23 - fSlow19)));
221 double fSlow25 = (fConst7 * (0 - fSlow20));
222 double fSlow26 = (fSlow25 + (fConst8 * (fSlow19 + fSlow18)));
223 double fSlow27 = (fSlow25 - (fConst8 * (fSlow19 + fSlow23)));
224 for (int i=0; i<count; i++) {
225 fRec0[0] = (fSlow1 + (0.999 * fRec0[1]));
226 fRec6[0] = (fSlow14 + (0.999 * fRec6[1]));
227 fRec13[0] = (fSlow15 + (0.999 * fRec13[1]));
228 double fTemp0 = (double)input0[i];
229 fVec0[0] = fTemp0;
230 fRec16[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst3 * fRec16[1]));
231 double fTemp1 = fabs(fRec16[0]);
232 double fTemp2 = (1e-15 + (0.027 * fRec15[1]));
233 fVec1[0] = fTemp2;
234 fRec17[0] = ((fConst14 * (fVec1[0] + fVec1[1])) + (fConst13 * fRec17[1]));
235 fRec15[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec17[0] + ((fRec16[0] * (fSlow0 + fTemp1)) / (1 + ((fSlow16 * fTemp1) + faustpower<2>(fRec16[0]))))) - 1.5816559999999988)) - 191.42014814814814);
236 fRec14[0] = ((fConst16 * ((fConst15 * fRec15[1]) + (fConst4 * fRec15[0]))) + (fConst6 * fRec14[1]));
237 double fTemp3 = (fRec14[0] * fRec13[0]);
238 fVec2[0] = fTemp3;
239 fRec12[0] = ((fConst10 * (fVec2[0] + fVec2[1])) + (fConst3 * fRec12[1]));
240 double fTemp4 = (1e-15 + (0.015 * fRec11[1]));
241 fVec3[0] = fTemp4;
242 fRec18[0] = ((fConst20 * (fVec3[0] + fVec3[1])) + (fConst19 * fRec18[1]));
243 fRec11[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec18[0] + fRec12[0]) - 1.204284999999999)) - 169.71433333333334);
244 fRec10[0] = ((fConst16 * ((fConst15 * fRec11[1]) + (fConst4 * fRec11[0]))) + (fConst6 * fRec10[1]));
245 fRec9[0] = ((fConst10 * (fRec10[0] + fRec10[1])) + (fConst3 * fRec9[1]));
246 double fTemp5 = (1e-15 + (0.0082 * fRec8[1]));
247 fVec4[0] = fTemp5;
248 fRec19[0] = ((fConst24 * (fVec4[0] + fVec4[1])) + (fConst23 * fRec19[1]));
249 fRec8[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec19[0] + fRec9[0]) - 0.840702999999999)) - 147.47524390243905);
250 fRec7[0] = ((fConst16 * ((fConst15 * fRec8[1]) + (fConst4 * fRec8[0]))) + (fConst6 * fRec7[1]));
251 fRec5[0] = ((fRec7[0] * fRec6[0]) - (fSlow13 * (((fSlow12 * fRec5[2]) + (fSlow11 * fRec5[1])) + (fSlow9 * fRec5[3]))));
252 double fTemp6 = ((fSlow27 * fRec5[0]) + ((fSlow26 * fRec5[1]) + ((fSlow24 * fRec5[3]) + (fSlow22 * fRec5[2]))));
253 double fTemp7 = max(1, fabs((fSlow13 * fTemp6)));
254 double fTemp8 = ((fConst26 * (fRec4[1] >= fTemp7)) + (fConst25 * (fRec4[1] < fTemp7)));
255 fRec4[0] = ((fTemp7 * (0 - (fTemp8 - 1))) + (fRec4[1] * fTemp8));
256 double fTemp9 = max(0, ((20 * log10(fRec4[0])) + 5e+01));
257 double fTemp10 = (0.5 * min(1, max(0, (0.09522902580706599 * fTemp9))));
258 double fTemp11 = (fSlow13 * (fTemp6 * pow(10,(0.05 * (1e+01 + ((fTemp9 * (0 - fTemp10)) / (1 + fTemp10)))))));
259 double fTemp12 = (1e-15 + (0.0041 * fRec3[1]));
260 fVec5[0] = fTemp12;
261 fRec20[0] = ((fConst10 * (fVec5[0] + fVec5[1])) + (fConst3 * fRec20[1]));
262 fRec3[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec20[0] + fTemp11) - 0.659760999999999)) - 89.08268292682925);
263 fRec2[0] = ((fConst16 * ((fConst15 * fRec3[1]) + (fConst4 * fRec3[0]))) + (fConst6 * fRec2[1]));
264 double fTemp13 = (1e-15 + (0.0041 * fRec22[1]));
265 fVec6[0] = fTemp13;
266 fRec23[0] = ((fConst10 * (fVec6[0] + fVec6[1])) + (fConst3 * fRec23[1]));
267 fRec22[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fRec23[0] + fTemp11) - 0.664540999999999)) - 87.91682926829267);
268 fRec21[0] = ((fConst16 * ((fConst15 * fRec22[1]) + (fConst4 * fRec22[0]))) + (fConst6 * fRec21[1]));
269 double fTemp14 = (fRec21[0] + fRec2[0]);
270 fVec7[0] = fTemp14;
271 fRec1[0] = ((fConst10 * (fVec7[0] + fVec7[1])) + (fConst3 * fRec1[1]));
272 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
273 // post processing
274 fRec1[1] = fRec1[0];
275 fVec7[1] = fVec7[0];
276 fRec21[1] = fRec21[0];
277 fRec22[1] = fRec22[0];
278 fRec23[1] = fRec23[0];
279 fVec6[1] = fVec6[0];
280 fRec2[1] = fRec2[0];
281 fRec3[1] = fRec3[0];
282 fRec20[1] = fRec20[0];
283 fVec5[1] = fVec5[0];
284 fRec4[1] = fRec4[0];
285 for (int i=3; i>0; i--) fRec5[i] = fRec5[i-1];
286 fRec7[1] = fRec7[0];
287 fRec8[1] = fRec8[0];
288 fRec19[1] = fRec19[0];
289 fVec4[1] = fVec4[0];
290 fRec9[1] = fRec9[0];
291 fRec10[1] = fRec10[0];
292 fRec11[1] = fRec11[0];
293 fRec18[1] = fRec18[0];
294 fVec3[1] = fVec3[0];
295 fRec12[1] = fRec12[0];
296 fVec2[1] = fVec2[0];
297 fRec14[1] = fRec14[0];
298 fRec15[1] = fRec15[0];
299 fRec17[1] = fRec17[0];
300 fVec1[1] = fVec1[0];
301 fRec16[1] = fRec16[0];
302 fVec0[1] = fVec0[0];
303 fRec13[1] = fRec13[0];
304 fRec6[1] = fRec6[0];
305 fRec0[1] = fRec0[0];
306 }
307 #undef fslider0
308 #undef fslider1
309 #undef fslider2
310 #undef fslider3
311 }
312
313 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
314 {
315 static_cast<Dsp*>(p)->compute(count, input0, output0);
316 }
317
318
319 void Dsp::connect(uint32_t port,void* data)
320 {
321 switch ((PortIndex)port)
322 {
323 case PREGAIN:
324 fslider3_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
325 break;
326 case GAIN1:
327 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
328 break;
329 case TONE:
330 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
331 break;
332 case DRIVE:
333 fslider0_ = (float*)data; // , 1.0, 1.0, 2e+01, 0.1
334 break;
335 default:
336 break;
337 }
338 }
339
340 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
341 {
342 static_cast<Dsp*>(p)->connect(port, data);
343 }
344
345
346 PluginLV2 *plugin() {
347 return new Dsp();
348 }
349
350 void Dsp::del_instance(PluginLV2 *p)
351 {
352 delete static_cast<Dsp*>(p);
353 }
354
355 /*
356 typedef enum
357 {
358 PREGAIN,
359 GAIN1,
360 TONE,
361 DRIVE,
362 } PortIndex;
363 */
364
365 } // end namespace gxmetal_amp
0 // generated from file '../src/LV2/faust/gxmetal_head.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxmetal_head {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 double fConst7;
21 double fConst8;
22 double fConst9;
23 FAUSTFLOAT fslider1;
24 FAUSTFLOAT *fslider1_;
25 double fRec5[2];
26 FAUSTFLOAT fslider2;
27 FAUSTFLOAT *fslider2_;
28 double fRec12[2];
29 double fConst10;
30 double fConst11;
31 double fConst12;
32 double fConst13;
33 double fConst14;
34 double fConst15;
35 double fConst16;
36 double fConst17;
37 double fConst18;
38 double fConst19;
39 double fConst20;
40 double fConst21;
41 double fConst22;
42 double fConst23;
43 double fConst24;
44 double fConst25;
45 double fConst26;
46 double fConst27;
47 double fConst28;
48 double fConst29;
49 double fConst30;
50 double fConst31;
51 double fConst32;
52 double fConst33;
53 double fConst34;
54 double fConst35;
55 double fConst36;
56 double fVec0[2];
57 double fConst37;
58 double fRec23[2];
59 double fConst38;
60 double fConst39;
61 double fRec22[2];
62 double fConst40;
63 double fRec21[2];
64 double fRec20[3];
65 double fVec1[2];
66 double fConst41;
67 double fConst42;
68 double fRec19[2];
69 double fRec18[3];
70 double fConst43;
71 double fRec17[3];
72 double fConst44;
73 double fConst45;
74 double fConst46;
75 double fConst47;
76 double fRec27[2];
77 double fRec26[3];
78 double fVec2[2];
79 double fConst48;
80 double fConst49;
81 double fRec25[2];
82 double fRec24[3];
83 double fConst50;
84 double fConst51;
85 double fConst52;
86 double fConst53;
87 double fRec31[2];
88 double fRec30[3];
89 double fConst54;
90 double fRec29[3];
91 double fRec28[3];
92 double fRec33[2];
93 double fRec32[3];
94 double fVec3[2];
95 double fRec16[2];
96 double fRec15[2];
97 double fConst55;
98 double fConst56;
99 double fConst57;
100 double fVec4[2];
101 double fConst58;
102 double fRec34[2];
103 double fRec14[2];
104 double fConst59;
105 double fConst60;
106 double fRec13[2];
107 double fVec5[2];
108 double fRec11[2];
109 double fConst61;
110 double fConst62;
111 double fConst63;
112 double fVec6[2];
113 double fConst64;
114 double fRec35[2];
115 double fRec10[2];
116 double fRec9[2];
117 double fRec8[2];
118 double fConst65;
119 double fConst66;
120 double fConst67;
121 double fVec7[2];
122 double fConst68;
123 double fRec36[2];
124 double fRec7[2];
125 double fRec6[2];
126 double fVec8[2];
127 double fConst69;
128 double fRec4[2];
129 FAUSTFLOAT fslider3;
130 FAUSTFLOAT *fslider3_;
131 double fVec9[2];
132 double fRec37[2];
133 double fConst70;
134 double fConst71;
135 double fConst72;
136 double fConst73;
137 double fConst74;
138 double fRec38[2];
139 double fRec3[2];
140 double fRec2[2];
141 double fVec10[2];
142 double fRec41[2];
143 double fRec40[2];
144 double fRec39[2];
145 double fVec11[2];
146 double fRec1[2];
147 void connect(uint32_t port,void* data);
148 void clear_state_f();
149 void init(uint32_t samplingFreq);
150 void compute(int count, float *input0, float *output0);
151
152 static void clear_state_f_static(PluginLV2*);
153 static void init_static(uint32_t samplingFreq, PluginLV2*);
154 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
155 static void del_instance(PluginLV2 *p);
156 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
157 public:
158 Dsp();
159 ~Dsp();
160 };
161
162
163
164 Dsp::Dsp()
165 : PluginLV2() {
166 version = PLUGINLV2_VERSION;
167 id = "metal";
168 name = N_("GxMetal_head");
169 mono_audio = compute_static;
170 stereo_audio = 0;
171 set_samplerate = init_static;
172 activate_plugin = 0;
173 connect_ports = connect_static;
174 clear_state = clear_state_f_static;
175 delete_instance = del_instance;
176 }
177
178 Dsp::~Dsp() {
179 }
180
181 inline void Dsp::clear_state_f()
182 {
183 for (int i=0; i<2; i++) fRec0[i] = 0;
184 for (int i=0; i<2; i++) fRec5[i] = 0;
185 for (int i=0; i<2; i++) fRec12[i] = 0;
186 for (int i=0; i<2; i++) fVec0[i] = 0;
187 for (int i=0; i<2; i++) fRec23[i] = 0;
188 for (int i=0; i<2; i++) fRec22[i] = 0;
189 for (int i=0; i<2; i++) fRec21[i] = 0;
190 for (int i=0; i<3; i++) fRec20[i] = 0;
191 for (int i=0; i<2; i++) fVec1[i] = 0;
192 for (int i=0; i<2; i++) fRec19[i] = 0;
193 for (int i=0; i<3; i++) fRec18[i] = 0;
194 for (int i=0; i<3; i++) fRec17[i] = 0;
195 for (int i=0; i<2; i++) fRec27[i] = 0;
196 for (int i=0; i<3; i++) fRec26[i] = 0;
197 for (int i=0; i<2; i++) fVec2[i] = 0;
198 for (int i=0; i<2; i++) fRec25[i] = 0;
199 for (int i=0; i<3; i++) fRec24[i] = 0;
200 for (int i=0; i<2; i++) fRec31[i] = 0;
201 for (int i=0; i<3; i++) fRec30[i] = 0;
202 for (int i=0; i<3; i++) fRec29[i] = 0;
203 for (int i=0; i<3; i++) fRec28[i] = 0;
204 for (int i=0; i<2; i++) fRec33[i] = 0;
205 for (int i=0; i<3; i++) fRec32[i] = 0;
206 for (int i=0; i<2; i++) fVec3[i] = 0;
207 for (int i=0; i<2; i++) fRec16[i] = 0;
208 for (int i=0; i<2; i++) fRec15[i] = 0;
209 for (int i=0; i<2; i++) fVec4[i] = 0;
210 for (int i=0; i<2; i++) fRec34[i] = 0;
211 for (int i=0; i<2; i++) fRec14[i] = 0;
212 for (int i=0; i<2; i++) fRec13[i] = 0;
213 for (int i=0; i<2; i++) fVec5[i] = 0;
214 for (int i=0; i<2; i++) fRec11[i] = 0;
215 for (int i=0; i<2; i++) fVec6[i] = 0;
216 for (int i=0; i<2; i++) fRec35[i] = 0;
217 for (int i=0; i<2; i++) fRec10[i] = 0;
218 for (int i=0; i<2; i++) fRec9[i] = 0;
219 for (int i=0; i<2; i++) fRec8[i] = 0;
220 for (int i=0; i<2; i++) fVec7[i] = 0;
221 for (int i=0; i<2; i++) fRec36[i] = 0;
222 for (int i=0; i<2; i++) fRec7[i] = 0;
223 for (int i=0; i<2; i++) fRec6[i] = 0;
224 for (int i=0; i<2; i++) fVec8[i] = 0;
225 for (int i=0; i<2; i++) fRec4[i] = 0;
226 for (int i=0; i<2; i++) fVec9[i] = 0;
227 for (int i=0; i<2; i++) fRec37[i] = 0;
228 for (int i=0; i<2; i++) fRec38[i] = 0;
229 for (int i=0; i<2; i++) fRec3[i] = 0;
230 for (int i=0; i<2; i++) fRec2[i] = 0;
231 for (int i=0; i<2; i++) fVec10[i] = 0;
232 for (int i=0; i<2; i++) fRec41[i] = 0;
233 for (int i=0; i<2; i++) fRec40[i] = 0;
234 for (int i=0; i<2; i++) fRec39[i] = 0;
235 for (int i=0; i<2; i++) fVec11[i] = 0;
236 for (int i=0; i<2; i++) fRec1[i] = 0;
237 }
238
239 void Dsp::clear_state_f_static(PluginLV2 *p)
240 {
241 static_cast<Dsp*>(p)->clear_state_f();
242 }
243
244 inline void Dsp::init(uint32_t samplingFreq)
245 {
246 fSamplingFreq = samplingFreq;
247 iConst0 = min(192000, max(1, fSamplingFreq));
248 fConst1 = (1.0 / tan((20517.741620594938 / iConst0)));
249 fConst2 = (1 + fConst1);
250 fConst3 = (0 - ((1 - fConst1) / fConst2));
251 fConst4 = (1.0 / tan((97.38937226128358 / iConst0)));
252 fConst5 = (1 + fConst4);
253 fConst6 = (0 - ((1 - fConst4) / fConst5));
254 fConst7 = (1.0 / tan((1281.7698026646356 / iConst0)));
255 fConst8 = (1 + fConst7);
256 fConst9 = (0 - ((1 - fConst7) / fConst8));
257 fConst10 = (1.0 / tan((376.99111843077515 / iConst0)));
258 fConst11 = (1 + fConst10);
259 fConst12 = (0 - ((1 - fConst10) / fConst11));
260 fConst13 = tan((942.4777960769379 / iConst0));
261 fConst14 = (1.0 / faustpower<2>(fConst13));
262 fConst15 = (2 * (1 - fConst14));
263 fConst16 = (1.0 / fConst13);
264 fConst17 = (1 + ((fConst16 - 1.0) / fConst13));
265 fConst18 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
266 fConst19 = tan((3769.9111843077517 / iConst0));
267 fConst20 = (1.0 / faustpower<2>(fConst19));
268 fConst21 = (2 * (1 - fConst20));
269 fConst22 = (1.0 / fConst19);
270 fConst23 = (1 + ((fConst22 - 1.0000000000000004) / fConst19));
271 fConst24 = (1 + ((fConst22 + 1.0000000000000004) / fConst19));
272 fConst25 = (1.0 / fConst24);
273 fConst26 = (1 + fConst22);
274 fConst27 = (0 - ((1 - fConst22) / fConst26));
275 fConst28 = tan((10053.096491487338 / iConst0));
276 fConst29 = (1.0 / faustpower<2>(fConst28));
277 fConst30 = (2 * (1 - fConst29));
278 fConst31 = (1.0 / fConst28);
279 fConst32 = (1 + ((fConst31 - 1.0000000000000004) / fConst28));
280 fConst33 = (1 + ((1.0000000000000004 + fConst31) / fConst28));
281 fConst34 = (1.0 / fConst33);
282 fConst35 = (1 + fConst31);
283 fConst36 = (0 - ((1 - fConst31) / fConst35));
284 fConst37 = (1.0 / fConst2);
285 fConst38 = (0 - fConst10);
286 fConst39 = (1.0 / fConst11);
287 fConst40 = (1.0 / fConst35);
288 fConst41 = (0 - fConst22);
289 fConst42 = (1.0 / (fConst26 * fConst33));
290 fConst43 = (2 * (0 - fConst20));
291 fConst44 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
292 fConst45 = (1.0 / (1 + ((fConst16 + 1.0000000000000004) / fConst13)));
293 fConst46 = (1 + fConst16);
294 fConst47 = (0 - ((1 - fConst16) / fConst46));
295 fConst48 = (0 - fConst16);
296 fConst49 = (1.0 / (fConst46 * fConst24));
297 fConst50 = (2 * (0 - fConst14));
298 fConst51 = (1 + ((fConst22 - 1.0) / fConst19));
299 fConst52 = (1.0 / (1 + ((1.0 + fConst22) / fConst19)));
300 fConst53 = (0 - fConst31);
301 fConst54 = (2 * (0 - fConst29));
302 fConst55 = (1.0 / tan((270.1769682087222 / iConst0)));
303 fConst56 = (1 + fConst55);
304 fConst57 = (0 - ((1 - fConst55) / fConst56));
305 fConst58 = (1.0 / fConst56);
306 fConst59 = (0 - fConst4);
307 fConst60 = (0.025 / fConst5);
308 fConst61 = (1.0 / tan((414.6902302738527 / iConst0)));
309 fConst62 = (1 + fConst61);
310 fConst63 = (0 - ((1 - fConst61) / fConst62));
311 fConst64 = (1.0 / fConst62);
312 fConst65 = (1.0 / tan((609.4689747964198 / iConst0)));
313 fConst66 = (1 + fConst65);
314 fConst67 = (0 - ((1 - fConst65) / fConst66));
315 fConst68 = (1.0 / fConst66);
316 fConst69 = (1.0 / fConst8);
317 fConst70 = (1.0 / tan((5830.795965062656 / iConst0)));
318 fConst71 = (1 + fConst70);
319 fConst72 = (0 - ((1 - fConst70) / fConst71));
320 fConst73 = (0 - fConst70);
321 fConst74 = (1.0 / fConst71);
322 clear_state_f();
323 }
324
325 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
326 {
327 static_cast<Dsp*>(p)->init(samplingFreq);
328 }
329
330 inline void Dsp::compute(int count, float *input0, float *output0)
331 {
332 #define fslider0 (*fslider0_)
333 #define fslider1 (*fslider1_)
334 #define fslider2 (*fslider2_)
335 #define fslider3 (*fslider3_)
336 double fSlow0 = fslider0;
337 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * (0 - (12 * fSlow0)))));
338 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
339 double fSlow3 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
340 double fSlow4 = pow(1e+01,(1.2 * fSlow0));
341 double fSlow5 = pow(1e+01,(1.6 * fSlow0));
342 double fSlow6 = (fConst45 * fSlow5);
343 double fSlow7 = (fConst45 * pow(1e+01,(0.8 * fSlow0)));
344 double fSlow8 = (2 * (fSlow0 - 0.5));
345 double fSlow9 = (1 - max(0, (0 - fSlow8)));
346 double fSlow10 = (1 - max(0, fSlow8));
347 double fSlow11 = fslider3;
348 double fSlow12 = (1 - fSlow11);
349 for (int i=0; i<count; i++) {
350 fRec0[0] = (fSlow1 + (0.999 * fRec0[1]));
351 fRec5[0] = (fSlow2 + (0.999 * fRec5[1]));
352 fRec12[0] = (fSlow3 + (0.999 * fRec12[1]));
353 double fTemp0 = (fConst15 * fRec17[1]);
354 double fTemp1 = (double)input0[i];
355 fVec0[0] = fTemp1;
356 fRec23[0] = ((fConst37 * (fVec0[0] + fVec0[1])) + (fConst3 * fRec23[1]));
357 fRec22[0] = ((fConst39 * ((fConst38 * fRec23[1]) + (fConst10 * fRec23[0]))) + (fConst12 * fRec22[1]));
358 fRec21[0] = ((fConst40 * (fRec22[0] + fRec22[1])) + (fConst36 * fRec21[1]));
359 fRec20[0] = (fRec21[0] - (fConst34 * ((fConst32 * fRec20[2]) + (fConst30 * fRec20[1]))));
360 double fTemp2 = (fRec20[2] + (fRec20[0] + (2 * fRec20[1])));
361 fVec1[0] = fTemp2;
362 fRec19[0] = ((fConst42 * ((fConst41 * fVec1[1]) + (fConst22 * fVec1[0]))) + (fConst27 * fRec19[1]));
363 fRec18[0] = (fRec19[0] - (fConst25 * ((fConst23 * fRec18[2]) + (fConst21 * fRec18[1]))));
364 fRec17[0] = ((fConst25 * (((fConst20 * fRec18[0]) + (fConst43 * fRec18[1])) + (fConst20 * fRec18[2]))) - (fConst18 * ((fConst17 * fRec17[2]) + fTemp0)));
365 double fTemp3 = max(-1, min(1, (fSlow4 * (fRec17[2] + (fConst18 * (fTemp0 + (fConst17 * fRec17[0])))))));
366 fRec27[0] = ((fConst42 * (fVec1[0] + fVec1[1])) + (fConst27 * fRec27[1]));
367 fRec26[0] = (fRec27[0] - (fConst25 * ((fConst23 * fRec26[2]) + (fConst21 * fRec26[1]))));
368 double fTemp4 = (fRec26[2] + (fRec26[0] + (2 * fRec26[1])));
369 fVec2[0] = fTemp4;
370 fRec25[0] = ((fConst49 * ((fConst48 * fVec2[1]) + (fConst16 * fVec2[0]))) + (fConst47 * fRec25[1]));
371 fRec24[0] = (fRec25[0] - (fConst45 * ((fConst44 * fRec24[2]) + (fConst15 * fRec24[1]))));
372 double fTemp5 = max(-1, min(1, (fSlow6 * (((fConst14 * fRec24[0]) + (fConst50 * fRec24[1])) + (fConst14 * fRec24[2])))));
373 double fTemp6 = (fConst15 * fRec28[1]);
374 double fTemp7 = (fConst21 * fRec29[1]);
375 fRec31[0] = ((fConst40 * ((fConst53 * fRec22[1]) + (fConst31 * fRec22[0]))) + (fConst36 * fRec31[1]));
376 fRec30[0] = (fRec31[0] - (fConst34 * ((fConst32 * fRec30[2]) + (fConst30 * fRec30[1]))));
377 fRec29[0] = ((fConst34 * (((fConst29 * fRec30[0]) + (fConst54 * fRec30[1])) + (fConst29 * fRec30[2]))) - (fConst52 * ((fConst51 * fRec29[2]) + fTemp7)));
378 fRec28[0] = ((fRec29[2] + (fConst52 * (fTemp7 + (fConst51 * fRec29[0])))) - (fConst18 * ((fConst17 * fRec28[2]) + fTemp6)));
379 double fTemp8 = max(-1, min(1, (fSlow5 * (fRec28[2] + (fConst18 * (fTemp6 + (fConst17 * fRec28[0])))))));
380 fRec33[0] = ((fConst49 * (fVec2[0] + fVec2[1])) + (fConst47 * fRec33[1]));
381 fRec32[0] = (fRec33[0] - (fConst45 * ((fConst44 * fRec32[2]) + (fConst15 * fRec32[1]))));
382 double fTemp9 = max(-1, min(1, (fSlow7 * (fRec32[2] + (fRec32[0] + (2 * fRec32[1]))))));
383 double fTemp10 = ((1.2589412 * (fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9))))) + (1.584893192 * ((fTemp8 * (1 - (0.3333333333333333 * faustpower<2>(fTemp8)))) + ((fTemp5 * (1 - (0.3333333333333333 * faustpower<2>(fTemp5)))) + (0.8413951417869425 * (fTemp3 * (1 - (0.3333333333333333 * faustpower<2>(fTemp3)))))))));
384 fVec3[0] = fTemp10;
385 fRec16[0] = ((fConst37 * (fVec3[0] + fVec3[1])) + (fConst3 * fRec16[1]));
386 fRec15[0] = ((fConst39 * ((fConst38 * fRec16[1]) + (fConst10 * fRec16[0]))) + (fConst12 * fRec15[1]));
387 double fTemp11 = (1e-15 + (0.027 * fRec14[1]));
388 fVec4[0] = fTemp11;
389 fRec34[0] = ((fConst58 * (fVec4[0] + fVec4[1])) + (fConst57 * fRec34[1]));
390 fRec14[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fSlow10 * fVec0[0]) + (fRec34[0] + (fSlow9 * fRec15[0]))) - 1.5816559999999988)) - 191.42014814814814);
391 fRec13[0] = ((fConst60 * ((fConst59 * fRec14[1]) + (fConst4 * fRec14[0]))) + (fConst6 * fRec13[1]));
392 double fTemp12 = (fRec13[0] * fRec12[0]);
393 fVec5[0] = fTemp12;
394 fRec11[0] = ((fConst37 * (fVec5[0] + fVec5[1])) + (fConst3 * fRec11[1]));
395 double fTemp13 = (1e-15 + (0.015 * fRec10[1]));
396 fVec6[0] = fTemp13;
397 fRec35[0] = ((fConst64 * (fVec6[0] + fVec6[1])) + (fConst63 * fRec35[1]));
398 fRec10[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec35[0] + fRec11[0]) - 1.204284999999999)) - 169.71433333333334);
399 fRec9[0] = ((fConst60 * ((fConst59 * fRec10[1]) + (fConst4 * fRec10[0]))) + (fConst6 * fRec9[1]));
400 fRec8[0] = ((fConst37 * (fRec9[0] + fRec9[1])) + (fConst3 * fRec8[1]));
401 double fTemp14 = (1e-15 + (0.0082 * fRec7[1]));
402 fVec7[0] = fTemp14;
403 fRec36[0] = ((fConst68 * (fVec7[0] + fVec7[1])) + (fConst67 * fRec36[1]));
404 fRec7[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec36[0] + fRec8[0]) - 0.840702999999999)) - 147.47524390243905);
405 fRec6[0] = ((fConst60 * ((fConst59 * fRec7[1]) + (fConst4 * fRec7[0]))) + (fConst6 * fRec6[1]));
406 double fTemp15 = (fRec6[0] * fRec5[0]);
407 fVec8[0] = fTemp15;
408 fRec4[0] = ((fConst69 * (fVec8[0] + fVec8[1])) + (fConst9 * fRec4[1]));
409 double fTemp16 = (fSlow12 * fRec4[0]);
410 double fTemp17 = (1e-15 + (0.0041 * fRec3[1]));
411 fVec9[0] = fTemp17;
412 fRec37[0] = ((fConst37 * (fVec9[0] + fVec9[1])) + (fConst3 * fRec37[1]));
413 fRec38[0] = ((fConst74 * ((fConst73 * fVec8[1]) + (fConst70 * fVec8[0]))) + (fConst72 * fRec38[1]));
414 double fTemp18 = (fSlow11 * fRec38[0]);
415 fRec3[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fTemp18 + (fRec37[0] + fTemp16)) - 0.659760999999999)) - 89.08268292682925);
416 fRec2[0] = ((fConst60 * ((fConst59 * fRec3[1]) + (fConst4 * fRec3[0]))) + (fConst6 * fRec2[1]));
417 double fTemp19 = (1e-15 + (0.0041 * fRec40[1]));
418 fVec10[0] = fTemp19;
419 fRec41[0] = ((fConst37 * (fVec10[0] + fVec10[1])) + (fConst3 * fRec41[1]));
420 fRec40[0] = (Ftube(TUBE_TABLE_6V6_68k, ((fTemp18 + (fRec41[0] + fTemp16)) - 0.664540999999999)) - 87.91682926829267);
421 fRec39[0] = ((fConst60 * ((fConst59 * fRec40[1]) + (fConst4 * fRec40[0]))) + (fConst6 * fRec39[1]));
422 double fTemp20 = (fRec39[0] + fRec2[0]);
423 fVec11[0] = fTemp20;
424 fRec1[0] = ((fConst37 * (fVec11[0] + fVec11[1])) + (fConst3 * fRec1[1]));
425 output0[i] = (FAUSTFLOAT)(fRec1[0] * fRec0[0]);
426 // post processing
427 fRec1[1] = fRec1[0];
428 fVec11[1] = fVec11[0];
429 fRec39[1] = fRec39[0];
430 fRec40[1] = fRec40[0];
431 fRec41[1] = fRec41[0];
432 fVec10[1] = fVec10[0];
433 fRec2[1] = fRec2[0];
434 fRec3[1] = fRec3[0];
435 fRec38[1] = fRec38[0];
436 fRec37[1] = fRec37[0];
437 fVec9[1] = fVec9[0];
438 fRec4[1] = fRec4[0];
439 fVec8[1] = fVec8[0];
440 fRec6[1] = fRec6[0];
441 fRec7[1] = fRec7[0];
442 fRec36[1] = fRec36[0];
443 fVec7[1] = fVec7[0];
444 fRec8[1] = fRec8[0];
445 fRec9[1] = fRec9[0];
446 fRec10[1] = fRec10[0];
447 fRec35[1] = fRec35[0];
448 fVec6[1] = fVec6[0];
449 fRec11[1] = fRec11[0];
450 fVec5[1] = fVec5[0];
451 fRec13[1] = fRec13[0];
452 fRec14[1] = fRec14[0];
453 fRec34[1] = fRec34[0];
454 fVec4[1] = fVec4[0];
455 fRec15[1] = fRec15[0];
456 fRec16[1] = fRec16[0];
457 fVec3[1] = fVec3[0];
458 fRec32[2] = fRec32[1]; fRec32[1] = fRec32[0];
459 fRec33[1] = fRec33[0];
460 fRec28[2] = fRec28[1]; fRec28[1] = fRec28[0];
461 fRec29[2] = fRec29[1]; fRec29[1] = fRec29[0];
462 fRec30[2] = fRec30[1]; fRec30[1] = fRec30[0];
463 fRec31[1] = fRec31[0];
464 fRec24[2] = fRec24[1]; fRec24[1] = fRec24[0];
465 fRec25[1] = fRec25[0];
466 fVec2[1] = fVec2[0];
467 fRec26[2] = fRec26[1]; fRec26[1] = fRec26[0];
468 fRec27[1] = fRec27[0];
469 fRec17[2] = fRec17[1]; fRec17[1] = fRec17[0];
470 fRec18[2] = fRec18[1]; fRec18[1] = fRec18[0];
471 fRec19[1] = fRec19[0];
472 fVec1[1] = fVec1[0];
473 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
474 fRec21[1] = fRec21[0];
475 fRec22[1] = fRec22[0];
476 fRec23[1] = fRec23[0];
477 fVec0[1] = fVec0[0];
478 fRec12[1] = fRec12[0];
479 fRec5[1] = fRec5[0];
480 fRec0[1] = fRec0[0];
481 }
482 #undef fslider0
483 #undef fslider1
484 #undef fslider2
485 #undef fslider3
486 }
487
488 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
489 {
490 static_cast<Dsp*>(p)->compute(count, input0, output0);
491 }
492
493
494 void Dsp::connect(uint32_t port,void* data)
495 {
496 switch ((PortIndex)port)
497 {
498 case TONE:
499 fslider3_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
500 break;
501 case PREGAIN:
502 fslider2_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
503 break;
504 case GAIN1:
505 fslider1_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
506 break;
507 case DRIVE:
508 fslider0_ = (float*)data; // , 0.35, 0.0, 1.0, 0.01
509 break;
510 default:
511 break;
512 }
513 }
514
515 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
516 {
517 static_cast<Dsp*>(p)->connect(port, data);
518 }
519
520
521 PluginLV2 *plugin() {
522 return new Dsp();
523 }
524
525 void Dsp::del_instance(PluginLV2 *p)
526 {
527 delete static_cast<Dsp*>(p);
528 }
529
530 /*
531 typedef enum
532 {
533 TONE,
534 PREGAIN,
535 GAIN1,
536 DRIVE,
537 } PortIndex;
538 */
539
540 } // end namespace gxmetal_head
0 // generated from file '../src/LV2/faust/gxnoamp.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace gxnoamp {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 double fRec0[2];
12 void connect(uint32_t port,void* data);
13 void clear_state_f();
14 void init(uint32_t samplingFreq);
15 void compute(int count, float *input0, float *output0);
16
17 static void clear_state_f_static(PluginLV2*);
18 static void init_static(uint32_t samplingFreq, PluginLV2*);
19 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
20 static void del_instance(PluginLV2 *p);
21 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
22 public:
23 Dsp();
24 ~Dsp();
25 };
26
27
28
29 Dsp::Dsp()
30 : PluginLV2() {
31 version = PLUGINLV2_VERSION;
32 id = "noamp";
33 name = N_("---");
34 mono_audio = compute_static;
35 stereo_audio = 0;
36 set_samplerate = init_static;
37 activate_plugin = 0;
38 connect_ports = connect_static;
39 clear_state = clear_state_f_static;
40 delete_instance = del_instance;
41 }
42
43 Dsp::~Dsp() {
44 }
45
46 inline void Dsp::clear_state_f()
47 {
48 for (int i=0; i<2; i++) fRec0[i] = 0;
49 }
50
51 void Dsp::clear_state_f_static(PluginLV2 *p)
52 {
53 static_cast<Dsp*>(p)->clear_state_f();
54 }
55
56 inline void Dsp::init(uint32_t samplingFreq)
57 {
58 fSamplingFreq = samplingFreq;
59 clear_state_f();
60 }
61
62 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
63 {
64 static_cast<Dsp*>(p)->init(samplingFreq);
65 }
66
67 inline void Dsp::compute(int count, float *input0, float *output0)
68 {
69 #define fslider0 (*fslider0_)
70 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
71 for (int i=0; i<count; i++) {
72 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
73 output0[i] = (FAUSTFLOAT)((double)input0[i] * fRec0[0]);
74 // post processing
75 fRec0[1] = fRec0[0];
76 }
77 #undef fslider0
78 }
79
80 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->compute(count, input0, output0);
83 }
84
85
86 void Dsp::connect(uint32_t port,void* data)
87 {
88 switch ((PortIndex)port)
89 {
90 case GAIN1:
91 fslider0_ = (float*)data; // , -6.0, -2e+01, 2e+01, 0.1
92 break;
93 default:
94 break;
95 }
96 }
97
98 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
99 {
100 static_cast<Dsp*>(p)->connect(port, data);
101 }
102
103
104 PluginLV2 *plugin() {
105 return new Dsp();
106 }
107
108 void Dsp::del_instance(PluginLV2 *p)
109 {
110 delete static_cast<Dsp*>(p);
111 }
112
113 /*
114 typedef enum
115 {
116 GAIN1,
117 } PortIndex;
118 */
119
120 } // end namespace gxnoamp
0 // generated from file '../src/LV2/faust/gxtilttone.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxtilttone {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec0[2];
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 double fConst7;
21 double fConst8;
22 double fConst9;
23 double fConst10;
24 double fConst11;
25 double fConst12;
26 double fVec0[2];
27 double fConst13;
28 double fRec7[2];
29 double fRec6[2];
30 double fConst14;
31 double fConst15;
32 double fRec5[2];
33 double fConst16;
34 double fConst17;
35 double fRec4[2];
36 FAUSTFLOAT fslider1;
37 FAUSTFLOAT *fslider1_;
38 double fConst18;
39 double fConst19;
40 double fConst20;
41 double fConst21;
42 double fRec8[2];
43 FAUSTFLOAT fslider2;
44 FAUSTFLOAT *fslider2_;
45 double fRec9[2];
46 double fVec1[2];
47 double fConst22;
48 double fRec3[2];
49 double fVec2[2];
50 double fRec10[2];
51 double fRec2[2];
52 double fRec1[2];
53 void connect(uint32_t port,void* data);
54 void clear_state_f();
55 void init(uint32_t samplingFreq);
56 void compute(int count, float *input0, float *output0);
57
58 static void clear_state_f_static(PluginLV2*);
59 static void init_static(uint32_t samplingFreq, PluginLV2*);
60 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
61 static void del_instance(PluginLV2 *p);
62 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
63 public:
64 Dsp();
65 ~Dsp();
66 };
67
68
69
70 Dsp::Dsp()
71 : PluginLV2() {
72 version = PLUGINLV2_VERSION;
73 id = "gxtilttone";
74 name = N_("Gx Tilt Tone");
75 mono_audio = compute_static;
76 stereo_audio = 0;
77 set_samplerate = init_static;
78 activate_plugin = 0;
79 connect_ports = connect_static;
80 clear_state = clear_state_f_static;
81 delete_instance = del_instance;
82 }
83
84 Dsp::~Dsp() {
85 }
86
87 inline void Dsp::clear_state_f()
88 {
89 for (int i=0; i<2; i++) fRec0[i] = 0;
90 for (int i=0; i<2; i++) fVec0[i] = 0;
91 for (int i=0; i<2; i++) fRec7[i] = 0;
92 for (int i=0; i<2; i++) fRec6[i] = 0;
93 for (int i=0; i<2; i++) fRec5[i] = 0;
94 for (int i=0; i<2; i++) fRec4[i] = 0;
95 for (int i=0; i<2; i++) fRec8[i] = 0;
96 for (int i=0; i<2; i++) fRec9[i] = 0;
97 for (int i=0; i<2; i++) fVec1[i] = 0;
98 for (int i=0; i<2; i++) fRec3[i] = 0;
99 for (int i=0; i<2; i++) fVec2[i] = 0;
100 for (int i=0; i<2; i++) fRec10[i] = 0;
101 for (int i=0; i<2; i++) fRec2[i] = 0;
102 for (int i=0; i<2; i++) fRec1[i] = 0;
103 }
104
105 void Dsp::clear_state_f_static(PluginLV2 *p)
106 {
107 static_cast<Dsp*>(p)->clear_state_f();
108 }
109
110 inline void Dsp::init(uint32_t samplingFreq)
111 {
112 fSamplingFreq = samplingFreq;
113 iConst0 = min(192000, max(1, fSamplingFreq));
114 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
115 fConst2 = (1 + fConst1);
116 fConst3 = (0 - ((1 - fConst1) / fConst2));
117 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
118 fConst5 = (1 + fConst4);
119 fConst6 = (0 - ((1 - fConst4) / fConst5));
120 fConst7 = (1.0 / tan((5830.795965062656 / iConst0)));
121 fConst8 = (1 + fConst7);
122 fConst9 = (0 - ((1 - fConst7) / fConst8));
123 fConst10 = (1.0 / tan((270.1769682087222 / iConst0)));
124 fConst11 = (1 + fConst10);
125 fConst12 = (0 - ((1 - fConst10) / fConst11));
126 fConst13 = (1.0 / fConst11);
127 fConst14 = (0 - fConst1);
128 fConst15 = (0.025 / fConst2);
129 fConst16 = (0 - fConst7);
130 fConst17 = (1.0 / fConst8);
131 fConst18 = (1.0 / tan((1281.7698026646356 / iConst0)));
132 fConst19 = (1 + fConst18);
133 fConst20 = (0 - ((1 - fConst18) / fConst19));
134 fConst21 = (1.0 / fConst19);
135 fConst22 = (1.0 / fConst5);
136 clear_state_f();
137 }
138
139 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
140 {
141 static_cast<Dsp*>(p)->init(samplingFreq);
142 }
143
144 inline void Dsp::compute(int count, float *input0, float *output0)
145 {
146 #define fslider0 (*fslider0_)
147 #define fslider1 (*fslider1_)
148 #define fslider2 (*fslider2_)
149 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
150 double fSlow1 = fslider1;
151 double fSlow2 = (1 - fSlow1);
152 double fSlow3 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
153 for (int i=0; i<count; i++) {
154 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
155 double fTemp0 = (1e-15 + (0.027 * fRec6[1]));
156 fVec0[0] = fTemp0;
157 fRec7[0] = ((fConst13 * (fVec0[0] + fVec0[1])) + (fConst12 * fRec7[1]));
158 fRec6[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec7[0] + ((double)input0[i] * fRec0[0])) - 1.5816559999999988)) - 191.42014814814814);
159 fRec5[0] = ((fConst15 * ((fConst14 * fRec6[1]) + (fConst1 * fRec6[0]))) + (fConst3 * fRec5[1]));
160 fRec4[0] = ((fConst17 * ((fConst16 * fRec5[1]) + (fConst7 * fRec5[0]))) + (fConst9 * fRec4[1]));
161 fRec8[0] = ((fConst21 * (fRec5[0] + fRec5[1])) + (fConst20 * fRec8[1]));
162 fRec9[0] = (fSlow3 + (0.999 * fRec9[1]));
163 double fTemp1 = (fRec9[0] * ((fSlow2 * fRec8[0]) + (fSlow1 * fRec4[0])));
164 fVec1[0] = fTemp1;
165 fRec3[0] = ((fConst22 * (fVec1[0] + fVec1[1])) + (fConst6 * fRec3[1]));
166 double fTemp2 = (1e-15 + (0.027 * fRec2[1]));
167 fVec2[0] = fTemp2;
168 fRec10[0] = ((fConst13 * (fVec2[0] + fVec2[1])) + (fConst12 * fRec10[1]));
169 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_68k, ((fRec10[0] + fRec3[0]) - 1.5816559999999988)) - 191.42014814814814);
170 fRec1[0] = ((fConst15 * ((fConst14 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
171 output0[i] = (FAUSTFLOAT)(fRec1[0] / fRec0[0]);
172 // post processing
173 fRec1[1] = fRec1[0];
174 fRec2[1] = fRec2[0];
175 fRec10[1] = fRec10[0];
176 fVec2[1] = fVec2[0];
177 fRec3[1] = fRec3[0];
178 fVec1[1] = fVec1[0];
179 fRec9[1] = fRec9[0];
180 fRec8[1] = fRec8[0];
181 fRec4[1] = fRec4[0];
182 fRec5[1] = fRec5[0];
183 fRec6[1] = fRec6[0];
184 fRec7[1] = fRec7[0];
185 fVec0[1] = fVec0[0];
186 fRec0[1] = fRec0[0];
187 }
188 #undef fslider0
189 #undef fslider1
190 #undef fslider2
191 }
192
193 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
194 {
195 static_cast<Dsp*>(p)->compute(count, input0, output0);
196 }
197
198
199 void Dsp::connect(uint32_t port,void* data)
200 {
201 switch ((PortIndex)port)
202 {
203 case GAIN:
204 fslider2_ = (float*)data; // , 0.0, 0.0, 2e+01, 0.1
205 break;
206 case TONE:
207 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
208 break;
209 case DRIVE:
210 fslider0_ = (float*)data; // , 0.0, 0.0, 2e+01, 0.1
211 break;
212 default:
213 break;
214 }
215 }
216
217 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
218 {
219 static_cast<Dsp*>(p)->connect(port, data);
220 }
221
222
223 PluginLV2 *plugin() {
224 return new Dsp();
225 }
226
227 void Dsp::del_instance(PluginLV2 *p)
228 {
229 delete static_cast<Dsp*>(p);
230 }
231
232 /*
233 typedef enum
234 {
235 GAIN,
236 TONE,
237 DRIVE,
238 } PortIndex;
239 */
240
241 } // end namespace gxtilttone
0 // generated from file '../src/LV2/faust/gxtubedelay.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxtubedelay {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iConst0;
11 double fConst1;
12 double fConst2;
13 double fConst3;
14 double fConst4;
15 double fConst5;
16 double fConst6;
17 FAUSTFLOAT fslider0;
18 FAUSTFLOAT *fslider0_;
19 double fRec3[2];
20 double fConst7;
21 double fConst8;
22 double fConst9;
23 double fVec0[2];
24 double fConst10;
25 double fRec8[2];
26 double fRec7[2];
27 double fConst11;
28 double fConst12;
29 double fRec6[2];
30 double fConst13;
31 double fRec5[2];
32 double fConst14;
33 double fConst15;
34 double fConst16;
35 double fConst17;
36 double fConst18;
37 double fConst19;
38 double fConst20;
39 FAUSTFLOAT fslider1;
40 FAUSTFLOAT *fslider1_;
41 double fConst21;
42 double fVec1[2];
43 double fConst22;
44 double fConst23;
45 double fRec10[2];
46 double fConst24;
47 double fRec9[2];
48 int IOTA;
49 double *fVec2;
50 double fConst25;
51 double fConst26;
52 FAUSTFLOAT fslider2;
53 FAUSTFLOAT *fslider2_;
54 double fConst27;
55 double fRec11[2];
56 double fRec12[2];
57 double fRec13[2];
58 double fRec14[2];
59 FAUSTFLOAT fslider3;
60 FAUSTFLOAT *fslider3_;
61 double fRec4[2];
62 double fVec3[2];
63 double fRec15[2];
64 double fRec2[2];
65 double fRec1[2];
66 double fRec0[2];
67 bool mem_allocated;
68 void mem_alloc();
69 void mem_free();
70 void connect(uint32_t port,void* data);
71 void clear_state_f();
72 int activate(bool start);
73 void init(uint32_t samplingFreq);
74 void compute(int count, float *input0, float *output0);
75
76 static void clear_state_f_static(PluginLV2*);
77 static int activate_static(bool start, PluginLV2*);
78 static void init_static(uint32_t samplingFreq, PluginLV2*);
79 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
80 static void del_instance(PluginLV2 *p);
81 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
82 public:
83 Dsp();
84 ~Dsp();
85 };
86
87
88
89 Dsp::Dsp()
90 : PluginLV2(),
91 fVec2(0),
92 mem_allocated(false) {
93 version = PLUGINLV2_VERSION;
94 id = "gxtubedelay";
95 name = N_("Tube Delay");
96 mono_audio = compute_static;
97 stereo_audio = 0;
98 set_samplerate = init_static;
99 activate_plugin = activate_static;
100 connect_ports = connect_static;
101 clear_state = clear_state_f_static;
102 delete_instance = del_instance;
103 }
104
105 Dsp::~Dsp() {
106 }
107
108 inline void Dsp::clear_state_f()
109 {
110 for (int i=0; i<2; i++) fRec3[i] = 0;
111 for (int i=0; i<2; i++) fVec0[i] = 0;
112 for (int i=0; i<2; i++) fRec8[i] = 0;
113 for (int i=0; i<2; i++) fRec7[i] = 0;
114 for (int i=0; i<2; i++) fRec6[i] = 0;
115 for (int i=0; i<2; i++) fRec5[i] = 0;
116 for (int i=0; i<2; i++) fVec1[i] = 0;
117 for (int i=0; i<2; i++) fRec10[i] = 0;
118 for (int i=0; i<2; i++) fRec9[i] = 0;
119 for (int i=0; i<262144; i++) fVec2[i] = 0;
120 for (int i=0; i<2; i++) fRec11[i] = 0;
121 for (int i=0; i<2; i++) fRec12[i] = 0;
122 for (int i=0; i<2; i++) fRec13[i] = 0;
123 for (int i=0; i<2; i++) fRec14[i] = 0;
124 for (int i=0; i<2; i++) fRec4[i] = 0;
125 for (int i=0; i<2; i++) fVec3[i] = 0;
126 for (int i=0; i<2; i++) fRec15[i] = 0;
127 for (int i=0; i<2; i++) fRec2[i] = 0;
128 for (int i=0; i<2; i++) fRec1[i] = 0;
129 for (int i=0; i<2; i++) fRec0[i] = 0;
130 }
131
132 void Dsp::clear_state_f_static(PluginLV2 *p)
133 {
134 static_cast<Dsp*>(p)->clear_state_f();
135 }
136
137 inline void Dsp::init(uint32_t samplingFreq)
138 {
139 fSamplingFreq = samplingFreq;
140 iConst0 = min(192000, max(1, fSamplingFreq));
141 fConst1 = (1.0 / tan((20517.741620594938 / iConst0)));
142 fConst2 = (1 + fConst1);
143 fConst3 = (0 - ((1 - fConst1) / fConst2));
144 fConst4 = (1.0 / tan((97.38937226128358 / iConst0)));
145 fConst5 = (1 + fConst4);
146 fConst6 = (0 - ((1 - fConst4) / fConst5));
147 fConst7 = (1.0 / tan((6.5973445725385655 / iConst0)));
148 fConst8 = (1 + fConst7);
149 fConst9 = (0 - ((1 - fConst7) / fConst8));
150 fConst10 = (1.0 / fConst8);
151 fConst11 = (0 - fConst4);
152 fConst12 = (0.025 / fConst5);
153 fConst13 = (1.0 / fConst2);
154 fConst14 = (1.0 / tan((37699.11184307752 / iConst0)));
155 fConst15 = (1 + fConst14);
156 fConst16 = (0 - ((1 - fConst14) / fConst15));
157 fConst17 = tan((376.99111843077515 / iConst0));
158 fConst18 = (1.0 / fConst17);
159 fConst19 = (1 + fConst18);
160 fConst20 = (0 - ((1 - fConst18) / fConst19));
161 fConst21 = (0.1 / fConst17);
162 fConst22 = (0 - fConst18);
163 fConst23 = (1.0 / fConst19);
164 fConst24 = (1.0 / fConst15);
165 IOTA = 0;
166 fConst25 = (1e+01 / iConst0);
167 fConst26 = (0 - fConst25);
168 fConst27 = (0.001 * iConst0);
169 }
170
171 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
172 {
173 static_cast<Dsp*>(p)->init(samplingFreq);
174 }
175
176 void Dsp::mem_alloc()
177 {
178 if (!fVec2) fVec2 = new double[262144];
179 mem_allocated = true;
180 }
181
182 void Dsp::mem_free()
183 {
184 mem_allocated = false;
185 if (fVec2) { delete fVec2; fVec2 = 0; }
186 }
187
188 int Dsp::activate(bool start)
189 {
190 if (start) {
191 if (!mem_allocated) {
192 mem_alloc();
193 clear_state_f();
194 }
195 } else if (!mem_allocated) {
196 mem_free();
197 }
198 return 0;
199 }
200
201 int Dsp::activate_static(bool start, PluginLV2 *p)
202 {
203 return static_cast<Dsp*>(p)->activate(start);
204 }
205
206 inline void Dsp::compute(int count, float *input0, float *output0)
207 {
208 #define fslider0 (*fslider0_)
209 #define fslider1 (*fslider1_)
210 #define fslider2 (*fslider2_)
211 #define fslider3 (*fslider3_)
212 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
213 double fSlow1 = fslider1;
214 double fSlow2 = (fConst21 * fSlow1);
215 double fSlow3 = (0.1 * fSlow1);
216 double fSlow4 = (fConst27 * fslider2);
217 double fSlow5 = (0.1 * fslider3);
218 for (int i=0; i<count; i++) {
219 fRec3[0] = (fSlow0 + (0.999 * fRec3[1]));
220 double fTemp0 = (1e-15 + (0.015 * fRec7[1]));
221 fVec0[0] = fTemp0;
222 fRec8[0] = ((fConst10 * (fVec0[0] + fVec0[1])) + (fConst9 * fRec8[1]));
223 fRec7[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec8[0]) - 1.204540999999999)) - 169.69726666666665);
224 fRec6[0] = ((fConst12 * ((fConst11 * fRec7[1]) + (fConst4 * fRec7[0]))) + (fConst6 * fRec6[1]));
225 fRec5[0] = ((fConst13 * (fRec6[0] + fRec6[1])) + (fConst3 * fRec5[1]));
226 fVec1[0] = (fSlow3 * fRec4[1]);
227 fRec10[0] = ((fConst23 * ((fConst22 * fVec1[1]) + (fSlow2 * fRec4[1]))) + (fConst20 * fRec10[1]));
228 fRec9[0] = ((fConst24 * (fRec10[0] + fRec10[1])) + (fConst16 * fRec9[1]));
229 double fTemp1 = (fRec9[0] + fRec5[0]);
230 fVec2[IOTA&262143] = fTemp1;
231 double fTemp2 = ((int((fRec11[1] != 0.0)))?((int(((fRec12[1] > 0.0) & (fRec12[1] < 1.0))))?fRec11[1]:0):((int(((fRec12[1] == 0.0) & (fSlow4 != fRec13[1]))))?fConst25:((int(((fRec12[1] == 1.0) & (fSlow4 != fRec14[1]))))?fConst26:0)));
232 fRec11[0] = fTemp2;
233 fRec12[0] = max(0.0, min(1.0, (fRec12[1] + fTemp2)));
234 fRec13[0] = ((int(((fRec12[1] >= 1.0) & (fRec14[1] != fSlow4))))?fSlow4:fRec13[1]);
235 fRec14[0] = ((int(((fRec12[1] <= 0.0) & (fRec13[1] != fSlow4))))?fSlow4:fRec14[1]);
236 fRec4[0] = (fVec2[IOTA&262143] + (fSlow5 * ((fRec12[0] * fVec2[(IOTA-int((int(fRec14[0]) & 262143)))&262143]) + ((1.0 - fRec12[0]) * fVec2[(IOTA-int((int(fRec13[0]) & 262143)))&262143]))));
237 double fTemp3 = (1e-15 + (0.015 * fRec2[1]));
238 fVec3[0] = fTemp3;
239 fRec15[0] = ((fConst10 * (fVec3[0] + fVec3[1])) + (fConst9 * fRec15[1]));
240 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec15[0] + (fRec4[0] * fRec3[0])) - 1.204284999999999)) - 169.71433333333334);
241 fRec1[0] = ((fConst12 * ((fConst11 * fRec2[1]) + (fConst4 * fRec2[0]))) + (fConst6 * fRec1[1]));
242 fRec0[0] = ((fConst13 * (fRec1[0] + fRec1[1])) + (fConst3 * fRec0[1]));
243 output0[i] = (FAUSTFLOAT)fRec0[0];
244 // post processing
245 fRec0[1] = fRec0[0];
246 fRec1[1] = fRec1[0];
247 fRec2[1] = fRec2[0];
248 fRec15[1] = fRec15[0];
249 fVec3[1] = fVec3[0];
250 fRec4[1] = fRec4[0];
251 fRec14[1] = fRec14[0];
252 fRec13[1] = fRec13[0];
253 fRec12[1] = fRec12[0];
254 fRec11[1] = fRec11[0];
255 IOTA = IOTA+1;
256 fRec9[1] = fRec9[0];
257 fRec10[1] = fRec10[0];
258 fVec1[1] = fVec1[0];
259 fRec5[1] = fRec5[0];
260 fRec6[1] = fRec6[0];
261 fRec7[1] = fRec7[0];
262 fRec8[1] = fRec8[0];
263 fVec0[1] = fVec0[0];
264 fRec3[1] = fRec3[0];
265 }
266 #undef fslider0
267 #undef fslider1
268 #undef fslider2
269 #undef fslider3
270 }
271
272 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
273 {
274 static_cast<Dsp*>(p)->compute(count, input0, output0);
275 }
276
277
278 void Dsp::connect(uint32_t port,void* data)
279 {
280 switch ((PortIndex)port)
281 {
282 case LEVEL:
283 fslider3_ = (float*)data; // , 0.0, 0.0, 1e+01, 0.1
284 break;
285 case DELAY:
286 fslider2_ = (float*)data; // , 0.0, 0.1, 5e+03, 0.1
287 break;
288 case FEEDBACK:
289 fslider1_ = (float*)data; // , 0.0, 0.0, 1e+01, 0.1
290 break;
291 case GAIN:
292 fslider0_ = (float*)data; // , 0.0, -3e+01, 6.0, 0.1
293 break;
294 default:
295 break;
296 }
297 }
298
299 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
300 {
301 static_cast<Dsp*>(p)->connect(port, data);
302 }
303
304
305 PluginLV2 *plugin() {
306 return new Dsp();
307 }
308
309 void Dsp::del_instance(PluginLV2 *p)
310 {
311 delete static_cast<Dsp*>(p);
312 }
313
314 /*
315 typedef enum
316 {
317 LEVEL,
318 DELAY,
319 FEEDBACK,
320 GAIN,
321 } PortIndex;
322 */
323
324 } // end namespace gxtubedelay
0 // generated from file '../src/LV2/faust/gxtubetremelo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxtubetremelo {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iVec0[2];
11 int iConst0;
12 double fConst1;
13 double fConst2;
14 double fConst3;
15 double fConst4;
16 FAUSTFLOAT fslider0;
17 FAUSTFLOAT *fslider0_;
18 double fConst5;
19 int iRec4[2];
20 int iRec3[2];
21 double fConst6;
22 double fRec7[2];
23 double fRec6[2];
24 double fRec5[2];
25 FAUSTFLOAT fcheckbox0;
26 FAUSTFLOAT *fcheckbox0_;
27 FAUSTFLOAT fslider1;
28 FAUSTFLOAT *fslider1_;
29 double fRec2[2];
30 FAUSTFLOAT fslider2;
31 FAUSTFLOAT *fslider2_;
32 double fRec8[2];
33 double fConst7;
34 double fConst8;
35 double fConst9;
36 double fVec1[2];
37 double fConst10;
38 double fRec11[2];
39 double fRec10[2];
40 double fConst11;
41 double fConst12;
42 double fRec9[2];
43 double fVec2[2];
44 double fRec12[2];
45 double fRec1[2];
46 double fRec0[2];
47 void connect(uint32_t port,void* data);
48 void clear_state_f();
49 void init(uint32_t samplingFreq);
50 void compute(int count, float *input0, float *output0);
51
52 static void clear_state_f_static(PluginLV2*);
53 static void init_static(uint32_t samplingFreq, PluginLV2*);
54 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
55 static void del_instance(PluginLV2 *p);
56 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
57 public:
58 Dsp();
59 ~Dsp();
60 };
61
62
63
64 Dsp::Dsp()
65 : PluginLV2() {
66 version = PLUGINLV2_VERSION;
67 id = "gxtubetremelo";
68 name = N_("Tube Tremolo");
69 mono_audio = compute_static;
70 stereo_audio = 0;
71 set_samplerate = init_static;
72 activate_plugin = 0;
73 connect_ports = connect_static;
74 clear_state = clear_state_f_static;
75 delete_instance = del_instance;
76 }
77
78 Dsp::~Dsp() {
79 }
80
81 inline void Dsp::clear_state_f()
82 {
83 for (int i=0; i<2; i++) iVec0[i] = 0;
84 for (int i=0; i<2; i++) iRec4[i] = 0;
85 for (int i=0; i<2; i++) iRec3[i] = 0;
86 for (int i=0; i<2; i++) fRec7[i] = 0;
87 for (int i=0; i<2; i++) fRec6[i] = 0;
88 for (int i=0; i<2; i++) fRec5[i] = 0;
89 for (int i=0; i<2; i++) fRec2[i] = 0;
90 for (int i=0; i<2; i++) fRec8[i] = 0;
91 for (int i=0; i<2; i++) fVec1[i] = 0;
92 for (int i=0; i<2; i++) fRec11[i] = 0;
93 for (int i=0; i<2; i++) fRec10[i] = 0;
94 for (int i=0; i<2; i++) fRec9[i] = 0;
95 for (int i=0; i<2; i++) fVec2[i] = 0;
96 for (int i=0; i<2; i++) fRec12[i] = 0;
97 for (int i=0; i<2; i++) fRec1[i] = 0;
98 for (int i=0; i<2; i++) fRec0[i] = 0;
99 }
100
101 void Dsp::clear_state_f_static(PluginLV2 *p)
102 {
103 static_cast<Dsp*>(p)->clear_state_f();
104 }
105
106 inline void Dsp::init(uint32_t samplingFreq)
107 {
108 fSamplingFreq = samplingFreq;
109 iConst0 = min(192000, max(1, fSamplingFreq));
110 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
111 fConst2 = (1 + fConst1);
112 fConst3 = (0 - ((1 - fConst1) / fConst2));
113 fConst4 = (1.0 / iConst0);
114 fConst5 = (0.5 * iConst0);
115 fConst6 = (6.283185307179586 / iConst0);
116 fConst7 = (1.0 / tan((6.5973445725385655 / iConst0)));
117 fConst8 = (1 + fConst7);
118 fConst9 = (0 - ((1 - fConst7) / fConst8));
119 fConst10 = (1.0 / fConst8);
120 fConst11 = (0 - fConst1);
121 fConst12 = (0.025 / fConst2);
122 clear_state_f();
123 }
124
125 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
126 {
127 static_cast<Dsp*>(p)->init(samplingFreq);
128 }
129
130 inline void Dsp::compute(int count, float *input0, float *output0)
131 {
132 #define fslider0 (*fslider0_)
133 #define fcheckbox0 (*fcheckbox0_)
134 #define fslider1 (*fslider1_)
135 #define fslider2 (*fslider2_)
136 double fSlow0 = fslider0;
137 int iSlow1 = int((fConst5 / double(fSlow0)));
138 double fSlow2 = (1.0 / iSlow1);
139 double fSlow3 = (fConst6 * fSlow0);
140 int iSlow4 = int(fcheckbox0);
141 double fSlow5 = fslider1;
142 double fSlow6 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
143 for (int i=0; i<count; i++) {
144 iVec0[0] = 1;
145 double fTemp0 = (fRec2[1] * (1 - (fConst4 / (fConst4 + (0.06 * exp((0 - (2.4849066497880004 * fRec2[1]))))))));
146 iRec4[0] = ((int((iRec4[1] > 0)))?((2 * (iRec3[1] < iSlow1)) - 1):(1 - (2 * (iRec3[1] > 0))));
147 iRec3[0] = (iRec4[0] + iRec3[1]);
148 fRec7[0] = ((fSlow3 * (0 - fRec5[1])) + fRec7[1]);
149 fRec6[0] = ((1 + ((fSlow3 * fRec7[0]) + fRec6[1])) - iVec0[1]);
150 fRec5[0] = fRec6[0];
151 fRec2[0] = (fTemp0 + (fConst4 * (pow((1 + (fSlow5 * (((iSlow4)?max(0, (0.5 * (1 + fRec5[0]))):(fSlow2 * iRec3[0])) - 1))),1.9) / (fConst4 + (0.06 * exp((0 - (2.4849066497880004 * fTemp0))))))));
152 fRec8[0] = (fSlow6 + (0.999 * fRec8[1]));
153 double fTemp1 = (1e-15 + (0.015 * fRec10[1]));
154 fVec1[0] = fTemp1;
155 fRec11[0] = ((fConst10 * (fVec1[0] + fVec1[1])) + (fConst9 * fRec11[1]));
156 fRec10[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec11[0]) - 1.204540999999999)) - 169.69726666666665);
157 fRec9[0] = ((fConst12 * ((fConst11 * fRec10[1]) + (fConst1 * fRec10[0]))) + (fConst3 * fRec9[1]));
158 double fTemp2 = (1e-15 + (0.015 * fRec1[1]));
159 fVec2[0] = fTemp2;
160 fRec12[0] = ((fConst10 * (fVec2[0] + fVec2[1])) + (fConst9 * fRec12[1]));
161 fRec1[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec12[0] + (2700 * ((fRec9[0] * fRec8[0]) / (2700 + exp((13.815510557964274 / log((2.718281828459045 + (8.551967507929417 * fRec2[0]))))))))) - 1.204284999999999)) - 169.71433333333334);
162 fRec0[0] = ((fConst12 * ((fConst11 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
163 output0[i] = (FAUSTFLOAT)fRec0[0];
164 // post processing
165 fRec0[1] = fRec0[0];
166 fRec1[1] = fRec1[0];
167 fRec12[1] = fRec12[0];
168 fVec2[1] = fVec2[0];
169 fRec9[1] = fRec9[0];
170 fRec10[1] = fRec10[0];
171 fRec11[1] = fRec11[0];
172 fVec1[1] = fVec1[0];
173 fRec8[1] = fRec8[0];
174 fRec2[1] = fRec2[0];
175 fRec5[1] = fRec5[0];
176 fRec6[1] = fRec6[0];
177 fRec7[1] = fRec7[0];
178 iRec3[1] = iRec3[0];
179 iRec4[1] = iRec4[0];
180 iVec0[1] = iVec0[0];
181 }
182 #undef fslider0
183 #undef fcheckbox0
184 #undef fslider1
185 #undef fslider2
186 }
187
188 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
189 {
190 static_cast<Dsp*>(p)->compute(count, input0, output0);
191 }
192
193
194 void Dsp::connect(uint32_t port,void* data)
195 {
196 switch ((PortIndex)port)
197 {
198 case SPEED:
199 fslider0_ = (float*)data; // , 5.0, 0.1, 2e+01, 0.1
200 break;
201 case GAIN:
202 fslider2_ = (float*)data; // , 0.0, -12.0, 12.0, 0.1
203 break;
204 case DEPTH:
205 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
206 break;
207 // static const value_pair fcheckbox0_values[] = {{"triangle"},{"sine"},{0}};
208 case SINEWAVE:
209 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
210 break;
211 default:
212 break;
213 }
214 }
215
216 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
217 {
218 static_cast<Dsp*>(p)->connect(port, data);
219 }
220
221
222 PluginLV2 *plugin() {
223 return new Dsp();
224 }
225
226 void Dsp::del_instance(PluginLV2 *p)
227 {
228 delete static_cast<Dsp*>(p);
229 }
230
231 /*
232 typedef enum
233 {
234 SPEED,
235 GAIN,
236 DEPTH,
237 SINEWAVE,
238 } PortIndex;
239 */
240
241 } // end namespace gxtubetremelo
0 // generated from file '../src/LV2/faust/gxtubevibrato.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3 #include "valve.h"
4
5 namespace gxtubevibrato {
6
7 class Dsp: public PluginLV2 {
8 private:
9 uint32_t fSamplingFreq;
10 int iVec0[2];
11 int iConst0;
12 double fConst1;
13 double fConst2;
14 double fConst3;
15 double fConst4;
16 double fConst5;
17 double fConst6;
18 double fConst7;
19 double fConst8;
20 double fConst9;
21 double fVec1[2];
22 double fConst10;
23 double fRec5[2];
24 double fRec4[2];
25 double fConst11;
26 double fConst12;
27 int IOTA;
28 double *fRec3;
29 double fConst13;
30 double fConst14;
31 FAUSTFLOAT fslider0;
32 FAUSTFLOAT *fslider0_;
33 double fConst15;
34 int iRec11[2];
35 int iRec10[2];
36 double fConst16;
37 double fRec14[2];
38 double fRec13[2];
39 double fRec12[2];
40 FAUSTFLOAT fcheckbox0;
41 FAUSTFLOAT *fcheckbox0_;
42 FAUSTFLOAT fslider1;
43 FAUSTFLOAT *fslider1_;
44 double fConst17;
45 double fRec6[2];
46 double fRec7[2];
47 double fRec8[2];
48 double fRec9[2];
49 FAUSTFLOAT fslider2;
50 FAUSTFLOAT *fslider2_;
51 double fRec15[2];
52 double fVec2[2];
53 double fConst18;
54 double fRec2[2];
55 double fConst19;
56 double fConst20;
57 double fConst21;
58 double fVec3[2];
59 double fConst22;
60 double fRec16[2];
61 double fRec1[2];
62 double fRec0[2];
63 bool mem_allocated;
64 void mem_alloc();
65 void mem_free();
66 void connect(uint32_t port,void* data);
67 void clear_state_f();
68 int activate(bool start);
69 void init(uint32_t samplingFreq);
70 void compute(int count, float *input0, float *output0);
71
72 static void clear_state_f_static(PluginLV2*);
73 static int activate_static(bool start, PluginLV2*);
74 static void init_static(uint32_t samplingFreq, PluginLV2*);
75 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
76 static void del_instance(PluginLV2 *p);
77 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
78 public:
79 Dsp();
80 ~Dsp();
81 };
82
83
84
85 Dsp::Dsp()
86 : PluginLV2(),
87 fRec3(0),
88 mem_allocated(false) {
89 version = PLUGINLV2_VERSION;
90 id = "gxtubevibrato";
91 name = "?gxtubevibrato";
92 mono_audio = compute_static;
93 stereo_audio = 0;
94 set_samplerate = init_static;
95 activate_plugin = activate_static;
96 connect_ports = connect_static;
97 clear_state = clear_state_f_static;
98 delete_instance = del_instance;
99 }
100
101 Dsp::~Dsp() {
102 }
103
104 inline void Dsp::clear_state_f()
105 {
106 for (int i=0; i<2; i++) iVec0[i] = 0;
107 for (int i=0; i<2; i++) fVec1[i] = 0;
108 for (int i=0; i<2; i++) fRec5[i] = 0;
109 for (int i=0; i<2; i++) fRec4[i] = 0;
110 for (int i=0; i<65536; i++) fRec3[i] = 0;
111 for (int i=0; i<2; i++) iRec11[i] = 0;
112 for (int i=0; i<2; i++) iRec10[i] = 0;
113 for (int i=0; i<2; i++) fRec14[i] = 0;
114 for (int i=0; i<2; i++) fRec13[i] = 0;
115 for (int i=0; i<2; i++) fRec12[i] = 0;
116 for (int i=0; i<2; i++) fRec6[i] = 0;
117 for (int i=0; i<2; i++) fRec7[i] = 0;
118 for (int i=0; i<2; i++) fRec8[i] = 0;
119 for (int i=0; i<2; i++) fRec9[i] = 0;
120 for (int i=0; i<2; i++) fRec15[i] = 0;
121 for (int i=0; i<2; i++) fVec2[i] = 0;
122 for (int i=0; i<2; i++) fRec2[i] = 0;
123 for (int i=0; i<2; i++) fVec3[i] = 0;
124 for (int i=0; i<2; i++) fRec16[i] = 0;
125 for (int i=0; i<2; i++) fRec1[i] = 0;
126 for (int i=0; i<2; i++) fRec0[i] = 0;
127 }
128
129 void Dsp::clear_state_f_static(PluginLV2 *p)
130 {
131 static_cast<Dsp*>(p)->clear_state_f();
132 }
133
134 inline void Dsp::init(uint32_t samplingFreq)
135 {
136 fSamplingFreq = samplingFreq;
137 iConst0 = min(192000, max(1, fSamplingFreq));
138 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
139 fConst2 = (1 + fConst1);
140 fConst3 = (0 - ((1 - fConst1) / fConst2));
141 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
142 fConst5 = (1 + fConst4);
143 fConst6 = (0 - ((1 - fConst4) / fConst5));
144 fConst7 = (1.0 / tan((376.99111843077515 / iConst0)));
145 fConst8 = (1 + fConst7);
146 fConst9 = (0 - ((1 - fConst7) / fConst8));
147 fConst10 = (1.0 / fConst8);
148 fConst11 = (0 - fConst1);
149 fConst12 = (0.025 / fConst2);
150 IOTA = 0;
151 fConst13 = (1e+01 / iConst0);
152 fConst14 = (0 - fConst13);
153 fConst15 = (0.5 * iConst0);
154 fConst16 = (6.283185307179586 / iConst0);
155 fConst17 = (0.005 * iConst0);
156 fConst18 = (1.0 / fConst5);
157 fConst19 = (1.0 / tan((251.32741228718345 / iConst0)));
158 fConst20 = (1 + fConst19);
159 fConst21 = (0 - ((1 - fConst19) / fConst20));
160 fConst22 = (1.0 / fConst20);
161 }
162
163 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
164 {
165 static_cast<Dsp*>(p)->init(samplingFreq);
166 }
167
168 void Dsp::mem_alloc()
169 {
170 if (!fRec3) fRec3 = new double[65536];
171 mem_allocated = true;
172 }
173
174 void Dsp::mem_free()
175 {
176 mem_allocated = false;
177 if (fRec3) { delete fRec3; fRec3 = 0; }
178 }
179
180 int Dsp::activate(bool start)
181 {
182 if (start) {
183 if (!mem_allocated) {
184 mem_alloc();
185 clear_state_f();
186 }
187 } else if (!mem_allocated) {
188 mem_free();
189 }
190 return 0;
191 }
192
193 int Dsp::activate_static(bool start, PluginLV2 *p)
194 {
195 return static_cast<Dsp*>(p)->activate(start);
196 }
197
198 inline void Dsp::compute(int count, float *input0, float *output0)
199 {
200 #define fslider0 (*fslider0_)
201 #define fcheckbox0 (*fcheckbox0_)
202 #define fslider1 (*fslider1_)
203 #define fslider2 (*fslider2_)
204 double fSlow0 = fslider0;
205 int iSlow1 = int((fConst15 / double(fSlow0)));
206 double fSlow2 = (1.0 / iSlow1);
207 double fSlow3 = (fConst16 * fSlow0);
208 int iSlow4 = int(fcheckbox0);
209 double fSlow5 = (fConst17 * fslider1);
210 double fSlow6 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
211 for (int i=0; i<count; i++) {
212 iVec0[0] = 1;
213 double fTemp0 = (1e-15 + (0.015 * fRec4[1]));
214 fVec1[0] = fTemp0;
215 fRec5[0] = ((fConst10 * (fVec1[0] + fVec1[1])) + (fConst9 * fRec5[1]));
216 fRec4[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((double)input0[i] + fRec5[0]) - 1.204540999999999)) - 169.69726666666665);
217 fRec3[IOTA&65535] = ((fConst12 * ((fConst11 * fRec4[1]) + (fConst1 * fRec4[0]))) + (fConst3 * fRec3[(IOTA-1)&65535]));
218 iRec11[0] = ((int((iRec11[1] > 0)))?((2 * (iRec10[1] < iSlow1)) - 1):(1 - (2 * (iRec10[1] > 0))));
219 iRec10[0] = (iRec11[0] + iRec10[1]);
220 fRec14[0] = ((fSlow3 * (0 - fRec12[1])) + fRec14[1]);
221 fRec13[0] = ((1 + ((fSlow3 * fRec14[0]) + fRec13[1])) - iVec0[1]);
222 fRec12[0] = fRec13[0];
223 double fTemp1 = (fSlow5 * (1 + (1 + ((iSlow4)?max(0, (0.5 * (1 + fRec12[0]))):(fSlow2 * iRec10[0])))));
224 double fTemp2 = ((int((fRec6[1] != 0.0)))?((int(((fRec7[1] > 0.0) & (fRec7[1] < 1.0))))?fRec6[1]:0):((int(((fRec7[1] == 0.0) & (fTemp1 != fRec8[1]))))?fConst13:((int(((fRec7[1] == 1.0) & (fTemp1 != fRec9[1]))))?fConst14:0)));
225 fRec6[0] = fTemp2;
226 fRec7[0] = max(0.0, min(1.0, (fRec7[1] + fTemp2)));
227 fRec8[0] = ((int(((fRec7[1] >= 1.0) & (fRec9[1] != fTemp1))))?fTemp1:fRec8[1]);
228 fRec9[0] = ((int(((fRec7[1] <= 0.0) & (fRec8[1] != fTemp1))))?fTemp1:fRec9[1]);
229 fRec15[0] = (fSlow6 + (0.999 * fRec15[1]));
230 double fTemp3 = (fRec15[0] * ((fRec7[0] * fRec3[(IOTA-int((int(fRec9[0]) & 65535)))&65535]) + ((1.0 - fRec7[0]) * fRec3[(IOTA-int((int(fRec8[0]) & 65535)))&65535])));
231 fVec2[0] = fTemp3;
232 fRec2[0] = ((fConst18 * (fVec2[0] + fVec2[1])) + (fConst6 * fRec2[1]));
233 double fTemp4 = (1e-15 + (0.015 * fRec1[1]));
234 fVec3[0] = fTemp4;
235 fRec16[0] = ((fConst22 * (fVec3[0] + fVec3[1])) + (fConst21 * fRec16[1]));
236 fRec1[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec16[0] + fRec2[0]) - 1.204284999999999)) - 169.71433333333334);
237 fRec0[0] = ((fConst12 * ((fConst11 * fRec1[1]) + (fConst1 * fRec1[0]))) + (fConst3 * fRec0[1]));
238 output0[i] = (FAUSTFLOAT)fRec0[0];
239 // post processing
240 fRec0[1] = fRec0[0];
241 fRec1[1] = fRec1[0];
242 fRec16[1] = fRec16[0];
243 fVec3[1] = fVec3[0];
244 fRec2[1] = fRec2[0];
245 fVec2[1] = fVec2[0];
246 fRec15[1] = fRec15[0];
247 fRec9[1] = fRec9[0];
248 fRec8[1] = fRec8[0];
249 fRec7[1] = fRec7[0];
250 fRec6[1] = fRec6[0];
251 fRec12[1] = fRec12[0];
252 fRec13[1] = fRec13[0];
253 fRec14[1] = fRec14[0];
254 iRec10[1] = iRec10[0];
255 iRec11[1] = iRec11[0];
256 IOTA = IOTA+1;
257 fRec4[1] = fRec4[0];
258 fRec5[1] = fRec5[0];
259 fVec1[1] = fVec1[0];
260 iVec0[1] = iVec0[0];
261 }
262 #undef fslider0
263 #undef fcheckbox0
264 #undef fslider1
265 #undef fslider2
266 }
267
268 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
269 {
270 static_cast<Dsp*>(p)->compute(count, input0, output0);
271 }
272
273
274 void Dsp::connect(uint32_t port,void* data)
275 {
276 switch ((PortIndex)port)
277 {
278 case SPEED:
279 fslider0_ = (float*)data; // , 5.0, 0.0, 14.0, 0.1
280 break;
281 // static const value_pair fcheckbox0_values[] = {{"triangle"},{"sine"},{0}};
282 case SINEWAVE:
283 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
284 break;
285 case DEPTH:
286 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
287 break;
288 case GAIN:
289 fslider2_ = (float*)data; // , 0.0, -64.0, 6.0, 0.1
290 break;
291 default:
292 break;
293 }
294 }
295
296 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
297 {
298 static_cast<Dsp*>(p)->connect(port, data);
299 }
300
301
302 PluginLV2 *plugin() {
303 return new Dsp();
304 }
305
306 void Dsp::del_instance(PluginLV2 *p)
307 {
308 delete static_cast<Dsp*>(p);
309 }
310
311 /*
312 typedef enum
313 {
314 SPEED,
315 SINEWAVE,
316 DEPTH,
317 GAIN,
318 } PortIndex;
319 */
320
321 } // end namespace gxtubevibrato
0 // generated from file '../src/LV2/faust/highbooster.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace highbooster {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 double fConst0;
10 double fConst1;
11 double fConst2;
12 double fVec0[2];
13 double fConst3;
14 double fConst4;
15 double fRec0[2];
16 FAUSTFLOAT fslider0;
17 FAUSTFLOAT *fslider0_;
18 void connect(uint32_t port,void* data);
19 void clear_state_f();
20 void init(uint32_t samplingFreq);
21 void compute(int count, float *input0, float *output0);
22
23 static void clear_state_f_static(PluginLV2*);
24 static void init_static(uint32_t samplingFreq, PluginLV2*);
25 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
26 static void del_instance(PluginLV2 *p);
27 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
28 public:
29 Dsp();
30 ~Dsp();
31 };
32
33
34
35 Dsp::Dsp()
36 : PluginLV2() {
37 version = PLUGINLV2_VERSION;
38 id = "highbooster";
39 name = N_("Treble boost");
40 mono_audio = compute_static;
41 stereo_audio = 0;
42 set_samplerate = init_static;
43 activate_plugin = 0;
44 connect_ports = connect_static;
45 clear_state = clear_state_f_static;
46 delete_instance = del_instance;
47 }
48
49 Dsp::~Dsp() {
50 }
51
52 inline void Dsp::clear_state_f()
53 {
54 for (int i=0; i<2; i++) fVec0[i] = 0;
55 for (int i=0; i<2; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (1.0 / tan((4712.38898038469 / min(192000, max(1, fSamplingFreq)))));
67 fConst1 = (1 + fConst0);
68 fConst2 = (0 - ((1 - fConst0) / fConst1));
69 fConst3 = (0 - fConst0);
70 fConst4 = (1.0 / fConst1);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *output0)
80 {
81 #define fslider0 (*fslider0_)
82 double fSlow0 = (pow(10,(0.05 * fslider0)) - 1);
83 for (int i=0; i<count; i++) {
84 double fTemp0 = (double)input0[i];
85 fVec0[0] = fTemp0;
86 fRec0[0] = ((fConst4 * ((fConst3 * fVec0[1]) + (fConst0 * fVec0[0]))) + (fConst2 * fRec0[1]));
87 output0[i] = (FAUSTFLOAT)(fVec0[0] + (fSlow0 * fRec0[0]));
88 // post processing
89 fRec0[1] = fRec0[0];
90 fVec0[1] = fVec0[0];
91 }
92 #undef fslider0
93 }
94
95 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
96 {
97 static_cast<Dsp*>(p)->compute(count, input0, output0);
98 }
99
100
101 void Dsp::connect(uint32_t port,void* data)
102 {
103 switch ((PortIndex)port)
104 {
105 case LEVEL:
106 fslider0_ = (float*)data; // , 0.0, 0.5, 2e+01, 0.5
107 break;
108 default:
109 break;
110 }
111 }
112
113 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
114 {
115 static_cast<Dsp*>(p)->connect(port, data);
116 }
117
118
119 PluginLV2 *plugin() {
120 return new Dsp();
121 }
122
123 void Dsp::del_instance(PluginLV2 *p)
124 {
125 delete static_cast<Dsp*>(p);
126 }
127
128 /*
129 typedef enum
130 {
131 LEVEL,
132 } PortIndex;
133 */
134
135 } // end namespace highbooster
0 // generated from file '../src/LV2/faust/impulseresponse.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace impulseresponse {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int iConst0;
12 double fConst1;
13 FAUSTFLOAT fslider1;
14 FAUSTFLOAT *fslider1_;
15 double fConst2;
16 double fVec0[3];
17 FAUSTFLOAT fcheckbox0;
18 FAUSTFLOAT *fcheckbox0_;
19 FAUSTFLOAT fslider2;
20 FAUSTFLOAT *fslider2_;
21 double fRec0[3];
22 void connect(uint32_t port,void* data);
23 void clear_state_f();
24 void init(uint32_t samplingFreq);
25 void compute(int count, float *input0, float *output0);
26
27 static void clear_state_f_static(PluginLV2*);
28 static void init_static(uint32_t samplingFreq, PluginLV2*);
29 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
30 static void del_instance(PluginLV2 *p);
31 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
32 public:
33 Dsp();
34 ~Dsp();
35 };
36
37
38
39 Dsp::Dsp()
40 : PluginLV2() {
41 version = PLUGINLV2_VERSION;
42 id = "IR";
43 name = N_("ImpulseResponse");
44 mono_audio = compute_static;
45 stereo_audio = 0;
46 set_samplerate = init_static;
47 activate_plugin = 0;
48 connect_ports = connect_static;
49 clear_state = clear_state_f_static;
50 delete_instance = del_instance;
51 }
52
53 Dsp::~Dsp() {
54 }
55
56 inline void Dsp::clear_state_f()
57 {
58 for (int i=0; i<3; i++) fVec0[i] = 0;
59 for (int i=0; i<3; i++) fRec0[i] = 0;
60 }
61
62 void Dsp::clear_state_f_static(PluginLV2 *p)
63 {
64 static_cast<Dsp*>(p)->clear_state_f();
65 }
66
67 inline void Dsp::init(uint32_t samplingFreq)
68 {
69 fSamplingFreq = samplingFreq;
70 iConst0 = min(192000, max(1, fSamplingFreq));
71 fConst1 = (3.141592653589793 / iConst0);
72 fConst2 = (6.283185307179586 / iConst0);
73 clear_state_f();
74 }
75
76 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
77 {
78 static_cast<Dsp*>(p)->init(samplingFreq);
79 }
80
81 inline void Dsp::compute(int count, float *input0, float *output0)
82 {
83 #define fslider0 (*fslider0_)
84 #define fslider1 (*fslider1_)
85 #define fcheckbox0 (*fcheckbox0_)
86 #define fslider2 (*fslider2_)
87 double fSlow0 = exp((0 - (fConst1 * fslider0)));
88 double fSlow1 = (2 * cos((fConst2 * fslider1)));
89 int iSlow2 = int(max(0, min(1, fcheckbox0)));
90 double fSlow3 = (0.5 * (fslider2 * (1 - faustpower<2>(fSlow0))));
91 for (int i=0; i<count; i++) {
92 double fTemp0 = (double)input0[i];
93 fVec0[0] = fTemp0;
94 fRec0[0] = ((fSlow3 * (fVec0[0] - fVec0[2])) + (fSlow0 * ((fRec0[1] * ((iSlow2)?max(-0.6, min(0.6, fVec0[0])):fSlow1)) - (fSlow0 * fRec0[2]))));
95 output0[i] = (FAUSTFLOAT)(fVec0[0] + fRec0[0]);
96 // post processing
97 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
98 fVec0[2] = fVec0[1]; fVec0[1] = fVec0[0];
99 }
100 #undef fslider0
101 #undef fslider1
102 #undef fcheckbox0
103 #undef fslider2
104 }
105
106 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
107 {
108 static_cast<Dsp*>(p)->compute(count, input0, output0);
109 }
110
111
112 void Dsp::connect(uint32_t port,void* data)
113 {
114 switch ((PortIndex)port)
115 {
116 case PEAK:
117 fslider2_ = (float*)data; // , 1.0, 0.0, 1e+01, 0.2
118 break;
119 // static const value_pair fcheckbox0_values[] = {{"manual"},{"auto"},{0}};
120 case AUTO_FREQ:
121 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
122 break;
123 case FREQ:
124 fslider1_ = (float*)data; // , 4.4e+02, 2e+01, 1.2e+04, 1e+01
125 break;
126 case BANDWIDTH:
127 fslider0_ = (float*)data; // , 1e+02, 2e+01, 2e+04, 1e+01
128 break;
129 default:
130 break;
131 }
132 }
133
134 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
135 {
136 static_cast<Dsp*>(p)->connect(port, data);
137 }
138
139
140 PluginLV2 *plugin() {
141 return new Dsp();
142 }
143
144 void Dsp::del_instance(PluginLV2 *p)
145 {
146 delete static_cast<Dsp*>(p);
147 }
148
149 /*
150 typedef enum
151 {
152 PEAK,
153 AUTO_FREQ,
154 FREQ,
155 BANDWIDTH,
156 } PortIndex;
157 */
158
159 } // end namespace impulseresponse
0 // generated from file '../src/LV2/faust/low_high_pass.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace low_high_pass {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iVec0[2];
10 FAUSTFLOAT fentry0;
11 FAUSTFLOAT *fentry0_;
12 double fConst0;
13 FAUSTFLOAT fentry1;
14 FAUSTFLOAT *fentry1_;
15 double fRec2[2];
16 double fVec1[2];
17 double fRec1[2];
18 double fRec0[2];
19 FAUSTFLOAT fcheckbox0;
20 FAUSTFLOAT *fcheckbox0_;
21 FAUSTFLOAT fslider0;
22 FAUSTFLOAT *fslider0_;
23 FAUSTFLOAT fslider1;
24 FAUSTFLOAT *fslider1_;
25 double fVec2[2];
26 double fRec6[2];
27 double fVec3[2];
28 double fRec5[2];
29 double fRec4[3];
30 double fRec3[3];
31 FAUSTFLOAT fcheckbox1;
32 FAUSTFLOAT *fcheckbox1_;
33 void connect(uint32_t port,void* data);
34 void clear_state_f();
35 void init(uint32_t samplingFreq);
36 void compute(int count, float *input0, float *output0);
37
38 static void clear_state_f_static(PluginLV2*);
39 static void init_static(uint32_t samplingFreq, PluginLV2*);
40 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
41 static void del_instance(PluginLV2 *p);
42 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
43 public:
44 Dsp();
45 ~Dsp();
46 };
47
48
49
50 static const char* parm_groups[] = {
51 ".low_high_pass.lhp", N_("low_highpass"),
52 ".low_high_pass.lhc", N_("low_highcutoff"),
53 0
54 };
55
56 Dsp::Dsp()
57 : PluginLV2() {
58 version = PLUGINLV2_VERSION;
59 id = "low_highpass";
60 name = N_("low high pass");
61 mono_audio = compute_static;
62 stereo_audio = 0;
63 set_samplerate = init_static;
64 activate_plugin = 0;
65 connect_ports = connect_static;
66 clear_state = clear_state_f_static;
67 delete_instance = del_instance;
68 }
69
70 Dsp::~Dsp() {
71 }
72
73 inline void Dsp::clear_state_f()
74 {
75 for (int i=0; i<2; i++) iVec0[i] = 0;
76 for (int i=0; i<2; i++) fRec2[i] = 0;
77 for (int i=0; i<2; i++) fVec1[i] = 0;
78 for (int i=0; i<2; i++) fRec1[i] = 0;
79 for (int i=0; i<2; i++) fRec0[i] = 0;
80 for (int i=0; i<2; i++) fVec2[i] = 0;
81 for (int i=0; i<2; i++) fRec6[i] = 0;
82 for (int i=0; i<2; i++) fVec3[i] = 0;
83 for (int i=0; i<2; i++) fRec5[i] = 0;
84 for (int i=0; i<3; i++) fRec4[i] = 0;
85 for (int i=0; i<3; i++) fRec3[i] = 0;
86 }
87
88 void Dsp::clear_state_f_static(PluginLV2 *p)
89 {
90 static_cast<Dsp*>(p)->clear_state_f();
91 }
92
93 inline void Dsp::init(uint32_t samplingFreq)
94 {
95 fSamplingFreq = samplingFreq;
96 fConst0 = (3.141592653589793 / min(192000, max(1, fSamplingFreq)));
97 clear_state_f();
98 }
99
100 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
101 {
102 static_cast<Dsp*>(p)->init(samplingFreq);
103 }
104
105 inline void Dsp::compute(int count, float *input0, float *output0)
106 {
107 #define fentry0 (*fentry0_)
108 #define fentry1 (*fentry1_)
109 #define fcheckbox0 (*fcheckbox0_)
110 #define fslider0 (*fslider0_)
111 #define fslider1 (*fslider1_)
112 #define fcheckbox1 (*fcheckbox1_)
113 double fSlow0 = (1.0 / tan((fConst0 * fentry0)));
114 double fSlow1 = (1 + fSlow0);
115 double fSlow2 = (0 - ((1 - fSlow0) / fSlow1));
116 double fSlow3 = (1.0 / tan((fConst0 * fentry1)));
117 double fSlow4 = (1 + fSlow3);
118 double fSlow5 = (0 - ((1 - fSlow3) / fSlow4));
119 double fSlow6 = (1.0 / fSlow4);
120 double fSlow7 = (0 - fSlow0);
121 double fSlow8 = (1.0 / fSlow1);
122 int iSlow9 = int(fcheckbox0);
123 double fSlow10 = tan((fConst0 * fslider0));
124 double fSlow11 = (2 * (1 - (1.0 / faustpower<2>(fSlow10))));
125 double fSlow12 = (1.0 / fSlow10);
126 double fSlow13 = (1 + ((fSlow12 - 0.7653668647301795) / fSlow10));
127 double fSlow14 = (1.0 / (1 + ((0.7653668647301795 + fSlow12) / fSlow10)));
128 double fSlow15 = (1 + ((fSlow12 - 1.8477590650225735) / fSlow10));
129 double fSlow16 = (1.0 / (1 + ((1.8477590650225735 + fSlow12) / fSlow10)));
130 double fSlow17 = (fConst0 * fslider1);
131 double fSlow18 = (1.0 / (1 + fSlow17));
132 double fSlow19 = (1 - fSlow17);
133 int iSlow20 = int(fcheckbox1);
134 for (int i=0; i<count; i++) {
135 double fTemp0 = (double)input0[i];
136 iVec0[0] = 1;
137 fRec2[0] = ((1e-20 * (1 - iVec0[1])) - fRec2[1]);
138 double fTemp1 = (fTemp0 + fRec2[0]);
139 fVec1[0] = fTemp1;
140 fRec1[0] = ((fSlow6 * (fVec1[0] + fVec1[1])) + (fSlow5 * fRec1[1]));
141 fRec0[0] = ((fSlow8 * ((fSlow7 * fRec1[1]) + (fSlow0 * fRec1[0]))) + (fSlow2 * fRec0[1]));
142 double fTemp2 = ((iSlow9)?fRec0[0]:fTemp0);
143 double fTemp3 = (fRec2[0] + fTemp2);
144 fVec2[0] = (fSlow18 * fTemp3);
145 fRec6[0] = ((fSlow18 * (fTemp3 + (fSlow19 * fRec6[1]))) - fVec2[1]);
146 fVec3[0] = (fSlow18 * fRec6[0]);
147 fRec5[0] = ((fSlow18 * (fRec6[0] + (fSlow19 * fRec5[1]))) - fVec3[1]);
148 fRec4[0] = (fRec5[0] - (fSlow16 * ((fSlow15 * fRec4[2]) + (fSlow11 * fRec4[1]))));
149 fRec3[0] = ((fSlow16 * (fRec4[2] + (fRec4[0] + (2 * fRec4[1])))) - (fSlow14 * ((fSlow13 * fRec3[2]) + (fSlow11 * fRec3[1]))));
150 output0[i] = (FAUSTFLOAT)((iSlow20)?(fSlow14 * (fRec3[2] + (fRec3[0] + (2 * fRec3[1])))):fTemp2);
151 // post processing
152 fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
153 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
154 fRec5[1] = fRec5[0];
155 fVec3[1] = fVec3[0];
156 fRec6[1] = fRec6[0];
157 fVec2[1] = fVec2[0];
158 fRec0[1] = fRec0[0];
159 fRec1[1] = fRec1[0];
160 fVec1[1] = fVec1[0];
161 fRec2[1] = fRec2[0];
162 iVec0[1] = iVec0[0];
163 }
164 #undef fentry0
165 #undef fentry1
166 #undef fcheckbox0
167 #undef fslider0
168 #undef fslider1
169 #undef fcheckbox1
170 }
171
172 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
173 {
174 static_cast<Dsp*>(p)->compute(count, input0, output0);
175 }
176
177
178 void Dsp::connect(uint32_t port,void* data)
179 {
180 switch ((PortIndex)port)
181 {
182 case ON_OFF:
183 fcheckbox1_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
184 break;
185 case ON_OFF:
186 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
187 break;
188 case LOW_FREQ:
189 fentry1_ = (float*)data; // , 5e+03, 2e+01, 1.2e+04, 1e+01
190 break;
191 case HIGH_FREQ:
192 fentry0_ = (float*)data; // , 1.3e+02, 2e+01, 7.04e+03, 1e+01
193 break;
194 case LOW_FREQ:
195 fslider1_ = (float*)data; // , 1.3e+02, 2e+01, 1e+03, 1e+01
196 break;
197 case HIGH_FREQ:
198 fslider0_ = (float*)data; // , 5e+03, 1e+03, 1.2e+04, 1e+01
199 break;
200 default:
201 break;
202 }
203 }
204
205 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
206 {
207 static_cast<Dsp*>(p)->connect(port, data);
208 }
209
210
211 PluginLV2 *plugin() {
212 return new Dsp();
213 }
214
215 void Dsp::del_instance(PluginLV2 *p)
216 {
217 delete static_cast<Dsp*>(p);
218 }
219
220 /*
221 typedef enum
222 {
223 ON_OFF,
224 ON_OFF,
225 LOW_FREQ,
226 HIGH_FREQ,
227 LOW_FREQ,
228 HIGH_FREQ,
229 } PortIndex;
230 */
231
232 } // end namespace low_high_pass
0 // generated from file '../src/LV2/faust/moog.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace moog {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iVec0[2];
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 double fRec1[2];
13 double fConst0;
14 FAUSTFLOAT fslider1;
15 FAUSTFLOAT *fslider1_;
16 double fRec6[2];
17 double fRec5[2];
18 double fRec4[2];
19 double fRec3[2];
20 double fRec2[2];
21 double fRec0[2];
22 double fRec11[2];
23 double fRec10[2];
24 double fRec9[2];
25 double fRec8[2];
26 double fRec7[2];
27 void connect(uint32_t port,void* data);
28 void clear_state_f();
29 void init(uint32_t samplingFreq);
30 void compute(int count, float *input0, float *input1, float *output0, float *output1);
31
32 static void clear_state_f_static(PluginLV2*);
33 static void init_static(uint32_t samplingFreq, PluginLV2*);
34 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
35 static void del_instance(PluginLV2 *p);
36 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
37 public:
38 Dsp();
39 ~Dsp();
40 };
41
42
43
44 Dsp::Dsp()
45 : PluginLV2() {
46 version = PLUGINLV2_VERSION;
47 id = "moog";
48 name = N_("Moog Filter");
49 mono_audio = 0;
50 stereo_audio = compute_static;
51 set_samplerate = init_static;
52 activate_plugin = 0;
53 connect_ports = connect_static;
54 clear_state = clear_state_f_static;
55 delete_instance = del_instance;
56 }
57
58 Dsp::~Dsp() {
59 }
60
61 inline void Dsp::clear_state_f()
62 {
63 for (int i=0; i<2; i++) iVec0[i] = 0;
64 for (int i=0; i<2; i++) fRec1[i] = 0;
65 for (int i=0; i<2; i++) fRec6[i] = 0;
66 for (int i=0; i<2; i++) fRec5[i] = 0;
67 for (int i=0; i<2; i++) fRec4[i] = 0;
68 for (int i=0; i<2; i++) fRec3[i] = 0;
69 for (int i=0; i<2; i++) fRec2[i] = 0;
70 for (int i=0; i<2; i++) fRec0[i] = 0;
71 for (int i=0; i<2; i++) fRec11[i] = 0;
72 for (int i=0; i<2; i++) fRec10[i] = 0;
73 for (int i=0; i<2; i++) fRec9[i] = 0;
74 for (int i=0; i<2; i++) fRec8[i] = 0;
75 for (int i=0; i<2; i++) fRec7[i] = 0;
76 }
77
78 void Dsp::clear_state_f_static(PluginLV2 *p)
79 {
80 static_cast<Dsp*>(p)->clear_state_f();
81 }
82
83 inline void Dsp::init(uint32_t samplingFreq)
84 {
85 fSamplingFreq = samplingFreq;
86 fConst0 = (6.283185307179586 / min(192000, max(1, fSamplingFreq)));
87 clear_state_f();
88 }
89
90 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
91 {
92 static_cast<Dsp*>(p)->init(samplingFreq);
93 }
94
95 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
96 {
97 #define fslider0 (*fslider0_)
98 #define fslider1 (*fslider1_)
99 double fSlow0 = (0.0010000000000000009 * fslider0);
100 double fSlow1 = (0 - fslider1);
101 for (int i=0; i<count; i++) {
102 iVec0[0] = 1;
103 fRec1[0] = (fSlow0 + (0.999 * fRec1[1]));
104 double fTemp0 = (fConst0 * fRec1[0]);
105 double fTemp1 = faustpower<4>(fTemp0);
106 double fTemp2 = (1.0 - fTemp0);
107 fRec6[0] = ((1e-20 * (1 - iVec0[1])) - fRec6[1]);
108 fRec5[0] = ((((double)input0[i] + fRec6[0]) + (fSlow1 * fRec0[1])) + (fTemp2 * fRec5[1]));
109 fRec4[0] = (fRec5[0] + (fTemp2 * fRec4[1]));
110 fRec3[0] = (fRec4[0] + (fTemp2 * fRec3[1]));
111 fRec2[0] = (fRec3[0] + (fTemp2 * fRec2[1]));
112 fRec0[0] = (fRec2[0] * fTemp1);
113 output0[i] = (FAUSTFLOAT)fRec0[0];
114 fRec11[0] = ((((double)input1[i] + fRec6[0]) + (fSlow1 * fRec7[1])) + (fTemp2 * fRec11[1]));
115 fRec10[0] = (fRec11[0] + (fTemp2 * fRec10[1]));
116 fRec9[0] = (fRec10[0] + (fTemp2 * fRec9[1]));
117 fRec8[0] = (fRec9[0] + (fTemp2 * fRec8[1]));
118 fRec7[0] = (fRec8[0] * fTemp1);
119 output1[i] = (FAUSTFLOAT)fRec7[0];
120 // post processing
121 fRec7[1] = fRec7[0];
122 fRec8[1] = fRec8[0];
123 fRec9[1] = fRec9[0];
124 fRec10[1] = fRec10[0];
125 fRec11[1] = fRec11[0];
126 fRec0[1] = fRec0[0];
127 fRec2[1] = fRec2[0];
128 fRec3[1] = fRec3[0];
129 fRec4[1] = fRec4[0];
130 fRec5[1] = fRec5[0];
131 fRec6[1] = fRec6[0];
132 fRec1[1] = fRec1[0];
133 iVec0[1] = iVec0[0];
134 }
135 #undef fslider0
136 #undef fslider1
137 }
138
139 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
140 {
141 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
142 }
143
144
145 void Dsp::connect(uint32_t port,void* data)
146 {
147 switch ((PortIndex)port)
148 {
149 case Q:
150 fslider1_ = (float*)data; // , 1.0, 0.0, 4.0, 0.1
151 break;
152 case FR:
153 fslider0_ = (float*)data; // , 3e+03, 4.4e+02, 6e+03, 1e+01
154 break;
155 default:
156 break;
157 }
158 }
159
160 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
161 {
162 static_cast<Dsp*>(p)->connect(port, data);
163 }
164
165
166 PluginLV2 *plugin() {
167 return new Dsp();
168 }
169
170 void Dsp::del_instance(PluginLV2 *p)
171 {
172 delete static_cast<Dsp*>(p);
173 }
174
175 /*
176 typedef enum
177 {
178 Q,
179 FR,
180 } PortIndex;
181 */
182
183 } // end namespace moog
0 // generated from file '../src/LV2/faust/noise_shaper.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace noise_shaper {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iConst0;
10 double fConst1;
11 double fConst2;
12 double fRec0[2];
13 FAUSTFLOAT fslider0;
14 FAUSTFLOAT *fslider0_;
15 void connect(uint32_t port,void* data);
16 void clear_state_f();
17 void init(uint32_t samplingFreq);
18 void compute(int count, float *input0, float *output0);
19
20 static void clear_state_f_static(PluginLV2*);
21 static void init_static(uint32_t samplingFreq, PluginLV2*);
22 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
23 static void del_instance(PluginLV2 *p);
24 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
25 public:
26 Dsp();
27 ~Dsp();
28 };
29
30
31
32 Dsp::Dsp()
33 : PluginLV2() {
34 version = PLUGINLV2_VERSION;
35 id = "shaper";
36 name = N_("Shaper");
37 mono_audio = compute_static;
38 stereo_audio = 0;
39 set_samplerate = init_static;
40 activate_plugin = 0;
41 connect_ports = connect_static;
42 clear_state = clear_state_f_static;
43 delete_instance = del_instance;
44 }
45
46 Dsp::~Dsp() {
47 }
48
49 inline void Dsp::clear_state_f()
50 {
51 for (int i=0; i<2; i++) fRec0[i] = 0;
52 }
53
54 void Dsp::clear_state_f_static(PluginLV2 *p)
55 {
56 static_cast<Dsp*>(p)->clear_state_f();
57 }
58
59 inline void Dsp::init(uint32_t samplingFreq)
60 {
61 fSamplingFreq = samplingFreq;
62 iConst0 = min(192000, max(1, fSamplingFreq));
63 fConst1 = exp((0 - (2e+02 / iConst0)));
64 fConst2 = exp((0 - (0.1 / iConst0)));
65 clear_state_f();
66 }
67
68 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
69 {
70 static_cast<Dsp*>(p)->init(samplingFreq);
71 }
72
73 inline void Dsp::compute(int count, float *input0, float *output0)
74 {
75 #define fslider0 (*fslider0_)
76 double fSlow0 = fslider0;
77 double fSlow1 = (5 * fSlow0);
78 for (int i=0; i<count; i++) {
79 double fTemp0 = (double)input0[i];
80 double fTemp1 = max(1, fabs(fTemp0));
81 double fTemp2 = ((fConst2 * (fRec0[1] >= fTemp1)) + (fConst1 * (fRec0[1] < fTemp1)));
82 fRec0[0] = ((fTemp1 * (0 - (fTemp2 - 1))) + (fRec0[1] * fTemp2));
83 double fTemp3 = max(0, (fSlow1 + (20 * log10(fRec0[0]))));
84 double fTemp4 = (0.5 * min(1, max(0, (0.09522902580706599 * fTemp3))));
85 output0[i] = (FAUSTFLOAT)(fTemp0 * pow(10,(0.05 * (fSlow0 + ((fTemp3 * (0 - fTemp4)) / (1 + fTemp4))))));
86 // post processing
87 fRec0[1] = fRec0[0];
88 }
89 #undef fslider0
90 }
91
92 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
93 {
94 static_cast<Dsp*>(p)->compute(count, input0, output0);
95 }
96
97
98 void Dsp::connect(uint32_t port,void* data)
99 {
100 switch ((PortIndex)port)
101 {
102 case SHARPER:
103 fslider0_ = (float*)data; // , 1.0, 1.0, 1e+01, 1.0
104 break;
105 default:
106 break;
107 }
108 }
109
110 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
111 {
112 static_cast<Dsp*>(p)->connect(port, data);
113 }
114
115
116 PluginLV2 *plugin() {
117 return new Dsp();
118 }
119
120 void Dsp::del_instance(PluginLV2 *p)
121 {
122 delete static_cast<Dsp*>(p);
123 }
124
125 /*
126 typedef enum
127 {
128 SHARPER,
129 } PortIndex;
130 */
131
132 } // end namespace noise_shaper
0 // generated from file '../src/LV2/faust/noiser.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace noiser {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iRec0[2];
10 void connect(uint32_t port,void* data);
11 void clear_state_f();
12 void init(uint32_t samplingFreq);
13 void compute(int count, float *input0, float *output0);
14
15 static void clear_state_f_static(PluginLV2*);
16 static void init_static(uint32_t samplingFreq, PluginLV2*);
17 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
18 static void del_instance(PluginLV2 *p);
19 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
20 public:
21 Dsp();
22 ~Dsp();
23 };
24
25
26
27 Dsp::Dsp()
28 : PluginLV2() {
29 version = PLUGINLV2_VERSION;
30 id = "withe_noise";
31 name = N_("withe noise");
32 mono_audio = compute_static;
33 stereo_audio = 0;
34 set_samplerate = init_static;
35 activate_plugin = 0;
36 connect_ports = connect_static;
37 clear_state = clear_state_f_static;
38 delete_instance = del_instance;
39 }
40
41 Dsp::~Dsp() {
42 }
43
44 inline void Dsp::clear_state_f()
45 {
46 for (int i=0; i<2; i++) iRec0[i] = 0;
47 }
48
49 void Dsp::clear_state_f_static(PluginLV2 *p)
50 {
51 static_cast<Dsp*>(p)->clear_state_f();
52 }
53
54 inline void Dsp::init(uint32_t samplingFreq)
55 {
56 fSamplingFreq = samplingFreq;
57 clear_state_f();
58 }
59
60 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->init(samplingFreq);
63 }
64
65 inline void Dsp::compute(int count, float *input0, float *output0)
66 {
67 for (int i=0; i<count; i++) {
68 iRec0[0] = (12345 + (1103515245 * iRec0[1]));
69 output0[i] = (FAUSTFLOAT)((double)input0[i] + (4.656612875245797e-21 * iRec0[0]));
70 // post processing
71 iRec0[1] = iRec0[0];
72 }
73 }
74
75 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
76 {
77 static_cast<Dsp*>(p)->compute(count, input0, output0);
78 }
79
80
81 void Dsp::connect(uint32_t port,void* data)
82 {
83 switch ((PortIndex)port)
84 {
85 default:
86 break;
87 }
88 }
89
90 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
91 {
92 static_cast<Dsp*>(p)->connect(port, data);
93 }
94
95
96 PluginLV2 *plugin() {
97 return new Dsp();
98 }
99
100 void Dsp::del_instance(PluginLV2 *p)
101 {
102 delete static_cast<Dsp*>(p);
103 }
104
105 /*
106 typedef enum
107 {
108 } PortIndex;
109 */
110
111 } // end namespace noiser
0 // generated from file '../src/LV2/faust/overdrive.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace overdrive {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fRec0[2];
14 void connect(uint32_t port,void* data);
15 void clear_state_f();
16 void init(uint32_t samplingFreq);
17 void compute(int count, float *input0, float *output0);
18
19 static void clear_state_f_static(PluginLV2*);
20 static void init_static(uint32_t samplingFreq, PluginLV2*);
21 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
22 static void del_instance(PluginLV2 *p);
23 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
24 public:
25 Dsp();
26 ~Dsp();
27 };
28
29
30
31 Dsp::Dsp()
32 : PluginLV2() {
33 version = PLUGINLV2_VERSION;
34 id = "overdrive";
35 name = N_("Overdrive");
36 mono_audio = compute_static;
37 stereo_audio = 0;
38 set_samplerate = init_static;
39 activate_plugin = 0;
40 connect_ports = connect_static;
41 clear_state = clear_state_f_static;
42 delete_instance = del_instance;
43 }
44
45 Dsp::~Dsp() {
46 }
47
48 inline void Dsp::clear_state_f()
49 {
50 for (int i=0; i<2; i++) fRec0[i] = 0;
51 }
52
53 void Dsp::clear_state_f_static(PluginLV2 *p)
54 {
55 static_cast<Dsp*>(p)->clear_state_f();
56 }
57
58 inline void Dsp::init(uint32_t samplingFreq)
59 {
60 fSamplingFreq = samplingFreq;
61 clear_state_f();
62 }
63
64 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
65 {
66 static_cast<Dsp*>(p)->init(samplingFreq);
67 }
68
69 inline void Dsp::compute(int count, float *input0, float *output0)
70 {
71 #define fslider0 (*fslider0_)
72 #define fslider1 (*fslider1_)
73 double fSlow0 = fslider0;
74 double fSlow1 = (0.0001 * faustpower<2>(fSlow0));
75 double fSlow2 = (0.01 * fSlow0);
76 double fSlow3 = fslider1;
77 double fSlow4 = (fSlow3 - 1);
78 double fSlow5 = (0.0010000000000000009 * pow(10,(0.05 * (0 - (0.5 * fSlow3)))));
79 double fSlow6 = (1 - fSlow2);
80 for (int i=0; i<count; i++) {
81 double fTemp0 = (double)input0[i];
82 double fTemp1 = fabs((fSlow2 * fTemp0));
83 fRec0[0] = (fSlow5 + (0.999 * fRec0[1]));
84 output0[i] = (FAUSTFLOAT)(fTemp0 * (fSlow6 + (fSlow2 * ((fRec0[0] * (fSlow3 + fTemp1)) / (1 + ((fSlow4 * fTemp1) + (fSlow1 * faustpower<2>(fTemp0))))))));
85 // post processing
86 fRec0[1] = fRec0[0];
87 }
88 #undef fslider0
89 #undef fslider1
90 }
91
92 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
93 {
94 static_cast<Dsp*>(p)->compute(count, input0, output0);
95 }
96
97
98 void Dsp::connect(uint32_t port,void* data)
99 {
100 switch ((PortIndex)port)
101 {
102 case DRIVE:
103 fslider1_ = (float*)data; // , 1.0, 1.0, 2e+01, 0.1
104 break;
105 case WET_DRY:
106 fslider0_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
107 break;
108 default:
109 break;
110 }
111 }
112
113 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
114 {
115 static_cast<Dsp*>(p)->connect(port, data);
116 }
117
118
119 PluginLV2 *plugin() {
120 return new Dsp();
121 }
122
123 void Dsp::del_instance(PluginLV2 *p)
124 {
125 delete static_cast<Dsp*>(p);
126 }
127
128 /*
129 typedef enum
130 {
131 DRIVE,
132 WET_DRY,
133 } PortIndex;
134 */
135
136 } // end namespace overdrive
0 // generated from file '../src/LV2/faust/phaser.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace phaser {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fcheckbox0;
12 FAUSTFLOAT *fcheckbox0_;
13 int iVec0[2];
14 FAUSTFLOAT fslider1;
15 FAUSTFLOAT *fslider1_;
16 FAUSTFLOAT fcheckbox1;
17 FAUSTFLOAT *fcheckbox1_;
18 FAUSTFLOAT fslider2;
19 FAUSTFLOAT *fslider2_;
20 int iConst0;
21 double fConst1;
22 double fRec1[2];
23 double fRec2[2];
24 FAUSTFLOAT fslider3;
25 FAUSTFLOAT *fslider3_;
26 FAUSTFLOAT fslider4;
27 FAUSTFLOAT *fslider4_;
28 FAUSTFLOAT fslider5;
29 FAUSTFLOAT *fslider5_;
30 double fConst2;
31 FAUSTFLOAT fslider6;
32 FAUSTFLOAT *fslider6_;
33 FAUSTFLOAT fslider7;
34 FAUSTFLOAT *fslider7_;
35 double fRec6[3];
36 double fRec5[3];
37 double fRec4[3];
38 double fRec3[3];
39 double fRec0[2];
40 double fRec11[3];
41 double fRec10[3];
42 double fRec9[3];
43 double fRec8[3];
44 double fRec7[2];
45 void connect(uint32_t port,void* data);
46 void clear_state_f();
47 void init(uint32_t samplingFreq);
48 void compute(int count, float *input0, float *input1, float *output0, float *output1);
49
50 static void clear_state_f_static(PluginLV2*);
51 static void init_static(uint32_t samplingFreq, PluginLV2*);
52 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
53 static void del_instance(PluginLV2 *p);
54 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
55 public:
56 Dsp();
57 ~Dsp();
58 };
59
60
61
62 Dsp::Dsp()
63 : PluginLV2() {
64 version = PLUGINLV2_VERSION;
65 id = "phaser";
66 name = N_("Phaser");
67 mono_audio = 0;
68 stereo_audio = compute_static;
69 set_samplerate = init_static;
70 activate_plugin = 0;
71 connect_ports = connect_static;
72 clear_state = clear_state_f_static;
73 delete_instance = del_instance;
74 }
75
76 Dsp::~Dsp() {
77 }
78
79 inline void Dsp::clear_state_f()
80 {
81 for (int i=0; i<2; i++) iVec0[i] = 0;
82 for (int i=0; i<2; i++) fRec1[i] = 0;
83 for (int i=0; i<2; i++) fRec2[i] = 0;
84 for (int i=0; i<3; i++) fRec6[i] = 0;
85 for (int i=0; i<3; i++) fRec5[i] = 0;
86 for (int i=0; i<3; i++) fRec4[i] = 0;
87 for (int i=0; i<3; i++) fRec3[i] = 0;
88 for (int i=0; i<2; i++) fRec0[i] = 0;
89 for (int i=0; i<3; i++) fRec11[i] = 0;
90 for (int i=0; i<3; i++) fRec10[i] = 0;
91 for (int i=0; i<3; i++) fRec9[i] = 0;
92 for (int i=0; i<3; i++) fRec8[i] = 0;
93 for (int i=0; i<2; i++) fRec7[i] = 0;
94 }
95
96 void Dsp::clear_state_f_static(PluginLV2 *p)
97 {
98 static_cast<Dsp*>(p)->clear_state_f();
99 }
100
101 inline void Dsp::init(uint32_t samplingFreq)
102 {
103 fSamplingFreq = samplingFreq;
104 iConst0 = min(192000, max(1, fSamplingFreq));
105 fConst1 = (6.283185307179586 / iConst0);
106 fConst2 = (1.0 / iConst0);
107 clear_state_f();
108 }
109
110 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
111 {
112 static_cast<Dsp*>(p)->init(samplingFreq);
113 }
114
115 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
116 {
117 #define fslider0 (*fslider0_)
118 #define fcheckbox0 (*fcheckbox0_)
119 #define fslider1 (*fslider1_)
120 #define fcheckbox1 (*fcheckbox1_)
121 #define fslider2 (*fslider2_)
122 #define fslider3 (*fslider3_)
123 #define fslider4 (*fslider4_)
124 #define fslider5 (*fslider5_)
125 #define fslider6 (*fslider6_)
126 #define fslider7 (*fslider7_)
127 double fSlow0 = (0.5 * ((int(fcheckbox0))?2:fslider0));
128 double fSlow1 = (1 - fSlow0);
129 double fSlow2 = pow(10,(0.05 * fslider1));
130 double fSlow3 = ((int(fcheckbox1))?(0 - fSlow0):fSlow0);
131 double fSlow4 = (fConst1 * fslider2);
132 double fSlow5 = sin(fSlow4);
133 double fSlow6 = cos(fSlow4);
134 double fSlow7 = (0 - fSlow5);
135 double fSlow8 = fslider3;
136 double fSlow9 = (6.283185307179586 * fSlow8);
137 double fSlow10 = (0.5 * ((6.283185307179586 * max(fSlow8, fslider4)) - fSlow9));
138 double fSlow11 = fslider5;
139 double fSlow12 = (fConst2 * faustpower<4>(fSlow11));
140 double fSlow13 = fslider6;
141 double fSlow14 = (fConst2 * fSlow11);
142 double fSlow15 = exp((fConst2 * (0 - (3.141592653589793 * fslider7))));
143 double fSlow16 = (0 - (2 * fSlow15));
144 double fSlow17 = faustpower<2>(fSlow15);
145 double fSlow18 = (fConst2 * faustpower<2>(fSlow11));
146 double fSlow19 = (fConst2 * faustpower<3>(fSlow11));
147 for (int i=0; i<count; i++) {
148 iVec0[0] = 1;
149 double fTemp0 = (double)input0[i];
150 fRec1[0] = ((fSlow6 * fRec1[1]) + (fSlow5 * fRec2[1]));
151 fRec2[0] = ((1 + ((fSlow7 * fRec1[1]) + (fSlow6 * fRec2[1]))) - iVec0[1]);
152 double fTemp1 = (fSlow9 + (fSlow10 * (1 - fRec1[0])));
153 double fTemp2 = (fRec6[1] * cos((fSlow14 * fTemp1)));
154 fRec6[0] = (0 - (((fSlow17 * fRec6[2]) + (fSlow16 * fTemp2)) - ((fSlow2 * fTemp0) + (fSlow13 * fRec0[1]))));
155 double fTemp3 = (fRec5[1] * cos((fSlow18 * fTemp1)));
156 fRec5[0] = ((fSlow16 * (fTemp2 - fTemp3)) + (fRec6[2] + (fSlow17 * (fRec6[0] - fRec5[2]))));
157 double fTemp4 = (fRec4[1] * cos((fSlow19 * fTemp1)));
158 fRec4[0] = ((fSlow16 * (fTemp3 - fTemp4)) + (fRec5[2] + (fSlow17 * (fRec5[0] - fRec4[2]))));
159 double fTemp5 = (fRec3[1] * cos((fSlow12 * fTemp1)));
160 fRec3[0] = ((fSlow16 * (fTemp4 - fTemp5)) + (fRec4[2] + (fSlow17 * (fRec4[0] - fRec3[2]))));
161 fRec0[0] = ((fSlow17 * fRec3[0]) + (fRec3[2] + (fSlow16 * fTemp5)));
162 output0[i] = (FAUSTFLOAT)((fRec0[0] * fSlow3) + (fSlow2 * (fTemp0 * fSlow1)));
163 double fTemp6 = (double)input1[i];
164 double fTemp7 = (fSlow9 + (fSlow10 * (1 - fRec2[0])));
165 double fTemp8 = (fRec11[1] * cos((fSlow14 * fTemp7)));
166 fRec11[0] = (0 - (((fSlow17 * fRec11[2]) + (fSlow16 * fTemp8)) - ((fSlow2 * fTemp6) + (fSlow13 * fRec7[1]))));
167 double fTemp9 = (fRec10[1] * cos((fSlow18 * fTemp7)));
168 fRec10[0] = ((fSlow16 * (fTemp8 - fTemp9)) + (fRec11[2] + (fSlow17 * (fRec11[0] - fRec10[2]))));
169 double fTemp10 = (fRec9[1] * cos((fSlow19 * fTemp7)));
170 fRec9[0] = ((fSlow16 * (fTemp9 - fTemp10)) + (fRec10[2] + (fSlow17 * (fRec10[0] - fRec9[2]))));
171 double fTemp11 = (fRec8[1] * cos((fSlow12 * fTemp7)));
172 fRec8[0] = ((fSlow16 * (fTemp10 - fTemp11)) + (fRec9[2] + (fSlow17 * (fRec9[0] - fRec8[2]))));
173 fRec7[0] = ((fSlow17 * fRec8[0]) + (fRec8[2] + (fSlow16 * fTemp11)));
174 output1[i] = (FAUSTFLOAT)((fRec7[0] * fSlow3) + (fSlow2 * (fTemp6 * fSlow1)));
175 // post processing
176 fRec7[1] = fRec7[0];
177 fRec8[2] = fRec8[1]; fRec8[1] = fRec8[0];
178 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
179 fRec10[2] = fRec10[1]; fRec10[1] = fRec10[0];
180 fRec11[2] = fRec11[1]; fRec11[1] = fRec11[0];
181 fRec0[1] = fRec0[0];
182 fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
183 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
184 fRec5[2] = fRec5[1]; fRec5[1] = fRec5[0];
185 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
186 fRec2[1] = fRec2[0];
187 fRec1[1] = fRec1[0];
188 iVec0[1] = iVec0[0];
189 }
190 #undef fslider0
191 #undef fcheckbox0
192 #undef fslider1
193 #undef fcheckbox1
194 #undef fslider2
195 #undef fslider3
196 #undef fslider4
197 #undef fslider5
198 #undef fslider6
199 #undef fslider7
200 }
201
202 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
203 {
204 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
205 }
206
207
208 void Dsp::connect(uint32_t port,void* data)
209 {
210 switch ((PortIndex)port)
211 {
212 // static const value_pair fcheckbox1_values[] = {{"linear"},{"invert"},{0}};
213 case INVERT:
214 fcheckbox1_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
215 break;
216 // static const value_pair fcheckbox0_values[] = {{"direct "},{" vibrato"},{0}};
217 case VIBRATOMODE:
218 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
219 break;
220 case NOTCHWIDTH:
221 fslider7_ = (float*)data; // , 1e+03, 1e+01, 5e+03, 1.0
222 break;
223 case FEEDBACKGAIN:
224 fslider6_ = (float*)data; // , 0.0, 0.0, 1.0, 0.01
225 break;
226 case NOTCHFREQ:
227 fslider5_ = (float*)data; // , 1.5, 1.1, 4.0, 0.01
228 break;
229 case MAXNOTCH1FREQ:
230 fslider4_ = (float*)data; // , 8e+02, 2e+01, 1e+04, 1.0
231 break;
232 case MINNOTCH1FREQ:
233 fslider3_ = (float*)data; // , 1e+02, 2e+01, 5e+03, 1.0
234 break;
235 case SPEED:
236 fslider2_ = (float*)data; // , 0.5, 0.0, 1e+01, 0.01
237 break;
238 case LEVEL:
239 fslider1_ = (float*)data; // , 0.0, -6e+01, 1e+01, 0.1
240 break;
241 case DEPTH:
242 fslider0_ = (float*)data; // , 1.0, 0.0, 1.0, 0.01
243 break;
244 default:
245 break;
246 }
247 }
248
249 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
250 {
251 static_cast<Dsp*>(p)->connect(port, data);
252 }
253
254
255 PluginLV2 *plugin() {
256 return new Dsp();
257 }
258
259 void Dsp::del_instance(PluginLV2 *p)
260 {
261 delete static_cast<Dsp*>(p);
262 }
263
264 /*
265 typedef enum
266 {
267 INVERT,
268 VIBRATOMODE,
269 NOTCHWIDTH,
270 FEEDBACKGAIN,
271 NOTCHFREQ,
272 MAXNOTCH1FREQ,
273 MINNOTCH1FREQ,
274 SPEED,
275 LEVEL,
276 DEPTH,
277 } PortIndex;
278 */
279
280 } // end namespace phaser
0 // generated from file '../src/LV2/faust/phaser_mono.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace phaser_mono {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iVec0[2];
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 int iConst0;
13 double fConst1;
14 double fRec1[2];
15 double fRec2[2];
16 double fConst2;
17 FAUSTFLOAT fslider1;
18 FAUSTFLOAT *fslider1_;
19 FAUSTFLOAT fslider2;
20 FAUSTFLOAT *fslider2_;
21 double fConst3;
22 double fConst4;
23 double fConst5;
24 double fConst6;
25 double fRec6[3];
26 double fConst7;
27 double fRec5[3];
28 double fConst8;
29 double fRec4[3];
30 double fRec3[3];
31 double fRec0[2];
32 void connect(uint32_t port,void* data);
33 void clear_state_f();
34 void init(uint32_t samplingFreq);
35 void compute(int count, float *input0, float *output0);
36
37 static void clear_state_f_static(PluginLV2*);
38 static void init_static(uint32_t samplingFreq, PluginLV2*);
39 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
40 static void del_instance(PluginLV2 *p);
41 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
42 public:
43 Dsp();
44 ~Dsp();
45 };
46
47
48
49 Dsp::Dsp()
50 : PluginLV2() {
51 version = PLUGINLV2_VERSION;
52 id = "phaser_mono";
53 name = N_("Phaser Mono");
54 mono_audio = compute_static;
55 stereo_audio = 0;
56 set_samplerate = init_static;
57 activate_plugin = 0;
58 connect_ports = connect_static;
59 clear_state = clear_state_f_static;
60 delete_instance = del_instance;
61 }
62
63 Dsp::~Dsp() {
64 }
65
66 inline void Dsp::clear_state_f()
67 {
68 for (int i=0; i<2; i++) iVec0[i] = 0;
69 for (int i=0; i<2; i++) fRec1[i] = 0;
70 for (int i=0; i<2; i++) fRec2[i] = 0;
71 for (int i=0; i<3; i++) fRec6[i] = 0;
72 for (int i=0; i<3; i++) fRec5[i] = 0;
73 for (int i=0; i<3; i++) fRec4[i] = 0;
74 for (int i=0; i<3; i++) fRec3[i] = 0;
75 for (int i=0; i<2; i++) fRec0[i] = 0;
76 }
77
78 void Dsp::clear_state_f_static(PluginLV2 *p)
79 {
80 static_cast<Dsp*>(p)->clear_state_f();
81 }
82
83 inline void Dsp::init(uint32_t samplingFreq)
84 {
85 fSamplingFreq = samplingFreq;
86 iConst0 = min(192000, max(1, fSamplingFreq));
87 fConst1 = (6.283185307179586 / iConst0);
88 fConst2 = (16.0 / iConst0);
89 fConst3 = (2.0 / iConst0);
90 fConst4 = exp((0 - (3141.592653589793 / iConst0)));
91 fConst5 = (0 - (2 * fConst4));
92 fConst6 = faustpower<2>(fConst4);
93 fConst7 = (4.0 / iConst0);
94 fConst8 = (8.0 / iConst0);
95 clear_state_f();
96 }
97
98 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
99 {
100 static_cast<Dsp*>(p)->init(samplingFreq);
101 }
102
103 inline void Dsp::compute(int count, float *input0, float *output0)
104 {
105 #define fslider0 (*fslider0_)
106 #define fslider1 (*fslider1_)
107 #define fslider2 (*fslider2_)
108 double fSlow0 = (fConst1 * fslider0);
109 double fSlow1 = sin(fSlow0);
110 double fSlow2 = cos(fSlow0);
111 double fSlow3 = (0 - fSlow1);
112 double fSlow4 = fslider2;
113 double fSlow5 = (0.01 * (fSlow4 * pow(10,(0.05 * fslider1))));
114 double fSlow6 = (1 - (0.01 * fSlow4));
115 for (int i=0; i<count; i++) {
116 iVec0[0] = 1;
117 fRec1[0] = ((fSlow2 * fRec1[1]) + (fSlow1 * fRec2[1]));
118 fRec2[0] = ((1 + ((fSlow3 * fRec1[1]) + (fSlow2 * fRec2[1]))) - iVec0[1]);
119 double fTemp0 = (628.3185307179587 + (2199.1148575128555 * (1 - fRec1[0])));
120 double fTemp1 = (double)input0[i];
121 double fTemp2 = (fRec6[1] * cos((fConst3 * fTemp0)));
122 fRec6[0] = (0 - (((fConst6 * fRec6[2]) + (fConst5 * fTemp2)) - ((fSlow5 * fTemp1) + (0.5 * fRec0[1]))));
123 double fTemp3 = (fRec5[1] * cos((fConst7 * fTemp0)));
124 fRec5[0] = ((fConst5 * (fTemp2 - fTemp3)) + (fRec6[2] + (fConst6 * (fRec6[0] - fRec5[2]))));
125 double fTemp4 = (fRec4[1] * cos((fConst8 * fTemp0)));
126 fRec4[0] = ((fConst5 * (fTemp3 - fTemp4)) + (fRec5[2] + (fConst6 * (fRec5[0] - fRec4[2]))));
127 double fTemp5 = (fRec3[1] * cos((fConst2 * fTemp0)));
128 fRec3[0] = ((fConst5 * (fTemp4 - fTemp5)) + (fRec4[2] + (fConst6 * (fRec4[0] - fRec3[2]))));
129 fRec0[0] = ((fConst6 * fRec3[0]) + (fRec3[2] + (fConst5 * fTemp5)));
130 output0[i] = (FAUSTFLOAT)((fSlow6 * fTemp1) - fRec0[0]);
131 // post processing
132 fRec0[1] = fRec0[0];
133 fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
134 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
135 fRec5[2] = fRec5[1]; fRec5[1] = fRec5[0];
136 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
137 fRec2[1] = fRec2[0];
138 fRec1[1] = fRec1[0];
139 iVec0[1] = iVec0[0];
140 }
141 #undef fslider0
142 #undef fslider1
143 #undef fslider2
144 }
145
146 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
147 {
148 static_cast<Dsp*>(p)->compute(count, input0, output0);
149 }
150
151
152 void Dsp::connect(uint32_t port,void* data)
153 {
154 switch ((PortIndex)port)
155 {
156 case WET_DRY:
157 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
158 break;
159 case LEVEL:
160 fslider1_ = (float*)data; // , 0.0, -6e+01, 1e+01, 0.1
161 break;
162 case SPEED:
163 fslider0_ = (float*)data; // , 0.5, 0.0, 1e+01, 0.01
164 break;
165 default:
166 break;
167 }
168 }
169
170 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
171 {
172 static_cast<Dsp*>(p)->connect(port, data);
173 }
174
175
176 PluginLV2 *plugin() {
177 return new Dsp();
178 }
179
180 void Dsp::del_instance(PluginLV2 *p)
181 {
182 delete static_cast<Dsp*>(p);
183 }
184
185 /*
186 typedef enum
187 {
188 WET_DRY,
189 LEVEL,
190 SPEED,
191 } PortIndex;
192 */
193
194 } // end namespace phaser_mono
0 // generated from file '../src/LV2/faust/selecteq.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace selecteq {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 double fConst0;
12 FAUSTFLOAT fslider1;
13 FAUSTFLOAT *fslider1_;
14 FAUSTFLOAT fslider2;
15 FAUSTFLOAT *fslider2_;
16 FAUSTFLOAT fslider3;
17 FAUSTFLOAT *fslider3_;
18 FAUSTFLOAT fslider4;
19 FAUSTFLOAT *fslider4_;
20 FAUSTFLOAT fslider5;
21 FAUSTFLOAT *fslider5_;
22 FAUSTFLOAT fslider6;
23 FAUSTFLOAT *fslider6_;
24 FAUSTFLOAT fslider7;
25 FAUSTFLOAT *fslider7_;
26 FAUSTFLOAT fslider8;
27 FAUSTFLOAT *fslider8_;
28 FAUSTFLOAT fslider9;
29 FAUSTFLOAT *fslider9_;
30 FAUSTFLOAT fslider10;
31 FAUSTFLOAT *fslider10_;
32 FAUSTFLOAT fslider11;
33 FAUSTFLOAT *fslider11_;
34 FAUSTFLOAT fslider12;
35 FAUSTFLOAT *fslider12_;
36 FAUSTFLOAT fslider13;
37 FAUSTFLOAT *fslider13_;
38 FAUSTFLOAT fslider14;
39 FAUSTFLOAT *fslider14_;
40 FAUSTFLOAT fslider15;
41 FAUSTFLOAT *fslider15_;
42 FAUSTFLOAT fslider16;
43 FAUSTFLOAT *fslider16_;
44 FAUSTFLOAT fslider17;
45 FAUSTFLOAT *fslider17_;
46 FAUSTFLOAT fslider18;
47 FAUSTFLOAT *fslider18_;
48 FAUSTFLOAT fslider19;
49 FAUSTFLOAT *fslider19_;
50 FAUSTFLOAT fslider20;
51 FAUSTFLOAT *fslider20_;
52 FAUSTFLOAT fslider21;
53 FAUSTFLOAT *fslider21_;
54 FAUSTFLOAT fslider22;
55 FAUSTFLOAT *fslider22_;
56 FAUSTFLOAT fslider23;
57 FAUSTFLOAT *fslider23_;
58 FAUSTFLOAT fslider24;
59 FAUSTFLOAT *fslider24_;
60 FAUSTFLOAT fslider25;
61 FAUSTFLOAT *fslider25_;
62 FAUSTFLOAT fslider26;
63 FAUSTFLOAT *fslider26_;
64 FAUSTFLOAT fslider27;
65 FAUSTFLOAT *fslider27_;
66 FAUSTFLOAT fslider28;
67 FAUSTFLOAT *fslider28_;
68 FAUSTFLOAT fslider29;
69 FAUSTFLOAT *fslider29_;
70 double fRec9[3];
71 double fRec8[3];
72 double fRec7[3];
73 double fRec6[3];
74 double fRec5[3];
75 double fRec4[3];
76 double fRec3[3];
77 double fRec2[3];
78 double fRec1[3];
79 double fRec0[3];
80 void connect(uint32_t port,void* data);
81 void clear_state_f();
82 void init(uint32_t samplingFreq);
83 void compute(int count, float *input0, float *output0);
84
85 static void clear_state_f_static(PluginLV2*);
86 static void init_static(uint32_t samplingFreq, PluginLV2*);
87 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
88 static void del_instance(PluginLV2 *p);
89 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
90 public:
91 Dsp();
92 ~Dsp();
93 };
94
95
96
97 Dsp::Dsp()
98 : PluginLV2() {
99 version = PLUGINLV2_VERSION;
100 id = "eqs";
101 name = N_("Scaleable EQ");
102 mono_audio = compute_static;
103 stereo_audio = 0;
104 set_samplerate = init_static;
105 activate_plugin = 0;
106 connect_ports = connect_static;
107 clear_state = clear_state_f_static;
108 delete_instance = del_instance;
109 }
110
111 Dsp::~Dsp() {
112 }
113
114 inline void Dsp::clear_state_f()
115 {
116 for (int i=0; i<3; i++) fRec9[i] = 0;
117 for (int i=0; i<3; i++) fRec8[i] = 0;
118 for (int i=0; i<3; i++) fRec7[i] = 0;
119 for (int i=0; i<3; i++) fRec6[i] = 0;
120 for (int i=0; i<3; i++) fRec5[i] = 0;
121 for (int i=0; i<3; i++) fRec4[i] = 0;
122 for (int i=0; i<3; i++) fRec3[i] = 0;
123 for (int i=0; i<3; i++) fRec2[i] = 0;
124 for (int i=0; i<3; i++) fRec1[i] = 0;
125 for (int i=0; i<3; i++) fRec0[i] = 0;
126 }
127
128 void Dsp::clear_state_f_static(PluginLV2 *p)
129 {
130 static_cast<Dsp*>(p)->clear_state_f();
131 }
132
133 inline void Dsp::init(uint32_t samplingFreq)
134 {
135 fSamplingFreq = samplingFreq;
136 fConst0 = (3.141592653589793 / min(192000, max(1, fSamplingFreq)));
137 clear_state_f();
138 }
139
140 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
141 {
142 static_cast<Dsp*>(p)->init(samplingFreq);
143 }
144
145 inline void Dsp::compute(int count, float *input0, float *output0)
146 {
147 #define fslider0 (*fslider0_)
148 #define fslider1 (*fslider1_)
149 #define fslider2 (*fslider2_)
150 #define fslider3 (*fslider3_)
151 #define fslider4 (*fslider4_)
152 #define fslider5 (*fslider5_)
153 #define fslider6 (*fslider6_)
154 #define fslider7 (*fslider7_)
155 #define fslider8 (*fslider8_)
156 #define fslider9 (*fslider9_)
157 #define fslider10 (*fslider10_)
158 #define fslider11 (*fslider11_)
159 #define fslider12 (*fslider12_)
160 #define fslider13 (*fslider13_)
161 #define fslider14 (*fslider14_)
162 #define fslider15 (*fslider15_)
163 #define fslider16 (*fslider16_)
164 #define fslider17 (*fslider17_)
165 #define fslider18 (*fslider18_)
166 #define fslider19 (*fslider19_)
167 #define fslider20 (*fslider20_)
168 #define fslider21 (*fslider21_)
169 #define fslider22 (*fslider22_)
170 #define fslider23 (*fslider23_)
171 #define fslider24 (*fslider24_)
172 #define fslider25 (*fslider25_)
173 #define fslider26 (*fslider26_)
174 #define fslider27 (*fslider27_)
175 #define fslider28 (*fslider28_)
176 #define fslider29 (*fslider29_)
177 double fSlow0 = tan((fConst0 * fslider0));
178 double fSlow1 = (2 * (faustpower<2>(fSlow0) - 1));
179 double fSlow2 = fslider1;
180 double fSlow3 = (pow(10,(0.05 * (0 - fslider2))) / fSlow2);
181 double fSlow4 = (1 + (fSlow0 * (fSlow0 - fSlow3)));
182 double fSlow5 = (1.0 / (1 + (fSlow0 * (fSlow0 + fSlow3))));
183 double fSlow6 = tan((fConst0 * fslider3));
184 double fSlow7 = (2 * (faustpower<2>(fSlow6) - 1));
185 double fSlow8 = fslider4;
186 double fSlow9 = (pow(10,(0.05 * (0 - fslider5))) / fSlow8);
187 double fSlow10 = (1 + (fSlow6 * (fSlow6 - fSlow9)));
188 double fSlow11 = (1.0 / (1 + (fSlow6 * (fSlow6 + fSlow9))));
189 double fSlow12 = tan((fConst0 * fslider6));
190 double fSlow13 = (2 * (faustpower<2>(fSlow12) - 1));
191 double fSlow14 = fslider7;
192 double fSlow15 = (pow(10,(0.05 * (0 - fslider8))) / fSlow14);
193 double fSlow16 = (1 + (fSlow12 * (fSlow12 - fSlow15)));
194 double fSlow17 = (1.0 / (1 + (fSlow12 * (fSlow12 + fSlow15))));
195 double fSlow18 = tan((fConst0 * fslider9));
196 double fSlow19 = (2 * (faustpower<2>(fSlow18) - 1));
197 double fSlow20 = fslider10;
198 double fSlow21 = (pow(10,(0.05 * (0 - fslider11))) / fSlow20);
199 double fSlow22 = (1 + (fSlow18 * (fSlow18 - fSlow21)));
200 double fSlow23 = (1.0 / (1 + (fSlow18 * (fSlow18 + fSlow21))));
201 double fSlow24 = tan((fConst0 * fslider12));
202 double fSlow25 = (2 * (faustpower<2>(fSlow24) - 1));
203 double fSlow26 = fslider13;
204 double fSlow27 = (pow(10,(0.05 * (0 - fslider14))) / fSlow26);
205 double fSlow28 = (1 + (fSlow24 * (fSlow24 - fSlow27)));
206 double fSlow29 = (1.0 / (1 + (fSlow24 * (fSlow24 + fSlow27))));
207 double fSlow30 = tan((fConst0 * fslider15));
208 double fSlow31 = (2 * (faustpower<2>(fSlow30) - 1));
209 double fSlow32 = fslider16;
210 double fSlow33 = (pow(10,(0.05 * (0 - fslider17))) / fSlow32);
211 double fSlow34 = (1 + (fSlow30 * (fSlow30 - fSlow33)));
212 double fSlow35 = (1.0 / (1 + (fSlow30 * (fSlow30 + fSlow33))));
213 double fSlow36 = tan((fConst0 * fslider18));
214 double fSlow37 = (2 * (faustpower<2>(fSlow36) - 1));
215 double fSlow38 = fslider19;
216 double fSlow39 = (pow(10,(0.05 * (0 - fslider20))) / fSlow38);
217 double fSlow40 = (1 + (fSlow36 * (fSlow36 - fSlow39)));
218 double fSlow41 = (1.0 / (1 + (fSlow36 * (fSlow36 + fSlow39))));
219 double fSlow42 = tan((fConst0 * fslider21));
220 double fSlow43 = (2 * (faustpower<2>(fSlow42) - 1));
221 double fSlow44 = fslider22;
222 double fSlow45 = (pow(10,(0.05 * (0 - fslider23))) / fSlow44);
223 double fSlow46 = (1 + (fSlow42 * (fSlow42 - fSlow45)));
224 double fSlow47 = (1.0 / (1 + (fSlow42 * (fSlow42 + fSlow45))));
225 double fSlow48 = tan((fConst0 * fslider24));
226 double fSlow49 = (2 * (faustpower<2>(fSlow48) - 1));
227 double fSlow50 = fslider25;
228 double fSlow51 = (pow(10,(0.05 * (0 - fslider26))) / fSlow50);
229 double fSlow52 = (1 + (fSlow48 * (fSlow48 - fSlow51)));
230 double fSlow53 = (1.0 / (1 + (fSlow48 * (fSlow48 + fSlow51))));
231 double fSlow54 = tan((fConst0 * fslider27));
232 double fSlow55 = (2 * (faustpower<2>(fSlow54) - 1));
233 double fSlow56 = fslider28;
234 double fSlow57 = (pow(10,(0.05 * (0 - fslider29))) / fSlow56);
235 double fSlow58 = (1 + (fSlow54 * (fSlow54 - fSlow57)));
236 double fSlow59 = (1.0 / (1 + (fSlow54 * (fSlow54 + fSlow57))));
237 double fSlow60 = (1.0 / fSlow56);
238 double fSlow61 = (1 + (fSlow54 * (fSlow54 - fSlow60)));
239 double fSlow62 = (1 + (fSlow54 * (fSlow54 + fSlow60)));
240 double fSlow63 = (1.0 / fSlow50);
241 double fSlow64 = (1 + (fSlow48 * (fSlow48 - fSlow63)));
242 double fSlow65 = (1 + (fSlow48 * (fSlow48 + fSlow63)));
243 double fSlow66 = (1.0 / fSlow44);
244 double fSlow67 = (1 + (fSlow42 * (fSlow42 - fSlow66)));
245 double fSlow68 = (1 + (fSlow42 * (fSlow42 + fSlow66)));
246 double fSlow69 = (1.0 / fSlow38);
247 double fSlow70 = (1 + (fSlow36 * (fSlow36 - fSlow69)));
248 double fSlow71 = (1 + (fSlow36 * (fSlow36 + fSlow69)));
249 double fSlow72 = (1.0 / fSlow32);
250 double fSlow73 = (1 + (fSlow30 * (fSlow30 - fSlow72)));
251 double fSlow74 = (1 + (fSlow30 * (fSlow30 + fSlow72)));
252 double fSlow75 = (1.0 / fSlow26);
253 double fSlow76 = (1 + (fSlow24 * (fSlow24 - fSlow75)));
254 double fSlow77 = (1 + (fSlow24 * (fSlow24 + fSlow75)));
255 double fSlow78 = (1.0 / fSlow20);
256 double fSlow79 = (1 + (fSlow18 * (fSlow18 - fSlow78)));
257 double fSlow80 = (1 + (fSlow18 * (fSlow18 + fSlow78)));
258 double fSlow81 = (1.0 / fSlow14);
259 double fSlow82 = (1 + (fSlow12 * (fSlow12 - fSlow81)));
260 double fSlow83 = (1 + (fSlow12 * (fSlow12 + fSlow81)));
261 double fSlow84 = (1.0 / fSlow8);
262 double fSlow85 = (1 + (fSlow6 * (fSlow6 - fSlow84)));
263 double fSlow86 = (1 + (fSlow6 * (fSlow6 + fSlow84)));
264 double fSlow87 = (1.0 / fSlow2);
265 double fSlow88 = (1 + (fSlow0 * (fSlow0 - fSlow87)));
266 double fSlow89 = (1 + (fSlow0 * (fSlow0 + fSlow87)));
267 for (int i=0; i<count; i++) {
268 double fTemp0 = (fSlow1 * fRec0[1]);
269 double fTemp1 = (fSlow7 * fRec1[1]);
270 double fTemp2 = (fSlow13 * fRec2[1]);
271 double fTemp3 = (fSlow19 * fRec3[1]);
272 double fTemp4 = (fSlow25 * fRec4[1]);
273 double fTemp5 = (fSlow31 * fRec5[1]);
274 double fTemp6 = (fSlow37 * fRec6[1]);
275 double fTemp7 = (fSlow43 * fRec7[1]);
276 double fTemp8 = (fSlow49 * fRec8[1]);
277 double fTemp9 = (fSlow55 * fRec9[1]);
278 fRec9[0] = ((double)input0[i] - (fSlow59 * ((fSlow58 * fRec9[2]) + fTemp9)));
279 fRec8[0] = ((fSlow59 * ((fTemp9 + (fSlow62 * fRec9[0])) + (fSlow61 * fRec9[2]))) - (fSlow53 * ((fSlow52 * fRec8[2]) + fTemp8)));
280 fRec7[0] = ((fSlow53 * ((fTemp8 + (fSlow65 * fRec8[0])) + (fSlow64 * fRec8[2]))) - (fSlow47 * ((fSlow46 * fRec7[2]) + fTemp7)));
281 fRec6[0] = ((fSlow47 * ((fTemp7 + (fSlow68 * fRec7[0])) + (fSlow67 * fRec7[2]))) - (fSlow41 * ((fSlow40 * fRec6[2]) + fTemp6)));
282 fRec5[0] = ((fSlow41 * ((fTemp6 + (fSlow71 * fRec6[0])) + (fSlow70 * fRec6[2]))) - (fSlow35 * ((fSlow34 * fRec5[2]) + fTemp5)));
283 fRec4[0] = ((fSlow35 * ((fTemp5 + (fSlow74 * fRec5[0])) + (fSlow73 * fRec5[2]))) - (fSlow29 * ((fSlow28 * fRec4[2]) + fTemp4)));
284 fRec3[0] = ((fSlow29 * ((fTemp4 + (fSlow77 * fRec4[0])) + (fSlow76 * fRec4[2]))) - (fSlow23 * ((fSlow22 * fRec3[2]) + fTemp3)));
285 fRec2[0] = ((fSlow23 * ((fTemp3 + (fSlow80 * fRec3[0])) + (fSlow79 * fRec3[2]))) - (fSlow17 * ((fSlow16 * fRec2[2]) + fTemp2)));
286 fRec1[0] = ((fSlow17 * ((fTemp2 + (fSlow83 * fRec2[0])) + (fSlow82 * fRec2[2]))) - (fSlow11 * ((fSlow10 * fRec1[2]) + fTemp1)));
287 fRec0[0] = ((fSlow11 * ((fTemp1 + (fSlow86 * fRec1[0])) + (fSlow85 * fRec1[2]))) - (fSlow5 * ((fSlow4 * fRec0[2]) + fTemp0)));
288 output0[i] = (FAUSTFLOAT)(fSlow5 * ((fTemp0 + (fSlow89 * fRec0[0])) + (fSlow88 * fRec0[2])));
289 // post processing
290 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
291 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
292 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
293 fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
294 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
295 fRec5[2] = fRec5[1]; fRec5[1] = fRec5[0];
296 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
297 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
298 fRec8[2] = fRec8[1]; fRec8[1] = fRec8[0];
299 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
300 }
301 #undef fslider0
302 #undef fslider1
303 #undef fslider2
304 #undef fslider3
305 #undef fslider4
306 #undef fslider5
307 #undef fslider6
308 #undef fslider7
309 #undef fslider8
310 #undef fslider9
311 #undef fslider10
312 #undef fslider11
313 #undef fslider12
314 #undef fslider13
315 #undef fslider14
316 #undef fslider15
317 #undef fslider16
318 #undef fslider17
319 #undef fslider18
320 #undef fslider19
321 #undef fslider20
322 #undef fslider21
323 #undef fslider22
324 #undef fslider23
325 #undef fslider24
326 #undef fslider25
327 #undef fslider26
328 #undef fslider27
329 #undef fslider28
330 #undef fslider29
331 }
332
333 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
334 {
335 static_cast<Dsp*>(p)->compute(count, input0, output0);
336 }
337
338
339 void Dsp::connect(uint32_t port,void* data)
340 {
341 switch ((PortIndex)port)
342 {
343 case QS31_25:
344 fslider28_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
345 break;
346 case FS31_25:
347 fslider29_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
348 break;
349 case FS62_5:
350 fslider26_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
351 break;
352 case FREQ31_25:
353 fslider27_ = (float*)data; // , 31.0, 2e+01, 2e+04, 1.0
354 break;
355 case FREQ62_5:
356 fslider24_ = (float*)data; // , 62.0, 2e+01, 2e+04, 1.0
357 break;
358 case QS62_5:
359 fslider25_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
360 break;
361 case QS125:
362 fslider22_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
363 break;
364 case FS125:
365 fslider23_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
366 break;
367 case FS250:
368 fslider20_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
369 break;
370 case FREQ125:
371 fslider21_ = (float*)data; // , 125.0, 2e+01, 2e+04, 1.0
372 break;
373 case QS1K:
374 fslider13_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
375 break;
376 case FREQ1K:
377 fslider12_ = (float*)data; // , 1e+03, 2e+01, 2e+04, 1.0
378 break;
379 case FS2K:
380 fslider11_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
381 break;
382 case QS2K:
383 fslider10_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
384 break;
385 case FS500:
386 fslider17_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
387 break;
388 case QS500:
389 fslider16_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
390 break;
391 case FREQ500:
392 fslider15_ = (float*)data; // , 5e+02, 2e+01, 2e+04, 1.0
393 break;
394 case FS1K:
395 fslider14_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
396 break;
397 case QS250:
398 fslider19_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
399 break;
400 case FREQ250:
401 fslider18_ = (float*)data; // , 2.5e+02, 2e+01, 2e+04, 1.0
402 break;
403 case QS4K:
404 fslider7_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
405 break;
406 case FREQ4K:
407 fslider6_ = (float*)data; // , 4e+03, 2e+01, 2e+04, 1.0
408 break;
409 case FS8K:
410 fslider5_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
411 break;
412 case QS8K:
413 fslider4_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
414 break;
415 case FREQ8K:
416 fslider3_ = (float*)data; // , 8e+03, 2e+01, 2e+04, 1.0
417 break;
418 case FS16K:
419 fslider2_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
420 break;
421 case QS16K:
422 fslider1_ = (float*)data; // , 5e+01, 1.0, 1e+02, 1.0
423 break;
424 case FREQ16K:
425 fslider0_ = (float*)data; // , 1.6e+04, 2e+01, 2e+04, 1.0
426 break;
427 case FREQ2K:
428 fslider9_ = (float*)data; // , 2e+03, 2e+01, 2e+04, 1.0
429 break;
430 case FS4K:
431 fslider8_ = (float*)data; // , 0.0, -5e+01, 1e+01, 0.1
432 break;
433 default:
434 break;
435 }
436 }
437
438 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
439 {
440 static_cast<Dsp*>(p)->connect(port, data);
441 }
442
443
444 PluginLV2 *plugin() {
445 return new Dsp();
446 }
447
448 void Dsp::del_instance(PluginLV2 *p)
449 {
450 delete static_cast<Dsp*>(p);
451 }
452
453 /*
454 typedef enum
455 {
456 QS31_25,
457 FS31_25,
458 FS62_5,
459 FREQ31_25,
460 FREQ62_5,
461 QS62_5,
462 QS125,
463 FS125,
464 FS250,
465 FREQ125,
466 QS1K,
467 FREQ1K,
468 FS2K,
469 QS2K,
470 FS500,
471 QS500,
472 FREQ500,
473 FS1K,
474 QS250,
475 FREQ250,
476 QS4K,
477 FREQ4K,
478 FS8K,
479 QS8K,
480 FREQ8K,
481 FS16K,
482 QS16K,
483 FREQ16K,
484 FREQ2K,
485 FS4K,
486 } PortIndex;
487 */
488
489 } // end namespace selecteq
0 // generated from file '../src/LV2/faust/softclip.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace softclip {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 void connect(uint32_t port,void* data);
12 void init(uint32_t samplingFreq);
13 void compute(int count, float *input0, float *output0);
14
15 static void init_static(uint32_t samplingFreq, PluginLV2*);
16 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
17 static void del_instance(PluginLV2 *p);
18 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
19 public:
20 Dsp();
21 ~Dsp();
22 };
23
24
25
26 Dsp::Dsp()
27 : PluginLV2() {
28 version = PLUGINLV2_VERSION;
29 id = "amp.clip";
30 name = "?softclip";
31 mono_audio = compute_static;
32 stereo_audio = 0;
33 set_samplerate = init_static;
34 activate_plugin = 0;
35 connect_ports = connect_static;
36 clear_state = 0;
37 delete_instance = del_instance;
38 }
39
40 Dsp::~Dsp() {
41 }
42
43 inline void Dsp::init(uint32_t samplingFreq)
44 {
45 fSamplingFreq = samplingFreq;
46 }
47
48 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
49 {
50 static_cast<Dsp*>(p)->init(samplingFreq);
51 }
52
53 inline void Dsp::compute(int count, float *input0, float *output0)
54 {
55 #define fslider0 (*fslider0_)
56 double fSlow0 = (0.88 * (2 - fslider0));
57 double fSlow1 = (0 - fSlow0);
58 for (int i=0; i<count; i++) {
59 double fTemp0 = (double)input0[i];
60 double fTemp1 = max(fSlow1, min(fSlow0, fTemp0));
61 output0[i] = (FAUSTFLOAT)(fTemp1 + (0.33 * (fTemp0 - max(fSlow1, min(fSlow0, fTemp1)))));
62 }
63 #undef fslider0
64 }
65
66 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
67 {
68 static_cast<Dsp*>(p)->compute(count, input0, output0);
69 }
70
71
72 void Dsp::connect(uint32_t port,void* data)
73 {
74 switch ((PortIndex)port)
75 {
76 case FUZZ:
77 fslider0_ = (float*)data; // , 0.0, 0.0, 1.99, 0.01
78 break;
79 default:
80 break;
81 }
82 }
83
84 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
85 {
86 static_cast<Dsp*>(p)->connect(port, data);
87 }
88
89
90 PluginLV2 *plugin() {
91 return new Dsp();
92 }
93
94 void Dsp::del_instance(PluginLV2 *p)
95 {
96 delete static_cast<Dsp*>(p);
97 }
98
99 /*
100 typedef enum
101 {
102 FUZZ,
103 } PortIndex;
104 */
105
106 } // end namespace softclip
0 // generated from file '../src/LV2/faust/stereo_noiser.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace stereo_noiser {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iRec0[2];
10 void connect(uint32_t port,void* data);
11 void clear_state_f();
12 void init(uint32_t samplingFreq);
13 void compute(int count, float *input0, float *input1, float *output0, float *output1);
14
15 static void clear_state_f_static(PluginLV2*);
16 static void init_static(uint32_t samplingFreq, PluginLV2*);
17 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
18 static void del_instance(PluginLV2 *p);
19 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
20 public:
21 Dsp();
22 ~Dsp();
23 };
24
25
26
27 Dsp::Dsp()
28 : PluginLV2() {
29 version = PLUGINLV2_VERSION;
30 id = "withe_noise_stereo";
31 name = N_("withe noise_stereo");
32 mono_audio = 0;
33 stereo_audio = compute_static;
34 set_samplerate = init_static;
35 activate_plugin = 0;
36 connect_ports = connect_static;
37 clear_state = clear_state_f_static;
38 delete_instance = del_instance;
39 }
40
41 Dsp::~Dsp() {
42 }
43
44 inline void Dsp::clear_state_f()
45 {
46 for (int i=0; i<2; i++) iRec0[i] = 0;
47 }
48
49 void Dsp::clear_state_f_static(PluginLV2 *p)
50 {
51 static_cast<Dsp*>(p)->clear_state_f();
52 }
53
54 inline void Dsp::init(uint32_t samplingFreq)
55 {
56 fSamplingFreq = samplingFreq;
57 clear_state_f();
58 }
59
60 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->init(samplingFreq);
63 }
64
65 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
66 {
67 for (int i=0; i<count; i++) {
68 iRec0[0] = (12345 + (1103515245 * iRec0[1]));
69 double fTemp0 = (4.656612875245797e-21 * iRec0[0]);
70 output0[i] = (FAUSTFLOAT)((double)input0[i] + fTemp0);
71 output1[i] = (FAUSTFLOAT)((double)input1[i] + fTemp0);
72 // post processing
73 iRec0[1] = iRec0[0];
74 }
75 }
76
77 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
78 {
79 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
80 }
81
82
83 void Dsp::connect(uint32_t port,void* data)
84 {
85 switch ((PortIndex)port)
86 {
87 default:
88 break;
89 }
90 }
91
92 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
93 {
94 static_cast<Dsp*>(p)->connect(port, data);
95 }
96
97
98 PluginLV2 *plugin() {
99 return new Dsp();
100 }
101
102 void Dsp::del_instance(PluginLV2 *p)
103 {
104 delete static_cast<Dsp*>(p);
105 }
106
107 /*
108 typedef enum
109 {
110 } PortIndex;
111 */
112
113 } // end namespace stereo_noiser
0 // generated from file '../src/LV2/faust/stereodelay.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace stereodelay {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iVec0[2];
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 int iConst0;
13 float fConst1;
14 float fRec0[2];
15 float fRec1[2];
16 FAUSTFLOAT fcheckbox0;
17 FAUSTFLOAT *fcheckbox0_;
18 int IOTA;
19 float *fVec1;
20 FAUSTFLOAT fslider1;
21 FAUSTFLOAT *fslider1_;
22 float fConst2;
23 float fRec2[2];
24 float fRec3[2];
25 float fRec4[2];
26 float fRec5[2];
27 FAUSTFLOAT fslider2;
28 FAUSTFLOAT *fslider2_;
29 float fRec6[2];
30 float *fVec2;
31 FAUSTFLOAT fslider3;
32 FAUSTFLOAT *fslider3_;
33 float fRec7[2];
34 float fRec8[2];
35 float fRec9[2];
36 float fRec10[2];
37 FAUSTFLOAT fslider4;
38 FAUSTFLOAT *fslider4_;
39 float fRec11[2];
40 bool mem_allocated;
41 void mem_alloc();
42 void mem_free();
43 void connect(uint32_t port,void* data);
44 void clear_state_f();
45 int activate(bool start);
46 void init(uint32_t samplingFreq);
47 void compute(int count, float *input0, float *input1, float *output0, float *output1);
48
49 static void clear_state_f_static(PluginLV2*);
50 static int activate_static(bool start, PluginLV2*);
51 static void init_static(uint32_t samplingFreq, PluginLV2*);
52 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
53 static void del_instance(PluginLV2 *p);
54 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
55 public:
56 Dsp();
57 ~Dsp();
58 };
59
60
61
62 Dsp::Dsp()
63 : PluginLV2(),
64 fVec1(0),
65 fVec2(0),
66 mem_allocated(false) {
67 version = PLUGINLV2_VERSION;
68 id = "stereodelay";
69 name = N_("Stereo Delay");
70 mono_audio = 0;
71 stereo_audio = compute_static;
72 set_samplerate = init_static;
73 activate_plugin = activate_static;
74 connect_ports = connect_static;
75 clear_state = clear_state_f_static;
76 delete_instance = del_instance;
77 }
78
79 Dsp::~Dsp() {
80 }
81
82 inline void Dsp::clear_state_f()
83 {
84 for (int i=0; i<2; i++) iVec0[i] = 0;
85 for (int i=0; i<2; i++) fRec0[i] = 0;
86 for (int i=0; i<2; i++) fRec1[i] = 0;
87 for (int i=0; i<262144; i++) fVec1[i] = 0;
88 for (int i=0; i<2; i++) fRec2[i] = 0;
89 for (int i=0; i<2; i++) fRec3[i] = 0;
90 for (int i=0; i<2; i++) fRec4[i] = 0;
91 for (int i=0; i<2; i++) fRec5[i] = 0;
92 for (int i=0; i<2; i++) fRec6[i] = 0;
93 for (int i=0; i<262144; i++) fVec2[i] = 0;
94 for (int i=0; i<2; i++) fRec7[i] = 0;
95 for (int i=0; i<2; i++) fRec8[i] = 0;
96 for (int i=0; i<2; i++) fRec9[i] = 0;
97 for (int i=0; i<2; i++) fRec10[i] = 0;
98 for (int i=0; i<2; i++) fRec11[i] = 0;
99 }
100
101 void Dsp::clear_state_f_static(PluginLV2 *p)
102 {
103 static_cast<Dsp*>(p)->clear_state_f();
104 }
105
106 inline void Dsp::init(uint32_t samplingFreq)
107 {
108 fSamplingFreq = samplingFreq;
109 iConst0 = min(192000, max(1, fSamplingFreq));
110 fConst1 = (6.283185307179586f / iConst0);
111 IOTA = 0;
112 fConst2 = (0.001f * iConst0);
113 }
114
115 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
116 {
117 static_cast<Dsp*>(p)->init(samplingFreq);
118 }
119
120 void Dsp::mem_alloc()
121 {
122 if (!fVec1) fVec1 = new float[262144];
123 if (!fVec2) fVec2 = new float[262144];
124 mem_allocated = true;
125 }
126
127 void Dsp::mem_free()
128 {
129 mem_allocated = false;
130 if (fVec1) { delete fVec1; fVec1 = 0; }
131 if (fVec2) { delete fVec2; fVec2 = 0; }
132 }
133
134 int Dsp::activate(bool start)
135 {
136 if (start) {
137 if (!mem_allocated) {
138 mem_alloc();
139 clear_state_f();
140 }
141 } else if (!mem_allocated) {
142 mem_free();
143 }
144 return 0;
145 }
146
147 int Dsp::activate_static(bool start, PluginLV2 *p)
148 {
149 return static_cast<Dsp*>(p)->activate(start);
150 }
151
152 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
153 {
154 #define fslider0 (*fslider0_)
155 #define fcheckbox0 (*fcheckbox0_)
156 #define fslider1 (*fslider1_)
157 #define fslider2 (*fslider2_)
158 #define fslider3 (*fslider3_)
159 #define fslider4 (*fslider4_)
160 float fSlow0 = (fConst1 * fslider0);
161 float fSlow1 = sinf(fSlow0);
162 float fSlow2 = cosf(fSlow0);
163 float fSlow3 = (0 - fSlow1);
164 float fSlow4 = fcheckbox0;
165 float fSlow5 = (fConst2 * fslider1);
166 float fSlow6 = (0.0010000000000000009f * powf(10,(0.05f * fslider2)));
167 float fSlow7 = (fConst2 * fslider3);
168 float fSlow8 = (0.0010000000000000009f * powf(10,(0.05f * fslider4)));
169 for (int i=0; i<count; i++) {
170 iVec0[0] = 1;
171 fRec0[0] = ((fSlow2 * fRec0[1]) + (fSlow1 * fRec1[1]));
172 fRec1[0] = ((1 + ((fSlow3 * fRec0[1]) + (fSlow2 * fRec1[1]))) - iVec0[1]);
173 float fTemp0 = (float)input0[i];
174 fVec1[IOTA&262143] = fTemp0;
175 float fTemp1 = ((int((fRec2[1] != 0.0f)))?((int(((fRec3[1] > 0.0f) & (fRec3[1] < 1.0f))))?fRec2[1]:0):((int(((fRec3[1] == 0.0f) & (fSlow5 != fRec4[1]))))?0.0009765625f:((int(((fRec3[1] == 1.0f) & (fSlow5 != fRec5[1]))))?-0.0009765625f:0)));
176 fRec2[0] = fTemp1;
177 fRec3[0] = max(0.0f, min(1.0f, (fRec3[1] + fTemp1)));
178 fRec4[0] = ((int(((fRec3[1] >= 1.0f) & (fRec5[1] != fSlow5))))?fSlow5:fRec4[1]);
179 fRec5[0] = ((int(((fRec3[1] <= 0.0f) & (fRec4[1] != fSlow5))))?fSlow5:fRec5[1]);
180 fRec6[0] = (fSlow6 + (0.999f * fRec6[1]));
181 output0[i] = (FAUSTFLOAT)(fVec1[IOTA&262143] + ((fRec6[0] * ((fRec3[0] * fVec1[(IOTA-int((int(fRec5[0]) & 262143)))&262143]) + ((1.0f - fRec3[0]) * fVec1[(IOTA-int((int(fRec4[0]) & 262143)))&262143]))) * (1 - (fSlow4 * fRec0[0]))));
182 float fTemp2 = (float)input1[i];
183 fVec2[IOTA&262143] = fTemp2;
184 float fTemp3 = ((int((fRec7[1] != 0.0f)))?((int(((fRec8[1] > 0.0f) & (fRec8[1] < 1.0f))))?fRec7[1]:0):((int(((fRec8[1] == 0.0f) & (fSlow7 != fRec9[1]))))?0.0009765625f:((int(((fRec8[1] == 1.0f) & (fSlow7 != fRec10[1]))))?-0.0009765625f:0)));
185 fRec7[0] = fTemp3;
186 fRec8[0] = max(0.0f, min(1.0f, (fRec8[1] + fTemp3)));
187 fRec9[0] = ((int(((fRec8[1] >= 1.0f) & (fRec10[1] != fSlow7))))?fSlow7:fRec9[1]);
188 fRec10[0] = ((int(((fRec8[1] <= 0.0f) & (fRec9[1] != fSlow7))))?fSlow7:fRec10[1]);
189 fRec11[0] = (fSlow8 + (0.999f * fRec11[1]));
190 output1[i] = (FAUSTFLOAT)(fVec2[IOTA&262143] + ((fRec11[0] * ((fRec8[0] * fVec2[(IOTA-int((int(fRec10[0]) & 262143)))&262143]) + ((1.0f - fRec8[0]) * fVec2[(IOTA-int((int(fRec9[0]) & 262143)))&262143]))) * (1 - (fSlow4 * (0 - fRec0[0])))));
191 // post processing
192 fRec11[1] = fRec11[0];
193 fRec10[1] = fRec10[0];
194 fRec9[1] = fRec9[0];
195 fRec8[1] = fRec8[0];
196 fRec7[1] = fRec7[0];
197 fRec6[1] = fRec6[0];
198 fRec5[1] = fRec5[0];
199 fRec4[1] = fRec4[0];
200 fRec3[1] = fRec3[0];
201 fRec2[1] = fRec2[0];
202 IOTA = IOTA+1;
203 fRec1[1] = fRec1[0];
204 fRec0[1] = fRec0[0];
205 iVec0[1] = iVec0[0];
206 }
207 #undef fslider0
208 #undef fcheckbox0
209 #undef fslider1
210 #undef fslider2
211 #undef fslider3
212 #undef fslider4
213 }
214
215 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
216 {
217 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
218 }
219
220
221 void Dsp::connect(uint32_t port,void* data)
222 {
223 switch ((PortIndex)port)
224 {
225 // static const value_pair fcheckbox0_values[] = {{"linear"},{"pingpong"},{0}};
226 case INVERT:
227 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
228 break;
229 case R_GAIN:
230 fslider4_ = (float*)data; // , 0.0f, -2e+01f, 2e+01f, 0.1f
231 break;
232 case R_DELAY:
233 fslider3_ = (float*)data; // , 0.0f, 0.0f, 5e+03f, 1e+01f
234 break;
235 case L_GAIN:
236 fslider2_ = (float*)data; // , 0.0f, -2e+01f, 2e+01f, 0.1f
237 break;
238 case L_DELAY:
239 fslider1_ = (float*)data; // , 0.0f, 0.0f, 5e+03f, 1e+01f
240 break;
241 case LFOFREQ:
242 fslider0_ = (float*)data; // , 0.2f, 0.0f, 5.0f, 0.01f
243 break;
244 default:
245 break;
246 }
247 }
248
249 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
250 {
251 static_cast<Dsp*>(p)->connect(port, data);
252 }
253
254
255 PluginLV2 *plugin() {
256 return new Dsp();
257 }
258
259 void Dsp::del_instance(PluginLV2 *p)
260 {
261 delete static_cast<Dsp*>(p);
262 }
263
264 /*
265 typedef enum
266 {
267 INVERT,
268 R_GAIN,
269 R_DELAY,
270 L_GAIN,
271 L_DELAY,
272 LFOFREQ,
273 } PortIndex;
274 */
275
276 } // end namespace stereodelay
0 // generated from file '../src/LV2/faust/stereoecho.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace stereoecho {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iVec0[2];
10 FAUSTFLOAT fslider0;
11 FAUSTFLOAT *fslider0_;
12 int iConst0;
13 float fConst1;
14 float fRec1[2];
15 float fRec2[2];
16 int iRec3[2];
17 int iRec4[2];
18 FAUSTFLOAT fslider1;
19 FAUSTFLOAT *fslider1_;
20 float fConst2;
21 float fRec5[2];
22 float fRec6[2];
23 FAUSTFLOAT fcheckbox0;
24 FAUSTFLOAT *fcheckbox0_;
25 FAUSTFLOAT fslider2;
26 FAUSTFLOAT *fslider2_;
27 int IOTA;
28 float *fRec0;
29 FAUSTFLOAT fslider3;
30 FAUSTFLOAT *fslider3_;
31 float fRec8[2];
32 float fRec9[2];
33 int iRec10[2];
34 int iRec11[2];
35 FAUSTFLOAT fslider4;
36 FAUSTFLOAT *fslider4_;
37 float *fRec7;
38 bool mem_allocated;
39 void mem_alloc();
40 void mem_free();
41 void connect(uint32_t port,void* data);
42 void clear_state_f();
43 int activate(bool start);
44 void init(uint32_t samplingFreq);
45 void compute(int count, float *input0, float *input1, float *output0, float *output1);
46
47 static void clear_state_f_static(PluginLV2*);
48 static int activate_static(bool start, PluginLV2*);
49 static void init_static(uint32_t samplingFreq, PluginLV2*);
50 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
51 static void del_instance(PluginLV2 *p);
52 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
53 public:
54 Dsp();
55 ~Dsp();
56 };
57
58
59
60 Dsp::Dsp()
61 : PluginLV2(),
62 fRec0(0),
63 fRec7(0),
64 mem_allocated(false) {
65 version = PLUGINLV2_VERSION;
66 id = "stereoecho";
67 name = N_("Stereo Echo");
68 mono_audio = 0;
69 stereo_audio = compute_static;
70 set_samplerate = init_static;
71 activate_plugin = activate_static;
72 connect_ports = connect_static;
73 clear_state = clear_state_f_static;
74 delete_instance = del_instance;
75 }
76
77 Dsp::~Dsp() {
78 }
79
80 inline void Dsp::clear_state_f()
81 {
82 for (int i=0; i<2; i++) iVec0[i] = 0;
83 for (int i=0; i<2; i++) fRec1[i] = 0;
84 for (int i=0; i<2; i++) fRec2[i] = 0;
85 for (int i=0; i<2; i++) iRec3[i] = 0;
86 for (int i=0; i<2; i++) iRec4[i] = 0;
87 for (int i=0; i<2; i++) fRec5[i] = 0;
88 for (int i=0; i<2; i++) fRec6[i] = 0;
89 for (int i=0; i<262144; i++) fRec0[i] = 0;
90 for (int i=0; i<2; i++) fRec8[i] = 0;
91 for (int i=0; i<2; i++) fRec9[i] = 0;
92 for (int i=0; i<2; i++) iRec10[i] = 0;
93 for (int i=0; i<2; i++) iRec11[i] = 0;
94 for (int i=0; i<262144; i++) fRec7[i] = 0;
95 }
96
97 void Dsp::clear_state_f_static(PluginLV2 *p)
98 {
99 static_cast<Dsp*>(p)->clear_state_f();
100 }
101
102 inline void Dsp::init(uint32_t samplingFreq)
103 {
104 fSamplingFreq = samplingFreq;
105 iConst0 = min(192000, max(1, fSamplingFreq));
106 fConst1 = (0.001f * iConst0);
107 fConst2 = (6.283185307179586f / iConst0);
108 IOTA = 0;
109 }
110
111 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
112 {
113 static_cast<Dsp*>(p)->init(samplingFreq);
114 }
115
116 void Dsp::mem_alloc()
117 {
118 if (!fRec0) fRec0 = new float[262144];
119 if (!fRec7) fRec7 = new float[262144];
120 mem_allocated = true;
121 }
122
123 void Dsp::mem_free()
124 {
125 mem_allocated = false;
126 if (fRec0) { delete fRec0; fRec0 = 0; }
127 if (fRec7) { delete fRec7; fRec7 = 0; }
128 }
129
130 int Dsp::activate(bool start)
131 {
132 if (start) {
133 if (!mem_allocated) {
134 mem_alloc();
135 clear_state_f();
136 }
137 } else if (!mem_allocated) {
138 mem_free();
139 }
140 return 0;
141 }
142
143 int Dsp::activate_static(bool start, PluginLV2 *p)
144 {
145 return static_cast<Dsp*>(p)->activate(start);
146 }
147
148 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
149 {
150 #define fslider0 (*fslider0_)
151 #define fslider1 (*fslider1_)
152 #define fcheckbox0 (*fcheckbox0_)
153 #define fslider2 (*fslider2_)
154 #define fslider3 (*fslider3_)
155 #define fslider4 (*fslider4_)
156 int iSlow0 = (int((fConst1 * fslider0)) - 1);
157 float fSlow1 = (fConst2 * fslider1);
158 float fSlow2 = sinf(fSlow1);
159 float fSlow3 = cosf(fSlow1);
160 float fSlow4 = (0 - fSlow2);
161 float fSlow5 = fcheckbox0;
162 float fSlow6 = (0.01f * fslider2);
163 int iSlow7 = (int((fConst1 * fslider3)) - 1);
164 float fSlow8 = (0.01f * fslider4);
165 for (int i=0; i<count; i++) {
166 iVec0[0] = 1;
167 float fTemp0 = ((int((fRec1[1] != 0.0f)))?((int(((fRec2[1] > 0.0f) & (fRec2[1] < 1.0f))))?fRec1[1]:0):((int(((fRec2[1] == 0.0f) & (iSlow0 != iRec3[1]))))?0.0009765625f:((int(((fRec2[1] == 1.0f) & (iSlow0 != iRec4[1]))))?-0.0009765625f:0)));
168 fRec1[0] = fTemp0;
169 fRec2[0] = max(0.0f, min(1.0f, (fRec2[1] + fTemp0)));
170 iRec3[0] = ((int(((fRec2[1] >= 1.0f) & (iRec4[1] != iSlow0))))?iSlow0:iRec3[1]);
171 iRec4[0] = ((int(((fRec2[1] <= 0.0f) & (iRec3[1] != iSlow0))))?iSlow0:iRec4[1]);
172 fRec5[0] = ((fSlow3 * fRec5[1]) + (fSlow2 * fRec6[1]));
173 fRec6[0] = ((1 + ((fSlow4 * fRec5[1]) + (fSlow3 * fRec6[1]))) - iVec0[1]);
174 fRec0[IOTA&262143] = ((float)input0[i] + (fSlow6 * ((1 - (fSlow5 * fRec5[0])) * ((fRec2[0] * fRec0[(IOTA-int((1 + int((int(iRec4[0]) & 131071)))))&262143]) + ((1.0f - fRec2[0]) * fRec0[(IOTA-int((1 + int((int(iRec3[0]) & 131071)))))&262143])))));
175 output0[i] = (FAUSTFLOAT)fRec0[(IOTA-0)&262143];
176 float fTemp1 = ((int((fRec8[1] != 0.0f)))?((int(((fRec9[1] > 0.0f) & (fRec9[1] < 1.0f))))?fRec8[1]:0):((int(((fRec9[1] == 0.0f) & (iSlow7 != iRec10[1]))))?0.0009765625f:((int(((fRec9[1] == 1.0f) & (iSlow7 != iRec11[1]))))?-0.0009765625f:0)));
177 fRec8[0] = fTemp1;
178 fRec9[0] = max(0.0f, min(1.0f, (fRec9[1] + fTemp1)));
179 iRec10[0] = ((int(((fRec9[1] >= 1.0f) & (iRec11[1] != iSlow7))))?iSlow7:iRec10[1]);
180 iRec11[0] = ((int(((fRec9[1] <= 0.0f) & (iRec10[1] != iSlow7))))?iSlow7:iRec11[1]);
181 fRec7[IOTA&262143] = ((float)input1[i] + (fSlow8 * ((1 - (fSlow5 * (0 - fRec5[0]))) * ((fRec9[0] * fRec7[(IOTA-int((1 + int((int(iRec11[0]) & 131071)))))&262143]) + ((1.0f - fRec9[0]) * fRec7[(IOTA-int((1 + int((int(iRec10[0]) & 131071)))))&262143])))));
182 output1[i] = (FAUSTFLOAT)fRec7[(IOTA-0)&262143];
183 // post processing
184 iRec11[1] = iRec11[0];
185 iRec10[1] = iRec10[0];
186 fRec9[1] = fRec9[0];
187 fRec8[1] = fRec8[0];
188 IOTA = IOTA+1;
189 fRec6[1] = fRec6[0];
190 fRec5[1] = fRec5[0];
191 iRec4[1] = iRec4[0];
192 iRec3[1] = iRec3[0];
193 fRec2[1] = fRec2[0];
194 fRec1[1] = fRec1[0];
195 iVec0[1] = iVec0[0];
196 }
197 #undef fslider0
198 #undef fslider1
199 #undef fcheckbox0
200 #undef fslider2
201 #undef fslider3
202 #undef fslider4
203 }
204
205 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
206 {
207 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
208 }
209
210
211 void Dsp::connect(uint32_t port,void* data)
212 {
213 switch ((PortIndex)port)
214 {
215 // static const value_pair fcheckbox0_values[] = {{"linear"},{"pingpong"},{0}};
216 case INVERT:
217 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
218 break;
219 case PERCENT_R:
220 fslider4_ = (float*)data; // , 0.0f, 0.0f, 1e+02f, 0.1f
221 break;
222 case TIME_R:
223 fslider3_ = (float*)data; // , 1.0f, 1.0f, 2e+03f, 1.0f
224 break;
225 case PERCENT_L:
226 fslider2_ = (float*)data; // , 0.0f, 0.0f, 1e+02f, 0.1f
227 break;
228 case LFOFREQ:
229 fslider1_ = (float*)data; // , 0.2f, 0.0f, 5.0f, 0.01f
230 break;
231 case TIME_L:
232 fslider0_ = (float*)data; // , 1.0f, 1.0f, 2e+03f, 1.0f
233 break;
234 default:
235 break;
236 }
237 }
238
239 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
240 {
241 static_cast<Dsp*>(p)->connect(port, data);
242 }
243
244
245 PluginLV2 *plugin() {
246 return new Dsp();
247 }
248
249 void Dsp::del_instance(PluginLV2 *p)
250 {
251 delete static_cast<Dsp*>(p);
252 }
253
254 /*
255 typedef enum
256 {
257 INVERT,
258 PERCENT_R,
259 TIME_R,
260 PERCENT_L,
261 LFOFREQ,
262 TIME_L,
263 } PortIndex;
264 */
265
266 } // end namespace stereoecho
0 // generated from file '../src/LV2/faust/stereoverb.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace stereoverb {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 int iVec0[2];
12 FAUSTFLOAT fslider1;
13 FAUSTFLOAT *fslider1_;
14 double fRec9[2];
15 FAUSTFLOAT fslider2;
16 FAUSTFLOAT *fslider2_;
17 int IOTA;
18 double fVec1[2048];
19 double fRec8[2];
20 double fRec11[2];
21 double fVec2[2048];
22 double fRec10[2];
23 double fRec13[2];
24 double fVec3[2048];
25 double fRec12[2];
26 double fRec15[2];
27 double fVec4[2048];
28 double fRec14[2];
29 double fRec17[2];
30 double fVec5[2048];
31 double fRec16[2];
32 double fRec19[2];
33 double fVec6[2048];
34 double fRec18[2];
35 double fRec21[2];
36 double fVec7[2048];
37 double fRec20[2];
38 double fRec23[2];
39 double fVec8[2048];
40 double fRec22[2];
41 double fVec9[1024];
42 double fRec6[2];
43 double fVec10[512];
44 double fRec4[2];
45 double fVec11[512];
46 double fRec2[2];
47 double fVec12[256];
48 double fRec0[2];
49 FAUSTFLOAT fslider3;
50 FAUSTFLOAT *fslider3_;
51 double fConst0;
52 double fRec24[2];
53 double fRec25[2];
54 FAUSTFLOAT fcheckbox0;
55 FAUSTFLOAT *fcheckbox0_;
56 double fRec35[2];
57 double fVec13[2048];
58 double fRec34[2];
59 double fRec37[2];
60 double fVec14[2048];
61 double fRec36[2];
62 double fRec39[2];
63 double fVec15[2048];
64 double fRec38[2];
65 double fRec41[2];
66 double fVec16[2048];
67 double fRec40[2];
68 double fRec43[2];
69 double fVec17[2048];
70 double fRec42[2];
71 double fRec45[2];
72 double fVec18[2048];
73 double fRec44[2];
74 double fRec47[2];
75 double fVec19[2048];
76 double fRec46[2];
77 double fRec49[2];
78 double fVec20[2048];
79 double fRec48[2];
80 double fVec21[1024];
81 double fRec32[2];
82 double fVec22[512];
83 double fRec30[2];
84 double fVec23[512];
85 double fRec28[2];
86 double fVec24[256];
87 double fRec26[2];
88 void connect(uint32_t port,void* data);
89 void clear_state_f();
90 void init(uint32_t samplingFreq);
91 void compute(int count, float *input0, float *input1, float *output0, float *output1);
92
93 static void clear_state_f_static(PluginLV2*);
94 static void init_static(uint32_t samplingFreq, PluginLV2*);
95 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
96 static void del_instance(PluginLV2 *p);
97 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
98 public:
99 Dsp();
100 ~Dsp();
101 };
102
103
104
105 Dsp::Dsp()
106 : PluginLV2() {
107 version = PLUGINLV2_VERSION;
108 id = "stereoverb";
109 name = N_("Stereo Verb");
110 mono_audio = 0;
111 stereo_audio = compute_static;
112 set_samplerate = init_static;
113 activate_plugin = 0;
114 connect_ports = connect_static;
115 clear_state = clear_state_f_static;
116 delete_instance = del_instance;
117 }
118
119 Dsp::~Dsp() {
120 }
121
122 inline void Dsp::clear_state_f()
123 {
124 for (int i=0; i<2; i++) iVec0[i] = 0;
125 for (int i=0; i<2; i++) fRec9[i] = 0;
126 for (int i=0; i<2048; i++) fVec1[i] = 0;
127 for (int i=0; i<2; i++) fRec8[i] = 0;
128 for (int i=0; i<2; i++) fRec11[i] = 0;
129 for (int i=0; i<2048; i++) fVec2[i] = 0;
130 for (int i=0; i<2; i++) fRec10[i] = 0;
131 for (int i=0; i<2; i++) fRec13[i] = 0;
132 for (int i=0; i<2048; i++) fVec3[i] = 0;
133 for (int i=0; i<2; i++) fRec12[i] = 0;
134 for (int i=0; i<2; i++) fRec15[i] = 0;
135 for (int i=0; i<2048; i++) fVec4[i] = 0;
136 for (int i=0; i<2; i++) fRec14[i] = 0;
137 for (int i=0; i<2; i++) fRec17[i] = 0;
138 for (int i=0; i<2048; i++) fVec5[i] = 0;
139 for (int i=0; i<2; i++) fRec16[i] = 0;
140 for (int i=0; i<2; i++) fRec19[i] = 0;
141 for (int i=0; i<2048; i++) fVec6[i] = 0;
142 for (int i=0; i<2; i++) fRec18[i] = 0;
143 for (int i=0; i<2; i++) fRec21[i] = 0;
144 for (int i=0; i<2048; i++) fVec7[i] = 0;
145 for (int i=0; i<2; i++) fRec20[i] = 0;
146 for (int i=0; i<2; i++) fRec23[i] = 0;
147 for (int i=0; i<2048; i++) fVec8[i] = 0;
148 for (int i=0; i<2; i++) fRec22[i] = 0;
149 for (int i=0; i<1024; i++) fVec9[i] = 0;
150 for (int i=0; i<2; i++) fRec6[i] = 0;
151 for (int i=0; i<512; i++) fVec10[i] = 0;
152 for (int i=0; i<2; i++) fRec4[i] = 0;
153 for (int i=0; i<512; i++) fVec11[i] = 0;
154 for (int i=0; i<2; i++) fRec2[i] = 0;
155 for (int i=0; i<256; i++) fVec12[i] = 0;
156 for (int i=0; i<2; i++) fRec0[i] = 0;
157 for (int i=0; i<2; i++) fRec24[i] = 0;
158 for (int i=0; i<2; i++) fRec25[i] = 0;
159 for (int i=0; i<2; i++) fRec35[i] = 0;
160 for (int i=0; i<2048; i++) fVec13[i] = 0;
161 for (int i=0; i<2; i++) fRec34[i] = 0;
162 for (int i=0; i<2; i++) fRec37[i] = 0;
163 for (int i=0; i<2048; i++) fVec14[i] = 0;
164 for (int i=0; i<2; i++) fRec36[i] = 0;
165 for (int i=0; i<2; i++) fRec39[i] = 0;
166 for (int i=0; i<2048; i++) fVec15[i] = 0;
167 for (int i=0; i<2; i++) fRec38[i] = 0;
168 for (int i=0; i<2; i++) fRec41[i] = 0;
169 for (int i=0; i<2048; i++) fVec16[i] = 0;
170 for (int i=0; i<2; i++) fRec40[i] = 0;
171 for (int i=0; i<2; i++) fRec43[i] = 0;
172 for (int i=0; i<2048; i++) fVec17[i] = 0;
173 for (int i=0; i<2; i++) fRec42[i] = 0;
174 for (int i=0; i<2; i++) fRec45[i] = 0;
175 for (int i=0; i<2048; i++) fVec18[i] = 0;
176 for (int i=0; i<2; i++) fRec44[i] = 0;
177 for (int i=0; i<2; i++) fRec47[i] = 0;
178 for (int i=0; i<2048; i++) fVec19[i] = 0;
179 for (int i=0; i<2; i++) fRec46[i] = 0;
180 for (int i=0; i<2; i++) fRec49[i] = 0;
181 for (int i=0; i<2048; i++) fVec20[i] = 0;
182 for (int i=0; i<2; i++) fRec48[i] = 0;
183 for (int i=0; i<1024; i++) fVec21[i] = 0;
184 for (int i=0; i<2; i++) fRec32[i] = 0;
185 for (int i=0; i<512; i++) fVec22[i] = 0;
186 for (int i=0; i<2; i++) fRec30[i] = 0;
187 for (int i=0; i<512; i++) fVec23[i] = 0;
188 for (int i=0; i<2; i++) fRec28[i] = 0;
189 for (int i=0; i<256; i++) fVec24[i] = 0;
190 for (int i=0; i<2; i++) fRec26[i] = 0;
191 }
192
193 void Dsp::clear_state_f_static(PluginLV2 *p)
194 {
195 static_cast<Dsp*>(p)->clear_state_f();
196 }
197
198 inline void Dsp::init(uint32_t samplingFreq)
199 {
200 fSamplingFreq = samplingFreq;
201 IOTA = 0;
202 fConst0 = (6.283185307179586 / min(192000, max(1, fSamplingFreq)));
203 clear_state_f();
204 }
205
206 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
207 {
208 static_cast<Dsp*>(p)->init(samplingFreq);
209 }
210
211 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
212 {
213 #define fslider0 (*fslider0_)
214 #define fslider1 (*fslider1_)
215 #define fslider2 (*fslider2_)
216 #define fslider3 (*fslider3_)
217 #define fcheckbox0 (*fcheckbox0_)
218 double fSlow0 = fslider0;
219 double fSlow1 = (1 - (0.01 * fSlow0));
220 double fSlow2 = (fSlow0 * (0.00015 + (0.01 * fSlow1)));
221 double fSlow3 = fslider1;
222 double fSlow4 = (1 - fSlow3);
223 double fSlow5 = (0.7 + (0.28 * fslider2));
224 double fSlow6 = (0.00015 * fSlow0);
225 double fSlow7 = (fConst0 * fslider3);
226 double fSlow8 = sin(fSlow7);
227 double fSlow9 = cos(fSlow7);
228 double fSlow10 = (0 - fSlow8);
229 double fSlow11 = fcheckbox0;
230 for (int i=0; i<count; i++) {
231 double fTemp0 = (double)input0[i];
232 iVec0[0] = 1;
233 fRec9[0] = ((fSlow4 * fRec8[1]) + (fSlow3 * fRec9[1]));
234 double fTemp1 = (fSlow6 * fTemp0);
235 fVec1[IOTA&2047] = (fTemp1 + (fSlow5 * fRec9[0]));
236 fRec8[0] = fVec1[(IOTA-1640)&2047];
237 fRec11[0] = ((fSlow4 * fRec10[1]) + (fSlow3 * fRec11[1]));
238 fVec2[IOTA&2047] = (fTemp1 + (fSlow5 * fRec11[0]));
239 fRec10[0] = fVec2[(IOTA-1580)&2047];
240 fRec13[0] = ((fSlow4 * fRec12[1]) + (fSlow3 * fRec13[1]));
241 fVec3[IOTA&2047] = (fTemp1 + (fSlow5 * fRec13[0]));
242 fRec12[0] = fVec3[(IOTA-1514)&2047];
243 fRec15[0] = ((fSlow4 * fRec14[1]) + (fSlow3 * fRec15[1]));
244 fVec4[IOTA&2047] = (fTemp1 + (fSlow5 * fRec15[0]));
245 fRec14[0] = fVec4[(IOTA-1445)&2047];
246 fRec17[0] = ((fSlow4 * fRec16[1]) + (fSlow3 * fRec17[1]));
247 fVec5[IOTA&2047] = (fTemp1 + (fSlow5 * fRec17[0]));
248 fRec16[0] = fVec5[(IOTA-1379)&2047];
249 fRec19[0] = ((fSlow4 * fRec18[1]) + (fSlow3 * fRec19[1]));
250 fVec6[IOTA&2047] = (fTemp1 + (fSlow5 * fRec19[0]));
251 fRec18[0] = fVec6[(IOTA-1300)&2047];
252 fRec21[0] = ((fSlow4 * fRec20[1]) + (fSlow3 * fRec21[1]));
253 fVec7[IOTA&2047] = (fTemp1 + (fSlow5 * fRec21[0]));
254 fRec20[0] = fVec7[(IOTA-1211)&2047];
255 fRec23[0] = ((fSlow4 * fRec22[1]) + (fSlow3 * fRec23[1]));
256 fVec8[IOTA&2047] = (fTemp1 + (fSlow5 * fRec23[0]));
257 fRec22[0] = fVec8[(IOTA-1139)&2047];
258 double fTemp2 = (((((((fRec22[0] + fRec20[0]) + fRec18[0]) + fRec16[0]) + fRec14[0]) + fRec12[0]) + fRec10[0]) + fRec8[0]);
259 fVec9[IOTA&1023] = (fTemp2 + (0.5 * fRec6[1]));
260 fRec6[0] = fVec9[(IOTA-579)&1023];
261 double fRec7 = (0 - (fTemp2 - fRec6[1]));
262 fVec10[IOTA&511] = (fRec7 + (0.5 * fRec4[1]));
263 fRec4[0] = fVec10[(IOTA-464)&511];
264 double fRec5 = (fRec4[1] - fRec7);
265 fVec11[IOTA&511] = (fRec5 + (0.5 * fRec2[1]));
266 fRec2[0] = fVec11[(IOTA-364)&511];
267 double fRec3 = (fRec2[1] - fRec5);
268 fVec12[IOTA&255] = (fRec3 + (0.5 * fRec0[1]));
269 fRec0[0] = fVec12[(IOTA-248)&255];
270 double fRec1 = (fRec0[1] - fRec3);
271 fRec24[0] = ((fSlow9 * fRec24[1]) + (fSlow8 * fRec25[1]));
272 fRec25[0] = ((1 + ((fSlow10 * fRec24[1]) + (fSlow9 * fRec25[1]))) - iVec0[1]);
273 output0[i] = (FAUSTFLOAT)(((1 - (fSlow11 * fRec24[0])) * (fRec1 + (fSlow2 * fTemp0))) + (fSlow1 * fTemp0));
274 double fTemp3 = (double)input1[i];
275 fRec35[0] = ((fSlow4 * fRec34[1]) + (fSlow3 * fRec35[1]));
276 double fTemp4 = (fSlow6 * fTemp3);
277 fVec13[IOTA&2047] = (fTemp4 + (fSlow5 * fRec35[0]));
278 fRec34[0] = fVec13[(IOTA-1640)&2047];
279 fRec37[0] = ((fSlow4 * fRec36[1]) + (fSlow3 * fRec37[1]));
280 fVec14[IOTA&2047] = (fTemp4 + (fSlow5 * fRec37[0]));
281 fRec36[0] = fVec14[(IOTA-1580)&2047];
282 fRec39[0] = ((fSlow4 * fRec38[1]) + (fSlow3 * fRec39[1]));
283 fVec15[IOTA&2047] = (fTemp4 + (fSlow5 * fRec39[0]));
284 fRec38[0] = fVec15[(IOTA-1514)&2047];
285 fRec41[0] = ((fSlow4 * fRec40[1]) + (fSlow3 * fRec41[1]));
286 fVec16[IOTA&2047] = (fTemp4 + (fSlow5 * fRec41[0]));
287 fRec40[0] = fVec16[(IOTA-1445)&2047];
288 fRec43[0] = ((fSlow4 * fRec42[1]) + (fSlow3 * fRec43[1]));
289 fVec17[IOTA&2047] = (fTemp4 + (fSlow5 * fRec43[0]));
290 fRec42[0] = fVec17[(IOTA-1379)&2047];
291 fRec45[0] = ((fSlow4 * fRec44[1]) + (fSlow3 * fRec45[1]));
292 fVec18[IOTA&2047] = (fTemp4 + (fSlow5 * fRec45[0]));
293 fRec44[0] = fVec18[(IOTA-1300)&2047];
294 fRec47[0] = ((fSlow4 * fRec46[1]) + (fSlow3 * fRec47[1]));
295 fVec19[IOTA&2047] = (fTemp4 + (fSlow5 * fRec47[0]));
296 fRec46[0] = fVec19[(IOTA-1211)&2047];
297 fRec49[0] = ((fSlow4 * fRec48[1]) + (fSlow3 * fRec49[1]));
298 fVec20[IOTA&2047] = (fTemp4 + (fSlow5 * fRec49[0]));
299 fRec48[0] = fVec20[(IOTA-1139)&2047];
300 double fTemp5 = (((((((fRec48[0] + fRec46[0]) + fRec44[0]) + fRec42[0]) + fRec40[0]) + fRec38[0]) + fRec36[0]) + fRec34[0]);
301 fVec21[IOTA&1023] = (fTemp5 + (0.5 * fRec32[1]));
302 fRec32[0] = fVec21[(IOTA-579)&1023];
303 double fRec33 = (0 - (fTemp5 - fRec32[1]));
304 fVec22[IOTA&511] = (fRec33 + (0.5 * fRec30[1]));
305 fRec30[0] = fVec22[(IOTA-464)&511];
306 double fRec31 = (fRec30[1] - fRec33);
307 fVec23[IOTA&511] = (fRec31 + (0.5 * fRec28[1]));
308 fRec28[0] = fVec23[(IOTA-364)&511];
309 double fRec29 = (fRec28[1] - fRec31);
310 fVec24[IOTA&255] = (fRec29 + (0.5 * fRec26[1]));
311 fRec26[0] = fVec24[(IOTA-248)&255];
312 double fRec27 = (fRec26[1] - fRec29);
313 output1[i] = (FAUSTFLOAT)(((1 - (fSlow11 * (0 - fRec24[0]))) * (fRec27 + (fSlow2 * fTemp3))) + (fSlow1 * fTemp3));
314 // post processing
315 fRec26[1] = fRec26[0];
316 fRec28[1] = fRec28[0];
317 fRec30[1] = fRec30[0];
318 fRec32[1] = fRec32[0];
319 fRec48[1] = fRec48[0];
320 fRec49[1] = fRec49[0];
321 fRec46[1] = fRec46[0];
322 fRec47[1] = fRec47[0];
323 fRec44[1] = fRec44[0];
324 fRec45[1] = fRec45[0];
325 fRec42[1] = fRec42[0];
326 fRec43[1] = fRec43[0];
327 fRec40[1] = fRec40[0];
328 fRec41[1] = fRec41[0];
329 fRec38[1] = fRec38[0];
330 fRec39[1] = fRec39[0];
331 fRec36[1] = fRec36[0];
332 fRec37[1] = fRec37[0];
333 fRec34[1] = fRec34[0];
334 fRec35[1] = fRec35[0];
335 fRec25[1] = fRec25[0];
336 fRec24[1] = fRec24[0];
337 fRec0[1] = fRec0[0];
338 fRec2[1] = fRec2[0];
339 fRec4[1] = fRec4[0];
340 fRec6[1] = fRec6[0];
341 fRec22[1] = fRec22[0];
342 fRec23[1] = fRec23[0];
343 fRec20[1] = fRec20[0];
344 fRec21[1] = fRec21[0];
345 fRec18[1] = fRec18[0];
346 fRec19[1] = fRec19[0];
347 fRec16[1] = fRec16[0];
348 fRec17[1] = fRec17[0];
349 fRec14[1] = fRec14[0];
350 fRec15[1] = fRec15[0];
351 fRec12[1] = fRec12[0];
352 fRec13[1] = fRec13[0];
353 fRec10[1] = fRec10[0];
354 fRec11[1] = fRec11[0];
355 fRec8[1] = fRec8[0];
356 IOTA = IOTA+1;
357 fRec9[1] = fRec9[0];
358 iVec0[1] = iVec0[0];
359 }
360 #undef fslider0
361 #undef fslider1
362 #undef fslider2
363 #undef fslider3
364 #undef fcheckbox0
365 }
366
367 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
368 {
369 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
370 }
371
372
373 void Dsp::connect(uint32_t port,void* data)
374 {
375 switch ((PortIndex)port)
376 {
377 case WET_DRY:
378 fslider0_ = (float*)data; // , 5e+01, 0.0, 1e+02, 1.0
379 break;
380 case LFOFREQ:
381 fslider3_ = (float*)data; // , 0.2, 0.0, 5.0, 0.01
382 break;
383 case ROOMSIZE:
384 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.025
385 break;
386 case DAMP:
387 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.025
388 break;
389 // static const value_pair fcheckbox0_values[] = {{"linear"},{"pingpong"},{0}};
390 case INVERT:
391 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
392 break;
393 default:
394 break;
395 }
396 }
397
398 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
399 {
400 static_cast<Dsp*>(p)->connect(port, data);
401 }
402
403
404 PluginLV2 *plugin() {
405 return new Dsp();
406 }
407
408 void Dsp::del_instance(PluginLV2 *p)
409 {
410 delete static_cast<Dsp*>(p);
411 }
412
413 /*
414 typedef enum
415 {
416 WET_DRY,
417 LFOFREQ,
418 ROOMSIZE,
419 DAMP,
420 INVERT,
421 } PortIndex;
422 */
423
424 } // end namespace stereoverb
0 // generated from file '../src/LV2/faust/tonecontroll.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonecontroll {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iConst0;
10 double fConst1;
11 double fConst2;
12 double fConst3;
13 double fConst4;
14 double fConst5;
15 double fConst6;
16 double fConst7;
17 double fConst8;
18 double fConst9;
19 double fConst10;
20 double fConst11;
21 double fConst12;
22 double fConst13;
23 double fConst14;
24 double fConst15;
25 double fConst16;
26 double fConst17;
27 double fVec0[2];
28 double fConst18;
29 double fRec3[2];
30 double fRec2[3];
31 double fVec1[2];
32 double fConst19;
33 double fConst20;
34 double fRec1[2];
35 double fRec0[3];
36 double fConst21;
37 FAUSTFLOAT fslider0;
38 FAUSTFLOAT *fslider0_;
39 double fRec4[2];
40 double fRec6[2];
41 double fRec5[3];
42 FAUSTFLOAT fslider1;
43 FAUSTFLOAT *fslider1_;
44 double fRec7[2];
45 double fConst22;
46 double fConst23;
47 double fConst24;
48 double fRec10[2];
49 double fRec9[3];
50 double fConst25;
51 double fRec8[3];
52 FAUSTFLOAT fslider2;
53 FAUSTFLOAT *fslider2_;
54 double fRec11[2];
55 FAUSTFLOAT fslider3;
56 FAUSTFLOAT *fslider3_;
57 double fConst26;
58 double fConst27;
59 double fRec12[2];
60 FAUSTFLOAT fcheckbox0;
61 FAUSTFLOAT *fcheckbox0_;
62 double fVec2[2];
63 double fRec16[2];
64 double fRec15[3];
65 double fVec3[2];
66 double fRec14[2];
67 double fRec13[3];
68 double fRec18[2];
69 double fRec17[3];
70 double fRec21[2];
71 double fRec20[3];
72 double fRec19[3];
73 double fRec22[2];
74 void connect(uint32_t port,void* data);
75 void clear_state_f();
76 void init(uint32_t samplingFreq);
77 void compute(int count, float *input0, float *input1, float *output0, float *output1);
78
79 static void clear_state_f_static(PluginLV2*);
80 static void init_static(uint32_t samplingFreq, PluginLV2*);
81 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
82 static void del_instance(PluginLV2 *p);
83 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
84 public:
85 Dsp();
86 ~Dsp();
87 };
88
89
90
91 Dsp::Dsp()
92 : PluginLV2() {
93 version = PLUGINLV2_VERSION;
94 id = "tonemodul";
95 name = N_("3 Band EQ");
96 mono_audio = 0;
97 stereo_audio = compute_static;
98 set_samplerate = init_static;
99 activate_plugin = 0;
100 connect_ports = connect_static;
101 clear_state = clear_state_f_static;
102 delete_instance = del_instance;
103 }
104
105 Dsp::~Dsp() {
106 }
107
108 inline void Dsp::clear_state_f()
109 {
110 for (int i=0; i<2; i++) fVec0[i] = 0;
111 for (int i=0; i<2; i++) fRec3[i] = 0;
112 for (int i=0; i<3; i++) fRec2[i] = 0;
113 for (int i=0; i<2; i++) fVec1[i] = 0;
114 for (int i=0; i<2; i++) fRec1[i] = 0;
115 for (int i=0; i<3; i++) fRec0[i] = 0;
116 for (int i=0; i<2; i++) fRec4[i] = 0;
117 for (int i=0; i<2; i++) fRec6[i] = 0;
118 for (int i=0; i<3; i++) fRec5[i] = 0;
119 for (int i=0; i<2; i++) fRec7[i] = 0;
120 for (int i=0; i<2; i++) fRec10[i] = 0;
121 for (int i=0; i<3; i++) fRec9[i] = 0;
122 for (int i=0; i<3; i++) fRec8[i] = 0;
123 for (int i=0; i<2; i++) fRec11[i] = 0;
124 for (int i=0; i<2; i++) fRec12[i] = 0;
125 for (int i=0; i<2; i++) fVec2[i] = 0;
126 for (int i=0; i<2; i++) fRec16[i] = 0;
127 for (int i=0; i<3; i++) fRec15[i] = 0;
128 for (int i=0; i<2; i++) fVec3[i] = 0;
129 for (int i=0; i<2; i++) fRec14[i] = 0;
130 for (int i=0; i<3; i++) fRec13[i] = 0;
131 for (int i=0; i<2; i++) fRec18[i] = 0;
132 for (int i=0; i<3; i++) fRec17[i] = 0;
133 for (int i=0; i<2; i++) fRec21[i] = 0;
134 for (int i=0; i<3; i++) fRec20[i] = 0;
135 for (int i=0; i<3; i++) fRec19[i] = 0;
136 for (int i=0; i<2; i++) fRec22[i] = 0;
137 }
138
139 void Dsp::clear_state_f_static(PluginLV2 *p)
140 {
141 static_cast<Dsp*>(p)->clear_state_f();
142 }
143
144 inline void Dsp::init(uint32_t samplingFreq)
145 {
146 fSamplingFreq = samplingFreq;
147 iConst0 = min(192000, max(1, fSamplingFreq));
148 fConst1 = tan((1884.9555921538758 / iConst0));
149 fConst2 = (1.0 / faustpower<2>(fConst1));
150 fConst3 = (2 * (1 - fConst2));
151 fConst4 = (1.0 / fConst1);
152 fConst5 = (1 + ((fConst4 - 1.0000000000000004) / fConst1));
153 fConst6 = (1.0 / (1 + ((fConst4 + 1.0000000000000004) / fConst1)));
154 fConst7 = (1 + fConst4);
155 fConst8 = (0 - ((1 - fConst4) / fConst7));
156 fConst9 = tan((7539.822368615503 / iConst0));
157 fConst10 = (1.0 / faustpower<2>(fConst9));
158 fConst11 = (2 * (1 - fConst10));
159 fConst12 = (1.0 / fConst9);
160 fConst13 = (1 + ((fConst12 - 1.0000000000000004) / fConst9));
161 fConst14 = (1 + ((1.0000000000000004 + fConst12) / fConst9));
162 fConst15 = (1.0 / fConst14);
163 fConst16 = (1 + fConst12);
164 fConst17 = (0 - ((1 - fConst12) / fConst16));
165 fConst18 = (1.0 / fConst16);
166 fConst19 = (0 - fConst4);
167 fConst20 = (1.0 / (fConst7 * fConst14));
168 fConst21 = (2 * (0 - fConst2));
169 fConst22 = (1 + ((fConst4 - 1.0) / fConst1));
170 fConst23 = (1.0 / (1 + ((1.0 + fConst4) / fConst1)));
171 fConst24 = (0 - fConst12);
172 fConst25 = (2 * (0 - fConst10));
173 fConst26 = exp((0 - (2e+02 / iConst0)));
174 fConst27 = exp((0 - (0.2 / iConst0)));
175 clear_state_f();
176 }
177
178 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
179 {
180 static_cast<Dsp*>(p)->init(samplingFreq);
181 }
182
183 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
184 {
185 #define fslider0 (*fslider0_)
186 #define fslider1 (*fslider1_)
187 #define fslider2 (*fslider2_)
188 #define fslider3 (*fslider3_)
189 #define fcheckbox0 (*fcheckbox0_)
190 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
191 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
192 double fSlow2 = (0.0010000000000000009 * pow(10,(0.05 * fslider2)));
193 double fSlow3 = fslider3;
194 double fSlow4 = (5.0 * fSlow3);
195 int iSlow5 = int(fcheckbox0);
196 for (int i=0; i<count; i++) {
197 double fTemp0 = (double)input0[i];
198 fVec0[0] = fTemp0;
199 fRec3[0] = ((fConst18 * (fVec0[0] + fVec0[1])) + (fConst17 * fRec3[1]));
200 fRec2[0] = (fRec3[0] - (fConst15 * ((fConst13 * fRec2[2]) + (fConst11 * fRec2[1]))));
201 double fTemp1 = (fRec2[2] + (fRec2[0] + (2 * fRec2[1])));
202 fVec1[0] = fTemp1;
203 fRec1[0] = ((fConst20 * ((fConst19 * fVec1[1]) + (fConst4 * fVec1[0]))) + (fConst8 * fRec1[1]));
204 fRec0[0] = (fRec1[0] - (fConst6 * ((fConst5 * fRec0[2]) + (fConst3 * fRec0[1]))));
205 fRec4[0] = (fSlow0 + (0.999 * fRec4[1]));
206 fRec6[0] = ((fConst20 * (fVec1[0] + fVec1[1])) + (fConst8 * fRec6[1]));
207 fRec5[0] = (fRec6[0] - (fConst6 * ((fConst5 * fRec5[2]) + (fConst3 * fRec5[1]))));
208 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
209 double fTemp2 = (fConst3 * fRec8[1]);
210 fRec10[0] = ((fConst18 * ((fConst24 * fVec0[1]) + (fConst12 * fVec0[0]))) + (fConst17 * fRec10[1]));
211 fRec9[0] = (fRec10[0] - (fConst15 * ((fConst13 * fRec9[2]) + (fConst11 * fRec9[1]))));
212 fRec8[0] = ((fConst15 * (((fConst10 * fRec9[0]) + (fConst25 * fRec9[1])) + (fConst10 * fRec9[2]))) - (fConst23 * ((fConst22 * fRec8[2]) + fTemp2)));
213 fRec11[0] = (fSlow2 + (0.999 * fRec11[1]));
214 double fTemp3 = ((fRec11[0] * (fRec8[2] + (fConst23 * (fTemp2 + (fConst22 * fRec8[0]))))) + (fConst6 * ((fRec7[0] * (fRec5[2] + (fRec5[0] + (2 * fRec5[1])))) + (fRec4[0] * (((fConst2 * fRec0[0]) + (fConst21 * fRec0[1])) + (fConst2 * fRec0[2]))))));
215 double fTemp4 = max(1, fabs(fTemp3));
216 double fTemp5 = ((fConst27 * (fRec12[1] >= fTemp4)) + (fConst26 * (fRec12[1] < fTemp4)));
217 fRec12[0] = ((fTemp4 * (0 - (fTemp5 - 1))) + (fRec12[1] * fTemp5));
218 double fTemp6 = max(0, ((20 * log10(fRec12[0])) + fSlow4));
219 double fTemp7 = (2.0 * min(1, max(0, (0.09522902580706599 * fTemp6))));
220 output0[i] = (FAUSTFLOAT)((iSlow5)?(fTemp3 * pow(10,(0.05 * (fSlow3 + ((fTemp6 * (0 - fTemp7)) / (1 + fTemp7)))))):fTemp3);
221 double fTemp8 = (double)input1[i];
222 fVec2[0] = fTemp8;
223 fRec16[0] = ((fConst18 * (fVec2[0] + fVec2[1])) + (fConst17 * fRec16[1]));
224 fRec15[0] = (fRec16[0] - (fConst15 * ((fConst13 * fRec15[2]) + (fConst11 * fRec15[1]))));
225 double fTemp9 = (fRec15[2] + (fRec15[0] + (2 * fRec15[1])));
226 fVec3[0] = fTemp9;
227 fRec14[0] = ((fConst20 * ((fConst19 * fVec3[1]) + (fConst4 * fVec3[0]))) + (fConst8 * fRec14[1]));
228 fRec13[0] = (fRec14[0] - (fConst6 * ((fConst5 * fRec13[2]) + (fConst3 * fRec13[1]))));
229 fRec18[0] = ((fConst20 * (fVec3[0] + fVec3[1])) + (fConst8 * fRec18[1]));
230 fRec17[0] = (fRec18[0] - (fConst6 * ((fConst5 * fRec17[2]) + (fConst3 * fRec17[1]))));
231 double fTemp10 = (fConst3 * fRec19[1]);
232 fRec21[0] = ((fConst18 * ((fConst24 * fVec2[1]) + (fConst12 * fVec2[0]))) + (fConst17 * fRec21[1]));
233 fRec20[0] = (fRec21[0] - (fConst15 * ((fConst13 * fRec20[2]) + (fConst11 * fRec20[1]))));
234 fRec19[0] = ((fConst15 * (((fConst10 * fRec20[0]) + (fConst25 * fRec20[1])) + (fConst10 * fRec20[2]))) - (fConst23 * ((fConst22 * fRec19[2]) + fTemp10)));
235 double fTemp11 = ((fRec11[0] * (fRec19[2] + (fConst23 * (fTemp10 + (fConst22 * fRec19[0]))))) + (fConst6 * ((fRec7[0] * (fRec17[2] + (fRec17[0] + (2 * fRec17[1])))) + (fRec4[0] * (((fConst2 * fRec13[0]) + (fConst21 * fRec13[1])) + (fConst2 * fRec13[2]))))));
236 double fTemp12 = max(1, fabs(fTemp11));
237 double fTemp13 = ((fConst27 * (fRec22[1] >= fTemp12)) + (fConst26 * (fRec22[1] < fTemp12)));
238 fRec22[0] = ((fTemp12 * (0 - (fTemp13 - 1))) + (fRec22[1] * fTemp13));
239 double fTemp14 = max(0, ((20 * log10(fRec22[0])) + fSlow4));
240 double fTemp15 = (2.0 * min(1, max(0, (0.09522902580706599 * fTemp14))));
241 output1[i] = (FAUSTFLOAT)((iSlow5)?(fTemp11 * pow(10,(0.05 * (fSlow3 + ((fTemp14 * (0 - fTemp15)) / (1 + fTemp15)))))):fTemp11);
242 // post processing
243 fRec22[1] = fRec22[0];
244 fRec19[2] = fRec19[1]; fRec19[1] = fRec19[0];
245 fRec20[2] = fRec20[1]; fRec20[1] = fRec20[0];
246 fRec21[1] = fRec21[0];
247 fRec17[2] = fRec17[1]; fRec17[1] = fRec17[0];
248 fRec18[1] = fRec18[0];
249 fRec13[2] = fRec13[1]; fRec13[1] = fRec13[0];
250 fRec14[1] = fRec14[0];
251 fVec3[1] = fVec3[0];
252 fRec15[2] = fRec15[1]; fRec15[1] = fRec15[0];
253 fRec16[1] = fRec16[0];
254 fVec2[1] = fVec2[0];
255 fRec12[1] = fRec12[0];
256 fRec11[1] = fRec11[0];
257 fRec8[2] = fRec8[1]; fRec8[1] = fRec8[0];
258 fRec9[2] = fRec9[1]; fRec9[1] = fRec9[0];
259 fRec10[1] = fRec10[0];
260 fRec7[1] = fRec7[0];
261 fRec5[2] = fRec5[1]; fRec5[1] = fRec5[0];
262 fRec6[1] = fRec6[0];
263 fRec4[1] = fRec4[0];
264 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
265 fRec1[1] = fRec1[0];
266 fVec1[1] = fVec1[0];
267 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
268 fRec3[1] = fRec3[0];
269 fVec0[1] = fVec0[0];
270 }
271 #undef fslider0
272 #undef fslider1
273 #undef fslider2
274 #undef fslider3
275 #undef fcheckbox0
276 }
277
278 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
279 {
280 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
281 }
282
283
284 void Dsp::connect(uint32_t port,void* data)
285 {
286 switch ((PortIndex)port)
287 {
288 case TREBLE:
289 fslider2_ = (float*)data; // , 0.0, -5.0, 5.0, 0.01
290 break;
291 case SHARPER:
292 fslider3_ = (float*)data; // , -2.0, -2.5, 5.0, 0.1
293 break;
294 case ON:
295 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
296 break;
297 case BASS:
298 fslider1_ = (float*)data; // , 0.0, -5.0, 5.0, 0.01
299 break;
300 case MIDDLE:
301 fslider0_ = (float*)data; // , 0.0, -5.0, 5.0, 0.01
302 break;
303 default:
304 break;
305 }
306 }
307
308 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
309 {
310 static_cast<Dsp*>(p)->connect(port, data);
311 }
312
313
314 PluginLV2 *plugin() {
315 return new Dsp();
316 }
317
318 void Dsp::del_instance(PluginLV2 *p)
319 {
320 delete static_cast<Dsp*>(p);
321 }
322
323 /*
324 typedef enum
325 {
326 TREBLE,
327 SHARPER,
328 ON,
329 BASS,
330 MIDDLE,
331 } PortIndex;
332 */
333
334 } // end namespace tonecontroll
0 // generated from file '../src/LV2/faust/tonestack_ac15.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ac15 {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fRec0[4];
19 FAUSTFLOAT fslider2;
20 FAUSTFLOAT *fslider2_;
21 double fConst5;
22 double fConst6;
23 void connect(uint32_t port,void* data);
24 void clear_state_f();
25 void init(uint32_t samplingFreq);
26 void compute(int count, float *input0, float *output0);
27
28 static void clear_state_f_static(PluginLV2*);
29 static void init_static(uint32_t samplingFreq, PluginLV2*);
30 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
31 static void del_instance(PluginLV2 *p);
32 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
33 public:
34 Dsp();
35 ~Dsp();
36 };
37
38
39
40 Dsp::Dsp()
41 : PluginLV2() {
42 version = PLUGINLV2_VERSION;
43 id = "AC-15";
44 name = N_("AC-15");
45 mono_audio = compute_static;
46 stereo_audio = 0;
47 set_samplerate = init_static;
48 activate_plugin = 0;
49 connect_ports = connect_static;
50 clear_state = clear_state_f_static;
51 delete_instance = del_instance;
52 }
53
54 Dsp::~Dsp() {
55 }
56
57 inline void Dsp::clear_state_f()
58 {
59 for (int i=0; i<4; i++) fRec0[i] = 0;
60 }
61
62 void Dsp::clear_state_f_static(PluginLV2 *p)
63 {
64 static_cast<Dsp*>(p)->clear_state_f();
65 }
66
67 inline void Dsp::init(uint32_t samplingFreq)
68 {
69 fSamplingFreq = samplingFreq;
70 fConst0 = double(min(192000, max(1, fSamplingFreq)));
71 fConst1 = (2 * fConst0);
72 fConst2 = (1.0691560000000003e-08 * fConst1);
73 fConst3 = faustpower<2>(fConst1);
74 fConst4 = (3.2074680000000005e-08 * fConst1);
75 fConst5 = (3 * fConst1);
76 fConst6 = (0.044206800000000004 * fConst0);
77 clear_state_f();
78 }
79
80 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->init(samplingFreq);
83 }
84
85 inline void Dsp::compute(int count, float *input0, float *output0)
86 {
87 #define fslider0 (*fslider0_)
88 #define fslider1 (*fslider1_)
89 #define fslider2 (*fslider2_)
90 double fSlow0 = fslider0;
91 double fSlow1 = (0.00022854915600000004 * fSlow0);
92 double fSlow2 = exp((3.4 * (fslider1 - 1)));
93 double fSlow3 = (0.00010871476000000002 + ((0.00010719478000000002 * fSlow2) + (fSlow0 * ((0.00012621831200000002 + (0.00022854915600000004 * fSlow2)) - fSlow1))));
94 double fSlow4 = ((3.421299200000001e-08 * fSlow2) - (3.421299200000001e-08 * fSlow0));
95 double fSlow5 = (1.0 + (fSlow2 + (93531720.34763868 * (fSlow0 * (2.3521432000000005e-08 + fSlow4)))));
96 double fSlow6 = (fConst2 * fSlow5);
97 double fSlow7 = (fConst1 * (0.036906800000000003 + ((0.022103400000000002 * fSlow2) + (0.01034 * fSlow0))));
98 double fSlow8 = ((fSlow7 + (fConst3 * (fSlow6 - fSlow3))) - 1);
99 double fSlow9 = (fConst4 * fSlow5);
100 double fSlow10 = ((fConst3 * (fSlow3 + fSlow9)) - (3 + fSlow7));
101 double fSlow11 = ((fSlow7 + (fConst3 * (fSlow3 - fSlow9))) - 3);
102 double fSlow12 = (1.0 / ((fConst3 * (0 - (fSlow3 + fSlow6))) - (1 + fSlow7)));
103 double fSlow13 = fslider2;
104 double fSlow14 = ((fSlow0 * (3.421299200000001e-08 + fSlow4)) + (fSlow13 * ((1.0691560000000003e-08 * fSlow2) + (1.0691560000000003e-08 - (1.0691560000000003e-08 * fSlow0)))));
105 double fSlow15 = (fConst5 * fSlow14);
106 double fSlow16 = (3.7947800000000004e-06 + (((1.5199800000000001e-06 * fSlow13) + (fSlow0 * (0.00022961831200000004 - fSlow1))) + (fSlow2 * (3.7947800000000004e-06 + fSlow1))));
107 double fSlow17 = (1.0 + (fSlow2 + ((0.4678013337314621 * fSlow0) + (0.0046780133373146215 * fSlow13))));
108 double fSlow18 = (fConst6 * fSlow17);
109 double fSlow19 = (fSlow18 + (fConst3 * (fSlow16 - fSlow15)));
110 double fSlow20 = (fConst1 * fSlow14);
111 double fSlow21 = (fSlow18 + (fConst3 * (fSlow20 - fSlow16)));
112 double fSlow22 = (fConst1 * (0 - (0.022103400000000002 * fSlow17)));
113 double fSlow23 = (fSlow22 + (fConst3 * (fSlow16 + fSlow15)));
114 double fSlow24 = (fSlow22 - (fConst3 * (fSlow16 + fSlow20)));
115 for (int i=0; i<count; i++) {
116 fRec0[0] = ((double)input0[i] - (fSlow12 * (((fSlow11 * fRec0[2]) + (fSlow10 * fRec0[1])) + (fSlow8 * fRec0[3]))));
117 output0[i] = (FAUSTFLOAT)(fSlow12 * ((fSlow24 * fRec0[0]) + ((fSlow23 * fRec0[1]) + ((fSlow21 * fRec0[3]) + (fSlow19 * fRec0[2])))));
118 // post processing
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, output0);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_ac15
0 // generated from file '../src/LV2/faust/tonestack_ac15_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ac15_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fRec0[4];
19 FAUSTFLOAT fslider2;
20 FAUSTFLOAT *fslider2_;
21 double fConst5;
22 double fConst6;
23 double fRec1[4];
24 void connect(uint32_t port,void* data);
25 void clear_state_f();
26 void init(uint32_t samplingFreq);
27 void compute(int count, float *input0, float *input1, float *output0, float *output1);
28
29 static void clear_state_f_static(PluginLV2*);
30 static void init_static(uint32_t samplingFreq, PluginLV2*);
31 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
32 static void del_instance(PluginLV2 *p);
33 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
34 public:
35 Dsp();
36 ~Dsp();
37 };
38
39
40
41 Dsp::Dsp()
42 : PluginLV2() {
43 version = PLUGINLV2_VERSION;
44 id = "AC-15";
45 name = N_("AC-15");
46 mono_audio = 0;
47 stereo_audio = compute_static;
48 set_samplerate = init_static;
49 activate_plugin = 0;
50 connect_ports = connect_static;
51 clear_state = clear_state_f_static;
52 delete_instance = del_instance;
53 }
54
55 Dsp::~Dsp() {
56 }
57
58 inline void Dsp::clear_state_f()
59 {
60 for (int i=0; i<4; i++) fRec0[i] = 0;
61 for (int i=0; i<4; i++) fRec1[i] = 0;
62 }
63
64 void Dsp::clear_state_f_static(PluginLV2 *p)
65 {
66 static_cast<Dsp*>(p)->clear_state_f();
67 }
68
69 inline void Dsp::init(uint32_t samplingFreq)
70 {
71 fSamplingFreq = samplingFreq;
72 fConst0 = double(min(192000, max(1, fSamplingFreq)));
73 fConst1 = (2 * fConst0);
74 fConst2 = (1.0691560000000003e-08 * fConst1);
75 fConst3 = faustpower<2>(fConst1);
76 fConst4 = (3.2074680000000005e-08 * fConst1);
77 fConst5 = (3 * fConst1);
78 fConst6 = (0.044206800000000004 * fConst0);
79 clear_state_f();
80 }
81
82 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
83 {
84 static_cast<Dsp*>(p)->init(samplingFreq);
85 }
86
87 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
88 {
89 #define fslider0 (*fslider0_)
90 #define fslider1 (*fslider1_)
91 #define fslider2 (*fslider2_)
92 double fSlow0 = fslider0;
93 double fSlow1 = (0.00022854915600000004 * fSlow0);
94 double fSlow2 = exp((3.4 * (fslider1 - 1)));
95 double fSlow3 = (0.00010871476000000002 + ((0.00010719478000000002 * fSlow2) + (fSlow0 * ((0.00012621831200000002 + (0.00022854915600000004 * fSlow2)) - fSlow1))));
96 double fSlow4 = ((3.421299200000001e-08 * fSlow2) - (3.421299200000001e-08 * fSlow0));
97 double fSlow5 = (1.0 + (fSlow2 + (93531720.34763868 * (fSlow0 * (2.3521432000000005e-08 + fSlow4)))));
98 double fSlow6 = (fConst2 * fSlow5);
99 double fSlow7 = (fConst1 * (0.036906800000000003 + ((0.022103400000000002 * fSlow2) + (0.01034 * fSlow0))));
100 double fSlow8 = ((fSlow7 + (fConst3 * (fSlow6 - fSlow3))) - 1);
101 double fSlow9 = (fConst4 * fSlow5);
102 double fSlow10 = ((fConst3 * (fSlow3 + fSlow9)) - (3 + fSlow7));
103 double fSlow11 = ((fSlow7 + (fConst3 * (fSlow3 - fSlow9))) - 3);
104 double fSlow12 = (1.0 / ((fConst3 * (0 - (fSlow3 + fSlow6))) - (1 + fSlow7)));
105 double fSlow13 = fslider2;
106 double fSlow14 = ((fSlow0 * (3.421299200000001e-08 + fSlow4)) + (fSlow13 * ((1.0691560000000003e-08 * fSlow2) + (1.0691560000000003e-08 - (1.0691560000000003e-08 * fSlow0)))));
107 double fSlow15 = (fConst5 * fSlow14);
108 double fSlow16 = (3.7947800000000004e-06 + (((1.5199800000000001e-06 * fSlow13) + (fSlow0 * (0.00022961831200000004 - fSlow1))) + (fSlow2 * (3.7947800000000004e-06 + fSlow1))));
109 double fSlow17 = (1.0 + (fSlow2 + ((0.4678013337314621 * fSlow0) + (0.0046780133373146215 * fSlow13))));
110 double fSlow18 = (fConst6 * fSlow17);
111 double fSlow19 = (fSlow18 + (fConst3 * (fSlow16 - fSlow15)));
112 double fSlow20 = (fConst1 * fSlow14);
113 double fSlow21 = (fSlow18 + (fConst3 * (fSlow20 - fSlow16)));
114 double fSlow22 = (fConst1 * (0 - (0.022103400000000002 * fSlow17)));
115 double fSlow23 = (fSlow22 + (fConst3 * (fSlow16 + fSlow15)));
116 double fSlow24 = (fSlow22 - (fConst3 * (fSlow16 + fSlow20)));
117 for (int i=0; i<count; i++) {
118 fRec0[0] = ((double)input0[i] - (fSlow12 * (((fSlow11 * fRec0[2]) + (fSlow10 * fRec0[1])) + (fSlow8 * fRec0[3]))));
119 output0[i] = (FAUSTFLOAT)(fSlow12 * ((fSlow24 * fRec0[0]) + ((fSlow23 * fRec0[1]) + ((fSlow21 * fRec0[3]) + (fSlow19 * fRec0[2])))));
120 fRec1[0] = ((double)input1[i] - (fSlow12 * (((fSlow11 * fRec1[2]) + (fSlow10 * fRec1[1])) + (fSlow8 * fRec1[3]))));
121 output1[i] = (FAUSTFLOAT)(fSlow12 * ((fSlow24 * fRec1[0]) + ((fSlow23 * fRec1[1]) + ((fSlow21 * fRec1[3]) + (fSlow19 * fRec1[2])))));
122 // post processing
123 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
124 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
125 }
126 #undef fslider0
127 #undef fslider1
128 #undef fslider2
129 }
130
131 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
132 {
133 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
134 }
135
136
137 void Dsp::connect(uint32_t port,void* data)
138 {
139 switch ((PortIndex)port)
140 {
141 case TREBLE:
142 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
143 break;
144 case BASS:
145 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
146 break;
147 case MIDDLE:
148 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
149 break;
150 default:
151 break;
152 }
153 }
154
155 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
156 {
157 static_cast<Dsp*>(p)->connect(port, data);
158 }
159
160
161 PluginLV2 *plugin() {
162 return new Dsp();
163 }
164
165 void Dsp::del_instance(PluginLV2 *p)
166 {
167 delete static_cast<Dsp*>(p);
168 }
169
170 /*
171 typedef enum
172 {
173 TREBLE,
174 BASS,
175 MIDDLE,
176 } PortIndex;
177 */
178
179 } // end namespace tonestack_ac15_stereo
0 // generated from file '../src/LV2/faust/tonestack_ac30.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ac30 {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "AC-30";
40 name = N_("AC-30");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (4.851e-08 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (7.172000000000001e-07 + ((4.972000000000001e-05 * fSlow2) + (fSlow0 * (((4.8510000000000015e-06 * fSlow2) - 4.2449000000000006e-07) - fSlow1))));
86 double fSlow4 = ((2.6620000000000007e-10 * fSlow2) - (2.662e-12 * fSlow0));
87 double fSlow5 = (2.4200000000000003e-09 * fSlow2);
88 double fSlow6 = (2.4200000000000004e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.1538000000000003e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00022 * fSlow0);
91 double fSlow9 = (0.022050000000000004 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0046705 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (2.662e-12 + fSlow4)) + (fSlow16 * (fSlow5 + (2.4200000000000004e-11 - (2.4200000000000004e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (1.32e-08 + (((2.2000000000000004e-07 * fSlow16) + (fSlow0 * (5.951000000000001e-08 - fSlow1))) + (fSlow2 * (1.32e-06 + (4.8510000000000015e-06 * fSlow0)))));
102 double fSlow20 = (0.00022050000000000002 + (fSlow9 + (fSlow8 + (5e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_ac30
0 // generated from file '../src/LV2/faust/tonestack_ac30_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ac30_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "AC-30";
41 name = N_("AC-30");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (4.851e-08 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (7.172000000000001e-07 + ((4.972000000000001e-05 * fSlow2) + (fSlow0 * (((4.8510000000000015e-06 * fSlow2) - 4.2449000000000006e-07) - fSlow1))));
88 double fSlow4 = ((2.6620000000000007e-10 * fSlow2) - (2.662e-12 * fSlow0));
89 double fSlow5 = (2.4200000000000003e-09 * fSlow2);
90 double fSlow6 = (2.4200000000000004e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.1538000000000003e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00022 * fSlow0);
93 double fSlow9 = (0.022050000000000004 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0046705 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (2.662e-12 + fSlow4)) + (fSlow16 * (fSlow5 + (2.4200000000000004e-11 - (2.4200000000000004e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (1.32e-08 + (((2.2000000000000004e-07 * fSlow16) + (fSlow0 * (5.951000000000001e-08 - fSlow1))) + (fSlow2 * (1.32e-06 + (4.8510000000000015e-06 * fSlow0)))));
104 double fSlow20 = (0.00022050000000000002 + (fSlow9 + (fSlow8 + (5e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_ac30_stereo
0 // generated from file '../src/LV2/faust/tonestack_ampeg.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ampeg {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Ampeg";
40 name = N_("Ampeg");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (3.0896250000000005e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (6.338090000000001e-07 + ((1.8734760000000003e-05 * fSlow2) + (fSlow0 * (((1.2358500000000002e-05 * fSlow2) - 1.361249999999999e-08) - fSlow1))));
86 double fSlow4 = ((1.6037340000000005e-09 * fSlow2) - (4.0093350000000015e-11 * fSlow0));
87 double fSlow5 = (1.8198400000000004e-09 * fSlow2);
88 double fSlow6 = (4.5496000000000015e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 5.40265e-12))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00055 * fSlow0);
91 double fSlow9 = (0.022470000000000004 * fSlow2);
92 double fSlow10 = (fConst0 * (0.00208725 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (4.0093350000000015e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.5496000000000015e-11 - (4.5496000000000015e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (8.1169e-08 + (((1.6544000000000003e-07 * fSlow16) + (fSlow0 * (3.735875000000001e-07 - fSlow1))) + (fSlow2 * (3.24676e-06 + (1.2358500000000002e-05 * fSlow0)))));
102 double fSlow20 = (0.0005617500000000001 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_ampeg
0 // generated from file '../src/LV2/faust/tonestack_ampeg_rev.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ampeg_rev {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Rev.Rocket";
40 name = N_("Rev.Rocket");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (4.7047000000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (5.107200000000001e-06 + ((0.00011849250000000002 * fSlow2) + (fSlow0 * (((1.1761750000000001e-05 * fSlow2) - 4.217780000000001e-06) - fSlow1))));
86 double fSlow4 = ((4.1125e-10 * fSlow2) - (1.645e-11 * fSlow0));
87 double fSlow5 = (2.9375000000000002e-09 * fSlow2);
88 double fSlow6 = (1.175e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 1.0105e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00047000000000000004 * fSlow0);
91 double fSlow9 = (0.025025000000000002 * fSlow2);
92 double fSlow10 = (fConst0 * (0.015726 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.645e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (1.175e-10 - (1.175e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (3.9700000000000005e-08 + (((3.675000000000001e-07 * fSlow16) + (fSlow0 * (4.8222e-07 - fSlow1))) + (fSlow2 * (9.925e-07 + (1.1761750000000001e-05 * fSlow0)))));
102 double fSlow20 = (0.001001 + (fSlow9 + (fSlow8 + (2.5e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_ampeg_rev
0 // generated from file '../src/LV2/faust/tonestack_ampeg_rev_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ampeg_rev_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Rev.Rocket";
41 name = N_("Rev.Rocket");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (4.7047000000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (5.107200000000001e-06 + ((0.00011849250000000002 * fSlow2) + (fSlow0 * (((1.1761750000000001e-05 * fSlow2) - 4.217780000000001e-06) - fSlow1))));
88 double fSlow4 = ((4.1125e-10 * fSlow2) - (1.645e-11 * fSlow0));
89 double fSlow5 = (2.9375000000000002e-09 * fSlow2);
90 double fSlow6 = (1.175e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 1.0105e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00047000000000000004 * fSlow0);
93 double fSlow9 = (0.025025000000000002 * fSlow2);
94 double fSlow10 = (fConst0 * (0.015726 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.645e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (1.175e-10 - (1.175e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (3.9700000000000005e-08 + (((3.675000000000001e-07 * fSlow16) + (fSlow0 * (4.8222e-07 - fSlow1))) + (fSlow2 * (9.925e-07 + (1.1761750000000001e-05 * fSlow0)))));
104 double fSlow20 = (0.001001 + (fSlow9 + (fSlow8 + (2.5e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_ampeg_rev_stereo
0 // generated from file '../src/LV2/faust/tonestack_ampeg_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ampeg_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Ampeg";
41 name = N_("Ampeg");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (3.0896250000000005e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (6.338090000000001e-07 + ((1.8734760000000003e-05 * fSlow2) + (fSlow0 * (((1.2358500000000002e-05 * fSlow2) - 1.361249999999999e-08) - fSlow1))));
88 double fSlow4 = ((1.6037340000000005e-09 * fSlow2) - (4.0093350000000015e-11 * fSlow0));
89 double fSlow5 = (1.8198400000000004e-09 * fSlow2);
90 double fSlow6 = (4.5496000000000015e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 5.40265e-12))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00055 * fSlow0);
93 double fSlow9 = (0.022470000000000004 * fSlow2);
94 double fSlow10 = (fConst0 * (0.00208725 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (4.0093350000000015e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.5496000000000015e-11 - (4.5496000000000015e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (8.1169e-08 + (((1.6544000000000003e-07 * fSlow16) + (fSlow0 * (3.735875000000001e-07 - fSlow1))) + (fSlow2 * (3.24676e-06 + (1.2358500000000002e-05 * fSlow0)))));
104 double fSlow20 = (0.0005617500000000001 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_ampeg_stereo
0 // generated from file '../src/LV2/faust/tonestack_bassman.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_bassman {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Bassman";
40 name = N_("Bassman");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (2.5312500000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (7.4525e-07 + ((2.4210000000000004e-05 * fSlow2) + (fSlow0 * (((1.0125e-05 * fSlow2) - 2.75625e-07) - fSlow1))));
86 double fSlow4 = ((7.650000000000002e-10 * fSlow2) - (1.9125000000000002e-11 * fSlow0));
87 double fSlow5 = (1.4000000000000001e-09 * fSlow2);
88 double fSlow6 = (3.500000000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 1.5875000000000007e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.0005 * fSlow0);
91 double fSlow9 = (0.02025 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0028087500000000005 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.9125000000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (3.500000000000001e-11 - (3.500000000000001e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (4.525e-08 + (((1.4e-07 * fSlow16) + (fSlow0 * (2.8437500000000003e-07 - fSlow1))) + (fSlow2 * (1.8100000000000002e-06 + (1.0125e-05 * fSlow0)))));
102 double fSlow20 = (0.00050625 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_bassman
0 // generated from file '../src/LV2/faust/tonestack_bassman_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_bassman_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Bassman";
41 name = N_("Bassman");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (2.5312500000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (7.4525e-07 + ((2.4210000000000004e-05 * fSlow2) + (fSlow0 * (((1.0125e-05 * fSlow2) - 2.75625e-07) - fSlow1))));
88 double fSlow4 = ((7.650000000000002e-10 * fSlow2) - (1.9125000000000002e-11 * fSlow0));
89 double fSlow5 = (1.4000000000000001e-09 * fSlow2);
90 double fSlow6 = (3.500000000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 1.5875000000000007e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.0005 * fSlow0);
93 double fSlow9 = (0.02025 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0028087500000000005 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.9125000000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (3.500000000000001e-11 - (3.500000000000001e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (4.525e-08 + (((1.4e-07 * fSlow16) + (fSlow0 * (2.8437500000000003e-07 - fSlow1))) + (fSlow2 * (1.8100000000000002e-06 + (1.0125e-05 * fSlow0)))));
104 double fSlow20 = (0.00050625 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_bassman_stereo
0 // generated from file '../src/LV2/faust/tonestack_bogner.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_bogner {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Triple Giant";
40 name = N_("Triple Giant");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (7.790052600000002e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (1.4106061200000003e-06 + ((3.7475640000000014e-05 * fSlow2) + (fSlow0 * (((2.3606220000000006e-05 * fSlow2) - 3.2220474e-07) - fSlow1))));
86 double fSlow4 = ((1.5406083e-09 * fSlow2) - (5.08400739e-11 * fSlow0));
87 double fSlow5 = (1.9775250000000004e-09 * fSlow2);
88 double fSlow6 = (6.5258325e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 1.4418251099999996e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.001551 * fSlow0);
91 double fSlow9 = (0.015220000000000001 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0037192600000000003 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (5.08400739e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (6.5258325e-11 - (6.5258325e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (5.018112e-08 + (((1.7391e-07 * fSlow16) + (fSlow0 * (8.643102600000002e-07 - fSlow1))) + (fSlow2 * (1.5206400000000001e-06 + (2.3606220000000006e-05 * fSlow0)))));
102 double fSlow20 = (0.0005022600000000001 + (fSlow9 + (fSlow8 + (5.4999999999999995e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_bogner
0 // generated from file '../src/LV2/faust/tonestack_bogner_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_bogner_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Triple Giant";
41 name = N_("Triple Giant");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (7.790052600000002e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (1.4106061200000003e-06 + ((3.7475640000000014e-05 * fSlow2) + (fSlow0 * (((2.3606220000000006e-05 * fSlow2) - 3.2220474e-07) - fSlow1))));
88 double fSlow4 = ((1.5406083e-09 * fSlow2) - (5.08400739e-11 * fSlow0));
89 double fSlow5 = (1.9775250000000004e-09 * fSlow2);
90 double fSlow6 = (6.5258325e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 1.4418251099999996e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.001551 * fSlow0);
93 double fSlow9 = (0.015220000000000001 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0037192600000000003 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (5.08400739e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (6.5258325e-11 - (6.5258325e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (5.018112e-08 + (((1.7391e-07 * fSlow16) + (fSlow0 * (8.643102600000002e-07 - fSlow1))) + (fSlow2 * (1.5206400000000001e-06 + (2.3606220000000006e-05 * fSlow0)))));
104 double fSlow20 = (0.0005022600000000001 + (fSlow9 + (fSlow8 + (5.4999999999999995e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_bogner_stereo
0 // generated from file '../src/LV2/faust/tonestack_crunch.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_crunch {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Hughes&Kettner";
40 name = N_("Hughes&Kettner");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (2.2193400000000003e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (2.7073879999999998e-06 + ((4.9553415999999996e-05 * fSlow2) + (fSlow0 * (((4.882548000000001e-06 * fSlow2) - 1.964318e-06) - fSlow1))));
86 double fSlow4 = ((3.4212992000000004e-10 * fSlow2) - (1.5551360000000004e-11 * fSlow0));
87 double fSlow5 = (2.3521432000000003e-09 * fSlow2);
88 double fSlow6 = (1.0691560000000001e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 9.136424e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00047000000000000004 * fSlow0);
91 double fSlow9 = (0.0103884 * fSlow2);
92 double fSlow10 = (fConst0 * (0.009920600000000002 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.5551360000000004e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (1.0691560000000001e-10 - (1.0691560000000001e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (4.3428e-08 + (((4.5496e-07 * fSlow16) + (fSlow0 * (2.4468200000000005e-07 - fSlow1))) + (fSlow2 * (9.55416e-07 + (4.882548000000001e-06 * fSlow0)))));
102 double fSlow20 = (0.00047220000000000004 + (fSlow9 + (fSlow8 + (4.84e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_crunch
0 // generated from file '../src/LV2/faust/tonestack_crunch_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_crunch_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Hughes&Kettner";
41 name = N_("Hughes&Kettner");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (2.2193400000000003e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (2.7073879999999998e-06 + ((4.9553415999999996e-05 * fSlow2) + (fSlow0 * (((4.882548000000001e-06 * fSlow2) - 1.964318e-06) - fSlow1))));
88 double fSlow4 = ((3.4212992000000004e-10 * fSlow2) - (1.5551360000000004e-11 * fSlow0));
89 double fSlow5 = (2.3521432000000003e-09 * fSlow2);
90 double fSlow6 = (1.0691560000000001e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 9.136424e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00047000000000000004 * fSlow0);
93 double fSlow9 = (0.0103884 * fSlow2);
94 double fSlow10 = (fConst0 * (0.009920600000000002 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.5551360000000004e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (1.0691560000000001e-10 - (1.0691560000000001e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (4.3428e-08 + (((4.5496e-07 * fSlow16) + (fSlow0 * (2.4468200000000005e-07 - fSlow1))) + (fSlow2 * (9.55416e-07 + (4.882548000000001e-06 * fSlow0)))));
104 double fSlow20 = (0.00047220000000000004 + (fSlow9 + (fSlow8 + (4.84e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_crunch_stereo
0 // generated from file '../src/LV2/faust/tonestack_default.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_default {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider2;
21 FAUSTFLOAT *fslider2_;
22 double fVec0[3];
23 double fRec3[3];
24 double fRec2[3];
25 double fRec1[3];
26 double fRec0[3];
27 void connect(uint32_t port,void* data);
28 void clear_state_f();
29 void init(uint32_t samplingFreq);
30 void compute(int count, float *input0, float *output0);
31
32 static void clear_state_f_static(PluginLV2*);
33 static void init_static(uint32_t samplingFreq, PluginLV2*);
34 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
35 static void del_instance(PluginLV2 *p);
36 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
37 public:
38 Dsp();
39 ~Dsp();
40 };
41
42
43
44 Dsp::Dsp()
45 : PluginLV2() {
46 version = PLUGINLV2_VERSION;
47 id = "default";
48 name = N_("default");
49 mono_audio = compute_static;
50 stereo_audio = 0;
51 set_samplerate = init_static;
52 activate_plugin = 0;
53 connect_ports = connect_static;
54 clear_state = clear_state_f_static;
55 delete_instance = del_instance;
56 }
57
58 Dsp::~Dsp() {
59 }
60
61 inline void Dsp::clear_state_f()
62 {
63 for (int i=0; i<3; i++) fVec0[i] = 0;
64 for (int i=0; i<3; i++) fRec3[i] = 0;
65 for (int i=0; i<3; i++) fRec2[i] = 0;
66 for (int i=0; i<3; i++) fRec1[i] = 0;
67 for (int i=0; i<3; i++) fRec0[i] = 0;
68 }
69
70 void Dsp::clear_state_f_static(PluginLV2 *p)
71 {
72 static_cast<Dsp*>(p)->clear_state_f();
73 }
74
75 inline void Dsp::init(uint32_t samplingFreq)
76 {
77 fSamplingFreq = samplingFreq;
78 iConst0 = min(192000, max(1, fSamplingFreq));
79 fConst1 = (15079.644737231007 / iConst0);
80 fConst2 = cos(fConst1);
81 fConst3 = (1.4142135623730951 * sin(fConst1));
82 fConst4 = (3769.9111843077517 / iConst0);
83 fConst5 = cos(fConst4);
84 fConst6 = (1.4142135623730951 * sin(fConst4));
85 clear_state_f();
86 }
87
88 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
89 {
90 static_cast<Dsp*>(p)->init(samplingFreq);
91 }
92
93 inline void Dsp::compute(int count, float *input0, float *output0)
94 {
95 #define fslider0 (*fslider0_)
96 #define fslider1 (*fslider1_)
97 #define fslider2 (*fslider2_)
98 double fSlow0 = (fslider0 - 0.5);
99 double fSlow1 = (10 * fSlow0);
100 double fSlow2 = pow(10,(0.025 * ((20 * (fslider1 - 0.5)) - fSlow1)));
101 double fSlow3 = (1 + fSlow2);
102 double fSlow4 = (fConst2 * fSlow3);
103 double fSlow5 = (2 * (0 - ((1 + fSlow4) - fSlow2)));
104 double fSlow6 = (fConst2 * (fSlow2 - 1));
105 double fSlow7 = (fConst3 * sqrt(fSlow2));
106 double fSlow8 = (fSlow3 - (fSlow7 + fSlow6));
107 double fSlow9 = pow(10,(0.25 * fSlow0));
108 double fSlow10 = (1 + fSlow9);
109 double fSlow11 = (fConst5 * fSlow10);
110 double fSlow12 = (2 * (0 - ((1 + fSlow11) - fSlow9)));
111 double fSlow13 = (fSlow9 - 1);
112 double fSlow14 = (fConst5 * fSlow13);
113 double fSlow15 = sqrt(fSlow9);
114 double fSlow16 = (fConst6 * fSlow15);
115 double fSlow17 = (fSlow10 - (fSlow16 + fSlow14));
116 double fSlow18 = (fConst2 * fSlow10);
117 double fSlow19 = (0 - (2 * ((fSlow9 + fSlow18) - 1)));
118 double fSlow20 = (fConst3 * fSlow15);
119 double fSlow21 = (fConst2 * fSlow13);
120 double fSlow22 = ((1 + (fSlow9 + fSlow21)) - fSlow20);
121 double fSlow23 = pow(10,(0.025 * ((20 * (exp((3.4 * (fslider2 - 1))) - 0.5)) - fSlow1)));
122 double fSlow24 = (1 + fSlow23);
123 double fSlow25 = (fConst5 * fSlow24);
124 double fSlow26 = (0 - (2 * ((fSlow23 + fSlow25) - 1)));
125 double fSlow27 = (fConst6 * sqrt(fSlow23));
126 double fSlow28 = (fConst5 * (fSlow23 - 1));
127 double fSlow29 = ((1 + (fSlow23 + fSlow28)) - fSlow27);
128 double fSlow30 = (fSlow24 - (fSlow27 + fSlow28));
129 double fSlow31 = (2 * (0 - ((1 + fSlow25) - fSlow23)));
130 double fSlow32 = (fSlow23 + fSlow27);
131 double fSlow33 = ((1 + fSlow32) - fSlow28);
132 double fSlow34 = (1.0 / (1 + (fSlow28 + fSlow32)));
133 double fSlow35 = (fSlow10 - (fSlow20 + fSlow21));
134 double fSlow36 = (2 * (0 - ((1 + fSlow18) - fSlow9)));
135 double fSlow37 = (fSlow9 + fSlow20);
136 double fSlow38 = ((1 + fSlow37) - fSlow21);
137 double fSlow39 = (1.0 / (1 + (fSlow21 + fSlow37)));
138 double fSlow40 = (fSlow9 * ((1 + (fSlow9 + fSlow14)) - fSlow16));
139 double fSlow41 = (fSlow9 + fSlow16);
140 double fSlow42 = (fSlow9 * (1 + (fSlow14 + fSlow41)));
141 double fSlow43 = (((fSlow9 + fSlow11) - 1) * (0 - (2 * fSlow9)));
142 double fSlow44 = (1.0 / ((1 + fSlow41) - fSlow14));
143 double fSlow45 = (fSlow2 * ((1 + (fSlow2 + fSlow6)) - fSlow7));
144 double fSlow46 = (fSlow2 + fSlow7);
145 double fSlow47 = (fSlow2 * (1 + (fSlow6 + fSlow46)));
146 double fSlow48 = (((fSlow2 + fSlow4) - 1) * (0 - (2 * fSlow2)));
147 double fSlow49 = (1.0 / ((1 + fSlow46) - fSlow6));
148 for (int i=0; i<count; i++) {
149 double fTemp0 = (double)input0[i];
150 fVec0[0] = fTemp0;
151 fRec3[0] = (fSlow34 * ((fSlow23 * (((fSlow33 * fVec0[0]) + (fSlow31 * fVec0[1])) + (fSlow30 * fVec0[2]))) - ((fSlow29 * fRec3[2]) + (fSlow26 * fRec3[1]))));
152 fRec2[0] = (fSlow39 * ((fSlow9 * (((fSlow38 * fRec3[0]) + (fSlow36 * fRec3[1])) + (fSlow35 * fRec3[2]))) - ((fSlow22 * fRec2[2]) + (fSlow19 * fRec2[1]))));
153 fRec1[0] = (fSlow44 * ((((fSlow43 * fRec2[1]) + (fSlow42 * fRec2[0])) + (fSlow40 * fRec2[2])) + (0 - ((fSlow17 * fRec1[2]) + (fSlow12 * fRec1[1])))));
154 fRec0[0] = (fSlow49 * ((((fSlow48 * fRec1[1]) + (fSlow47 * fRec1[0])) + (fSlow45 * fRec1[2])) + (0 - ((fSlow8 * fRec0[2]) + (fSlow5 * fRec0[1])))));
155 output0[i] = (FAUSTFLOAT)fRec0[0];
156 // post processing
157 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
158 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
159 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
160 fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
161 fVec0[2] = fVec0[1]; fVec0[1] = fVec0[0];
162 }
163 #undef fslider0
164 #undef fslider1
165 #undef fslider2
166 }
167
168 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
169 {
170 static_cast<Dsp*>(p)->compute(count, input0, output0);
171 }
172
173
174 void Dsp::connect(uint32_t port,void* data)
175 {
176 switch ((PortIndex)port)
177 {
178 case BASS:
179 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
180 break;
181 case TREBLE:
182 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
183 break;
184 case MIDDLE:
185 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
186 break;
187 default:
188 break;
189 }
190 }
191
192 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
193 {
194 static_cast<Dsp*>(p)->connect(port, data);
195 }
196
197
198 PluginLV2 *plugin() {
199 return new Dsp();
200 }
201
202 void Dsp::del_instance(PluginLV2 *p)
203 {
204 delete static_cast<Dsp*>(p);
205 }
206
207 /*
208 typedef enum
209 {
210 BASS,
211 TREBLE,
212 MIDDLE,
213 } PortIndex;
214 */
215
216 } // end namespace tonestack_default
0 // generated from file '../src/LV2/faust/tonestack_default_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_default_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 int iConst0;
14 double fConst1;
15 double fConst2;
16 double fConst3;
17 double fConst4;
18 double fConst5;
19 double fConst6;
20 FAUSTFLOAT fslider2;
21 FAUSTFLOAT *fslider2_;
22 double fVec0[3];
23 double fRec3[3];
24 double fRec2[3];
25 double fRec1[3];
26 double fRec0[3];
27 double fVec1[3];
28 double fRec7[3];
29 double fRec6[3];
30 double fRec5[3];
31 double fRec4[3];
32 void connect(uint32_t port,void* data);
33 void clear_state_f();
34 void init(uint32_t samplingFreq);
35 void compute(int count, float *input0, float *input1, float *output0, float *output1);
36
37 static void clear_state_f_static(PluginLV2*);
38 static void init_static(uint32_t samplingFreq, PluginLV2*);
39 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
40 static void del_instance(PluginLV2 *p);
41 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
42 public:
43 Dsp();
44 ~Dsp();
45 };
46
47
48
49 Dsp::Dsp()
50 : PluginLV2() {
51 version = PLUGINLV2_VERSION;
52 id = "default";
53 name = N_("default");
54 mono_audio = 0;
55 stereo_audio = compute_static;
56 set_samplerate = init_static;
57 activate_plugin = 0;
58 connect_ports = connect_static;
59 clear_state = clear_state_f_static;
60 delete_instance = del_instance;
61 }
62
63 Dsp::~Dsp() {
64 }
65
66 inline void Dsp::clear_state_f()
67 {
68 for (int i=0; i<3; i++) fVec0[i] = 0;
69 for (int i=0; i<3; i++) fRec3[i] = 0;
70 for (int i=0; i<3; i++) fRec2[i] = 0;
71 for (int i=0; i<3; i++) fRec1[i] = 0;
72 for (int i=0; i<3; i++) fRec0[i] = 0;
73 for (int i=0; i<3; i++) fVec1[i] = 0;
74 for (int i=0; i<3; i++) fRec7[i] = 0;
75 for (int i=0; i<3; i++) fRec6[i] = 0;
76 for (int i=0; i<3; i++) fRec5[i] = 0;
77 for (int i=0; i<3; i++) fRec4[i] = 0;
78 }
79
80 void Dsp::clear_state_f_static(PluginLV2 *p)
81 {
82 static_cast<Dsp*>(p)->clear_state_f();
83 }
84
85 inline void Dsp::init(uint32_t samplingFreq)
86 {
87 fSamplingFreq = samplingFreq;
88 iConst0 = min(192000, max(1, fSamplingFreq));
89 fConst1 = (15079.644737231007 / iConst0);
90 fConst2 = cos(fConst1);
91 fConst3 = (1.4142135623730951 * sin(fConst1));
92 fConst4 = (3769.9111843077517 / iConst0);
93 fConst5 = cos(fConst4);
94 fConst6 = (1.4142135623730951 * sin(fConst4));
95 clear_state_f();
96 }
97
98 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
99 {
100 static_cast<Dsp*>(p)->init(samplingFreq);
101 }
102
103 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
104 {
105 #define fslider0 (*fslider0_)
106 #define fslider1 (*fslider1_)
107 #define fslider2 (*fslider2_)
108 double fSlow0 = (fslider0 - 0.5);
109 double fSlow1 = (10 * fSlow0);
110 double fSlow2 = pow(10,(0.025 * ((20 * (fslider1 - 0.5)) - fSlow1)));
111 double fSlow3 = (1 + fSlow2);
112 double fSlow4 = (fConst2 * fSlow3);
113 double fSlow5 = (2 * (0 - ((1 + fSlow4) - fSlow2)));
114 double fSlow6 = (fConst2 * (fSlow2 - 1));
115 double fSlow7 = (fConst3 * sqrt(fSlow2));
116 double fSlow8 = (fSlow3 - (fSlow7 + fSlow6));
117 double fSlow9 = pow(10,(0.25 * fSlow0));
118 double fSlow10 = (1 + fSlow9);
119 double fSlow11 = (fConst5 * fSlow10);
120 double fSlow12 = (2 * (0 - ((1 + fSlow11) - fSlow9)));
121 double fSlow13 = (fSlow9 - 1);
122 double fSlow14 = (fConst5 * fSlow13);
123 double fSlow15 = sqrt(fSlow9);
124 double fSlow16 = (fConst6 * fSlow15);
125 double fSlow17 = (fSlow10 - (fSlow16 + fSlow14));
126 double fSlow18 = (fConst2 * fSlow10);
127 double fSlow19 = (0 - (2 * ((fSlow9 + fSlow18) - 1)));
128 double fSlow20 = (fConst3 * fSlow15);
129 double fSlow21 = (fConst2 * fSlow13);
130 double fSlow22 = ((1 + (fSlow9 + fSlow21)) - fSlow20);
131 double fSlow23 = pow(10,(0.025 * ((20 * (exp((3.4 * (fslider2 - 1))) - 0.5)) - fSlow1)));
132 double fSlow24 = (1 + fSlow23);
133 double fSlow25 = (fConst5 * fSlow24);
134 double fSlow26 = (0 - (2 * ((fSlow23 + fSlow25) - 1)));
135 double fSlow27 = (fConst6 * sqrt(fSlow23));
136 double fSlow28 = (fConst5 * (fSlow23 - 1));
137 double fSlow29 = ((1 + (fSlow23 + fSlow28)) - fSlow27);
138 double fSlow30 = (fSlow24 - (fSlow27 + fSlow28));
139 double fSlow31 = (2 * (0 - ((1 + fSlow25) - fSlow23)));
140 double fSlow32 = (fSlow23 + fSlow27);
141 double fSlow33 = ((1 + fSlow32) - fSlow28);
142 double fSlow34 = (1.0 / (1 + (fSlow28 + fSlow32)));
143 double fSlow35 = (fSlow10 - (fSlow20 + fSlow21));
144 double fSlow36 = (2 * (0 - ((1 + fSlow18) - fSlow9)));
145 double fSlow37 = (fSlow9 + fSlow20);
146 double fSlow38 = ((1 + fSlow37) - fSlow21);
147 double fSlow39 = (1.0 / (1 + (fSlow21 + fSlow37)));
148 double fSlow40 = (fSlow9 * ((1 + (fSlow9 + fSlow14)) - fSlow16));
149 double fSlow41 = (fSlow9 + fSlow16);
150 double fSlow42 = (fSlow9 * (1 + (fSlow14 + fSlow41)));
151 double fSlow43 = (((fSlow9 + fSlow11) - 1) * (0 - (2 * fSlow9)));
152 double fSlow44 = (1.0 / ((1 + fSlow41) - fSlow14));
153 double fSlow45 = (fSlow2 * ((1 + (fSlow2 + fSlow6)) - fSlow7));
154 double fSlow46 = (fSlow2 + fSlow7);
155 double fSlow47 = (fSlow2 * (1 + (fSlow6 + fSlow46)));
156 double fSlow48 = (((fSlow2 + fSlow4) - 1) * (0 - (2 * fSlow2)));
157 double fSlow49 = (1.0 / ((1 + fSlow46) - fSlow6));
158 for (int i=0; i<count; i++) {
159 double fTemp0 = (double)input0[i];
160 fVec0[0] = fTemp0;
161 fRec3[0] = (fSlow34 * ((fSlow23 * (((fSlow33 * fVec0[0]) + (fSlow31 * fVec0[1])) + (fSlow30 * fVec0[2]))) - ((fSlow29 * fRec3[2]) + (fSlow26 * fRec3[1]))));
162 fRec2[0] = (fSlow39 * ((fSlow9 * (((fSlow38 * fRec3[0]) + (fSlow36 * fRec3[1])) + (fSlow35 * fRec3[2]))) - ((fSlow22 * fRec2[2]) + (fSlow19 * fRec2[1]))));
163 fRec1[0] = (fSlow44 * ((((fSlow43 * fRec2[1]) + (fSlow42 * fRec2[0])) + (fSlow40 * fRec2[2])) + (0 - ((fSlow17 * fRec1[2]) + (fSlow12 * fRec1[1])))));
164 fRec0[0] = (fSlow49 * ((((fSlow48 * fRec1[1]) + (fSlow47 * fRec1[0])) + (fSlow45 * fRec1[2])) + (0 - ((fSlow8 * fRec0[2]) + (fSlow5 * fRec0[1])))));
165 output0[i] = (FAUSTFLOAT)fRec0[0];
166 double fTemp1 = (double)input1[i];
167 fVec1[0] = fTemp1;
168 fRec7[0] = (fSlow34 * ((fSlow23 * (((fSlow33 * fVec1[0]) + (fSlow31 * fVec1[1])) + (fSlow30 * fVec1[2]))) - ((fSlow29 * fRec7[2]) + (fSlow26 * fRec7[1]))));
169 fRec6[0] = (fSlow39 * ((fSlow9 * (((fSlow38 * fRec7[0]) + (fSlow36 * fRec7[1])) + (fSlow35 * fRec7[2]))) - ((fSlow22 * fRec6[2]) + (fSlow19 * fRec6[1]))));
170 fRec5[0] = (fSlow44 * ((((fSlow43 * fRec6[1]) + (fSlow42 * fRec6[0])) + (fSlow40 * fRec6[2])) + (0 - ((fSlow17 * fRec5[2]) + (fSlow12 * fRec5[1])))));
171 fRec4[0] = (fSlow49 * ((((fSlow48 * fRec5[1]) + (fSlow47 * fRec5[0])) + (fSlow45 * fRec5[2])) + (0 - ((fSlow8 * fRec4[2]) + (fSlow5 * fRec4[1])))));
172 output1[i] = (FAUSTFLOAT)fRec4[0];
173 // post processing
174 fRec4[2] = fRec4[1]; fRec4[1] = fRec4[0];
175 fRec5[2] = fRec5[1]; fRec5[1] = fRec5[0];
176 fRec6[2] = fRec6[1]; fRec6[1] = fRec6[0];
177 fRec7[2] = fRec7[1]; fRec7[1] = fRec7[0];
178 fVec1[2] = fVec1[1]; fVec1[1] = fVec1[0];
179 fRec0[2] = fRec0[1]; fRec0[1] = fRec0[0];
180 fRec1[2] = fRec1[1]; fRec1[1] = fRec1[0];
181 fRec2[2] = fRec2[1]; fRec2[1] = fRec2[0];
182 fRec3[2] = fRec3[1]; fRec3[1] = fRec3[0];
183 fVec0[2] = fVec0[1]; fVec0[1] = fVec0[0];
184 }
185 #undef fslider0
186 #undef fslider1
187 #undef fslider2
188 }
189
190 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
191 {
192 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
193 }
194
195
196 void Dsp::connect(uint32_t port,void* data)
197 {
198 switch ((PortIndex)port)
199 {
200 case BASS:
201 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
202 break;
203 case TREBLE:
204 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
205 break;
206 case MIDDLE:
207 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
208 break;
209 default:
210 break;
211 }
212 }
213
214 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
215 {
216 static_cast<Dsp*>(p)->connect(port, data);
217 }
218
219
220 PluginLV2 *plugin() {
221 return new Dsp();
222 }
223
224 void Dsp::del_instance(PluginLV2 *p)
225 {
226 delete static_cast<Dsp*>(p);
227 }
228
229 /*
230 typedef enum
231 {
232 BASS,
233 TREBLE,
234 MIDDLE,
235 } PortIndex;
236 */
237
238 } // end namespace tonestack_default_stereo
0 // generated from file '../src/LV2/faust/tonestack_fender_blues.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_fender_blues {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Junior";
40 name = N_("Junior");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (3.059375000000001e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (1.5468750000000003e-06 + ((1.2718750000000003e-05 * fSlow2) + (fSlow0 * (((3.0593750000000007e-06 * fSlow2) - 8.696875000000003e-07) - fSlow1))));
86 double fSlow4 = ((2.646875e-10 * fSlow2) - (2.6468750000000002e-11 * fSlow0));
87 double fSlow5 = (7.5625e-10 * fSlow2);
88 double fSlow6 = (7.562500000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.915625000000001e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00055 * fSlow0);
91 double fSlow9 = (0.005562500000000001 * fSlow2);
92 double fSlow10 = (fConst0 * (0.005018750000000001 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (2.6468750000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (7.562500000000001e-11 - (7.562500000000001e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (6.1875e-08 + (((2.75e-07 * fSlow16) + (fSlow0 * (3.403125000000001e-07 - fSlow1))) + (fSlow2 * (6.1875e-07 + (3.0593750000000007e-06 * fSlow0)))));
102 double fSlow20 = (0.00055625 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_fender_blues
0 // generated from file '../src/LV2/faust/tonestack_fender_blues_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_fender_blues_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Junior";
41 name = N_("Junior");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (3.059375000000001e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (1.5468750000000003e-06 + ((1.2718750000000003e-05 * fSlow2) + (fSlow0 * (((3.0593750000000007e-06 * fSlow2) - 8.696875000000003e-07) - fSlow1))));
88 double fSlow4 = ((2.646875e-10 * fSlow2) - (2.6468750000000002e-11 * fSlow0));
89 double fSlow5 = (7.5625e-10 * fSlow2);
90 double fSlow6 = (7.562500000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.915625000000001e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00055 * fSlow0);
93 double fSlow9 = (0.005562500000000001 * fSlow2);
94 double fSlow10 = (fConst0 * (0.005018750000000001 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (2.6468750000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (7.562500000000001e-11 - (7.562500000000001e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (6.1875e-08 + (((2.75e-07 * fSlow16) + (fSlow0 * (3.403125000000001e-07 - fSlow1))) + (fSlow2 * (6.1875e-07 + (3.0593750000000007e-06 * fSlow0)))));
104 double fSlow20 = (0.00055625 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_fender_blues_stereo
0 // generated from file '../src/LV2/faust/tonestack_fender_default.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_fender_default {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Fender";
40 name = N_("Fender");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (4.7117500000000004e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (5.718000000000001e-06 + ((0.00011998125000000002 * fSlow2) + (fSlow0 * (((1.1779375000000001e-05 * fSlow2) - 4.199450000000001e-06) - fSlow1))));
86 double fSlow4 = ((1.0281250000000001e-09 * fSlow2) - (4.1125e-11 * fSlow0));
87 double fSlow5 = (7.343750000000001e-09 * fSlow2);
88 double fSlow6 = (2.9375e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 2.52625e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00047000000000000004 * fSlow0);
91 double fSlow9 = (0.0250625 * fSlow2);
92 double fSlow10 = (fConst0 * (0.015765 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (4.1125e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (2.9375e-10 - (2.9375e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (9.925e-08 + (((9.187500000000001e-07 * fSlow16) + (fSlow0 * (5.0055e-07 - fSlow1))) + (fSlow2 * (2.48125e-06 + (1.1779375000000001e-05 * fSlow0)))));
102 double fSlow20 = (0.0010025 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_fender_default
0 // generated from file '../src/LV2/faust/tonestack_fender_default_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_fender_default_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Fender";
41 name = N_("Fender");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (4.7117500000000004e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (5.718000000000001e-06 + ((0.00011998125000000002 * fSlow2) + (fSlow0 * (((1.1779375000000001e-05 * fSlow2) - 4.199450000000001e-06) - fSlow1))));
88 double fSlow4 = ((1.0281250000000001e-09 * fSlow2) - (4.1125e-11 * fSlow0));
89 double fSlow5 = (7.343750000000001e-09 * fSlow2);
90 double fSlow6 = (2.9375e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 2.52625e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00047000000000000004 * fSlow0);
93 double fSlow9 = (0.0250625 * fSlow2);
94 double fSlow10 = (fConst0 * (0.015765 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (4.1125e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (2.9375e-10 - (2.9375e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (9.925e-08 + (((9.187500000000001e-07 * fSlow16) + (fSlow0 * (5.0055e-07 - fSlow1))) + (fSlow2 * (2.48125e-06 + (1.1779375000000001e-05 * fSlow0)))));
104 double fSlow20 = (0.0010025 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_fender_default_stereo
0 // generated from file '../src/LV2/faust/tonestack_fender_deville.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_fender_deville {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Deville";
40 name = N_("Deville");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (1.3784375e-06 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (8.396625e-06 + ((7.405375e-05 * fSlow2) + (fSlow0 * (((1.3784375000000003e-05 * fSlow2) - 5.7371875e-06) - fSlow1))));
86 double fSlow4 = ((1.3062500000000001e-09 * fSlow2) - (1.30625e-10 * fSlow0));
87 double fSlow5 = (4.468750000000001e-09 * fSlow2);
88 double fSlow6 = (4.46875e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 3.1625e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00055 * fSlow0);
91 double fSlow9 = (0.0250625 * fSlow2);
92 double fSlow10 = (fConst0 * (0.01842875 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.30625e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (4.46875e-10 - (4.46875e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (2.55375e-07 + (((9.912500000000003e-07 * fSlow16) + (fSlow0 * (1.4128125e-06 - fSlow1))) + (fSlow2 * (2.5537500000000007e-06 + (1.3784375000000003e-05 * fSlow0)))));
102 double fSlow20 = (0.0025062500000000002 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_fender_deville
0 // generated from file '../src/LV2/faust/tonestack_fender_deville_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_fender_deville_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Deville";
41 name = N_("Deville");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (1.3784375e-06 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (8.396625e-06 + ((7.405375e-05 * fSlow2) + (fSlow0 * (((1.3784375000000003e-05 * fSlow2) - 5.7371875e-06) - fSlow1))));
88 double fSlow4 = ((1.3062500000000001e-09 * fSlow2) - (1.30625e-10 * fSlow0));
89 double fSlow5 = (4.468750000000001e-09 * fSlow2);
90 double fSlow6 = (4.46875e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 3.1625e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00055 * fSlow0);
93 double fSlow9 = (0.0250625 * fSlow2);
94 double fSlow10 = (fConst0 * (0.01842875 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.30625e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (4.46875e-10 - (4.46875e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (2.55375e-07 + (((9.912500000000003e-07 * fSlow16) + (fSlow0 * (1.4128125e-06 - fSlow1))) + (fSlow2 * (2.5537500000000007e-06 + (1.3784375000000003e-05 * fSlow0)))));
104 double fSlow20 = (0.0025062500000000002 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_fender_deville_stereo
0 // generated from file '../src/LV2/faust/tonestack_gibsen.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_gibsen {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Gibsen";
40 name = N_("Gibsen");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (1.0607618000000002e-05 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (3.1187760000000004e-05 + ((0.00032604000000000004 * fSlow2) + (fSlow0 * (((0.00011284700000000001 * fSlow2) - 1.9801382e-05) - fSlow1))));
86 double fSlow4 = ((3.5814000000000013e-09 * fSlow2) - (3.3665160000000007e-10 * fSlow0));
87 double fSlow5 = (8.100000000000003e-09 * fSlow2);
88 double fSlow6 = (7.614000000000002e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 4.247484000000001e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00188 * fSlow0);
91 double fSlow9 = (0.060025 * fSlow2);
92 double fSlow10 = (fConst0 * (0.027267350000000003 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (3.3665160000000007e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (7.614000000000002e-10 - (7.614000000000002e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (1.9176000000000002e-07 + (((5.400000000000001e-07 * fSlow16) + (fSlow0 * (1.0654618000000002e-05 - fSlow1))) + (fSlow2 * (2.0400000000000004e-06 + (0.00011284700000000001 * fSlow0)))));
102 double fSlow20 = (0.005642350000000001 + (fSlow9 + (fSlow8 + (2.5e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_gibsen
0 // generated from file '../src/LV2/faust/tonestack_gibsen_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_gibsen_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Gibsen";
41 name = N_("Gibsen");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (1.0607618000000002e-05 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (3.1187760000000004e-05 + ((0.00032604000000000004 * fSlow2) + (fSlow0 * (((0.00011284700000000001 * fSlow2) - 1.9801382e-05) - fSlow1))));
88 double fSlow4 = ((3.5814000000000013e-09 * fSlow2) - (3.3665160000000007e-10 * fSlow0));
89 double fSlow5 = (8.100000000000003e-09 * fSlow2);
90 double fSlow6 = (7.614000000000002e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 4.247484000000001e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00188 * fSlow0);
93 double fSlow9 = (0.060025 * fSlow2);
94 double fSlow10 = (fConst0 * (0.027267350000000003 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (3.3665160000000007e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (7.614000000000002e-10 - (7.614000000000002e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (1.9176000000000002e-07 + (((5.400000000000001e-07 * fSlow16) + (fSlow0 * (1.0654618000000002e-05 - fSlow1))) + (fSlow2 * (2.0400000000000004e-06 + (0.00011284700000000001 * fSlow0)))));
104 double fSlow20 = (0.005642350000000001 + (fSlow9 + (fSlow8 + (2.5e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_gibsen_stereo
0 // generated from file '../src/LV2/faust/tonestack_groove.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_groove {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Trio Preamp";
40 name = N_("Trio Preamp");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (2.3926056000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (1.1144196800000003e-06 + ((3.659304000000001e-05 * fSlow2) + (fSlow0 * (((1.0875480000000001e-05 * fSlow2) - 4.347578400000001e-07) - fSlow1))));
86 double fSlow4 = ((1.4413132800000006e-09 * fSlow2) - (3.1708892160000014e-11 * fSlow0));
87 double fSlow5 = (3.403100800000001e-09 * fSlow2);
88 double fSlow6 = (7.486821760000003e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.315932544000001e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00048400000000000006 * fSlow0);
91 double fSlow9 = (0.022470000000000004 * fSlow2);
92 double fSlow10 = (fConst0 * (0.00358974 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (3.1708892160000014e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (7.486821760000003e-11 - (7.486821760000003e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (8.098288000000002e-08 + (((3.0937280000000007e-07 * fSlow16) + (fSlow0 * (2.893061600000001e-07 - fSlow1))) + (fSlow2 * (3.6810400000000007e-06 + (1.0875480000000001e-05 * fSlow0)))));
102 double fSlow20 = (0.00049434 + (fSlow9 + (fSlow8 + (0.0001034 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_groove
0 // generated from file '../src/LV2/faust/tonestack_groove_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_groove_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Trio Preamp";
41 name = N_("Trio Preamp");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (2.3926056000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (1.1144196800000003e-06 + ((3.659304000000001e-05 * fSlow2) + (fSlow0 * (((1.0875480000000001e-05 * fSlow2) - 4.347578400000001e-07) - fSlow1))));
88 double fSlow4 = ((1.4413132800000006e-09 * fSlow2) - (3.1708892160000014e-11 * fSlow0));
89 double fSlow5 = (3.403100800000001e-09 * fSlow2);
90 double fSlow6 = (7.486821760000003e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.315932544000001e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00048400000000000006 * fSlow0);
93 double fSlow9 = (0.022470000000000004 * fSlow2);
94 double fSlow10 = (fConst0 * (0.00358974 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (3.1708892160000014e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (7.486821760000003e-11 - (7.486821760000003e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (8.098288000000002e-08 + (((3.0937280000000007e-07 * fSlow16) + (fSlow0 * (2.893061600000001e-07 - fSlow1))) + (fSlow2 * (3.6810400000000007e-06 + (1.0875480000000001e-05 * fSlow0)))));
104 double fSlow20 = (0.00049434 + (fSlow9 + (fSlow8 + (0.0001034 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_groove_stereo
0 // generated from file '../src/LV2/faust/tonestack_ibanez.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ibanez {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Ibanez";
40 name = N_("Ibanez");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (4.0108000000000004e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (5.050300000000001e-06 + ((0.00010263250000000001 * fSlow2) + (fSlow0 * (((1.0027e-05 * fSlow2) - 3.5719200000000006e-06) - fSlow1))));
86 double fSlow4 = ((9.45e-10 * fSlow2) - (3.78e-11 * fSlow0));
87 double fSlow5 = (6.75e-09 * fSlow2);
88 double fSlow6 = (2.7e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 2.3219999999999998e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.0004 * fSlow0);
91 double fSlow9 = (0.025067500000000003 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0150702 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (3.78e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (2.7e-10 - (2.7e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (1.0530000000000001e-07 + (((9.45e-07 * fSlow16) + (fSlow0 * (4.2808000000000006e-07 - fSlow1))) + (fSlow2 * (2.6324999999999998e-06 + (1.0027e-05 * fSlow0)))));
102 double fSlow20 = (0.0010027 + (fSlow9 + (fSlow8 + (6.75e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_ibanez
0 // generated from file '../src/LV2/faust/tonestack_ibanez_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_ibanez_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Ibanez";
41 name = N_("Ibanez");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (4.0108000000000004e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (5.050300000000001e-06 + ((0.00010263250000000001 * fSlow2) + (fSlow0 * (((1.0027e-05 * fSlow2) - 3.5719200000000006e-06) - fSlow1))));
88 double fSlow4 = ((9.45e-10 * fSlow2) - (3.78e-11 * fSlow0));
89 double fSlow5 = (6.75e-09 * fSlow2);
90 double fSlow6 = (2.7e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 2.3219999999999998e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.0004 * fSlow0);
93 double fSlow9 = (0.025067500000000003 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0150702 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (3.78e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (2.7e-10 - (2.7e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (1.0530000000000001e-07 + (((9.45e-07 * fSlow16) + (fSlow0 * (4.2808000000000006e-07 - fSlow1))) + (fSlow2 * (2.6324999999999998e-06 + (1.0027e-05 * fSlow0)))));
104 double fSlow20 = (0.0010027 + (fSlow9 + (fSlow8 + (6.75e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_ibanez_stereo
0 // generated from file '../src/LV2/faust/tonestack_jcm2000.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_jcm2000 {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "JCM-2000";
40 name = N_("JCM-2000");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (3.0937500000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (1.08515e-06 + ((3.108600000000001e-05 * fSlow2) + (fSlow0 * (((1.2375000000000003e-05 * fSlow2) - 2.99475e-07) - fSlow1))));
86 double fSlow4 = ((1.8513000000000002e-09 * fSlow2) - (4.628250000000001e-11 * fSlow0));
87 double fSlow5 = (3.3880000000000003e-09 * fSlow2);
88 double fSlow6 = (8.470000000000002e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 3.8417500000000006e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00055 * fSlow0);
91 double fSlow9 = (0.022500000000000003 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0031515000000000002 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (4.628250000000001e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (8.470000000000002e-11 - (8.470000000000002e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (9.955000000000001e-08 + (((3.08e-07 * fSlow16) + (fSlow0 * (3.781250000000001e-07 - fSlow1))) + (fSlow2 * (3.982e-06 + (1.2375000000000003e-05 * fSlow0)))));
102 double fSlow20 = (0.0005625000000000001 + (fSlow9 + (fSlow8 + (0.000125 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_jcm2000
0 // generated from file '../src/LV2/faust/tonestack_jcm2000_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_jcm2000_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "JCM-2000";
41 name = N_("JCM-2000");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (3.0937500000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (1.08515e-06 + ((3.108600000000001e-05 * fSlow2) + (fSlow0 * (((1.2375000000000003e-05 * fSlow2) - 2.99475e-07) - fSlow1))));
88 double fSlow4 = ((1.8513000000000002e-09 * fSlow2) - (4.628250000000001e-11 * fSlow0));
89 double fSlow5 = (3.3880000000000003e-09 * fSlow2);
90 double fSlow6 = (8.470000000000002e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 3.8417500000000006e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00055 * fSlow0);
93 double fSlow9 = (0.022500000000000003 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0031515000000000002 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (4.628250000000001e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (8.470000000000002e-11 - (8.470000000000002e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (9.955000000000001e-08 + (((3.08e-07 * fSlow16) + (fSlow0 * (3.781250000000001e-07 - fSlow1))) + (fSlow2 * (3.982e-06 + (1.2375000000000003e-05 * fSlow0)))));
104 double fSlow20 = (0.0005625000000000001 + (fSlow9 + (fSlow8 + (0.000125 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_jcm2000_stereo
0 // generated from file '../src/LV2/faust/tonestack_jcm800.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_jcm800 {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "JCM-800";
40 name = N_("JCM-800");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (2.3926056000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (5.665800800000001e-07 + ((1.892924e-05 * fSlow2) + (fSlow0 * (((1.0875480000000001e-05 * fSlow2) - 6.207784000000001e-08) - fSlow1))));
86 double fSlow4 = ((1.2661536800000005e-09 * fSlow2) - (2.7855380960000008e-11 * fSlow0));
87 double fSlow5 = (1.6515048000000004e-09 * fSlow2);
88 double fSlow6 = (3.6333105600000014e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 8.477724640000006e-12))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00048400000000000006 * fSlow0);
91 double fSlow9 = (0.022470000000000004 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0020497400000000004 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (2.7855380960000008e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (3.6333105600000014e-11 - (3.6333105600000014e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (6.505928000000001e-08 + (((1.5013680000000003e-07 * fSlow16) + (fSlow0 * (2.893061600000001e-07 - fSlow1))) + (fSlow2 * (2.95724e-06 + (1.0875480000000001e-05 * fSlow0)))));
102 double fSlow20 = (0.00049434 + (fSlow9 + (fSlow8 + (0.0001034 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_jcm800
0 // generated from file '../src/LV2/faust/tonestack_jcm800_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_jcm800_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "JCM-800";
41 name = N_("JCM-800");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (2.3926056000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (5.665800800000001e-07 + ((1.892924e-05 * fSlow2) + (fSlow0 * (((1.0875480000000001e-05 * fSlow2) - 6.207784000000001e-08) - fSlow1))));
88 double fSlow4 = ((1.2661536800000005e-09 * fSlow2) - (2.7855380960000008e-11 * fSlow0));
89 double fSlow5 = (1.6515048000000004e-09 * fSlow2);
90 double fSlow6 = (3.6333105600000014e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 8.477724640000006e-12))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00048400000000000006 * fSlow0);
93 double fSlow9 = (0.022470000000000004 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0020497400000000004 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (2.7855380960000008e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (3.6333105600000014e-11 - (3.6333105600000014e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (6.505928000000001e-08 + (((1.5013680000000003e-07 * fSlow16) + (fSlow0 * (2.893061600000001e-07 - fSlow1))) + (fSlow2 * (2.95724e-06 + (1.0875480000000001e-05 * fSlow0)))));
104 double fSlow20 = (0.00049434 + (fSlow9 + (fSlow8 + (0.0001034 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_jcm800_stereo
0 // generated from file '../src/LV2/faust/tonestack_jtm45.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_jtm45 {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "JTM-45";
40 name = N_("JTM-45");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (3.0621250000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (5.442360000000002e-07 + ((1.784904e-05 * fSlow2) + (fSlow0 * (((1.2248500000000003e-05 * fSlow2) - 5.596250000000005e-08) - fSlow1))));
86 double fSlow4 = ((9.245610000000004e-10 * fSlow2) - (2.3114025000000008e-11 * fSlow0));
87 double fSlow5 = (1.0781100000000005e-09 * fSlow2);
88 double fSlow6 = (2.695275000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 3.8387250000000005e-12))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00055 * fSlow0);
91 double fSlow9 = (0.02227 * fSlow2);
92 double fSlow10 = (fConst0 * (0.00207625 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (2.3114025000000008e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (2.695275000000001e-11 - (2.695275000000001e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (4.6926e-08 + (((9.801000000000002e-08 * fSlow16) + (fSlow0 * (3.433375000000001e-07 - fSlow1))) + (fSlow2 * (1.8770400000000002e-06 + (1.2248500000000003e-05 * fSlow0)))));
102 double fSlow20 = (0.0005567500000000001 + (fSlow9 + (fSlow8 + (6.75e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_jtm45
0 // generated from file '../src/LV2/faust/tonestack_jtm45_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_jtm45_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "JTM-45";
41 name = N_("JTM-45");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (3.0621250000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (5.442360000000002e-07 + ((1.784904e-05 * fSlow2) + (fSlow0 * (((1.2248500000000003e-05 * fSlow2) - 5.596250000000005e-08) - fSlow1))));
88 double fSlow4 = ((9.245610000000004e-10 * fSlow2) - (2.3114025000000008e-11 * fSlow0));
89 double fSlow5 = (1.0781100000000005e-09 * fSlow2);
90 double fSlow6 = (2.695275000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 3.8387250000000005e-12))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00055 * fSlow0);
93 double fSlow9 = (0.02227 * fSlow2);
94 double fSlow10 = (fConst0 * (0.00207625 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (2.3114025000000008e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (2.695275000000001e-11 - (2.695275000000001e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (4.6926e-08 + (((9.801000000000002e-08 * fSlow16) + (fSlow0 * (3.433375000000001e-07 - fSlow1))) + (fSlow2 * (1.8770400000000002e-06 + (1.2248500000000003e-05 * fSlow0)))));
104 double fSlow20 = (0.0005567500000000001 + (fSlow9 + (fSlow8 + (6.75e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_jtm45_stereo
0 // generated from file '../src/LV2/faust/tonestack_m2199.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_m2199 {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "M2199";
40 name = N_("M2199");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (1.38796875e-06 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (3.5279375000000002e-06 + ((3.1989375e-05 * fSlow2) + (fSlow0 * (((1.38796875e-05 * fSlow2) - 1.6311937500000001e-06) - fSlow1))));
86 double fSlow4 = ((1.0561781250000004e-09 * fSlow2) - (1.0561781250000003e-10 * fSlow0));
87 double fSlow5 = (1.9328750000000005e-09 * fSlow2);
88 double fSlow6 = (1.9328750000000007e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 8.766968750000004e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.001175 * fSlow0);
91 double fSlow9 = (0.011812500000000002 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0065077500000000005 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.0561781250000003e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (1.9328750000000007e-10 - (1.9328750000000007e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (1.0633750000000002e-07 + (((3.2900000000000005e-07 * fSlow16) + (fSlow0 * (1.4614062500000001e-06 - fSlow1))) + (fSlow2 * (1.0633750000000002e-06 + (1.38796875e-05 * fSlow0)))));
102 double fSlow20 = (0.00118125 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_m2199
0 // generated from file '../src/LV2/faust/tonestack_m2199_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_m2199_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "M2199";
41 name = N_("M2199");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (1.38796875e-06 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (3.5279375000000002e-06 + ((3.1989375e-05 * fSlow2) + (fSlow0 * (((1.38796875e-05 * fSlow2) - 1.6311937500000001e-06) - fSlow1))));
88 double fSlow4 = ((1.0561781250000004e-09 * fSlow2) - (1.0561781250000003e-10 * fSlow0));
89 double fSlow5 = (1.9328750000000005e-09 * fSlow2);
90 double fSlow6 = (1.9328750000000007e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 8.766968750000004e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.001175 * fSlow0);
93 double fSlow9 = (0.011812500000000002 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0065077500000000005 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.0561781250000003e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (1.9328750000000007e-10 - (1.9328750000000007e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (1.0633750000000002e-07 + (((3.2900000000000005e-07 * fSlow16) + (fSlow0 * (1.4614062500000001e-06 - fSlow1))) + (fSlow2 * (1.0633750000000002e-06 + (1.38796875e-05 * fSlow0)))));
104 double fSlow20 = (0.00118125 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_m2199_stereo
0 // generated from file '../src/LV2/faust/tonestack_mesa.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_mesa {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Mesa Boogie";
40 name = N_("Mesa Boogie");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (2.9448437500000003e-06 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (1.2916875000000002e-05 + ((0.00011998125000000002 * fSlow2) + (fSlow0 * (((2.9448437500000007e-05 * fSlow2) - 8.731718750000001e-06) - fSlow1))));
86 double fSlow4 = ((2.5703125000000004e-09 * fSlow2) - (2.5703125000000003e-10 * fSlow0));
87 double fSlow5 = (7.343750000000001e-09 * fSlow2);
88 double fSlow6 = (7.343750000000001e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 4.773437500000001e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.001175 * fSlow0);
91 double fSlow9 = (0.0250625 * fSlow2);
92 double fSlow10 = (fConst0 * (0.01726875 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (2.5703125000000003e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (7.343750000000001e-10 - (7.343750000000001e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (2.48125e-07 + (((9.187500000000001e-07 * fSlow16) + (fSlow0 * (3.0182812500000004e-06 - fSlow1))) + (fSlow2 * (2.48125e-06 + (2.9448437500000007e-05 * fSlow0)))));
102 double fSlow20 = (0.0025062500000000002 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_mesa
0 // generated from file '../src/LV2/faust/tonestack_mesa_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_mesa_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Mesa Boogie";
41 name = N_("Mesa Boogie");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (2.9448437500000003e-06 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (1.2916875000000002e-05 + ((0.00011998125000000002 * fSlow2) + (fSlow0 * (((2.9448437500000007e-05 * fSlow2) - 8.731718750000001e-06) - fSlow1))));
88 double fSlow4 = ((2.5703125000000004e-09 * fSlow2) - (2.5703125000000003e-10 * fSlow0));
89 double fSlow5 = (7.343750000000001e-09 * fSlow2);
90 double fSlow6 = (7.343750000000001e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 4.773437500000001e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.001175 * fSlow0);
93 double fSlow9 = (0.0250625 * fSlow2);
94 double fSlow10 = (fConst0 * (0.01726875 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (2.5703125000000003e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (7.343750000000001e-10 - (7.343750000000001e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (2.48125e-07 + (((9.187500000000001e-07 * fSlow16) + (fSlow0 * (3.0182812500000004e-06 - fSlow1))) + (fSlow2 * (2.48125e-06 + (2.9448437500000007e-05 * fSlow0)))));
104 double fSlow20 = (0.0025062500000000002 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_mesa_stereo
0 // generated from file '../src/LV2/faust/tonestack_mlead.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_mlead {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "M-Lead";
40 name = N_("M-Lead");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (3.0937500000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (6.677000000000001e-07 + ((1.9448000000000004e-05 * fSlow2) + (fSlow0 * (((1.2375000000000003e-05 * fSlow2) - 2.1175000000000003e-08) - fSlow1))));
86 double fSlow4 = ((1.7121500000000001e-09 * fSlow2) - (4.2803750000000003e-11 * fSlow0));
87 double fSlow5 = (1.9965000000000003e-09 * fSlow2);
88 double fSlow6 = (4.991250000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 7.108750000000004e-12))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00055 * fSlow0);
91 double fSlow9 = (0.022500000000000003 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0021395000000000003 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (4.2803750000000003e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.991250000000001e-11 - (4.991250000000001e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (8.690000000000002e-08 + (((1.815e-07 * fSlow16) + (fSlow0 * (3.781250000000001e-07 - fSlow1))) + (fSlow2 * (3.4760000000000007e-06 + (1.2375000000000003e-05 * fSlow0)))));
102 double fSlow20 = (0.0005625000000000001 + (fSlow9 + (fSlow8 + (0.000125 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_mlead
0 // generated from file '../src/LV2/faust/tonestack_mlead_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_mlead_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "M-Lead";
41 name = N_("M-Lead");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (3.0937500000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (6.677000000000001e-07 + ((1.9448000000000004e-05 * fSlow2) + (fSlow0 * (((1.2375000000000003e-05 * fSlow2) - 2.1175000000000003e-08) - fSlow1))));
88 double fSlow4 = ((1.7121500000000001e-09 * fSlow2) - (4.2803750000000003e-11 * fSlow0));
89 double fSlow5 = (1.9965000000000003e-09 * fSlow2);
90 double fSlow6 = (4.991250000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 7.108750000000004e-12))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00055 * fSlow0);
93 double fSlow9 = (0.022500000000000003 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0021395000000000003 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (4.2803750000000003e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.991250000000001e-11 - (4.991250000000001e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (8.690000000000002e-08 + (((1.815e-07 * fSlow16) + (fSlow0 * (3.781250000000001e-07 - fSlow1))) + (fSlow2 * (3.4760000000000007e-06 + (1.2375000000000003e-05 * fSlow0)))));
104 double fSlow20 = (0.0005625000000000001 + (fSlow9 + (fSlow8 + (0.000125 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_mlead_stereo
0 // generated from file '../src/LV2/faust/tonestack_peavey.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_peavey {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Peavey";
40 name = N_("Peavey");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (1.95976e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (9.060568000000001e-07 + ((8.801210000000002e-06 * fSlow2) + (fSlow0 * (((2.4497000000000004e-06 * fSlow2) - 4.3256399999999996e-07) - fSlow1))));
86 double fSlow4 = ((2.0778120000000008e-10 * fSlow2) - (1.6622496000000003e-11 * fSlow0));
87 double fSlow5 = (5.553900000000002e-10 * fSlow2);
88 double fSlow6 = (4.4431200000000016e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.7808704000000013e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00044 * fSlow0);
91 double fSlow9 = (0.0055675 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0035049 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.6622496000000003e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.4431200000000016e-11 - (4.4431200000000016e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (4.585680000000001e-08 + (((2.0196000000000004e-07 * fSlow16) + (fSlow0 * (2.2567600000000002e-07 - fSlow1))) + (fSlow2 * (5.732100000000001e-07 + (2.4497000000000004e-06 * fSlow0)))));
102 double fSlow20 = (0.00044540000000000004 + (fSlow9 + (fSlow8 + (6.75e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_peavey
0 // generated from file '../src/LV2/faust/tonestack_peavey_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_peavey_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Peavey";
41 name = N_("Peavey");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (1.95976e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (9.060568000000001e-07 + ((8.801210000000002e-06 * fSlow2) + (fSlow0 * (((2.4497000000000004e-06 * fSlow2) - 4.3256399999999996e-07) - fSlow1))));
88 double fSlow4 = ((2.0778120000000008e-10 * fSlow2) - (1.6622496000000003e-11 * fSlow0));
89 double fSlow5 = (5.553900000000002e-10 * fSlow2);
90 double fSlow6 = (4.4431200000000016e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.7808704000000013e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00044 * fSlow0);
93 double fSlow9 = (0.0055675 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0035049 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.6622496000000003e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.4431200000000016e-11 - (4.4431200000000016e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (4.585680000000001e-08 + (((2.0196000000000004e-07 * fSlow16) + (fSlow0 * (2.2567600000000002e-07 - fSlow1))) + (fSlow2 * (5.732100000000001e-07 + (2.4497000000000004e-06 * fSlow0)))));
104 double fSlow20 = (0.00044540000000000004 + (fSlow9 + (fSlow8 + (6.75e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_peavey_stereo
0 // generated from file '../src/LV2/faust/tonestack_princeton.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_princeton {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Princeton";
40 name = N_("Princeton");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (1.0855872000000003e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (3.222390000000001e-06 + ((0.00011998125000000002 * fSlow2) + (fSlow0 * (((5.6541000000000015e-06 * fSlow2) - 2.1333412800000006e-06) - fSlow1))));
86 double fSlow4 = ((4.935e-10 * fSlow2) - (9.4752e-12 * fSlow0));
87 double fSlow5 = (7.343750000000001e-09 * fSlow2);
88 double fSlow6 = (1.41e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 1.315248e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.0002256 * fSlow0);
91 double fSlow9 = (0.0250625 * fSlow2);
92 double fSlow10 = (fConst0 * (0.015243699999999999 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (9.4752e-12 + fSlow4)) + (fSlow16 * (fSlow5 + (1.41e-10 - (1.41e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (4.764000000000001e-08 + (((9.187500000000001e-07 * fSlow16) + (fSlow0 * (1.2265872000000003e-07 - fSlow1))) + (fSlow2 * (2.48125e-06 + (5.6541000000000015e-06 * fSlow0)))));
102 double fSlow20 = (0.00048120000000000004 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_princeton
0 // generated from file '../src/LV2/faust/tonestack_princeton_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_princeton_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Princeton";
41 name = N_("Princeton");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (1.0855872000000003e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (3.222390000000001e-06 + ((0.00011998125000000002 * fSlow2) + (fSlow0 * (((5.6541000000000015e-06 * fSlow2) - 2.1333412800000006e-06) - fSlow1))));
88 double fSlow4 = ((4.935e-10 * fSlow2) - (9.4752e-12 * fSlow0));
89 double fSlow5 = (7.343750000000001e-09 * fSlow2);
90 double fSlow6 = (1.41e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 1.315248e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.0002256 * fSlow0);
93 double fSlow9 = (0.0250625 * fSlow2);
94 double fSlow10 = (fConst0 * (0.015243699999999999 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (9.4752e-12 + fSlow4)) + (fSlow16 * (fSlow5 + (1.41e-10 - (1.41e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (4.764000000000001e-08 + (((9.187500000000001e-07 * fSlow16) + (fSlow0 * (1.2265872000000003e-07 - fSlow1))) + (fSlow2 * (2.48125e-06 + (5.6541000000000015e-06 * fSlow0)))));
104 double fSlow20 = (0.00048120000000000004 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_princeton_stereo
0 // generated from file '../src/LV2/faust/tonestack_roland.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_roland {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Roland";
40 name = N_("Roland");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (2.7256800000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (1.4234760000000002e-06 + ((2.851440000000001e-05 * fSlow2) + (fSlow0 * (((6.8142000000000025e-06 * fSlow2) - 7.876920000000001e-07) - fSlow1))));
86 double fSlow4 = ((4.724676000000001e-10 * fSlow2) - (1.8898704000000002e-11 * fSlow0));
87 double fSlow5 = (1.6641900000000002e-09 * fSlow2);
88 double fSlow6 = (6.656760000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.7668896000000004e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.0008200000000000001 * fSlow0);
91 double fSlow9 = (0.00831 * fSlow2);
92 double fSlow10 = (fConst0 * (0.005107400000000001 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.8898704000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (6.656760000000001e-11 - (6.656760000000001e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (3.1116000000000005e-08 + (((2.829e-07 * fSlow16) + (fSlow0 * (3.2176800000000005e-07 - fSlow1))) + (fSlow2 * (7.779000000000002e-07 + (6.8142000000000025e-06 * fSlow0)))));
102 double fSlow20 = (0.00033240000000000006 + (fSlow9 + (fSlow8 + (6e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_roland
0 // generated from file '../src/LV2/faust/tonestack_roland_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_roland_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Roland";
41 name = N_("Roland");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (2.7256800000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (1.4234760000000002e-06 + ((2.851440000000001e-05 * fSlow2) + (fSlow0 * (((6.8142000000000025e-06 * fSlow2) - 7.876920000000001e-07) - fSlow1))));
88 double fSlow4 = ((4.724676000000001e-10 * fSlow2) - (1.8898704000000002e-11 * fSlow0));
89 double fSlow5 = (1.6641900000000002e-09 * fSlow2);
90 double fSlow6 = (6.656760000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.7668896000000004e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.0008200000000000001 * fSlow0);
93 double fSlow9 = (0.00831 * fSlow2);
94 double fSlow10 = (fConst0 * (0.005107400000000001 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.8898704000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (6.656760000000001e-11 - (6.656760000000001e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (3.1116000000000005e-08 + (((2.829e-07 * fSlow16) + (fSlow0 * (3.2176800000000005e-07 - fSlow1))) + (fSlow2 * (7.779000000000002e-07 + (6.8142000000000025e-06 * fSlow0)))));
104 double fSlow20 = (0.00033240000000000006 + (fSlow9 + (fSlow8 + (6e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_roland_stereo
0 // generated from file '../src/LV2/faust/tonestack_soldano.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_soldano {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "SOL 100";
40 name = N_("SOL 100");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (2.5587500000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (7.717400000000001e-07 + ((2.2033600000000005e-05 * fSlow2) + (fSlow0 * (((1.0235000000000001e-05 * fSlow2) - 1.5537499999999997e-07) - fSlow1))));
86 double fSlow4 = ((1.3959000000000001e-09 * fSlow2) - (3.48975e-11 * fSlow0));
87 double fSlow5 = (2.2090000000000005e-09 * fSlow2);
88 double fSlow6 = (5.522500000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.0327500000000007e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.0005 * fSlow0);
91 double fSlow9 = (0.020470000000000002 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0025092499999999998 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (3.48975e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.522500000000001e-11 - (5.522500000000001e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (8.084000000000001e-08 + (((2.2090000000000003e-07 * fSlow16) + (fSlow0 * (3.146250000000001e-07 - fSlow1))) + (fSlow2 * (3.2336000000000007e-06 + (1.0235000000000001e-05 * fSlow0)))));
102 double fSlow20 = (0.00051175 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_soldano
0 // generated from file '../src/LV2/faust/tonestack_soldano_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_soldano_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "SOL 100";
41 name = N_("SOL 100");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (2.5587500000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (7.717400000000001e-07 + ((2.2033600000000005e-05 * fSlow2) + (fSlow0 * (((1.0235000000000001e-05 * fSlow2) - 1.5537499999999997e-07) - fSlow1))));
88 double fSlow4 = ((1.3959000000000001e-09 * fSlow2) - (3.48975e-11 * fSlow0));
89 double fSlow5 = (2.2090000000000005e-09 * fSlow2);
90 double fSlow6 = (5.522500000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.0327500000000007e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.0005 * fSlow0);
93 double fSlow9 = (0.020470000000000002 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0025092499999999998 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (3.48975e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.522500000000001e-11 - (5.522500000000001e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (8.084000000000001e-08 + (((2.2090000000000003e-07 * fSlow16) + (fSlow0 * (3.146250000000001e-07 - fSlow1))) + (fSlow2 * (3.2336000000000007e-06 + (1.0235000000000001e-05 * fSlow0)))));
104 double fSlow20 = (0.00051175 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_soldano_stereo
0 // generated from file '../src/LV2/faust/tonestack_sovtek.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_sovtek {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "MIG 100 H";
40 name = N_("MIG 100 H");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (4.9434000000000004e-08 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (7.748796000000001e-07 + ((2.8889960000000004e-05 * fSlow2) + (fSlow0 * (((4.943400000000001e-06 * fSlow2) - 1.2634599999999999e-07) - fSlow1))));
86 double fSlow4 = ((1.2443156000000004e-09 * fSlow2) - (1.2443156000000002e-11 * fSlow0));
87 double fSlow5 = (5.345780000000001e-09 * fSlow2);
88 double fSlow6 = (5.345780000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.101464400000001e-11))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00022 * fSlow0);
91 double fSlow9 = (0.022470000000000004 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0025277 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.2443156000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.345780000000001e-11 - (5.345780000000001e-11 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (6.141960000000001e-08 + (((4.859800000000001e-07 * fSlow16) + (fSlow0 * (1.0113400000000001e-07 - fSlow1))) + (fSlow2 * (6.141960000000001e-06 + (4.943400000000001e-06 * fSlow0)))));
102 double fSlow20 = (0.00022470000000000001 + (fSlow9 + (fSlow8 + (0.00023500000000000002 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_sovtek
0 // generated from file '../src/LV2/faust/tonestack_sovtek_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_sovtek_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "MIG 100 H";
41 name = N_("MIG 100 H");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (4.9434000000000004e-08 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (7.748796000000001e-07 + ((2.8889960000000004e-05 * fSlow2) + (fSlow0 * (((4.943400000000001e-06 * fSlow2) - 1.2634599999999999e-07) - fSlow1))));
88 double fSlow4 = ((1.2443156000000004e-09 * fSlow2) - (1.2443156000000002e-11 * fSlow0));
89 double fSlow5 = (5.345780000000001e-09 * fSlow2);
90 double fSlow6 = (5.345780000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.101464400000001e-11))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00022 * fSlow0);
93 double fSlow9 = (0.022470000000000004 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0025277 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.2443156000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.345780000000001e-11 - (5.345780000000001e-11 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (6.141960000000001e-08 + (((4.859800000000001e-07 * fSlow16) + (fSlow0 * (1.0113400000000001e-07 - fSlow1))) + (fSlow2 * (6.141960000000001e-06 + (4.943400000000001e-06 * fSlow0)))));
104 double fSlow20 = (0.00022470000000000001 + (fSlow9 + (fSlow8 + (0.00023500000000000002 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_sovtek_stereo
0 // generated from file '../src/LV2/faust/tonestack_twin.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_twin {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void connect(uint32_t port,void* data);
20 void clear_state_f();
21 void init(uint32_t samplingFreq);
22 void compute(int count, float *input0, float *output0);
23
24 static void clear_state_f_static(PluginLV2*);
25 static void init_static(uint32_t samplingFreq, PluginLV2*);
26 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
27 static void del_instance(PluginLV2 *p);
28 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginLV2() {
38 version = PLUGINLV2_VERSION;
39 id = "Twin Reverb";
40 name = N_("Twin Reverb");
41 mono_audio = compute_static;
42 stereo_audio = 0;
43 set_samplerate = init_static;
44 activate_plugin = 0;
45 connect_ports = connect_static;
46 clear_state = clear_state_f_static;
47 delete_instance = del_instance;
48 }
49
50 Dsp::~Dsp() {
51 }
52
53 inline void Dsp::clear_state_f()
54 {
55 for (int i=0; i<4; i++) fRec0[i] = 0;
56 }
57
58 void Dsp::clear_state_f_static(PluginLV2 *p)
59 {
60 static_cast<Dsp*>(p)->clear_state_f();
61 }
62
63 inline void Dsp::init(uint32_t samplingFreq)
64 {
65 fSamplingFreq = samplingFreq;
66 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
67 fConst1 = faustpower<2>(fConst0);
68 fConst2 = (3 * fConst0);
69 clear_state_f();
70 }
71
72 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
73 {
74 static_cast<Dsp*>(p)->init(samplingFreq);
75 }
76
77 inline void Dsp::compute(int count, float *input0, float *output0)
78 {
79 #define fslider0 (*fslider0_)
80 #define fslider1 (*fslider1_)
81 #define fslider2 (*fslider2_)
82 double fSlow0 = fslider0;
83 double fSlow1 = (4.7056400000000006e-07 * fSlow0);
84 double fSlow2 = exp((3.4 * (fslider1 - 1)));
85 double fSlow3 = (5.188640000000001e-06 + ((0.00011869100000000002 * fSlow2) + (fSlow0 * (((1.1764100000000001e-05 * fSlow2) - 4.215336e-06) - fSlow1))));
86 double fSlow4 = ((4.935e-10 * fSlow2) - (1.974e-11 * fSlow0));
87 double fSlow5 = (3.525e-09 * fSlow2);
88 double fSlow6 = (1.41e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 1.2126e-10))));
89 double fSlow7 = (fConst0 * fSlow6);
90 double fSlow8 = (0.00047000000000000004 * fSlow0);
91 double fSlow9 = (0.02503 * fSlow2);
92 double fSlow10 = (fConst0 * (0.0157312 + (fSlow9 + fSlow8)));
93 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
94 double fSlow12 = (fConst2 * fSlow6);
95 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
96 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
97 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
98 double fSlow16 = fslider2;
99 double fSlow17 = ((fSlow0 * (1.974e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (1.41e-10 - (1.41e-10 * fSlow0)))));
100 double fSlow18 = (fConst2 * fSlow17);
101 double fSlow19 = (4.764000000000001e-08 + (((4.410000000000001e-07 * fSlow16) + (fSlow0 * (4.846640000000001e-07 - fSlow1))) + (fSlow2 * (1.1910000000000001e-06 + (1.1764100000000001e-05 * fSlow0)))));
102 double fSlow20 = (0.0010012 + (fSlow9 + (fSlow8 + (3e-05 * fSlow16))));
103 double fSlow21 = (fConst0 * fSlow20);
104 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
105 double fSlow23 = (fConst0 * fSlow17);
106 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
107 double fSlow25 = (fConst0 * (0 - fSlow20));
108 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
109 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
110 for (int i=0; i<count; i++) {
111 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
112 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
113 // post processing
114 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
115 }
116 #undef fslider0
117 #undef fslider1
118 #undef fslider2
119 }
120
121 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
122 {
123 static_cast<Dsp*>(p)->compute(count, input0, output0);
124 }
125
126
127 void Dsp::connect(uint32_t port,void* data)
128 {
129 switch ((PortIndex)port)
130 {
131 case TREBLE:
132 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
133 break;
134 case BASS:
135 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
136 break;
137 case MIDDLE:
138 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
139 break;
140 default:
141 break;
142 }
143 }
144
145 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
146 {
147 static_cast<Dsp*>(p)->connect(port, data);
148 }
149
150
151 PluginLV2 *plugin() {
152 return new Dsp();
153 }
154
155 void Dsp::del_instance(PluginLV2 *p)
156 {
157 delete static_cast<Dsp*>(p);
158 }
159
160 /*
161 typedef enum
162 {
163 TREBLE,
164 BASS,
165 MIDDLE,
166 } PortIndex;
167 */
168
169 } // end namespace tonestack_twin
0 // generated from file '../src/LV2/faust/tonestack_twin_stereo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_twin_stereo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 double fRec1[4];
20 void connect(uint32_t port,void* data);
21 void clear_state_f();
22 void init(uint32_t samplingFreq);
23 void compute(int count, float *input0, float *input1, float *output0, float *output1);
24
25 static void clear_state_f_static(PluginLV2*);
26 static void init_static(uint32_t samplingFreq, PluginLV2*);
27 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2*);
28 static void del_instance(PluginLV2 *p);
29 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
30 public:
31 Dsp();
32 ~Dsp();
33 };
34
35
36
37 Dsp::Dsp()
38 : PluginLV2() {
39 version = PLUGINLV2_VERSION;
40 id = "Twin Reverb";
41 name = N_("Twin Reverb");
42 mono_audio = 0;
43 stereo_audio = compute_static;
44 set_samplerate = init_static;
45 activate_plugin = 0;
46 connect_ports = connect_static;
47 clear_state = clear_state_f_static;
48 delete_instance = del_instance;
49 }
50
51 Dsp::~Dsp() {
52 }
53
54 inline void Dsp::clear_state_f()
55 {
56 for (int i=0; i<4; i++) fRec0[i] = 0;
57 for (int i=0; i<4; i++) fRec1[i] = 0;
58 }
59
60 void Dsp::clear_state_f_static(PluginLV2 *p)
61 {
62 static_cast<Dsp*>(p)->clear_state_f();
63 }
64
65 inline void Dsp::init(uint32_t samplingFreq)
66 {
67 fSamplingFreq = samplingFreq;
68 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
69 fConst1 = faustpower<2>(fConst0);
70 fConst2 = (3 * fConst0);
71 clear_state_f();
72 }
73
74 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
75 {
76 static_cast<Dsp*>(p)->init(samplingFreq);
77 }
78
79 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
80 {
81 #define fslider0 (*fslider0_)
82 #define fslider1 (*fslider1_)
83 #define fslider2 (*fslider2_)
84 double fSlow0 = fslider0;
85 double fSlow1 = (4.7056400000000006e-07 * fSlow0);
86 double fSlow2 = exp((3.4 * (fslider1 - 1)));
87 double fSlow3 = (5.188640000000001e-06 + ((0.00011869100000000002 * fSlow2) + (fSlow0 * (((1.1764100000000001e-05 * fSlow2) - 4.215336e-06) - fSlow1))));
88 double fSlow4 = ((4.935e-10 * fSlow2) - (1.974e-11 * fSlow0));
89 double fSlow5 = (3.525e-09 * fSlow2);
90 double fSlow6 = (1.41e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 1.2126e-10))));
91 double fSlow7 = (fConst0 * fSlow6);
92 double fSlow8 = (0.00047000000000000004 * fSlow0);
93 double fSlow9 = (0.02503 * fSlow2);
94 double fSlow10 = (fConst0 * (0.0157312 + (fSlow9 + fSlow8)));
95 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
96 double fSlow12 = (fConst2 * fSlow6);
97 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
98 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
99 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
100 double fSlow16 = fslider2;
101 double fSlow17 = ((fSlow0 * (1.974e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (1.41e-10 - (1.41e-10 * fSlow0)))));
102 double fSlow18 = (fConst2 * fSlow17);
103 double fSlow19 = (4.764000000000001e-08 + (((4.410000000000001e-07 * fSlow16) + (fSlow0 * (4.846640000000001e-07 - fSlow1))) + (fSlow2 * (1.1910000000000001e-06 + (1.1764100000000001e-05 * fSlow0)))));
104 double fSlow20 = (0.0010012 + (fSlow9 + (fSlow8 + (3e-05 * fSlow16))));
105 double fSlow21 = (fConst0 * fSlow20);
106 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
107 double fSlow23 = (fConst0 * fSlow17);
108 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
109 double fSlow25 = (fConst0 * (0 - fSlow20));
110 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
111 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
112 for (int i=0; i<count; i++) {
113 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
114 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
115 fRec1[0] = ((double)input1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
116 output1[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
117 // post processing
118 for (int i=3; i>0; i--) fRec1[i] = fRec1[i-1];
119 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
120 }
121 #undef fslider0
122 #undef fslider1
123 #undef fslider2
124 }
125
126 void Dsp::compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginLV2 *p)
127 {
128 static_cast<Dsp*>(p)->compute(count, input0, input1, output0, output1);
129 }
130
131
132 void Dsp::connect(uint32_t port,void* data)
133 {
134 switch ((PortIndex)port)
135 {
136 case TREBLE:
137 fslider2_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
138 break;
139 case BASS:
140 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
141 break;
142 case MIDDLE:
143 fslider0_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
144 break;
145 default:
146 break;
147 }
148 }
149
150 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
151 {
152 static_cast<Dsp*>(p)->connect(port, data);
153 }
154
155
156 PluginLV2 *plugin() {
157 return new Dsp();
158 }
159
160 void Dsp::del_instance(PluginLV2 *p)
161 {
162 delete static_cast<Dsp*>(p);
163 }
164
165 /*
166 typedef enum
167 {
168 TREBLE,
169 BASS,
170 MIDDLE,
171 } PortIndex;
172 */
173
174 } // end namespace tonestack_twin_stereo
0 // generated from file '../src/LV2/faust/tremolo.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tremolo {
5
6 class Dsp: public PluginLV2 {
7 private:
8 uint32_t fSamplingFreq;
9 int iVec0[2];
10 int iConst0;
11 double fConst1;
12 FAUSTFLOAT fslider0;
13 FAUSTFLOAT *fslider0_;
14 double fConst2;
15 int iRec2[2];
16 int iRec1[2];
17 double fConst3;
18 double fRec5[2];
19 double fRec4[2];
20 double fRec3[2];
21 FAUSTFLOAT fcheckbox0;
22 FAUSTFLOAT *fcheckbox0_;
23 FAUSTFLOAT fslider1;
24 FAUSTFLOAT *fslider1_;
25 double fRec0[2];
26 FAUSTFLOAT fslider2;
27 FAUSTFLOAT *fslider2_;
28 void connect(uint32_t port,void* data);
29 void clear_state_f();
30 void init(uint32_t samplingFreq);
31 void compute(int count, float *input0, float *output0);
32
33 static void clear_state_f_static(PluginLV2*);
34 static void init_static(uint32_t samplingFreq, PluginLV2*);
35 static void compute_static(int count, float *input0, float *output0, PluginLV2*);
36 static void del_instance(PluginLV2 *p);
37 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
38 public:
39 Dsp();
40 ~Dsp();
41 };
42
43
44
45 Dsp::Dsp()
46 : PluginLV2() {
47 version = PLUGINLV2_VERSION;
48 id = "tremolo";
49 name = N_("Tremolo");
50 mono_audio = compute_static;
51 stereo_audio = 0;
52 set_samplerate = init_static;
53 activate_plugin = 0;
54 connect_ports = connect_static;
55 clear_state = clear_state_f_static;
56 delete_instance = del_instance;
57 }
58
59 Dsp::~Dsp() {
60 }
61
62 inline void Dsp::clear_state_f()
63 {
64 for (int i=0; i<2; i++) iVec0[i] = 0;
65 for (int i=0; i<2; i++) iRec2[i] = 0;
66 for (int i=0; i<2; i++) iRec1[i] = 0;
67 for (int i=0; i<2; i++) fRec5[i] = 0;
68 for (int i=0; i<2; i++) fRec4[i] = 0;
69 for (int i=0; i<2; i++) fRec3[i] = 0;
70 for (int i=0; i<2; i++) fRec0[i] = 0;
71 }
72
73 void Dsp::clear_state_f_static(PluginLV2 *p)
74 {
75 static_cast<Dsp*>(p)->clear_state_f();
76 }
77
78 inline void Dsp::init(uint32_t samplingFreq)
79 {
80 fSamplingFreq = samplingFreq;
81 iConst0 = min(192000, max(1, fSamplingFreq));
82 fConst1 = (1.0 / iConst0);
83 fConst2 = (0.5 * iConst0);
84 fConst3 = (6.283185307179586 / iConst0);
85 clear_state_f();
86 }
87
88 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
89 {
90 static_cast<Dsp*>(p)->init(samplingFreq);
91 }
92
93 inline void Dsp::compute(int count, float *input0, float *output0)
94 {
95 #define fslider0 (*fslider0_)
96 #define fcheckbox0 (*fcheckbox0_)
97 #define fslider1 (*fslider1_)
98 #define fslider2 (*fslider2_)
99 double fSlow0 = fslider0;
100 int iSlow1 = int((fConst2 / double(fSlow0)));
101 double fSlow2 = (1.0 / iSlow1);
102 double fSlow3 = (fConst3 * fSlow0);
103 int iSlow4 = int(fcheckbox0);
104 double fSlow5 = fslider1;
105 double fSlow6 = fslider2;
106 double fSlow7 = (27.0 * fSlow6);
107 double fSlow8 = (1 - (0.01 * fSlow6));
108 for (int i=0; i<count; i++) {
109 iVec0[0] = 1;
110 double fTemp0 = (fRec0[1] * (1 - (fConst1 / (fConst1 + (0.06 * exp((0 - (2.4849066497880004 * fRec0[1]))))))));
111 iRec2[0] = ((int((iRec2[1] > 0)))?((2 * (iRec1[1] < iSlow1)) - 1):(1 - (2 * (iRec1[1] > 0))));
112 iRec1[0] = (iRec2[0] + iRec1[1]);
113 fRec5[0] = ((fSlow3 * (0 - fRec3[1])) + fRec5[1]);
114 fRec4[0] = ((1 + ((fSlow3 * fRec5[0]) + fRec4[1])) - iVec0[1]);
115 fRec3[0] = fRec4[0];
116 fRec0[0] = (fTemp0 + (fConst1 * (pow((1 + (fSlow5 * (((iSlow4)?max(0, (0.5 * (1 + fRec3[0]))):(fSlow2 * iRec1[0])) - 1))),1.9) / (fConst1 + (0.06 * exp((0 - (2.4849066497880004 * fTemp0))))))));
117 output0[i] = (FAUSTFLOAT)((double)input0[i] * (fSlow8 + (fSlow7 / (2700 + exp((13.815510557964274 / log((2.718281828459045 + (8.551967507929417 * fRec0[0])))))))));
118 // post processing
119 fRec0[1] = fRec0[0];
120 fRec3[1] = fRec3[0];
121 fRec4[1] = fRec4[0];
122 fRec5[1] = fRec5[0];
123 iRec1[1] = iRec1[0];
124 iRec2[1] = iRec2[0];
125 iVec0[1] = iVec0[0];
126 }
127 #undef fslider0
128 #undef fcheckbox0
129 #undef fslider1
130 #undef fslider2
131 }
132
133 void Dsp::compute_static(int count, float *input0, float *output0, PluginLV2 *p)
134 {
135 static_cast<Dsp*>(p)->compute(count, input0, output0);
136 }
137
138
139 void Dsp::connect(uint32_t port,void* data)
140 {
141 switch ((PortIndex)port)
142 {
143 case WET_DRY:
144 fslider2_ = (float*)data; // , 1e+02, 0.0, 1e+02, 1.0
145 break;
146 // static const value_pair fcheckbox0_values[] = {{"triangle"},{"sine"},{0}};
147 case SINE:
148 fcheckbox0_ = (float*)data; // , 0.0, 0.0, 1.0, 1.0
149 break;
150 case DEPTH:
151 fslider1_ = (float*)data; // , 0.5, 0.0, 1.0, 0.01
152 break;
153 case FREQ:
154 fslider0_ = (float*)data; // , 5.0, 0.1, 5e+01, 0.1
155 break;
156 default:
157 break;
158 }
159 }
160
161 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
162 {
163 static_cast<Dsp*>(p)->connect(port, data);
164 }
165
166
167 PluginLV2 *plugin() {
168 return new Dsp();
169 }
170
171 void Dsp::del_instance(PluginLV2 *p)
172 {
173 delete static_cast<Dsp*>(p);
174 }
175
176 /*
177 typedef enum
178 {
179 WET_DRY,
180 SINE,
181 DEPTH,
182 FREQ,
183 } PortIndex;
184 */
185
186 } // end namespace tremolo
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix pset: <http://lv2plug.in/ns/ext/presets#> .
20 @prefix state: <http://lv2plug.in/ns/ext/state#> .
21 @prefix doap: <http://usefulinc.com/ns/doap#> .
22 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
23 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
24 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
25 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
26 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
27 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
28 @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
29 @prefix opt: <http://lv2plug.in/ns/ext/options#> .
30 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
31 @prefix work: <http://lv2plug.in/ns/ext/worker#> .
32
33 <http://guitarix.sourceforge.net#me>
34 a foaf:Person ;
35 foaf:name "Guitarix team" ;
36 foaf:mbox <mailto:brummer@web.de> ;
37 rdfs:seeAlso <http://guitarix.sourceforge.net> .
38
39 <http://guitarix.sourceforge.net/plugins/gx_amp>
40 a doap:Project ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxAmplifier" .
43
44 <http://guitarix.sourceforge.net/plugins/gx_amp#GUITARIX>
45 a lv2:Plugin ,
46 lv2:AmplifierPlugin ;
47 doap:maintainer <http://guitarix.sourceforge.net#me> ;
48 doap:name "GxAmplifier-X";
49 doap:license <http://opensource.org/licenses/isc> ;
50 lv2:project <http://guitarix.sourceforge.net/plugins/gx_amp> ;
51 lv2:optionalFeature lv2:hardRTCapable ;
52 lv2:requiredFeature urid:map ,
53 bufsz:boundedBlockLength ,
54 work:schedule ;
55 bufsz:minBlockLength 64 ;
56 bufsz:maxBlockLength 8192 ;
57 lv2:extensionData work:interface ;
58
59 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_amp#gui>;
60
61 lv2:port [
62 a lv2:InputPort ,
63 lv2:ControlPort ;
64 lv2:index 0 ;
65 lv2:symbol "MasterGain" ;
66 lv2:name "MasterGain";
67 lv2:default -15.0 ;
68 lv2:minimum -20.0 ;
69 lv2:maximum 20.0 ;
70 ] , [
71 a lv2:InputPort ,
72 lv2:ControlPort ;
73 lv2:index 1 ;
74 lv2:symbol "PreGain" ;
75 lv2:name "PreGain";
76 lv2:default 0.0 ;
77 lv2:minimum -20.0 ;
78 lv2:maximum 20.0 ;
79 ] , [
80 a lv2:InputPort ,
81 lv2:ControlPort ;
82 lv2:index 2 ;
83 lv2:symbol "Distortion" ;
84 lv2:name "Distortion";
85 lv2:default 20.0 ;
86 lv2:minimum 1.0 ;
87 lv2:maximum 100.0 ;
88 ] , [
89 a lv2:InputPort ,
90 lv2:ControlPort ;
91 lv2:index 3 ;
92 lv2:symbol "Drive" ;
93 lv2:name "Drive";
94 lv2:default 0.25 ;
95 lv2:minimum 0.01 ;
96 lv2:maximum 1.0 ;
97 ] ,[
98 a lv2:InputPort ,
99 lv2:ControlPort ;
100 lv2:index 4 ;
101 lv2:symbol "Middle" ;
102 lv2:name "Middle";
103 lv2:default 0.5 ;
104 lv2:minimum 0.0 ;
105 lv2:maximum 1.0 ;
106 ] , [
107 a lv2:InputPort ,
108 lv2:ControlPort ;
109 lv2:index 5 ;
110 lv2:symbol "Bass" ;
111 lv2:name "Bass";
112 lv2:default 0.5 ;
113 lv2:minimum 0.0 ;
114 lv2:maximum 1.0 ;
115 ] , [
116 a lv2:InputPort ,
117 lv2:ControlPort ;
118 lv2:index 6 ;
119 lv2:symbol "Treble" ;
120 lv2:name "Treble";
121 lv2:default 0.5 ;
122 lv2:minimum 0.0 ;
123 lv2:maximum 1.0 ;
124 ] , [
125 a lv2:InputPort ,
126 lv2:ControlPort ;
127 lv2:index 7 ;
128 lv2:symbol "Cabinet" ;
129 lv2:name "Cabinet";
130 lv2:default 10.0 ;
131 lv2:minimum 1.0 ;
132 lv2:maximum 20.0 ;
133 ] , [
134 a lv2:InputPort ,
135 lv2:ControlPort ;
136 lv2:index 8 ;
137 lv2:symbol "Presence" ;
138 lv2:name "Presence";
139 lv2:default 5.0 ;
140 lv2:minimum 1.0 ;
141 lv2:maximum 10.0 ;
142 ] , [
143 a lv2:InputPort ,
144 lv2:ControlPort ;
145 lv2:index 9 ;
146 lv2:symbol "model" ;
147 lv2:name "Model" ;
148 lv2:default 0 ;
149 lv2:minimum 0 ;
150 lv2:maximum 17 ;
151 lv2:portProperty lv2:integer;
152 lv2:portProperty lv2:enumeration ;
153 lv2:scalePoint [rdfs:label "12ax7"; rdf:value 0];
154 lv2:scalePoint [rdfs:label "12AU7"; rdf:value 1];
155 lv2:scalePoint [rdfs:label "12AT7"; rdf:value 2];
156 lv2:scalePoint [rdfs:label "6DJ8"; rdf:value 3];
157 lv2:scalePoint [rdfs:label "6C16"; rdf:value 4];
158 lv2:scalePoint [rdfs:label "6V6"; rdf:value 5];
159 lv2:scalePoint [rdfs:label "12ax7 feedback"; rdf:value 6];
160 lv2:scalePoint [rdfs:label "12AU7 feedback"; rdf:value 7];
161 lv2:scalePoint [rdfs:label "12AT7 feedback"; rdf:value 8];
162 lv2:scalePoint [rdfs:label "6DJ8 feedback"; rdf:value 9];
163 lv2:scalePoint [rdfs:label "pre 12ax7/ master 6V6"; rdf:value 10];
164 lv2:scalePoint [rdfs:label "pre 12AU7/ master 6V6"; rdf:value 11];
165 lv2:scalePoint [rdfs:label "pre 12AT7/ master 6V6"; rdf:value 12];
166 lv2:scalePoint [rdfs:label "pre 6DJ8/ master 6V6"; rdf:value 13];
167 lv2:scalePoint [rdfs:label "pre 12ax7/ push-pull 6V6"; rdf:value 14];
168 lv2:scalePoint [rdfs:label "pre 12AU7/ push-pull 6V6"; rdf:value 15];
169 lv2:scalePoint [rdfs:label "pre 12AT7/ push pull 6V6"; rdf:value 16];
170 lv2:scalePoint [rdfs:label "pre 6DJ8/ push-pull 6V6"; rdf:value 17];
171 ] , [
172 a lv2:InputPort ,
173 lv2:ControlPort ;
174 lv2:index 10 ;
175 lv2:symbol "t_model" ;
176 lv2:name "Tonestack Model" ;
177 lv2:default 1 ;
178 lv2:minimum 0 ;
179 lv2:maximum 25 ;
180 lv2:portProperty lv2:integer;
181 lv2:portProperty lv2:enumeration ;
182 lv2:scalePoint [rdfs:label "default"; rdf:value 0];
183 lv2:scalePoint [rdfs:label "Bassman"; rdf:value 1];
184 lv2:scalePoint [rdfs:label "Twin Reverb"; rdf:value 2];
185 lv2:scalePoint [rdfs:label "Princeton"; rdf:value 3];
186 lv2:scalePoint [rdfs:label "JCM-800"; rdf:value 4];
187 lv2:scalePoint [rdfs:label "JCM-2000"; rdf:value 5];
188 lv2:scalePoint [rdfs:label "M-Lead"; rdf:value 6];
189 lv2:scalePoint [rdfs:label "M2199"; rdf:value 7];
190 lv2:scalePoint [rdfs:label "AC-30"; rdf:value 8];
191 lv2:scalePoint [rdfs:label "Mesa Boogie"; rdf:value 9];
192 lv2:scalePoint [rdfs:label "SOL 100"; rdf:value 10];
193 lv2:scalePoint [rdfs:label "JTM-45"; rdf:value 11];
194 lv2:scalePoint [rdfs:label "AC-15"; rdf:value 12];
195 lv2:scalePoint [rdfs:label "Peavey"; rdf:value 13];
196 lv2:scalePoint [rdfs:label "Ibanez"; rdf:value 14];
197 lv2:scalePoint [rdfs:label "Roland"; rdf:value 15];
198 lv2:scalePoint [rdfs:label "Ampeg"; rdf:value 16];
199 lv2:scalePoint [rdfs:label "Rev.Rocket"; rdf:value 17];
200 lv2:scalePoint [rdfs:label "MIG 100 H"; rdf:value 18];
201 lv2:scalePoint [rdfs:label "Triple Giant"; rdf:value 19];
202 lv2:scalePoint [rdfs:label "Trio Preamp"; rdf:value 20];
203 lv2:scalePoint [rdfs:label "Hughes&Kettner"; rdf:value 21];
204 lv2:scalePoint [rdfs:label "Fender Junior"; rdf:value 22];
205 lv2:scalePoint [rdfs:label "Fender"; rdf:value 23];
206 lv2:scalePoint [rdfs:label "Fender Deville"; rdf:value 24];
207 lv2:scalePoint [rdfs:label "Gibsen"; rdf:value 25];
208 ] , [
209 a lv2:InputPort ,
210 lv2:ControlPort ;
211 lv2:index 11 ;
212 lv2:symbol "c_model" ;
213 lv2:name "Cab Model" ;
214 lv2:default 0 ;
215 lv2:minimum 0 ;
216 lv2:maximum 17 ;
217 lv2:portProperty lv2:integer;
218 lv2:portProperty lv2:enumeration ;
219 lv2:scalePoint [rdfs:label "4x12"; rdf:value 0];
220 lv2:scalePoint [rdfs:label "2x12"; rdf:value 1];
221 lv2:scalePoint [rdfs:label "1x12"; rdf:value 2];
222 lv2:scalePoint [rdfs:label "4x10"; rdf:value 3];
223 lv2:scalePoint [rdfs:label "2x10"; rdf:value 4];
224 lv2:scalePoint [rdfs:label "HighGain"; rdf:value 5];
225 lv2:scalePoint [rdfs:label "Twin"; rdf:value 6];
226 lv2:scalePoint [rdfs:label "Bassman"; rdf:value 7];
227 lv2:scalePoint [rdfs:label "Marshall"; rdf:value 8];
228 lv2:scalePoint [rdfs:label "AC30"; rdf:value 9];
229 lv2:scalePoint [rdfs:label "Princeton"; rdf:value 10];
230 lv2:scalePoint [rdfs:label "A2"; rdf:value 11];
231 lv2:scalePoint [rdfs:label "1x15"; rdf:value 12];
232 lv2:scalePoint [rdfs:label "Mesa"; rdf:value 13];
233 lv2:scalePoint [rdfs:label "Briliant"; rdf:value 14];
234 lv2:scalePoint [rdfs:label "Vitalize"; rdf:value 15];
235 lv2:scalePoint [rdfs:label "Charisma"; rdf:value 16];
236 lv2:scalePoint [rdfs:label "1x8"; rdf:value 17];
237 ] , [
238 a lv2:InputPort ,
239 atom:AtomPort ;
240 atom:bufferType atom:Sequence ;
241 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
242 lv2:index 12 ;
243 lv2:symbol "control" ;
244 lv2:name "Control" ;
245 ] , [
246 a lv2:OutputPort ,
247 atom:AtomPort ;
248 atom:bufferType atom:Sequence ;
249 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
250 lv2:index 13 ;
251 lv2:symbol "notify" ;
252 lv2:name "Notify" ;
253 ] , [
254 a lv2:AudioPort ,
255 lv2:OutputPort ;
256 lv2:index 14 ;
257 lv2:symbol "out" ;
258 lv2:name "Out" ;
259 ] , [
260 a lv2:AudioPort ,
261 lv2:InputPort ;
262 lv2:index 15 ;
263 lv2:symbol "in" ;
264 lv2:name "in" ;
265 ] .
266
267 <http://guitarix.sourceforge.net/plugins/gx_amp#gui>
268 a guiext:GtkUI;
269 guiext:binary <gx_amp_gui.so>;
270 guiext:requiredFeature guiext:makeResident;
271 lv2:extensionData work:interface ;
272 guiext:portNotification [
273 guiext:plugin <http://guitarix.sourceforge.net/plugins/gx_amp#GUITARIX>;
274 lv2:symbol "notify" ;
275 guiext:notifyType atom:Blank
276 ] .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <glibmm.h>
20 #include "gx_common.h"
21
22 /****************************************************************
23 ** "atomic" value access
24 */
25
26 inline void atomic_set(volatile int32_t* p, int32_t v)
27 {
28 g_atomic_int_set(p, v);
29 }
30
31 inline int32_t atomic_get(volatile int32_t& p)
32 {
33 return g_atomic_int_get(&p);
34 }
35
36 inline bool atomic_compare_and_exchange(volatile int32_t *p, int32_t oldv, int32_t newv)
37 {
38 return g_atomic_int_compare_and_exchange(p, oldv, newv);
39 }
40
41 template <class T>
42 inline void atomic_set(T **p, T *v)
43 {
44 g_atomic_pointer_set(p, v);
45 }
46
47 template <class T>
48 inline void atomic_set_0(T **p)
49 {
50 g_atomic_pointer_set(p, 0);
51 }
52
53 template <class T>
54 inline T *atomic_get(T*& p)
55 {
56 return static_cast<T*>(g_atomic_pointer_get(&p));
57 }
58
59 template <class T>
60 inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv)
61 {
62 return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), oldv, newv);
63 }
64
65
66 #include "gxamp.h"
67 #include "gx_resampler.h"
68 #include "gx_convolver.h"
69 #include "gx_tonestack.h"
70 #include "gx_amp.h"
71 #include "impulse_former.h"
72 #include "ampulse_former.h"
73 #ifndef __SSE__
74 #include "noiser.cc"
75 #endif
76 #include "cab_data_table.cc"
77
78 ////////////////////////////// MONO ////////////////////////////////////
79
80 class GxPluginMono
81 {
82 private:
83 // internal stuff
84 float* output;
85 float* input;
86 uint32_t s_rate;
87 int32_t prio;
88 #ifndef __SSE__
89 PluginLV2* wn;
90 #endif
91 PluginLV2* amplifier[AMP_COUNT];
92 PluginLV2* tonestack[TS_COUNT];
93 float* a_model;
94 uint32_t a_model_;
95 uint32_t a_max;
96 float* t_model;
97 uint32_t t_model_;
98 uint32_t t_max;
99 gx_resample::BufferResampler resamp;
100 GxSimpleConvolver cabconv;
101 Impf impf;
102 gx_resample::BufferResampler resamp1;
103 GxSimpleConvolver ampconv;
104 Ampf ampf;
105 uint32_t bufsize;
106 LV2_Atom_Sequence* c_notice;
107 LV2_Atom_Sequence* n_notice;
108 float *clevel;
109 float clevel_;
110 float cab;
111 float *c_model;
112 float c_model_;
113 float c_old_model_;
114 float *alevel;
115 float alevel_;
116 float pre;
117 float val;
118 bool doit;
119 volatile int32_t schedule_wait;
120
121 inline bool cab_changed()
122 {return abs(cab - (clevel_ + c_model_)) > 0.1;}
123 inline void update_cab()
124 {cab = (clevel_ + c_model_); c_old_model_ = c_model_;}
125 inline bool change_cab()
126 {return abs(c_old_model_ - c_model_) > 0.1;}
127 inline bool pre_changed()
128 {return abs(pre - alevel_) > 0.1;}
129 inline void update_pre()
130 {pre = (alevel_);}
131 inline bool val_changed()
132 {return abs(val - ((*alevel) + (*clevel) + (*c_model))) > 0.1;}
133 inline void update_val()
134 {val = (alevel_) + (clevel_) + (c_model_);}
135
136 // LV2 stuff
137 LV2_URID_Map* map;
138 LV2_Worker_Schedule* schedule;
139
140 inline void clean();
141 inline void run_dsp_mono(uint32_t n_samples);
142 inline void connect_mono(uint32_t port,void* data);
143 inline void init_dsp_mono(uint32_t rate, uint32_t bufsize_);
144 inline void do_work_mono();
145 inline void connect_all_mono_ports(uint32_t port, void* data);
146 inline void activate_f();
147 inline void deactivate_f();
148
149 public:
150 // LV2 Descriptor
151 static const LV2_Descriptor descriptor;
152 static const void* extension_data(const char* uri);
153 // static wrapper to private functions
154 static void deactivate(LV2_Handle instance);
155 static void cleanup(LV2_Handle instance);
156 static void run(LV2_Handle instance, uint32_t n_samples);
157 static void activate(LV2_Handle instance);
158 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
159
160 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
161 double rate, const char* bundle_path,
162 const LV2_Feature* const* features);
163
164 static LV2_Worker_Status work(LV2_Handle instance,
165 LV2_Worker_Respond_Function respond,
166 LV2_Worker_Respond_Handle handle,
167 uint32_t size, const void* data);
168
169 static LV2_Worker_Status work_response(LV2_Handle instance,
170 uint32_t size,
171 const void* data);
172
173 GxPluginMono();
174 ~GxPluginMono();
175 };
176
177 // constructor
178 GxPluginMono::GxPluginMono() :
179 output(NULL),
180 input(NULL),
181 s_rate(0),
182 prio(0),
183 a_model(NULL),
184 a_model_(0),
185 t_model(NULL),
186 t_model_(1),
187 cabconv(GxSimpleConvolver(resamp)),
188 impf(Impf()),
189 ampconv(GxSimpleConvolver(resamp1)),
190 ampf(Ampf()),
191 bufsize(0),
192 clevel(NULL),
193 clevel_(0),
194 cab(0),
195 c_model(NULL),
196 c_model_(0),
197 c_old_model_(0),
198 alevel(NULL),
199 alevel_(0),
200 pre(0),
201 val(0)
202 {
203 atomic_set(&schedule_wait,0);
204 };
205 // destructor
206 GxPluginMono::~GxPluginMono()
207 {
208 cabconv.stop_process();
209 cabconv.cleanup();
210 ampconv.stop_process();
211 ampconv.cleanup();
212 };
213
214 // plugin stuff
215
216 void GxPluginMono::do_work_mono()
217 {
218 if (cab_changed())
219 {
220 if (cabconv.is_runnable())
221 {
222 cabconv.set_not_runnable();
223 cabconv.stop_process();
224 }
225 // selected cabinet have changed?
226 if (change_cab())
227 {
228 cabconv.cleanup();
229 CabDesc& cab = *getCabEntry(static_cast<uint32_t>(c_model_)).data;
230 cabconv.cab_count = cab.ir_count;
231 cabconv.cab_sr = cab.ir_sr;
232 cabconv.cab_data = cab.ir_data;
233
234 cabconv.set_samplerate(s_rate);
235 cabconv.set_buffersize(bufsize);
236 cabconv.configure(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
237 //printf("cabconv.changed.\n");
238 }
239 float cab_irdata_c[cabconv.cab_count];
240 float adjust_1x8 = 1;
241 if ( c_model_ == 17.0) adjust_1x8 = 0.5;
242 impf.compute(cabconv.cab_count, cabconv.cab_data, cab_irdata_c, (clevel_ * adjust_1x8) );
243 cabconv.cab_data_new = cab_irdata_c;
244 while (!cabconv.checkstate());
245 if (!cabconv.update(cabconv.cab_count, cabconv.cab_data_new, cabconv.cab_sr))
246 printf("cabconv.update fail.\n");
247 if(!cabconv.start(prio, SCHED_FIFO))
248 printf("cabinet convolver disabled\n");
249 update_cab();
250 //printf("cabinet convolver updated\n");
251 }
252 if (pre_changed())
253 {
254 if (ampconv.is_runnable())
255 {
256 ampconv.set_not_runnable();
257 ampconv.stop_process();
258 }
259 float pre_irdata_c[contrast_ir_desc.ir_count];
260 ampf.compute(contrast_ir_desc.ir_count,contrast_ir_desc.ir_data, pre_irdata_c, alevel_);
261 while (!ampconv.checkstate());
262 if (!ampconv.update(contrast_ir_desc.ir_count, pre_irdata_c, contrast_ir_desc.ir_sr))
263 printf("ampconv.update fail.\n");
264 if(!ampconv.start(prio, SCHED_FIFO))
265 printf("presence convolver disabled\n");
266 update_pre();
267 //printf("presence convolver updated\n");
268 }
269 update_val();
270 atomic_set(&schedule_wait,0);
271 }
272
273 void GxPluginMono::init_dsp_mono(uint32_t rate, uint32_t bufsize_)
274 {
275 AVOIDDENORMALS();
276
277 bufsize = bufsize_;
278 s_rate = rate;
279
280 #ifndef __SSE__
281 wn = noiser::plugin();
282 wn->set_samplerate(rate, wn);
283 #endif
284
285 for(uint32_t i=0; i<AMP_COUNT; i++) {
286 amplifier[i] = amp_model[i]();
287 amplifier[i]->set_samplerate(rate, amplifier[i]);
288 }
289 a_max = AMP_COUNT-1;
290 for(uint32_t i=0; i<TS_COUNT; i++) {
291 tonestack[i] = tonestack_model[i]();
292 tonestack[i]->set_samplerate(rate, tonestack[i]);
293 }
294 t_max = TS_COUNT-1;
295 if (bufsize )
296 {
297 #ifdef _POSIX_PRIORITY_SCHEDULING
298 int priomax = sched_get_priority_max(SCHED_FIFO);
299 if ((priomax/2) > 0) prio = priomax/2;
300 #endif
301 // set cabinet data
302 CabDesc& cab = *getCabEntry(static_cast<uint32_t>(c_model_)).data;
303 cabconv.cab_count = cab.ir_count;
304 cabconv.cab_sr = cab.ir_sr;
305 cabconv.cab_data = cab.ir_data;
306
307 cabconv.set_samplerate(rate);
308 cabconv.set_buffersize(bufsize);
309 cabconv.configure(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
310 while (!cabconv.checkstate());
311 if(!cabconv.start(prio, SCHED_FIFO))
312 printf("cabinet convolver disabled\n");
313
314 ampconv.set_samplerate(rate);
315 ampconv.set_buffersize(bufsize);
316 ampconv.configure(contrast_ir_desc.ir_count, contrast_ir_desc.ir_data, contrast_ir_desc.ir_sr);
317 while (!ampconv.checkstate());
318 if(!ampconv.start(prio, SCHED_FIFO))
319 printf("presence convolver disabled\n");
320 }
321 else
322 {
323 printf("convolver disabled\n");
324 }
325 }
326
327
328 void GxPluginMono::connect_mono(uint32_t port,void* data)
329 {
330 switch ((PortIndex)port)
331 {
332 case CLevel:
333 clevel = static_cast<float*>(data);
334 break;
335 case ALevel:
336 alevel = static_cast<float*>(data);
337 break;
338 case AMP_CONTROL:
339 c_notice = (LV2_Atom_Sequence*)data;
340 break;
341 case AMP_NOTIFY:
342 n_notice = (LV2_Atom_Sequence*)data;
343 break;
344 case MODEL:
345 a_model = static_cast<float*>(data);
346 break;
347 case T_MODEL:
348 t_model = static_cast<float*>(data);
349 break;
350 case C_MODEL:
351 c_model = static_cast<float*>(data);
352 break;
353 case AMP_OUTPUT:
354 output = static_cast<float*>(data);
355 break;
356 case AMP_INPUT:
357 input = static_cast<float*>(data);
358 break;
359 default:
360 break;
361 }
362 }
363
364 void GxPluginMono::run_dsp_mono(uint32_t n_samples)
365 {
366 // run dsp
367 #ifndef __SSE__
368 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
369 #endif
370 // run selected tube model
371 a_model_ = min(a_max, static_cast<uint32_t>(*(a_model)));
372 amplifier[a_model_]->mono_audio(static_cast<int>(n_samples), input, output, amplifier[a_model_]);
373 // run presence convolver
374 ampconv.run_static(n_samples, &ampconv, output);
375 // run selected tonestack
376 t_model_ = min(t_max, static_cast<uint32_t>(*(t_model)));
377 tonestack[t_model_]->mono_audio(static_cast<int>(n_samples), output, output, tonestack[t_model_]);
378 // run selected cabinet convolver
379 cabconv.run_static(n_samples, &cabconv, output);
380
381 // work ?
382 if (!atomic_get(schedule_wait) && val_changed())
383 {
384 clevel_ = (*clevel);
385 alevel_ = (*alevel);
386 c_model_= (*c_model);
387 atomic_set(&schedule_wait,1);
388 schedule->schedule_work(schedule->handle, sizeof(bool), &doit);
389 }
390 }
391
392 void GxPluginMono::connect_all_mono_ports(uint32_t port, void* data)
393 {
394 connect_mono(port,data);
395
396 for(uint32_t i=0; i<AMP_COUNT; i++) {
397 amplifier[i]->connect_ports(port, data, amplifier[i]);
398 }
399 for(uint32_t i=0; i<TS_COUNT; i++) {
400 tonestack[i]->connect_ports(port, data, tonestack[i]);
401 }
402 }
403
404 void GxPluginMono::activate_f()
405 {
406 // allocate the internal DSP mem
407
408 }
409
410 void GxPluginMono::deactivate_f()
411 {
412 // delete the internal DSP mem
413
414 }
415
416 void GxPluginMono::clean()
417 {
418 #ifndef __SSE__
419 wn->delete_instance(wn);;
420 #endif
421 for(uint32_t i=0; i<AMP_COUNT; i++) {
422 amplifier[i]->delete_instance(amplifier[i]);
423 }
424 for(uint32_t i=0; i<TS_COUNT; i++) {
425 tonestack[i]->delete_instance(tonestack[i]);
426 }
427 }
428 ///////////////////////////// LV2 defines //////////////////////////////
429
430 LV2_Worker_Status GxPluginMono::work(LV2_Handle instance,
431 LV2_Worker_Respond_Function respond,
432 LV2_Worker_Respond_Handle handle,
433 uint32_t size,
434 const void* data)
435 {
436 static_cast<GxPluginMono*>(instance)->do_work_mono();
437 return LV2_WORKER_SUCCESS;
438 }
439
440 LV2_Worker_Status GxPluginMono::work_response(LV2_Handle instance,
441 uint32_t size,
442 const void* data)
443 {
444 //printf("worker respose.\n");
445 return LV2_WORKER_SUCCESS;
446 }
447
448
449 LV2_Handle GxPluginMono::instantiate(const LV2_Descriptor* descriptor,
450 double rate,
451 const char* bundle_path,
452 const LV2_Feature* const* features)
453 {
454
455 GxPluginMono *self = new GxPluginMono();
456 if (!self)
457 {
458 return NULL;
459 }
460
461 const LV2_Options_Option* options = NULL;
462 uint32_t bufsize = 0;
463 //printf(" %s\n",descriptor->URI);
464
465 for (int32_t i = 0; features[i]; ++i)
466 {
467 if (!strcmp(features[i]->URI, LV2_URID__map))
468 {
469 self->map = (LV2_URID_Map*)features[i]->data;
470 }
471 else if (!strcmp(features[i]->URI, LV2_WORKER__schedule))
472 {
473 self->schedule = (LV2_Worker_Schedule*)features[i]->data;
474 }
475 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
476 {
477 options = (const LV2_Options_Option*)features[i]->data;
478 }
479 }
480 if (!self->schedule)
481 {
482 fprintf(stderr, "Missing feature work:schedule.\n");
483 delete self;
484 return NULL;
485 }
486 if (!self->map)
487 {
488 fprintf(stderr, "Missing feature uri:map.\n");
489 }
490 else if (!options)
491 {
492 fprintf(stderr, "Missing feature options.\n");
493 }
494 else
495 {
496 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
497 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
498
499 for (const LV2_Options_Option* o = options; o->key; ++o)
500 {
501 if (o->context == LV2_OPTIONS_INSTANCE &&
502 o->key == bufsz_max &&
503 o->type == atom_Int)
504 {
505 bufsize = *(const int32_t*)o->value;
506 }
507 }
508
509 if (bufsize == 0)
510 {
511 fprintf(stderr, "No maximum buffer size given.\n");
512 }
513 printf("using block size: %d\n", bufsize);
514 }
515 self->init_dsp_mono((uint32_t)rate, bufsize);
516
517 return (LV2_Handle)self;
518 }
519
520 void GxPluginMono::connect_port(LV2_Handle instance,
521 uint32_t port,
522 void* data)
523 {
524 static_cast<GxPluginMono*>(instance)->connect_all_mono_ports(port, data);
525 }
526
527 void GxPluginMono::activate(LV2_Handle instance)
528 {
529
530 }
531
532 void GxPluginMono::run(LV2_Handle instance, uint32_t n_samples)
533 {
534 static_cast<GxPluginMono*>(instance)->run_dsp_mono(n_samples);
535 }
536
537 void GxPluginMono::deactivate(LV2_Handle instance)
538 {
539
540 }
541
542 void GxPluginMono::cleanup(LV2_Handle instance)
543 {
544 GxPluginMono* self = (GxPluginMono*)instance;
545 self->clean();
546 delete self;
547 }
548
549 //////////////////////////////////////////////////////////////////
550
551 const void* GxPluginMono::extension_data(const char* uri)
552 {
553 static const LV2_Worker_Interface worker = { work, work_response, NULL };
554 if (!strcmp(uri, LV2_WORKER__interface))
555 {
556 return &worker;
557 }
558 return NULL;
559 }
560
561 const LV2_Descriptor GxPluginMono::descriptor =
562 {
563 GXPLUGIN_URI "#GUITARIX",
564 instantiate,
565 connect_port,
566 activate,
567 run,
568 deactivate,
569 cleanup,
570 extension_data
571 };
572
573 extern "C"
574 LV2_SYMBOL_EXPORT
575 const LV2_Descriptor*
576 lv2_descriptor(uint32_t index)
577 {
578 switch (index)
579 {
580 case 0:
581 return &GxPluginMono::descriptor;
582 default:
583 return NULL;
584 }
585 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXAMP_H_
22 #define SRC_HEADERS_GXAMP_H_
23
24 #include <lv2.h>
25 #include "lv2/lv2plug.in/ns/ext/state/state.h"
26 #include "lv2/lv2plug.in/ns/ext/presets/presets.h"
27 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
28 #include <lv2/lv2plug.in/ns/ext/options/options.h>
29 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
30 #include <lv2/lv2plug.in/ns/ext/log/log.h>
31 #include <lv2/lv2plug.in/ns/ext/worker/worker.h>
32 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
33
34 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_amp"
35 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_amp#gui"
36
37
38 typedef enum
39 {
40 GAIN1 = 0,
41 PREGAIN,
42 WET_DRY,
43 DRIVE,
44 MIDDLE,
45 BASS,
46 TREBLE,
47 CLevel,
48 ALevel,
49 MODEL,
50 T_MODEL,
51 C_MODEL,
52 AMP_CONTROL,
53 AMP_NOTIFY,
54 AMP_OUTPUT,
55 AMP_INPUT,
56 AMP_OUTPUT1,
57 AMP_INPUT1,
58 } PortIndex;
59
60 #endif //SRC_HEADERS_GXAMP_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxamp.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GXPluginGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name();
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GXPluginGUI *self)
47 {
48 self->set_plug_name();
49 }
50 static GtkWidget* make_gui_static(GXPluginGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GXPluginGUI () {};
56 ~GXPluginGUI () {};
57 } ;
58
59 void GXPluginGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " }\n"
75 "widget '*.";
76 addKnob += plug_name;
77 addKnob += "' style 'gx_";
78 addKnob += plug_name;
79 addKnob += "_dark_skin_icons' ";
80 }
81
82 void GXPluginGUI::set_skin()
83 {
84 Glib::ustring toparse = "pixmap_path ";
85 toparse += " '";
86 toparse += GX_LV2_STYLE_DIR;
87 toparse += "/'\n";
88 toparse += " style 'gx_selector'\n"
89 " {\n"
90 " fg[NORMAL] = { 0.32, 0.8, 0.16 }\n"
91 " GtkRange::trough-border = 2\n"
92 " GtkRange::stepper-size = 8\n"
93 " GtkRange::stepper-spacing = 2\n"
94 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
95 " font_name = 'sans 7.5'\n"
96 " xthickness = 10\n"
97 " ythickness = 1\n"
98 " }\n"
99 "class '*GxSelector' style:highest 'gx_selector'\n";
100 toparse += "style \"gx_";
101 toparse += plug_name;
102 toparse += "_dark-paintbox\"\n"
103 " { \n"
104 " GxPaintBox::icon-set =9\n"
105 " stock['amp_skin'] = {{'";
106 toparse += plugskin;
107 toparse += "'}}\n"
108 " }\n"
109 "\n"
110 "style 'gx_head_black_box' \n"
111 " { \n"
112 " fg[NORMAL] = '#afafaf' \n"
113 " }\n";
114 toparse += addKnob;
115
116 toparse += " widget '*.amplabel' style:highest 'gx_head_black_box'\n"
117 "widget '*.";
118 toparse += plug_name;
119 toparse += "' style 'gx_";
120 toparse += plug_name;
121 toparse += "_dark-paintbox' ";
122
123 gtk_rc_parse_string (toparse.c_str());
124 }
125
126 void GXPluginGUI::set_plug_name()
127 {
128 // Here the plugin should have different name for different amp.....
129 addKnob = "";
130 plugskin = "amp21.png";
131 plug_name = "GUITARIXLV2";
132 }
133
134 GtkWidget* GXPluginGUI::make_gui()
135 {
136 // init the gxwmm library
137 Gxw::init();
138 set_skin();
139 GtkWidget* container = gtk_vbox_new(FALSE, 2);
140 widget = new Widget(plug_name);
141 GtkWidget* cWidget = (GtkWidget*)widget->gobj();
142 gtk_container_add( (GtkContainer*)container, cWidget );
143
144 return container;
145 }
146
147
148 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
149 const char * plugin_uri,
150 const char * bundle_path,
151 LV2UI_Write_Function write_function,
152 LV2UI_Controller controller,
153 LV2UI_Widget * widget,
154 const LV2_Feature * const * features)
155 {
156 GXPluginGUI* self = new GXPluginGUI();
157 if (self == NULL) return NULL;
158 self->set_plug_name_static(self);
159 *widget = (LV2UI_Widget)self->make_gui_static(self);
160 self->widget->controller = controller;
161 self->widget->write_function = write_function;
162 return (LV2UI_Handle)self;
163 }
164
165 static void cleanup(LV2UI_Handle ui)
166 {
167 GXPluginGUI *pluginGui = (GXPluginGUI *) ui;
168 delete pluginGui->widget;
169 delete pluginGui;
170 }
171
172 static void port_event(LV2UI_Handle ui,
173 uint32_t port_index,
174 uint32_t buffer_size,
175 uint32_t format,
176 const void * buffer)
177 {
178 GXPluginGUI *self = (GXPluginGUI *) ui;
179 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
180 return;
181 }
182
183 static LV2UI_Descriptor descriptors[] =
184 {
185 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
186 };
187
188 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
189 {
190 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
191 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
192 {
193 return NULL;
194 }
195 return descriptors + index;
196 }
197
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_amp#GUITARIX>
23 a lv2:Plugin ;
24 lv2:binary <gx_amp.so> ;
25 rdfs:seeAlso <gx_amp.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_amp#GUITARIX>
23 a lv2:Plugin ;
24 lv2:binary <gx_amp@LIB_EXT@> ;
25 rdfs:seeAlso <gx_amp.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case GAIN1:
38 return &m_bigknob;
39 case PREGAIN:
40 return &m_bigknob1;
41 case WET_DRY:
42 return &m_bigknob2;
43 case DRIVE:
44 return &m_bigknob3;
45 case MIDDLE:
46 return &m_smallknob1;
47 case BASS:
48 return &m_smallknob2;
49 case TREBLE:
50 return &m_smallknob3;
51 case MODEL:
52 return &m_selector;
53 case T_MODEL:
54 return &t_selector;
55 case C_MODEL:
56 return &c_selector;
57 case CLevel:
58 return &m_smallknob4;
59 case ALevel:
60 return &m_smallknob5;
61 default:
62 return NULL;
63 }
64 }
65
66 Widget::Widget(Glib::ustring plugname):
67 plug_name(plugname)
68 {
69
70 // create all selectors
71 Glib::ustring tubes[] = {"12ax7","12AU7","12AT7","6DJ8","6C16","6V6","12ax7 feedback",
72 "12AU7 feedback","12AT7 feedback","6DJ8 feedback","pre 12ax7/ master 6V6","pre 12AU7/ master 6V6",
73 "pre 12AT7/ master 6V6","pre 6DJ8/ master 6V6","pre 12ax7/ push-pull 6V6","pre 12AU7/ push-pull 6V6",
74 "pre 12AT7/ push pull 6V6","pre 6DJ8/ push-pull 6V6"
75 };
76 static const size_t tubes_size = sizeof(tubes) / sizeof(tubes[0]);
77
78 make_selector("Tubes", tubes, tubes_size, 0, 1.0, MODEL);
79
80 m_hboxsel1.pack_start(m_selector,Gtk::PACK_SHRINK);
81 m_hboxsel1.pack_start(m_hboxsel2,Gtk::PACK_EXPAND_PADDING);
82 m_vboxsel.pack_start(m_hboxsel1,Gtk::PACK_EXPAND_PADDING);
83
84 Glib::ustring ts[] = {"default","Bassman","Twin Reverb","Princeton","JCM-800",
85 "JCM-2000","M-Lead","M2199","AC-30","Mesa Boogie","SOL 100","JTM-45","AC-15",
86 "Peavey","Ibanez","Roland","Ampeg","Rev.Rocket","MIG 100 H","Triple Giant",
87 "Trio Preamp","Hughes&Kettner","Fender Junior","Fender","Fender Deville",
88 "Gibsen",
89 };
90 static const size_t ts_size = sizeof(ts) / sizeof(ts[0]);
91
92 make_selector("Tonestacks", ts, ts_size, 0,1.0, T_MODEL);
93
94
95 Glib::ustring cab[] = {"4x12","2x12","1x12","4x10","2x10","HighGain","Twin",
96 "Bassman","Marshall","AC30","Princeton","A2","1x15","Mesa","Briliant","Vitalize",
97 "Charisma","1x8",
98 };
99 static const size_t cab_size = sizeof(cab) / sizeof(cab[0]);
100
101 make_selector("Cabinets", cab, cab_size, 0, 1.0, C_MODEL);
102
103 // create all controllers
104 make_controller_box(&m_vbox, "mastergain", -20, 20, 0.1, GAIN1);
105 make_controller_box(&m_vbox1, "pregain", -20, 20, 0.1, PREGAIN);
106 make_controller_box(&m_vbox2, "distortion", 1, 100, 1, WET_DRY);
107 make_controller_box(&m_vbox3, "drive", 0.01, 1, 0.01, DRIVE);
108 make_controller_box(&m_vbox4, "mid", 0, 1, 0.01, MIDDLE);
109 make_controller_box(&m_vbox5, "bass", 0, 1, 0.01, BASS);
110 make_controller_box(&m_vbox6, "treble", 0, 1, 0.01, TREBLE);
111 // put cabinet selector above cab controller
112 m_vbox7.pack_start(c_selector,Gtk::PACK_SHRINK);
113 make_controller_box(&m_vbox7, "cabinet", 1, 20, 1, CLevel);
114 make_controller_box(&m_vbox8, "presence", 1, 10, 1, ALevel);
115
116 // set propertys for the main paintbox holding the skin
117 m_paintbox.set_border_width(30);
118 m_paintbox.set_spacing(12);
119 m_paintbox.set_homogeneous(false);
120 m_paintbox.set_name(plug_name);
121 m_paintbox.property_paint_func() = "amp_skin_expose";
122 add(m_paintbox);
123 // box for the controllers
124 m_hbox_.set_spacing(12);
125 m_hbox_.set_homogeneous(false);
126 // this box set space for the upper part of the skin
127 m_hbox1_.set_spacing(12);
128 m_hbox1_.set_border_width(65);
129 // set a vertical box in the paintbox
130 m_paintbox.pack_start(m_vbox_);
131 // and put space box on top
132 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING);
133 // and controller box on bottem
134 m_vbox_.pack_start(m_hbox_,Gtk::PACK_SHRINK);
135 // amp controllers including the tube selector
136 m_hboxsel.set_spacing(12);
137 m_hboxsel.set_homogeneous(false);
138 m_hboxsel.pack_start(m_vbox1);
139 m_hboxsel.pack_start(m_vbox2);
140 m_hboxsel.pack_start(m_vbox3);
141 m_hboxsel.pack_start(m_vbox8);
142 m_hboxsel.pack_start(m_vbox);
143 m_vboxsel.pack_start(m_hboxsel);
144
145 // put boxed controllers into controller box
146 m_hbox_.pack_start(m_vboxhh);
147 m_hbox_.pack_start(m_vboxsel);
148 m_hbox_.pack_start(m_vbox7);
149 // etxra box for the boxed tonestack controllers
150 m_hboxtonestack1.pack_start(m_hboxtonestack3,Gtk::PACK_EXPAND_PADDING);
151 m_hboxtonestack1.pack_start(t_selector,Gtk::PACK_SHRINK);
152 m_hboxtonestack1.pack_start(m_hboxtonestack2,Gtk::PACK_EXPAND_PADDING);
153
154 m_vboxtonestack.pack_start(m_hboxtonestack1);
155 m_vboxtonestack.pack_start(m_hbox);
156 m_hbox.set_border_width(8);
157 m_hbox.pack_start(m_vbox5);
158 m_hbox.pack_start(m_vbox4);
159 m_hbox.pack_start(m_vbox6);
160 m_hbox.pack_start(m_vboxii);
161 m_hbox.set_spacing(5);
162 // add tonestack controller box to main controller box
163 m_hbox_.pack_start(m_vboxtonestack);
164
165 // connect expose handler as resize handler
166 m_paintbox.signal_expose_event().connect(
167 sigc::mem_fun(this, &Widget::_expose_event), true);
168
169 show_all();
170 }
171
172 Widget::~Widget()
173 {
174
175 }
176
177 // set borderwith for paintbox when widget resize
178 // to hold controllers in place
179 bool Widget::_expose_event(GdkEventExpose *event)
180 {
181 int x, y, width, height, depth;
182 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
183 //double_t height = m_paintbox.get_window()->get_height();
184 m_paintbox.set_border_width(height/10);
185 return false;
186 }
187
188 // create selectors from gxwmm
189 void Widget::make_selector(Glib::ustring labela,
190 Glib::ustring tables[],
191 size_t _size,
192 float min, float digits,
193 PortIndex port_name)
194 {
195 Gxw::Selector *regler = static_cast<Gxw::Selector*>
196 (get_controller_by_port(port_name));
197 if (regler)
198 {
199 float max = static_cast<float>(_size+1);
200
201 Gtk::TreeModelColumn<Glib::ustring> label;
202 Gtk::TreeModelColumnRecord rec;
203 rec.add(label);
204 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
205
206 for (uint32_t i = 0 ; i< _size; ++i) {
207 ls->append()->set_value(0, tables[i]);
208 }
209 regler->set_model(ls);
210 regler->set_has_tooltip();
211 regler->set_tooltip_text(labela);
212 regler->cp_configure("SELECTOR", labela, min, max, digits);
213 regler->set_show_value(false);
214 regler->set_name(plug_name);
215 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
216 *this, &Widget::on_value_changed), port_name));
217 }
218 }
219
220 // create stackboxes with controllers for port name
221 void Widget::make_controller_box(Gtk::Box *box,
222 Glib::ustring label,
223 float min, float max,
224 float digits,
225 PortIndex port_name)
226 {
227 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
228 get_controller_by_port(port_name));
229 if (regler)
230 {
231 //Gtk::Label* pr = new Gtk::Label(label, 0);
232 //pr->set_name("amplabel");
233 // use label images instead simple string labes
234 Glib::ustring label_image = GX_LV2_STYLE_DIR;
235 label_image += "/";
236 label_image += label;
237 label_image += "-label.png";
238 Gtk::Image *pr = new Gtk::Image(label_image);
239
240 Gtk::VBox* b1 = new Gtk::VBox();
241 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
242 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
243 regler->cp_configure("KNOB", label, min, max, digits);
244 regler->set_show_value(false);
245 regler->set_name(plug_name);
246 box->pack_start(*regler,Gtk::PACK_SHRINK);
247 Gtk::VBox* b2 = new Gtk::VBox();
248 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
249 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
250 *this, &Widget::on_value_changed), port_name));
251 }
252 }
253
254 // create stackboxes with switch controller for port name
255 void Widget::make_switch_box(Gtk::Box *box,
256 Glib::ustring label,
257 PortIndex port_name)
258 {
259 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
260 get_controller_by_port(port_name));
261 if (regler)
262 {
263 Gtk::Label* pr = new Gtk::Label(label, 0);
264 pr->set_name("amplabel");
265 // use label images instead simple string labes
266 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
267 label_image += "/"+plug_name+"-";
268 label_image += label;
269 label_image += "-label.png";
270 Gtk::Image *pr = new Gtk::Image(label_image);*/
271
272 regler->cp_configure("switch", label, 0, 1, 1);
273 regler->set_name(plug_name);
274 regler->set_base_name( "button" );
275 Gtk::VBox* b1 = new Gtk::VBox();
276 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
277 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
278 box->pack_start(*regler,Gtk::PACK_SHRINK);
279 Gtk::VBox* b2 = new Gtk::VBox();
280 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
281 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
282 *this, &Widget::on_value_changed), port_name));
283 }
284 }
285
286 // receive controller value changes from host and set them to controller
287 void Widget::set_value(uint32_t port_index,
288 uint32_t format,
289 const void * buffer)
290 {
291 if ( format == 0 )
292 {
293 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
294 get_controller_by_port(port_index));
295 if (regler)
296 {
297 float value = *static_cast<const float*>(buffer);
298 regler->cp_set_value(value);
299 check_for_skin(port_index, static_cast<int>(value));
300 }
301 }
302 }
303
304 // write (UI) controller value changes to the host->engine
305 void Widget::on_value_changed(uint32_t port_index)
306 {
307 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
308 get_controller_by_port(port_index));
309 if (regler)
310 {
311 float value = regler->cp_get_value();
312 write_function(controller, port_index, sizeof(float), 0,
313 static_cast<const void*>(&value));
314 check_for_skin(port_index, static_cast<int>(value));
315 }
316 }
317
318 void Widget::check_for_skin(uint32_t port_index, float model)
319 {
320 if (port_index == MODEL)
321 change_skin(static_cast<int>(model));
322 }
323
324 inline std::string to_string(int _Val)
325 { // convert int to string
326 char _Buf[4];
327 sprintf(_Buf, "%d", _Val);
328 return (std::string(_Buf));
329 }
330 void Widget::change_skin(int model)
331 {
332 std::string rcfile =GX_LV2_STYLE_DIR;
333 rcfile +="/gx_lv2-";
334 rcfile += to_string(model);
335 rcfile += ".rc";
336 gtk_rc_parse(rcfile.c_str());
337 gtk_rc_reset_styles(gtk_settings_get_default());
338 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxamp.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35 void check_for_skin(uint32_t port_index, float model);
36 void change_skin(int model);
37 void on_value_changed(uint32_t port_index);
38
39 void make_controller_box(Gtk::Box *box,
40 Glib::ustring label,
41 float min, float max,
42 float digits,
43 PortIndex port_name);
44
45 void make_selector(Glib::ustring label,
46 Glib::ustring tables[],
47 size_t _size,
48 float min, float digits,
49 PortIndex port_name);
50
51 void make_switch_box(Gtk::Box *box,
52 Glib::ustring label,
53 PortIndex port_name);
54
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plug_name);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::HBox m_hbox_;
80 Gtk::HBox m_hbox1_;
81 Gtk::VBox m_vbox;
82 Gtk::VBox m_vbox1;
83 Gtk::VBox m_vbox2;
84 Gtk::VBox m_vbox3;
85 Gtk::VBox m_vbox4;
86 Gtk::VBox m_vbox5;
87 Gtk::VBox m_vbox6;
88 Gtk::VBox m_vbox7;
89 Gtk::VBox m_vbox8;
90 Gtk::VBox m_vboxhh;
91 Gtk::VBox m_vboxii;
92 Gtk::VBox m_vboxsel;
93 Gtk::HBox m_hboxsel;
94 Gtk::HBox m_hboxsel1;
95 Gtk::HBox m_hboxsel2;
96 Gtk::VBox m_vboxtonestack;
97 Gtk::HBox m_hboxtonestack1;
98 Gtk::HBox m_hboxtonestack2;
99 Gtk::HBox m_hboxtonestack3;
100
101 Gxw::PaintBox m_paintbox;
102 Gtk::HBox m_hbox;
103 Gxw::BigKnob m_bigknob;
104 Gxw::BigKnob m_bigknob1;
105 Gxw::BigKnob m_bigknob2;
106 Gxw::BigKnob m_bigknob3;
107 Gxw::SmallKnob m_smallknob1;
108 Gxw::SmallKnob m_smallknob2;
109 Gxw::SmallKnob m_smallknob3;
110 Gxw::SmallKnobR m_smallknob4;
111 Gxw::SmallKnobR m_smallknob5;
112 Gxw::Selector m_selector;
113 Gxw::Selector t_selector;
114 Gxw::Selector c_selector;
115 };
116
117 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_amp.lv2'
10
11 src = ['gxamp.cpp',
12 '../DSP/gx_resampler.cc',
13 '../DSP/gx_convolver.cc'
14 ]
15 incl = ['../faust','./', '../DSP']
16 lib = []
17 if sys.platform.startswith("linux"):
18 lib.append('dl')
19 uselib = ['LV2CORE','GLIBMM']
20 if bld.env['ZITA_CONVOLVER']:
21 uselib.append('ZITA_CONVOLVER')
22 else:
23 src.append('../../zita-convolver/zita-convolver.cc')
24 incl.append('../../zita-convolver');
25 uselib.append('FFTW3')
26 if bld.env['ZITA_RESAMPLER']:
27 uselib.append('ZITA_RESAMPLER')
28 else:
29 src.append('../../zita-resampler-1.1.0/resampler.cc')
30 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
31 incl.append('../../zita-resampler-1.1.0')
32 cxxflag =[]
33 if not bld.env['OPT'] and bld.env['SSE2']:
34 cxxflag = [ "-msse2", "-mfpmath=sse"]
35 lv2_plugin = bld(
36 features='cxx cshlib ',
37 includes = incl,
38 lib = lib,
39 uselib = uselib,
40 obj_ext = '_8.o',
41 cxxflags = cxxflag,
42 defines = ["LV2_SO"],
43 target = 'gx_amp',
44 source = src,
45 install_path = '${LV2DIR}/%s' % bundle,
46 chmod = 0o755,
47 )
48 lv2_plugin.env['shlib_PATTERN'] = '%s.so'
49
50 uselib_local1 = []
51 libpath1 = []
52 lib1 = []
53 incl = ['../../../libgxwmm','../../../libgxw']
54 if sys.platform.startswith("linux"):
55 lib1.append('dl')
56 if bld.env["GX_LIB_SHARED"]:
57 lib1 += ['gxwmm','gxw']
58 libpath1 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
59 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
60 else:
61 uselib_local1 += ['gxwmm','gxw']
62
63 lv2_plugin_gui = bld(
64 features='cxx cshlib ',
65 includes = incl,
66 lib = lib1,
67 uselib = 'LV2CORE GTKMM',
68 libpath = libpath1,
69 uselib_local = uselib_local1,
70 linkflags = '-Wl,-z,nodelete',
71 defines = ["LV2_GUI"],
72 target = 'gx_amp_gui',
73 source = 'widget.cpp gxamp_gui.cpp',
74 install_path = '${LV2DIR}/%s' % bundle,
75 chmod = 0o755,
76 )
77 lv2_plugin_gui.env['shlib_PATTERN'] = '%s.so'
78
79
80 install_path = '${LV2DIR}/%s' % bundle,
81 bld.install_files('${LV2DIR}/gx_amp.lv2', 'manifest.ttl')
82 bld.install_files('${LV2DIR}/gx_amp.lv2', 'gx_amp.ttl')
83
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix pset: <http://lv2plug.in/ns/ext/presets#> .
20 @prefix state: <http://lv2plug.in/ns/ext/state#> .
21 @prefix doap: <http://usefulinc.com/ns/doap#> .
22 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
23 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
24 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
25 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
26 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
27 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
28 @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
29 @prefix opt: <http://lv2plug.in/ns/ext/options#> .
30 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
31 @prefix work: <http://lv2plug.in/ns/ext/worker#> .
32
33 <http://guitarix.sourceforge.net#me>
34 a foaf:Person ;
35 foaf:name "Guitarix team" ;
36 foaf:mbox <mailto:brummer@web.de> ;
37 rdfs:seeAlso <http://guitarix.sourceforge.net> .
38
39 <http://guitarix.sourceforge.net/plugins/gx_amp_stereo>
40 a doap:Project ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxAmplifier" .
43
44 <http://guitarix.sourceforge.net/plugins/gx_amp_stereo#GUITARIX_ST>
45 a lv2:Plugin ,
46 lv2:AmplifierPlugin ;
47 doap:maintainer <http://guitarix.sourceforge.net#me> ;
48 doap:name "GxAmplifier-Stereo-X";
49 doap:license <http://opensource.org/licenses/isc> ;
50 lv2:project <http://guitarix.sourceforge.net/plugins/gx_amp_stereo> ;
51 lv2:optionalFeature lv2:hardRTCapable ;
52 lv2:requiredFeature urid:map ,
53 bufsz:boundedBlockLength ,
54 work:schedule ;
55 bufsz:minBlockLength 64 ;
56 bufsz:maxBlockLength 8192 ;
57 lv2:extensionData work:interface ;
58
59 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_amp_stereo#gui>;
60
61 lv2:port [
62 a lv2:InputPort ,
63 lv2:ControlPort ;
64 lv2:index 0 ;
65 lv2:symbol "MasterGain" ;
66 lv2:name "MasterGain";
67 lv2:default -15.0 ;
68 lv2:minimum -20.0 ;
69 lv2:maximum 20.0 ;
70 ] , [
71 a lv2:InputPort ,
72 lv2:ControlPort ;
73 lv2:index 1 ;
74 lv2:symbol "PreGain" ;
75 lv2:name "PreGain";
76 lv2:default -15.0 ;
77 lv2:minimum -20.0 ;
78 lv2:maximum 20.0 ;
79 ] , [
80 a lv2:InputPort ,
81 lv2:ControlPort ;
82 lv2:index 2 ;
83 lv2:symbol "Distortion" ;
84 lv2:name "Distortion";
85 lv2:default 20.0 ;
86 lv2:minimum 1.0 ;
87 lv2:maximum 100.0 ;
88 ] , [
89 a lv2:InputPort ,
90 lv2:ControlPort ;
91 lv2:index 3 ;
92 lv2:symbol "Drive" ;
93 lv2:name "Drive";
94 lv2:default 0.25 ;
95 lv2:minimum 0.01 ;
96 lv2:maximum 1.0 ;
97 ] ,[
98 a lv2:InputPort ,
99 lv2:ControlPort ;
100 lv2:index 4 ;
101 lv2:symbol "Middle" ;
102 lv2:name "Middle";
103 lv2:default 0.5 ;
104 lv2:minimum 0.0 ;
105 lv2:maximum 1.0 ;
106 ] , [
107 a lv2:InputPort ,
108 lv2:ControlPort ;
109 lv2:index 5 ;
110 lv2:symbol "Bass" ;
111 lv2:name "Bass";
112 lv2:default 0.5 ;
113 lv2:minimum 0.0 ;
114 lv2:maximum 1.0 ;
115 ] , [
116 a lv2:InputPort ,
117 lv2:ControlPort ;
118 lv2:index 6 ;
119 lv2:symbol "Treble" ;
120 lv2:name "Treble";
121 lv2:default 0.5 ;
122 lv2:minimum 0.0 ;
123 lv2:maximum 1.0 ;
124 ] , [
125 a lv2:InputPort ,
126 lv2:ControlPort ;
127 lv2:index 7 ;
128 lv2:symbol "Cabinet" ;
129 lv2:name "Cabinet";
130 lv2:default 10.0 ;
131 lv2:minimum 1.0 ;
132 lv2:maximum 20.0 ;
133 ] , [
134 a lv2:InputPort ,
135 lv2:ControlPort ;
136 lv2:index 8 ;
137 lv2:symbol "Presence" ;
138 lv2:name "Presence";
139 lv2:default 5.0 ;
140 lv2:minimum 1.0 ;
141 lv2:maximum 10.0 ;
142 ] , [
143 a lv2:InputPort ,
144 lv2:ControlPort ;
145 lv2:index 9 ;
146 lv2:symbol "model" ;
147 lv2:name "Model" ;
148 lv2:default 0 ;
149 lv2:minimum 0 ;
150 lv2:maximum 17 ;
151 lv2:portProperty lv2:integer;
152 lv2:portProperty lv2:enumeration ;
153 lv2:scalePoint [rdfs:label "12ax7"; rdf:value 0];
154 lv2:scalePoint [rdfs:label "12AU7"; rdf:value 1];
155 lv2:scalePoint [rdfs:label "12AT7"; rdf:value 2];
156 lv2:scalePoint [rdfs:label "6DJ8"; rdf:value 3];
157 lv2:scalePoint [rdfs:label "6C16"; rdf:value 4];
158 lv2:scalePoint [rdfs:label "6V6"; rdf:value 5];
159 lv2:scalePoint [rdfs:label "12ax7 feedback"; rdf:value 6];
160 lv2:scalePoint [rdfs:label "12AU7 feedback"; rdf:value 7];
161 lv2:scalePoint [rdfs:label "12AT7 feedback"; rdf:value 8];
162 lv2:scalePoint [rdfs:label "6DJ8 feedback"; rdf:value 9];
163 lv2:scalePoint [rdfs:label "pre 12ax7/ master 6V6"; rdf:value 10];
164 lv2:scalePoint [rdfs:label "pre 12AU7/ master 6V6"; rdf:value 11];
165 lv2:scalePoint [rdfs:label "pre 12AT7/ master 6V6"; rdf:value 12];
166 lv2:scalePoint [rdfs:label "pre 6DJ8/ master 6V6"; rdf:value 13];
167 lv2:scalePoint [rdfs:label "pre 12ax7/ push-pull 6V6"; rdf:value 14];
168 lv2:scalePoint [rdfs:label "pre 12AU7/ push-pull 6V6"; rdf:value 15];
169 lv2:scalePoint [rdfs:label "pre 12AT7/ push pull 6V6"; rdf:value 16];
170 lv2:scalePoint [rdfs:label "pre 6DJ8/ push-pull 6V6"; rdf:value 17];
171 ] , [
172 a lv2:InputPort ,
173 lv2:ControlPort ;
174 lv2:index 10 ;
175 lv2:symbol "t_model" ;
176 lv2:name "Tonestack Model" ;
177 lv2:default 1 ;
178 lv2:minimum 0 ;
179 lv2:maximum 25 ;
180 lv2:portProperty lv2:integer;
181 lv2:portProperty lv2:enumeration ;
182 lv2:scalePoint [rdfs:label "default"; rdf:value 0];
183 lv2:scalePoint [rdfs:label "Bassman"; rdf:value 1];
184 lv2:scalePoint [rdfs:label "Twin Reverb"; rdf:value 2];
185 lv2:scalePoint [rdfs:label "Princeton"; rdf:value 3];
186 lv2:scalePoint [rdfs:label "JCM-800"; rdf:value 4];
187 lv2:scalePoint [rdfs:label "JCM-2000"; rdf:value 5];
188 lv2:scalePoint [rdfs:label "M-Lead"; rdf:value 6];
189 lv2:scalePoint [rdfs:label "M2199"; rdf:value 7];
190 lv2:scalePoint [rdfs:label "AC-30"; rdf:value 8];
191 lv2:scalePoint [rdfs:label "Mesa Boogie"; rdf:value 9];
192 lv2:scalePoint [rdfs:label "SOL 100"; rdf:value 10];
193 lv2:scalePoint [rdfs:label "JTM-45"; rdf:value 11];
194 lv2:scalePoint [rdfs:label "AC-15"; rdf:value 12];
195 lv2:scalePoint [rdfs:label "Peavey"; rdf:value 13];
196 lv2:scalePoint [rdfs:label "Ibanez"; rdf:value 14];
197 lv2:scalePoint [rdfs:label "Roland"; rdf:value 15];
198 lv2:scalePoint [rdfs:label "Ampeg"; rdf:value 16];
199 lv2:scalePoint [rdfs:label "Rev.Rocket"; rdf:value 17];
200 lv2:scalePoint [rdfs:label "MIG 100 H"; rdf:value 18];
201 lv2:scalePoint [rdfs:label "Triple Giant"; rdf:value 19];
202 lv2:scalePoint [rdfs:label "Trio Preamp"; rdf:value 20];
203 lv2:scalePoint [rdfs:label "Hughes&Kettner"; rdf:value 21];
204 lv2:scalePoint [rdfs:label "Fender Junior"; rdf:value 22];
205 lv2:scalePoint [rdfs:label "Fender"; rdf:value 23];
206 lv2:scalePoint [rdfs:label "Fender Deville"; rdf:value 24];
207 lv2:scalePoint [rdfs:label "Gibsen"; rdf:value 25];
208 ] , [
209 a lv2:InputPort ,
210 lv2:ControlPort ;
211 lv2:index 11 ;
212 lv2:symbol "c_model" ;
213 lv2:name "Cab Model" ;
214 lv2:default 0 ;
215 lv2:minimum 0 ;
216 lv2:maximum 17 ;
217 lv2:portProperty lv2:integer;
218 lv2:portProperty lv2:enumeration ;
219 lv2:scalePoint [rdfs:label "4x12"; rdf:value 0];
220 lv2:scalePoint [rdfs:label "2x12"; rdf:value 1];
221 lv2:scalePoint [rdfs:label "1x12"; rdf:value 2];
222 lv2:scalePoint [rdfs:label "4x10"; rdf:value 3];
223 lv2:scalePoint [rdfs:label "2x10"; rdf:value 4];
224 lv2:scalePoint [rdfs:label "HighGain"; rdf:value 5];
225 lv2:scalePoint [rdfs:label "Twin"; rdf:value 6];
226 lv2:scalePoint [rdfs:label "Bassman"; rdf:value 7];
227 lv2:scalePoint [rdfs:label "Marshall"; rdf:value 8];
228 lv2:scalePoint [rdfs:label "AC30"; rdf:value 9];
229 lv2:scalePoint [rdfs:label "Princeton"; rdf:value 10];
230 lv2:scalePoint [rdfs:label "A2"; rdf:value 11];
231 lv2:scalePoint [rdfs:label "1x15"; rdf:value 12];
232 lv2:scalePoint [rdfs:label "Mesa"; rdf:value 13];
233 lv2:scalePoint [rdfs:label "Briliant"; rdf:value 14];
234 lv2:scalePoint [rdfs:label "Vitalize"; rdf:value 15];
235 lv2:scalePoint [rdfs:label "Charisma"; rdf:value 16];
236 lv2:scalePoint [rdfs:label "1x8"; rdf:value 17];
237 ] , [
238 a lv2:InputPort ,
239 atom:AtomPort ;
240 atom:bufferType atom:Sequence ;
241 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
242 lv2:index 12 ;
243 lv2:symbol "control" ;
244 lv2:name "Control" ;
245 ] , [
246 a lv2:OutputPort ,
247 atom:AtomPort ;
248 atom:bufferType atom:Sequence ;
249 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
250 lv2:index 13 ;
251 lv2:symbol "notify" ;
252 lv2:name "Notify" ;
253 ] , [
254 a lv2:AudioPort ,
255 lv2:OutputPort ;
256 lv2:index 14 ;
257 lv2:symbol "out" ;
258 lv2:name "Out" ;
259 ] , [
260 a lv2:AudioPort ,
261 lv2:OutputPort ;
262 lv2:index 15 ;
263 lv2:symbol "out1" ;
264 lv2:name "Out1" ;
265 ] , [
266 a lv2:AudioPort ,
267 lv2:InputPort ;
268 lv2:index 16 ;
269 lv2:symbol "in" ;
270 lv2:name "In" ;
271 ] , [
272 a lv2:AudioPort ,
273 lv2:InputPort ;
274 lv2:index 17 ;
275 lv2:symbol "in1" ;
276 lv2:name "In1" ;
277 ] .
278
279 <http://guitarix.sourceforge.net/plugins/gx_amp_stereo#gui>
280 a guiext:GtkUI;
281 guiext:binary <gx_amp_stereo_gui.so>;
282 guiext:requiredFeature guiext:makeResident;
283 lv2:extensionData work:interface ;
284 guiext:portNotification [
285 guiext:plugin <http://guitarix.sourceforge.net/plugins/gx_amp_stereo#GUITARIX_ST>;
286 lv2:symbol "notify" ;
287 guiext:notifyType atom:Blank
288 ] .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <glibmm.h>
20 #include "gx_common.h"
21
22 /****************************************************************
23 ** "atomic" value access
24 */
25
26 inline void atomic_set(volatile int32_t* p, int32_t v)
27 {
28 g_atomic_int_set(p, v);
29 }
30
31 inline int32_t atomic_get(volatile int32_t& p)
32 {
33 return g_atomic_int_get(&p);
34 }
35
36 inline bool atomic_compare_and_exchange(volatile int32_t *p, int32_t oldv, int32_t newv)
37 {
38 return g_atomic_int_compare_and_exchange(p, oldv, newv);
39 }
40
41 template <class T>
42 inline void atomic_set(T **p, T *v)
43 {
44 g_atomic_pointer_set(p, v);
45 }
46
47 template <class T>
48 inline void atomic_set_0(T **p)
49 {
50 g_atomic_pointer_set(p, 0);
51 }
52
53 template <class T>
54 inline T *atomic_get(T*& p)
55 {
56 return static_cast<T*>(g_atomic_pointer_get(&p));
57 }
58
59 template <class T>
60 inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv)
61 {
62 return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), oldv, newv);
63 }
64
65
66 #include "gxamp_stereo.h"
67 #include "gx_resampler.h"
68 #include "gx_convolver.h"
69 #include "gx_tonestack_stereo.h"
70 #include "gx_amp_stereo.h"
71 #include "impulse_former.h"
72 #include "ampulse_former.h"
73 #ifndef __SSE__
74 #include "stereo_noiser.cc"
75 #endif
76 #include "cab_data_table.cc"
77
78 ////////////////////////////// STEREO ////////////////////////////////////
79
80 class GxPluginStereo
81 {
82 private:
83 // internal stuff
84 float* output;
85 float* output1;
86 float* input;
87 float* input1;
88 uint32_t s_rate;
89 int32_t prio;
90 #ifndef __SSE__
91 PluginLV2* wn;
92 #endif
93 PluginLV2* amplifier[AMP_COUNT];
94 PluginLV2* tonestack[TS_COUNT];
95 float* a_model;
96 uint32_t a_model_;
97 uint32_t a_max;
98 float* t_model;
99 uint32_t t_model_;
100 uint32_t t_max;
101 gx_resample::BufferResampler resamp;
102 GxSimpleConvolver cabconv;
103 Impf impf;
104 gx_resample::BufferResampler resamp1;
105 GxSimpleConvolver ampconv;
106 Ampf ampf;
107 uint32_t bufsize;
108 LV2_Atom_Sequence* c_notice;
109 LV2_Atom_Sequence* n_notice;
110 float *clevel;
111 float clevel_;
112 float cab;
113 float *c_model;
114 float c_model_;
115 float c_old_model_;
116 float *alevel;
117 float alevel_;
118 float pre;
119 float val;
120 bool doit;
121 volatile int32_t schedule_wait;
122
123 bool cab_changed()
124 {return abs(cab - (clevel_ + c_model_)) > 0.1;}
125 void update_cab()
126 {cab = (clevel_ + c_model_); c_old_model_ = c_model_;}
127 bool change_cab()
128 {return abs(c_old_model_ - c_model_) > 0.1;}
129 bool pre_changed()
130 {return abs(pre - alevel_) > 0.1;}
131 void update_pre()
132 {pre = (alevel_);}
133 bool val_changed()
134 {return abs(val - ((*alevel) + (*clevel) + (*c_model))) > 0.1;}
135 void update_val()
136 {val = (alevel_) + (clevel_) + (c_model_);}
137
138 // LV2 stuff
139 LV2_URID_Map* map;
140 LV2_Worker_Schedule* schedule;
141
142 inline void clean();
143 inline void run_dsp_stereo(uint32_t n_samples);
144 inline void connect_stereo(uint32_t port,void* data);
145 inline void init_dsp_stereo(uint32_t rate, uint32_t bufsize_);
146 inline void do_work_stereo();
147 inline void connect_all_stereo_ports(uint32_t port, void* data);
148 inline void activate_f();
149 inline void deactivate_f();
150
151 public:
152
153 // LV2 Descriptor
154 static const LV2_Descriptor descriptor;
155 static const void* extension_data(const char* uri);
156 // static wrapper to private functions
157 static void deactivate(LV2_Handle instance);
158 static void cleanup(LV2_Handle instance);
159 static void run(LV2_Handle instance, uint32_t n_samples);
160 static void activate(LV2_Handle instance);
161 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
162
163 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
164 double rate, const char* bundle_path,
165 const LV2_Feature* const* features);
166
167 static LV2_Worker_Status work(LV2_Handle instance,
168 LV2_Worker_Respond_Function respond,
169 LV2_Worker_Respond_Handle handle,
170 uint32_t size, const void* data);
171
172 static LV2_Worker_Status work_response(LV2_Handle instance,
173 uint32_t size,
174 const void* data);
175
176 GxPluginStereo();
177 ~GxPluginStereo();
178 };
179
180 // constructor
181 GxPluginStereo::GxPluginStereo() :
182 output(NULL),
183 output1(NULL),
184 input(NULL),
185 input1(NULL),
186 s_rate(0),
187 prio(0),
188 a_model(NULL),
189 a_model_(0),
190 a_max(0),
191 t_model(NULL),
192 t_model_(1),
193 t_max(1),
194 cabconv(GxSimpleConvolver(resamp)),
195 impf(Impf()),
196 ampconv(GxSimpleConvolver(resamp1)),
197 ampf(Ampf()),
198 bufsize(0),
199 clevel(NULL),
200 clevel_(0),
201 cab(0),
202 c_model(NULL),
203 c_model_(0),
204 c_old_model_(0),
205 alevel(NULL),
206 alevel_(0),
207 pre(0),
208 val(0)
209 {
210 atomic_set(&schedule_wait,0);
211 };
212
213 // destructor
214 GxPluginStereo::~GxPluginStereo()
215 {
216 cabconv.stop_process();
217 cabconv.cleanup();
218 ampconv.stop_process();
219 ampconv.cleanup();
220 };
221
222
223 // plugin stuff
224
225 void GxPluginStereo::do_work_stereo()
226 {
227 if (cab_changed())
228 {
229 if (cabconv.is_runnable())
230 {
231 cabconv.set_not_runnable();
232 cabconv.stop_process();
233 }
234 // selected cabinet have changed?
235 if (change_cab())
236 {
237 cabconv.cleanup();
238 CabDesc& cab = *getCabEntry(static_cast<uint32_t>(c_model_)).data;
239 cabconv.cab_count = cab.ir_count;
240 cabconv.cab_sr = cab.ir_sr;
241 cabconv.cab_data = cab.ir_data;
242
243 cabconv.set_samplerate(s_rate);
244 cabconv.set_buffersize(bufsize);
245 cabconv.configure_stereo(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
246 //printf("cabconv.changed.\n");
247 }
248 float cab_irdata_c[cabconv.cab_count];
249 float adjust_1x8 = 1;
250 if ( c_model_ == 17.0) adjust_1x8 = 0.5;
251 impf.compute(cabconv.cab_count, cabconv.cab_data, cab_irdata_c, (clevel_ * adjust_1x8));
252 cabconv.cab_data_new = cab_irdata_c;
253 while (!cabconv.checkstate());
254 if (!cabconv.update_stereo(cabconv.cab_count, cabconv.cab_data_new, cabconv.cab_sr))
255 printf("cabconv.update fail.\n");
256 if(!cabconv.start(prio, SCHED_FIFO))
257 printf("cabinet convolver disabled\n");
258 update_cab();
259 //printf("cabinet convolver updated\n");
260 }
261 if (pre_changed())
262 {
263 if (ampconv.is_runnable())
264 {
265 ampconv.set_not_runnable();
266 ampconv.stop_process();
267 }
268 float pre_irdata_c[contrast_ir_desc.ir_count];
269 ampf.compute(contrast_ir_desc.ir_count,contrast_ir_desc.ir_data, pre_irdata_c, alevel_);
270 while (!ampconv.checkstate());
271 if (!ampconv.update_stereo(contrast_ir_desc.ir_count, pre_irdata_c, contrast_ir_desc.ir_sr))
272 printf("ampconv.update fail.\n");
273 if(!ampconv.start(prio, SCHED_FIFO))
274 printf("presence convolver disabled\n");
275 update_pre();
276 //printf("presence convolver updated\n");
277 }
278 update_val();
279 atomic_set(&schedule_wait,0);
280 }
281
282 void GxPluginStereo::init_dsp_stereo(uint32_t rate, uint32_t bufsize_)
283 {
284 AVOIDDENORMALS();
285
286 bufsize = bufsize_;
287 s_rate = rate;
288
289 #ifndef __SSE__
290 wn = stereo_noiser::plugin();
291 wn->set_samplerate(rate, wn);
292 #endif
293
294 for(uint32_t i=0; i<AMP_COUNT; i++) {
295 amplifier[i] = amp_model[i]();
296 amplifier[i]->set_samplerate(rate, amplifier[i]);
297 }
298 a_max = AMP_COUNT-1;
299 for(uint32_t i=0; i<TS_COUNT; i++) {
300 tonestack[i] = tonestack_model[i]();
301 tonestack[i]->set_samplerate(rate, tonestack[i]);
302 }
303 t_max = TS_COUNT-1;
304 if (bufsize )
305 {
306 #ifdef _POSIX_PRIORITY_SCHEDULING
307 int priomax = sched_get_priority_max(SCHED_FIFO);
308 if ((priomax/2) > 0) prio = priomax/2;
309 #endif
310 // set cabinet data
311 CabDesc& cab = *getCabEntry(static_cast<uint32_t>(c_model_)).data;
312 cabconv.cab_count = cab.ir_count;
313 cabconv.cab_sr = cab.ir_sr;
314 cabconv.cab_data = cab.ir_data;
315
316 cabconv.set_samplerate(rate);
317 cabconv.set_buffersize(bufsize);
318 cabconv.configure_stereo(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
319 while (!cabconv.checkstate());
320 if(!cabconv.start(prio, SCHED_FIFO))
321 printf("cabinet convolver disabled\n");
322
323 ampconv.set_samplerate(rate);
324 ampconv.set_buffersize(bufsize);
325 ampconv.configure_stereo(contrast_ir_desc.ir_count, contrast_ir_desc.ir_data, contrast_ir_desc.ir_sr);
326 while (!ampconv.checkstate());
327 if(!ampconv.start(prio, SCHED_FIFO))
328 printf("presence convolver disabled\n");
329 }
330 else
331 {
332 printf("convolver disabled\n");
333 }
334 }
335
336
337 void GxPluginStereo::connect_stereo(uint32_t port,void* data)
338 {
339 switch ((PortIndex)port)
340 {
341 case CLevel:
342 clevel = static_cast<float*>(data);
343 break;
344 case ALevel:
345 alevel = static_cast<float*>(data);
346 break;
347 case AMP_CONTROL:
348 c_notice = (LV2_Atom_Sequence*)data;
349 break;
350 case AMP_NOTIFY:
351 n_notice = (LV2_Atom_Sequence*)data;
352 break;
353 case MODEL:
354 a_model = static_cast<float*>(data);
355 break;
356 case T_MODEL:
357 t_model = static_cast<float*>(data);
358 break;
359 case C_MODEL:
360 c_model = static_cast<float*>(data);
361 break;
362 case AMP_OUTPUT:
363 output = static_cast<float*>(data);
364 break;
365 case AMP_OUTPUT1:
366 output1 = static_cast<float*>(data);
367 break;
368 case AMP_INPUT:
369 input = static_cast<float*>(data);
370 break;
371 case AMP_INPUT1:
372 input1 = static_cast<float*>(data);
373 break;
374 default:
375 break;
376 }
377 }
378
379 void GxPluginStereo::run_dsp_stereo(uint32_t n_samples)
380 {
381 // run dsp
382 #ifndef __SSE__
383 wn->stereo_audio(static_cast<int>(n_samples), input, input1, input, input1, wn);;
384 #endif
385 // run selected tube model
386 a_model_ = min(a_max, static_cast<uint32_t>(*(a_model)));
387 amplifier[a_model_]->stereo_audio(static_cast<int>(n_samples), input, input1, output, output1, amplifier[a_model_]);
388 // run presence convolver
389 ampconv.run_static_stereo(n_samples, &ampconv, output, output1);
390 // run selected tonestack
391 t_model_ = min(t_max, static_cast<uint32_t>(*(t_model)));
392 tonestack[t_model_]->stereo_audio(static_cast<int>(n_samples), output, output1, output, output1, tonestack[t_model_]);
393 // run selected cabinet convolver
394 cabconv.run_static_stereo(n_samples, &cabconv, output, output1);
395
396 // work ?
397 if (!atomic_get(schedule_wait) && val_changed())
398 {
399 clevel_ = (*clevel);
400 alevel_ = (*alevel);
401 c_model_= (*c_model);
402 atomic_set(&schedule_wait,1);
403 schedule->schedule_work(schedule->handle, sizeof(bool), &doit);
404 }
405 }
406
407 void GxPluginStereo::connect_all_stereo_ports(uint32_t port, void* data)
408 {
409 connect_stereo(port,data);
410
411 for(uint32_t i=0; i<AMP_COUNT; i++) {
412 amplifier[i]->connect_ports(port, data, amplifier[i]);
413 }
414 for(uint32_t i=0; i<TS_COUNT; i++) {
415 tonestack[i]->connect_ports(port, data, tonestack[i]);
416 }
417 }
418
419 void GxPluginStereo::activate_f()
420 {
421 // allocate the internal DSP mem
422
423 }
424
425 void GxPluginStereo::deactivate_f()
426 {
427 // delete the internal DSP mem
428
429 }
430
431 void GxPluginStereo::clean()
432 {
433
434 #ifndef __SSE__
435 wn->delete_instance(wn);;
436 #endif
437
438 for(uint32_t i=0; i<AMP_COUNT; i++) {
439 amplifier[i]->delete_instance(amplifier[i]);
440 }
441 for(uint32_t i=0; i<TS_COUNT; i++) {
442 tonestack[i]->delete_instance(tonestack[i]);
443 }
444 }
445 ///////////////////////////// LV2 defines //////////////////////////////
446
447 LV2_Worker_Status GxPluginStereo::work(LV2_Handle instance,
448 LV2_Worker_Respond_Function respond,
449 LV2_Worker_Respond_Handle handle,
450 uint32_t size,
451 const void* data)
452 {
453 static_cast<GxPluginStereo*>(instance)->do_work_stereo();
454 return LV2_WORKER_SUCCESS;
455 }
456
457 LV2_Worker_Status
458 GxPluginStereo::work_response(LV2_Handle instance,
459 uint32_t size,
460 const void* data)
461 {
462 //printf("worker respose.\n");
463 return LV2_WORKER_SUCCESS;
464 }
465
466
467 LV2_Handle
468 GxPluginStereo::instantiate(const LV2_Descriptor* descriptor,
469 double rate,
470 const char* bundle_path,
471 const LV2_Feature* const* features)
472 {
473
474 GxPluginStereo *self = new GxPluginStereo();
475 if (!self)
476 {
477 return NULL;
478 }
479
480 const LV2_Options_Option* options = NULL;
481 uint32_t bufsize = 0;
482 //printf(" %s\n",descriptor->URI);
483
484 for (int32_t i = 0; features[i]; ++i)
485 {
486 if (!strcmp(features[i]->URI, LV2_URID__map))
487 {
488 self->map = (LV2_URID_Map*)features[i]->data;
489 }
490 else if (!strcmp(features[i]->URI, LV2_WORKER__schedule))
491 {
492 self->schedule = (LV2_Worker_Schedule*)features[i]->data;
493 }
494 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
495 {
496 options = (const LV2_Options_Option*)features[i]->data;
497 }
498 }
499 if (!self->schedule)
500 {
501 fprintf(stderr, "Missing feature work:schedule.\n");
502 delete self;
503 return NULL;
504 }
505 if (!self->map)
506 {
507 fprintf(stderr, "Missing feature uri:map.\n");
508 }
509 else if (!options)
510 {
511 fprintf(stderr, "Missing feature options.\n");
512 }
513 else
514 {
515 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
516 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
517
518 for (const LV2_Options_Option* o = options; o->key; ++o)
519 {
520 if (o->context == LV2_OPTIONS_INSTANCE &&
521 o->key == bufsz_max &&
522 o->type == atom_Int)
523 {
524 bufsize = *(const int32_t*)o->value;
525 }
526 }
527
528 if (bufsize == 0)
529 {
530 fprintf(stderr, "No maximum buffer size given.\n");
531 }
532 printf("using block size: %d\n", bufsize);
533 }
534 self->init_dsp_stereo((uint32_t)rate, bufsize);
535
536 return (LV2_Handle)self;
537 }
538
539 void GxPluginStereo::connect_port(LV2_Handle instance,
540 uint32_t port,
541 void* data)
542 {
543 static_cast<GxPluginStereo*>(instance)->connect_all_stereo_ports(port, data);
544 }
545
546 void GxPluginStereo::activate(LV2_Handle instance)
547 {
548
549 }
550
551 void GxPluginStereo::run(LV2_Handle instance, uint32_t n_samples)
552 {
553 static_cast<GxPluginStereo*>(instance)->run_dsp_stereo(n_samples);
554 }
555
556 void GxPluginStereo::deactivate(LV2_Handle instance)
557 {
558
559 }
560
561 void GxPluginStereo::cleanup(LV2_Handle instance)
562 {
563 GxPluginStereo* self = (GxPluginStereo*)instance;
564 self->clean();
565 delete self;
566 }
567
568 //////////////////////////////////////////////////////////////////
569
570 const void* GxPluginStereo::extension_data(const char* uri)
571 {
572 static const LV2_Worker_Interface worker = { work, work_response, NULL };
573 if (!strcmp(uri, LV2_WORKER__interface))
574 {
575 return &worker;
576 }
577 return NULL;
578 }
579
580 const LV2_Descriptor GxPluginStereo::descriptor =
581 {
582 GXPLUGIN_URI "#GUITARIX_ST",
583 instantiate,
584 connect_port,
585 activate,
586 run,
587 deactivate,
588 cleanup,
589 extension_data
590 };
591
592 extern "C"
593 LV2_SYMBOL_EXPORT
594 const LV2_Descriptor*
595 lv2_descriptor(uint32_t index)
596 {
597 switch (index)
598 {
599 case 0:
600 return &GxPluginStereo::descriptor;
601 default:
602 return NULL;
603 }
604 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXAMP_H_
22 #define SRC_HEADERS_GXAMP_H_
23
24 #include <lv2.h>
25 #include "lv2/lv2plug.in/ns/ext/state/state.h"
26 #include "lv2/lv2plug.in/ns/ext/presets/presets.h"
27 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
28 #include <lv2/lv2plug.in/ns/ext/options/options.h>
29 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
30 #include <lv2/lv2plug.in/ns/ext/log/log.h>
31 #include <lv2/lv2plug.in/ns/ext/worker/worker.h>
32 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
33
34 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_amp_stereo"
35 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_amp_stereo#gui"
36
37
38 typedef enum
39 {
40 GAIN1 = 0,
41 PREGAIN,
42 WET_DRY,
43 DRIVE,
44 MIDDLE,
45 BASS,
46 TREBLE,
47 CLevel,
48 ALevel,
49 MODEL,
50 T_MODEL,
51 C_MODEL,
52 AMP_CONTROL,
53 AMP_NOTIFY,
54 AMP_OUTPUT,
55 AMP_OUTPUT1,
56 AMP_INPUT,
57 AMP_INPUT1,
58 } PortIndex;
59
60 #endif //SRC_HEADERS_GXAMP_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxamp_stereo.h"
25 #include "widget_stereo.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GXPluginGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name();
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GXPluginGUI *self)
47 {
48 self->set_plug_name();
49 }
50 static GtkWidget* make_gui_static(GXPluginGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GXPluginGUI () {};
56 ~GXPluginGUI () {};
57 } ;
58
59 void GXPluginGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " }\n"
75 "widget '*.";
76 addKnob += plug_name;
77 addKnob += "' style 'gx_";
78 addKnob += plug_name;
79 addKnob += "_dark_skin_icons' ";
80 }
81
82 void GXPluginGUI::set_skin()
83 {
84 Glib::ustring toparse = "pixmap_path ";
85 toparse += " '";
86 toparse += GX_LV2_STYLE_DIR;
87 toparse += "/'\n";
88 toparse += " style 'gx_selector'\n"
89 " {\n"
90 " fg[NORMAL] = { 0.32, 0.8, 0.16 }\n"
91 " GtkRange::trough-border = 2\n"
92 " GtkRange::stepper-size = 8\n"
93 " GtkRange::stepper-spacing = 2\n"
94 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
95 " font_name = 'sans 7.5'\n"
96 " xthickness = 10\n"
97 " ythickness = 1\n"
98 " }\n"
99 "class '*GxSelector' style:highest 'gx_selector'\n";
100 toparse += "style \"gx_";
101 toparse += plug_name;
102 toparse += "_dark-paintbox\"\n"
103 " { \n"
104 " GxPaintBox::icon-set =9\n"
105 " stock['amp_skin'] = {{'";
106 toparse += plugskin;
107 toparse += "'}}\n"
108 " }\n"
109 "\n"
110 "style 'gx_head_black_box' \n"
111 " { \n"
112 " fg[NORMAL] = '#afafaf' \n"
113 " }\n";
114 toparse += addKnob;
115
116 toparse += " widget '*.amplabel' style:highest 'gx_head_black_box'\n"
117 "widget '*.";
118 toparse += plug_name;
119 toparse += "' style 'gx_";
120 toparse += plug_name;
121 toparse += "_dark-paintbox' ";
122
123 gtk_rc_parse_string (toparse.c_str());
124 }
125
126 void GXPluginGUI::set_plug_name()
127 {
128 addKnob = "";
129 plugskin = "amp21.png";
130 plug_name = "GUITARIXLV2";
131 }
132
133 GtkWidget* GXPluginGUI::make_gui()
134 {
135 // init the gxwmm library
136 Gxw::init();
137 set_skin();
138 GtkWidget* container = gtk_vbox_new(FALSE, 2);
139 widget = new Widget(plug_name);
140 GtkWidget* cWidget = (GtkWidget*)widget->gobj();
141 gtk_container_add( (GtkContainer*)container, cWidget );
142
143 return container;
144 }
145
146
147 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
148 const char * plugin_uri,
149 const char * bundle_path,
150 LV2UI_Write_Function write_function,
151 LV2UI_Controller controller,
152 LV2UI_Widget * widget,
153 const LV2_Feature * const * features)
154 {
155 GXPluginGUI* self = new GXPluginGUI();
156 if (self == NULL) return NULL;
157 self->set_plug_name_static(self);
158 *widget = (LV2UI_Widget)self->make_gui_static(self);
159 self->widget->controller = controller;
160 self->widget->write_function = write_function;
161 return (LV2UI_Handle)self;
162 }
163
164 static void cleanup(LV2UI_Handle ui)
165 {
166 GXPluginGUI *pluginGui = (GXPluginGUI *) ui;
167 delete pluginGui->widget;
168 delete pluginGui;
169 }
170
171 static void port_event(LV2UI_Handle ui,
172 uint32_t port_index,
173 uint32_t buffer_size,
174 uint32_t format,
175 const void * buffer)
176 {
177 GXPluginGUI *self = (GXPluginGUI *) ui;
178 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
179 return;
180 }
181
182 static LV2UI_Descriptor descriptors[] =
183 {
184 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
185 };
186
187 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
188 {
189 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
190 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
191 {
192 return NULL;
193 }
194 return descriptors + index;
195 }
196
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_amp_stereo#GUITARIX_ST>
23 a lv2:Plugin ;
24 lv2:binary <gx_amp_stereo.so> ;
25 rdfs:seeAlso <gx_amp_stereo.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_amp_stereo#GUITARIX_ST>
23 a lv2:Plugin ;
24 lv2:binary <gx_amp_stereo@LIB_EXT@> ;
25 rdfs:seeAlso <gx_amp_stereo.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget_stereo.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case GAIN1:
38 return &m_bigknob;
39 case PREGAIN:
40 return &m_bigknob1;
41 case WET_DRY:
42 return &m_bigknob2;
43 case DRIVE:
44 return &m_bigknob3;
45 case MIDDLE:
46 return &m_smallknob1;
47 case BASS:
48 return &m_smallknob2;
49 case TREBLE:
50 return &m_smallknob3;
51 case MODEL:
52 return &m_selector;
53 case T_MODEL:
54 return &t_selector;
55 case C_MODEL:
56 return &c_selector;
57 case CLevel:
58 return &m_smallknob4;
59 case ALevel:
60 return &m_smallknob5;
61 default:
62 return NULL;
63 }
64 }
65
66 Widget::Widget(Glib::ustring plugname):
67 plug_name(plugname)
68 {
69
70 // create all selectors
71 Glib::ustring tubes[] = {"12ax7","12AU7","12AT7","6DJ8","6C16","6V6","12ax7 feedback",
72 "12AU7 feedback","12AT7 feedback","6DJ8 feedback","pre 12ax7/ master 6V6","pre 12AU7/ master 6V6",
73 "pre 12AT7/ master 6V6","pre 6DJ8/ master 6V6","pre 12ax7/ push-pull 6V6","pre 12AU7/ push-pull 6V6",
74 "pre 12AT7/ push pull 6V6","pre 6DJ8/ push-pull 6V6"
75 };
76 static const size_t tubes_size = sizeof(tubes) / sizeof(tubes[0]);
77
78 make_selector("Tubes", tubes, tubes_size, 0, 1.0, MODEL);
79
80 m_hboxsel1.pack_start(m_selector,Gtk::PACK_SHRINK);
81 m_hboxsel1.pack_start(m_hboxsel2,Gtk::PACK_EXPAND_PADDING);
82 m_vboxsel.pack_start(m_hboxsel1,Gtk::PACK_EXPAND_PADDING);
83
84 Glib::ustring ts[] = {"default","Bassman","Twin Reverb","Princeton","JCM-800",
85 "JCM-2000","M-Lead","M2199","AC-30","Mesa Boogie","SOL 100","JTM-45","AC-15",
86 "Peavey","Ibanez","Roland","Ampeg","Rev.Rocket","MIG 100 H","Triple Giant",
87 "Trio Preamp","Hughes&Kettner","Fender Junior","Fender","Fender Deville",
88 "Gibsen",
89 };
90 static const size_t ts_size = sizeof(ts) / sizeof(ts[0]);
91
92 make_selector("Tonestacks", ts, ts_size, 0,1.0, T_MODEL);
93
94
95 Glib::ustring cab[] = {"4x12","2x12","1x12","4x10","2x10","HighGain","Twin",
96 "Bassman","Marshall","AC30","Princeton","A2","1x15","Mesa","Briliant","Vitalize",
97 "Charisma","1x8",
98 };
99 static const size_t cab_size = sizeof(cab) / sizeof(cab[0]);
100
101 make_selector("Cabinets", cab, cab_size, 0, 1.0, C_MODEL);
102
103 // create all controllers
104 make_controller_box(&m_vbox, "mastergain", -20, 20, 0.1, GAIN1);
105 make_controller_box(&m_vbox1, "pregain", -20, 20, 0.1, PREGAIN);
106 make_controller_box(&m_vbox2, "distortion", 1, 100, 1, WET_DRY);
107 make_controller_box(&m_vbox3, "drive", 0.01, 1, 0.01, DRIVE);
108 make_controller_box(&m_vbox4, "mid", 0, 1, 0.01, MIDDLE);
109 make_controller_box(&m_vbox5, "bass", 0, 1, 0.01, BASS);
110 make_controller_box(&m_vbox6, "treble", 0, 1, 0.01, TREBLE);
111 // put cabinet selector above cab controller
112 m_vbox7.pack_start(c_selector,Gtk::PACK_SHRINK);
113 make_controller_box(&m_vbox7, "cabinet", 1, 20, 1, CLevel);
114 make_controller_box(&m_vbox8, "presence", 1, 10, 1, ALevel);
115
116 // set propertys for the main paintbox holding the skin
117 m_paintbox.set_border_width(30);
118 m_paintbox.set_spacing(12);
119 m_paintbox.set_homogeneous(false);
120 m_paintbox.set_name(plug_name);
121 m_paintbox.property_paint_func() = "amp_skin_expose";
122 add(m_paintbox);
123 // box for the controllers
124 m_hbox_.set_spacing(12);
125 m_hbox_.set_homogeneous(false);
126 // this box set space for the upper part of the skin
127 m_hbox1_.set_spacing(12);
128 m_hbox1_.set_border_width(65);
129 // set a vertical box in the paintbox
130 m_paintbox.pack_start(m_vbox_);
131 // and put space box on top
132 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING);
133 // and controller box on bottem
134 m_vbox_.pack_start(m_hbox_,Gtk::PACK_SHRINK);
135 // amp controllers including the tube selector
136 m_hboxsel.set_spacing(12);
137 m_hboxsel.set_homogeneous(false);
138 m_hboxsel.pack_start(m_vbox1);
139 m_hboxsel.pack_start(m_vbox2);
140 m_hboxsel.pack_start(m_vbox3);
141 m_hboxsel.pack_start(m_vbox8);
142 m_hboxsel.pack_start(m_vbox);
143 m_vboxsel.pack_start(m_hboxsel);
144
145 // put boxed controllers into controller box
146 m_hbox_.pack_start(m_vboxhh);
147 m_hbox_.pack_start(m_vboxsel);
148 m_hbox_.pack_start(m_vbox7);
149 // etxra box for the boxed tonestack controllers
150 m_hboxtonestack1.pack_start(m_hboxtonestack3,Gtk::PACK_EXPAND_PADDING);
151 m_hboxtonestack1.pack_start(t_selector,Gtk::PACK_SHRINK);
152 m_hboxtonestack1.pack_start(m_hboxtonestack2,Gtk::PACK_EXPAND_PADDING);
153
154 m_vboxtonestack.pack_start(m_hboxtonestack1);
155 m_vboxtonestack.pack_start(m_hbox);
156 m_hbox.set_border_width(8);
157 m_hbox.pack_start(m_vbox5);
158 m_hbox.pack_start(m_vbox4);
159 m_hbox.pack_start(m_vbox6);
160 m_hbox.pack_start(m_vboxii);
161 m_hbox.set_spacing(5);
162 // add tonestack controller box to main controller box
163 m_hbox_.pack_start(m_vboxtonestack);
164
165 // connect expose handler as resize handler
166 m_paintbox.signal_expose_event().connect(
167 sigc::mem_fun(this, &Widget::_expose_event), true);
168
169 show_all();
170 }
171
172 Widget::~Widget()
173 {
174
175 }
176
177 // set borderwith for paintbox when widget resize
178 // to hold controllers in place
179 bool Widget::_expose_event(GdkEventExpose *event)
180 {
181 int x, y, width, height, depth;
182 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
183 //double_t height = m_paintbox.get_window()->get_height();
184 m_paintbox.set_border_width(height/10);
185 return false;
186 }
187
188 // create selectors from gxwmm
189 void Widget::make_selector(Glib::ustring labela,
190 Glib::ustring tables[],
191 size_t _size,
192 float min, float digits,
193 PortIndex port_name)
194 {
195 Gxw::Selector *regler = static_cast<Gxw::Selector*>
196 (get_controller_by_port(port_name));
197 if (regler)
198 {
199 float max = static_cast<float>(_size+1);
200
201 Gtk::TreeModelColumn<Glib::ustring> label;
202 Gtk::TreeModelColumnRecord rec;
203 rec.add(label);
204 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
205
206 for (uint32_t i = 0 ; i< _size; ++i) {
207 ls->append()->set_value(0, tables[i]);
208 }
209 regler->set_model(ls);
210 regler->set_has_tooltip();
211 regler->set_tooltip_text(labela);
212 regler->cp_configure("SELECTOR", labela, min, max, digits);
213 regler->set_show_value(false);
214 regler->set_name(plug_name);
215 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
216 *this, &Widget::on_value_changed), port_name));
217 }
218 }
219
220 // create stackboxes with controllers for port name
221 void Widget::make_controller_box(Gtk::Box *box,
222 Glib::ustring label,
223 float min, float max,
224 float digits,
225 PortIndex port_name)
226 {
227 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
228 get_controller_by_port(port_name));
229 if (regler)
230 {
231 //Gtk::Label* pr = new Gtk::Label(label, 0);
232 //pr->set_name("amplabel");
233 // use label images instead simple string labes
234 Glib::ustring label_image = GX_LV2_STYLE_DIR;
235 label_image += "/";
236 label_image += label;
237 label_image += "-label.png";
238 Gtk::Image *pr = new Gtk::Image(label_image);
239
240 Gtk::VBox* b1 = new Gtk::VBox();
241 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
242 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
243 regler->cp_configure("KNOB", label, min, max, digits);
244 regler->set_show_value(false);
245 regler->set_name(plug_name);
246 box->pack_start(*regler,Gtk::PACK_SHRINK);
247 Gtk::VBox* b2 = new Gtk::VBox();
248 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
249 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
250 *this, &Widget::on_value_changed), port_name));
251 }
252 }
253
254 // create stackboxes with switch controller for port name
255 void Widget::make_switch_box(Gtk::Box *box,
256 Glib::ustring label,
257 PortIndex port_name)
258 {
259 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
260 get_controller_by_port(port_name));
261 if (regler)
262 {
263 Gtk::Label* pr = new Gtk::Label(label, 0);
264 pr->set_name("amplabel");
265 // use label images instead simple string labes
266 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
267 label_image += "/"+plug_name+"-";
268 label_image += label;
269 label_image += "-label.png";
270 Gtk::Image *pr = new Gtk::Image(label_image);*/
271
272 regler->cp_configure("switch", label, 0, 1, 1);
273 regler->set_name(plug_name);
274 regler->set_base_name( "button" );
275 Gtk::VBox* b1 = new Gtk::VBox();
276 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
277 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
278 box->pack_start(*regler,Gtk::PACK_SHRINK);
279 Gtk::VBox* b2 = new Gtk::VBox();
280 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
281 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
282 *this, &Widget::on_value_changed), port_name));
283 }
284 }
285
286 // receive controller value changes from host and set them to controller
287 void Widget::set_value(uint32_t port_index,
288 uint32_t format,
289 const void * buffer)
290 {
291 if ( format == 0 )
292 {
293 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
294 get_controller_by_port(port_index));
295 if (regler)
296 {
297 float value = *static_cast<const float*>(buffer);
298 regler->cp_set_value(value);
299 check_for_skin(port_index, static_cast<int>(value));
300 }
301 }
302 }
303
304 // write (UI) controller value changes to the host->engine
305 void Widget::on_value_changed(uint32_t port_index)
306 {
307 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
308 get_controller_by_port(port_index));
309 if (regler)
310 {
311 float value = regler->cp_get_value();
312 write_function(controller, port_index, sizeof(float), 0,
313 static_cast<const void*>(&value));
314 check_for_skin(port_index, static_cast<int>(value));
315 }
316 }
317
318 void Widget::check_for_skin(uint32_t port_index, float model)
319 {
320 if (port_index == MODEL)
321 change_skin(static_cast<int>(model));
322 }
323
324 inline std::string to_string(int _Val)
325 { // convert int to string
326 char _Buf[4];
327 sprintf(_Buf, "%d", _Val);
328 return (std::string(_Buf));
329 }
330 void Widget::change_skin(int model)
331 {
332 std::string rcfile =GX_LV2_STYLE_DIR;
333 rcfile +="/gx_lv2-";
334 rcfile += to_string(model);
335 rcfile += ".rc";
336 gtk_rc_parse(rcfile.c_str());
337 gtk_rc_reset_styles(gtk_settings_get_default());
338 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxamp_stereo.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35 void check_for_skin(uint32_t port_index, float model);
36 void change_skin(int model);
37 void on_value_changed(uint32_t port_index);
38
39 void make_controller_box(Gtk::Box *box,
40 Glib::ustring label,
41 float min, float max,
42 float digits,
43 PortIndex port_name);
44
45 void make_selector(Glib::ustring label,
46 Glib::ustring tables[],
47 size_t _size,
48 float min, float digits,
49 PortIndex port_name);
50
51 void make_switch_box(Gtk::Box *box,
52 Glib::ustring label,
53 PortIndex port_name);
54
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plug_name);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::HBox m_hbox_;
80 Gtk::HBox m_hbox1_;
81 Gtk::VBox m_vbox;
82 Gtk::VBox m_vbox1;
83 Gtk::VBox m_vbox2;
84 Gtk::VBox m_vbox3;
85 Gtk::VBox m_vbox4;
86 Gtk::VBox m_vbox5;
87 Gtk::VBox m_vbox6;
88 Gtk::VBox m_vbox7;
89 Gtk::VBox m_vbox8;
90 Gtk::VBox m_vboxhh;
91 Gtk::VBox m_vboxii;
92 Gtk::VBox m_vboxsel;
93 Gtk::HBox m_hboxsel;
94 Gtk::HBox m_hboxsel1;
95 Gtk::HBox m_hboxsel2;
96 Gtk::VBox m_vboxtonestack;
97 Gtk::HBox m_hboxtonestack1;
98 Gtk::HBox m_hboxtonestack2;
99 Gtk::HBox m_hboxtonestack3;
100
101 Gxw::PaintBox m_paintbox;
102 Gtk::HBox m_hbox;
103 Gxw::BigKnob m_bigknob;
104 Gxw::BigKnob m_bigknob1;
105 Gxw::BigKnob m_bigknob2;
106 Gxw::BigKnob m_bigknob3;
107 Gxw::SmallKnob m_smallknob1;
108 Gxw::SmallKnob m_smallknob2;
109 Gxw::SmallKnob m_smallknob3;
110 Gxw::SmallKnobR m_smallknob4;
111 Gxw::SmallKnobR m_smallknob5;
112 Gxw::Selector m_selector;
113 Gxw::Selector t_selector;
114 Gxw::Selector c_selector;
115 };
116
117 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_amp_stereo.lv2'
10
11 src = ['gxamp_stereo.cpp',
12 '../DSP/gx_resampler.cc',
13 '../DSP/gx_convolver.cc'
14 ]
15 incl = ['../faust','./', '../DSP']
16 lib = []
17 if sys.platform.startswith("linux"):
18 lib.append('dl')
19 uselib = ['LV2CORE','GLIBMM']
20 if bld.env['ZITA_CONVOLVER']:
21 uselib.append('ZITA_CONVOLVER')
22 else:
23 src.append('../../zita-convolver/zita-convolver.cc')
24 incl.append('../../zita-convolver');
25 uselib.append('FFTW3')
26 if bld.env['ZITA_RESAMPLER']:
27 uselib.append('ZITA_RESAMPLER')
28 else:
29 src.append('../../zita-resampler-1.1.0/resampler.cc')
30 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
31 incl.append('../../zita-resampler-1.1.0')
32 cxxflag =[]
33 if not bld.env['OPT'] and bld.env['SSE2']:
34 cxxflag = [ "-msse2", "-mfpmath=sse"]
35 lv2_plugin = bld(
36 features='cxx cshlib ',
37 includes = incl,
38 lib = lib,
39 uselib = uselib,
40 obj_ext = '_13.o',
41 cxxflags = cxxflag,
42 defines = ["LV2_SO"],
43 target = 'gx_amp_stereo',
44 source = src,
45 install_path = '${LV2DIR}/%s' % bundle,
46 chmod = 0o755,
47 )
48 lv2_plugin.env['shlib_PATTERN'] = '%s.so'
49
50 uselib_local1 = []
51 libpath1 = []
52 lib1 = []
53 incl = ['../../../libgxwmm','../../../libgxw']
54 if sys.platform.startswith("linux"):
55 lib1.append('dl')
56 if bld.env["GX_LIB_SHARED"]:
57 lib1 += ['gxwmm','gxw']
58 libpath1 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
59 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
60 else:
61 uselib_local1 += ['gxwmm','gxw']
62
63 lv2_plugin_gui = bld(
64 features='cxx cshlib ',
65 includes = incl,
66 lib = lib1,
67 uselib = 'LV2CORE GTKMM',
68 libpath = libpath1,
69 uselib_local = uselib_local1,
70 linkflags = '-Wl,-z,nodelete',
71 defines = ["LV2_GUI"],
72 target = 'gx_amp_stereo_gui',
73 source = 'widget_stereo.cpp gxamp_stereo_gui.cpp',
74 install_path = '${LV2DIR}/%s' % bundle,
75 chmod = 0o755,
76 )
77 lv2_plugin_gui.env['shlib_PATTERN'] = '%s.so'
78
79
80 install_path = '${LV2DIR}/%s' % bundle,
81 bld.install_files('${LV2DIR}/gx_amp_stereo.lv2', 'manifest.ttl')
82 bld.install_files('${LV2DIR}/gx_amp_stereo.lv2', 'gx_amp_stereo.ttl')
83
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_chorus.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "chorus.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_chorus_stereo
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 float* output1;
36 float* input1;
37 // pointer to dsp class
38 PluginLV2* chorus_st;
39 // private functions
40 inline void run_dsp_stereo(uint32_t n_samples);
41 inline void connect_stereo(uint32_t port,void* data);
42 inline void init_dsp_stereo(uint32_t rate);
43 inline void connect_all_stereo_ports(uint32_t port, void* data);
44 inline void activate_f();
45 inline void clean_up();
46 inline void deactivate_f();
47
48 public:
49 // LV2 Descriptor
50 static const LV2_Descriptor descriptor;
51 // static wrapper to private functions
52 static void deactivate(LV2_Handle instance);
53 static void cleanup(LV2_Handle instance);
54 static void run(LV2_Handle instance, uint32_t n_samples);
55 static void activate(LV2_Handle instance);
56 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
57 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
58 double rate, const char* bundle_path,
59 const LV2_Feature* const* features);
60 Gx_chorus_stereo();
61 ~Gx_chorus_stereo();
62 };
63
64 // constructor
65 Gx_chorus_stereo::Gx_chorus_stereo() :
66 output(NULL),
67 input(NULL),
68 output1(NULL),
69 input1(NULL),
70 chorus_st(chorus::plugin()) {};
71
72 // destructor
73 Gx_chorus_stereo::~Gx_chorus_stereo()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (chorus_st->activate_plugin !=0)
78 chorus_st->activate_plugin(false, chorus_st);
79 // delete DSP class
80 chorus_st->delete_instance(chorus_st);
81 };
82
83 ///////////////////////// PRIVATE CLASS FUNCTIONS /////////////////////
84
85 void Gx_chorus_stereo::init_dsp_stereo(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 chorus_st->set_samplerate(rate, chorus_st); // init the DSP class
89 }
90
91 // connect the Ports used by the plug-in class
92 void Gx_chorus_stereo::connect_stereo(uint32_t port,void* data)
93 {
94 switch ((PortIndex)port)
95 {
96 case EFFECTS_OUTPUT:
97 output = static_cast<float*>(data);
98 break;
99 case EFFECTS_OUTPUT1:
100 output1 = static_cast<float*>(data);
101 break;
102 case EFFECTS_INPUT:
103 input = static_cast<float*>(data);
104 break;
105 case EFFECTS_INPUT1:
106 input1 = static_cast<float*>(data);
107 break;
108 default:
109 break;
110 }
111 }
112
113 void Gx_chorus_stereo::activate_f()
114 {
115 // allocate the internal DSP mem
116 if (chorus_st->activate_plugin !=0)
117 chorus_st->activate_plugin(true, chorus_st);
118 }
119
120 void Gx_chorus_stereo::clean_up()
121 {
122 // delete the internal DSP mem
123 if (chorus_st->activate_plugin !=0)
124 chorus_st->activate_plugin(false, chorus_st);
125 }
126
127 void Gx_chorus_stereo::deactivate_f()
128 {
129 // delete the internal DSP mem
130 if (chorus_st->activate_plugin !=0)
131 chorus_st->activate_plugin(false, chorus_st);
132 }
133
134 void Gx_chorus_stereo::run_dsp_stereo(uint32_t n_samples)
135 {
136 chorus_st->stereo_audio(static_cast<int>(n_samples), input, input1,
137 output, output1, chorus_st);
138 }
139
140 void Gx_chorus_stereo::connect_all_stereo_ports(uint32_t port, void* data)
141 {
142 // connect the Ports used by the plug-in class
143 connect_stereo(port,data);
144 // connect the Ports used by the DSP class
145 chorus_st->connect_ports(port, data, chorus_st);
146 }
147
148 ////////////////////// STATIC CLASS FUNCTIONS ////////////////////////
149
150 LV2_Handle
151 Gx_chorus_stereo::instantiate(const LV2_Descriptor* descriptor,
152 double rate, const char* bundle_path,
153 const LV2_Feature* const* features)
154 {
155 // init the plug-in class
156 Gx_chorus_stereo *self = new Gx_chorus_stereo();
157 if (!self)
158 {
159 return NULL;
160 }
161
162 self->init_dsp_stereo((uint32_t)rate);
163
164 return (LV2_Handle)self;
165 }
166
167 void Gx_chorus_stereo::connect_port(LV2_Handle instance,
168 uint32_t port, void* data)
169 {
170 // connect all ports
171 static_cast<Gx_chorus_stereo*>(instance)->connect_all_stereo_ports(port, data);
172 }
173
174 void Gx_chorus_stereo::activate(LV2_Handle instance)
175 {
176 // allocate needed mem
177 static_cast<Gx_chorus_stereo*>(instance)->activate_f();
178 }
179
180 void Gx_chorus_stereo::run(LV2_Handle instance, uint32_t n_samples)
181 {
182 // run dsp
183 static_cast<Gx_chorus_stereo*>(instance)->run_dsp_stereo(n_samples);
184 }
185
186 void Gx_chorus_stereo::deactivate(LV2_Handle instance)
187 {
188 // free allocated mem
189 static_cast<Gx_chorus_stereo*>(instance)->deactivate_f();
190 }
191
192 void Gx_chorus_stereo::cleanup(LV2_Handle instance)
193 {
194 // well, clean up after us
195 Gx_chorus_stereo* self = static_cast<Gx_chorus_stereo*>(instance);
196 self->clean_up();
197 delete self;
198 }
199
200 const LV2_Descriptor Gx_chorus_stereo::descriptor =
201 {
202 GXPLUGIN_URI "#_chorus_stereo",
203 Gx_chorus_stereo::instantiate,
204 Gx_chorus_stereo::connect_port,
205 Gx_chorus_stereo::activate,
206 Gx_chorus_stereo::run,
207 Gx_chorus_stereo::deactivate,
208 Gx_chorus_stereo::cleanup,
209 NULL
210 };
211
212 ////////////////////////// LV2 SYMBOL EXPORT ///////////////////////////
213
214 extern "C"
215 LV2_SYMBOL_EXPORT
216 const LV2_Descriptor*
217 lv2_descriptor(uint32_t index)
218 {
219 switch (index)
220 {
221 case 0:
222 return &Gx_chorus_stereo::descriptor;
223 default:
224 return NULL;
225 }
226 }
227
228 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_chorus_stereo"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_chorus_stereo#gui"
28
29 typedef enum
30 {
31 LEVEL,
32 DELAY,
33 DEPTH,
34 FREQ,
35 EFFECTS_OUTPUT,
36 EFFECTS_OUTPUT1,
37 EFFECTS_INPUT,
38 EFFECTS_INPUT1,
39 } PortIndex;
40
41 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_chorus_stereo>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_chorus_stereo" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_chorus_stereo#_chorus_stereo>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxChorus-Stereo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_chorus_stereo> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_chorus_stereo#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "level" ;
54 lv2:name "Level";
55 lv2:default 0.5 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 1.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "delay" ;
63 lv2:name "Delay";
64 lv2:default 0.02 ;
65 lv2:minimum 0.0 ;
66 lv2:maximum 0.2 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "depth" ;
72 lv2:name "Depth";
73 lv2:default 0.02 ;
74 lv2:minimum 0.0 ;
75 lv2:maximum 1.0 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "freq" ;
81 lv2:name "Freq";
82 lv2:default 3.0 ;
83 lv2:minimum 0.1 ;
84 lv2:maximum 10.0 ;
85 ] , [
86 a lv2:AudioPort ,
87 lv2:OutputPort ;
88 lv2:index 4 ;
89 lv2:symbol "out" ;
90 lv2:name "Out"
91 ] , [
92 a lv2:AudioPort ,
93 lv2:OutputPort ;
94 lv2:index 5 ;
95 lv2:symbol "out1" ;
96 lv2:name "Out1"
97 ] , [
98 a lv2:AudioPort ,
99 lv2:InputPort ;
100 lv2:index 6 ;
101 lv2:symbol "in" ;
102 lv2:name "In" ;
103 ], [
104 a lv2:AudioPort ,
105 lv2:InputPort ;
106 lv2:index 7 ;
107 lv2:symbol "in1" ;
108 lv2:name "In1" ;
109 ].
110
111 <http://guitarix.sourceforge.net/plugins/gx_chorus_stereo#gui>
112 a guiext:GtkUI;
113 guiext:binary <gx_chorus_gui.so>;
114 guiext:requiredFeature guiext:makeResident .
115
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_chorus.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_chorus_stereoGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_chorus_stereoGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_chorus_stereoGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_chorus_stereoGUI () {};
56 ~Gx_chorus_stereoGUI () {};
57 } ;
58
59 void Gx_chorus_stereoGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_chorus_stereoGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_chorus_stereo_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_chorus_stereo_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_chorus_stereoGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_chorus_stereo#_chorus_stereo", plugin_uri) == 0)
161 {
162 plug_name = "_chorus_stereo";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_chorus_stereo";
168 }
169 }
170
171 GtkWidget* Gx_chorus_stereoGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_chorus_stereoGUI* self = new Gx_chorus_stereoGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_chorus_stereoGUI *pluginGui = static_cast<Gx_chorus_stereoGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_chorus_stereoGUI *self = static_cast<Gx_chorus_stereoGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_chorus_stereo#_chorus_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_chorus.so> ;
25 rdfs:seeAlso <gx_chorus.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_chorus_stereo#_chorus_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_chorus@LIB_EXT@> ;
25 rdfs:seeAlso <gx_chorus.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case LEVEL:
38 return &m_bigknob;
39 case DELAY:
40 return &m_bigknob1;
41 case DEPTH:
42 return &m_smallknob4;
43 case FREQ:
44 return &m_smallknob5;
45 default:
46 return NULL;
47 }
48 }
49
50 Widget::Widget(Glib::ustring plugname):
51 plug_name(plugname)
52 {
53 // create controllers for port name
54 make_controller_box(&m_vbox2, "level", 0, 1, 0.01, LEVEL);
55 make_controller_box(&m_vbox3, "delay", 0, 0.2, 0.01, DELAY);
56 make_controller_box(&m_vbox4, "depth", 0, 1, 0.01, DEPTH);
57 make_controller_box(&m_vbox5, "freq", 0.1, 10, 0.01, FREQ);
58
59 // set propertys for the main paintbox holding the skin
60 m_paintbox.set_border_width(10);
61 m_paintbox.set_spacing(6);
62 m_paintbox.set_homogeneous(false);
63 m_paintbox.set_name(plug_name);
64 m_paintbox.property_paint_func() = "gxhead_expose";
65 add(m_paintbox);
66 // box for the controllers
67 m_hbox_.set_spacing(64);
68 m_hbox_.set_border_width(5);
69 m_hbox_.set_homogeneous(false);
70 // set a vertical box in the paintbox
71 m_vbox.set_border_width(2);
72 m_vbox1.set_border_width(2);
73 m_paintbox.pack_start(m_vbox_);
74 // and controller box on top
75 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
76 // put boxed controllers into controller box
77 m_hbox_.pack_start(m_vbox,Gtk::PACK_EXPAND_PADDING);
78 m_hbox_.pack_start(m_vbox3);
79 m_hbox_.pack_start(m_vbox4);
80 m_hbox_.pack_start(m_vbox2);
81 m_hbox_.pack_start(m_vbox5);
82 m_hbox_.pack_start(m_vbox1,Gtk::PACK_EXPAND_PADDING);
83
84 // connect expose handler as resize handler
85 m_paintbox.signal_expose_event().connect(
86 sigc::mem_fun(this, &Widget::_expose_event), true);
87
88 set_app_paintable(true);
89 show_all();
90 }
91
92 Widget::~Widget()
93 {
94
95 }
96
97 // set borderwith for paintbox when widget resize
98 // to hold controllers in place
99 bool Widget::_expose_event(GdkEventExpose *event)
100 {
101 int x, y, width, height, depth;
102 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
103 //double_t height = m_paintbox.get_window()->get_height();
104 m_paintbox.set_border_width(height/10);
105 return false;
106 }
107
108 // create selectors from gxwmm
109 void Widget::make_selector(Glib::ustring labela,
110 Glib::ustring tables[],
111 size_t _size,
112 float min, float digits,
113 PortIndex port_name)
114 {
115 Gxw::Selector *regler = static_cast<Gxw::Selector*>
116 (get_controller_by_port(port_name));
117 if (regler)
118 {
119 float max = static_cast<float>(_size+1);
120
121 Gtk::TreeModelColumn<Glib::ustring> label;
122 Gtk::TreeModelColumnRecord rec;
123 rec.add(label);
124 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
125
126 for (uint32_t i = 0 ; i< _size; ++i) {
127 ls->append()->set_value(0, tables[i]);
128 }
129 regler->set_model(ls);
130 regler->set_has_tooltip();
131 regler->set_tooltip_text(labela);
132 regler->cp_configure("SELECTOR", labela, min, max, digits);
133 regler->set_show_value(false);
134 regler->set_name(plug_name);
135 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
136 *this, &Widget::on_value_changed), port_name));
137 }
138 }
139
140 // create stackboxes with controllers for port name
141 void Widget::make_controller_box(Gtk::Box *box,
142 Glib::ustring label,
143 float min, float max,
144 float digits,
145 PortIndex port_name)
146 {
147 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
148 get_controller_by_port(port_name));
149 if (regler)
150 {
151 Gtk::Label* pr = new Gtk::Label(label, 0);
152 pr->set_name("amplabel");
153 // use label images instead simple string labes
154 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
155 label_image += "/";
156 label_image += label;
157 label_image += "-label.png";
158 Gtk::Image *pr = new Gtk::Image(label_image);*/
159
160 Gtk::VBox* b1 = new Gtk::VBox();
161 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
162 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
163 regler->cp_configure("KNOB", label, min, max, digits);
164 regler->set_show_value(false);
165 regler->set_name(plug_name);
166 box->pack_start(*regler,Gtk::PACK_SHRINK);
167 Gtk::VBox* b2 = new Gtk::VBox();
168 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
169 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
170 *this, &Widget::on_value_changed), port_name));
171 }
172 }
173
174 // create stackboxes with switch controller for port name
175 void Widget::make_switch_box(Gtk::Box *box,
176 Glib::ustring label,
177 PortIndex port_name)
178 {
179 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
180 get_controller_by_port(port_name));
181 if (regler)
182 {
183 Gtk::Label* pr = new Gtk::Label(label, 0);
184 pr->set_name("amplabel");
185 // use label images instead simple string labes
186 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
187 label_image += "/"+plug_name+"-";
188 label_image += label;
189 label_image += "-label.png";
190 Gtk::Image *pr = new Gtk::Image(label_image);*/
191
192 regler->cp_configure("switch", label, 0, 1, 1);
193 regler->set_name(plug_name);
194 regler->set_base_name( "button" );
195 Gtk::VBox* b1 = new Gtk::VBox();
196 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
197 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
198 box->pack_start(*regler,Gtk::PACK_SHRINK);
199 Gtk::VBox* b2 = new Gtk::VBox();
200 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
201 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
202 *this, &Widget::on_value_changed), port_name));
203 }
204 }
205
206 // receive controller value changes from host and set them to controller
207 void Widget::set_value(uint32_t port_index,
208 uint32_t format,
209 const void * buffer)
210 {
211 if ( format == 0 )
212 {
213 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
214 get_controller_by_port(port_index));
215 if (regler)
216 {
217 float value = *static_cast<const float*>(buffer);
218 regler->cp_set_value(value);
219 }
220 }
221 }
222
223 // write (UI) controller value changes to the host->engine
224 void Widget::on_value_changed(uint32_t port_index)
225 {
226 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
227 get_controller_by_port(port_index));
228 if (regler)
229 {
230 float value = regler->cp_get_value();
231 write_function(controller, port_index, sizeof(float), 0,
232 static_cast<const void*>(&value));
233 }
234 }
235
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_chorus.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox3;
82 Gtk::VBox m_vbox4;
83 Gtk::VBox m_vbox5;
84 Gtk::HBox m_hbox_;
85
86 Gxw::PaintBox m_paintbox;
87 Gxw::BigKnob m_bigknob;
88 Gxw::BigKnob m_bigknob1;
89 Gxw::BigKnob m_smallknob4;
90 Gxw::BigKnob m_smallknob5;
91 Gxw::Selector m_selector;
92 };
93
94 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_chorus.lv2'
10
11 src = ['gx_chorus.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_chorus',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_chorus_gui',
59 source = 'widget.cpp gx_chorus_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_chorus.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_chorus.lv2', 'gx_chorus.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_compressor.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "compressor.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_compressor
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 // pointer to dsp class
36 PluginLV2* compressor_st;
37 // private functions
38 inline void run_dsp_mono(uint32_t n_samples);
39 inline void connect_mono(uint32_t port,void* data);
40 inline void init_dsp_mono(uint32_t rate);
41 inline void connect_all_mono_ports(uint32_t port, void* data);
42 inline void activate_f();
43 inline void deactivate_f();
44 inline void clean_up();
45
46 public:
47 // LV2 Descriptor
48 static const LV2_Descriptor descriptor;
49 // static wrapper to private functions
50 static void deactivate(LV2_Handle instance);
51 static void cleanup(LV2_Handle instance);
52 static void run(LV2_Handle instance, uint32_t n_samples);
53 static void activate(LV2_Handle instance);
54 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
55 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
56 double rate, const char* bundle_path,
57 const LV2_Feature* const* features);
58 Gx_compressor();
59 ~Gx_compressor();
60 };
61
62 // constructor
63 Gx_compressor::Gx_compressor() :
64 output(NULL),
65 input(NULL),
66 compressor_st(compressor::plugin()) {};
67
68 // destructor
69 Gx_compressor::~Gx_compressor()
70 {
71 // just to be sure the plug have given free the allocated mem
72 // check if the function is valid
73 // it didn't hurd if the mem is already given free by clean_up()
74 if ( compressor_st->activate_plugin !=0)
75 compressor_st->activate_plugin(false, compressor_st);
76 // delete DSP class
77 compressor_st->delete_instance(compressor_st);
78 };
79
80 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
81
82 void Gx_compressor::init_dsp_mono(uint32_t rate)
83 {
84 AVOIDDENORMALS(); // init the SSE denormal protection
85 compressor_st->set_samplerate(rate, compressor_st); // init the DSP class
86 }
87
88 // connect the Ports used by the plug-in class
89 void Gx_compressor::connect_mono(uint32_t port,void* data)
90 {
91 switch ((PortIndex)port)
92 {
93 case EFFECTS_OUTPUT:
94 output = static_cast<float*>(data);
95 break;
96 case EFFECTS_INPUT:
97 input = static_cast<float*>(data);
98 break;
99 default:
100 break;
101 }
102 }
103
104 void Gx_compressor::activate_f()
105 {
106 // allocate the internal DSP mem
107 // check if the function is valid
108 if (compressor_st->activate_plugin !=0)
109 compressor_st->activate_plugin(true, compressor_st);
110 }
111
112 void Gx_compressor::deactivate_f()
113 {
114 // free the allocated internal DSP mem
115 // check if the function is valid
116 if (compressor_st->activate_plugin !=0)
117 compressor_st->activate_plugin(false, compressor_st);
118 }
119
120 void Gx_compressor::clean_up()
121 {
122 // delete the internal DSP mem
123 // check if the function is valid
124 if (compressor_st->activate_plugin !=0)
125 compressor_st->activate_plugin(false, compressor_st);
126 }
127
128 void Gx_compressor::run_dsp_mono(uint32_t n_samples)
129 {
130 compressor_st->mono_audio(static_cast<int>(n_samples), input,
131 output, compressor_st);
132 }
133
134 void Gx_compressor::connect_all_mono_ports(uint32_t port, void* data)
135 {
136 // connect the Ports used by the plug-in class
137 connect_mono(port,data);
138 // connect the Ports used by the DSP class
139 compressor_st->connect_ports(port, data, compressor_st);
140 }
141
142 ///////////////////// STATIC CLASS FUNCTIONS /////////////////////////
143
144 LV2_Handle
145 Gx_compressor::instantiate( const LV2_Descriptor* descriptor,
146 double rate,
147 const char* bundle_path,
148 const LV2_Feature* const* features)
149 {
150 // init the plug-in class
151 Gx_compressor *self = new Gx_compressor();
152 if (!self)
153 {
154 return NULL;
155 }
156
157 self->init_dsp_mono((uint32_t)rate);
158
159 return (LV2_Handle)self;
160 }
161
162 void Gx_compressor::connect_port(LV2_Handle instance,
163 uint32_t port,
164 void* data)
165 {
166 // connect all ports
167 static_cast<Gx_compressor*>(instance)->connect_all_mono_ports(port, data);
168 }
169
170 void Gx_compressor::activate(LV2_Handle instance)
171 {
172 // allocate needed mem
173 static_cast<Gx_compressor*>(instance)->activate_f();
174 }
175
176 void Gx_compressor::run(LV2_Handle instance, uint32_t n_samples)
177 {
178 // run dsp
179 static_cast<Gx_compressor*>(instance)->run_dsp_mono(n_samples);
180 }
181
182 void Gx_compressor::deactivate(LV2_Handle instance)
183 {
184 // free allocated mem
185 static_cast<Gx_compressor*>(instance)->deactivate_f();
186 }
187
188 void Gx_compressor::cleanup(LV2_Handle instance)
189 {
190 // well, clean up after us
191 Gx_compressor* self = static_cast<Gx_compressor*>(instance);
192 self->clean_up();
193 delete self;
194 }
195
196 const LV2_Descriptor Gx_compressor::descriptor =
197 {
198 GXPLUGIN_URI "#_compressor",
199 instantiate,
200 connect_port,
201 activate,
202 run,
203 deactivate,
204 cleanup,
205 NULL
206 };
207
208 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
209
210 extern "C"
211 LV2_SYMBOL_EXPORT
212 const LV2_Descriptor*
213 lv2_descriptor(uint32_t index)
214 {
215 switch (index)
216 {
217 case 0:
218 return &Gx_compressor::descriptor;
219 default:
220 return NULL;
221 }
222 }
223
224 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_compressor"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_compressor#gui"
28
29 typedef enum
30 {
31 RATIO,
32 KNEE,
33 THRESHOLD,
34 RELEASE,
35 ATTACK,
36 EFFECTS_OUTPUT,
37 EFFECTS_INPUT,
38 } PortIndex;
39
40 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_compressor>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_compressor" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_compressor#_compressor>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxCompressor";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_compressor> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_compressor#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "RATIO" ;
54 lv2:name "RATIO";
55 lv2:default 2.0 ;
56 lv2:minimum 1.0 ;
57 lv2:maximum 2e+01 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "KNEE" ;
63 lv2:name "KNEE";
64 lv2:default 3.0 ;
65 lv2:minimum 0.0 ;
66 lv2:maximum 2e+01 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "THRESHOLD" ;
72 lv2:name "THRESHOLD";
73 lv2:default -2e+01 ;
74 lv2:minimum -96.0 ;
75 lv2:maximum 1e+01 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "RELEASE" ;
81 lv2:name "RELEASE";
82 lv2:default 0.5 ;
83 lv2:minimum 0.0 ;
84 lv2:maximum 1e+01 ;
85 ] , [
86 a lv2:InputPort ,
87 lv2:ControlPort ;
88 lv2:index 4 ;
89 lv2:symbol "ATTACK" ;
90 lv2:name "ATTACK";
91 lv2:default 0.002 ;
92 lv2:minimum 0.0 ;
93 lv2:maximum 1.0 ;
94 ] , [
95 a lv2:AudioPort ,
96 lv2:OutputPort ;
97 lv2:index 5 ;
98 lv2:symbol "out" ;
99 lv2:name "Out" ;
100 ] , [
101 a lv2:AudioPort ,
102 lv2:InputPort ;
103 lv2:index 6 ;
104 lv2:symbol "in" ;
105 lv2:name "In" ;
106 ].
107
108 <http://guitarix.sourceforge.net/plugins/gx_compressor#gui>
109 a guiext:GtkUI;
110 guiext:binary <gx_compressor_gui.so>;
111 guiext:requiredFeature guiext:makeResident .
112
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_compressor.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_compressorGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_compressorGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_compressorGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_compressorGUI () {};
56 ~Gx_compressorGUI () {};
57 } ;
58
59 void Gx_compressorGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_compressorGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_compressor_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_compressor_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_compressorGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_compressor#_compressor", plugin_uri) == 0)
161 {
162 plug_name = "_compressor";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_compressor";
168 }
169 }
170
171 GtkWidget* Gx_compressorGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_compressorGUI* self = new Gx_compressorGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_compressorGUI *pluginGui = static_cast<Gx_compressorGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_compressorGUI *self = static_cast<Gx_compressorGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_compressor#_compressor>
23 a lv2:Plugin ;
24 lv2:binary <gx_compressor.so> ;
25 rdfs:seeAlso <gx_compressor.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_compressor#_compressor>
23 a lv2:Plugin ;
24 lv2:binary <gx_compressor@LIB_EXT@> ;
25 rdfs:seeAlso <gx_compressor.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case RATIO:
38 return &m_bigknob;
39 case KNEE:
40 return &m_smallknob3;
41 case THRESHOLD:
42 return &m_smallknob4;
43 case RELEASE:
44 return &m_smallknob5;
45 case ATTACK:
46 return &m_smallknob6;
47 default:
48 return NULL;
49 }
50 }
51
52 Widget::Widget(Glib::ustring plugname):
53 plug_name(plugname)
54 {
55 // create controllers for port name
56 make_controller_box(&m_vbox2, "RATIO", 1.0, 2e+01, 0.1, RATIO);
57 make_controller_box(&m_vbox3, "KNEE", 0.0, 2e+01, 0.1, KNEE);
58 make_controller_box(&m_vbox4, "THRESHOLD", -96.0, 1e+01, 0.1, THRESHOLD);
59 make_controller_box(&m_vbox5, "RELEASE", 0.0, 1e+01, 0.01, RELEASE);
60 make_controller_box(&m_vbox6, "ATTACK", 0.0, 1.0, 0.001, ATTACK);
61
62 // set propertys for the main paintbox holding the skin
63 m_paintbox.set_border_width(10);
64 m_paintbox.set_spacing(6);
65 m_paintbox.set_homogeneous(false);
66 m_paintbox.set_name(plug_name);
67 m_paintbox.property_paint_func() = "gxhead_expose";
68 add(m_paintbox);
69 // box for the controllers
70 m_hbox_.set_spacing(14);
71 m_hbox_.set_border_width(5);
72 m_hbox_.set_homogeneous(false);
73 // set a vertical box in the paintbox
74 m_vbox.set_border_width(2);
75 m_vbox1.set_border_width(2);
76 m_paintbox.pack_start(m_vbox_);
77 // and controller box on top
78 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
79 // put boxed controllers into controller box
80 m_hbox_.pack_start(m_vbox,Gtk::PACK_EXPAND_PADDING);
81 m_hbox_.pack_start(m_vbox2);
82 m_hbox_.pack_start(m_vbox3);
83 m_hbox_.pack_start(m_vbox4);
84 m_hbox_.pack_start(m_vbox5);
85 m_hbox_.pack_start(m_vbox6);
86 m_hbox_.pack_start(m_vbox1,Gtk::PACK_EXPAND_PADDING);
87
88 // connect expose handler as resize handler
89 m_paintbox.signal_expose_event().connect(
90 sigc::mem_fun(this, &Widget::_expose_event), true);
91
92 set_app_paintable(true);
93 show_all();
94 }
95
96 Widget::~Widget()
97 {
98
99 }
100
101 // set borderwith for paintbox when widget resize
102 // to hold controllers in place
103 bool Widget::_expose_event(GdkEventExpose *event)
104 {
105 int x, y, width, height, depth;
106 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
107 //double_t height = m_paintbox.get_window()->get_height();
108 m_paintbox.set_border_width(height/20);
109 return false;
110 }
111
112 // create selectors from gxwmm
113 void Widget::make_selector(Glib::ustring labela,
114 Glib::ustring tables[],
115 size_t _size,
116 float min, float digits,
117 PortIndex port_name)
118 {
119 Gxw::Selector *regler = static_cast<Gxw::Selector*>
120 (get_controller_by_port(port_name));
121 if (regler)
122 {
123 float max = static_cast<float>(_size+1);
124
125 Gtk::TreeModelColumn<Glib::ustring> label;
126 Gtk::TreeModelColumnRecord rec;
127 rec.add(label);
128 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
129
130 for (uint32_t i = 0 ; i< _size; ++i) {
131 ls->append()->set_value(0, tables[i]);
132 }
133 regler->set_model(ls);
134 regler->set_has_tooltip();
135 regler->set_tooltip_text(labela);
136 regler->cp_configure("SELECTOR", labela, min, max, digits);
137 regler->set_show_value(false);
138 regler->set_name(plug_name);
139 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
140 *this, &Widget::on_value_changed), port_name));
141 }
142 }
143
144 // create stackboxes with controllers for port name
145 void Widget::make_controller_box(Gtk::Box *box,
146 Glib::ustring label,
147 float min, float max,
148 float digits,
149 PortIndex port_name)
150 {
151 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
152 get_controller_by_port(port_name));
153 if (regler)
154 {
155 Gtk::Label* pr = new Gtk::Label(label, 0);
156 pr->set_name("amplabel");
157 // use label images instead simple string labes
158 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
159 label_image += "/";
160 label_image += label;
161 label_image += "-label.png";
162 Gtk::Image *pr = new Gtk::Image(label_image);*/
163
164 Gtk::VBox* b1 = new Gtk::VBox();
165 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
166 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
167 regler->cp_configure("KNOB", label, min, max, digits);
168 regler->set_show_value(false);
169 regler->set_name(plug_name);
170 box->pack_start(*regler,Gtk::PACK_SHRINK);
171 Gtk::VBox* b2 = new Gtk::VBox();
172 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
173 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
174 *this, &Widget::on_value_changed), port_name));
175 }
176 }
177
178 // create stackboxes with switch controller for port name
179 void Widget::make_switch_box(Gtk::Box *box,
180 Glib::ustring label,
181 PortIndex port_name)
182 {
183 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
184 get_controller_by_port(port_name));
185 if (regler)
186 {
187 Gtk::Label* pr = new Gtk::Label(label, 0);
188 pr->set_name("amplabel");
189 // use label images instead simple string labes
190 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
191 label_image += "/"+plug_name+"-";
192 label_image += label;
193 label_image += "-label.png";
194 Gtk::Image *pr = new Gtk::Image(label_image);*/
195
196 regler->cp_configure("switch", label, 0, 1, 1);
197 regler->set_name(plug_name);
198 regler->set_base_name( "button" );
199 Gtk::VBox* b1 = new Gtk::VBox();
200 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
201 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
202 box->pack_start(*regler,Gtk::PACK_SHRINK);
203 Gtk::VBox* b2 = new Gtk::VBox();
204 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
205 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
206 *this, &Widget::on_value_changed), port_name));
207 }
208 }
209
210 // receive controller value changes from host and set them to controller
211 void Widget::set_value(uint32_t port_index,
212 uint32_t format,
213 const void * buffer)
214 {
215 if ( format == 0 )
216 {
217 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
218 get_controller_by_port(port_index));
219 if (regler)
220 {
221 float value = *static_cast<const float*>(buffer);
222 regler->cp_set_value(value);
223 }
224 }
225 }
226
227 // write (UI) controller value changes to the host->engine
228 void Widget::on_value_changed(uint32_t port_index)
229 {
230 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
231 get_controller_by_port(port_index));
232 if (regler)
233 {
234 float value = regler->cp_get_value();
235 write_function(controller, port_index, sizeof(float), 0,
236 static_cast<const void*>(&value));
237 }
238 }
239
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_compressor.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox3;
82 Gtk::VBox m_vbox4;
83 Gtk::VBox m_vbox5;
84 Gtk::VBox m_vbox6;
85 Gtk::HBox m_hbox_;
86
87 Gxw::PaintBox m_paintbox;
88 Gxw::BigKnob m_bigknob;
89 Gxw::BigKnob m_smallknob3;
90 Gxw::BigKnob m_smallknob4;
91 Gxw::BigKnob m_smallknob5;
92 Gxw::BigKnob m_smallknob6;
93 };
94
95 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_compressor.lv2'
10
11 src = ['gx_compressor.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_compressor',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_compressor_gui',
59 source = 'widget.cpp gx_compressor_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_compressor.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_compressor.lv2', 'gx_compressor.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_delay.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "stereodelay.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_delay_stereo
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 float* output1;
36 float* input1;
37 // pointer to dsp class
38 PluginLV2* delay_st;
39 // private functions
40 inline void run_dsp_stereo(uint32_t n_samples);
41 inline void connect_stereo(uint32_t port,void* data);
42 inline void init_dsp_stereo(uint32_t rate);
43 inline void connect_all_stereo_ports(uint32_t port, void* data);
44 inline void activate_f();
45 inline void clean_up();
46 inline void deactivate_f();
47
48 public:
49 // LV2 Descriptor
50 static const LV2_Descriptor descriptor;
51 // static wrapper to private functions
52 static void deactivate(LV2_Handle instance);
53 static void cleanup(LV2_Handle instance);
54 static void run(LV2_Handle instance, uint32_t n_samples);
55 static void activate(LV2_Handle instance);
56 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
57 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
58 double rate, const char* bundle_path,
59 const LV2_Feature* const* features);
60 Gx_delay_stereo();
61 ~Gx_delay_stereo();
62 };
63
64 // constructor
65 Gx_delay_stereo::Gx_delay_stereo() :
66 output(NULL),
67 input(NULL),
68 output1(NULL),
69 input1(NULL),
70 delay_st(stereodelay::plugin()) {};
71
72 // destructor
73 Gx_delay_stereo::~Gx_delay_stereo()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (delay_st->activate_plugin !=0)
78 delay_st->activate_plugin(false, delay_st);
79 // delete DSP class
80 delay_st->delete_instance(delay_st);
81 };
82
83 ///////////////////////// PRIVATE CLASS FUNCTIONS /////////////////////
84
85 void Gx_delay_stereo::init_dsp_stereo(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 delay_st->set_samplerate(rate, delay_st); // init the DSP class
89 }
90
91 // connect the Ports used by the plug-in class
92 void Gx_delay_stereo::connect_stereo(uint32_t port,void* data)
93 {
94 switch ((PortIndex)port)
95 {
96 case EFFECTS_OUTPUT:
97 output = static_cast<float*>(data);
98 break;
99 case EFFECTS_OUTPUT1:
100 output1 = static_cast<float*>(data);
101 break;
102 case EFFECTS_INPUT:
103 input = static_cast<float*>(data);
104 break;
105 case EFFECTS_INPUT1:
106 input1 = static_cast<float*>(data);
107 break;
108 default:
109 break;
110 }
111 }
112
113 void Gx_delay_stereo::activate_f()
114 {
115 // allocate the internal DSP mem
116 if (delay_st->activate_plugin !=0)
117 delay_st->activate_plugin(true, delay_st);
118 }
119
120 void Gx_delay_stereo::clean_up()
121 {
122 // delete the internal DSP mem
123 if (delay_st->activate_plugin !=0)
124 delay_st->activate_plugin(false, delay_st);
125 }
126
127 void Gx_delay_stereo::deactivate_f()
128 {
129 // delete the internal DSP mem
130 if (delay_st->activate_plugin !=0)
131 delay_st->activate_plugin(false, delay_st);
132 }
133
134 void Gx_delay_stereo::run_dsp_stereo(uint32_t n_samples)
135 {
136 delay_st->stereo_audio(static_cast<int>(n_samples), input, input1,
137 output, output1, delay_st);
138 }
139
140 void Gx_delay_stereo::connect_all_stereo_ports(uint32_t port, void* data)
141 {
142 // connect the Ports used by the plug-in class
143 connect_stereo(port,data);
144 // connect the Ports used by the DSP class
145 delay_st->connect_ports(port, data, delay_st);
146 }
147
148 ////////////////////// STATIC CLASS FUNCTIONS ////////////////////////
149
150 LV2_Handle
151 Gx_delay_stereo::instantiate(const LV2_Descriptor* descriptor,
152 double rate, const char* bundle_path,
153 const LV2_Feature* const* features)
154 {
155 // init the plug-in class
156 Gx_delay_stereo *self = new Gx_delay_stereo();
157 if (!self)
158 {
159 return NULL;
160 }
161
162 self->init_dsp_stereo((uint32_t)rate);
163
164 return (LV2_Handle)self;
165 }
166
167 void Gx_delay_stereo::connect_port(LV2_Handle instance,
168 uint32_t port, void* data)
169 {
170 // connect all ports
171 static_cast<Gx_delay_stereo*>(instance)->connect_all_stereo_ports(port, data);
172 }
173
174 void Gx_delay_stereo::activate(LV2_Handle instance)
175 {
176 // allocate needed mem
177 static_cast<Gx_delay_stereo*>(instance)->activate_f();
178 }
179
180 void Gx_delay_stereo::run(LV2_Handle instance, uint32_t n_samples)
181 {
182 // run dsp
183 static_cast<Gx_delay_stereo*>(instance)->run_dsp_stereo(n_samples);
184 }
185
186 void Gx_delay_stereo::deactivate(LV2_Handle instance)
187 {
188 // free allocated mem
189 static_cast<Gx_delay_stereo*>(instance)->deactivate_f();
190 }
191
192 void Gx_delay_stereo::cleanup(LV2_Handle instance)
193 {
194 // well, clean up after us
195 Gx_delay_stereo* self = static_cast<Gx_delay_stereo*>(instance);
196 self->clean_up();
197 delete self;
198 }
199
200 const LV2_Descriptor Gx_delay_stereo::descriptor =
201 {
202 GXPLUGIN_URI "#_delay_stereo",
203 Gx_delay_stereo::instantiate,
204 Gx_delay_stereo::connect_port,
205 Gx_delay_stereo::activate,
206 Gx_delay_stereo::run,
207 Gx_delay_stereo::deactivate,
208 Gx_delay_stereo::cleanup,
209 NULL
210 };
211
212 ////////////////////////// LV2 SYMBOL EXPORT ///////////////////////////
213
214 extern "C"
215 LV2_SYMBOL_EXPORT
216 const LV2_Descriptor*
217 lv2_descriptor(uint32_t index)
218 {
219 switch (index)
220 {
221 case 0:
222 return &Gx_delay_stereo::descriptor;
223 default:
224 return NULL;
225 }
226 }
227
228 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_delay_stereo"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_delay_stereo#gui"
28
29
30 typedef enum
31 {
32 INVERT,
33 R_GAIN,
34 R_DELAY,
35 L_GAIN,
36 L_DELAY,
37 LFOFREQ,
38 LINK,
39 EFFECTS_OUTPUT,
40 EFFECTS_OUTPUT1,
41 EFFECTS_INPUT,
42 EFFECTS_INPUT1,
43 } PortIndex;
44
45 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_delay_stereo>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_delay_stereo" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_delay_stereo#_delay_stereo>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxDelay-Stereo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_delay_stereo> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_delay_stereo#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "mode" ;
54 lv2:name "Mode";
55 lv2:portProperty lv2:integer;
56 lv2:portProperty lv2:enumeration ;
57 lv2:default 0 ;
58 lv2:minimum 0 ;
59 lv2:maximum 1 ;
60 lv2:scalePoint [rdfs:label "linear"; rdf:value 0];
61 lv2:scalePoint [rdfs:label "pingpong"; rdf:value 1];
62 ] , [
63 a lv2:InputPort ,
64 lv2:ControlPort ;
65 lv2:index 1 ;
66 lv2:symbol "level_r" ;
67 lv2:name "R Level";
68 lv2:default -10.0 ;
69 lv2:minimum -20.0 ;
70 lv2:maximum 20.0 ;
71 ] , [
72 a lv2:InputPort ,
73 lv2:ControlPort ;
74 lv2:index 2 ;
75 lv2:symbol "timt_r" ;
76 lv2:name "R Time";
77 lv2:default 1000.0 ;
78 lv2:minimum 1.0 ;
79 lv2:maximum 5000.0 ;
80 ] , [
81 a lv2:InputPort ,
82 lv2:ControlPort ;
83 lv2:index 3 ;
84 lv2:symbol "level_l" ;
85 lv2:name "L Level";
86 lv2:default -10.0 ;
87 lv2:minimum -20.0 ;
88 lv2:maximum 20.0 ;
89 ] , [
90 a lv2:InputPort ,
91 lv2:ControlPort ;
92 lv2:index 4 ;
93 lv2:symbol "timt_l" ;
94 lv2:name "L Time";
95 lv2:default 1000.0 ;
96 lv2:minimum 1.0 ;
97 lv2:maximum 5000.0 ;
98 ] , [
99 a lv2:InputPort ,
100 lv2:ControlPort ;
101 lv2:index 5 ;
102 lv2:symbol "lfo" ;
103 lv2:name "LFO";
104 lv2:default 0.2 ;
105 lv2:minimum 0.2 ;
106 lv2:maximum 5.0 ;
107 ] , [
108 a lv2:InputPort ,
109 lv2:ControlPort ;
110 lv2:index 6 ;
111 lv2:symbol "link" ;
112 lv2:name "Link (L+R)";
113 lv2:default 0. ;
114 lv2:minimum 0. ;
115 lv2:maximum 1.0 ;
116 ] , [
117 a lv2:AudioPort ,
118 lv2:OutputPort ;
119 lv2:index 7 ;
120 lv2:symbol "out" ;
121 lv2:name "Out"
122 ] , [
123 a lv2:AudioPort ,
124 lv2:OutputPort ;
125 lv2:index 8 ;
126 lv2:symbol "out1" ;
127 lv2:name "Out1"
128 ] , [
129 a lv2:AudioPort ,
130 lv2:InputPort ;
131 lv2:index 9 ;
132 lv2:symbol "in" ;
133 lv2:name "In" ;
134 ], [
135 a lv2:AudioPort ,
136 lv2:InputPort ;
137 lv2:index 10 ;
138 lv2:symbol "in1" ;
139 lv2:name "In1" ;
140 ].
141
142 <http://guitarix.sourceforge.net/plugins/gx_delay_stereo#gui>
143 a guiext:GtkUI;
144 guiext:binary <gx_delay_gui.so>;
145 guiext:requiredFeature guiext:makeResident .
146
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_delay.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_delay_stereoGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_delay_stereoGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_delay_stereoGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_delay_stereoGUI () {};
56 ~Gx_delay_stereoGUI () {};
57 } ;
58
59 void Gx_delay_stereoGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_delay_stereoGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_expander_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_expander_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_delay_stereoGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_delay_stereo#_delay_stereo", plugin_uri) == 0)
161 {
162 plug_name = "_delay_stereo";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_delay_stereo";
168 }
169 }
170
171 GtkWidget* Gx_delay_stereoGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_delay_stereoGUI* self = new Gx_delay_stereoGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_delay_stereoGUI *pluginGui = static_cast<Gx_delay_stereoGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_delay_stereoGUI *self = static_cast<Gx_delay_stereoGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_delay_stereo#_delay_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_delay.so> ;
25 rdfs:seeAlso <gx_delay.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_delay_stereo#_delay_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_delay@LIB_EXT@> ;
25 rdfs:seeAlso <gx_delay.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case R_DELAY:
38 return &m_bigknob;
39 case L_DELAY:
40 return &m_bigknob1;
41 case LFOFREQ:
42 return &m_smallknob3;
43 case INVERT:
44 return &m_selector;
45 case R_GAIN:
46 return &m_smallknob4;
47 case L_GAIN:
48 return &m_smallknob5;
49 case LINK:
50 return &m_switch;
51 default:
52 return NULL;
53 }
54 }
55
56 Widget::Widget(Glib::ustring plugname):
57 plug_name(plugname)
58 {
59 // create controllers for port name
60 Glib::ustring modes[] = {"linear","ping pong"};
61 static const size_t _size = sizeof(modes) / sizeof(modes[0]);
62 make_selector("Delay Mode", modes, _size, 0, 1.0, INVERT);
63 make_controller_box(&m_vbox2, "Time (R)", 1, 5000, 10, R_DELAY);
64 make_controller_box(&m_vbox3, "Time (L)", 1, 5000, 10, L_DELAY);
65 make_controller_box(&m_vbox4, "LFO", 0.2, 5, 0.01, LFOFREQ);
66 m_vbox4.pack_start(m_selector, Gtk::PACK_SHRINK);
67 make_controller_box(&m_vbox5, "Level (R)", -20, 20, 0.1, R_GAIN);
68 make_controller_box(&m_vbox6, "Level (L)", -20, 20, 0.1, L_GAIN);
69 make_switch_box(&m_vbox7, "Link (L+R)", LINK);
70
71 // set propertys for the main paintbox holding the skin
72 m_paintbox.set_border_width(10);
73 m_paintbox.set_spacing(6);
74 m_paintbox.set_homogeneous(false);
75 m_paintbox.set_name(plug_name);
76 m_paintbox.property_paint_func() = "gxhead_expose";
77 add(m_paintbox);
78 // box for the controllers
79 m_hbox_.set_spacing(14);
80 m_hbox_.set_border_width(24);
81 m_hbox_.set_homogeneous(false);
82 // set a vertical box in the paintbox
83 m_vbox.set_border_width(14);
84 m_vbox1.set_border_width(14);
85 m_paintbox.pack_start(m_vbox_);
86 // and controller box on top
87 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
88 // put boxed controllers into controller box
89 m_hbox_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
90 m_hbox_.pack_start(m_vbox3);
91 m_hbox_.pack_start(m_vbox6);
92 m_hbox_.pack_start(m_vbox4);
93 m_hbox_.pack_start(m_vbox5);
94 m_hbox_.pack_start(m_vbox2);
95 m_hbox_.pack_start(m_vbox7);
96 m_hbox_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
97
98 // connect expose handler as resize handler
99 m_paintbox.signal_expose_event().connect(
100 sigc::mem_fun(this, &Widget::_expose_event), true);
101
102 set_app_paintable(true);
103 show_all();
104 }
105
106 Widget::~Widget()
107 {
108
109 }
110
111 // set borderwith for paintbox when widget resize
112 // to hold controllers in place
113 bool Widget::_expose_event(GdkEventExpose *event)
114 {
115 int x, y, width, height, depth;
116 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
117 //double_t height = m_paintbox.get_window()->get_height();
118 m_paintbox.set_border_width(height/10);
119 return false;
120 }
121
122 // create selectors from gxwmm
123 void Widget::make_selector(Glib::ustring labela,
124 Glib::ustring tables[],
125 size_t _size,
126 float min, float digits,
127 PortIndex port_name)
128 {
129 Gxw::Selector *regler = static_cast<Gxw::Selector*>
130 (get_controller_by_port(port_name));
131 if (regler)
132 {
133 float max = static_cast<float>(_size+1);
134
135 Gtk::TreeModelColumn<Glib::ustring> label;
136 Gtk::TreeModelColumnRecord rec;
137 rec.add(label);
138 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
139
140 for (uint32_t i = 0 ; i< _size; ++i) {
141 ls->append()->set_value(0, tables[i]);
142 }
143 regler->set_model(ls);
144 regler->set_has_tooltip();
145 regler->set_tooltip_text(labela);
146 regler->cp_configure("SELECTOR", labela, min, max, digits);
147 regler->set_show_value(false);
148 regler->set_name(plug_name);
149 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
150 *this, &Widget::on_value_changed), port_name));
151 }
152 }
153
154 // create stackboxes with controllers for port name
155 void Widget::make_controller_box(Gtk::Box *box,
156 Glib::ustring label,
157 float min, float max,
158 float digits,
159 PortIndex port_name)
160 {
161 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
162 get_controller_by_port(port_name));
163 if (regler)
164 {
165 Gtk::Label* pr = new Gtk::Label(label, 0);
166 pr->set_name("amplabel");
167 // use label images instead simple string labes
168 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
169 label_image += "/";
170 label_image += label;
171 label_image += "-label.png";
172 Gtk::Image *pr = new Gtk::Image(label_image);*/
173
174 Gtk::VBox* b1 = new Gtk::VBox();
175 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
176 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
177 regler->cp_configure("KNOB", label, min, max, digits);
178 regler->set_show_value(false);
179 regler->set_name(plug_name);
180 box->pack_start(*regler,Gtk::PACK_SHRINK);
181 Gtk::VBox* b2 = new Gtk::VBox();
182 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
183 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
184 *this, &Widget::on_value_changed), port_name));
185 }
186 }
187
188 // create stackboxes with switch controller for port name
189 void Widget::make_switch_box(Gtk::Box *box,
190 Glib::ustring label,
191 PortIndex port_name)
192 {
193 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
194 get_controller_by_port(port_name));
195 if (regler)
196 {
197 Gtk::Label* pr = new Gtk::Label(label, 0);
198 pr->set_name("amplabel");
199 // use label images instead simple string labes
200 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
201 label_image += "/"+plug_name+"-";
202 label_image += label;
203 label_image += "-label.png";
204 Gtk::Image *pr = new Gtk::Image(label_image);*/
205
206 regler->cp_configure("switch", label, 0, 1, 1);
207 regler->set_name(plug_name);
208 regler->set_base_name( "button" );
209 Gtk::VBox* b1 = new Gtk::VBox();
210 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
211 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
212 box->pack_start(*regler,Gtk::PACK_SHRINK);
213 Gtk::VBox* b2 = new Gtk::VBox();
214 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
215 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
216 *this, &Widget::on_value_changed), port_name));
217 }
218 }
219
220 // special function to link controllers of left and right channel
221 // when link is selected
222 void Widget::check_for_link(uint32_t port_name, float value)
223 {
224 if (static_cast<Gxw::Regler*>(get_controller_by_port(LINK))->
225 cp_get_value())
226 {
227 switch ((PortIndex)port_name)
228 {
229 case R_DELAY:
230 static_cast<Gxw::Regler*>(get_controller_by_port(L_DELAY))
231 ->cp_set_value(value);
232 break;
233 case L_DELAY:
234 static_cast<Gxw::Regler*>(get_controller_by_port(R_DELAY))
235 ->cp_set_value(value);
236 break;
237 case R_GAIN:
238 static_cast<Gxw::Regler*>(get_controller_by_port(L_GAIN))
239 ->cp_set_value(value);
240 break;
241 case L_GAIN:
242 static_cast<Gxw::Regler*>(get_controller_by_port(R_GAIN))
243 ->cp_set_value(value);
244 break;
245 default:
246 break;
247 }
248 }
249 }
250
251 // receive controller value changes from host and set them to controller
252 void Widget::set_value(uint32_t port_index,
253 uint32_t format,
254 const void * buffer)
255 {
256 if ( format == 0 )
257 {
258 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
259 get_controller_by_port(port_index));
260 if (regler)
261 {
262 float value = *static_cast<const float*>(buffer);
263 regler->cp_set_value(value);
264 check_for_link(port_index, value);
265 }
266 }
267 }
268
269 // write (UI) controller value changes to the host->engine
270 void Widget::on_value_changed(uint32_t port_index)
271 {
272 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
273 get_controller_by_port(port_index));
274 if (regler)
275 {
276 float value = regler->cp_get_value();
277 write_function(controller, port_index, sizeof(float), 0,
278 static_cast<const void*>(&value));
279 check_for_link(port_index, value);
280 }
281 }
282
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_delay.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void check_for_link(uint32_t port_name, float value);
39
40 void make_controller_box(Gtk::Box *box,
41 Glib::ustring label,
42 float min, float max,
43 float digits,
44 PortIndex port_name);
45
46 void make_selector(Glib::ustring label,
47 Glib::ustring tables[],
48 size_t _size,
49 float min, float digits,
50 PortIndex port_name);
51
52 void make_switch_box(Gtk::Box *box,
53 Glib::ustring label,
54 PortIndex port_name);
55
56 bool _expose_event(GdkEventExpose *event);
57
58 void set_value(uint32_t port_index,
59 uint32_t format,
60 const void * buffer);
61 public:
62
63 // public Lv2 communication stuff
64 LV2UI_Controller controller;
65 LV2UI_Write_Function write_function;
66 static void set_value_static(uint32_t port_index,
67 uint32_t buffer_size,
68 uint32_t format,
69 const void * buffer, Widget *self)
70 {
71 self->set_value(port_index,format,buffer);
72 }
73
74 Widget(Glib::ustring plugname);
75 ~Widget();
76
77 protected:
78 Glib::ustring plug_name;
79 Gtk::VBox m_vbox_;
80 Gtk::VBox m_vbox;
81 Gtk::VBox m_vbox1;
82 Gtk::VBox m_vbox2;
83 Gtk::VBox m_vbox3;
84 Gtk::VBox m_vbox4;
85 Gtk::VBox m_vbox5;
86 Gtk::VBox m_vbox6;
87 Gtk::VBox m_vbox7;
88 Gtk::HBox m_hbox_;
89
90 Gxw::PaintBox m_paintbox;
91 Gxw::BigKnob m_bigknob;
92 Gxw::BigKnob m_bigknob1;
93 Gxw::SmallKnobR m_smallknob3;
94 Gxw::BigKnob m_smallknob4;
95 Gxw::BigKnob m_smallknob5;
96 Gxw::Selector m_selector;
97 Gxw::Switch m_switch;
98 };
99
100 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_delay.lv2'
10
11 src = ['gx_delay.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_14.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_delay',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_delay_gui',
59 source = 'widget.cpp gx_delay_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_delay.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_delay.lv2', 'gx_delay.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_echo.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "stereoecho.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_echo_stereo
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 float* output1;
36 float* input1;
37 // pointer to dsp class
38 PluginLV2* echo_st;
39 // private functions
40 inline void run_dsp_stereo(uint32_t n_samples);
41 inline void connect_stereo(uint32_t port,void* data);
42 inline void init_dsp_stereo(uint32_t rate);
43 inline void connect_all_stereo_ports(uint32_t port, void* data);
44 inline void activate_f();
45 inline void clean_up();
46 inline void deactivate_f();
47
48 public:
49 // LV2 Descriptor
50 static const LV2_Descriptor descriptor;
51 // static wrapper to private functions
52 static void deactivate(LV2_Handle instance);
53 static void cleanup(LV2_Handle instance);
54 static void run(LV2_Handle instance, uint32_t n_samples);
55 static void activate(LV2_Handle instance);
56 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
57 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
58 double rate, const char* bundle_path,
59 const LV2_Feature* const* features);
60 Gx_echo_stereo();
61 ~Gx_echo_stereo();
62 };
63
64 // constructor
65 Gx_echo_stereo::Gx_echo_stereo() :
66 output(NULL),
67 input(NULL),
68 output1(NULL),
69 input1(NULL),
70 echo_st(stereoecho::plugin()) {};
71
72 // destructor
73 Gx_echo_stereo::~Gx_echo_stereo()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (echo_st->activate_plugin !=0)
78 echo_st->activate_plugin(false, echo_st);
79 // delete DSP class
80 echo_st->delete_instance(echo_st);
81 };
82
83 ///////////////////////// PRIVATE CLASS FUNCTIONS /////////////////////
84
85 void Gx_echo_stereo::init_dsp_stereo(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 echo_st->set_samplerate(rate, echo_st); // init the DSP class
89 }
90
91 // connect the Ports used by the plug-in class
92 void Gx_echo_stereo::connect_stereo(uint32_t port,void* data)
93 {
94 switch ((PortIndex)port)
95 {
96 case EFFECTS_OUTPUT:
97 output = static_cast<float*>(data);
98 break;
99 case EFFECTS_OUTPUT1:
100 output1 = static_cast<float*>(data);
101 break;
102 case EFFECTS_INPUT:
103 input = static_cast<float*>(data);
104 break;
105 case EFFECTS_INPUT1:
106 input1 = static_cast<float*>(data);
107 break;
108 default:
109 break;
110 }
111 }
112
113 void Gx_echo_stereo::activate_f()
114 {
115 // allocate the internal DSP mem
116 if (echo_st->activate_plugin !=0)
117 echo_st->activate_plugin(true, echo_st);
118 }
119
120 void Gx_echo_stereo::clean_up()
121 {
122 // delete the internal DSP mem
123 if (echo_st->activate_plugin !=0)
124 echo_st->activate_plugin(false, echo_st);
125 }
126
127 void Gx_echo_stereo::deactivate_f()
128 {
129 // delete the internal DSP mem
130 if (echo_st->activate_plugin !=0)
131 echo_st->activate_plugin(false, echo_st);
132 }
133
134 void Gx_echo_stereo::run_dsp_stereo(uint32_t n_samples)
135 {
136 echo_st->stereo_audio(static_cast<int>(n_samples), input, input1,
137 output, output1, echo_st);
138 }
139
140 void Gx_echo_stereo::connect_all_stereo_ports(uint32_t port, void* data)
141 {
142 // connect the Ports used by the plug-in class
143 connect_stereo(port,data);
144 // connect the Ports used by the DSP class
145 echo_st->connect_ports(port, data, echo_st);
146 }
147
148 ////////////////////// STATIC CLASS FUNCTIONS ////////////////////////
149
150 LV2_Handle
151 Gx_echo_stereo::instantiate(const LV2_Descriptor* descriptor,
152 double rate, const char* bundle_path,
153 const LV2_Feature* const* features)
154 {
155 // init the plug-in class
156 Gx_echo_stereo *self = new Gx_echo_stereo();
157 if (!self)
158 {
159 return NULL;
160 }
161
162 self->init_dsp_stereo((uint32_t)rate);
163
164 return (LV2_Handle)self;
165 }
166
167 void Gx_echo_stereo::connect_port(LV2_Handle instance,
168 uint32_t port, void* data)
169 {
170 // connect all ports
171 static_cast<Gx_echo_stereo*>(instance)->connect_all_stereo_ports(port, data);
172 }
173
174 void Gx_echo_stereo::activate(LV2_Handle instance)
175 {
176 // allocate needed mem
177 static_cast<Gx_echo_stereo*>(instance)->activate_f();
178 }
179
180 void Gx_echo_stereo::run(LV2_Handle instance, uint32_t n_samples)
181 {
182 // run dsp
183 static_cast<Gx_echo_stereo*>(instance)->run_dsp_stereo(n_samples);
184 }
185
186 void Gx_echo_stereo::deactivate(LV2_Handle instance)
187 {
188 // free allocated mem
189 static_cast<Gx_echo_stereo*>(instance)->deactivate_f();
190 }
191
192 void Gx_echo_stereo::cleanup(LV2_Handle instance)
193 {
194 // well, clean up after us
195 Gx_echo_stereo* self = static_cast<Gx_echo_stereo*>(instance);
196 self->clean_up();
197 delete self;
198 }
199
200 const LV2_Descriptor Gx_echo_stereo::descriptor =
201 {
202 GXPLUGIN_URI "#_echo_stereo",
203 Gx_echo_stereo::instantiate,
204 Gx_echo_stereo::connect_port,
205 Gx_echo_stereo::activate,
206 Gx_echo_stereo::run,
207 Gx_echo_stereo::deactivate,
208 Gx_echo_stereo::cleanup,
209 NULL
210 };
211
212 ////////////////////////// LV2 SYMBOL EXPORT ///////////////////////////
213
214 extern "C"
215 LV2_SYMBOL_EXPORT
216 const LV2_Descriptor*
217 lv2_descriptor(uint32_t index)
218 {
219 switch (index)
220 {
221 case 0:
222 return &Gx_echo_stereo::descriptor;
223 default:
224 return NULL;
225 }
226 }
227
228 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_echo_stereo"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_echo_stereo#gui"
28
29
30 typedef enum
31 {
32 INVERT,
33 PERCENT_R,
34 TIME_R,
35 PERCENT_L,
36 TIME_L,
37 LFOFREQ,
38 LINK,
39 EFFECTS_OUTPUT,
40 EFFECTS_OUTPUT1,
41 EFFECTS_INPUT,
42 EFFECTS_INPUT1,
43 } PortIndex;
44
45 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_echo_stereo>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_echo_stereo" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_echo_stereo#_echo_stereo>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxEcho-Stereo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_echo_stereo> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_echo_stereo#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "mode" ;
54 lv2:name "Mode";
55 lv2:portProperty lv2:integer;
56 lv2:portProperty lv2:enumeration ;
57 lv2:default 0 ;
58 lv2:minimum 0 ;
59 lv2:maximum 1 ;
60 lv2:scalePoint [rdfs:label "linear"; rdf:value 0];
61 lv2:scalePoint [rdfs:label "pingpong"; rdf:value 1];
62 ] , [
63 a lv2:InputPort ,
64 lv2:ControlPort ;
65 lv2:index 1 ;
66 lv2:symbol "level_r" ;
67 lv2:name "R Level";
68 lv2:default 30.0 ;
69 lv2:minimum 0.0 ;
70 lv2:maximum 100.0 ;
71 ] , [
72 a lv2:InputPort ,
73 lv2:ControlPort ;
74 lv2:index 2 ;
75 lv2:symbol "timt_r" ;
76 lv2:name "R Time";
77 lv2:default 100.0 ;
78 lv2:minimum 1.0 ;
79 lv2:maximum 2000.0 ;
80 ] , [
81 a lv2:InputPort ,
82 lv2:ControlPort ;
83 lv2:index 3 ;
84 lv2:symbol "level_l" ;
85 lv2:name "L Level";
86 lv2:default 30.0 ;
87 lv2:minimum 0.0 ;
88 lv2:maximum 100.0 ;
89 ] , [
90 a lv2:InputPort ,
91 lv2:ControlPort ;
92 lv2:index 4 ;
93 lv2:symbol "timt_l" ;
94 lv2:name "L Time";
95 lv2:default 100.0 ;
96 lv2:minimum 1.0 ;
97 lv2:maximum 2000.0 ;
98 ] , [
99 a lv2:InputPort ,
100 lv2:ControlPort ;
101 lv2:index 5 ;
102 lv2:symbol "lfo" ;
103 lv2:name "LFO";
104 lv2:default 0.2 ;
105 lv2:minimum 0.2 ;
106 lv2:maximum 5.0 ;
107 ] , [
108 a lv2:InputPort ,
109 lv2:ControlPort ;
110 lv2:index 6 ;
111 lv2:symbol "link" ;
112 lv2:name "Link (L+R)";
113 lv2:default 0. ;
114 lv2:minimum 0. ;
115 lv2:maximum 1.0 ;
116 ] , [
117 a lv2:AudioPort ,
118 lv2:OutputPort ;
119 lv2:index 7 ;
120 lv2:symbol "out" ;
121 lv2:name "Out"
122 ] , [
123 a lv2:AudioPort ,
124 lv2:OutputPort ;
125 lv2:index 8 ;
126 lv2:symbol "out1" ;
127 lv2:name "Out1"
128 ] , [
129 a lv2:AudioPort ,
130 lv2:InputPort ;
131 lv2:index 9 ;
132 lv2:symbol "in" ;
133 lv2:name "In" ;
134 ], [
135 a lv2:AudioPort ,
136 lv2:InputPort ;
137 lv2:index 10 ;
138 lv2:symbol "in1" ;
139 lv2:name "In1" ;
140 ].
141
142 <http://guitarix.sourceforge.net/plugins/gx_echo_stereo#gui>
143 a guiext:GtkUI;
144 guiext:binary <gx_echo_gui.so>;
145 guiext:requiredFeature guiext:makeResident .
146
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_echo.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_echo_stereoGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_echo_stereoGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_echo_stereoGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_echo_stereoGUI () {};
56 ~Gx_echo_stereoGUI () {};
57 } ;
58
59 void Gx_echo_stereoGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_echo_stereoGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_expander_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_expander_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_echo_stereoGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_echo_stereo#_echo_stereo", plugin_uri) == 0)
161 {
162 plug_name = "_echo_stereo";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_echo_stereo";
168 }
169 }
170
171 GtkWidget* Gx_echo_stereoGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_echo_stereoGUI* self = new Gx_echo_stereoGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_echo_stereoGUI *pluginGui = static_cast<Gx_echo_stereoGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_echo_stereoGUI *self = static_cast<Gx_echo_stereoGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_echo_stereo#_echo_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_echo.so> ;
25 rdfs:seeAlso <gx_echo.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_echo_stereo#_echo_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_echo@LIB_EXT@> ;
25 rdfs:seeAlso <gx_echo.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
33 {
34 switch ((PortIndex)port_index )
35 {
36 case TIME_R:
37 return &m_bigknob;
38 case TIME_L:
39 return &m_bigknob1;
40 case LFOFREQ:
41 return &m_smallknob3;
42 case INVERT:
43 return &m_selector;
44 case PERCENT_R:
45 return &m_smallknob4;
46 case PERCENT_L:
47 return &m_smallknob5;
48 case LINK:
49 return &m_switch;
50 default:
51 return NULL;
52 }
53 }
54
55 Widget::Widget(Glib::ustring plugname):
56 plug_name(plugname)
57 {
58 // create controllers for port name
59 Glib::ustring modes[] = {"linear","ping pong"};
60 static const size_t _size = sizeof(modes) / sizeof(modes[0]);
61 make_selector("Echo Mode", modes, _size, 0, 1.0, INVERT);
62 make_controller_box(&m_vbox2, "Time (R)", 1, 2000, 1, TIME_R);
63 make_controller_box(&m_vbox3, "Time (L)", 1, 2000, 1, TIME_L);
64 make_controller_box(&m_vbox4, "LFO", 0.2, 5, 0.01, LFOFREQ);
65 m_vbox4.pack_start(m_selector, Gtk::PACK_SHRINK);
66 make_controller_box(&m_vbox5, "Level (R)", 0, 100, 1, PERCENT_R);
67 make_controller_box(&m_vbox6, "Level (L)", 0, 100, 1, PERCENT_L);
68 make_switch_box(&m_vbox7, "Link (L+R)", LINK);
69
70 // set propertys for the main paintbox holding the skin
71 m_paintbox.set_border_width(10);
72 m_paintbox.set_spacing(6);
73 m_paintbox.set_homogeneous(false);
74 m_paintbox.set_name(plug_name);
75 m_paintbox.property_paint_func() = "gxhead_expose";
76 add(m_paintbox);
77 // box for the controllers
78 m_hbox_.set_spacing(14);
79 m_hbox_.set_border_width(24);
80 m_hbox_.set_homogeneous(false);
81 // set a vertical box in the paintbox
82 m_vbox.set_border_width(14);
83 m_vbox1.set_border_width(14);
84 m_paintbox.pack_start(m_vbox_);
85 // and controller box on top
86 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
87 // put boxed controllers into controller box
88 m_hbox_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
89 m_hbox_.pack_start(m_vbox3);
90 m_hbox_.pack_start(m_vbox6);
91 m_hbox_.pack_start(m_vbox4);
92 m_hbox_.pack_start(m_vbox5);
93 m_hbox_.pack_start(m_vbox2);
94 m_hbox_.pack_start(m_vbox7);
95 m_hbox_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
96
97 // connect expose handler as resize handler
98 m_paintbox.signal_expose_event().connect(
99 sigc::mem_fun(this, &Widget::_expose_event), true);
100
101 set_app_paintable(true);
102 show_all();
103 }
104
105 Widget::~Widget()
106 {
107
108 }
109
110 // set borderwith for paintbox when widget resize
111 // to hold controllers in place
112 bool Widget::_expose_event(GdkEventExpose *event)
113 {
114 int x, y, width, height, depth;
115 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
116 //double_t height = m_paintbox.get_window()->get_height();
117 m_paintbox.set_border_width(height/10);
118 return false;
119 }
120
121 // create selectors from gxwmm
122 void Widget::make_selector(Glib::ustring labela,
123 Glib::ustring tables[],
124 size_t _size,
125 float min, float digits,
126 PortIndex port_name)
127 {
128 Gxw::Selector *regler = static_cast<Gxw::Selector*>
129 (get_controller_by_port(port_name));
130 if (regler)
131 {
132 float max = static_cast<float>(_size+1);
133
134 Gtk::TreeModelColumn<Glib::ustring> label;
135 Gtk::TreeModelColumnRecord rec;
136 rec.add(label);
137 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
138
139 for (uint32_t i = 0 ; i< _size; ++i) {
140 ls->append()->set_value(0, tables[i]);
141 }
142 regler->set_model(ls);
143 regler->set_has_tooltip();
144 regler->set_tooltip_text(labela);
145 regler->cp_configure("SELECTOR", labela, min, max, digits);
146 regler->set_show_value(false);
147 regler->set_name(plug_name);
148 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
149 *this, &Widget::on_value_changed), port_name));
150 }
151 }
152
153 // create stackboxes with controllers for port name
154 void Widget::make_controller_box(Gtk::Box *box,
155 Glib::ustring label,
156 float min, float max,
157 float digits,
158 PortIndex port_name)
159 {
160 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
161 get_controller_by_port(port_name));
162 if (regler)
163 {
164 Gtk::Label* pr = new Gtk::Label(label, 0);
165 pr->set_name("amplabel");
166 // use label images instead simple string labes
167 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
168 label_image += "/";
169 label_image += label;
170 label_image += "-label.png";
171 Gtk::Image *pr = new Gtk::Image(label_image);*/
172
173 Gtk::VBox* b1 = new Gtk::VBox();
174 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
175 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
176 regler->cp_configure("KNOB", label, min, max, digits);
177 regler->set_show_value(false);
178 regler->set_name(plug_name);
179 box->pack_start(*regler,Gtk::PACK_SHRINK);
180 Gtk::VBox* b2 = new Gtk::VBox();
181 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
182 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
183 *this, &Widget::on_value_changed), port_name));
184 }
185 }
186
187 // create stackboxes with switch controller for port name
188 void Widget::make_switch_box(Gtk::Box *box,
189 Glib::ustring label,
190 PortIndex port_name)
191 {
192 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
193 get_controller_by_port(port_name));
194 if (regler)
195 {
196 Gtk::Label* pr = new Gtk::Label(label, 0);
197 pr->set_name("amplabel");
198 // use label images instead simple string labes
199 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
200 label_image += "/"+plug_name+"-";
201 label_image += label;
202 label_image += "-label.png";
203 Gtk::Image *pr = new Gtk::Image(label_image);*/
204
205 regler->cp_configure("switch", label, 0, 1, 1);
206 regler->set_name(plug_name);
207 regler->set_base_name( "button" );
208 Gtk::VBox* b1 = new Gtk::VBox();
209 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
210 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
211 box->pack_start(*regler,Gtk::PACK_SHRINK);
212 Gtk::VBox* b2 = new Gtk::VBox();
213 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
214 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
215 *this, &Widget::on_value_changed), port_name));
216 }
217 }
218
219 // special function to link controllers of left and right channel
220 // when link is selected
221 void Widget::check_for_link(uint32_t port_name, float value)
222 {
223 if (static_cast<Gxw::Regler*>(get_controller_by_port(LINK))->
224 cp_get_value())
225 {
226 switch ((PortIndex)port_name)
227 {
228 case TIME_R:
229 static_cast<Gxw::Regler*>(get_controller_by_port(TIME_L))
230 ->cp_set_value(value);
231 break;
232 case TIME_L:
233 static_cast<Gxw::Regler*>(get_controller_by_port(TIME_R))
234 ->cp_set_value(value);
235 break;
236 case PERCENT_R:
237 static_cast<Gxw::Regler*>(get_controller_by_port(PERCENT_L))
238 ->cp_set_value(value);
239 break;
240 case PERCENT_L:
241 static_cast<Gxw::Regler*>(get_controller_by_port(PERCENT_R))
242 ->cp_set_value(value);
243 break;
244 default:
245 break;
246 }
247 }
248 }
249
250 // receive controller value changes from host and set them to controller
251 void Widget::set_value(uint32_t port_index,
252 uint32_t format,
253 const void * buffer)
254 {
255 if ( format == 0 )
256 {
257 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
258 get_controller_by_port(port_index));
259 if (regler)
260 {
261 float value = *static_cast<const float*>(buffer);
262 regler->cp_set_value(value);
263 check_for_link(port_index, value);
264 }
265 }
266 }
267
268 // write (UI) controller value changes to the host->engine
269 void Widget::on_value_changed(uint32_t port_index)
270 {
271 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
272 get_controller_by_port(port_index));
273 if (regler)
274 {
275 float value = regler->cp_get_value();
276 write_function(controller, port_index, sizeof(float), 0,
277 static_cast<const void*>(&value));
278 check_for_link(port_index, value);
279 }
280 }
281
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_echo.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void check_for_link(uint32_t port_name, float value);
39
40 void make_controller_box(Gtk::Box *box,
41 Glib::ustring label,
42 float min, float max,
43 float digits,
44 PortIndex port_name);
45
46 void make_selector(Glib::ustring label,
47 Glib::ustring tables[],
48 size_t _size,
49 float min, float digits,
50 PortIndex port_name);
51
52 void make_switch_box(Gtk::Box *box,
53 Glib::ustring label,
54 PortIndex port_name);
55
56 bool _expose_event(GdkEventExpose *event);
57
58 void set_value(uint32_t port_index,
59 uint32_t format,
60 const void * buffer);
61 public:
62
63 // public Lv2 communication stuff
64 LV2UI_Controller controller;
65 LV2UI_Write_Function write_function;
66 static void set_value_static(uint32_t port_index,
67 uint32_t buffer_size,
68 uint32_t format,
69 const void * buffer, Widget *self)
70 {
71 self->set_value(port_index,format,buffer);
72 }
73
74 Widget(Glib::ustring plugname);
75 ~Widget();
76
77 protected:
78 Glib::ustring plug_name;
79 Gtk::VBox m_vbox_;
80 Gtk::VBox m_vbox;
81 Gtk::VBox m_vbox1;
82 Gtk::VBox m_vbox2;
83 Gtk::VBox m_vbox3;
84 Gtk::VBox m_vbox4;
85 Gtk::VBox m_vbox5;
86 Gtk::VBox m_vbox6;
87 Gtk::VBox m_vbox7;
88 Gtk::HBox m_hbox_;
89
90 Gxw::PaintBox m_paintbox;
91 Gxw::BigKnob m_bigknob;
92 Gxw::BigKnob m_bigknob1;
93 Gxw::SmallKnobR m_smallknob3;
94 Gxw::BigKnob m_smallknob4;
95 Gxw::BigKnob m_smallknob5;
96 Gxw::Selector m_selector;
97 Gxw::Switch m_switch;
98 };
99
100 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_echo.lv2'
10
11 src = ['gx_echo.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_echo',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_echo_gui',
59 source = 'widget.cpp gx_echo_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_echo.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_echo.lv2', 'gx_echo.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_expander.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "expander.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_expander
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 // pointer to dsp class
36 PluginLV2* expander_st;
37 // private functions
38 inline void run_dsp_mono(uint32_t n_samples);
39 inline void connect_mono(uint32_t port,void* data);
40 inline void init_dsp_mono(uint32_t rate);
41 inline void connect_all_mono_ports(uint32_t port, void* data);
42 inline void activate_f();
43 inline void deactivate_f();
44 inline void clean_up();
45
46 public:
47 // LV2 Descriptor
48 static const LV2_Descriptor descriptor;
49 // static wrapper to private functions
50 static void deactivate(LV2_Handle instance);
51 static void cleanup(LV2_Handle instance);
52 static void run(LV2_Handle instance, uint32_t n_samples);
53 static void activate(LV2_Handle instance);
54 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
55 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
56 double rate, const char* bundle_path,
57 const LV2_Feature* const* features);
58 Gx_expander();
59 ~Gx_expander();
60 };
61
62 // constructor
63 Gx_expander::Gx_expander() :
64 output(NULL),
65 input(NULL),
66 expander_st(expander::plugin()) {};
67
68 // destructor
69 Gx_expander::~Gx_expander()
70 {
71 // just to be sure the plug have given free the allocated mem
72 // check if the function is valid
73 // it didn't hurd if the mem is already given free by clean_up()
74 if ( expander_st->activate_plugin !=0)
75 expander_st->activate_plugin(false, expander_st);
76 // delete DSP class
77 expander_st->delete_instance(expander_st);
78 };
79
80 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
81
82 void Gx_expander::init_dsp_mono(uint32_t rate)
83 {
84 AVOIDDENORMALS(); // init the SSE denormal protection
85 expander_st->set_samplerate(rate, expander_st); // init the DSP class
86 }
87
88 // connect the Ports used by the plug-in class
89 void Gx_expander::connect_mono(uint32_t port,void* data)
90 {
91 switch ((PortIndex)port)
92 {
93 case EFFECTS_OUTPUT:
94 output = static_cast<float*>(data);
95 break;
96 case EFFECTS_INPUT:
97 input = static_cast<float*>(data);
98 break;
99 default:
100 break;
101 }
102 }
103
104 void Gx_expander::activate_f()
105 {
106 // allocate the internal DSP mem
107 // check if the function is valid
108 if (expander_st->activate_plugin !=0)
109 expander_st->activate_plugin(true, expander_st);
110 }
111
112 void Gx_expander::deactivate_f()
113 {
114 // free the allocated internal DSP mem
115 // check if the function is valid
116 if (expander_st->activate_plugin !=0)
117 expander_st->activate_plugin(false, expander_st);
118 }
119
120 void Gx_expander::clean_up()
121 {
122 // delete the internal DSP mem
123 // check if the function is valid
124 if (expander_st->activate_plugin !=0)
125 expander_st->activate_plugin(false, expander_st);
126 }
127
128 void Gx_expander::run_dsp_mono(uint32_t n_samples)
129 {
130 expander_st->mono_audio(static_cast<int>(n_samples), input,
131 output, expander_st);
132 }
133
134 void Gx_expander::connect_all_mono_ports(uint32_t port, void* data)
135 {
136 // connect the Ports used by the plug-in class
137 connect_mono(port,data);
138 // connect the Ports used by the DSP class
139 expander_st->connect_ports(port, data, expander_st);
140 }
141
142 ///////////////////// STATIC CLASS FUNCTIONS /////////////////////////
143
144 LV2_Handle
145 Gx_expander::instantiate( const LV2_Descriptor* descriptor,
146 double rate,
147 const char* bundle_path,
148 const LV2_Feature* const* features)
149 {
150 // init the plug-in class
151 Gx_expander *self = new Gx_expander();
152 if (!self)
153 {
154 return NULL;
155 }
156
157 self->init_dsp_mono((uint32_t)rate);
158
159 return (LV2_Handle)self;
160 }
161
162 void Gx_expander::connect_port(LV2_Handle instance,
163 uint32_t port,
164 void* data)
165 {
166 // connect all ports
167 static_cast<Gx_expander*>(instance)->connect_all_mono_ports(port, data);
168 }
169
170 void Gx_expander::activate(LV2_Handle instance)
171 {
172 // allocate needed mem
173 static_cast<Gx_expander*>(instance)->activate_f();
174 }
175
176 void Gx_expander::run(LV2_Handle instance, uint32_t n_samples)
177 {
178 // run dsp
179 static_cast<Gx_expander*>(instance)->run_dsp_mono(n_samples);
180 }
181
182 void Gx_expander::deactivate(LV2_Handle instance)
183 {
184 // free allocated mem
185 static_cast<Gx_expander*>(instance)->deactivate_f();
186 }
187
188 void Gx_expander::cleanup(LV2_Handle instance)
189 {
190 // well, clean up after us
191 Gx_expander* self = static_cast<Gx_expander*>(instance);
192 self->clean_up();
193 delete self;
194 }
195
196 const LV2_Descriptor Gx_expander::descriptor =
197 {
198 GXPLUGIN_URI "#_expander",
199 instantiate,
200 connect_port,
201 activate,
202 run,
203 deactivate,
204 cleanup,
205 NULL
206 };
207
208 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
209
210 extern "C"
211 LV2_SYMBOL_EXPORT
212 const LV2_Descriptor*
213 lv2_descriptor(uint32_t index)
214 {
215 switch (index)
216 {
217 case 0:
218 return &Gx_expander::descriptor;
219 default:
220 return NULL;
221 }
222 }
223
224 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_expander"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_expander#gui"
28
29 typedef enum
30 {
31 RATIO,
32 KNEE,
33 THRESHOLD,
34 RELEASE,
35 ATTACK,
36 EFFECTS_OUTPUT,
37 EFFECTS_INPUT,
38 } PortIndex;
39
40 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_expander>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_expander" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_expander#_expander>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxExpander";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_expander> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_expander#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "RATIO" ;
54 lv2:name "RATIO";
55 lv2:default 2.0 ;
56 lv2:minimum 1.0 ;
57 lv2:maximum 2e+01 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "KNEE" ;
63 lv2:name "KNEE";
64 lv2:default 3.0 ;
65 lv2:minimum 0.0 ;
66 lv2:maximum 2e+01 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "THRESHOLD" ;
72 lv2:name "THRESHOLD";
73 lv2:default -4e+01 ;
74 lv2:minimum -96.0 ;
75 lv2:maximum 1e+01 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "RELEASE" ;
81 lv2:name "RELEASE";
82 lv2:default 0.1 ;
83 lv2:minimum 0.0 ;
84 lv2:maximum 1e+01 ;
85 ] , [
86 a lv2:InputPort ,
87 lv2:ControlPort ;
88 lv2:index 4 ;
89 lv2:symbol "ATTACK" ;
90 lv2:name "ATTACK";
91 lv2:default 0.001 ;
92 lv2:minimum 0.0 ;
93 lv2:maximum 1.0 ;
94 ] , [
95 a lv2:AudioPort ,
96 lv2:OutputPort ;
97 lv2:index 5 ;
98 lv2:symbol "out" ;
99 lv2:name "Out" ;
100 ] , [
101 a lv2:AudioPort ,
102 lv2:InputPort ;
103 lv2:index 6 ;
104 lv2:symbol "in" ;
105 lv2:name "In" ;
106 ].
107
108 <http://guitarix.sourceforge.net/plugins/gx_expander#gui>
109 a guiext:GtkUI;
110 guiext:binary <gx_expander_gui.so>;
111 guiext:requiredFeature guiext:makeResident .
112
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_expander.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_expanderGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_expanderGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_expanderGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_expanderGUI () {};
56 ~Gx_expanderGUI () {};
57 } ;
58
59 void Gx_expanderGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_expanderGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_expander_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_expander_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_expanderGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_expander#_expander", plugin_uri) == 0)
161 {
162 plug_name = "_expander";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_expander";
168 }
169 }
170
171 GtkWidget* Gx_expanderGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_expanderGUI* self = new Gx_expanderGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_expanderGUI *pluginGui = static_cast<Gx_expanderGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_expanderGUI *self = static_cast<Gx_expanderGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_expander#_expander>
23 a lv2:Plugin ;
24 lv2:binary <gx_expander.so> ;
25 rdfs:seeAlso <gx_expander.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_expander#_expander>
23 a lv2:Plugin ;
24 lv2:binary <gx_expander@LIB_EXT@> ;
25 rdfs:seeAlso <gx_expander.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case RATIO:
38 return &m_bigknob;
39 case KNEE:
40 return &m_smallknob3;
41 case THRESHOLD:
42 return &m_smallknob4;
43 case RELEASE:
44 return &m_smallknob5;
45 case ATTACK:
46 return &m_smallknob6;
47 default:
48 return NULL;
49 }
50 }
51
52 Widget::Widget(Glib::ustring plugname):
53 plug_name(plugname)
54 {
55 // create controllers for port name
56 make_controller_box(&m_vbox2, "RATIO", 1.0, 2e+01, 0.1, RATIO);
57 make_controller_box(&m_vbox3, "KNEE", 0.0, 2e+01, 0.1, KNEE);
58 make_controller_box(&m_vbox4, "THRESHOLD", -96.0, 1e+01, 0.1, THRESHOLD);
59 make_controller_box(&m_vbox5, "RELEASE", 0.0, 1e+01, 0.01, RELEASE);
60 make_controller_box(&m_vbox6, "ATTACK", 0.0, 1.0, 0.001, ATTACK);
61
62 // set propertys for the main paintbox holding the skin
63 m_paintbox.set_border_width(10);
64 m_paintbox.set_spacing(6);
65 m_paintbox.set_homogeneous(false);
66 m_paintbox.set_name(plug_name);
67 m_paintbox.property_paint_func() = "gxhead_expose";
68 add(m_paintbox);
69 // box for the controllers
70 m_hbox_.set_spacing(14);
71 m_hbox_.set_border_width(5);
72 m_hbox_.set_homogeneous(false);
73 // set a vertical box in the paintbox
74 m_vbox.set_border_width(2);
75 m_vbox1.set_border_width(2);
76 m_paintbox.pack_start(m_vbox_);
77 // and controller box on top
78 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
79 // put boxed controllers into controller box
80 m_hbox_.pack_start(m_vbox,Gtk::PACK_EXPAND_PADDING);
81 m_hbox_.pack_start(m_vbox2);
82 m_hbox_.pack_start(m_vbox3);
83 m_hbox_.pack_start(m_vbox4);
84 m_hbox_.pack_start(m_vbox5);
85 m_hbox_.pack_start(m_vbox6);
86 m_hbox_.pack_start(m_vbox1,Gtk::PACK_EXPAND_PADDING);
87
88 // connect expose handler as resize handler
89 m_paintbox.signal_expose_event().connect(
90 sigc::mem_fun(this, &Widget::_expose_event), true);
91
92 set_app_paintable(true);
93 show_all();
94 }
95
96 Widget::~Widget()
97 {
98
99 }
100
101 // set borderwith for paintbox when widget resize
102 // to hold controllers in place
103 bool Widget::_expose_event(GdkEventExpose *event)
104 {
105 int x, y, width, height, depth;
106 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
107 //double_t height = m_paintbox.get_window()->get_height();
108 m_paintbox.set_border_width(height/20);
109 return false;
110 }
111
112 // create selectors from gxwmm
113 void Widget::make_selector(Glib::ustring labela,
114 Glib::ustring tables[],
115 size_t _size,
116 float min, float digits,
117 PortIndex port_name)
118 {
119 Gxw::Selector *regler = static_cast<Gxw::Selector*>
120 (get_controller_by_port(port_name));
121 if (regler)
122 {
123 float max = static_cast<float>(_size+1);
124
125 Gtk::TreeModelColumn<Glib::ustring> label;
126 Gtk::TreeModelColumnRecord rec;
127 rec.add(label);
128 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
129
130 for (uint32_t i = 0 ; i< _size; ++i) {
131 ls->append()->set_value(0, tables[i]);
132 }
133 regler->set_model(ls);
134 regler->set_has_tooltip();
135 regler->set_tooltip_text(labela);
136 regler->cp_configure("SELECTOR", labela, min, max, digits);
137 regler->set_show_value(false);
138 regler->set_name(plug_name);
139 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
140 *this, &Widget::on_value_changed), port_name));
141 }
142 }
143
144 // create stackboxes with controllers for port name
145 void Widget::make_controller_box(Gtk::Box *box,
146 Glib::ustring label,
147 float min, float max,
148 float digits,
149 PortIndex port_name)
150 {
151 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
152 get_controller_by_port(port_name));
153 if (regler)
154 {
155 Gtk::Label* pr = new Gtk::Label(label, 0);
156 pr->set_name("amplabel");
157 // use label images instead simple string labes
158 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
159 label_image += "/";
160 label_image += label;
161 label_image += "-label.png";
162 Gtk::Image *pr = new Gtk::Image(label_image);*/
163
164 Gtk::VBox* b1 = new Gtk::VBox();
165 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
166 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
167 regler->cp_configure("KNOB", label, min, max, digits);
168 regler->set_show_value(false);
169 regler->set_name(plug_name);
170 box->pack_start(*regler,Gtk::PACK_SHRINK);
171 Gtk::VBox* b2 = new Gtk::VBox();
172 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
173 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
174 *this, &Widget::on_value_changed), port_name));
175 }
176 }
177
178 // create stackboxes with switch controller for port name
179 void Widget::make_switch_box(Gtk::Box *box,
180 Glib::ustring label,
181 PortIndex port_name)
182 {
183 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
184 get_controller_by_port(port_name));
185 if (regler)
186 {
187 Gtk::Label* pr = new Gtk::Label(label, 0);
188 pr->set_name("amplabel");
189 // use label images instead simple string labes
190 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
191 label_image += "/"+plug_name+"-";
192 label_image += label;
193 label_image += "-label.png";
194 Gtk::Image *pr = new Gtk::Image(label_image);*/
195
196 regler->cp_configure("switch", label, 0, 1, 1);
197 regler->set_name(plug_name);
198 regler->set_base_name( "button" );
199 Gtk::VBox* b1 = new Gtk::VBox();
200 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
201 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
202 box->pack_start(*regler,Gtk::PACK_SHRINK);
203 Gtk::VBox* b2 = new Gtk::VBox();
204 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
205 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
206 *this, &Widget::on_value_changed), port_name));
207 }
208 }
209
210 // receive controller value changes from host and set them to controller
211 void Widget::set_value(uint32_t port_index,
212 uint32_t format,
213 const void * buffer)
214 {
215 if ( format == 0 )
216 {
217 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
218 get_controller_by_port(port_index));
219 if (regler)
220 {
221 float value = *static_cast<const float*>(buffer);
222 regler->cp_set_value(value);
223 }
224 }
225 }
226
227 // write (UI) controller value changes to the host->engine
228 void Widget::on_value_changed(uint32_t port_index)
229 {
230 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
231 get_controller_by_port(port_index));
232 if (regler)
233 {
234 float value = regler->cp_get_value();
235 write_function(controller, port_index, sizeof(float), 0,
236 static_cast<const void*>(&value));
237 }
238 }
239
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_expander.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox3;
82 Gtk::VBox m_vbox4;
83 Gtk::VBox m_vbox5;
84 Gtk::VBox m_vbox6;
85 Gtk::HBox m_hbox_;
86
87 Gxw::PaintBox m_paintbox;
88 Gxw::BigKnob m_bigknob;
89 Gxw::BigKnob m_smallknob3;
90 Gxw::BigKnob m_smallknob4;
91 Gxw::BigKnob m_smallknob5;
92 Gxw::BigKnob m_smallknob6;
93 };
94
95 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_expander.lv2'
10
11 src = ['gx_expander.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_expander',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_expander_gui',
59 source = 'widget.cpp gx_expander_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_expander.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_expander.lv2', 'gx_expander.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_flanger.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gx_flanger.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_flanger
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 // pointer to dsp class
36 PluginLV2* flanger_st;
37 // private functions
38 inline void run_dsp_mono(uint32_t n_samples);
39 inline void connect_mono(uint32_t port,void* data);
40 inline void init_dsp_mono(uint32_t rate);
41 inline void connect_all_mono_ports(uint32_t port, void* data);
42 inline void activate_f();
43 inline void deactivate_f();
44 inline void clean_up();
45
46 public:
47 // LV2 Descriptor
48 static const LV2_Descriptor descriptor;
49 // static wrapper to private functions
50 static void deactivate(LV2_Handle instance);
51 static void cleanup(LV2_Handle instance);
52 static void run(LV2_Handle instance, uint32_t n_samples);
53 static void activate(LV2_Handle instance);
54 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
55 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
56 double rate, const char* bundle_path,
57 const LV2_Feature* const* features);
58 Gx_flanger();
59 ~Gx_flanger();
60 };
61
62 // constructor
63 Gx_flanger::Gx_flanger() :
64 output(NULL),
65 input(NULL),
66 flanger_st(gx_flanger::plugin()) {};
67
68 // destructor
69 Gx_flanger::~Gx_flanger()
70 {
71 // just to be sure the plug have given free the allocated mem
72 // check if the function is valid
73 // it didn't hurd if the mem is already given free by clean_up()
74 if ( flanger_st->activate_plugin !=0)
75 flanger_st->activate_plugin(false, flanger_st);
76 // delete DSP class
77 flanger_st->delete_instance(flanger_st);
78 };
79
80 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
81
82 void Gx_flanger::init_dsp_mono(uint32_t rate)
83 {
84 AVOIDDENORMALS(); // init the SSE denormal protection
85 flanger_st->set_samplerate(rate, flanger_st); // init the DSP class
86 }
87
88 // connect the Ports used by the plug-in class
89 void Gx_flanger::connect_mono(uint32_t port,void* data)
90 {
91 switch ((PortIndex)port)
92 {
93 case EFFECTS_OUTPUT:
94 output = static_cast<float*>(data);
95 break;
96 case EFFECTS_INPUT:
97 input = static_cast<float*>(data);
98 break;
99 default:
100 break;
101 }
102 }
103
104 void Gx_flanger::activate_f()
105 {
106 // allocate the internal DSP mem
107 // check if the function is valid
108 if (flanger_st->activate_plugin !=0)
109 flanger_st->activate_plugin(true, flanger_st);
110 }
111
112 void Gx_flanger::deactivate_f()
113 {
114 // free the allocated internal DSP mem
115 // check if the function is valid
116 if (flanger_st->activate_plugin !=0)
117 flanger_st->activate_plugin(false, flanger_st);
118 }
119
120 void Gx_flanger::clean_up()
121 {
122 // delete the internal DSP mem
123 // check if the function is valid
124 if (flanger_st->activate_plugin !=0)
125 flanger_st->activate_plugin(false, flanger_st);
126 }
127
128 void Gx_flanger::run_dsp_mono(uint32_t n_samples)
129 {
130 flanger_st->mono_audio(static_cast<int>(n_samples), input,
131 output, flanger_st);
132 }
133
134 void Gx_flanger::connect_all_mono_ports(uint32_t port, void* data)
135 {
136 // connect the Ports used by the plug-in class
137 connect_mono(port,data);
138 // connect the Ports used by the DSP class
139 flanger_st->connect_ports(port, data, flanger_st);
140 }
141
142 ///////////////////// STATIC CLASS FUNCTIONS /////////////////////////
143
144 LV2_Handle
145 Gx_flanger::instantiate( const LV2_Descriptor* descriptor,
146 double rate,
147 const char* bundle_path,
148 const LV2_Feature* const* features)
149 {
150 // init the plug-in class
151 Gx_flanger *self = new Gx_flanger();
152 if (!self)
153 {
154 return NULL;
155 }
156
157 self->init_dsp_mono((uint32_t)rate);
158
159 return (LV2_Handle)self;
160 }
161
162 void Gx_flanger::connect_port(LV2_Handle instance,
163 uint32_t port,
164 void* data)
165 {
166 // connect all ports
167 static_cast<Gx_flanger*>(instance)->connect_all_mono_ports(port, data);
168 }
169
170 void Gx_flanger::activate(LV2_Handle instance)
171 {
172 // allocate needed mem
173 static_cast<Gx_flanger*>(instance)->activate_f();
174 }
175
176 void Gx_flanger::run(LV2_Handle instance, uint32_t n_samples)
177 {
178 // run dsp
179 static_cast<Gx_flanger*>(instance)->run_dsp_mono(n_samples);
180 }
181
182 void Gx_flanger::deactivate(LV2_Handle instance)
183 {
184 // free allocated mem
185 static_cast<Gx_flanger*>(instance)->deactivate_f();
186 }
187
188 void Gx_flanger::cleanup(LV2_Handle instance)
189 {
190 // well, clean up after us
191 Gx_flanger* self = static_cast<Gx_flanger*>(instance);
192 self->clean_up();
193 delete self;
194 }
195
196 const LV2_Descriptor Gx_flanger::descriptor =
197 {
198 GXPLUGIN_URI "#_flanger",
199 instantiate,
200 connect_port,
201 activate,
202 run,
203 deactivate,
204 cleanup,
205 NULL
206 };
207
208 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
209
210 extern "C"
211 LV2_SYMBOL_EXPORT
212 const LV2_Descriptor*
213 lv2_descriptor(uint32_t index)
214 {
215 switch (index)
216 {
217 case 0:
218 return &Gx_flanger::descriptor;
219 default:
220 return NULL;
221 }
222 }
223
224 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_flanger"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_flanger#gui"
28
29 typedef enum
30 {
31 DEPTH,
32 WIDTH,
33 FREQ,
34 FEEDBACK,
35 WET,
36 MIX,
37 EFFECTS_OUTPUT,
38 EFFECTS_INPUT,
39 } PortIndex;
40
41 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_flanger>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_flanger" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_flanger#_flanger>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxFlanger";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_flanger> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_flanger#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "depth" ;
54 lv2:name "DEPTH";
55 lv2:default 0.5 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 5.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "width" ;
63 lv2:name "WIDTH";
64 lv2:default 5.0 ;
65 lv2:minimum 0.0 ;
66 lv2:maximum 10.0 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "freq" ;
72 lv2:name "FREQ";
73 lv2:default 0.2 ;
74 lv2:minimum 0.05 ;
75 lv2:maximum 10.0 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "feedback" ;
81 lv2:name "FEEDBACK";
82 lv2:default -0.707 ;
83 lv2:minimum -0.99 ;
84 lv2:maximum 0.99 ;
85 ] , [
86 a lv2:InputPort ,
87 lv2:ControlPort ;
88 lv2:index 4 ;
89 lv2:symbol "dry_wet" ;
90 lv2:name "WET";
91 lv2:default 100.0 ;
92 lv2:minimum 0.0 ;
93 lv2:maximum 100.0 ;
94 ] , [
95 a lv2:InputPort ,
96 lv2:ControlPort ;
97 lv2:index 5 ;
98 lv2:symbol "mix" ;
99 lv2:name "MIX";
100 lv2:default 0.0 ;
101 lv2:minimum -1.0 ;
102 lv2:maximum 1.0 ;
103 ] , [
104 a lv2:AudioPort ,
105 lv2:OutputPort ;
106 lv2:index 6 ;
107 lv2:symbol "out" ;
108 lv2:name "Out" ;
109 ] , [
110 a lv2:AudioPort ,
111 lv2:InputPort ;
112 lv2:index 7 ;
113 lv2:symbol "in" ;
114 lv2:name "In" ;
115 ].
116
117 <http://guitarix.sourceforge.net/plugins/gx_flanger#gui>
118 a guiext:GtkUI;
119 guiext:binary <gx_flanger_gui.so>;
120 guiext:requiredFeature guiext:makeResident .
121
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_flanger.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_flangerGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_flangerGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_flangerGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_flangerGUI () {};
56 ~Gx_flangerGUI () {};
57 } ;
58
59 void Gx_flangerGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_flangerGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_flanger_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_flanger_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_flangerGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_flanger#_flanger", plugin_uri) == 0)
161 {
162 plug_name = "_flanger";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_flanger";
168 }
169 }
170
171 GtkWidget* Gx_flangerGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_flangerGUI* self = new Gx_flangerGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_flangerGUI *pluginGui = static_cast<Gx_flangerGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_flangerGUI *self = static_cast<Gx_flangerGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_flanger#_flanger>
23 a lv2:Plugin ;
24 lv2:binary <gx_flanger.so> ;
25 rdfs:seeAlso <gx_flanger.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_flanger#_flanger>
23 a lv2:Plugin ;
24 lv2:binary <gx_flanger@LIB_EXT@> ;
25 rdfs:seeAlso <gx_flanger.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case DEPTH:
38 return &m_bigknob;
39 case WIDTH:
40 return &m_smallknob4;
41 case FREQ:
42 return &m_smallknob5;
43 case FEEDBACK:
44 return &m_smallknob6;
45 case WET:
46 return &m_smallknob7;
47 case MIX:
48 return &m_smallknob8;
49 default:
50 return NULL;
51 }
52 }
53
54 Widget::Widget(Glib::ustring plugname):
55 plug_name(plugname)
56 {
57 // create controllers for port name
58 make_controller_box(&m_vbox2, "depth", 0, 5, 0.01, DEPTH);
59 make_controller_box(&m_vbox3, "width", 0, 10, 0.01, WIDTH);
60 make_controller_box(&m_vbox4, "freq", 0.05, 10, 0.06, FREQ);
61 make_controller_box(&m_vbox5, "feedback", -0.99, 0.99, 0.01, FEEDBACK);
62 make_controller_box(&m_vbox6, "dry/wet", 0, 100, 1, WET);
63 make_controller_box(&m_vbox7, "mix", -1, 1, 0.1, MIX);
64
65 // set propertys for the main paintbox holding the skin
66 m_paintbox.set_border_width(10);
67 m_paintbox.set_spacing(6);
68 m_paintbox.set_homogeneous(false);
69 m_paintbox.set_name(plug_name);
70 m_paintbox.property_paint_func() = "gxhead_expose";
71 add(m_paintbox);
72 // box for the controllers
73 m_hbox_.set_spacing(14);
74 m_hbox_.set_border_width(5);
75 m_hbox_.set_homogeneous(false);
76 // set a vertical box in the paintbox
77 m_vbox.set_border_width(2);
78 m_vbox1.set_border_width(2);
79 m_paintbox.pack_start(m_vbox_);
80 // and controller box on top
81 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
82 // put boxed controllers into controller box
83 m_hbox_.pack_start(m_vbox,Gtk::PACK_EXPAND_PADDING);
84 m_hbox_.pack_start(m_vbox2);
85 m_hbox_.pack_start(m_vbox3);
86 m_hbox_.pack_start(m_vbox4);
87 m_hbox_.pack_start(m_vbox5);
88 m_hbox_.pack_start(m_vbox6);
89 m_hbox_.pack_start(m_vbox7);
90 m_hbox_.pack_start(m_vbox1,Gtk::PACK_EXPAND_PADDING);
91
92 // connect expose handler as resize handler
93 m_paintbox.signal_expose_event().connect(
94 sigc::mem_fun(this, &Widget::_expose_event), true);
95
96 set_app_paintable(true);
97 show_all();
98 }
99
100 Widget::~Widget()
101 {
102
103 }
104
105 // set borderwith for paintbox when widget resize
106 // to hold controllers in place
107 bool Widget::_expose_event(GdkEventExpose *event)
108 {
109 int x, y, width, height, depth;
110 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
111 //double_t height = m_paintbox.get_window()->get_height();
112 m_paintbox.set_border_width(height/10);
113 return false;
114 }
115
116 // create selectors from gxwmm
117 void Widget::make_selector(Glib::ustring labela,
118 Glib::ustring tables[],
119 size_t _size,
120 float min, float digits,
121 PortIndex port_name)
122 {
123 Gxw::Selector *regler = static_cast<Gxw::Selector*>
124 (get_controller_by_port(port_name));
125 if (regler)
126 {
127 float max = static_cast<float>(_size+1);
128
129 Gtk::TreeModelColumn<Glib::ustring> label;
130 Gtk::TreeModelColumnRecord rec;
131 rec.add(label);
132 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
133
134 for (uint32_t i = 0 ; i< _size; ++i) {
135 ls->append()->set_value(0, tables[i]);
136 }
137 regler->set_model(ls);
138 regler->set_has_tooltip();
139 regler->set_tooltip_text(labela);
140 regler->cp_configure("SELECTOR", labela, min, max, digits);
141 regler->set_show_value(false);
142 regler->set_name(plug_name);
143 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
144 *this, &Widget::on_value_changed), port_name));
145 }
146 }
147
148 // create stackboxes with controllers for port name
149 void Widget::make_controller_box(Gtk::Box *box,
150 Glib::ustring label,
151 float min, float max,
152 float digits,
153 PortIndex port_name)
154 {
155 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
156 get_controller_by_port(port_name));
157 if (regler)
158 {
159 Gtk::Label* pr = new Gtk::Label(label, 0);
160 pr->set_name("amplabel");
161 // use label images instead simple string labes
162 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
163 label_image += "/";
164 label_image += label;
165 label_image += "-label.png";
166 Gtk::Image *pr = new Gtk::Image(label_image);*/
167
168 Gtk::VBox* b1 = new Gtk::VBox();
169 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
170 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
171 regler->cp_configure("KNOB", label, min, max, digits);
172 regler->set_show_value(false);
173 regler->set_name(plug_name);
174 box->pack_start(*regler,Gtk::PACK_SHRINK);
175 Gtk::VBox* b2 = new Gtk::VBox();
176 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
177 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
178 *this, &Widget::on_value_changed), port_name));
179 }
180 }
181
182 // create stackboxes with switch controller for port name
183 void Widget::make_switch_box(Gtk::Box *box,
184 Glib::ustring label,
185 PortIndex port_name)
186 {
187 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
188 get_controller_by_port(port_name));
189 if (regler)
190 {
191 Gtk::Label* pr = new Gtk::Label(label, 0);
192 pr->set_name("amplabel");
193 // use label images instead simple string labes
194 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
195 label_image += "/"+plug_name+"-";
196 label_image += label;
197 label_image += "-label.png";
198 Gtk::Image *pr = new Gtk::Image(label_image);*/
199
200 regler->cp_configure("switch", label, 0, 1, 1);
201 regler->set_name(plug_name);
202 regler->set_base_name( "button" );
203 Gtk::VBox* b1 = new Gtk::VBox();
204 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
205 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
206 box->pack_start(*regler,Gtk::PACK_SHRINK);
207 Gtk::VBox* b2 = new Gtk::VBox();
208 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
209 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
210 *this, &Widget::on_value_changed), port_name));
211 }
212 }
213
214 // receive controller value changes from host and set them to controller
215 void Widget::set_value(uint32_t port_index,
216 uint32_t format,
217 const void * buffer)
218 {
219 if ( format == 0 )
220 {
221 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
222 get_controller_by_port(port_index));
223 if (regler)
224 {
225 float value = *static_cast<const float*>(buffer);
226 regler->cp_set_value(value);
227 }
228 }
229 }
230
231 // write (UI) controller value changes to the host->engine
232 void Widget::on_value_changed(uint32_t port_index)
233 {
234 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
235 get_controller_by_port(port_index));
236 if (regler)
237 {
238 float value = regler->cp_get_value();
239 write_function(controller, port_index, sizeof(float), 0,
240 static_cast<const void*>(&value));
241 }
242 }
243
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_flanger.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox3;
82 Gtk::VBox m_vbox4;
83 Gtk::VBox m_vbox5;
84 Gtk::VBox m_vbox6;
85 Gtk::VBox m_vbox7;
86 Gtk::HBox m_hbox_;
87
88 Gxw::PaintBox m_paintbox;
89 Gxw::BigKnob m_bigknob;
90 Gxw::BigKnob m_smallknob4;
91 Gxw::BigKnob m_smallknob5;
92 Gxw::BigKnob m_smallknob6;
93 Gxw::BigKnob m_smallknob7;
94 Gxw::BigKnob m_smallknob8;
95 };
96
97 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_flanger.lv2'
10
11 src = ['gx_flanger.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_flanger',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_flanger_gui',
59 source = 'widget.cpp gx_flanger_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_flanger.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_flanger.lv2', 'gx_flanger.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_phaser.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "phaser_mono.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_phaser
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 // pointer to dsp class
36 PluginLV2* phaser_st;
37 // private functions
38 inline void run_dsp_mono(uint32_t n_samples);
39 inline void connect_mono(uint32_t port,void* data);
40 inline void init_dsp_mono(uint32_t rate);
41 inline void connect_all_mono_ports(uint32_t port, void* data);
42 inline void activate_f();
43 inline void deactivate_f();
44 inline void clean_up();
45
46 public:
47 // LV2 Descriptor
48 static const LV2_Descriptor descriptor;
49 // static wrapper to private functions
50 static void deactivate(LV2_Handle instance);
51 static void cleanup(LV2_Handle instance);
52 static void run(LV2_Handle instance, uint32_t n_samples);
53 static void activate(LV2_Handle instance);
54 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
55 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
56 double rate, const char* bundle_path,
57 const LV2_Feature* const* features);
58 Gx_phaser();
59 ~Gx_phaser();
60 };
61
62 // constructor
63 Gx_phaser::Gx_phaser() :
64 output(NULL),
65 input(NULL),
66 phaser_st(phaser_mono::plugin()) {};
67
68 // destructor
69 Gx_phaser::~Gx_phaser()
70 {
71 // just to be sure the plug have given free the allocated mem
72 // check if the function is valid
73 // it didn't hurd if the mem is already given free by clean_up()
74 if ( phaser_st->activate_plugin !=0)
75 phaser_st->activate_plugin(false, phaser_st);
76 // delete DSP class
77 phaser_st->delete_instance(phaser_st);
78 };
79
80 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
81
82 void Gx_phaser::init_dsp_mono(uint32_t rate)
83 {
84 AVOIDDENORMALS(); // init the SSE denormal protection
85 phaser_st->set_samplerate(rate, phaser_st); // init the DSP class
86 }
87
88 // connect the Ports used by the plug-in class
89 void Gx_phaser::connect_mono(uint32_t port,void* data)
90 {
91 switch ((PortIndex)port)
92 {
93 case EFFECTS_OUTPUT:
94 output = static_cast<float*>(data);
95 break;
96 case EFFECTS_INPUT:
97 input = static_cast<float*>(data);
98 break;
99 default:
100 break;
101 }
102 }
103
104 void Gx_phaser::activate_f()
105 {
106 // allocate the internal DSP mem
107 // check if the function is valid
108 if (phaser_st->activate_plugin !=0)
109 phaser_st->activate_plugin(true, phaser_st);
110 }
111
112 void Gx_phaser::deactivate_f()
113 {
114 // free the allocated internal DSP mem
115 // check if the function is valid
116 if (phaser_st->activate_plugin !=0)
117 phaser_st->activate_plugin(false, phaser_st);
118 }
119
120 void Gx_phaser::clean_up()
121 {
122 // delete the internal DSP mem
123 // check if the function is valid
124 if (phaser_st->activate_plugin !=0)
125 phaser_st->activate_plugin(false, phaser_st);
126 }
127
128 void Gx_phaser::run_dsp_mono(uint32_t n_samples)
129 {
130 phaser_st->mono_audio(static_cast<int>(n_samples), input,
131 output, phaser_st);
132 }
133
134 void Gx_phaser::connect_all_mono_ports(uint32_t port, void* data)
135 {
136 // connect the Ports used by the plug-in class
137 connect_mono(port,data);
138 // connect the Ports used by the DSP class
139 phaser_st->connect_ports(port, data, phaser_st);
140 }
141
142 ///////////////////// STATIC CLASS FUNCTIONS /////////////////////////
143
144 LV2_Handle
145 Gx_phaser::instantiate( const LV2_Descriptor* descriptor,
146 double rate,
147 const char* bundle_path,
148 const LV2_Feature* const* features)
149 {
150 // init the plug-in class
151 Gx_phaser *self = new Gx_phaser();
152 if (!self)
153 {
154 return NULL;
155 }
156
157 self->init_dsp_mono((uint32_t)rate);
158
159 return (LV2_Handle)self;
160 }
161
162 void Gx_phaser::connect_port(LV2_Handle instance,
163 uint32_t port,
164 void* data)
165 {
166 // connect all ports
167 static_cast<Gx_phaser*>(instance)->connect_all_mono_ports(port, data);
168 }
169
170 void Gx_phaser::activate(LV2_Handle instance)
171 {
172 // allocate needed mem
173 static_cast<Gx_phaser*>(instance)->activate_f();
174 }
175
176 void Gx_phaser::run(LV2_Handle instance, uint32_t n_samples)
177 {
178 // run dsp
179 static_cast<Gx_phaser*>(instance)->run_dsp_mono(n_samples);
180 }
181
182 void Gx_phaser::deactivate(LV2_Handle instance)
183 {
184 // free allocated mem
185 static_cast<Gx_phaser*>(instance)->deactivate_f();
186 }
187
188 void Gx_phaser::cleanup(LV2_Handle instance)
189 {
190 // well, clean up after us
191 Gx_phaser* self = static_cast<Gx_phaser*>(instance);
192 self->clean_up();
193 delete self;
194 }
195
196 const LV2_Descriptor Gx_phaser::descriptor =
197 {
198 GXPLUGIN_URI "#_phaser",
199 instantiate,
200 connect_port,
201 activate,
202 run,
203 deactivate,
204 cleanup,
205 NULL
206 };
207
208 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
209
210 extern "C"
211 LV2_SYMBOL_EXPORT
212 const LV2_Descriptor*
213 lv2_descriptor(uint32_t index)
214 {
215 switch (index)
216 {
217 case 0:
218 return &Gx_phaser::descriptor;
219 default:
220 return NULL;
221 }
222 }
223
224 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_phaser"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_phaser#gui"
28
29 typedef enum
30 {
31 WET_DRY,
32 LEVEL,
33 SPEED,
34 EFFECTS_OUTPUT,
35 EFFECTS_INPUT,
36 } PortIndex;
37
38 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_phaser>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_phaser" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_phaser#_phaser>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxPhaser";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_phaser> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_phaser#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "dry_wet" ;
54 lv2:name "Dry/Wet";
55 lv2:default 50.0 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 100.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "level" ;
63 lv2:name "LEVEL";
64 lv2:default 0.0 ;
65 lv2:minimum -60.0 ;
66 lv2:maximum 10.0 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "speed" ;
72 lv2:name "SPEED";
73 lv2:default 0.5 ;
74 lv2:minimum 0.0 ;
75 lv2:maximum 10.0 ;
76 ] , [
77 a lv2:AudioPort ,
78 lv2:OutputPort ;
79 lv2:index 3 ;
80 lv2:symbol "out" ;
81 lv2:name "Out" ;
82 ] , [
83 a lv2:AudioPort ,
84 lv2:InputPort ;
85 lv2:index 4 ;
86 lv2:symbol "in" ;
87 lv2:name "In" ;
88 ].
89
90 <http://guitarix.sourceforge.net/plugins/gx_phaser#gui>
91 a guiext:GtkUI;
92 guiext:binary <gx_phaser_gui.so>;
93 guiext:requiredFeature guiext:makeResident .
94
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_phaser.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_phaserGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_phaserGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_phaserGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_phaserGUI () {};
56 ~Gx_phaserGUI () {};
57 } ;
58
59 void Gx_phaserGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_phaserGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_phaser_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_phaser_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_phaserGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_phaser#_phaser", plugin_uri) == 0)
161 {
162 plug_name = "_phaser";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_phaser";
168 }
169 }
170
171 GtkWidget* Gx_phaserGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_phaserGUI* self = new Gx_phaserGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_phaserGUI *pluginGui = static_cast<Gx_phaserGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_phaserGUI *self = static_cast<Gx_phaserGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_phaser#_phaser>
23 a lv2:Plugin ;
24 lv2:binary <gx_phaser.so> ;
25 rdfs:seeAlso <gx_phaser.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_phaser#_phaser>
23 a lv2:Plugin ;
24 lv2:binary <gx_phaser@LIB_EXT@> ;
25 rdfs:seeAlso <gx_phaser.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case WET_DRY:
38 return &m_bigknob;
39 case LEVEL:
40 return &m_smallknob4;
41 case SPEED:
42 return &m_smallknob5;
43 default:
44 return NULL;
45 }
46 }
47
48 Widget::Widget(Glib::ustring plugname):
49 plug_name(plugname)
50 {
51 // create controllers for port name
52 make_controller_box(&m_vbox2, "dry/wet", 0.0, 100.0, 1, WET_DRY);
53 make_controller_box(&m_vbox3, "level", -60.0, 10.0, 0.1, LEVEL);
54 make_controller_box(&m_vbox4, "speed", 0.0, 10.0, 0.01, SPEED);
55
56 // set propertys for the main paintbox holding the skin
57 m_paintbox.set_border_width(10);
58 m_paintbox.set_spacing(6);
59 m_paintbox.set_homogeneous(false);
60 m_paintbox.set_name(plug_name);
61 m_paintbox.property_paint_func() = "gxhead_expose";
62 add(m_paintbox);
63 // box for the controllers
64 m_hbox_.set_spacing(64);
65 m_hbox_.set_border_width(5);
66 m_hbox_.set_homogeneous(false);
67 // set a vertical box in the paintbox
68 m_vbox.set_border_width(2);
69 m_vbox1.set_border_width(2);
70 m_paintbox.pack_start(m_vbox_);
71 // and controller box on top
72 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
73 // put boxed controllers into controller box
74 m_hbox_.pack_start(m_vbox,Gtk::PACK_EXPAND_PADDING);
75 m_hbox_.pack_start(m_vbox3);
76 m_hbox_.pack_start(m_vbox4);
77 m_hbox_.pack_start(m_vbox2);
78 m_hbox_.pack_start(m_vbox1,Gtk::PACK_EXPAND_PADDING);
79
80 // connect expose handler as resize handler
81 m_paintbox.signal_expose_event().connect(
82 sigc::mem_fun(this, &Widget::_expose_event), true);
83
84 set_app_paintable(true);
85 show_all();
86 }
87
88 Widget::~Widget()
89 {
90
91 }
92
93 // set borderwith for paintbox when widget resize
94 // to hold controllers in place
95 bool Widget::_expose_event(GdkEventExpose *event)
96 {
97 int x, y, width, height, depth;
98 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
99 //double_t height = m_paintbox.get_window()->get_height();
100 m_paintbox.set_border_width(height/10);
101 return false;
102 }
103
104 // create selectors from gxwmm
105 void Widget::make_selector(Glib::ustring labela,
106 Glib::ustring tables[],
107 size_t _size,
108 float min, float digits,
109 PortIndex port_name)
110 {
111 Gxw::Selector *regler = static_cast<Gxw::Selector*>
112 (get_controller_by_port(port_name));
113 if (regler)
114 {
115 float max = static_cast<float>(_size+1);
116
117 Gtk::TreeModelColumn<Glib::ustring> label;
118 Gtk::TreeModelColumnRecord rec;
119 rec.add(label);
120 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
121
122 for (uint32_t i = 0 ; i< _size; ++i) {
123 ls->append()->set_value(0, tables[i]);
124 }
125 regler->set_model(ls);
126 regler->set_has_tooltip();
127 regler->set_tooltip_text(labela);
128 regler->cp_configure("SELECTOR", labela, min, max, digits);
129 regler->set_show_value(false);
130 regler->set_name(plug_name);
131 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
132 *this, &Widget::on_value_changed), port_name));
133 }
134 }
135
136 // create stackboxes with controllers for port name
137 void Widget::make_controller_box(Gtk::Box *box,
138 Glib::ustring label,
139 float min, float max,
140 float digits,
141 PortIndex port_name)
142 {
143 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
144 get_controller_by_port(port_name));
145 if (regler)
146 {
147 Gtk::Label* pr = new Gtk::Label(label, 0);
148 pr->set_name("amplabel");
149 // use label images instead simple string labes
150 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
151 label_image += "/";
152 label_image += label;
153 label_image += "-label.png";
154 Gtk::Image *pr = new Gtk::Image(label_image);*/
155
156 Gtk::VBox* b1 = new Gtk::VBox();
157 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
158 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
159 regler->cp_configure("KNOB", label, min, max, digits);
160 regler->set_show_value(false);
161 regler->set_name(plug_name);
162 box->pack_start(*regler,Gtk::PACK_SHRINK);
163 Gtk::VBox* b2 = new Gtk::VBox();
164 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
165 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
166 *this, &Widget::on_value_changed), port_name));
167 }
168 }
169
170 // create stackboxes with switch controller for port name
171 void Widget::make_switch_box(Gtk::Box *box,
172 Glib::ustring label,
173 PortIndex port_name)
174 {
175 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
176 get_controller_by_port(port_name));
177 if (regler)
178 {
179 Gtk::Label* pr = new Gtk::Label(label, 0);
180 pr->set_name("amplabel");
181 // use label images instead simple string labes
182 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
183 label_image += "/"+plug_name+"-";
184 label_image += label;
185 label_image += "-label.png";
186 Gtk::Image *pr = new Gtk::Image(label_image);*/
187
188 regler->cp_configure("switch", label, 0, 1, 1);
189 regler->set_name(plug_name);
190 regler->set_base_name( "button" );
191 Gtk::VBox* b1 = new Gtk::VBox();
192 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
193 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
194 box->pack_start(*regler,Gtk::PACK_SHRINK);
195 Gtk::VBox* b2 = new Gtk::VBox();
196 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
197 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
198 *this, &Widget::on_value_changed), port_name));
199 }
200 }
201
202 // receive controller value changes from host and set them to controller
203 void Widget::set_value(uint32_t port_index,
204 uint32_t format,
205 const void * buffer)
206 {
207 if ( format == 0 )
208 {
209 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
210 get_controller_by_port(port_index));
211 if (regler)
212 {
213 float value = *static_cast<const float*>(buffer);
214 regler->cp_set_value(value);
215 }
216 }
217 }
218
219 // write (UI) controller value changes to the host->engine
220 void Widget::on_value_changed(uint32_t port_index)
221 {
222 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
223 get_controller_by_port(port_index));
224 if (regler)
225 {
226 float value = regler->cp_get_value();
227 write_function(controller, port_index, sizeof(float), 0,
228 static_cast<const void*>(&value));
229 }
230 }
231
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_phaser.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox3;
82 Gtk::VBox m_vbox4;
83 Gtk::HBox m_hbox_;
84
85 Gxw::PaintBox m_paintbox;
86 Gxw::BigKnob m_bigknob;
87 Gxw::BigKnob m_smallknob4;
88 Gxw::BigKnob m_smallknob5;
89 };
90
91 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_phaser.lv2'
10
11 src = ['gx_phaser.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_phaser',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_phaser_gui',
59 source = 'widget.cpp gx_phaser_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_phaser.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_phaser.lv2', 'gx_phaser.ttl')
69
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix pset: <http://lv2plug.in/ns/ext/presets#> .
20 @prefix state: <http://lv2plug.in/ns/ext/state#> .
21 @prefix doap: <http://usefulinc.com/ns/doap#> .
22 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
23 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
24 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
25 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
26 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
27 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
28 @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
29 @prefix opt: <http://lv2plug.in/ns/ext/options#> .
30 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
31 @prefix work: <http://lv2plug.in/ns/ext/worker#> .
32
33 <http://guitarix.sourceforge.net#me>
34 a foaf:Person ;
35 foaf:name "Guitarix team" ;
36 foaf:mbox <mailto:brummer@web.de> ;
37 rdfs:seeAlso <http://guitarix.sourceforge.net> .
38
39 <http://guitarix.sourceforge.net/plugins/gx_redeye>
40 a doap:Project ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxRedeye" .
43
44 <http://guitarix.sourceforge.net/plugins/gx_redeye#chump>
45 a lv2:Plugin ,
46 lv2:AmplifierPlugin ;
47 doap:maintainer <http://guitarix.sourceforge.net#me> ;
48 doap:name "GxRedeye Chump";
49 doap:license <http://opensource.org/licenses/isc> ;
50 lv2:project <http://guitarix.sourceforge.net/plugins/gx_redeye> ;
51 lv2:optionalFeature lv2:hardRTCapable ;
52 lv2:requiredFeature urid:map ,
53 bufsz:boundedBlockLength ,
54 work:schedule ;
55 bufsz:minBlockLength 64 ;
56 bufsz:maxBlockLength 8192 ;
57 lv2:extensionData work:interface ;
58
59 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_redeye#gui>;
60
61 lv2:port [
62 a lv2:InputPort ,
63 lv2:ControlPort ;
64 lv2:index 0 ;
65 lv2:symbol "Gain" ;
66 lv2:name "Gain";
67 lv2:default 0.0 ;
68 lv2:minimum -20.0 ;
69 lv2:maximum 20.0 ;
70 ] , [
71 a lv2:InputPort ,
72 lv2:ControlPort ;
73 lv2:index 1 ;
74 lv2:symbol "Tone" ;
75 lv2:name "Tone";
76 lv2:default 0.5 ;
77 lv2:minimum 0.0 ;
78 lv2:maximum 1.0 ;
79 ] , [
80 a lv2:InputPort ,
81 lv2:ControlPort ;
82 lv2:index 2 ;
83 lv2:symbol "Volume" ;
84 lv2:name "Volume";
85 lv2:default 0.0 ;
86 lv2:minimum -20.0 ;
87 lv2:maximum 20.0 ;
88 ] , [
89 a lv2:InputPort ,
90 lv2:ControlPort ;
91 lv2:index 3 ;
92 lv2:symbol "Feedback" ;
93 lv2:name "Feedback";
94 lv2:default 0 ;
95 lv2:minimum 0 ;
96 lv2:maximum 1.0 ;
97 ] , [
98 a lv2:InputPort ,
99 lv2:ControlPort ;
100 lv2:index 4 ;
101 lv2:symbol "Speed" ;
102 lv2:name "Speed";
103 lv2:default 5 ;
104 lv2:minimum 0.1 ;
105 lv2:maximum 10.0 ;
106 ] , [
107 a lv2:InputPort ,
108 lv2:ControlPort ;
109 lv2:index 5 ;
110 lv2:symbol "Intensity" ;
111 lv2:name "Intensity";
112 lv2:default 0 ;
113 lv2:minimum 0 ;
114 lv2:maximum 10.0 ;
115 ] , [
116 a lv2:InputPort ,
117 lv2:ControlPort ;
118 lv2:index 6 ;
119 lv2:symbol "Sinewave" ;
120 lv2:name "Sinewave";
121 lv2:default 0 ;
122 lv2:minimum 0 ;
123 lv2:maximum 1.0 ;
124 ] , [
125 a lv2:AudioPort ,
126 lv2:OutputPort ;
127 lv2:index 7 ;
128 lv2:symbol "out" ;
129 lv2:name "Out"
130 ] , [
131 a lv2:AudioPort ,
132 lv2:InputPort ;
133 lv2:index 8 ;
134 lv2:symbol "in" ;
135 lv2:name "in"
136 ] .
137
138 <http://guitarix.sourceforge.net/plugins/gx_redeye#bigchump>
139 a lv2:Plugin ,
140 lv2:AmplifierPlugin ;
141 doap:maintainer <http://guitarix.sourceforge.net#me> ;
142 doap:name "GxRedeye Big Chump";
143 doap:license <http://opensource.org/licenses/isc> ;
144 lv2:project <http://guitarix.sourceforge.net/plugins/gx_redeye> ;
145 lv2:optionalFeature lv2:hardRTCapable ;
146 lv2:requiredFeature urid:map ,
147 bufsz:boundedBlockLength ,
148 work:schedule ;
149 bufsz:minBlockLength 64 ;
150 bufsz:maxBlockLength 8192 ;
151 lv2:extensionData work:interface ;
152
153 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_redeye#gui>;
154
155 lv2:port [
156 a lv2:InputPort ,
157 lv2:ControlPort ;
158 lv2:index 0 ;
159 lv2:symbol "Gain" ;
160 lv2:name "Gain";
161 lv2:default 5.0 ;
162 lv2:minimum 0.0 ;
163 lv2:maximum 10.0 ;
164 ] , [
165 a lv2:InputPort ,
166 lv2:ControlPort ;
167 lv2:index 1 ;
168 lv2:symbol "Tone" ;
169 lv2:name "Tone";
170 lv2:default 0.0 ;
171 lv2:minimum -6.0 ;
172 lv2:maximum 6.0 ;
173 ] , [
174 a lv2:InputPort ,
175 lv2:ControlPort ;
176 lv2:index 2 ;
177 lv2:symbol "Volume" ;
178 lv2:name "Volume";
179 lv2:default 5.0 ;
180 lv2:minimum 0.0 ;
181 lv2:maximum 10.0 ;
182 ] , [
183 a lv2:InputPort ,
184 lv2:ControlPort ;
185 lv2:index 3 ;
186 lv2:symbol "Feedback" ;
187 lv2:name "Feedback";
188 lv2:default 0 ;
189 lv2:minimum 0 ;
190 lv2:maximum 1.0 ;
191 ] , [
192 a lv2:InputPort ,
193 lv2:ControlPort ;
194 lv2:index 4 ;
195 lv2:symbol "Speed" ;
196 lv2:name "Speed";
197 lv2:default 5 ;
198 lv2:minimum 0.1 ;
199 lv2:maximum 10.0 ;
200 ] , [
201 a lv2:InputPort ,
202 lv2:ControlPort ;
203 lv2:index 5 ;
204 lv2:symbol "Intensity" ;
205 lv2:name "Intensity";
206 lv2:default 0 ;
207 lv2:minimum 0 ;
208 lv2:maximum 10.0 ;
209 ] , [
210 a lv2:InputPort ,
211 lv2:ControlPort ;
212 lv2:index 6 ;
213 lv2:symbol "Sinewave" ;
214 lv2:name "Sinewave";
215 lv2:default 0 ;
216 lv2:minimum 0 ;
217 lv2:maximum 1.0 ;
218 ] , [
219 a lv2:AudioPort ,
220 lv2:OutputPort ;
221 lv2:index 7 ;
222 lv2:symbol "out" ;
223 lv2:name "Out"
224 ] , [
225 a lv2:AudioPort ,
226 lv2:InputPort ;
227 lv2:index 8 ;
228 lv2:symbol "in" ;
229 lv2:name "in"
230 ] .
231
232 <http://guitarix.sourceforge.net/plugins/gx_redeye#vibrochump>
233 a lv2:Plugin ,
234 lv2:AmplifierPlugin ;
235 doap:maintainer <http://guitarix.sourceforge.net#me> ;
236 doap:name "GxRedeye Vibro Chump";
237 doap:license <http://opensource.org/licenses/isc> ;
238 lv2:project <http://guitarix.sourceforge.net/plugins/gx_redeye> ;
239 lv2:optionalFeature lv2:hardRTCapable ;
240 lv2:requiredFeature urid:map ,
241 bufsz:boundedBlockLength ,
242 work:schedule ;
243 bufsz:minBlockLength 64 ;
244 bufsz:maxBlockLength 8192 ;
245 lv2:extensionData work:interface ;
246
247 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_redeye#gui>;
248
249 lv2:port [
250 a lv2:InputPort ,
251 lv2:ControlPort ;
252 lv2:index 0 ;
253 lv2:symbol "Gain" ;
254 lv2:name "Gain";
255 lv2:default 5.0 ;
256 lv2:minimum 0.0 ;
257 lv2:maximum 10.0 ;
258 ] , [
259 a lv2:InputPort ,
260 lv2:ControlPort ;
261 lv2:index 1 ;
262 lv2:symbol "Tone" ;
263 lv2:name "Tone";
264 lv2:default 0.0 ;
265 lv2:minimum -6.0 ;
266 lv2:maximum 6.0 ;
267 ] , [
268 a lv2:InputPort ,
269 lv2:ControlPort ;
270 lv2:index 2 ;
271 lv2:symbol "Volume" ;
272 lv2:name "Volume";
273 lv2:default 5.0 ;
274 lv2:minimum 0.0 ;
275 lv2:maximum 10.0 ;
276 ] , [
277 a lv2:InputPort ,
278 lv2:ControlPort ;
279 lv2:index 3 ;
280 lv2:symbol "Feedback" ;
281 lv2:name "Feedback";
282 lv2:default 0 ;
283 lv2:minimum 0 ;
284 lv2:maximum 1.0 ;
285 ] , [
286 a lv2:InputPort ,
287 lv2:ControlPort ;
288 lv2:index 4 ;
289 lv2:symbol "Speed" ;
290 lv2:name "Speed";
291 lv2:default 5 ;
292 lv2:minimum 0.1 ;
293 lv2:maximum 10.0 ;
294 ] , [
295 a lv2:InputPort ,
296 lv2:ControlPort ;
297 lv2:index 5 ;
298 lv2:symbol "Intensity" ;
299 lv2:name "Intensity";
300 lv2:default 0 ;
301 lv2:minimum 0 ;
302 lv2:maximum 10.0 ;
303 ] , [
304 a lv2:InputPort ,
305 lv2:ControlPort ;
306 lv2:index 6 ;
307 lv2:symbol "Sinewave" ;
308 lv2:name "Sinewave";
309 lv2:default 0 ;
310 lv2:minimum 0 ;
311 lv2:maximum 1.0 ;
312 ] , [
313 a lv2:AudioPort ,
314 lv2:OutputPort ;
315 lv2:index 7 ;
316 lv2:symbol "out" ;
317 lv2:name "Out"
318 ] , [
319 a lv2:AudioPort ,
320 lv2:InputPort ;
321 lv2:index 8 ;
322 lv2:symbol "in" ;
323 lv2:name "in"
324 ] .
325
326 <http://guitarix.sourceforge.net/plugins/gx_redeye#gui>
327 a guiext:GtkUI;
328 guiext:binary <gx_redeye_gui.so>;
329 guiext:requiredFeature guiext:makeResident .
330
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <glibmm.h>
20 #include "gx_common.h"
21
22 /****************************************************************
23 ** "atomic" value access
24 */
25
26 inline void atomic_set(volatile int32_t* p, int32_t v)
27 {
28 g_atomic_int_set(p, v);
29 }
30
31 inline int32_t atomic_get(volatile int32_t& p)
32 {
33 return g_atomic_int_get(&p);
34 }
35
36 inline bool atomic_compare_and_exchange(volatile int32_t *p, int32_t oldv, int32_t newv)
37 {
38 return g_atomic_int_compare_and_exchange(p, oldv, newv);
39 }
40
41 template <class T>
42 inline void atomic_set(T **p, T *v)
43 {
44 g_atomic_pointer_set(p, v);
45 }
46
47 template <class T>
48 inline void atomic_set_0(T **p)
49 {
50 g_atomic_pointer_set(p, 0);
51 }
52
53 template <class T>
54 inline T *atomic_get(T*& p)
55 {
56 return static_cast<T*>(g_atomic_pointer_get(&p));
57 }
58
59 template <class T>
60 inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv)
61 {
62 return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), oldv, newv);
63 }
64
65 #include "gxredeye.h"
66 #include "gx_resampler.h"
67 #include "gx_convolver.h"
68 #include "gx_redeye.h"
69 #include "impulse_former.h"
70 #include "ampulse_former.h"
71 #ifndef __SSE__
72 #include "noiser.cc"
73 #endif
74 #include "cab_data_table.cc"
75
76 ////////////////////////////// MONO ////////////////////////////////////
77
78 class GxPluginMono
79 {
80 private:
81 // internal stuff
82 float* output;
83 float* input;
84 uint32_t s_rate;
85 int32_t prio;
86 PluginLV2* amplifier[AMP_COUNT];
87 #ifndef __SSE__
88 PluginLV2* wn;
89 #endif
90 uint32_t a_model_;
91 uint32_t c_model_;
92 gx_resample::BufferResampler resamp;
93 GxSimpleConvolver cabconv;
94 Impf impf;
95 gx_resample::BufferResampler resamp1;
96 uint32_t bufsize;
97 LV2_Atom_Sequence* c_notice;
98 LV2_Atom_Sequence* n_notice;
99 float cab;
100
101 bool doit;
102 volatile int32_t schedule_wait;
103
104 public:
105 // LV2 stuff
106 LV2_URID_Map* map;
107 LV2_Worker_Schedule* schedule;
108
109 void clean();
110 inline void run_dsp_mono(uint32_t n_samples);
111 void connect_mono(uint32_t port,void* data);
112 inline void init_dsp_mono(uint32_t rate, uint32_t bufsize_);
113 inline void do_work_mono();
114 void set_amp_mono(const LV2_Descriptor* descriptor);
115 inline void connect_all_mono_ports(uint32_t port, void* data);
116 // constructor
117 GxPluginMono() :
118 output(NULL),
119 input(NULL),
120 s_rate(0),
121 prio(0),
122 a_model_(0),
123 c_model_(0),
124 cabconv(GxSimpleConvolver(resamp)),
125 impf(Impf()),
126 bufsize(0),
127 cab(0)
128 {
129 atomic_set(&schedule_wait,0);
130 };
131 // destructor
132 ~GxPluginMono()
133 {
134 cabconv.stop_process();
135 cabconv.cleanup();
136 };
137 };
138
139 // plugin stuff
140
141 void GxPluginMono::do_work_mono()
142 {
143 atomic_set(&schedule_wait,0);
144 }
145
146 void GxPluginMono::set_amp_mono(const LV2_Descriptor* descriptor)
147 {
148
149 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_redeye#chump",descriptor->URI)== 0)
150 {
151 printf("chump\n");
152 a_model_ = 0 ;
153 c_model_ = 17.0 ; // 1x8
154 }
155 else if (strcmp("http://guitarix.sourceforge.net/plugins/gx_redeye#bigchump",descriptor->URI)== 0)
156 {
157 printf("bigchump\n");
158 a_model_ = 1 ;
159 c_model_ = 1.0 ; // 2x12
160 }
161 else if (strcmp("http://guitarix.sourceforge.net/plugins/gx_redeye#vibrochump",descriptor->URI)== 0)
162 {
163 printf("vibrochump\n");
164 a_model_ = 2 ;
165 c_model_ = 17.0 ; // 1x8
166 }
167 }
168
169 void GxPluginMono::init_dsp_mono(uint32_t rate, uint32_t bufsize_)
170 {
171 AVOIDDENORMALS();
172
173 bufsize = bufsize_;
174 s_rate = rate;
175 #ifndef __SSE__
176 wn = noiser::plugin();
177 wn->set_samplerate(rate, wn);
178 #endif
179 for(uint32_t i=0; i<AMP_COUNT; i++) {
180 amplifier[i] = amp_model[i]();
181 amplifier[i]->set_samplerate(static_cast<unsigned int>(rate), amplifier[i]);
182 }
183
184 if (bufsize )
185 {
186 #ifdef _POSIX_PRIORITY_SCHEDULING
187 int priomax = sched_get_priority_max(SCHED_FIFO);
188 if ((priomax/2) > 0) prio = priomax/2;
189 #endif
190
191 CabDesc& cab = *getCabEntry(static_cast<uint32_t>(c_model_)).data;
192
193 cabconv.cab_count = cab.ir_count;
194 cabconv.cab_sr = cab.ir_sr;
195 cabconv.cab_data = cab.ir_data;
196
197 cabconv.set_samplerate(rate);
198 cabconv.set_buffersize(bufsize);
199 cabconv.configure(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
200
201 float cab_irdata_c[cabconv.cab_count];
202
203 // Taken from Hermann's gx_amp code....
204 float adjust_1x8 = 1;
205 if ( c_model_ == 17.0) adjust_1x8 = 0.5;
206
207 // Here we arte at present hardwiring the cab volume so need to experiment
208 impf.compute(cabconv.cab_count, cabconv.cab_data, cab_irdata_c, 10.0*adjust_1x8);
209 cabconv.cab_data_new = cab_irdata_c;
210
211 while (!cabconv.checkstate());
212 if(!cabconv.start(prio, SCHED_FIFO))
213 printf("cabinet convolver disabled\n");
214
215 }
216 else
217 {
218 printf("convolver disabled\n");
219 }
220 }
221
222
223 void GxPluginMono::connect_mono(uint32_t port,void* data)
224 {
225 switch ((PortIndex)port)
226 {
227 case AMP_OUTPUT:
228 output = static_cast<float*>(data);
229 break;
230 case AMP_INPUT:
231 input = static_cast<float*>(data);
232 break;
233 default:
234 break;
235 }
236 }
237
238 void GxPluginMono::run_dsp_mono(uint32_t n_samples)
239 {
240 // run dsp
241 #ifndef __SSE__
242 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
243 #endif
244 // run selected tube model
245 amplifier[a_model_]->mono_audio(static_cast<int>(n_samples), input, output, amplifier[a_model_]);
246
247 // run selected cabinet convolver
248 cabconv.run_static(n_samples, &cabconv, output);
249
250 }
251
252 void GxPluginMono::connect_all_mono_ports(uint32_t port, void* data)
253 {
254 connect_mono(port,data);
255
256 for(uint32_t i=0; i<AMP_COUNT; i++) {
257 amplifier[i]->connect_ports(port, data, amplifier[i]);
258 }
259 }
260
261 void GxPluginMono::clean()
262 {
263 #ifndef __SSE__
264 wn->delete_instance(wn);;
265 #endif
266 for(uint32_t i=0; i<AMP_COUNT; i++) {
267 amplifier[i]->delete_instance(amplifier[i]);
268 }
269 }
270 ///////////////////////////// LV2 defines //////////////////////////////
271
272 static LV2_Worker_Status
273 work(LV2_Handle instance,
274 LV2_Worker_Respond_Function respond,
275 LV2_Worker_Respond_Handle handle,
276 uint32_t size,
277 const void* data)
278 {
279 GxPluginMono* self = (GxPluginMono*)instance;
280 self->do_work_mono();
281 return LV2_WORKER_SUCCESS;
282 }
283
284 static LV2_Worker_Status
285 work_response(LV2_Handle instance,
286 uint32_t size,
287 const void* data)
288 {
289 printf("worker respose.\n");
290 return LV2_WORKER_SUCCESS;
291 }
292
293
294 static LV2_Handle
295 instantiate(const LV2_Descriptor* descriptor,
296 double rate,
297 const char* bundle_path,
298 const LV2_Feature* const* features)
299 {
300
301 GxPluginMono *self = new GxPluginMono();
302 if (!self)
303 {
304 return NULL;
305 }
306
307 const LV2_Options_Option* options = NULL;
308 uint32_t bufsize = 0;
309 //printf(" %s\n",descriptor->URI);
310
311 for (int32_t i = 0; features[i]; ++i)
312 {
313 if (!strcmp(features[i]->URI, LV2_URID__map))
314 {
315 self->map = (LV2_URID_Map*)features[i]->data;
316 }
317 else if (!strcmp(features[i]->URI, LV2_WORKER__schedule))
318 {
319 self->schedule = (LV2_Worker_Schedule*)features[i]->data;
320 }
321 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
322 {
323 options = (const LV2_Options_Option*)features[i]->data;
324 }
325 }
326 if (!self->schedule)
327 {
328 fprintf(stderr, "Missing feature work:schedule.\n");
329 delete self;
330 return NULL;
331 }
332 if (!self->map)
333 {
334 fprintf(stderr, "Missing feature uri:map.\n");
335 }
336 else if (!options)
337 {
338 fprintf(stderr, "Missing feature options.\n");
339 }
340 else
341 {
342 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
343 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
344
345 for (const LV2_Options_Option* o = options; o->key; ++o)
346 {
347 if (o->context == LV2_OPTIONS_INSTANCE &&
348 o->key == bufsz_max &&
349 o->type == atom_Int)
350 {
351 bufsize = *(const int32_t*)o->value;
352 }
353 }
354
355 if (bufsize == 0)
356 {
357 fprintf(stderr, "No maximum buffer size given.\n");
358 }
359 printf("using block size: %d\n", bufsize);
360 }
361
362 self->set_amp_mono( descriptor);
363 self->init_dsp_mono((uint32_t)rate, bufsize);
364
365 return (LV2_Handle)self;
366 }
367
368 static void
369 connect_port(LV2_Handle instance,
370 uint32_t port,
371 void* data)
372 {
373 GxPluginMono* self = (GxPluginMono*)instance;
374 self->connect_all_mono_ports(port, data);
375 }
376
377 static void
378 activate(LV2_Handle instance)
379 {
380
381 }
382
383 static void
384 run(LV2_Handle instance, uint32_t n_samples)
385 {
386 GxPluginMono* self = (GxPluginMono*)instance;
387 self->run_dsp_mono(n_samples);
388 }
389
390 static void
391 deactivate(LV2_Handle instance)
392 {
393
394 }
395
396 static void
397 cleanup(LV2_Handle instance)
398 {
399 GxPluginMono* self = (GxPluginMono*)instance;
400 self->clean();
401 delete self;
402 }
403
404 //////////////////////////////////////////////////////////////////
405
406 const void*
407 extension_data(const char* uri)
408 {
409 static const LV2_Worker_Interface worker = { work, work_response, NULL };
410 if (!strcmp(uri, LV2_WORKER__interface))
411 {
412 return &worker;
413 }
414 return NULL;
415 }
416
417 static const LV2_Descriptor descriptor =
418 {
419 GXPLUGIN_URI "#chump",
420 instantiate,
421 connect_port,
422 activate,
423 run,
424 deactivate,
425 cleanup,
426 extension_data
427 };
428 static const LV2_Descriptor descriptor1 =
429 {
430 GXPLUGIN_URI "#bigchump",
431 instantiate,
432 connect_port,
433 activate,
434 run,
435 deactivate,
436 cleanup,
437 extension_data
438 };
439 static const LV2_Descriptor descriptor2 =
440 {
441 GXPLUGIN_URI "#vibrochump",
442 instantiate,
443 connect_port,
444 activate,
445 run,
446 deactivate,
447 cleanup,
448 extension_data
449 };
450
451 extern "C"
452 LV2_SYMBOL_EXPORT
453 const LV2_Descriptor*
454 lv2_descriptor(uint32_t index)
455 {
456 switch (index)
457 {
458 case 0:
459 return &descriptor;
460 case 1:
461 return &descriptor1;
462 case 2:
463 return &descriptor2;
464 default:
465 return NULL;
466 }
467 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXREDEYE_H_
22 #define SRC_HEADERS_GXREDEYE_H_
23
24 #include <lv2.h>
25 #include "lv2/lv2plug.in/ns/ext/state/state.h"
26 #include "lv2/lv2plug.in/ns/ext/presets/presets.h"
27 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
28 #include <lv2/lv2plug.in/ns/ext/options/options.h>
29 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
30 #include <lv2/lv2plug.in/ns/ext/log/log.h>
31 #include <lv2/lv2plug.in/ns/ext/worker/worker.h>
32 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
33
34 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_redeye"
35 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_redeye#gui"
36
37
38 typedef enum
39 {
40 GAIN = 0,
41 TONE,
42 VOLUME,
43 FEEDBACK,
44 SPEED,
45 INTENSITY,
46 SINEWAVE,
47 AMP_OUTPUT,
48 AMP_INPUT,
49 AMP_OUTPUT1,
50 AMP_INPUT1,
51 } PortIndex;
52
53 #endif //SRC_HEADERS_GXREDEYE_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxredeye.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GXPluginGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GXPluginGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(GXPluginGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GXPluginGUI () {};
56 ~GXPluginGUI () {};
57 } ;
58
59 void GXPluginGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " }\n"
75 "widget '*.";
76 addKnob += plug_name;
77 addKnob += "' style 'gx_";
78 addKnob += plug_name;
79 addKnob += "_dark_skin_icons' ";
80 }
81
82 void GXPluginGUI::set_skin()
83 {
84 Glib::ustring toparse = "pixmap_path ";
85 toparse += " '";
86 toparse += GX_LV2_STYLE_DIR;
87 toparse += "/'\n";
88 toparse += "style \"gx_";
89 toparse += plug_name;
90 toparse += "_dark-paintbox\"\n"
91 " { \n"
92 " GxPaintBox::icon-set =9\n"
93 " stock['amp_skin'] = {{'";
94 toparse += plugskin;
95 toparse += "'}}\n"
96 " }\n"
97 "\n"
98 "style 'gx_head_black_box' \n"
99 " { \n"
100 " fg[NORMAL] = '#afafaf' \n"
101 " bg[NORMAL] = '#000000' \n"
102 " }\n";
103 toparse += addKnob;
104
105 toparse += " widget '*.amplabel' style:highest 'gx_head_black_box'\n"
106 "widget '*.";
107 toparse += plug_name;
108 toparse += "' style 'gx_";
109 toparse += plug_name;
110 toparse += "_dark-paintbox' ";
111 toparse += "style 'gx_switch'\n"
112 "{\n"
113 "xthickness = 0\n"
114 "ythickness = 0\n"
115 "GtkButton::inner-border = {0, 0, 0, 0}\n"
116 "GtkButton::default-border = {0, 0, 0, 0}\n"
117 "GtkButton::focus-line-width = 0\n"
118 "GtkButton::focus-padding = 0\n"
119 "GtkButton::interior-focus = 0\n"
120 "GtkButton::child-displacement-x = 0\n"
121 "GtkButton::child-displacement-y = 0\n"
122 " }\n"
123 "widget '*.";
124 toparse += "chump";
125 toparse += "' style:highest 'gx_switch'";
126
127 gtk_rc_parse_string (toparse.c_str());
128 }
129
130 void GXPluginGUI::set_plug_name( const char * plugin_uri )
131 {
132
133 addKnob = "";
134
135 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_redeye#chump", plugin_uri) == 0)
136 {
137 plugskin = "chump.png";
138 plug_name = "chump";
139 }
140 else if (strcmp("http://guitarix.sourceforge.net/plugins/gx_redeye#bigchump", plugin_uri) == 0)
141 {
142 plugskin = "chump.png";
143 plug_name = "bigchump";
144 }
145 else if (strcmp("http://guitarix.sourceforge.net/plugins/gx_redeye#vibrochump", plugin_uri) == 0)
146 {
147 plugskin = "vibrochump.png";
148 plug_name = "vibrochump";
149 }
150 else
151 {
152 plugskin = "chump.png";
153 plug_name = "chump";
154 }
155
156 }
157
158 GtkWidget* GXPluginGUI::make_gui()
159 {
160 // init the gxwmm library
161 Gxw::init();
162 set_skin();
163 GtkWidget* container = gtk_vbox_new(FALSE, 2);
164 widget = new Widget(plug_name);
165
166 GtkWidget* cWidget = (GtkWidget*)widget->gobj();
167 gtk_container_add( (GtkContainer*)container, cWidget );
168
169 return container;
170 }
171
172
173 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
174 const char * plugin_uri,
175 const char * bundle_path,
176 LV2UI_Write_Function write_function,
177 LV2UI_Controller controller,
178 LV2UI_Widget * widget,
179 const LV2_Feature * const * features)
180 {
181 GXPluginGUI* self = new GXPluginGUI();
182 if (self == NULL) return NULL;
183 self->set_plug_name_static(self, plugin_uri);
184 *widget = (LV2UI_Widget)self->make_gui_static(self);
185 self->widget->controller = controller;
186 self->widget->write_function = write_function;
187 return (LV2UI_Handle)self;
188 }
189
190 static void cleanup(LV2UI_Handle ui)
191 {
192 GXPluginGUI *pluginGui = (GXPluginGUI *) ui;
193 delete pluginGui->widget;
194 delete pluginGui;
195 }
196
197 static void port_event(LV2UI_Handle ui,
198 uint32_t port_index,
199 uint32_t buffer_size,
200 uint32_t format,
201 const void * buffer)
202 {
203 GXPluginGUI *self = (GXPluginGUI *) ui;
204 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
205 return;
206 }
207
208 static LV2UI_Descriptor descriptors[] =
209 {
210 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
211 };
212
213 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
214 {
215 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
216 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
217 {
218 return NULL;
219 }
220 return descriptors + index;
221 }
222
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_redeye#chump>
23 a lv2:Plugin ;
24 lv2:binary <gx_redeye.so> ;
25 rdfs:seeAlso <gx_redeye.ttl> .
26
27 <http://guitarix.sourceforge.net/plugins/gx_redeye#bigchump>
28 a lv2:Plugin ;
29 lv2:binary <gx_redeye.so> ;
30 rdfs:seeAlso <gx_redeye.ttl> .
31
32 <http://guitarix.sourceforge.net/plugins/gx_redeye#vibrochump>
33 a lv2:Plugin ;
34 lv2:binary <gx_redeye.so> ;
35 rdfs:seeAlso <gx_redeye.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_redeye#chump>
23 a lv2:Plugin ;
24 lv2:binary <gx_redeye@LIB_EXT@> ;
25 rdfs:seeAlso <gx_redeye.ttl> .
26
27 <http://guitarix.sourceforge.net/plugins/gx_redeye#bigchump>
28 a lv2:Plugin ;
29 lv2:binary <gx_redeye@LIB_EXT@> ;
30 rdfs:seeAlso <gx_redeye.ttl> .
31
32 <http://guitarix.sourceforge.net/plugins/gx_redeye#vibrochump>
33 a lv2:Plugin ;
34 lv2:binary <gx_redeye@LIB_EXT@> ;
35 rdfs:seeAlso <gx_redeye.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24 Widget::Widget(Glib::ustring plug_name)
25 {
26 // init values set by host
27 /* amp definition based on plug_name
28 So at present only 2 plug names
29 chump gain/tone/volume/feedback
30 bigchump gain/tone/volume/feedback
31 vibrochump gain/tone/volume/feedback/speed/depth/sinewave
32 */
33
34 if( strcmp( "vibrochump", plug_name.c_str() ) == 0 ){
35 vibrochump = true ;
36 }else{
37 vibrochump = false ;
38 }
39 change_skin( plug_name ) ;
40
41 // set propertys for the main paintbox holding the skin
42 m_paintbox.set_border_width(0);
43 m_paintbox.set_spacing(0);
44 m_paintbox.set_homogeneous(false);
45 m_paintbox.set_name(plug_name);
46 m_paintbox.property_paint_func() = "amp_skin_expose";
47 add(m_paintbox);
48
49 // My layout
50 // Top Layout Spacer - request width/height 576,166 expand off
51 m_vbox2_.set_spacing(0);
52 m_vbox2_.set_border_width(0);
53 m_vbox2_.set_homogeneous(false);
54
55 if( vibrochump ){
56 m_vbox2_.set_size_request(750,174);
57
58 }else{
59 m_vbox2_.set_size_request(576,220);
60 }
61 // set a vertical box in the paintbox
62 m_paintbox.pack_start(m_vbox_);
63
64 m_vbox_.pack_start( m_vbox2_,false, true ) ;
65
66
67 if( !vibrochump ){
68 // Wrapper for Logo in centre
69 m_hbox1_.set_spacing(0);
70 m_hbox1_.set_border_width(0);
71 m_hbox1_.set_homogeneous(false);
72
73 // Left spacer - request width 146 expand off
74 m_vbox3_.set_spacing(0);
75 m_vbox3_.set_border_width(0);
76 m_vbox3_.set_homogeneous(false);
77 m_vbox3_.set_size_request(146);
78
79 // Logo in centre add images to this
80 m_hbox2_.set_spacing(0);
81 m_hbox2_.set_border_width(0);
82 m_hbox2_.set_size_request(312, 38);
83 m_hbox2_.set_homogeneous(false);
84
85 // Add each image request size and expand off
86
87 make_logo( &m_hbox2_,"redeye-logo-medium", true );
88
89 // Create vbox with Guitarix and Chump logo
90
91 make_logo( &m_vbox20_,"guitarix-logo-blue", true );
92
93 make_logo( &m_vbox20_,plug_name+"-logo", true );
94 m_hbox2_.pack_end( m_vbox20_, false, true ) ;
95
96
97
98 // Right spacer - request width 146 expand off
99 m_vbox4_.set_spacing(0);
100 m_vbox4_.set_border_width(0);
101 m_vbox4_.set_homogeneous(false);
102 m_vbox4_.set_size_request(166);
103
104 m_hbox1_.pack_end( m_vbox4_, false, true ) ;
105 m_hbox1_.pack_end( m_hbox2_, false, true ) ;
106 m_hbox1_.pack_end( m_vbox3_,false, true ) ;
107
108 m_vbox_.pack_start( m_hbox1_ ) ;
109 }
110 // Wrapper for lower layer with knobs in centre
111 m_hbox3_.set_spacing(20); // Calculate more accurately
112 m_hbox3_.set_border_width(0);
113 m_hbox3_.set_homogeneous(false);
114 m_hbox3_.set_size_request(678,72);
115
116 // Vbox 5 is spacer - request width 146 expand off
117 m_vbox5_.set_spacing(0);
118 m_vbox5_.set_border_width(0);
119 m_vbox5_.set_homogeneous(false);
120 if( vibrochump ){
121 m_vbox5_.set_size_request(36);
122 }else{
123 m_vbox5_.set_size_request(146);
124 }
125 m_hbox3_.pack_start( m_vbox5_, false, true ) ;
126
127 // Vbox 6 is container for knob widget and label
128 m_vbox6_.set_spacing(0);
129 m_vbox6_.set_border_width(0);
130 m_vbox6_.set_homogeneous(false);
131
132 make_controller_box(&m_vbox6_, &m_bigknob, "gain", -20, 20, 0.1,
133 gain,GAIN, plug_name);
134
135 m_hbox3_.pack_start( m_vbox6_ ) ;
136
137 // Vbox 7 is container for knob widget and label
138 m_vbox7_.set_spacing(0);
139 m_vbox7_.set_border_width(0);
140 m_vbox7_.set_homogeneous(false);
141
142
143
144 make_controller_box(&m_vbox7_, &m_bigknob1, "tone", 0, 1, 0.01,
145 tone,TONE, plug_name);
146
147 m_hbox3_.pack_start( m_vbox7_ ) ;
148
149
150 // Vbox 8 is container for knob widget and label
151 m_vbox8_.set_spacing(0);
152 m_vbox8_.set_border_width(0);
153 m_vbox8_.set_homogeneous(false);
154
155 make_controller_box(&m_vbox8_, &m_bigknob2, "volume", -20, 20, 0.1,
156 volume,VOLUME, plug_name);
157
158 m_hbox3_.pack_start( m_vbox8_ ) ;
159
160
161 // Vbox 9 is container for switch widget and label
162 // Make this a hbox and put 2 in, one for Chump Logo one for switch
163 m_vbox9_.set_spacing(0);
164 m_vbox9_.set_border_width(0);
165 m_vbox9_.set_homogeneous(false);
166
167 make_switch_box( &m_vbox9_, &m_switch, "feedback", 0.0, 1.0, 1.0, feedback, FEEDBACK, plug_name);
168
169 m_hbox3_.pack_start( m_vbox9_ ) ;
170
171 // This is for the Vibro amps
172
173 if( vibrochump ){
174 m_vbox10_.set_spacing(0);
175 m_vbox10_.set_border_width(0);
176 m_vbox10_.set_homogeneous(false);
177 make_controller_box(&m_vbox10_, &m_bigknob3, "speed", 2, 10, 0.1,
178 speed,SPEED, plug_name);
179 m_hbox3_.pack_start( m_vbox10_ ) ;
180 m_vbox11_.set_spacing(0);
181 m_vbox11_.set_border_width(0);
182 m_vbox11_.set_homogeneous(false);
183 make_controller_box(&m_vbox11_, &m_bigknob4, "intensity", 0.1, 10, 0.1,
184 intensity,INTENSITY, plug_name);
185 m_hbox3_.pack_start( m_vbox11_ ) ;
186
187 m_vbox12_.set_spacing(0);
188 m_vbox12_.set_border_width(0);
189 m_vbox12_.set_homogeneous(false);
190 make_switch_box( &m_vbox12_, &m_switch1, "sine", 0.0, 1.0, 1.0, sinewave, SINEWAVE, plug_name);
191 m_hbox3_.pack_start( m_vbox12_ ) ;
192
193 // And the logo
194 make_logo( &m_vbox13_,plug_name+"-logo", true );
195 // May move this to top of the amp
196 make_logo( &m_vbox13_,"redeye-logo", true );
197
198 m_hbox3_.pack_start( m_vbox13_ ) ;
199
200 }
201
202 // Vbox 14 is spacer - request width 146 expand off
203 m_vbox14_.set_spacing(0);
204 m_vbox14_.set_border_width(0);
205 m_vbox14_.set_homogeneous(false);
206 if( vibrochump ){
207 m_vbox14_.set_size_request(36);
208 }else{
209 m_vbox14_.set_size_request(146);
210 }
211 // Set expand to false.
212 m_hbox3_.pack_start( m_vbox14_, false, true ) ;
213 m_vbox_.pack_start( m_hbox3_ ) ;
214
215
216 if( vibrochump ){
217 // Bottom spacer box
218 m_hbox4_.set_spacing(0);
219 m_hbox4_.set_border_width(0);
220 m_hbox4_.set_homogeneous(false);
221 m_hbox4_.set_size_request(750, 24);
222 m_vbox_.pack_start( m_hbox4_ ) ;
223
224 }
225
226
227 // connect expose handler as resize handler
228 m_paintbox.signal_expose_event().connect(
229 sigc::mem_fun(this, &Widget::_expose_event), true);
230
231 set_app_paintable(true);
232 show_all();
233 }
234
235 Widget::~Widget()
236 {
237
238 }
239
240 // create stackboxes with controllers from gxw
241 void Widget::make_controller_box(Gtk::VBox *box,
242 Gxw::Regler *regler,
243 Glib::ustring label,
244 float min, float max,
245 float digits, float value,
246 PortIndex port_name,
247 Glib::ustring plug_name)
248 {
249 //Gtk::Label* pr = new Gtk::Label(label, 0);
250 //pr->set_name("amplabel");
251 Glib::ustring plugname = "";
252 if( strcmp( "bigchump", plug_name.c_str() ) == 0 ){
253 plugname = "chump";
254 } else {
255 plugname = plug_name;
256 }
257 Glib::ustring label_image = GX_LV2_STYLE_DIR;
258 label_image += "/"+plugname+"-";
259 label_image += label;
260 label_image += "-label.png";
261 Gtk::Image *pr = new Gtk::Image(label_image);
262
263 // std::cout << "label_image = " << label_image << std::endl;
264
265 /* Gtk::VBox* b1 = new Gtk::VBox();
266 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
267 */
268 regler->cp_configure("KNOB", label, min, max, digits);
269 regler->set_show_value(false);
270 regler->cp_set_value(value);
271 regler->set_name(plug_name);
272 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK);
273 box->pack_end(*regler,Gtk::PACK_SHRINK);
274 /* Gtk::VBox* b2 = new Gtk::VBox();
275 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
276 */
277 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(*this,
278 &Widget::on_value_changed), port_name));
279
280 }
281
282 void Widget::make_switch_box(Gtk::Box *box,
283 Gxw::Switch *toggle,
284 Glib::ustring label,
285 float min, float max,
286 float digits, float value,
287 PortIndex port_name,
288 Glib::ustring plug_name)
289
290 {
291 /* Gtk::Label* pr = new Gtk::Label(label, 0);
292 pr->set_name("amplabel");*/
293 Glib::ustring plugname = "";
294 if( strcmp( "bigchump", plug_name.c_str() ) == 0 ){
295 plugname = "chump";
296 } else {
297 plugname = plug_name;
298 }
299 Glib::ustring label_image = GX_LV2_STYLE_DIR;
300 label_image += "/"+plugname+"-";
301 label_image += label;
302 label_image += "-label.png";
303 Gtk::Image *pr = new Gtk::Image(label_image);
304
305 //Have to work out how the style is added to pick up correct images
306 toggle->cp_configure("KNOB", label, min, max, digits);
307 toggle->cp_set_value(value);
308 toggle->set_name("chump");
309 toggle->set_base_name( "switchit" ) ;
310 toggle->set_can_focus( false ) ;
311 // toggle->set_size_request( 60, 60 ) ;
312 box->pack_end( *Gtk::manage(pr),false,true);
313 box->pack_end(*toggle,false, true);
314
315 toggle->signal_toggled().connect(sigc::bind(sigc::mem_fun(*this,
316 &Widget::on_value_changed), port_name));
317
318 }
319
320 // Create the Text Labels For Amp
321 void Widget::make_logo(Gtk::Box *box,Glib::ustring label, bool start )
322 {
323 Glib::ustring label_image = GX_LV2_STYLE_DIR;
324 label_image += "/";
325 label_image += label;
326 label_image += ".png";
327 Gtk::Image *pr = new Gtk::Image(label_image);
328
329 // Glib::RefPtr<Gdk::Pixbuf> pb = pr->get_pixbuf() ;
330 // int width = pb->get_width() ;
331 // int height = pb->get_height() ;
332 // pr->set_size_request( width, height ) ;
333
334 if( start ){
335 // std::cout << "Pack Start "<<label<<std::endl;
336 //box->pack_start( *Gtk::manage(pr),false, true);
337 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
338 }else{
339 // std::cout << "Pack End " << label << std::endl;
340 // box->pack_end( *Gtk::manage(pr),false, true);
341 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK);
342 }
343 }
344
345
346 // set borderwith for paintbox when widget resize
347 // to hold controllers in place
348 bool Widget::_expose_event(GdkEventExpose *event)
349 {
350 int x, y, width, height, depth;
351 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
352 //double_t height = m_paintbox.get_window()->get_height();
353 m_paintbox.set_border_width(height/12);//SHP Needs a tweak
354 return false;
355 }
356 // receive controller value changes from host
357 void Widget::set_value(uint32_t port_index,
358 uint32_t format,
359 const void * buffer)
360 {
361 if ( format == 0 )
362 {
363 float value = *(float *)buffer;
364 switch ((PortIndex)port_index )
365 {
366 case GAIN:
367 gain = value;
368 m_bigknob.cp_set_value(gain);
369 break;
370 case TONE:
371 tone = value;
372 m_bigknob1.cp_set_value(tone);
373 break;
374 case VOLUME:
375 volume = value;
376 m_bigknob2.cp_set_value(volume);
377 break;
378 case SPEED:
379 speed = value;
380 m_bigknob3.cp_set_value(speed);
381 break;
382 case INTENSITY:
383 intensity = value;
384 m_bigknob4.cp_set_value(intensity);
385 break;
386 case FEEDBACK:
387 feedback = value;
388 m_switch.cp_set_value(feedback);
389 break;
390 case SINEWAVE:
391 sinewave = value;
392 m_switch1.cp_set_value(sinewave);
393 break;
394 default:
395 break;
396 }
397 }
398 }
399 // write value changes to the host->engine
400 void Widget::on_value_changed(uint32_t port_index)
401 {
402 switch ((PortIndex)port_index )
403 {
404 case GAIN:
405 gain = m_bigknob.get_value();
406 // std::cout << "gain = " << gain << std::endl;
407 write_function(controller, (PortIndex)GAIN,
408 sizeof(float), 0, (const void*)&gain);
409 break;
410 case TONE:
411 tone = m_bigknob1.get_value();
412 // std::cout << "tone = " << tone << std::endl;
413 write_function(controller, (PortIndex)TONE,
414 sizeof(float), 0, (const void*)&tone);
415 break;
416
417 case VOLUME:
418 volume = m_bigknob2.get_value();
419 // std::cout << "volume = " << volume << std::endl;
420 write_function(controller, (PortIndex)VOLUME,
421 sizeof(float), 0, (const void*)&volume);
422 break;
423
424 case SPEED:
425 speed = m_bigknob3.get_value();
426 // std::cout << "speed = " << speed << std::endl;
427 write_function(controller, (PortIndex)SPEED,
428 sizeof(float), 0, (const void*)&speed);
429 break;
430 case INTENSITY:
431 intensity = m_bigknob4.get_value();
432 // std::cout << "intensity = " << intensity << std::endl;
433 write_function(controller, (PortIndex)INTENSITY,
434 sizeof(float), 0, (const void*)&intensity);
435 break;
436
437 case SINEWAVE:
438 sinewave = m_switch1.cp_get_value();
439 //std::cout << "sinewave = " << sinewave << std::endl;
440 write_function(controller, (PortIndex)SINEWAVE,
441 sizeof(float), 0, (const void*)&sinewave);
442 break;
443
444 case FEEDBACK:
445 feedback = m_switch.cp_get_value();
446 //std::cout << "feedback = " << feedback << std::endl;
447 write_function(controller, (PortIndex)FEEDBACK,
448 sizeof(float), 0, (const void*)&feedback);
449 break;
450 default:
451 break;
452 }
453 }
454
455 inline std::string to_string(int _Val)
456 { // convert int to string
457 char _Buf[4];
458 sprintf(_Buf, "%d", _Val);
459 return (std::string(_Buf));
460 }
461 // This is called at startup depending on the amp model so need to look at how to do this
462 void Widget::change_skin(Glib::ustring plug_name)
463 {
464 std::string rcfile =GX_LV2_STYLE_DIR;
465 rcfile +="/gx_redeye-";
466 rcfile += plug_name;
467 rcfile += ".rc";
468 //std::cout << "rcfile = " << rcfile << std::endl;
469
470 gtk_rc_parse(rcfile.c_str());
471 gtk_rc_reset_styles(gtk_settings_get_default());
472 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxredeye.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 void on_value_changed(uint32_t port_index);
35 void change_skin(Glib::ustring plug_name);
36 void make_controller_box(Gtk::VBox *box,
37 Gxw::Regler *regler,
38 Glib::ustring label,
39 float min, float max,
40 float digits, float value,
41 PortIndex port_name,
42 Glib::ustring plug_name);
43
44 void make_switch_box(Gtk::Box *box,
45 Gxw::Switch *toggle,
46 Glib::ustring label,
47 float min, float max,
48 float digits, float value,
49 PortIndex port_name,
50 Glib::ustring plug_name);
51
52 void make_logo(Gtk::Box *box,Glib::ustring label, bool start ) ;
53
54 bool _expose_event(GdkEventExpose *event);
55 void set_value(uint32_t port_index,
56 uint32_t format,
57 const void * buffer);
58 public:
59
60 // public Lv2 communication stuff
61 LV2UI_Controller controller;
62 LV2UI_Write_Function write_function;
63 static void set_value_static(uint32_t port_index,
64 uint32_t buffer_size,
65 uint32_t format,
66 const void * buffer, Widget *self)
67 {
68 self->set_value(port_index,format,buffer);
69 }
70
71 Widget(Glib::ustring plug_name);
72 ~Widget();
73
74 protected:
75 Gtk::VBox m_vbox_;
76 Gtk::VBox m_vbox1_;
77 Gtk::VBox m_vbox2_;
78 Gtk::VBox m_vbox3_;
79 Gtk::VBox m_vbox4_;
80 Gtk::VBox m_vbox5_;
81 Gtk::VBox m_vbox6_;
82 Gtk::VBox m_vbox7_;
83 Gtk::VBox m_vbox8_;
84 Gtk::VBox m_vbox9_;
85 Gtk::VBox m_vbox10_;
86 Gtk::VBox m_vbox11_;
87 Gtk::VBox m_vbox12_;
88 Gtk::VBox m_vbox13_;
89 Gtk::VBox m_vbox14_;
90
91
92 Gtk::VBox m_vbox15_;
93 Gtk::VBox m_vbox16_;
94 Gtk::VBox m_vbox17_;
95 Gtk::VBox m_vbox18_;
96 Gtk::VBox m_vbox19_;
97 Gtk::VBox m_vbox20_;
98
99 Gtk::HBox m_hbox_;
100 Gtk::HBox m_hbox1_;
101 Gtk::HBox m_hbox2_;
102 Gtk::HBox m_hbox3_;
103 Gtk::HBox m_hbox4_;
104 Gtk::HBox m_hbox5_;
105
106 Gtk::VBox m_vbox;
107 Gtk::VBox m_vbox1;
108 Gtk::VBox m_vbox2;
109 Gtk::VBox m_vbox3;
110 Gtk::VBox m_vbox4;
111 Gtk::VBox m_vbox5;
112
113 Gxw::PaintBox m_paintbox;
114 Gtk::HBox m_hbox;
115 Gxw::BigKnob m_bigknob;
116 Gxw::BigKnob m_bigknob1;
117 Gxw::BigKnob m_bigknob2;
118 Gxw::BigKnob m_bigknob3;
119 Gxw::BigKnob m_bigknob4;
120
121 Gxw::Switch m_switch;
122 Gxw::Switch m_switch1;
123
124 // stores port values we're currently at.
125 float gain;
126 float tone;
127 float volume;
128 float feedback;
129 float speed;
130 float intensity;
131 float sinewave ;
132 bool vibrochump ;
133 };
134
135 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_redeye.lv2'
10
11 src = ['gxredeye.cpp',
12 '../DSP/gx_resampler.cc',
13 '../DSP/gx_convolver.cc'
14 ]
15 incl = ['../faust','./', '../DSP']
16 lib = []
17 if sys.platform.startswith("linux"):
18 lib.append('dl')
19 uselib = ['LV2CORE','GLIBMM']
20 if bld.env['ZITA_CONVOLVER']:
21 uselib.append('ZITA_CONVOLVER')
22 else:
23 src.append('../../zita-convolver/zita-convolver.cc')
24 incl.append('../../zita-convolver');
25 uselib.append('FFTW3')
26 if bld.env['ZITA_RESAMPLER']:
27 uselib.append('ZITA_RESAMPLER')
28 else:
29 src.append('../../zita-resampler-1.1.0/resampler.cc')
30 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
31 incl.append('../../zita-resampler-1.1.0')
32 cxxflag =[]
33 if not bld.env['OPT'] and bld.env['SSE2']:
34 cxxflag = [ "-msse2", "-mfpmath=sse"]
35 lv2_plugin = bld(
36 features='cxx cshlib ',
37 includes = incl,
38 lib = lib,
39 uselib = uselib,
40 obj_ext = '_11.o',
41 cxxflags = cxxflag,
42 defines = ["LV2_SO"],
43 target = 'gx_redeye',
44 source = src,
45 install_path = '${LV2DIR}/%s' % bundle,
46 chmod = 0o755,
47 )
48 lv2_plugin.env['shlib_PATTERN'] = '%s.so'
49
50 uselib_local1 = []
51 libpath1 = []
52 lib1 = []
53 incl = ['../../../libgxwmm','../../../libgxw']
54 if sys.platform.startswith("linux"):
55 lib1.append('dl')
56 if bld.env["GX_LIB_SHARED"]:
57 lib1 += ['gxwmm','gxw']
58 libpath1 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
59 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
60 else:
61 uselib_local1 += ['gxwmm','gxw']
62
63 lv2_plugin_gui = bld(
64 features='cxx cshlib ',
65 includes = incl,
66 lib = lib1,
67 uselib = 'LV2CORE GTKMM',
68 libpath = libpath1,
69 uselib_local = uselib_local1,
70 linkflags = '-Wl,-z,nodelete',
71 defines = ["LV2_GUI"],
72 target = 'gx_redeye_gui',
73 source = 'widget.cpp gxredeye_gui.cpp',
74 install_path = '${LV2DIR}/%s' % bundle,
75 chmod = 0o755,
76 )
77 lv2_plugin_gui.env['shlib_PATTERN'] = '%s.so'
78
79
80 install_path = '${LV2DIR}/%s' % bundle,
81 bld.install_files('${LV2DIR}/gx_redeye.lv2', 'manifest.ttl')
82 bld.install_files('${LV2DIR}/gx_redeye.lv2', 'gx_redeye.ttl')
83
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_reverb.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "stereoverb.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_reverb_stereo
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 float* output1;
36 float* input1;
37 // pointer to dsp class
38 PluginLV2* reverb_st;
39 // private functions
40 inline void run_dsp_stereo(uint32_t n_samples);
41 inline void connect_stereo(uint32_t port,void* data);
42 inline void init_dsp_stereo(uint32_t rate);
43 inline void connect_all_stereo_ports(uint32_t port, void* data);
44 inline void activate_f();
45 inline void clean_up();
46 inline void deactivate_f();
47
48 public:
49 // LV2 Descriptor
50 static const LV2_Descriptor descriptor;
51 // static wrapper to private functions
52 static void deactivate(LV2_Handle instance);
53 static void cleanup(LV2_Handle instance);
54 static void run(LV2_Handle instance, uint32_t n_samples);
55 static void activate(LV2_Handle instance);
56 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
57 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
58 double rate, const char* bundle_path,
59 const LV2_Feature* const* features);
60 Gx_reverb_stereo();
61 ~Gx_reverb_stereo();
62 };
63
64 // constructor
65 Gx_reverb_stereo::Gx_reverb_stereo() :
66 output(NULL),
67 input(NULL),
68 output1(NULL),
69 input1(NULL),
70 reverb_st(stereoverb::plugin()) {};
71
72 // destructor
73 Gx_reverb_stereo::~Gx_reverb_stereo()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (reverb_st->activate_plugin !=0)
78 reverb_st->activate_plugin(false, reverb_st);
79 // delete DSP class
80 reverb_st->delete_instance(reverb_st);
81 };
82
83 ///////////////////////// PRIVATE CLASS FUNCTIONS /////////////////////
84
85 void Gx_reverb_stereo::init_dsp_stereo(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 reverb_st->set_samplerate(rate, reverb_st); // init the DSP class
89 }
90
91 // connect the Ports used by the plug-in class
92 void Gx_reverb_stereo::connect_stereo(uint32_t port,void* data)
93 {
94 switch ((PortIndex)port)
95 {
96 case EFFECTS_OUTPUT:
97 output = static_cast<float*>(data);
98 break;
99 case EFFECTS_OUTPUT1:
100 output1 = static_cast<float*>(data);
101 break;
102 case EFFECTS_INPUT:
103 input = static_cast<float*>(data);
104 break;
105 case EFFECTS_INPUT1:
106 input1 = static_cast<float*>(data);
107 break;
108 default:
109 break;
110 }
111 }
112
113 void Gx_reverb_stereo::activate_f()
114 {
115 // allocate the internal DSP mem
116 if (reverb_st->activate_plugin !=0)
117 reverb_st->activate_plugin(true, reverb_st);
118 }
119
120 void Gx_reverb_stereo::clean_up()
121 {
122 // delete the internal DSP mem
123 if (reverb_st->activate_plugin !=0)
124 reverb_st->activate_plugin(false, reverb_st);
125 }
126
127 void Gx_reverb_stereo::deactivate_f()
128 {
129 // delete the internal DSP mem
130 if (reverb_st->activate_plugin !=0)
131 reverb_st->activate_plugin(false, reverb_st);
132 }
133
134 void Gx_reverb_stereo::run_dsp_stereo(uint32_t n_samples)
135 {
136 reverb_st->stereo_audio(static_cast<int>(n_samples), input, input1,
137 output, output1, reverb_st);
138 }
139
140 void Gx_reverb_stereo::connect_all_stereo_ports(uint32_t port, void* data)
141 {
142 // connect the Ports used by the plug-in class
143 connect_stereo(port,data);
144 // connect the Ports used by the DSP class
145 reverb_st->connect_ports(port, data, reverb_st);
146 }
147
148 ////////////////////// STATIC CLASS FUNCTIONS ////////////////////////
149
150 LV2_Handle
151 Gx_reverb_stereo::instantiate(const LV2_Descriptor* descriptor,
152 double rate, const char* bundle_path,
153 const LV2_Feature* const* features)
154 {
155 // init the plug-in class
156 Gx_reverb_stereo *self = new Gx_reverb_stereo();
157 if (!self)
158 {
159 return NULL;
160 }
161
162 self->init_dsp_stereo((uint32_t)rate);
163
164 return (LV2_Handle)self;
165 }
166
167 void Gx_reverb_stereo::connect_port(LV2_Handle instance,
168 uint32_t port, void* data)
169 {
170 // connect all ports
171 static_cast<Gx_reverb_stereo*>(instance)->connect_all_stereo_ports(port, data);
172 }
173
174 void Gx_reverb_stereo::activate(LV2_Handle instance)
175 {
176 // allocate needed mem
177 static_cast<Gx_reverb_stereo*>(instance)->activate_f();
178 }
179
180 void Gx_reverb_stereo::run(LV2_Handle instance, uint32_t n_samples)
181 {
182 // run dsp
183 static_cast<Gx_reverb_stereo*>(instance)->run_dsp_stereo(n_samples);
184 }
185
186 void Gx_reverb_stereo::deactivate(LV2_Handle instance)
187 {
188 // free allocated mem
189 static_cast<Gx_reverb_stereo*>(instance)->deactivate_f();
190 }
191
192 void Gx_reverb_stereo::cleanup(LV2_Handle instance)
193 {
194 // well, clean up after us
195 Gx_reverb_stereo* self = static_cast<Gx_reverb_stereo*>(instance);
196 self->clean_up();
197 delete self;
198 }
199
200 const LV2_Descriptor Gx_reverb_stereo::descriptor =
201 {
202 GXPLUGIN_URI "#_reverb_stereo",
203 Gx_reverb_stereo::instantiate,
204 Gx_reverb_stereo::connect_port,
205 Gx_reverb_stereo::activate,
206 Gx_reverb_stereo::run,
207 Gx_reverb_stereo::deactivate,
208 Gx_reverb_stereo::cleanup,
209 NULL
210 };
211
212 ////////////////////////// LV2 SYMBOL EXPORT ///////////////////////////
213
214 extern "C"
215 LV2_SYMBOL_EXPORT
216 const LV2_Descriptor*
217 lv2_descriptor(uint32_t index)
218 {
219 switch (index)
220 {
221 case 0:
222 return &Gx_reverb_stereo::descriptor;
223 default:
224 return NULL;
225 }
226 }
227
228 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_reverb_stereo"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_reverb_stereo#gui"
28
29 typedef enum
30 {
31 WET_DRY,
32 LFOFREQ,
33 ROOMSIZE,
34 DAMP,
35 INVERT,
36 EFFECTS_OUTPUT,
37 EFFECTS_OUTPUT1,
38 EFFECTS_INPUT,
39 EFFECTS_INPUT1,
40 } PortIndex;
41
42 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_reverb_stereo>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_reverb_stereo" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_reverb_stereo#_reverb_stereo>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxReverb-Stereo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_reverb_stereo> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_reverb_stereo#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "dry_wet" ;
54 lv2:name "Dry/Wet";
55 lv2:default 50.0 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 100.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "lfo" ;
63 lv2:name "LFO";
64 lv2:default 0.2 ;
65 lv2:minimum 0.2 ;
66 lv2:maximum 5.0 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "roomsize" ;
72 lv2:name "Roomsize";
73 lv2:default 0.5 ;
74 lv2:minimum 0.0 ;
75 lv2:maximum 1.0 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "damp" ;
81 lv2:name "Damp";
82 lv2:default 0.2 ;
83 lv2:minimum 0.0 ;
84 lv2:maximum 1.0 ;
85 ] ,[
86 a lv2:InputPort ,
87 lv2:ControlPort ;
88 lv2:index 4 ;
89 lv2:symbol "mode" ;
90 lv2:name "Mode";
91 lv2:portProperty lv2:integer;
92 lv2:portProperty lv2:enumeration ;
93 lv2:default 0 ;
94 lv2:minimum 0 ;
95 lv2:maximum 1 ;
96 lv2:scalePoint [rdfs:label "linear"; rdf:value 0];
97 lv2:scalePoint [rdfs:label "pingpong"; rdf:value 1];
98 ] , [
99 a lv2:AudioPort ,
100 lv2:OutputPort ;
101 lv2:index 5 ;
102 lv2:symbol "out" ;
103 lv2:name "Out"
104 ] , [
105 a lv2:AudioPort ,
106 lv2:OutputPort ;
107 lv2:index 6 ;
108 lv2:symbol "out1" ;
109 lv2:name "Out1"
110 ] , [
111 a lv2:AudioPort ,
112 lv2:InputPort ;
113 lv2:index 7 ;
114 lv2:symbol "in" ;
115 lv2:name "In" ;
116 ], [
117 a lv2:AudioPort ,
118 lv2:InputPort ;
119 lv2:index 8 ;
120 lv2:symbol "in1" ;
121 lv2:name "In1" ;
122 ].
123
124 <http://guitarix.sourceforge.net/plugins/gx_reverb_stereo#gui>
125 a guiext:GtkUI;
126 guiext:binary <gx_reverb_gui.so>;
127 guiext:requiredFeature guiext:makeResident .
128
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_reverb.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_reverb_stereoGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_reverb_stereoGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_reverb_stereoGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_reverb_stereoGUI () {};
56 ~Gx_reverb_stereoGUI () {};
57 } ;
58
59 void Gx_reverb_stereoGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_reverb_stereoGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_tremolo_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_tremolo_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_reverb_stereoGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_reverb_stereo#_reverb_stereo", plugin_uri) == 0)
161 {
162 plug_name = "_reverb_stereo";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_reverb_stereo";
168 }
169 }
170
171 GtkWidget* Gx_reverb_stereoGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_reverb_stereoGUI* self = new Gx_reverb_stereoGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_reverb_stereoGUI *pluginGui = static_cast<Gx_reverb_stereoGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_reverb_stereoGUI *self = static_cast<Gx_reverb_stereoGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_reverb_stereo#_reverb_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_reverb.so> ;
25 rdfs:seeAlso <gx_reverb.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_reverb_stereo#_reverb_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_reverb@LIB_EXT@> ;
25 rdfs:seeAlso <gx_reverb.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case WET_DRY:
38 return &m_bigknob;
39 case LFOFREQ:
40 return &m_smallknob3;
41 case INVERT:
42 return &m_selector;
43 case ROOMSIZE:
44 return &m_smallknob4;
45 case DAMP:
46 return &m_smallknob5;
47 default:
48 return NULL;
49 }
50 }
51
52 Widget::Widget(Glib::ustring plugname):
53 plug_name(plugname)
54 {
55 // create controllers for port name
56 Glib::ustring modes[] = {"linear","ping pong"};
57 static const size_t _size = sizeof(modes) / sizeof(modes[0]);
58 make_selector("Reverb Mode", modes, _size, 0, 1.0, INVERT);
59 make_controller_box(&m_vbox2, "dry/wet", 0, 100, 1, WET_DRY);
60 make_controller_box(&m_vbox4, "LFO", 0.2, 5, 0.01, LFOFREQ);
61 m_vbox4.pack_start(m_selector, Gtk::PACK_SHRINK);
62 make_controller_box(&m_vbox5, "Roomsize", 0, 1, 0.025, ROOMSIZE);
63 make_controller_box(&m_vbox6, "Damp", 0, 1, 0.025, DAMP);
64
65 // set propertys for the main paintbox holding the skin
66 m_paintbox.set_border_width(10);
67 m_paintbox.set_spacing(6);
68 m_paintbox.set_homogeneous(false);
69 m_paintbox.set_name(plug_name);
70 m_paintbox.property_paint_func() = "gxhead_expose";
71 add(m_paintbox);
72 // box for the controllers
73 m_hbox_.set_spacing(14);
74 m_hbox_.set_border_width(24);
75 m_hbox_.set_homogeneous(false);
76 // set a vertical box in the paintbox
77 m_vbox.set_border_width(14);
78 m_vbox1.set_border_width(14);
79 m_paintbox.pack_start(m_vbox_);
80 // and controller box on top
81 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
82 // put boxed controllers into controller box
83 m_hbox_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
84 m_hbox_.pack_start(m_vbox5);
85 m_hbox_.pack_start(m_vbox6);
86 m_hbox_.pack_start(m_vbox4);
87 m_hbox_.pack_start(m_vbox2);
88 m_hbox_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
89
90 // connect expose handler as resize handler
91 m_paintbox.signal_expose_event().connect(
92 sigc::mem_fun(this, &Widget::_expose_event), true);
93
94 set_app_paintable(true);
95 show_all();
96 }
97
98 Widget::~Widget()
99 {
100
101 }
102
103 // set borderwith for paintbox when widget resize
104 // to hold controllers in place
105 bool Widget::_expose_event(GdkEventExpose *event)
106 {
107 int x, y, width, height, depth;
108 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
109 //double_t height = m_paintbox.get_window()->get_height();
110 m_paintbox.set_border_width(height/10);
111 return false;
112 }
113
114 // create selectors from gxwmm
115 void Widget::make_selector(Glib::ustring labela,
116 Glib::ustring tables[],
117 size_t _size,
118 float min, float digits,
119 PortIndex port_name)
120 {
121 Gxw::Selector *regler = static_cast<Gxw::Selector*>
122 (get_controller_by_port(port_name));
123 if (regler)
124 {
125 float max = static_cast<float>(_size+1);
126
127 Gtk::TreeModelColumn<Glib::ustring> label;
128 Gtk::TreeModelColumnRecord rec;
129 rec.add(label);
130 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
131
132 for (uint32_t i = 0 ; i< _size; ++i) {
133 ls->append()->set_value(0, tables[i]);
134 }
135 regler->set_model(ls);
136 regler->set_has_tooltip();
137 regler->set_tooltip_text(labela);
138 regler->cp_configure("SELECTOR", labela, min, max, digits);
139 regler->set_show_value(false);
140 regler->set_name(plug_name);
141 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
142 *this, &Widget::on_value_changed), port_name));
143 }
144 }
145
146 // create stackboxes with controllers for port name
147 void Widget::make_controller_box(Gtk::Box *box,
148 Glib::ustring label,
149 float min, float max,
150 float digits,
151 PortIndex port_name)
152 {
153 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
154 get_controller_by_port(port_name));
155 if (regler)
156 {
157 Gtk::Label* pr = new Gtk::Label(label, 0);
158 pr->set_name("amplabel");
159 // use label images instead simple string labes
160 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
161 label_image += "/";
162 label_image += label;
163 label_image += "-label.png";
164 Gtk::Image *pr = new Gtk::Image(label_image);*/
165
166 Gtk::VBox* b1 = new Gtk::VBox();
167 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
168 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
169 regler->cp_configure("KNOB", label, min, max, digits);
170 regler->set_show_value(false);
171 regler->set_name(plug_name);
172 box->pack_start(*regler,Gtk::PACK_SHRINK);
173 Gtk::VBox* b2 = new Gtk::VBox();
174 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
175 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
176 *this, &Widget::on_value_changed), port_name));
177 }
178 }
179
180 // create stackboxes with switch controller for port name
181 void Widget::make_switch_box(Gtk::Box *box,
182 Glib::ustring label,
183 PortIndex port_name)
184 {
185 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
186 get_controller_by_port(port_name));
187 if (regler)
188 {
189 Gtk::Label* pr = new Gtk::Label(label, 0);
190 pr->set_name("amplabel");
191 // use label images instead simple string labes
192 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
193 label_image += "/"+plug_name+"-";
194 label_image += label;
195 label_image += "-label.png";
196 Gtk::Image *pr = new Gtk::Image(label_image);*/
197
198 regler->cp_configure("switch", label, 0, 1, 1);
199 regler->set_name(plug_name);
200 regler->set_base_name( "button" );
201 Gtk::VBox* b1 = new Gtk::VBox();
202 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
203 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
204 box->pack_start(*regler,Gtk::PACK_SHRINK);
205 Gtk::VBox* b2 = new Gtk::VBox();
206 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
207 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
208 *this, &Widget::on_value_changed), port_name));
209 }
210 }
211
212 // receive controller value changes from host and set them to controller
213 void Widget::set_value(uint32_t port_index,
214 uint32_t format,
215 const void * buffer)
216 {
217 if ( format == 0 )
218 {
219 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
220 get_controller_by_port(port_index));
221 if (regler)
222 {
223 float value = *static_cast<const float*>(buffer);
224 regler->cp_set_value(value);
225 }
226 }
227 }
228
229 // write (UI) controller value changes to the host->engine
230 void Widget::on_value_changed(uint32_t port_index)
231 {
232 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
233 get_controller_by_port(port_index));
234 if (regler)
235 {
236 float value = regler->cp_get_value();
237 write_function(controller, port_index, sizeof(float), 0,
238 static_cast<const void*>(&value));
239 }
240 }
241
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_reverb.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox4;
82 Gtk::VBox m_vbox5;
83 Gtk::VBox m_vbox6;
84 Gtk::VBox m_vbox7;
85 Gtk::HBox m_hbox_;
86
87 Gxw::PaintBox m_paintbox;
88 Gxw::BigKnob m_bigknob;
89 Gxw::SmallKnobR m_smallknob3;
90 Gxw::BigKnob m_smallknob4;
91 Gxw::BigKnob m_smallknob5;
92 Gxw::Selector m_selector;
93 };
94
95 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_reverb.lv2'
10
11 src = ['gx_reverb.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_15.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_reverb',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_reverb_gui',
59 source = 'widget.cpp gx_reverb_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_reverb.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_reverb.lv2', 'gx_reverb.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_studiopre.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gx_studiopre.cc" // dsp class generated by faust -> dsp2cc
26 #ifndef __SSE__
27 #include "noiser.cc"
28 #endif
29
30 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
31
32 class Gx_studiopre
33 {
34 private:
35 // internal stuff
36 float* output;
37 float* input;
38 PluginLV2* studiopre_mono;
39 #ifndef __SSE__
40 PluginLV2* wn;
41 #endif
42
43 inline void run_dsp_mono(uint32_t n_samples);
44 inline void connect_mono(uint32_t port,void* data);
45 inline void init_dsp_mono(uint32_t rate);
46 inline void connect_all_mono_ports(uint32_t port, void* data);
47 inline void activate_f();
48 inline void deactivate_f();
49 inline void clean_up();
50 public:
51 // LV2 Descriptor
52 static const LV2_Descriptor descriptor;
53 // static wrapper to private functions
54 static void deactivate(LV2_Handle instance);
55 static void cleanup(LV2_Handle instance);
56 static void run(LV2_Handle instance, uint32_t n_samples);
57 static void activate(LV2_Handle instance);
58 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
59 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
60 double rate, const char* bundle_path,
61 const LV2_Feature* const* features);
62 Gx_studiopre();
63 ~Gx_studiopre();
64 };
65
66 // constructor
67 Gx_studiopre::Gx_studiopre() :
68 output(NULL),
69 input(NULL),
70 studiopre_mono(gx_studiopre::plugin()) {};
71
72 // destructor
73 Gx_studiopre::~Gx_studiopre()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (studiopre_mono->activate_plugin !=0)
78 studiopre_mono->activate_plugin(false, studiopre_mono);
79 // delete DSP class
80 studiopre_mono->delete_instance(studiopre_mono);
81 };
82
83 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
84
85 void Gx_studiopre::init_dsp_mono(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 #ifndef __SSE__
89 wn = noiser::plugin();
90 wn->set_samplerate(rate, wn);
91 #endif
92 studiopre_mono->set_samplerate(rate, studiopre_mono); // init the DSP class
93 }
94
95 // connect the Ports used by the plug-in class
96 void Gx_studiopre::connect_mono(uint32_t port,void* data)
97 {
98 switch ((PortIndex)port)
99 {
100 case EFFECTS_OUTPUT:
101 output = static_cast<float*>(data);
102 break;
103 case EFFECTS_INPUT:
104 input = static_cast<float*>(data);
105 break;
106 default:
107 break;
108 }
109 }
110
111 void Gx_studiopre::activate_f()
112 {
113 // allocate the internal DSP mem
114 if (studiopre_mono->activate_plugin !=0)
115 studiopre_mono->activate_plugin(true, studiopre_mono);
116 }
117
118 void Gx_studiopre::clean_up()
119 {
120 #ifndef __SSE__
121 wn->delete_instance(wn);;
122 #endif
123 // delete the internal DSP mem
124 if (studiopre_mono->activate_plugin !=0)
125 studiopre_mono->activate_plugin(false, studiopre_mono);
126 }
127
128 void Gx_studiopre::deactivate_f()
129 {
130 // delete the internal DSP mem
131 if (studiopre_mono->activate_plugin !=0)
132 studiopre_mono->activate_plugin(false, studiopre_mono);
133 }
134
135 void Gx_studiopre::run_dsp_mono(uint32_t n_samples)
136 {
137 #ifndef __SSE__
138 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
139 #endif
140 studiopre_mono->mono_audio(static_cast<int>(n_samples), input,
141 output, studiopre_mono);
142 }
143
144 void Gx_studiopre::connect_all_mono_ports(uint32_t port, void* data)
145 {
146 // connect the Ports used by the plug-in class
147 connect_mono(port,data);
148 // connect the Ports used by the DSP class
149 studiopre_mono->connect_ports(port, data, studiopre_mono);
150 }
151
152 ///////////////////////// PRIVATE CLASS FUNCTIONS /////////////////////
153
154 LV2_Handle
155 Gx_studiopre::instantiate(const LV2_Descriptor* descriptor,
156 double rate,
157 const char* bundle_path,
158 const LV2_Feature* const* features)
159 {
160 // init the plug-in class
161 Gx_studiopre *self = new Gx_studiopre();
162 if (!self)
163 {
164 return NULL;
165 }
166
167 self->init_dsp_mono((uint32_t)rate);
168
169 return (LV2_Handle)self;
170 }
171
172 void Gx_studiopre::connect_port(LV2_Handle instance,
173 uint32_t port,
174 void* data)
175 {
176 // connect all ports
177 static_cast<Gx_studiopre*>(instance)->connect_all_mono_ports(port, data);
178 }
179
180 void Gx_studiopre::activate(LV2_Handle instance)
181 {
182 // allocate needed mem
183 static_cast<Gx_studiopre*>(instance)->activate_f();
184 }
185
186 void Gx_studiopre::run(LV2_Handle instance, uint32_t n_samples)
187 {
188 // run dsp
189 static_cast<Gx_studiopre*>(instance)->run_dsp_mono(n_samples);
190 }
191
192 void Gx_studiopre::deactivate(LV2_Handle instance)
193 {
194 // free allocated mem
195 static_cast<Gx_studiopre*>(instance)->deactivate_f();
196 }
197
198 void Gx_studiopre::cleanup(LV2_Handle instance)
199 {
200 // well, clean up after us
201 Gx_studiopre* self = static_cast<Gx_studiopre*>(instance);
202 self->clean_up();
203 delete self;
204 }
205
206 const LV2_Descriptor Gx_studiopre::descriptor =
207 {
208 GXPLUGIN_URI "#studiopre",
209 instantiate,
210 connect_port,
211 activate,
212 run,
213 deactivate,
214 cleanup,
215 NULL
216 };
217
218 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
219
220 extern "C"
221 LV2_SYMBOL_EXPORT
222 const LV2_Descriptor*
223 lv2_descriptor(uint32_t index)
224 {
225 switch (index)
226 {
227 case 0:
228 return &Gx_studiopre::descriptor;
229 default:
230 return NULL;
231 }
232 }
233
234 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_studiopre"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_studiopre#gui"
28
29
30 typedef enum
31 {
32 BRIGHT_L,
33 VOLUME_L,
34 BASS_L,
35 MIDDLE_L,
36 TREBLE_L,
37 EFFECTS_OUTPUT,
38 EFFECTS_INPUT,
39 } PortIndex;
40
41 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_studiopre>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_studiopre" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_studiopre#studiopre>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "Gx Alembic Mono";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_studiopre> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_studiopre#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "bright" ;
54 lv2:name "Bright";
55 lv2:portProperty lv2:integer;
56 lv2:portProperty lv2:enumeration ;
57 lv2:default 0 ;
58 lv2:minimum 0 ;
59 lv2:maximum 1 ;
60 ] , [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 1 ;
64 lv2:symbol "volume" ;
65 lv2:name "Volume";
66 lv2:default 5.0 ;
67 lv2:minimum 0.0 ;
68 lv2:maximum 20.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 2 ;
73 lv2:symbol "bass" ;
74 lv2:name "Bass";
75 lv2:default 0.5 ;
76 lv2:minimum 0.0;
77 lv2:maximum 1.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 3 ;
82 lv2:symbol "middle" ;
83 lv2:name "Middle";
84 lv2:default 0.5 ;
85 lv2:minimum 0.0 ;
86 lv2:maximum 1.0 ;
87 ] , [
88 a lv2:InputPort ,
89 lv2:ControlPort ;
90 lv2:index 4 ;
91 lv2:symbol "treble" ;
92 lv2:name "Treble";
93 lv2:default 0.5 ;
94 lv2:minimum 0.0 ;
95 lv2:maximum 1.0 ;
96 ] , [
97 a lv2:AudioPort ,
98 lv2:OutputPort ;
99 lv2:index 5 ;
100 lv2:symbol "out" ;
101 lv2:name "Out"
102 ],[
103 a lv2:AudioPort ,
104 lv2:InputPort ;
105 lv2:index 6 ;
106 lv2:symbol "in" ;
107 lv2:name "In"
108 ].
109
110
111
112 <http://guitarix.sourceforge.net/plugins/gx_studiopre#gui>
113 a guiext:GtkUI;
114 guiext:binary <gx_studiopre_gui.so>;
115 guiext:requiredFeature guiext:makeResident .
116
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_studiopre.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class gx_studiopreGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(gx_studiopreGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(gx_studiopreGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 gx_studiopreGUI () {};
56 ~gx_studiopreGUI () {};
57 } ;
58
59 void gx_studiopreGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n";
68 addKnob += " stock['button_on'] = {{'"
69 "echo-switch_on.png'}}\n"
70 " stock['button_off'] = {{'"
71 "echo-switch_off.png'}}\n"
72 " }\n"
73 "widget '*.";
74 addKnob += plug_name;
75 addKnob += "' style 'gx_";
76 addKnob += plug_name;
77 addKnob += "_dark_skin_icons' \n"
78 "class '*GxToggleImage' style'gx_";
79 addKnob += plug_name;
80 addKnob += "_dark_skin_icons' \n";
81 }
82
83 void gx_studiopreGUI::set_skin()
84 {
85 Glib::ustring toparse = "pixmap_path ";
86 toparse += " '";
87 toparse += GX_LV2_STYLE_DIR;
88 toparse += "/'\n";
89 toparse += "style \"gx_";
90 toparse += plug_name;
91 toparse += "_dark-paintbox\"\n"
92 " { \n"
93 "GxPaintBox::skin-gradient = {\n"
94 "{ 65536, 0, 0, 13107, 52428 }, \n"
95 "{ 52428, 0, 0, 0, 52428 },\n"
96 "{ 13107, 0, 0, 13107, 13107 }}\n"
97 " GxPaintBox::icon-set =5\n"
98 " stock['amp_skin'] = {{'";
99 toparse += plugskin;
100 toparse += "'}}\n"
101 " }\n"
102 "\n"
103 "style 'gx_head_studiopre_box' \n"
104 " { \n"
105 " fg[NORMAL] = '#ebebeb' \n"
106 "font_name = 'sans 7.0' \n"
107 " }\n";
108 toparse += addKnob;
109
110 toparse += " widget '*.amplabel' style:highest 'gx_head_studiopre_box'\n"
111 "widget '*.";
112 toparse += plug_name;
113 toparse += "' style 'gx_";
114 toparse += plug_name;
115 toparse += "_dark-paintbox' ";
116 toparse += " style 'gx_selector_";
117 toparse += plug_name;
118 toparse += "'\n"
119 " {\n"
120 " fg[NORMAL] = '#ebebeb'\n"
121 " GtkRange::trough-border = 2\n"
122 " GtkRange::stepper-size = 8\n"
123 " GtkRange::stepper-spacing = 2\n"
124 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
125 " font_name = 'sans 4.0'\n"
126 " xthickness = 10\n"
127 " ythickness = 1\n"
128 " }\n"
129 "widget '*.";
130 toparse += plug_name;
131 toparse += "' style:highest 'gx_selector_";
132 toparse += plug_name;
133 toparse += "'\n";
134 toparse += "style 'gx_switch'\n"
135 "{\n"
136 "xthickness = 0\n"
137 "ythickness = 0\n"
138 "GtkButton::inner-border = {0, 0, 0, 0}\n"
139 "GtkButton::default-border = {0, 0, 0, 0}\n"
140 "GtkButton::focus-line-width = 0\n"
141 "GtkButton::focus-padding = 0\n"
142 "GtkButton::interior-focus = 0\n"
143 "GtkButton::child-displacement-x = 0\n"
144 "GtkButton::child-displacement-y = 0\n"
145 " }\n"
146 "widget '*.";
147 toparse += plug_name;
148 toparse += "' style:highest 'gx_switch'";
149
150 gtk_rc_parse_string (toparse.c_str());
151 }
152
153 void gx_studiopreGUI::set_plug_name( const char * plugin_uri)
154 {
155 addKnob = "";
156
157 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_studiopre#studiopre", plugin_uri) == 0)
158 {
159 plugskin = "studiopre.png";
160 plug_name = "studiopre";
161 set_knob("studiopre-knob");
162 }
163 else
164 {
165 plugskin = "studiopre.png";
166 plug_name = "studiopre";
167 }
168 }
169
170 GtkWidget* gx_studiopreGUI::make_gui()
171 {
172 // init the gxwmm library
173 Gxw::init();
174 set_skin();
175 GtkWidget* container = gtk_vbox_new(FALSE, 2);
176 widget = new Widget(plug_name);
177 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
178 gtk_container_add(GTK_CONTAINER(container), cWidget );
179
180 return container;
181 }
182
183
184 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
185 const char * plugin_uri,
186 const char * bundle_path,
187 LV2UI_Write_Function write_function,
188 LV2UI_Controller controller,
189 LV2UI_Widget * widget,
190 const LV2_Feature * const * features)
191 {
192 gx_studiopreGUI* self = new gx_studiopreGUI();
193 if (self == NULL) return NULL;
194 self->set_plug_name_static(self, plugin_uri);
195 *widget = (LV2UI_Widget)self->make_gui_static(self);
196 self->widget->controller = controller;
197 self->widget->write_function = write_function;
198 return (LV2UI_Handle)self;
199 }
200
201 static void cleanup(LV2UI_Handle ui)
202 {
203 gx_studiopreGUI *pluginGui = static_cast<gx_studiopreGUI*>(ui);
204 delete pluginGui->widget;
205 delete pluginGui;
206 }
207
208 static void port_event(LV2UI_Handle ui,
209 uint32_t port_index,
210 uint32_t buffer_size,
211 uint32_t format,
212 const void * buffer)
213 {
214 gx_studiopreGUI *self = static_cast<gx_studiopreGUI*>(ui);
215 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
216 return;
217 }
218
219 static LV2UI_Descriptor descriptors[] =
220 {
221 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
222 };
223
224 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
225 {
226 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
227 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
228 {
229 return NULL;
230 }
231 return descriptors + index;
232 }
233
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_studiopre#studiopre>
23 a lv2:Plugin ;
24 lv2:binary <gx_studiopre.so> ;
25 rdfs:seeAlso <gx_studiopre.ttl> .
26
27
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_studiopre#studiopre>
23 a lv2:Plugin ;
24 lv2:binary <gx_studiopre@LIB_EXT@> ;
25 rdfs:seeAlso <gx_studiopre.ttl> .
26
27
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
33 {
34 switch ((PortIndex)port_index )
35 {
36 case VOLUME_L:
37 return &m_bigknob;
38 case BASS_L:
39 return &m_bigknob1;
40 case MIDDLE_L:
41 return &m_bigknob2;
42 case TREBLE_L:
43 return &m_bigknob3;
44 case BRIGHT_L:
45 return &m_switch;
46 default:
47 return NULL;
48 }
49 }
50
51 Widget::Widget(Glib::ustring plugname):
52 plug_name(plugname)
53 {
54 // set propertys for the main paintbox holding the skin
55 m_paintbox.set_border_width(0);
56 m_paintbox.set_spacing(0);
57 m_paintbox.set_homogeneous(false);
58 m_paintbox.set_name(plug_name);
59 m_paintbox.property_paint_func() = "amp_skin_expose";
60 add(m_paintbox);
61
62 // 1st wrapper HBox with 3 sections inside
63 m_hbox_.set_spacing(10);
64 m_hbox_.set_border_width(0);
65 m_hbox_.set_homogeneous(false);
66
67 // Add 3 containers for the screws and main panel controls
68
69 // Left Screws
70 m_vbox_.set_spacing(0);
71 m_vbox_.set_border_width(0);
72 m_vbox_.set_homogeneous(false);
73
74 m_vbox.set_spacing(40);
75 make_image( &m_vbox, "screwhead", true ) ;
76 make_image( &m_vbox, "screwhead", false ) ;
77 m_vbox_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
78
79 m_hbox_.pack_start(m_vbox_, Gtk::PACK_SHRINK);
80
81 // Control Panel Middle
82 m_vbox1_.set_spacing(6);
83 m_vbox1_.set_border_width(0);
84 m_vbox1_.set_homogeneous(false);
85
86 // Vbox for controls
87 m_vbox3_.set_spacing(4);
88 m_vbox3_.set_border_width(0);
89 m_vbox3_.set_homogeneous(false);
90 m_vbox1_.pack_start(m_vbox3_, Gtk::PACK_EXPAND_PADDING);
91
92 // 2 hboxes One for the Channel Labels
93 m_hbox3_.set_spacing(40);
94 m_hbox3_.set_border_width(0);
95 m_hbox3_.set_homogeneous(true);
96 m_vbox3_.pack_start(m_hbox3_, Gtk::PACK_SHRINK);
97 make_label(&m_hbox3_, "CHANNEL", true ) ;
98
99 // One wraps the 2 channel control panels
100 m_hbox4_.set_spacing(40);
101 m_hbox4_.set_border_width(0);
102 m_hbox4_.set_homogeneous(true);
103
104 // Left channel
105 m_hbox5_.set_spacing(10);
106 m_hbox5_.set_border_width(0);
107 m_hbox5_.set_homogeneous(true);
108 m_hbox4_.pack_start(m_hbox5_, Gtk::PACK_SHRINK);
109
110 // Now the actual controllers
111 m_vbox2.set_spacing( 6 ) ;
112 m_vbox3.set_spacing( 6 ) ;
113 m_vbox4.set_spacing( 6 ) ;
114 m_vbox5.set_spacing( 6 ) ;
115 m_vbox6.set_spacing( 6 ) ;
116 make_switch_box(&m_vbox2, "BRIGHT", BRIGHT_L);
117 make_controller_box(&m_vbox3, "VOLUME", 0.0, 20.0, 0.1, VOLUME_L);
118 make_controller_box(&m_vbox4, "BASS", 0.0, 1.0, 0.1, BASS_L);
119 make_controller_box(&m_vbox5, "MIDDLE", 0.0, 1.0, 0.1, MIDDLE_L);
120 make_controller_box(&m_vbox6, "TREBLE", 0.0, 1.0, 0.1, TREBLE_L);
121 m_hbox5_.pack_start(m_vbox2, Gtk::PACK_SHRINK);
122 m_hbox5_.pack_start(m_vbox3, Gtk::PACK_SHRINK);
123 m_hbox5_.pack_start(m_vbox4, Gtk::PACK_SHRINK);
124 m_hbox5_.pack_start(m_vbox5, Gtk::PACK_SHRINK);
125 m_hbox5_.pack_start(m_vbox6, Gtk::PACK_SHRINK);
126
127 // All controls in box
128 m_vbox3_.pack_start(m_hbox4_, Gtk::PACK_SHRINK);
129
130 // Vbox for logos
131 m_vbox4_.set_spacing(0);
132 m_vbox4_.set_border_width(0);
133 m_vbox4_.set_homogeneous(false);
134
135 // Make and add the 2 logo images ( labels for now )
136 // setup the hBox
137 make_image( &m_hbox2_, "studiopre-guitarix-logo", true ) ;
138 make_image( &m_hbox2_, "studiopre_redeyelogo", false ) ;
139
140 m_vbox4_.pack_start(m_hbox2_, Gtk::PACK_EXPAND_PADDING);
141 m_vbox1_.pack_start(m_vbox4_, Gtk::PACK_SHRINK);
142
143 m_hbox_.pack_start(m_vbox1_, Gtk::PACK_EXPAND_PADDING);
144
145 // Right Screws
146 m_vbox2_.set_spacing(0);
147 m_vbox2_.set_border_width(0);
148 m_vbox2_.set_homogeneous(false);
149
150 m_vbox1.set_spacing(40);
151 make_image( &m_vbox1, "screwhead", true ) ;
152 make_image( &m_vbox1, "screwhead", false ) ;
153 m_vbox2_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
154
155 m_hbox_.pack_start(m_vbox2_, Gtk::PACK_SHRINK);
156
157 // For now set size of main container
158 m_hbox_.set_size_request( 500 ) ;
159 m_paintbox.pack_start(m_hbox_);
160
161 //Add main box to paintbox
162 // connect expose handler as resize handler
163 m_paintbox.signal_expose_event().connect(
164 sigc::mem_fun(this, &Widget::_expose_event), true);
165
166 set_app_paintable(true);
167 show_all();
168 }
169
170 Widget::~Widget()
171 {
172
173 }
174
175 // set borderwith for paintbox when widget resize
176 // to hold controllers in place
177 bool Widget::_expose_event(GdkEventExpose *event)
178 {
179 int x, y, width, height, depth;
180 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
181 //double_t height = m_paintbox.get_window()->get_height();
182 m_paintbox.set_border_width(height/10);
183 return false;
184 }
185
186 // create selectors from gxwmm
187 void Widget::make_selector(Glib::ustring labela,
188 Glib::ustring tables[],
189 size_t _size,
190 float min, float digits,
191 PortIndex port_name)
192 {
193 Gxw::Selector *regler = static_cast<Gxw::Selector*>
194 (get_controller_by_port(port_name));
195 if (regler)
196 {
197 float max = static_cast<float>(_size+1);
198
199 Gtk::TreeModelColumn<Glib::ustring> label;
200 Gtk::TreeModelColumnRecord rec;
201 rec.add(label);
202 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
203
204 for (uint32_t i = 0 ; i< _size; ++i) {
205 ls->append()->set_value(0, tables[i]);
206 }
207 regler->set_model(ls);
208 regler->set_has_tooltip();
209 regler->set_tooltip_text(labela);
210 regler->cp_configure("SELECTOR", labela, min, max, digits);
211 regler->set_show_value(false);
212 regler->set_name(plug_name);
213 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
214 *this, &Widget::on_value_changed), port_name));
215 }
216 }
217
218 // create stackboxes with controllers for port name
219 void Widget::make_controller_box(Gtk::Box *box,
220 Glib::ustring label,
221 float min, float max,
222 float digits,
223 PortIndex port_name)
224 {
225 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
226 get_controller_by_port(port_name));
227 if (regler)
228 {
229 Gtk::Label* pr = new Gtk::Label(label, 0);
230 pr->set_name("amplabel");
231 // use label images instead simple string labes
232 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
233 label_image += "/";
234 label_image += label;
235 label_image += "-label.png";
236 Gtk::Image *pr = new Gtk::Image(label_image);*/
237
238 Gtk::VBox* b1 = new Gtk::VBox();
239 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
240 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
241 regler->cp_configure("KNOB", label, min, max, digits);
242 regler->set_show_value(false);
243 regler->set_name(plug_name);
244 box->pack_start(*regler,Gtk::PACK_SHRINK);
245 Gtk::VBox* b2 = new Gtk::VBox();
246 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
247 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
248 *this, &Widget::on_value_changed), port_name));
249 }
250 }
251
252 // create stackboxes with switch controller for port name
253 void Widget::make_switch_box(Gtk::Box *box,
254 Glib::ustring label,
255 PortIndex port_name)
256 {
257 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
258 get_controller_by_port(port_name));
259 if (regler)
260 {
261 Gtk::Label* pr = new Gtk::Label(label, 0);
262 pr->set_name("amplabel");
263 // use label images instead simple string labes
264 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
265 label_image += "/"+plug_name+"-";
266 label_image += label;
267 label_image += "-label.png";
268 Gtk::Image *pr = new Gtk::Image(label_image);*/
269
270 regler->cp_configure("switch", label, 0, 1, 1);
271 regler->set_name(plug_name);
272 regler->set_base_name( "button" );
273 regler->set_can_focus( false ) ;
274 Gtk::VBox* b1 = new Gtk::VBox();
275 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
276 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
277 box->pack_start(*regler,Gtk::PACK_SHRINK);
278 Gtk::VBox* b2 = new Gtk::VBox();
279 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
280 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
281 *this, &Widget::on_value_changed), port_name));
282 }
283 }
284
285 // Create the Text Labels For Amp
286 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
287 {
288 Glib::ustring label_image = GX_LV2_STYLE_DIR;
289 label_image += "/";
290 label_image += label;
291 label_image += ".png";
292 Gtk::Image *pr = new Gtk::Image(label_image);
293
294
295 if( start ){
296 // std::cout << "Pack Start "<<label<<std::endl;
297 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
298 }else{
299 // std::cout << "Pack End " << label << std::endl;
300 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK);
301 }
302 }
303
304
305 // Create the Text Labels
306 void Widget::make_label(Gtk::Box *box,Glib::ustring label, bool start )
307 {
308 Gtk::Label* pr = new Gtk::Label(label, 0);
309 pr->set_name("amplabel");
310
311 Gtk::VBox* b1 = new Gtk::VBox();
312 Gtk::VBox* b2 = new Gtk::VBox();
313
314 if( start ){
315 // std::cout << "Pack Start "<<label<<std::endl; Gtk::VBox* b1 = new Gtk::VBox();
316 //box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
317 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
318 //box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
319 }else{
320 // std::cout << "Pack End " << label << std::endl;
321 // box->pack_end( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
322 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK);
323 //box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
324 }
325
326 }
327
328
329
330 // receive controller value changes from host and set them to controller
331 void Widget::set_value(uint32_t port_index,
332 uint32_t format,
333 const void * buffer)
334 {
335 if ( format == 0 )
336 {
337 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
338 get_controller_by_port(port_index));
339 if (regler)
340 {
341 float value = *static_cast<const float*>(buffer);
342 regler->cp_set_value(value);
343 // check_for_link(port_index, value);
344 }
345 }
346 }
347
348 // write (UI) controller value changes to the host->engine
349 void Widget::on_value_changed(uint32_t port_index)
350 {
351 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
352 get_controller_by_port(port_index));
353 if (regler)
354 {
355 float value = regler->cp_get_value();
356 write_function(controller, port_index, sizeof(float), 0,
357 static_cast<const void*>(&value));
358 // check_for_link(port_index, value);
359 }
360 }
361
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_studiopre.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
54
55 void make_label(Gtk::Box *box,Glib::ustring label, bool start ) ;
56 bool _expose_event(GdkEventExpose *event);
57
58 void set_value(uint32_t port_index,
59 uint32_t format,
60 const void * buffer);
61 public:
62
63 // public Lv2 communication stuff
64 LV2UI_Controller controller;
65 LV2UI_Write_Function write_function;
66 static void set_value_static(uint32_t port_index,
67 uint32_t buffer_size,
68 uint32_t format,
69 const void * buffer, Widget *self)
70 {
71 self->set_value(port_index,format,buffer);
72 }
73
74 Widget(Glib::ustring plugname);
75 ~Widget();
76
77 protected:
78 Glib::ustring plug_name;
79 Gtk::VBox m_vbox_;
80 Gtk::VBox m_vbox1_;
81 Gtk::VBox m_vbox2_;
82 Gtk::VBox m_vbox3_;
83 Gtk::VBox m_vbox4_;
84
85 Gtk::VBox m_vbox;
86 Gtk::VBox m_vbox1;
87 Gtk::VBox m_vbox2;
88 Gtk::VBox m_vbox3;
89 Gtk::VBox m_vbox4;
90 Gtk::VBox m_vbox5;
91 Gtk::VBox m_vbox6;
92 Gtk::VBox m_vbox7;
93 Gtk::HBox m_hbox_;
94 Gtk::HBox m_hbox2_;
95 Gtk::HBox m_hbox3_;
96 Gtk::HBox m_hbox4_;
97 Gtk::HBox m_hbox5_;
98
99 Gxw::PaintBox m_paintbox;
100 Gxw::BigKnob m_bigknob;
101 Gxw::BigKnob m_bigknob1;
102 Gxw::BigKnob m_bigknob2;
103 Gxw::BigKnob m_bigknob3;
104 Gxw::Switch m_switch;
105 };
106
107 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_studiopre.lv2'
10
11 src = ['gx_studiopre.cpp'
12 ]
13 incl = ['../faust','../faust-generated','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_studiopre',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_studiopre_gui',
59 source = 'widget.cpp gx_studiopre_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_studiopre.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_studiopre.lv2', 'gx_studiopre.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_studiopre_st.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gx_studiopre_st.cc" // dsp class generated by faust -> dsp2cc
26 #ifndef __SSE__
27 #include "stereo_noiser.cc"
28 #endif
29
30 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
31
32 class Gx_studiopre_st
33 {
34 private:
35 // internal stuff
36 float* output;
37 float* input;
38 float* output1;
39 float* input1;
40 PluginLV2* studiopre_stereo;
41 #ifndef __SSE__
42 PluginLV2* wn;
43 #endif
44
45 inline void run_dsp_stereo(uint32_t n_samples);
46 inline void connect_stereo(uint32_t port,void* data);
47 inline void init_dsp_stereo(uint32_t rate);
48 inline void connect_all_stereo_ports(uint32_t port, void* data);
49 inline void activate_f();
50 inline void clean_up();
51 inline void deactivate_f();
52
53 public:
54 // LV2 Descriptor
55 static const LV2_Descriptor descriptor;
56 // static wrapper to private functions
57 static void deactivate(LV2_Handle instance);
58 static void cleanup(LV2_Handle instance);
59 static void run(LV2_Handle instance, uint32_t n_samples);
60 static void activate(LV2_Handle instance);
61 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
62 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
63 double rate, const char* bundle_path,
64 const LV2_Feature* const* features);
65 Gx_studiopre_st();
66 ~Gx_studiopre_st();
67 };
68
69 // constructor
70 Gx_studiopre_st::Gx_studiopre_st() :
71 output(NULL),
72 input(NULL),
73 output1(NULL),
74 input1(NULL),
75 studiopre_stereo(gx_studiopre_st::plugin()) {};
76
77 // destructor
78 Gx_studiopre_st::~Gx_studiopre_st()
79 {
80 // just to be sure the plug have given free the allocated mem
81 // it didn't hurd if the mem is already given free by clean_up()
82 if (studiopre_stereo->activate_plugin !=0)
83 studiopre_stereo->activate_plugin(false, studiopre_stereo);
84 // delete DSP class
85 studiopre_stereo->delete_instance(studiopre_stereo);
86 };
87
88 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
89
90 void Gx_studiopre_st::init_dsp_stereo(uint32_t rate)
91 {
92 AVOIDDENORMALS(); // init the SSE denormal protection
93 #ifndef __SSE__
94 wn = stereo_noiser::plugin();
95 wn->set_samplerate(rate, wn);
96 #endif
97 studiopre_stereo->set_samplerate(rate, studiopre_stereo); // init the DSP class
98
99 }
100
101 // connect the Ports used by the plug-in class
102 void Gx_studiopre_st::connect_stereo(uint32_t port,void* data)
103 {
104 switch ((PortIndex)port)
105 {
106 case EFFECTS_OUTPUT:
107 output = static_cast<float*>(data);
108 break;
109 case EFFECTS_OUTPUT1:
110 output1 = static_cast<float*>(data);
111 break;
112 case EFFECTS_INPUT:
113 input = static_cast<float*>(data);
114 break;
115 case EFFECTS_INPUT1:
116 input1 = static_cast<float*>(data);
117 break;
118 default:
119 break;
120 }
121 }
122
123 void Gx_studiopre_st::activate_f()
124 {
125 // allocate the internal DSP mem
126 if (studiopre_stereo->activate_plugin !=0)
127 studiopre_stereo->activate_plugin(true, studiopre_stereo);
128 }
129
130 void Gx_studiopre_st::clean_up()
131 {
132 #ifndef __SSE__
133 wn->delete_instance(wn);;
134 #endif
135 // delete the internal DSP mem
136 if (studiopre_stereo->activate_plugin !=0)
137 studiopre_stereo->activate_plugin(false, studiopre_stereo);
138 }
139
140 void Gx_studiopre_st::deactivate_f()
141 {
142 // free allocated DSP mem
143 if (studiopre_stereo->activate_plugin !=0)
144 studiopre_stereo->activate_plugin(false, studiopre_stereo);
145 }
146
147 void Gx_studiopre_st::run_dsp_stereo(uint32_t n_samples)
148 {
149 #ifndef __SSE__
150 wn->stereo_audio(static_cast<int>(n_samples), input, input1, input, input1, wn);;
151 #endif
152 studiopre_stereo->stereo_audio(static_cast<int>(n_samples), input,input1,
153 output, output1, studiopre_stereo);
154 }
155
156 void Gx_studiopre_st::connect_all_stereo_ports(uint32_t port, void* data)
157 {
158 // connect the Ports used by the plug-in class
159 connect_stereo(port,data);
160 // connect the Ports used by the DSP class
161 studiopre_stereo->connect_ports(port, data, studiopre_stereo);
162 }
163
164 //////////////////////// STATIC CLASS FUNCTIONS ///////////////////////
165
166 LV2_Handle
167 Gx_studiopre_st::instantiate(const LV2_Descriptor* descriptor,
168 double rate,
169 const char* bundle_path,
170 const LV2_Feature* const* features)
171 {
172 // init the plug-in class
173 Gx_studiopre_st *self = new Gx_studiopre_st();
174 if (!self)
175 {
176 return NULL;
177 }
178 self->init_dsp_stereo((uint32_t)rate);
179
180 return (LV2_Handle)self;
181 }
182
183 void Gx_studiopre_st::connect_port(LV2_Handle instance,
184 uint32_t port,
185 void* data)
186 {
187 // connect all ports
188 static_cast<Gx_studiopre_st*>(instance)->connect_all_stereo_ports(port, data);
189 }
190
191 void Gx_studiopre_st::activate(LV2_Handle instance)
192 {
193 // allocate needed mem
194 static_cast<Gx_studiopre_st*>(instance)->activate_f();
195 }
196
197 void Gx_studiopre_st::run(LV2_Handle instance, uint32_t n_samples)
198 {
199 // run dsp
200 static_cast<Gx_studiopre_st*>(instance)->run_dsp_stereo(n_samples);
201 }
202
203 void Gx_studiopre_st::deactivate(LV2_Handle instance)
204 {
205 // free allocated mem
206 static_cast<Gx_studiopre_st*>(instance)->deactivate_f();
207 }
208
209 void Gx_studiopre_st::cleanup(LV2_Handle instance)
210 {
211 // well, clean up after us
212 Gx_studiopre_st* self = static_cast<Gx_studiopre_st*>(instance);
213 self->clean_up();
214 delete self;
215 }
216
217 const LV2_Descriptor Gx_studiopre_st::descriptor =
218 {
219 GXPLUGIN_URI "#studiopre_st",
220 instantiate,
221 connect_port,
222 activate,
223 run,
224 NULL,
225 cleanup,
226 NULL
227 };
228
229 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
230
231 extern "C"
232 LV2_SYMBOL_EXPORT
233 const LV2_Descriptor*
234 lv2_descriptor(uint32_t index)
235 {
236 switch (index)
237 {
238 case 0:
239 return &Gx_studiopre_st::descriptor;
240 default:
241 return NULL;
242 }
243 }
244
245 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_studiopre_st"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_studiopre_st#gui"
28
29
30 typedef enum
31 {
32 BRIGHT_L,
33 VOLUME_L,
34 BASS_L,
35 MIDDLE_L,
36 TREBLE_L,
37 BRIGHT_R,
38 VOLUME_R,
39 BASS_R,
40 MIDDLE_R,
41 TREBLE_R,
42 EFFECTS_OUTPUT,
43 EFFECTS_INPUT,
44 EFFECTS_OUTPUT1,
45 EFFECTS_INPUT1,
46 } PortIndex;
47
48 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_studiopre_st>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_studiopre_st" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_studiopre_st#studiopre_st>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "Gx Studio Preamp Stereo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_studiopre_st> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_studiopre_st#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "bright_l" ;
54 lv2:name "Bright_L";
55 lv2:portProperty lv2:integer;
56 lv2:portProperty lv2:enumeration ;
57 lv2:default 0 ;
58 lv2:minimum 0 ;
59 lv2:maximum 1 ;
60 ] , [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 1 ;
64 lv2:symbol "volume_l" ;
65 lv2:name "Volume_L";
66 lv2:default 5.0 ;
67 lv2:minimum 0.0 ;
68 lv2:maximum 20.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 2 ;
73 lv2:symbol "bass_l" ;
74 lv2:name "Bass_L";
75 lv2:default 0.5 ;
76 lv2:minimum 0.0;
77 lv2:maximum 1.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 3 ;
82 lv2:symbol "middle_l" ;
83 lv2:name "Middle_L";
84 lv2:default 0.5 ;
85 lv2:minimum 0.0 ;
86 lv2:maximum 1.0 ;
87 ] , [
88 a lv2:InputPort ,
89 lv2:ControlPort ;
90 lv2:index 4 ;
91 lv2:symbol "treble_l" ;
92 lv2:name "Treble_L";
93 lv2:default 0.5 ;
94 lv2:minimum 0.0 ;
95 lv2:maximum 1.0 ;
96 ] ,[
97 a lv2:InputPort ,
98 lv2:ControlPort ;
99 lv2:index 5 ;
100 lv2:symbol "bright_r" ;
101 lv2:name "Bright_L";
102 lv2:portProperty lv2:integer;
103 lv2:portProperty lv2:enumeration ;
104 lv2:default 0 ;
105 lv2:minimum 0 ;
106 lv2:maximum 1 ;
107 ] , [
108 a lv2:InputPort ,
109 lv2:ControlPort ;
110 lv2:index 6 ;
111 lv2:symbol "volume_r" ;
112 lv2:name "Volume_R";
113 lv2:default 5.0 ;
114 lv2:minimum 0.0 ;
115 lv2:maximum 20.0 ;
116 ] , [
117 a lv2:InputPort ,
118 lv2:ControlPort ;
119 lv2:index 7 ;
120 lv2:symbol "bass_r" ;
121 lv2:name "Bass_R";
122 lv2:default 0.5 ;
123 lv2:minimum 0.0;
124 lv2:maximum 1.0 ;
125 ] , [
126 a lv2:InputPort ,
127 lv2:ControlPort ;
128 lv2:index 8 ;
129 lv2:symbol "middle_r" ;
130 lv2:name "Middle_R";
131 lv2:default 0.5 ;
132 lv2:minimum 0.0 ;
133 lv2:maximum 1.0 ;
134 ] , [
135 a lv2:InputPort ,
136 lv2:ControlPort ;
137 lv2:index 9 ;
138 lv2:symbol "treble_r" ;
139 lv2:name "Treble_R";
140 lv2:default 0.5 ;
141 lv2:minimum 0.0 ;
142 lv2:maximum 1.0 ;
143 ] , [
144 a lv2:AudioPort ,
145 lv2:OutputPort ;
146 lv2:index 10 ;
147 lv2:symbol "out" ;
148 lv2:name "Out"
149 ],[
150 a lv2:AudioPort ,
151 lv2:InputPort ;
152 lv2:index 11 ;
153 lv2:symbol "in" ;
154 lv2:name "In"
155 ], [
156 a lv2:AudioPort ,
157 lv2:OutputPort ;
158 lv2:index 12 ;
159 lv2:symbol "out1" ;
160 lv2:name "Out1"
161 ],[
162 a lv2:AudioPort ,
163 lv2:InputPort ;
164 lv2:index 13 ;
165 lv2:symbol "in1" ;
166 lv2:name "In1"
167 ].
168
169
170 <http://guitarix.sourceforge.net/plugins/gx_studiopre_st#gui>
171 a guiext:GtkUI;
172 guiext:binary <gx_studiopre_st_gui.so>;
173 guiext:requiredFeature guiext:makeResident .
174
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_studiopre_st.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class gx_studiopre_stGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(gx_studiopre_stGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(gx_studiopre_stGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 gx_studiopre_stGUI () {};
56 ~gx_studiopre_stGUI () {};
57 } ;
58
59 void gx_studiopre_stGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n";
68 addKnob += " stock['button_on'] = {{'"
69 "echo-switch_on.png'}}\n"
70 " stock['button_off'] = {{'"
71 "echo-switch_off.png'}}\n"
72 " }\n"
73 "widget '*.";
74 addKnob += plug_name;
75 addKnob += "' style 'gx_";
76 addKnob += plug_name;
77 addKnob += "_dark_skin_icons' \n"
78 "class '*GxToggleImage' style'gx_";
79 addKnob += plug_name;
80 addKnob += "_dark_skin_icons' \n";
81 }
82
83 void gx_studiopre_stGUI::set_skin()
84 {
85 Glib::ustring toparse = "pixmap_path ";
86 toparse += " '";
87 toparse += GX_LV2_STYLE_DIR;
88 toparse += "/'\n";
89 toparse += "style \"gx_";
90 toparse += plug_name;
91 toparse += "_dark-paintbox\"\n"
92 " { \n"
93 "GxPaintBox::skin-gradient = {\n"
94 "{ 65536, 0, 0, 13107, 52428 }, \n"
95 "{ 52428, 0, 0, 0, 52428 },\n"
96 "{ 13107, 0, 0, 13107, 13107 }}\n"
97 " GxPaintBox::icon-set =5\n"
98 " stock['amp_skin'] = {{'";
99 toparse += plugskin;
100 toparse += "'}}\n"
101 " }\n"
102 "\n"
103 "style 'gx_head_studiopre_box' \n"
104 " { \n"
105 " fg[NORMAL] = '#ebebeb' \n"
106 "font_name = 'sans 7.5' \n"
107 " }\n";
108 toparse += addKnob;
109
110 toparse += " widget '*.amplabel' style:highest 'gx_head_studiopre_box'\n"
111 "widget '*.";
112 toparse += plug_name;
113 toparse += "' style 'gx_";
114 toparse += plug_name;
115 toparse += "_dark-paintbox' ";
116 toparse += " style 'gx_selector_";
117 toparse += plug_name;
118 toparse += "'\n"
119 " {\n"
120 " fg[NORMAL] = '#ebebeb'\n"
121 " GtkRange::trough-border = 2\n"
122 " GtkRange::stepper-size = 8\n"
123 " GtkRange::stepper-spacing = 2\n"
124 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
125 " font_name = 'sans 4.0'\n"
126 " xthickness = 10\n"
127 " ythickness = 1\n"
128 " }\n"
129 "widget '*.";
130 toparse += plug_name;
131 toparse += "' style:highest 'gx_selector_";
132 toparse += plug_name;
133 toparse += "'\n";
134 toparse += "style 'gx_switch'\n"
135 "{\n"
136 "xthickness = 0\n"
137 "ythickness = 0\n"
138 "GtkButton::inner-border = {0, 0, 0, 0}\n"
139 "GtkButton::default-border = {0, 0, 0, 0}\n"
140 "GtkButton::focus-line-width = 0\n"
141 "GtkButton::focus-padding = 0\n"
142 "GtkButton::interior-focus = 0\n"
143 "GtkButton::child-displacement-x = 0\n"
144 "GtkButton::child-displacement-y = 0\n"
145 " }\n"
146 "widget '*.";
147 toparse += plug_name;
148 toparse += "' style:highest 'gx_switch'";
149
150 gtk_rc_parse_string (toparse.c_str());
151 }
152
153 void gx_studiopre_stGUI::set_plug_name( const char * plugin_uri)
154 {
155 addKnob = "";
156
157 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_studiopre_st#studiopre_st", plugin_uri) == 0)
158 {
159 plugskin = "studiopre.png";
160 plug_name = "studiopre_st";
161 set_knob("studiopre-knob");
162 }
163 else
164 {
165 plugskin = "studiopre.png";
166 plug_name = "studiopre_st";
167 }
168 }
169
170 GtkWidget* gx_studiopre_stGUI::make_gui()
171 {
172 // init the gxwmm library
173 Gxw::init();
174 set_skin();
175 GtkWidget* container = gtk_vbox_new(FALSE, 2);
176 widget = new Widget(plug_name);
177 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
178 gtk_container_add(GTK_CONTAINER(container), cWidget );
179
180 return container;
181 }
182
183
184 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
185 const char * plugin_uri,
186 const char * bundle_path,
187 LV2UI_Write_Function write_function,
188 LV2UI_Controller controller,
189 LV2UI_Widget * widget,
190 const LV2_Feature * const * features)
191 {
192 gx_studiopre_stGUI* self = new gx_studiopre_stGUI();
193 if (self == NULL) return NULL;
194 self->set_plug_name_static(self, plugin_uri);
195 *widget = (LV2UI_Widget)self->make_gui_static(self);
196 self->widget->controller = controller;
197 self->widget->write_function = write_function;
198 return (LV2UI_Handle)self;
199 }
200
201 static void cleanup(LV2UI_Handle ui)
202 {
203 gx_studiopre_stGUI *pluginGui = static_cast<gx_studiopre_stGUI*>(ui);
204 delete pluginGui->widget;
205 delete pluginGui;
206 }
207
208 static void port_event(LV2UI_Handle ui,
209 uint32_t port_index,
210 uint32_t buffer_size,
211 uint32_t format,
212 const void * buffer)
213 {
214 gx_studiopre_stGUI *self = static_cast<gx_studiopre_stGUI*>(ui);
215 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
216 return;
217 }
218
219 static LV2UI_Descriptor descriptors[] =
220 {
221 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
222 };
223
224 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
225 {
226 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
227 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
228 {
229 return NULL;
230 }
231 return descriptors + index;
232 }
233
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_studiopre_st#studiopre_st>
23 a lv2:Plugin ;
24 lv2:binary <gx_studiopre_st.so> ;
25 rdfs:seeAlso <gx_studiopre_st.ttl> .
26
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_studiopre_st#studiopre_st>
23 a lv2:Plugin ;
24 lv2:binary <gx_studiopre_st@LIB_EXT@> ;
25 rdfs:seeAlso <gx_studiopre_st.ttl> .
26
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
33 {
34 switch ((PortIndex)port_index )
35 {
36 case VOLUME_L:
37 return &m_bigknob;
38 case BASS_L:
39 return &m_bigknob1;
40 case MIDDLE_L:
41 return &m_bigknob2;
42 case TREBLE_L:
43 return &m_bigknob3;
44 case BRIGHT_L:
45 return &m_switch;
46 case VOLUME_R:
47 return &m_bigknob4;
48 case BASS_R:
49 return &m_bigknob5;
50 case MIDDLE_R:
51 return &m_bigknob6;
52 case TREBLE_R:
53 return &m_bigknob7;
54 case BRIGHT_R:
55 return &m_switch1;
56 default:
57 return NULL;
58 }
59 }
60
61 Widget::Widget(Glib::ustring plugname):
62 plug_name(plugname)
63 {
64 // set propertys for the main paintbox holding the skin
65 m_paintbox.set_border_width(0);
66 m_paintbox.set_spacing(0);
67 m_paintbox.set_homogeneous(false);
68 m_paintbox.set_name(plug_name);
69 m_paintbox.property_paint_func() = "amp_skin_expose";
70 add(m_paintbox);
71
72 // 1st wrapper HBox with 3 sections inside
73 m_hbox_.set_spacing(10);
74 m_hbox_.set_border_width(0);
75 m_hbox_.set_homogeneous(false);
76
77 // Add 3 containers for the screws and main panel controls
78
79 // Left Screws
80 m_vbox_.set_spacing(0);
81 m_vbox_.set_border_width(0);
82 m_vbox_.set_homogeneous(false);
83
84 m_vbox.set_spacing(40);
85 make_image( &m_vbox, "screwhead", true ) ;
86 make_image( &m_vbox, "screwhead", false ) ;
87 m_vbox_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
88
89 m_hbox_.pack_start(m_vbox_, Gtk::PACK_SHRINK);
90
91 // Control Panel Middle
92 m_vbox1_.set_spacing(6);
93 m_vbox1_.set_border_width(0);
94 m_vbox1_.set_homogeneous(false);
95
96 // Vbox for controls
97 m_vbox3_.set_spacing(4);
98 m_vbox3_.set_border_width(0);
99 m_vbox3_.set_homogeneous(false);
100 m_vbox1_.pack_start(m_vbox3_, Gtk::PACK_EXPAND_PADDING);
101
102 // 2 hboxes One for the Channel Labels
103 m_hbox3_.set_spacing(40);
104 m_hbox3_.set_border_width(0);
105 m_hbox3_.set_homogeneous(true);
106 m_vbox3_.pack_start(m_hbox3_, Gtk::PACK_SHRINK);
107 make_label(&m_hbox3_, "CHANNEL A", true ) ;
108 make_label(&m_hbox3_, "CHANNEL B", true ) ;
109
110 // One wraps the 2 channel control panels
111 m_hbox4_.set_spacing(40);
112 m_hbox4_.set_border_width(0);
113 m_hbox4_.set_homogeneous(true);
114
115 // Left channel
116 m_hbox5_.set_spacing(10);
117 m_hbox5_.set_border_width(0);
118 m_hbox5_.set_homogeneous(true);
119 m_hbox4_.pack_start(m_hbox5_, Gtk::PACK_SHRINK);
120
121 // Now the actual controllers
122 m_vbox2.set_spacing( 6 ) ;
123 m_vbox3.set_spacing( 6 ) ;
124 m_vbox4.set_spacing( 6 ) ;
125 m_vbox5.set_spacing( 6 ) ;
126 m_vbox6.set_spacing( 6 ) ;
127 make_switch_box(&m_vbox2, "BRIGHT", BRIGHT_L);
128 make_controller_box(&m_vbox3, "VOLUME", 0.0, 20.0, 0.1, VOLUME_L);
129 make_controller_box(&m_vbox4, "BASS", 0.0, 1.0, 0.1, BASS_L);
130 make_controller_box(&m_vbox5, "MIDDLE", 0.0, 1.0, 0.1, MIDDLE_L);
131 make_controller_box(&m_vbox6, "TREBLE", 0.0, 1.0, 0.1, TREBLE_L);
132 m_hbox5_.pack_start(m_vbox2, Gtk::PACK_SHRINK);
133 m_hbox5_.pack_start(m_vbox3, Gtk::PACK_SHRINK);
134 m_hbox5_.pack_start(m_vbox4, Gtk::PACK_SHRINK);
135 m_hbox5_.pack_start(m_vbox5, Gtk::PACK_SHRINK);
136 m_hbox5_.pack_start(m_vbox6, Gtk::PACK_SHRINK);
137
138
139 // Right channel
140 m_hbox6_.set_spacing(10);
141 m_hbox6_.set_border_width(0);
142 m_hbox6_.set_homogeneous(true);
143 m_hbox4_.pack_start(m_hbox6_, Gtk::PACK_SHRINK);
144
145 m_vbox7.set_spacing( 6 ) ;
146 m_vbox8.set_spacing( 6 ) ;
147 m_vbox9.set_spacing( 6 ) ;
148 m_vbox10.set_spacing( 6 ) ;
149 m_vbox11.set_spacing( 6 ) ;
150 make_switch_box(&m_vbox7, "BRIGHT", BRIGHT_R);
151 make_controller_box(&m_vbox8, "VOLUME", 0.0, 20.0, 0.1, VOLUME_R);
152 make_controller_box(&m_vbox9, "BASS", 0.0, 1.0, 0.1, BASS_R);
153 make_controller_box(&m_vbox10, "MIDDLE", 0.0, 1.0, 0.1, MIDDLE_R);
154 make_controller_box(&m_vbox11, "TREBLE", 0.0, 1.0, 0.1, TREBLE_R);
155 m_hbox6_.pack_start(m_vbox7, Gtk::PACK_SHRINK);
156 m_hbox6_.pack_start(m_vbox8, Gtk::PACK_SHRINK);
157 m_hbox6_.pack_start(m_vbox9, Gtk::PACK_SHRINK);
158 m_hbox6_.pack_start(m_vbox10, Gtk::PACK_SHRINK);
159 m_hbox6_.pack_start(m_vbox11, Gtk::PACK_SHRINK);
160
161 // All controls in box
162 m_vbox3_.pack_start(m_hbox4_, Gtk::PACK_SHRINK);
163
164 // Vbox for logos
165 m_vbox4_.set_spacing(0);
166 m_vbox4_.set_border_width(0);
167 m_vbox4_.set_homogeneous(false);
168
169 // Make and add the 2 logo images ( labels for now )
170 // setup the hBox
171 // make_label( &m_hbox2_, "Guitarix Effects", true ) ;
172 // make_label( &m_hbox2_, "Redeye", false ) ;
173 make_image( &m_hbox2_, "studiopre-guitarix-logo", true ) ;
174 make_image( &m_hbox2_, "studiopre_redeyelogo", false ) ;
175
176 m_vbox4_.pack_start(m_hbox2_, Gtk::PACK_EXPAND_PADDING);
177 m_vbox1_.pack_start(m_vbox4_, Gtk::PACK_SHRINK);
178
179 m_hbox_.pack_start(m_vbox1_, Gtk::PACK_EXPAND_PADDING);
180
181 // Right Screws
182 m_vbox2_.set_spacing(0);
183 m_vbox2_.set_border_width(0);
184 m_vbox2_.set_homogeneous(false);
185
186 m_vbox1.set_spacing(40);
187 make_image( &m_vbox1, "screwhead", true ) ;
188 make_image( &m_vbox1, "screwhead", false ) ;
189 m_vbox2_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
190
191 m_hbox_.pack_start(m_vbox2_, Gtk::PACK_SHRINK);
192
193 // For now set size of main container
194 m_hbox_.set_size_request( 900 ) ;
195 m_paintbox.pack_start(m_hbox_);
196
197 //Add main biox to paintbox
198 // connect expose handler as resize handler
199 m_paintbox.signal_expose_event().connect(
200 sigc::mem_fun(this, &Widget::_expose_event), true);
201
202 set_app_paintable(true);
203 show_all();
204 }
205
206 Widget::~Widget()
207 {
208
209 }
210
211 // set borderwith for paintbox when widget resize
212 // to hold controllers in place
213 bool Widget::_expose_event(GdkEventExpose *event)
214 {
215 int x, y, width, height, depth;
216 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
217 //double_t height = m_paintbox.get_window()->get_height();
218 m_paintbox.set_border_width(height/10);
219 return false;
220 }
221
222 // create selectors from gxwmm
223 void Widget::make_selector(Glib::ustring labela,
224 Glib::ustring tables[],
225 size_t _size,
226 float min, float digits,
227 PortIndex port_name)
228 {
229 Gxw::Selector *regler = static_cast<Gxw::Selector*>
230 (get_controller_by_port(port_name));
231 if (regler)
232 {
233 float max = static_cast<float>(_size+1);
234
235 Gtk::TreeModelColumn<Glib::ustring> label;
236 Gtk::TreeModelColumnRecord rec;
237 rec.add(label);
238 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
239
240 for (uint32_t i = 0 ; i< _size; ++i) {
241 ls->append()->set_value(0, tables[i]);
242 }
243 regler->set_model(ls);
244 regler->set_has_tooltip();
245 regler->set_tooltip_text(labela);
246 regler->cp_configure("SELECTOR", labela, min, max, digits);
247 regler->set_show_value(false);
248 regler->set_name(plug_name);
249 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
250 *this, &Widget::on_value_changed), port_name));
251 }
252 }
253
254 // create stackboxes with controllers for port name
255 void Widget::make_controller_box(Gtk::Box *box,
256 Glib::ustring label,
257 float min, float max,
258 float digits,
259 PortIndex port_name)
260 {
261 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
262 get_controller_by_port(port_name));
263 if (regler)
264 {
265 Gtk::Label* pr = new Gtk::Label(label, 0);
266 pr->set_name("amplabel");
267 // use label images instead simple string labes
268 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
269 label_image += "/";
270 label_image += label;
271 label_image += "-label.png";
272 Gtk::Image *pr = new Gtk::Image(label_image);*/
273
274 Gtk::VBox* b1 = new Gtk::VBox();
275 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
276 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
277 regler->cp_configure("KNOB", label, min, max, digits);
278 regler->set_show_value(false);
279 regler->set_name(plug_name);
280 box->pack_start(*regler,Gtk::PACK_SHRINK);
281 Gtk::VBox* b2 = new Gtk::VBox();
282 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
283 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
284 *this, &Widget::on_value_changed), port_name));
285 }
286 }
287
288 // create stackboxes with switch controller for port name
289 void Widget::make_switch_box(Gtk::Box *box,
290 Glib::ustring label,
291 PortIndex port_name)
292 {
293 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
294 get_controller_by_port(port_name));
295 if (regler)
296 {
297 Gtk::Label* pr = new Gtk::Label(label, 0);
298 pr->set_name("amplabel");
299 // use label images instead simple string labes
300 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
301 label_image += "/"+plug_name+"-";
302 label_image += label;
303 label_image += "-label.png";
304 Gtk::Image *pr = new Gtk::Image(label_image);*/
305
306 regler->cp_configure("switch", label, 0, 1, 1);
307 regler->set_name(plug_name);
308 regler->set_base_name( "button" );
309 regler->set_can_focus( false ) ;
310 Gtk::VBox* b1 = new Gtk::VBox();
311 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
312 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
313 box->pack_start(*regler,Gtk::PACK_SHRINK);
314 Gtk::VBox* b2 = new Gtk::VBox();
315 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
316 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
317 *this, &Widget::on_value_changed), port_name));
318 }
319 }
320
321 // Create the Text Labels from images For Amp
322 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
323 {
324 Glib::ustring label_image = GX_LV2_STYLE_DIR;
325 label_image += "/";
326 label_image += label;
327 label_image += ".png";
328 Gtk::Image *pr = new Gtk::Image(label_image);
329
330
331 if( start ){
332 // std::cout << "Pack Start "<<label<<std::endl;
333 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
334 }else{
335 // std::cout << "Pack End " << label << std::endl;
336 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK);
337 }
338 }
339
340 // Create the Text Labels
341 void Widget::make_label(Gtk::Box *box,Glib::ustring label, bool start )
342 {
343 Gtk::Label* pr = new Gtk::Label(label, 0);
344 pr->set_name("amplabel");
345
346 Gtk::VBox* b1 = new Gtk::VBox();
347 Gtk::VBox* b2 = new Gtk::VBox();
348
349 if( start ){
350 // std::cout << "Pack Start "<<label<<std::endl; Gtk::VBox* b1 = new Gtk::VBox();
351 //box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
352 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
353 //box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
354 }else{
355 // std::cout << "Pack End " << label << std::endl;
356 // box->pack_end( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
357 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK);
358 //box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
359 }
360
361 }
362
363 // receive controller value changes from host and set them to controller
364 void Widget::set_value(uint32_t port_index,
365 uint32_t format,
366 const void * buffer)
367 {
368 if ( format == 0 )
369 {
370 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
371 get_controller_by_port(port_index));
372 if (regler)
373 {
374 float value = *static_cast<const float*>(buffer);
375 regler->cp_set_value(value);
376 // check_for_link(port_index, value);
377 }
378 }
379 }
380
381 // write (UI) controller value changes to the host->engine
382 void Widget::on_value_changed(uint32_t port_index)
383 {
384 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
385 get_controller_by_port(port_index));
386 if (regler)
387 {
388 float value = regler->cp_get_value();
389 write_function(controller, port_index, sizeof(float), 0,
390 static_cast<const void*>(&value));
391 // check_for_link(port_index, value);
392 }
393 }
394
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_studiopre_st.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
54
55 void make_label(Gtk::Box *box,Glib::ustring label, bool start ) ;
56
57 bool _expose_event(GdkEventExpose *event);
58
59 void set_value(uint32_t port_index,
60 uint32_t format,
61 const void * buffer);
62 public:
63
64 // public Lv2 communication stuff
65 LV2UI_Controller controller;
66 LV2UI_Write_Function write_function;
67 static void set_value_static(uint32_t port_index,
68 uint32_t buffer_size,
69 uint32_t format,
70 const void * buffer, Widget *self)
71 {
72 self->set_value(port_index,format,buffer);
73 }
74
75 Widget(Glib::ustring plugname);
76 ~Widget();
77
78 protected:
79 Glib::ustring plug_name;
80 Gtk::VBox m_vbox_;
81 Gtk::VBox m_vbox1_;
82 Gtk::VBox m_vbox2_;
83 Gtk::VBox m_vbox3_;
84 Gtk::VBox m_vbox4_;
85
86 Gtk::VBox m_vbox;
87 Gtk::VBox m_vbox1;
88 Gtk::VBox m_vbox2;
89 Gtk::VBox m_vbox3;
90 Gtk::VBox m_vbox4;
91 Gtk::VBox m_vbox5;
92 Gtk::VBox m_vbox6;
93 Gtk::VBox m_vbox7;
94 Gtk::VBox m_vbox8;
95 Gtk::VBox m_vbox9;
96 Gtk::VBox m_vbox10;
97 Gtk::VBox m_vbox11;
98 Gtk::VBox m_vbox12;
99 Gtk::VBox m_vbox13;
100 Gtk::VBox m_vbox14;
101 Gtk::VBox m_vbox15;
102 Gtk::VBox m_vbox16;
103 Gtk::VBox m_vbox17;
104
105 Gtk::HBox m_hbox_;
106 Gtk::HBox m_hbox1_;
107 Gtk::HBox m_hbox2_;
108 Gtk::HBox m_hbox3_;
109 Gtk::HBox m_hbox4_;
110 Gtk::HBox m_hbox5_;
111 Gtk::HBox m_hbox6_;
112 Gtk::HBox m_hbox7_;
113 Gtk::HBox m_hbox8_;
114
115 Gxw::PaintBox m_paintbox;
116 Gxw::BigKnob m_bigknob;
117 Gxw::BigKnob m_bigknob1;
118 Gxw::BigKnob m_bigknob2;
119 Gxw::BigKnob m_bigknob3;
120 Gxw::BigKnob m_bigknob4;
121 Gxw::BigKnob m_bigknob5;
122 Gxw::BigKnob m_bigknob6;
123 Gxw::BigKnob m_bigknob7;
124 Gxw::Switch m_switch;
125 Gxw::Switch m_switch1;
126 };
127
128 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_studiopre_st.lv2'
10
11 src = ['gx_studiopre_st.cpp'
12 ]
13 incl = ['../faust','../faust-generated','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_studiopre_st',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_studiopre_st_gui',
59 source = 'widget.cpp gx_studiopre_st_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_studiopre_st.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_studiopre_st.lv2', 'gx_studiopre_st.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_tremolo.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "tremolo.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_tremolo
30 {
31 private:
32 // pointer to buffer
33 float* output;
34 float* input;
35 // pointer to dsp class
36 PluginLV2* tremolo_st;
37 // private functions
38 inline void run_dsp_mono(uint32_t n_samples);
39 inline void connect_mono(uint32_t port,void* data);
40 inline void init_dsp_mono(uint32_t rate);
41 inline void connect_all_mono_ports(uint32_t port, void* data);
42 inline void activate_f();
43 inline void deactivate_f();
44 inline void clean_up();
45
46 public:
47 // LV2 Descriptor
48 static const LV2_Descriptor descriptor;
49 // static wrapper to private functions
50 static void deactivate(LV2_Handle instance);
51 static void cleanup(LV2_Handle instance);
52 static void run(LV2_Handle instance, uint32_t n_samples);
53 static void activate(LV2_Handle instance);
54 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
55 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
56 double rate, const char* bundle_path,
57 const LV2_Feature* const* features);
58 Gx_tremolo();
59 ~Gx_tremolo();
60 };
61
62 // constructor
63 Gx_tremolo::Gx_tremolo() :
64 output(NULL),
65 input(NULL),
66 tremolo_st(tremolo::plugin()) {};
67
68 // destructor
69 Gx_tremolo::~Gx_tremolo()
70 {
71 // just to be sure the plug have given free the allocated mem
72 // check if the function is valid
73 // it didn't hurd if the mem is already given free by clean_up()
74 if ( tremolo_st->activate_plugin !=0)
75 tremolo_st->activate_plugin(false, tremolo_st);
76 // delete DSP class
77 tremolo_st->delete_instance(tremolo_st);
78 };
79
80 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
81
82 void Gx_tremolo::init_dsp_mono(uint32_t rate)
83 {
84 AVOIDDENORMALS(); // init the SSE denormal protection
85 tremolo_st->set_samplerate(rate, tremolo_st); // init the DSP class
86 }
87
88 // connect the Ports used by the plug-in class
89 void Gx_tremolo::connect_mono(uint32_t port,void* data)
90 {
91 switch ((PortIndex)port)
92 {
93 case EFFECTS_OUTPUT:
94 output = static_cast<float*>(data);
95 break;
96 case EFFECTS_INPUT:
97 input = static_cast<float*>(data);
98 break;
99 default:
100 break;
101 }
102 }
103
104 void Gx_tremolo::activate_f()
105 {
106 // allocate the internal DSP mem
107 // check if the function is valid
108 if (tremolo_st->activate_plugin !=0)
109 tremolo_st->activate_plugin(true, tremolo_st);
110 }
111
112 void Gx_tremolo::deactivate_f()
113 {
114 // free the allocated internal DSP mem
115 // check if the function is valid
116 if (tremolo_st->activate_plugin !=0)
117 tremolo_st->activate_plugin(false, tremolo_st);
118 }
119
120 void Gx_tremolo::clean_up()
121 {
122 // delete the internal DSP mem
123 // check if the function is valid
124 if (tremolo_st->activate_plugin !=0)
125 tremolo_st->activate_plugin(false, tremolo_st);
126 }
127
128 void Gx_tremolo::run_dsp_mono(uint32_t n_samples)
129 {
130 tremolo_st->mono_audio(static_cast<int>(n_samples), input,
131 output, tremolo_st);
132 }
133
134 void Gx_tremolo::connect_all_mono_ports(uint32_t port, void* data)
135 {
136 // connect the Ports used by the plug-in class
137 connect_mono(port,data);
138 // connect the Ports used by the DSP class
139 tremolo_st->connect_ports(port, data, tremolo_st);
140 }
141
142 ///////////////////// STATIC CLASS FUNCTIONS /////////////////////////
143
144 LV2_Handle
145 Gx_tremolo::instantiate( const LV2_Descriptor* descriptor,
146 double rate,
147 const char* bundle_path,
148 const LV2_Feature* const* features)
149 {
150 // init the plug-in class
151 Gx_tremolo *self = new Gx_tremolo();
152 if (!self)
153 {
154 return NULL;
155 }
156
157 self->init_dsp_mono((uint32_t)rate);
158
159 return (LV2_Handle)self;
160 }
161
162 void Gx_tremolo::connect_port(LV2_Handle instance,
163 uint32_t port,
164 void* data)
165 {
166 // connect all ports
167 static_cast<Gx_tremolo*>(instance)->connect_all_mono_ports(port, data);
168 }
169
170 void Gx_tremolo::activate(LV2_Handle instance)
171 {
172 // allocate needed mem
173 static_cast<Gx_tremolo*>(instance)->activate_f();
174 }
175
176 void Gx_tremolo::run(LV2_Handle instance, uint32_t n_samples)
177 {
178 // run dsp
179 static_cast<Gx_tremolo*>(instance)->run_dsp_mono(n_samples);
180 }
181
182 void Gx_tremolo::deactivate(LV2_Handle instance)
183 {
184 // free allocated mem
185 static_cast<Gx_tremolo*>(instance)->deactivate_f();
186 }
187
188 void Gx_tremolo::cleanup(LV2_Handle instance)
189 {
190 // well, clean up after us
191 Gx_tremolo* self = static_cast<Gx_tremolo*>(instance);
192 self->clean_up();
193 delete self;
194 }
195
196 const LV2_Descriptor Gx_tremolo::descriptor =
197 {
198 GXPLUGIN_URI "#_tremolo",
199 instantiate,
200 connect_port,
201 activate,
202 run,
203 deactivate,
204 cleanup,
205 NULL
206 };
207
208 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
209
210 extern "C"
211 LV2_SYMBOL_EXPORT
212 const LV2_Descriptor*
213 lv2_descriptor(uint32_t index)
214 {
215 switch (index)
216 {
217 case 0:
218 return &Gx_tremolo::descriptor;
219 default:
220 return NULL;
221 }
222 }
223
224 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_tremolo"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_tremolo#gui"
28
29 typedef enum
30 {
31 WET_DRY,
32 SINE,
33 DEPTH,
34 FREQ,
35 EFFECTS_OUTPUT,
36 EFFECTS_INPUT,
37 } PortIndex;
38
39 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_tremolo>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_tremolo" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_tremolo#_tremolo>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxTremolo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_tremolo> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_tremolo#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "dry_wet" ;
54 lv2:name "Dry/Wet";
55 lv2:default 50.0 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 100.0 ;
58 ] ,[
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "mode" ;
63 lv2:name "Mode";
64 lv2:portProperty lv2:integer;
65 lv2:portProperty lv2:enumeration ;
66 lv2:default 0 ;
67 lv2:minimum 0 ;
68 lv2:maximum 1 ;
69 lv2:scalePoint [rdfs:label "triangle"; rdf:value 0];
70 lv2:scalePoint [rdfs:label "sine"; rdf:value 1];
71 ] , [
72 a lv2:InputPort ,
73 lv2:ControlPort ;
74 lv2:index 2 ;
75 lv2:symbol "depth" ;
76 lv2:name "Depth";
77 lv2:default 0.5 ;
78 lv2:minimum 0.0 ;
79 lv2:maximum 1.0 ;
80 ] , [
81 a lv2:InputPort ,
82 lv2:ControlPort ;
83 lv2:index 3 ;
84 lv2:symbol "freq" ;
85 lv2:name "Freq";
86 lv2:default 5.0 ;
87 lv2:minimum 0.1 ;
88 lv2:maximum 50.0 ;
89 ] , [
90 a lv2:AudioPort ,
91 lv2:OutputPort ;
92 lv2:index 4 ;
93 lv2:symbol "out" ;
94 lv2:name "Out" ;
95 ] , [
96 a lv2:AudioPort ,
97 lv2:InputPort ;
98 lv2:index 5 ;
99 lv2:symbol "in" ;
100 lv2:name "In" ;
101 ].
102
103 <http://guitarix.sourceforge.net/plugins/gx_tremolo#gui>
104 a guiext:GtkUI;
105 guiext:binary <gx_tremolo_gui.so>;
106 guiext:requiredFeature guiext:makeResident .
107
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_tremolo.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_tremoloGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_tremoloGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_tremoloGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_tremoloGUI () {};
56 ~Gx_tremoloGUI () {};
57 } ;
58
59 void Gx_tremoloGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_tremoloGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_tremolo_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_tremolo_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_tremoloGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_tremolo#_tremolo", plugin_uri) == 0)
161 {
162 plug_name = "_tremolo";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_tremolo";
168 }
169 }
170
171 GtkWidget* Gx_tremoloGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_tremoloGUI* self = new Gx_tremoloGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_tremoloGUI *pluginGui = static_cast<Gx_tremoloGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_tremoloGUI *self = static_cast<Gx_tremoloGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_tremolo#_tremolo>
23 a lv2:Plugin ;
24 lv2:binary <gx_tremolo.so> ;
25 rdfs:seeAlso <gx_tremolo.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_tremolo#_tremolo>
23 a lv2:Plugin ;
24 lv2:binary <gx_tremolo@LIB_EXT@> ;
25 rdfs:seeAlso <gx_tremolo.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case WET_DRY:
38 return &m_bigknob;
39 case SINE:
40 return &m_selector;
41 case DEPTH:
42 return &m_smallknob4;
43 case FREQ:
44 return &m_smallknob5;
45 default:
46 return NULL;
47 }
48 }
49
50 Widget::Widget(Glib::ustring plugname):
51 plug_name(plugname)
52 {
53 // create controllers for port name
54 Glib::ustring modes[] = {"triangle","sine"};
55 static const size_t _size = sizeof(modes) / sizeof(modes[0]);
56 make_selector("Tremolo Mode", modes, _size, 0, 1.0, SINE);
57 make_controller_box(&m_vbox2, "dry/wet", 0, 100, 1, WET_DRY);
58 make_controller_box(&m_vbox3, "depth", 0, 1, 0.01, DEPTH);
59 make_controller_box(&m_vbox4, "freq", 0.1, 50, 0.1, FREQ);
60 m_vbox4.pack_start(m_selector, Gtk::PACK_SHRINK);
61
62 // set propertys for the main paintbox holding the skin
63 m_paintbox.set_border_width(10);
64 m_paintbox.set_spacing(6);
65 m_paintbox.set_homogeneous(false);
66 m_paintbox.set_name(plug_name);
67 m_paintbox.property_paint_func() = "gxhead_expose";
68 add(m_paintbox);
69 // box for the controllers
70 m_hbox_.set_spacing(64);
71 m_hbox_.set_border_width(5);
72 m_hbox_.set_homogeneous(false);
73 // set a vertical box in the paintbox
74 m_vbox.set_border_width(2);
75 m_vbox1.set_border_width(2);
76 m_paintbox.pack_start(m_vbox_);
77 // and controller box on top
78 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
79 // put boxed controllers into controller box
80 m_hbox_.pack_start(m_vbox,Gtk::PACK_EXPAND_PADDING);
81 m_hbox_.pack_start(m_vbox3);
82 m_hbox_.pack_start(m_vbox4);
83 m_hbox_.pack_start(m_vbox2);
84 m_hbox_.pack_start(m_vbox1,Gtk::PACK_EXPAND_PADDING);
85
86 // connect expose handler as resize handler
87 m_paintbox.signal_expose_event().connect(
88 sigc::mem_fun(this, &Widget::_expose_event), true);
89
90 set_app_paintable(true);
91 show_all();
92 }
93
94 Widget::~Widget()
95 {
96
97 }
98
99 // set borderwith for paintbox when widget resize
100 // to hold controllers in place
101 bool Widget::_expose_event(GdkEventExpose *event)
102 {
103 int x, y, width, height, depth;
104 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
105 //double_t height = m_paintbox.get_window()->get_height();
106 m_paintbox.set_border_width(height/10);
107 return false;
108 }
109
110 // create selectors from gxwmm
111 void Widget::make_selector(Glib::ustring labela,
112 Glib::ustring tables[],
113 size_t _size,
114 float min, float digits,
115 PortIndex port_name)
116 {
117 Gxw::Selector *regler = static_cast<Gxw::Selector*>
118 (get_controller_by_port(port_name));
119 if (regler)
120 {
121 float max = static_cast<float>(_size+1);
122
123 Gtk::TreeModelColumn<Glib::ustring> label;
124 Gtk::TreeModelColumnRecord rec;
125 rec.add(label);
126 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
127
128 for (uint32_t i = 0 ; i< _size; ++i) {
129 ls->append()->set_value(0, tables[i]);
130 }
131 regler->set_model(ls);
132 regler->set_has_tooltip();
133 regler->set_tooltip_text(labela);
134 regler->cp_configure("SELECTOR", labela, min, max, digits);
135 regler->set_show_value(false);
136 regler->set_name(plug_name);
137 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
138 *this, &Widget::on_value_changed), port_name));
139 }
140 }
141
142 // create stackboxes with controllers for port name
143 void Widget::make_controller_box(Gtk::Box *box,
144 Glib::ustring label,
145 float min, float max,
146 float digits,
147 PortIndex port_name)
148 {
149 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
150 get_controller_by_port(port_name));
151 if (regler)
152 {
153 Gtk::Label* pr = new Gtk::Label(label, 0);
154 pr->set_name("amplabel");
155 // use label images instead simple string labes
156 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
157 label_image += "/";
158 label_image += label;
159 label_image += "-label.png";
160 Gtk::Image *pr = new Gtk::Image(label_image);*/
161
162 Gtk::VBox* b1 = new Gtk::VBox();
163 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
164 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
165 regler->cp_configure("KNOB", label, min, max, digits);
166 regler->set_show_value(false);
167 regler->set_name(plug_name);
168 box->pack_start(*regler,Gtk::PACK_SHRINK);
169 Gtk::VBox* b2 = new Gtk::VBox();
170 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
171 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
172 *this, &Widget::on_value_changed), port_name));
173 }
174 }
175
176 // create stackboxes with switch controller for port name
177 void Widget::make_switch_box(Gtk::Box *box,
178 Glib::ustring label,
179 PortIndex port_name)
180 {
181 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
182 get_controller_by_port(port_name));
183 if (regler)
184 {
185 Gtk::Label* pr = new Gtk::Label(label, 0);
186 pr->set_name("amplabel");
187 // use label images instead simple string labes
188 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
189 label_image += "/"+plug_name+"-";
190 label_image += label;
191 label_image += "-label.png";
192 Gtk::Image *pr = new Gtk::Image(label_image);*/
193
194 regler->cp_configure("switch", label, 0, 1, 1);
195 regler->set_name(plug_name);
196 regler->set_base_name( "button" );
197 Gtk::VBox* b1 = new Gtk::VBox();
198 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
199 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
200 box->pack_start(*regler,Gtk::PACK_SHRINK);
201 Gtk::VBox* b2 = new Gtk::VBox();
202 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
203 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
204 *this, &Widget::on_value_changed), port_name));
205 }
206 }
207
208 // receive controller value changes from host and set them to controller
209 void Widget::set_value(uint32_t port_index,
210 uint32_t format,
211 const void * buffer)
212 {
213 if ( format == 0 )
214 {
215 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
216 get_controller_by_port(port_index));
217 if (regler)
218 {
219 float value = *static_cast<const float*>(buffer);
220 regler->cp_set_value(value);
221 }
222 }
223 }
224
225 // write (UI) controller value changes to the host->engine
226 void Widget::on_value_changed(uint32_t port_index)
227 {
228 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
229 get_controller_by_port(port_index));
230 if (regler)
231 {
232 float value = regler->cp_get_value();
233 write_function(controller, port_index, sizeof(float), 0,
234 static_cast<const void*>(&value));
235 }
236 }
237
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_tremolo.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox3;
82 Gtk::VBox m_vbox4;
83 Gtk::HBox m_hbox_;
84
85 Gxw::PaintBox m_paintbox;
86 Gxw::BigKnob m_bigknob;
87 Gxw::BigKnob m_smallknob4;
88 Gxw::BigKnob m_smallknob5;
89 Gxw::Selector m_selector;
90 };
91
92 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_tremolo.lv2'
10
11 src = ['gx_tremolo.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_tremolo',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_tremolo_gui',
59 source = 'widget.cpp gx_tremolo_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_tremolo.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_tremolo.lv2', 'gx_tremolo.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gx_zita_rev1.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gx_zita_rev1.cc" // dsp class generated by faust -> dsp2cc
26
27 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
28
29 class Gx_zita_rev1_stereo
30 {
31 private:
32 // internal stuff
33 float* output;
34 float* input;
35 float* output1;
36 float* input1;
37 PluginLV2* zita_rev1_st;
38 public:
39
40 inline void run_dsp_stereo(uint32_t n_samples);
41 inline void connect_stereo(uint32_t port,void* data);
42 inline void init_dsp_stereo(uint32_t rate);
43 inline void connect_all_stereo_ports(uint32_t port, void* data);
44 inline void activate_f();
45 inline void clean_up();
46 inline void deactivate_f();
47 Gx_zita_rev1_stereo();
48 ~Gx_zita_rev1_stereo();
49 };
50
51 // constructor
52 Gx_zita_rev1_stereo::Gx_zita_rev1_stereo() :
53 output(NULL),
54 input(NULL),
55 output1(NULL),
56 input1(NULL),
57 zita_rev1_st(gx_zita_rev1::plugin()) {};
58
59 // destructor
60 Gx_zita_rev1_stereo::~Gx_zita_rev1_stereo()
61 {
62 // just to be sure the plug have given free the allocated mem
63 // it didn't hurd if the mem is already given free by clean_up()
64 if (zita_rev1_st->activate_plugin !=0)
65 zita_rev1_st->activate_plugin(false, zita_rev1_st);
66 // delete DSP class
67 zita_rev1_st->delete_instance(zita_rev1_st);
68 };
69
70 ////////////////////////////// PLUG-IN CLASS FUNCTIONS ////////////////
71
72 void Gx_zita_rev1_stereo::init_dsp_stereo(uint32_t rate)
73 {
74 AVOIDDENORMALS(); // init the SSE denormal protection
75 zita_rev1_st->set_samplerate(rate, zita_rev1_st); // init the DSP class
76 }
77
78 // connect the Ports used by the plug-in class
79 void Gx_zita_rev1_stereo::connect_stereo(uint32_t port,void* data)
80 {
81 switch ((PortIndex)port)
82 {
83 case EFFECTS_OUTPUT:
84 output = static_cast<float*>(data);
85 break;
86 case EFFECTS_OUTPUT1:
87 output1 = static_cast<float*>(data);
88 break;
89 case EFFECTS_INPUT:
90 input = static_cast<float*>(data);
91 break;
92 case EFFECTS_INPUT1:
93 input1 = static_cast<float*>(data);
94 break;
95 default:
96 break;
97 }
98 }
99
100 void Gx_zita_rev1_stereo::activate_f()
101 {
102 // allocate the internal DSP mem
103 if (zita_rev1_st->activate_plugin !=0)
104 zita_rev1_st->activate_plugin(true, zita_rev1_st);
105 }
106
107 void Gx_zita_rev1_stereo::deactivate_f()
108 {
109 // allocate the internal DSP mem
110 if (zita_rev1_st->activate_plugin !=0)
111 zita_rev1_st->activate_plugin(false, zita_rev1_st);
112 }
113
114 void Gx_zita_rev1_stereo::clean_up()
115 {
116 // delete the internal DSP mem
117 if (zita_rev1_st->activate_plugin !=0)
118 zita_rev1_st->activate_plugin(false, zita_rev1_st);
119 }
120
121 void Gx_zita_rev1_stereo::run_dsp_stereo(uint32_t n_samples)
122 {
123 zita_rev1_st->stereo_audio(static_cast<int>(n_samples), input, input1,
124 output, output1, zita_rev1_st);
125 }
126
127 void Gx_zita_rev1_stereo::connect_all_stereo_ports(uint32_t port, void* data)
128 {
129 // connect the Ports used by the plug-in class
130 connect_stereo(port,data);
131 // connect the Ports used by the DSP class
132 zita_rev1_st->connect_ports(port, data, zita_rev1_st);
133 }
134
135 ///////////////////////////// LV2 defines //////////////////////////////
136
137 static LV2_Handle
138 instantiate(const LV2_Descriptor* descriptor,
139 double rate,
140 const char* bundle_path,
141 const LV2_Feature* const* features)
142 {
143 // init the plug-in class
144 Gx_zita_rev1_stereo *self = new Gx_zita_rev1_stereo();
145 if (!self)
146 {
147 return NULL;
148 }
149
150 self->init_dsp_stereo((uint32_t)rate);
151
152 return (LV2_Handle)self;
153 }
154
155 static void
156 connect_port(LV2_Handle instance,
157 uint32_t port,
158 void* data)
159 {
160 // connect all ports
161 static_cast<Gx_zita_rev1_stereo*>(instance)->connect_all_stereo_ports(port, data);
162 }
163
164 static void
165 activate(LV2_Handle instance)
166 {
167 // allocate needed mem
168 static_cast<Gx_zita_rev1_stereo*>(instance)->activate_f();
169 }
170
171 static void
172 run(LV2_Handle instance, uint32_t n_samples)
173 {
174 // run dsp
175 static_cast<Gx_zita_rev1_stereo*>(instance)->run_dsp_stereo(n_samples);
176 }
177
178 static void
179 deactivate(LV2_Handle instance)
180 {
181 // allocate needed mem
182 static_cast<Gx_zita_rev1_stereo*>(instance)->deactivate_f();
183 }
184
185 static void
186 cleanup(LV2_Handle instance)
187 {
188 // well, clean up after us
189 Gx_zita_rev1_stereo* self = static_cast<Gx_zita_rev1_stereo*>(instance);
190 self->clean_up();
191 delete self;
192 }
193
194 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
195
196 static const LV2_Descriptor descriptor =
197 {
198 GXPLUGIN_URI "#_zita_rev1_stereo",
199 instantiate,
200 connect_port,
201 activate,
202 run,
203 deactivate,
204 cleanup,
205 NULL
206 };
207
208 extern "C"
209 LV2_SYMBOL_EXPORT
210 const LV2_Descriptor*
211 lv2_descriptor(uint32_t index)
212 {
213 switch (index)
214 {
215 case 0:
216 return &descriptor;
217 default:
218 return NULL;
219 }
220 }
221
222 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo#gui"
28
29
30 typedef enum
31 {
32 LEVEL,
33 EQ2_FREQ,
34 EQ1_LEVEL,
35 EQ1_FREQ,
36 IN_DELAY,
37 LOW_RT60,
38 LF_X,
39 HF_DAMPING,
40 MID_RT60,
41 DRY_WET_MIX,
42 EQ2_LEVEL,
43 EFFECTS_OUTPUT,
44 EFFECTS_OUTPUT1,
45 EFFECTS_INPUT,
46 EFFECTS_INPUT1,
47 } PortIndex;
48
49 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "Gx_zita_rev1_stereo" .
37
38 <http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo#_zita_rev1_stereo>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxZita_rev1-Stereo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "level" ;
54 lv2:name "LEVEL";
55 lv2:default 0.0 ;
56 lv2:minimum -70.0 ;
57 lv2:maximum 40.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "EQ2_FREQ" ;
63 lv2:name "EQ2_FREQ";
64 lv2:default 315.0 ;
65 lv2:minimum 4e+01 ;
66 lv2:maximum 2.5e+03 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "EQ1_LEVEL" ;
72 lv2:name "EQ1_LEVEL";
73 lv2:default 0.0 ;
74 lv2:minimum -15.0 ;
75 lv2:maximum 15.0 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "EQ1_FREQ" ;
81 lv2:name "EQ1_FREQ";
82 lv2:default 315.0 ;
83 lv2:minimum 4e+01 ;
84 lv2:maximum 2.5e+03 ;
85 ] , [
86 a lv2:InputPort ,
87 lv2:ControlPort ;
88 lv2:index 4 ;
89 lv2:symbol "IN_DELAY" ;
90 lv2:name "IN_DELAY";
91 lv2:default 6e+01 ;
92 lv2:minimum 2e+01 ;
93 lv2:maximum 1e+02 ;
94 ] , [
95 a lv2:InputPort ,
96 lv2:ControlPort ;
97 lv2:index 5 ;
98 lv2:symbol "LOW_RT60" ;
99 lv2:name "LOW_RT60";
100 lv2:default 3.0 ;
101 lv2:minimum 1.0 ;
102 lv2:maximum 8.0 ;
103 ] , [
104 a lv2:InputPort ,
105 lv2:ControlPort ;
106 lv2:index 6 ;
107 lv2:symbol "LF_X" ;
108 lv2:name "LF_X";
109 lv2:default 2e+02 ;
110 lv2:minimum 5e+01 ;
111 lv2:maximum 1e+03 ;
112 ] , [
113 a lv2:InputPort ,
114 lv2:ControlPort ;
115 lv2:index 7 ;
116 lv2:symbol "HF_DAMPING" ;
117 lv2:name "HF_DAMPING";
118 lv2:default 6e+03 ;
119 lv2:minimum 1.5e+03 ;
120 lv2:maximum 2.352e+04 ;
121 ] , [
122 a lv2:InputPort ,
123 lv2:ControlPort ;
124 lv2:index 8 ;
125 lv2:symbol "MID_RT60" ;
126 lv2:name "MID_RT60";
127 lv2:default 2.0 ;
128 lv2:minimum 1.0 ;
129 lv2:maximum 8.0 ;
130 ] , [
131 a lv2:InputPort ,
132 lv2:ControlPort ;
133 lv2:index 9 ;
134 lv2:symbol "DRY_WET_MIX" ;
135 lv2:name "DRY_WET_MIX";
136 lv2:default 0.0 ;
137 lv2:minimum -1.0 ;
138 lv2:maximum 1.0 ;
139 ] , [
140 a lv2:InputPort ,
141 lv2:ControlPort ;
142 lv2:index 10 ;
143 lv2:symbol "EQ2_LEVEL" ;
144 lv2:name "EQ2_LEVEL";
145 lv2:default 0.0 ;
146 lv2:minimum -15.0 ;
147 lv2:maximum 15.0 ;
148 ] , [
149 a lv2:AudioPort ,
150 lv2:OutputPort ;
151 lv2:index 11 ;
152 lv2:symbol "out" ;
153 lv2:name "Out"
154 ] , [
155 a lv2:AudioPort ,
156 lv2:OutputPort ;
157 lv2:index 12 ;
158 lv2:symbol "out1" ;
159 lv2:name "Out1"
160 ] , [
161 a lv2:AudioPort ,
162 lv2:InputPort ;
163 lv2:index 13 ;
164 lv2:symbol "in" ;
165 lv2:name "In" ;
166 ], [
167 a lv2:AudioPort ,
168 lv2:InputPort ;
169 lv2:index 14 ;
170 lv2:symbol "in1" ;
171 lv2:name "In1" ;
172 ].
173
174 <http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo#gui>
175 a guiext:GtkUI;
176 guiext:binary <gx_zita_rev1_gui.so>;
177 guiext:requiredFeature guiext:makeResident .
178
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gx_zita_rev1.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gx_zita_rev1_stereoGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(Gx_zita_rev1_stereoGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(Gx_zita_rev1_stereoGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 Gx_zita_rev1_stereoGUI () {};
56 ~Gx_zita_rev1_stereoGUI () {};
57 } ;
58
59 void Gx_zita_rev1_stereoGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " stock['button_on'] = {{'"
75 "echo-switch_on.png'}}\n"
76 " stock['button_off'] = {{'"
77 "echo-switch_off.png'}}\n"
78 " }\n"
79 "widget '*.";
80 addKnob += plug_name;
81 addKnob += "' style 'gx_";
82 addKnob += plug_name;
83 addKnob += "_dark_skin_icons' \n"
84 "class '*GxToggleImage' style'gx_";
85 addKnob += plug_name;
86 addKnob += "_dark_skin_icons' \n";
87 }
88
89 void Gx_zita_rev1_stereoGUI::set_skin()
90 {
91 Glib::ustring toparse = "pixmap_path ";
92 toparse += " '";
93 toparse += GX_LV2_STYLE_DIR;
94 toparse += "/'\n";
95 toparse += "style \"gx_";
96 toparse += plug_name;
97 toparse += "_dark-paintbox\"\n"
98 " { \n"
99 "GxPaintBox::skin-gradient = {\n"
100 "{ 65536, 0, 0, 13107, 52428 }, \n"
101 "{ 52428, 0, 0, 0, 52428 },\n"
102 "{ 13107, 0, 0, 13107, 13107 }}\n"
103 " GxPaintBox::icon-set =11\n"
104 " }\n"
105 "\n"
106 "style 'gx_head_tremolo_box' \n"
107 " { \n"
108 " fg[NORMAL] = '#c0c6d0' \n"
109 "font_name = 'sans 7.5 bold' \n"
110 " }\n";
111 toparse += addKnob;
112
113 toparse += " widget '*.amplabel' style:highest 'gx_head_tremolo_box'\n"
114 "widget '*.";
115 toparse += plug_name;
116 toparse += "' style 'gx_";
117 toparse += plug_name;
118 toparse += "_dark-paintbox' ";
119 toparse += " style 'gx_selector_";
120 toparse += plug_name;
121 toparse += "'\n"
122 " {\n"
123 " fg[NORMAL] = '#c0c6d0'\n"
124 " GtkRange::trough-border = 2\n"
125 " GtkRange::stepper-size = 8\n"
126 " GtkRange::stepper-spacing = 2\n"
127 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
128 " font_name = 'sans 7.5'\n"
129 " xthickness = 10\n"
130 " ythickness = 1\n"
131 " }\n"
132 "widget '*.";
133 toparse += plug_name;
134 toparse += "' style:highest 'gx_selector_";
135 toparse += plug_name;
136 toparse += "'\n";
137 toparse += "style 'gx_switch'\n"
138 "{\n"
139 "xthickness = 0\n"
140 "ythickness = 0\n"
141 "GtkButton::inner-border = {0, 0, 0, 0}\n"
142 "GtkButton::default-border = {0, 0, 0, 0}\n"
143 "GtkButton::focus-line-width = 0\n"
144 "GtkButton::focus-padding = 0\n"
145 "GtkButton::interior-focus = 0\n"
146 "GtkButton::child-displacement-x = 0\n"
147 "GtkButton::child-displacement-y = 0\n"
148 " }\n"
149 "widget '*.";
150 toparse += plug_name;
151 toparse += "' style:highest 'gx_switch'";
152
153 gtk_rc_parse_string (toparse.c_str());
154 }
155
156 void Gx_zita_rev1_stereoGUI::set_plug_name( const char * plugin_uri)
157 {
158 addKnob = "";
159
160 if (strcmp("http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo#_zita_rev1_stereo", plugin_uri) == 0)
161 {
162 plug_name = "_zita_rev1_stereo";
163 set_knob("nk-knob");
164 }
165 else
166 {
167 plug_name = "_zita_rev1_stereo";
168 }
169 }
170
171 GtkWidget* Gx_zita_rev1_stereoGUI::make_gui()
172 {
173 // init the gxwmm library
174 Gxw::init();
175 set_skin();
176 GtkWidget* container = gtk_vbox_new(FALSE, 2);
177 widget = new Widget(plug_name);
178 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
179 gtk_container_add(GTK_CONTAINER(container), cWidget );
180
181 return container;
182 }
183
184
185 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
186 const char * plugin_uri,
187 const char * bundle_path,
188 LV2UI_Write_Function write_function,
189 LV2UI_Controller controller,
190 LV2UI_Widget * widget,
191 const LV2_Feature * const * features)
192 {
193 Gx_zita_rev1_stereoGUI* self = new Gx_zita_rev1_stereoGUI();
194 if (self == NULL) return NULL;
195 self->set_plug_name_static(self, plugin_uri);
196 *widget = (LV2UI_Widget)self->make_gui_static(self);
197 self->widget->controller = controller;
198 self->widget->write_function = write_function;
199 return (LV2UI_Handle)self;
200 }
201
202 static void cleanup(LV2UI_Handle ui)
203 {
204 Gx_zita_rev1_stereoGUI *pluginGui = static_cast<Gx_zita_rev1_stereoGUI*>(ui);
205 delete pluginGui->widget;
206 delete pluginGui;
207 }
208
209 static void port_event(LV2UI_Handle ui,
210 uint32_t port_index,
211 uint32_t buffer_size,
212 uint32_t format,
213 const void * buffer)
214 {
215 Gx_zita_rev1_stereoGUI *self = static_cast<Gx_zita_rev1_stereoGUI*>(ui);
216 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
217 return;
218 }
219
220 static LV2UI_Descriptor descriptors[] =
221 {
222 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
223 };
224
225 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
226 {
227 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
228 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
229 {
230 return NULL;
231 }
232 return descriptors + index;
233 }
234
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo#_zita_rev1_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_zita_rev1.so> ;
25 rdfs:seeAlso <gx_zita_rev1.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gx_zita_rev1_stereo#_zita_rev1_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gx_zita_rev1@LIB_EXT@> ;
25 rdfs:seeAlso <gx_zita_rev1.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32
33 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
34 {
35 switch ((PortIndex)port_index )
36 {
37 case LEVEL:
38 return &m_bigknob;
39 case EQ2_FREQ:
40 return &m_bigknob1;
41 case EQ1_LEVEL:
42 return &m_smallknob3;
43 case EQ1_FREQ:
44 return &m_smallknob4;
45 case IN_DELAY:
46 return &m_smallknob5;
47 case LOW_RT60:
48 return &m_smallknob6;
49 case LF_X:
50 return &m_smallknob7;
51 case HF_DAMPING:
52 return &m_smallknob8;
53 case MID_RT60:
54 return &m_smallknob9;
55 case DRY_WET_MIX:
56 return &m_smallknob10;
57 case EQ2_LEVEL:
58 return &m_smallknob11;
59 default:
60 return NULL;
61 }
62 }
63
64 Widget::Widget(Glib::ustring plugname):
65 plug_name(plugname)
66 {
67 // create controllers for port name
68 m_fr5.set_label("In");
69 m_fr5.add(m_vbox2);
70 make_controller_box(&m_vbox2, "DELAY", 2e+01, 1e+02, 1.0 , IN_DELAY);
71
72 m_fr1.set_label("EQ2");
73 m_fr1.add(m_vbox3);
74 make_controller_box(&m_vbox3, "LEVEL", -1.0, 1.0, 0.01 , EQ2_LEVEL);
75 make_controller_box(&m_vbox3, "FREQ", 4e+01, 2.5e+03, 1.0 , EQ2_FREQ);
76
77 m_fr2.set_label("EQ1");
78 m_fr2.add(m_vbox4);
79 make_controller_box(&m_vbox4, "LEVEL", -15.0, 15.0, 0.1, EQ1_LEVEL);
80 make_controller_box(&m_vbox4, "FREQ", 4e+01, 2.5e+03, 1.0 , EQ1_FREQ);
81
82 m_fr3.set_label("Reverb Time T60");
83 m_fr3.add(m_hbox1);
84 m_hbox1.add(m_vbox5);
85 m_hbox1.add(m_vbox6);
86 make_controller_box(&m_vbox5, "LOW", 1.0, 8.0, 0.1, LOW_RT60);
87 make_controller_box(&m_vbox5, "MID", 1.0, 8.0, 0.1 , MID_RT60);
88 make_controller_box(&m_vbox6, "FREQ X", 5e+01, 1e+03, 1.0 , LF_X);
89 make_controller_box(&m_vbox6, "DAMP", 1.5e+03, 2.352e+04, 1.0, HF_DAMPING);
90
91 m_fr4.set_label("Output");
92 m_fr4.add(m_vbox7);
93 make_controller_box(&m_vbox7, "LEVEL", -7e+01, 4e+01, 0.1, LEVEL);
94 make_controller_box(&m_vbox7, "DRY/WET", -1.0, 1.0, 0.01 , DRY_WET_MIX);
95
96 // set propertys for the main paintbox holding the skin
97 m_paintbox.set_border_width(2);
98 m_paintbox.set_spacing(6);
99 m_paintbox.set_homogeneous(false);
100 m_paintbox.set_name(plug_name);
101 m_paintbox.property_paint_func() = "gxhead_expose";
102 add(m_paintbox);
103 // box for the controllers
104 m_hbox_.set_spacing(14);
105 m_hbox_.set_border_width(4);
106 m_hbox_.set_homogeneous(false);
107 // set a vertical box in the paintbox
108 m_vbox.set_border_width(4);
109 m_vbox1.set_border_width(4);
110 m_paintbox.pack_start(m_vbox_);
111 // and controller box on top
112 m_vbox_.pack_start(m_hbox_, Gtk::PACK_SHRINK);
113
114 // put boxed controllers into controller box
115 m_hbox_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
116 m_hbox_.pack_start(m_fr5);
117 m_hbox_.pack_start(m_fr2);
118 m_hbox_.pack_start(m_fr1);
119 m_hbox_.pack_start(m_fr3);
120 m_hbox_.pack_start(m_fr4);
121 m_hbox_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
122
123 // connect expose handler as resize handler
124 m_paintbox.signal_expose_event().connect(
125 sigc::mem_fun(this, &Widget::_expose_event), true);
126
127 set_app_paintable(true);
128 show_all();
129 }
130
131 Widget::~Widget()
132 {
133
134 }
135
136 // set borderwith for paintbox when widget resize
137 // to hold controllers in place
138 bool Widget::_expose_event(GdkEventExpose *event)
139 {
140 int x, y, width, height, depth;
141 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
142 //double_t height = m_paintbox.get_window()->get_height();
143 m_paintbox.set_border_width(height/20);
144 return false;
145 }
146
147 // create selectors from gxwmm
148 void Widget::make_selector(Glib::ustring labela,
149 Glib::ustring tables[],
150 size_t _size,
151 float min, float digits,
152 PortIndex port_name)
153 {
154 Gxw::Selector *regler = static_cast<Gxw::Selector*>
155 (get_controller_by_port(port_name));
156 if (regler)
157 {
158 float max = static_cast<float>(_size+1);
159
160 Gtk::TreeModelColumn<Glib::ustring> label;
161 Gtk::TreeModelColumnRecord rec;
162 rec.add(label);
163 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
164
165 for (uint32_t i = 0 ; i< _size; ++i) {
166 ls->append()->set_value(0, tables[i]);
167 }
168 regler->set_model(ls);
169 regler->set_has_tooltip();
170 regler->set_tooltip_text(labela);
171 regler->cp_configure("SELECTOR", labela, min, max, digits);
172 regler->set_show_value(false);
173 regler->set_name(plug_name);
174 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
175 *this, &Widget::on_value_changed), port_name));
176 }
177 }
178
179 // create stackboxes with controllers for port name
180 void Widget::make_controller_box(Gtk::Box *box,
181 Glib::ustring label,
182 float min, float max,
183 float digits,
184 PortIndex port_name)
185 {
186 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
187 get_controller_by_port(port_name));
188 if (regler)
189 {
190 Gtk::Label* pr = new Gtk::Label(label, 0);
191 pr->set_name("amplabel");
192 // use label images instead simple string labes
193 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
194 label_image += "/";
195 label_image += label;
196 label_image += "-label.png";
197 Gtk::Image *pr = new Gtk::Image(label_image);*/
198
199 Gtk::VBox* b1 = new Gtk::VBox();
200 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
201 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
202 regler->cp_configure("KNOB", label, min, max, digits);
203 regler->set_show_value(false);
204 regler->set_name(plug_name);
205 box->pack_start(*regler,Gtk::PACK_SHRINK);
206 Gtk::VBox* b2 = new Gtk::VBox();
207 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
208 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
209 *this, &Widget::on_value_changed), port_name));
210 }
211 }
212
213 // create stackboxes with switch controller for port name
214 void Widget::make_switch_box(Gtk::Box *box,
215 Glib::ustring label,
216 PortIndex port_name)
217 {
218 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
219 get_controller_by_port(port_name));
220 if (regler)
221 {
222 Gtk::Label* pr = new Gtk::Label(label, 0);
223 pr->set_name("amplabel");
224 // use label images instead simple string labes
225 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
226 label_image += "/"+plug_name+"-";
227 label_image += label;
228 label_image += "-label.png";
229 Gtk::Image *pr = new Gtk::Image(label_image);*/
230
231 regler->cp_configure("switch", label, 0, 1, 1);
232 regler->set_name(plug_name);
233 regler->set_base_name( "button" );
234 Gtk::VBox* b1 = new Gtk::VBox();
235 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
236 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
237 box->pack_start(*regler,Gtk::PACK_SHRINK);
238 Gtk::VBox* b2 = new Gtk::VBox();
239 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
240 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
241 *this, &Widget::on_value_changed), port_name));
242 }
243 }
244
245 // receive controller value changes from host and set them to controller
246 void Widget::set_value(uint32_t port_index,
247 uint32_t format,
248 const void * buffer)
249 {
250 if ( format == 0 )
251 {
252 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
253 get_controller_by_port(port_index));
254 if (regler)
255 {
256 float value = *static_cast<const float*>(buffer);
257 regler->cp_set_value(value);
258 }
259 }
260 }
261
262 // write (UI) controller value changes to the host->engine
263 void Widget::on_value_changed(uint32_t port_index)
264 {
265 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
266 get_controller_by_port(port_index));
267 if (regler)
268 {
269 float value = regler->cp_get_value();
270 write_function(controller, port_index, sizeof(float), 0,
271 static_cast<const void*>(&value));
272 }
273 }
274
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gx_zita_rev1.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox;
79 Gtk::VBox m_vbox1;
80 Gtk::VBox m_vbox2;
81 Gtk::VBox m_vbox3;
82 Gtk::VBox m_vbox4;
83 Gtk::VBox m_vbox5;
84 Gtk::VBox m_vbox6;
85 Gtk::VBox m_vbox7;
86 Gtk::VBox m_vbox8;
87 Gtk::HBox m_hbox_;
88 Gtk::HBox m_hbox1_;
89 Gtk::HBox m_hbox1;
90 Gtk::HBox m_hbox2;
91 Gtk::Frame m_fr1;
92 Gtk::Frame m_fr2;
93 Gtk::Frame m_fr3;
94 Gtk::Frame m_fr4;
95 Gtk::Frame m_fr5;
96
97 Gxw::PaintBox m_paintbox;
98 Gxw::SmallKnobR m_bigknob;
99 Gxw::SmallKnobR m_bigknob1;
100 Gxw::SmallKnobR m_smallknob3;
101 Gxw::SmallKnobR m_smallknob4;
102 Gxw::SmallKnobR m_smallknob5;
103 Gxw::SmallKnobR m_smallknob6;
104 Gxw::SmallKnobR m_smallknob7;
105 Gxw::SmallKnobR m_smallknob8;
106 Gxw::SmallKnobR m_smallknob9;
107 Gxw::SmallKnobR m_smallknob10;
108 Gxw::SmallKnobR m_smallknob11;
109 };
110
111 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gx_zita_rev1.lv2'
10
11 src = ['gx_zita_rev1.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gx_zita_rev1',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gx_zita_rev1_gui',
59 source = 'widget.cpp gx_zita_rev1_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gx_zita_rev1.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gx_zita_rev1.lv2', 'gx_zita_rev1.ttl')
69
+0
-843
src/LV2/gxamp.lv2/DSP/12AT7.cc less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 // generated by ../../tools/tube_transfer.py
20 // tube: 12AT7
21 // plate current function: triode
22 // mu: 60
23 // kx: 1.35
24 // kg1: 460
25 // kp: 300
26 // kvb: 300
27
28 table1d_imp<2001> tubetable_12AT7[2] =
29 {
30 {
31 // Ri = 68k
32 -5,5,200,2001, {
33 223.484971051,223.38189846,223.278606859,223.175096438,223.071367386,
34 222.967419894,222.863254153,222.758870355,222.654268692,222.549449358,
35 222.444412546,222.339158451,222.233687268,222.127999193,222.022094421,
36 221.915973151,221.809635579,221.703081904,221.596312324,221.489327039,
37 221.382126248,221.274710152,221.167078951,221.059232846,220.951172041,
38 220.842896736,220.734407134,220.62570344,220.516785857,220.407654588,
39 220.298309839,220.188751814,220.078980719,219.96899676,219.858800143,
40 219.748391075,219.637769762,219.526936413,219.415891235,219.304634436,
41 219.193166225,219.081486809,218.9695964,218.857495205,218.745183435,
42 218.6326613,218.519929009,218.406986775,218.293834807,218.180473316,
43 218.066902515,217.953122614,217.839133825,217.724936362,217.610530435,
44 217.495916257,217.381094042,217.266064002,217.150826349,217.035381299,
45 216.919729063,216.803869855,216.68780389,216.571531381,216.455052541,
46 216.338367587,216.22147673,216.104380187,215.987078171,215.869570897,
47 215.75185858,215.633941434,215.515819675,215.397493517,215.278963175,
48 215.160228865,215.041290801,214.922149198,214.802804272,214.683256238,
49 214.563505311,214.443551707,214.32339564,214.203037325,214.082476979,
50 213.961714816,213.840751051,213.719585899,213.598219576,213.476652297,
51 213.354884277,213.232915731,213.110746873,212.988377919,212.865809083,
52 212.74304058,212.620072625,212.496905433,212.373539217,212.249974193,
53 212.126210573,212.002248574,211.878088408,211.75373029,211.629174433,
54 211.504421051,211.379470357,211.254322565,211.128977889,211.003436541,
55 210.877698734,210.751764681,210.625634594,210.499308686,210.37278717,
56 210.246070256,210.119158158,209.992051086,209.864749253,209.737252869,
57 209.609562146,209.481677294,209.353598524,209.225326046,209.096860071,
58 208.968200809,208.839348469,208.710303261,208.581065394,208.451635077,
59 208.322012519,208.192197928,208.062191513,207.931993481,207.801604041,
60 207.671023398,207.540251762,207.409289338,207.278136334,207.146792955,
61 207.015259407,206.883535897,206.75162263,206.61951981,206.487227642,
62 206.354746332,206.222076083,206.089217099,205.956169583,205.82293374,
63 205.689509771,205.555897879,205.422098267,205.288111136,205.153936688,
64 205.019575125,204.885026646,204.750291453,204.615369746,204.480261724,
65 204.344967587,204.209487534,204.073821763,203.937970474,203.801933864,
66 203.66571213,203.52930547,203.392714081,203.255938159,203.1189779,
67 202.9818335,202.844505154,202.706993058,202.569297405,202.43141839,
68 202.293356206,202.155111047,202.016683105,201.878072574,201.739279645,
69 201.60030451,201.46114736,201.321808386,201.182287779,201.042585728,
70 200.902702422,200.762638052,200.622392806,200.481966872,200.341360438,
71 200.200573691,200.059606819,199.918460008,199.777133444,199.635627312,
72 199.493941798,199.352077087,199.210033363,199.067810809,198.92540961,
73 198.782829948,198.640072006,198.497135966,198.354022009,198.210730316,
74 198.067261068,197.923614446,197.779790629,197.635789796,197.491612126,
75 197.347257797,197.202726987,197.058019875,196.913136635,196.768077446,
76 196.622842482,196.477431919,196.331845933,196.186084697,196.040148386,
77 195.894037174,195.747751232,195.601290734,195.454655852,195.307846758,
78 195.160863622,195.013706614,194.866375906,194.718871667,194.571194065,
79 194.423343269,194.275319448,194.127122768,193.978753398,193.830211503,
80 193.681497249,193.532610803,193.383552329,193.234321992,193.084919955,
81 192.935346382,192.785601437,192.635685281,192.485598078,192.335339987,
82 192.18491117,192.034311788,191.883542,191.732601966,191.581491845,
83 191.430211795,191.278761974,191.127142539,190.975353646,190.823395453,
84 190.671268115,190.518971788,190.366506625,190.213872781,190.061070409,
85 189.908099664,189.754960697,189.60165366,189.448178705,189.294535983,
86 189.140725644,188.986747838,188.832602715,188.678290424,188.523811112,
87 188.369164928,188.214352019,188.059372531,187.904226611,187.748914404,
88 187.593436056,187.43779171,187.281981512,187.126005604,186.96986413,
89 186.813557231,186.65708505,186.500447728,186.343645406,186.186678223,
90 186.029546321,185.872249837,185.71478891,185.55716368,185.399374282,
91 185.241420854,185.083303532,184.925022452,184.766577751,184.607969561,
92 184.449198018,184.290263255,184.131165406,183.971904602,183.812480977,
93 183.652894661,183.493145785,183.33323448,183.173160876,183.012925102,
94 182.852527286,182.691967557,182.531246043,182.37036287,182.209318165,
95 182.048112054,181.886744663,181.725216116,181.563526537,181.401676051,
96 181.239664781,181.077492849,180.915160377,180.752667487,180.590014299,
97 180.427200936,180.264227515,180.101094157,179.93780098,179.774348102,
98 179.610735642,179.446963716,179.283032441,179.118941932,178.954692305,
99 178.790283676,178.625716158,178.460989865,178.29610491,178.131061407,
100 177.965859466,177.8004992,177.634980719,177.469304135,177.303469556,
101 177.137477092,176.971326852,176.805018943,176.638553475,176.471930553,
102 176.305150284,176.138212774,175.971118129,175.803866452,175.63645785,
103 175.468892424,175.301170279,175.133291517,174.965256239,174.797064548,
104 174.628716544,174.460212328,174.291551999,174.122735656,173.953763399,
105 173.784635325,173.615351532,173.445912117,173.276317175,173.106566804,
106 172.936661098,172.766600153,172.596384061,172.426012917,172.255486814,
107 172.084805844,171.9139701,171.742979672,171.571834651,171.400535128,
108 171.229081192,171.057472933,170.885710438,170.713793796,170.541723094,
109 170.36949842,170.197119859,170.024587497,169.851901419,169.679061711,
110 169.506068455,169.332921736,169.159621635,168.986168237,168.812561622,
111 168.638801872,168.464889067,168.290823288,168.116604613,167.942233123,
112 167.767708895,167.593032007,167.418202536,167.24322056,167.068086154,
113 166.892799395,166.717360356,166.541769112,166.366025738,166.190130307,
114 166.014082891,165.837883563,165.661532395,165.485029456,165.308374819,
115 165.131568552,164.954610726,164.777501409,164.60024067,164.422828575,
116 164.245265193,164.06755059,163.889684831,163.711667983,163.533500109,
117 163.355181276,163.176711545,162.998090981,162.819319646,162.640397602,
118 162.46132491,162.282101632,162.102727828,161.923203558,161.743528881,
119 161.563703855,161.383728539,161.20360299,161.023327265,160.842901421,
120 160.662325513,160.481599598,160.300723728,160.11969796,159.938522345,
121 159.757196938,159.57572179,159.394096954,159.212322481,159.030398422,
122 158.848324827,158.666101745,158.483729225,158.301207317,158.118536068,
123 157.935715525,157.752745735,157.569626745,157.3863586,157.202941345,
124 157.019375024,156.835659683,156.651795363,156.467782109,156.283619962,
125 156.099308963,155.914849155,155.730240578,155.545483271,155.360577274,
126 155.175522626,154.990319366,154.80496753,154.619467157,154.433818283,
127 154.248020943,154.062075174,153.87598101,153.689738486,153.503347636,
128 153.316808491,153.130121087,152.943285453,152.756301622,152.569169625,
129 152.381889493,152.194461254,152.006884938,151.819160575,151.631288191,
130 151.443267815,151.255099474,151.066783193,150.878318999,150.689706918,
131 150.500946973,150.312039189,150.122983589,149.933780197,149.744429035,
132 149.554930124,149.365283487,149.175489143,148.985547114,148.795457417,
133 148.605220074,148.414835102,148.224302518,148.033622341,147.842794587,
134 147.651819272,147.460696413,147.269426023,147.078008117,146.88644271,
135 146.694729815,146.502869444,146.31086161,146.118706324,145.926403598,
136 145.733953442,145.541355866,145.348610879,145.15571849,144.962678708,
137 144.76949154,144.576156994,144.382675075,144.18904579,143.995269144,
138 143.801345143,143.60727379,143.413055089,143.218689043,143.024175656,
139 142.829514928,142.634706862,142.439751458,142.244648717,142.049398638,
140 141.854001221,141.658456465,141.462764367,141.266924924,141.070938135,
141 140.874803995,140.678522501,140.482093647,140.285517428,140.088793838,
142 139.891922871,139.694904521,139.497738779,139.300425637,139.102965087,
143 138.905357119,138.707601724,138.509698892,138.311648611,138.113450871,
144 137.915105658,137.716612961,137.517972767,137.319185062,137.120249831,
145 136.921167061,136.721936735,136.522558838,136.323033353,136.123360263,
146 135.923539552,135.7235712,135.52345519,135.323191502,135.122780116,
147 134.922221012,134.72151417,134.520659568,134.319657184,134.118506996,
148 133.917208981,133.715763115,133.514169375,133.312427735,133.110538172,
149 132.908500658,132.706315168,132.503981676,132.301500154,132.098870574,
150 131.896092908,131.693167128,131.490093204,131.286871106,131.083500803,
151 130.879982266,130.676315463,130.472500361,130.268536929,130.064425133,
152 129.860164941,129.655756317,129.451199229,129.24649364,129.041639516,
153 128.836636821,128.631485518,128.426185571,128.220736941,128.015139592,
154 127.809393485,127.603498581,127.397454841,127.191262225,126.984920693,
155 126.778430205,126.57179072,126.365002195,126.158064589,125.950977859,
156 125.743741963,125.536356858,125.328822499,125.121138842,124.913305843,
157 124.705323458,124.497191639,124.288910343,124.080479522,123.87189913,
158 123.66316912,123.454289445,123.245260057,123.036080908,122.82675195,
159 122.617273133,122.407644409,122.197865728,121.987937041,121.777858298,
160 121.567629447,121.357250439,121.146721222,120.936041745,120.725211957,
161 120.514231806,120.30310124,120.091820207,119.880388654,119.668806528,
162 119.457073777,119.245190347,119.033156186,118.82097124,118.608635455,
163 118.396148777,118.183511154,117.970722531,117.757782854,117.544692069,
164 117.331450122,117.118056958,116.904512525,116.690816767,116.476969631,
165 116.262971063,116.048821008,115.834519413,115.620066224,115.405461388,
166 115.19070485,114.975796559,114.76073646,114.545524502,114.330160631,
167 114.114644796,113.898976945,113.683157025,113.467184988,113.25106078,
168 113.034784354,112.818355658,112.601774644,112.385041264,112.168155469,
169 111.951117213,111.733926449,111.516583131,111.299087215,111.081438657,
170 110.863637413,110.645683442,110.427576702,110.209317154,109.990904759,
171 109.772339479,109.553621277,109.334750119,109.115725972,108.896548803,
172 108.677218581,108.457735278,108.238098866,108.01830932,107.798366617,
173 107.578270734,107.358021653,107.137619356,106.917063827,106.696355055,
174 106.475493028,106.25447774,106.033309184,105.81198736,105.590512267,
175 105.36888391,105.147102295,104.925167434,104.703079339,104.480838028,
176 104.258443522,104.035895848,103.813195034,103.590341113,103.367334124,
177 103.14417411,102.920861118,102.697395202,102.473776418,102.250004831,
178 102.02608051,101.802003529,101.577773971,101.353391923,101.128857479,
179 100.904170741,100.679331818,100.454340825,100.229197888,100.003903138,
180 99.778456717,99.5528587734,99.3271094667,99.1012089653,98.8751574477,
181 98.6489551024,98.4226021292,98.1960987386,97.969445153,97.7426416069,
182 97.5156883471,97.2885856338,97.0613337405,96.833932955,96.6063835797,
183 96.3786859321,96.1508403457,95.9228471705,95.6947067733,95.4664195391,
184 95.2379858709,95.0094061912,94.7806809423,94.5518105871,94.3227956102,
185 94.0936365183,93.8643338415,93.6348881337,93.405299974,93.1755699676,
186 92.9456987464,92.7156869704,92.4855353287,92.2552445406,92.0248153569,
187 91.7942485605,91.5635449686,91.3327054332,91.1017308426,90.8706221232,
188 90.6393802404,90.4080062002,90.1765010512,89.9448658855,89.7131018408,
189 89.4812101019,89.2491919027,89.0170485276,88.784781314,88.5523916537,
190 88.3198809952,88.0872508458,87.8545027735,87.6216384098,87.3886594513,
191 87.1555676628,86.9223648793,86.6890530085,86.4556340339,86.2221100172,
192 85.9884831011,85.7547555124,85.5209295646,85.2870076616,85.0529923004,
193 84.8188860745,84.5846916773,84.3504119056,84.1160496633,83.8816079647,
194 83.647089939,83.4124988332,83.1778380171,82.9431109867,82.7083213689,
195 82.4734729256,82.2385695581,82.0036153116,81.7686143804,81.5335711119,
196 81.2984900118,81.0633757495,80.8282331624,80.5930672616,80.3578832372,
197 80.1226864634,79.8874825043,79.6522771191,79.417076268,79.1818861179,
198 78.946713048,78.7115636561,78.4764447639,78.2413634234,78.0063269226,
199 77.7713427919,77.5364188098,77.3015630089,77.0667836823,76.832089389,
200 76.5974889606,76.3629915064,76.1286064198,75.8943433838,75.6602123765,
201 75.4262236766,75.1923878688,74.9587158488,74.7252188281,74.4919083386,
202 74.2587962373,74.0258947099,73.7932162747,73.5607737859,73.3285804366,
203 73.0966497613,72.8649956377,72.6336322885,72.4025742822,72.1718365333,
204 71.9414343025,71.7113831952,71.4816991604,71.2523984878,71.0234978052,
205 70.7950140739,70.5669645844,70.3393669505,70.1122391024,69.8855992793,
206 69.659466021,69.4338581579,69.2087948004,68.9842953275,68.7603793738,
207 68.5370668156,68.3143777559,68.0923325085,67.8709515808,67.6502556556,
208 67.4302655713,67.2110023025,66.9924869376,66.7747406569,66.5577847094,
209 66.341640388,66.1263290049,65.9118718655,65.6982902415,65.485605344,
210 65.2738382953,65.0630101007,64.8531416195,64.644253536,64.4363663304,
211 64.2295002488,64.0236752742,63.8189110973,63.6152270868,63.4126422611,
212 63.2111752599,63.0108443162,62.8116672294,62.613661339,62.4168434988,
213 62.2212300529,62.026836812,61.8336790312,61.6417713894,61.4511279693,
214 61.2617622392,61.0736870367,60.8869145531,60.7014563202,60.5173231979,
215 60.3345253642,60.1530723064,59.9729728143,59.7942349746,59.6168661678,
216 59.4408730656,59.2662616311,59.0930371202,58.9212040837,58.7507663728,
217 58.5817271438,58.4140888665,58.2478533317,58.0830216621,57.9195943226,
218 57.757571133,57.5969512811,57.437733337,57.2799152681,57.1234944552,
219 56.9684677091,56.8148312878,56.6625809145,56.5117117958,56.3622186407,
220 56.2140956792,56.0673366819,55.9219349798,55.777883483,55.6351747015,
221 55.4938007636,55.3537534367,55.2150241456,55.0776039925,54.9414837759,
222 54.8066540091,54.6731049389,54.5408265635,54.4098086506,54.2800407545,
223 54.1515122329,54.0242122639,53.8981298612,53.7732538906,53.6495730842,
224 53.5270760555,53.4057513131,53.2855872745,53.166572279,53.0486945999,
225 52.9319424571,52.816304028,52.7017674586,52.5883208741,52.4759523889,
226 52.3646501157,52.2544021747,52.1451967025,52.0370218595,51.9298658379,
227 51.8237168688,51.718563229,51.6143932475,51.5111953109,51.4089578697,
228 51.3076694432,51.2073186239,51.1078940829,51.0093845734,50.9117789348,
229 50.815066096,50.7192350793,50.6242750025,50.5301750825,50.4369246372,
230 50.3445130879,50.2529299611,50.1621648909,50.0722076197,49.9830480004,
231 49.894675997,49.8070816859,49.7202552566,49.6341870125,49.5488673716,
232 49.4642868666,49.3804361451,49.2973059702,49.2148872203,49.1331708887,
233 49.052148084,48.9718100296,48.892148063,48.8131536359,48.7348183134,
234 48.6571337734,48.5800918059,48.5036843125,48.4279033056,48.3527409073,
235 48.2781893488,48.2042409693,48.1308882153,48.0581236393,47.9859398991,
236 47.9143297565,47.8432860762,47.772801825,47.7028700705,47.6334839797,
237 47.5646368183,47.4963219495,47.4285328322,47.3612630208,47.2945061629,
238 47.2282559993,47.1625063616,47.0972511721,47.0324844415,46.9682002687,
239 46.9043928391,46.8410564231,46.7781853756,46.7157741343,46.6538172188,
240 46.5923092291,46.5312448446,46.4706188231,46.4104259995,46.3506612843,
241 46.2913196632,46.2323961953,46.1738860123,46.1157843173,46.0580863839,
242 46.0007875547,45.9438832405,45.8873689195,45.8312401357,45.7754924981,
243 45.7201216798,45.665123417,45.6104935076,45.5562278108,45.5023222456,
244 45.4487727904,45.3955754813,45.3427264119,45.2902217321,45.238057647,
245 45.1862304162,45.1347363532,45.0835718238,45.0327332461,44.982217089,
246 44.9320198716,44.8821381626,44.8325685792,44.7833077865,44.7343524964,
247 44.6856994674,44.6373455033,44.5892874528,44.5415222087,44.4940467071,
248 44.4468579267,44.3999528883,44.3533286537,44.3069823257,44.2609110467,
249 44.2151119985,44.1695824018,44.124319515,44.0793206341,44.034583092,
250 43.9901042576,43.9458815358,43.9019123661,43.8581942231,43.8147246147,
251 43.7715010829,43.728521202,43.6857825789,43.6432828524,43.6010196926,
252 43.5589908004,43.5171939069,43.4756267733,43.4342871901,43.3931729766,
253 43.3522819807,43.3116120784,43.2711611731,43.2309271955,43.1909081027,
254 43.1511018785,43.1115065323,43.0721200993,43.0329406393,42.9939662373,
255 42.9551950023,42.9166250673,42.878254589,42.8400817471,42.8021047443,
256 42.7643218057,42.7267311786,42.6893311322,42.6521199569,42.6150959646,
257 42.5782574877,42.5416028795,42.5051305131,42.4688387817,42.4327260982,
258 42.3967908945,42.3610316219,42.32544675,42.2900347672,42.2547941799,
259 42.2197235125,42.184821307,42.1500861227,42.1155165361,42.0811111406,
260 42.0468685461,42.0127873789,41.9788662816,41.9451039126,41.9114989459,
261 41.8780500709,41.8447559925,41.8116154303,41.7786271187,41.7457898069,
262 41.7131022583,41.6805632504,41.6481715748,41.6159260367,41.5838254549,
263 41.5518686617,41.5200545023,41.4883818353,41.4568495316,41.4254564751,
264 41.394201562,41.3630837008,41.3321018122,41.3012548286,41.2705416944,
265 41.2399613655,41.2095128092,41.1791950042,41.1490069403,41.1189476183,
266 41.0890160496,41.0592112567,41.0295322723,40.9999781396,40.970547912,
267 40.9412406531,40.9120554366,40.8829913457,40.8540474735,40.8252229228,
268 40.7965168056,40.7679282435,40.7394563671,40.7111003161,40.6828592393,
269 40.6547322942,40.626718647,40.5988174728,40.5710279548,40.5433492849,
270 40.5157806631,40.4883212976,40.4609704049,40.433727209,40.4065909422,
271 40.3795608443,40.3526361629,40.3258161531,40.2991000774,40.2724872058,
272 40.2459768155,40.2195681909,40.1932606236,40.1670534118,40.1409458612,
273 40.114937284,40.089026999,40.063214332,40.0374986152,40.0118791874,
274 39.9863553935,39.9609265851,39.9355921199,39.9103513619,39.8852036809,
275 39.8601484532,39.8351850605,39.8103128908,39.7855313379,39.7608398011,
276 39.7362376854,39.7117244017,39.6872993662,39.6629620004,39.6387117317,
277 39.6145479924,39.5904702202,39.5664778582,39.5425703542,39.5187471617,
278 39.4950077387,39.4713515484,39.447778059,39.4242867434,39.4008770793,
279 39.3775485493,39.3543006404,39.3311328446,39.3080446582,39.2850355821,
280 39.2621051218,39.2392527869,39.2164780918,39.193780555,39.1711596991,
281 39.1486150512,39.1261461426,39.1037525085,39.0814336882,39.0591892253,
282 39.0370186672,39.0149215651,38.9928974745,38.9709459543,38.9490665676,
283 38.9272588811,38.9055224652,38.883856894,38.8622617454,38.8407366006,
284 38.8192810448,38.7978946663,38.7765770572,38.7553278128,38.7341465321,
285 38.7130328173,38.6919862739,38.6710065108,38.6500931402,38.6292457774,
286 38.608464041,38.5877475528,38.5670959377,38.5465088236,38.5259858415,
287 38.5055266257,38.485130813,38.4647980436,38.4445279604,38.4243202094,
288 38.4041744393,38.3840903017,38.3640674511,38.3441055447,38.3242042424,
289 38.3043632069,38.2845821037,38.2648606009,38.2451983691,38.2255950817,
290 38.2060504147,38.1865640465,38.1671356581,38.1477649333,38.1284515578,
291 38.1091952204,38.0899956119,38.0708524256,38.0517653574,38.0327341052,
292 38.0137583696,37.9948378534,37.9759722615,37.9571613012,37.9384046823,
293 37.9197021164,37.9010533177,37.8824580021,37.8639158882,37.8454266964,
294 37.8269901493,37.8086059716,37.7902738901,37.7719936336,37.753764933,
295 37.7355875212,37.717461133,37.6993855054,37.6813603772,37.6633854891,
296 37.6454605838,37.6275854059,37.6097597018,37.59198322,37.5742557106,
297 37.5565769256,37.5389466189,37.521364546,37.5038304645,37.4863441334,
298 37.4689053137,37.4515137681,37.4341692609,37.4168715581,37.3996204275,
299 37.3824156386,37.3652569623,37.3481441714,37.3310770401,37.3140553445,
300 37.297078862,37.2801473717,37.2632606542,37.2464184918,37.2296206681,
301 37.2128669684,37.1961571795,37.1794910896,37.1628684884,37.1462891671,
302 37.1297529184,37.1132595362,37.0968088162,37.0804005552,37.0640345515,
303 37.0477106048,37.0314285162,37.0151880881,36.9989891244,36.9828314301,
304 36.9667148116,36.9506390768,36.9346040347,36.9186094956,36.9026552713,
305 36.8867411745,36.8708670195,36.8550326217,36.8392377978,36.8234823655,
306 36.807766144,36.7920889536,36.7764506158,36.7608509532,36.7452897896,
307 36.7297669502,36.714282261,36.6988355493,36.6834266436,36.6680553734,
308 36.6527215694,36.6374250634,36.6221656883,36.606943278,36.5917576675,
309 36.5766086929,36.5614961915,36.5464200014,36.5313799619,36.5163759132,
310 36.5014076967,36.4864751547,36.4715781305,36.4567164685,36.4418900139,
311 36.4270986131,36.4123421134,36.3976203629,36.382933211,36.3682805076,
312 36.353662104,36.3390778522,36.324527605,36.3100112165,36.2955285412,
313 36.2810794351,36.2666637545,36.252281357,36.237932101,36.2236158457,
314 36.2093324512,36.1950817784,36.1808636892,36.1666780462,36.152524713,
315 36.1384035538,36.1243144338,36.1102572191,36.0962317763,36.0822379733,
316 36.0682756782,36.0543447604,36.0404450898,36.0265765373,36.0127389743,
317 35.9989322732,35.9851563071,35.9714109499,35.957696076,35.944011561,
318 35.9303572808,35.9167331123,35.903138933,35.8895746213,35.8760400561,
319 35.8625351171,35.8490596847,35.8356136401,35.822196865,35.808809242,
320 35.7954506543,35.7821209857,35.7688201207,35.7555479447,35.7423043434,
321 35.7290892035,35.715902412,35.7027438569,35.6896134267,35.6765110104,
322 35.663436498,35.6503897796,35.6373707465,35.6243792901,35.6114153029,
323 35.5984786777,35.5855693079,35.5726870876,35.5598319116,35.5470036751,
324 35.534202274,35.5214276048,35.5086795644,35.4959580506,35.4832629614,
325 35.4705941957,35.4579516528,35.4453352325,35.4327448353,35.4201803622,
326 35.4076417148,35.3951287951,35.3826415057,35.3701797498,35.3577434311,
327 35.3453324539,35.3329467228,35.3205861432,35.3082506207,35.2959400619,
328 35.2836543733,35.2713934625,35.2591572371,35.2469456055,35.2347584766,
329 35.2225957595,35.2104573643,35.198343201,35.1862531805,35.174187214,
330 35.1621452133,35.1501270905,35.1381327583,35.1261621298,35.1142151186,
331 35.1022916388,35.0903916048,35.0785149317,35.0666615348,35.0548313299,
332 35.0430242335,35.0312401621,35.0194790329,35.0077407637,34.9960252724,
333 34.9843324774,34.9726622977,34.9610146526,34.9493894618,34.9377866455,
334 34.9262061242,34.9146478189,34.903111651,34.8915975423,34.880105415,
335 34.8686351915,34.8571867951,34.845760149,34.8343551769,34.8229718032,
336 34.8116099522,34.800269549,34.7889505189,34.7776527876,34.7663762811,
337 34.7551209259,34.7438866488,34.732673377,34.7214810381,34.7103095599,
338 34.6991588708,34.6880288994,34.6769195746,34.665830826,34.654762583,
339 34.6437147759,34.632687335,34.6216801911,34.6106932752,34.5997265188,
340 34.5887798536,34.5778532119,34.5669465259,34.5560597285,34.5451927529,
341 34.5343455323,34.5235180007,34.5127100921,34.5019217408,34.4911528817,
342 34.4804034497,34.4696733802,34.458962609,34.4482710719,34.4375987053,
343 34.4269454458,34.4163112303,34.405695996,34.3950996804,34.3845222213,
344 34.373963557,34.3634236256,34.3529023661,34.3423997173,34.3319156186,
345 34.3214500095,34.3110028299,34.30057402,34.2901635202,34.2797712711,
346 34.2693972139,34.2590412897,34.2487034402,34.2383836071,34.2280817325,
347 34.2177977589,34.2075316288,34.1972832853,34.1870526713,34.1768397305,
348 34.1666444064,34.1564666431,34.1463063848,34.1361635759,34.1260381613,
349 34.1159300859,34.1058392949,34.0957657339,34.0857093486,34.075670085,
350 34.0656478894,34.0556427083,34.0456544884,34.0356831767,34.0257287205,
351 34.0157910671,34.0058701643,33.9959659601,33.9860784026,33.9762074403,
352 33.9663530217,33.9565150959,33.9466936118,33.9368885189,33.9270997666,
353 33.9173273049,33.9075710837,33.8978310533,33.8881071641,33.8783993668,
354 33.8687076124,33.8590318519,33.8493720367,33.8397281184,33.8301000487,
355 33.8204877797,33.8108912635,33.8013104526,33.7917452996,33.7821957572,
356 33.7726617786,33.763143317,33.7536403258,33.7441527588,33.7346805697,
357 33.7252237126,33.7157821418,33.7063558118,33.6969446771,33.6875486927,
358 33.6781678136,33.6688019951,33.6594511925,33.6501153616,33.6407944581,
359 33.631488438,33.6221972577,33.6129208733,33.6036592416,33.5944123194,
360 33.5851800634,33.575962431,33.5667593793,33.5575708659,33.5483968486,
361 33.539237285,33.5300921334,33.5209613518,33.5118448987,33.5027427327,
362 33.4936548125,33.484581097,33.4755215454,33.4664761168,33.4574447707,
363 33.4484274668,33.4394241647,33.4304348245,33.4214594063,33.4124978703,
364 33.403550177,33.3946162869,33.3856961609,33.3767897599,33.367897045,
365 33.3590179775,33.3501525187,33.3413006302,33.3324622739,33.3236374115,
366 33.3148260051,33.3060280169,33.2972434094,33.2884721449,33.2797141863,
367 33.2709694962,33.2622380377,33.2535197739,33.2448146681,33.2361226837,
368 33.2274437842,33.2187779335,33.2101250953,33.2014852337,33.1928583128,
369 33.184244297,33.1756431507,33.1670548384,33.158479325,33.1499165753,
370 33.1413665542,33.1328292271,33.124304559,33.1157925156,33.1072930624,
371 33.098806165,33.0903317894,33.0818699015,33.0734204674,33.0649834534,
372 33.0565588258,33.0481465513,33.0397465963,33.0313589278,33.0229835126,
373 33.0146203178,33.0062693106,32.9979304582,32.989603728,32.9812890877,
374 32.972986505,32.9646959476,32.9564173834,32.9481507806,32.9398961073,
375 32.9316533318,32.9234224226,32.9152033482,32.9069960773,32.8988005787,
376 32.8906168214,32.8824447742,32.8742844065,32.8661356875,32.8579985866,
377 32.8498730732,32.8417591171,32.833656688,32.8255657557,32.8174862902,
378 32.8094182617,32.8013616402,32.7933163962,32.7852825001,32.7772599223,
379 32.7692486337,32.7612486048,32.7532598067,32.7452822103,32.7373157867,
380 32.7293605071,32.7214163428,32.7134832652,32.705561246,32.6976502567,
381 32.689750269,32.6818612548,32.6739831862,32.666116035,32.6582597736,
382 32.6504143741,32.6425798089,32.6347560506,32.6269430716,32.6191408447,
383 32.6113493427,32.6035685384,32.5957984048,32.588038915,32.5802900421,
384 32.5725517595,32.5648240406,32.5571068587,32.5494001875,32.5417040007,
385 32.5340182719,32.5263429752,32.5186780844,32.5110235735,32.5033794168,
386 32.4957455885,32.4881220628,32.4805088143,32.4729058175,32.4653130469,
387 32.4577304774,32.4501580835,32.4425958404,32.4350437229,32.4275017061,
388 32.4199697652,32.4124478754,32.404936012,32.3974341505,32.3899422665,
389 32.3824603354,32.374988333,32.3675262351,32.3600740175,32.3526316561,
390 32.3451991271,32.3377764065,32.3303634705,32.3229602955,32.3155668577,
391 32.3081831337,32.3008091,32.2934447331,32.2860900099,32.2787449071,
392 32.2714094015,32.2640834702,32.2567670901,32.2494602383,32.2421628922,
393 32.2348750288,32.2275966256,32.22032766,32.2130681096,32.2058179518,
394 32.1985771644,32.1913457251,32.1841236118,32.1769108022,32.1697072745,
395 32.1625130066,32.1553279767,32.148152163,32.1409855437,32.1338280972,
396 32.126679802,32.1195406365,32.1124105793,32.1052896091,32.0981777045,
397 32.0910748445,32.0839810077,32.0768961733,32.0698203201,32.0627534273,
398 32.0556954741,32.0486464396,32.0416063031,32.0345750441,32.0275526419,
399 32.020539076,32.0135343261,32.0065383718,31.9995511928,31.9925727688,
400 31.9856030797,31.9786421055,31.9716898261,31.9647462215,31.957811272,
401 31.9508849576,31.9439672587,31.9370581555,31.9301576284,31.9232656579,
402 31.9163822245,31.9095073088,31.9026408914,31.895782953,31.8889334744,
403 31.8820924364,31.87525982,31.8684356061,31.8616197757,31.8548123099,
404 31.8480131899,31.8412223968,31.834439912,31.8276657168,31.8208997926,
405 31.8141421208,31.8073926829,31.8006514606,31.7939184355,31.7871935893,
406 31.7804769038,31.7737683607,31.7670679419,31.7603756294,31.7536914052,
407 31.7470152514,31.74034715,31.7336870832,31.7270350332,31.7203909824,
408 31.7137549131,31.7071268077,31.7005066486,31.6938944183,31.6872900995,
409 31.6806936748,31.6741051267,31.6675244382,31.6609515919,31.6543865707,
410 31.6478293576,31.6412799354,31.6347382873,31.6282043961,31.6216782452,
411 31.6151598176,31.6086490966,31.6021460655,31.5956507075,31.5891630062,
412 31.5826829449,31.576210507,31.5697456763,31.5632884362,31.5568387704,
413 31.5503966626,31.5439620966,31.5375350561,31.5311155251,31.5247034874,
414 31.5182989269,31.5119018277,31.5055121739,31.4991299494,31.4927551386,
415 31.4863877255,31.4800276945,31.4736750299,31.4673297159,31.4609917371,
416 31.4546610778,31.4483377225,31.4420216558,31.4357128623,31.4294113266,
417 31.4231170334,31.4168299674,31.4105501135,31.4042774564,31.398011981,
418 31.3917536723,31.3855025152,31.3792584947,31.3730215959,31.3667918039,
419 31.3605691038,31.3543534809,31.3481449203,31.3419434074,31.3357489276,
420 31.329561466,31.3233810083,31.3172075399,31.3110410462,31.3048815128,
421 31.2987289254,31.2925832695,31.2864445309,31.2803126952,31.2741877483,
422 31.2680696759,31.261958464,31.2558540983,31.249756565,31.2436658498,
423 31.2375819389,31.2315048184,31.2254344742,31.2193708927,31.2133140599,
424 31.2072639622,31.2012205857,31.1951839169,31.189153942,31.1831306474,
425 31.1771140197,31.1711040452,31.1651007105,31.1591040022,31.1531139068,
426 31.1471304109,31.1411535014,31.1351831648,31.1292193879,31.1232621575,
427 31.1173114605,31.1113672838,31.1054296141,31.0994984385,31.0935737441,
428 31.0876555177,31.0817437464,31.0758384175,31.0699395179,31.0640470349,
429 31.0581609557,31.0522812675,31.0464079577,31.0405410135,31.0346804223,
430 31.0288261716,31.0229782487,31.0171366411,31.0113013363,31.0054723219,
431 30.9996495855,30.9938331146,30.988022897,30.9822189203,30.9764211722,
432 30.9706296405,30.9648443129,30.9590651774,30.9532922218,30.9475254339,
433 30.9417648017
434 }
435 },
436 {
437 // Ri = 250k
438 -5,5,200,2001, {
439 223.484971051,223.38189846,223.278606859,223.175096438,223.071367386,
440 222.967419894,222.863254153,222.758870355,222.654268692,222.549449358,
441 222.444412546,222.339158451,222.233687268,222.127999193,222.022094421,
442 221.915973151,221.809635579,221.703081904,221.596312324,221.489327039,
443 221.382126248,221.274710152,221.167078951,221.059232846,220.951172041,
444 220.842896736,220.734407134,220.62570344,220.516785857,220.407654588,
445 220.298309839,220.188751814,220.078980719,219.96899676,219.858800143,
446 219.748391075,219.637769762,219.526936413,219.415891235,219.304634436,
447 219.193166225,219.081486809,218.9695964,218.857495205,218.745183435,
448 218.6326613,218.519929009,218.406986775,218.293834807,218.180473316,
449 218.066902515,217.953122614,217.839133825,217.724936362,217.610530435,
450 217.495916257,217.381094042,217.266064002,217.150826349,217.035381299,
451 216.919729063,216.803869855,216.68780389,216.571531381,216.455052541,
452 216.338367587,216.22147673,216.104380187,215.987078171,215.869570897,
453 215.75185858,215.633941434,215.515819675,215.397493517,215.278963175,
454 215.160228865,215.041290801,214.922149198,214.802804272,214.683256238,
455 214.563505311,214.443551707,214.32339564,214.203037325,214.082476979,
456 213.961714816,213.840751051,213.719585899,213.598219576,213.476652297,
457 213.354884277,213.232915731,213.110746873,212.988377919,212.865809083,
458 212.74304058,212.620072625,212.496905433,212.373539217,212.249974193,
459 212.126210573,212.002248574,211.878088408,211.75373029,211.629174433,
460 211.504421051,211.379470357,211.254322565,211.128977889,211.003436541,
461 210.877698734,210.751764681,210.625634594,210.499308686,210.37278717,
462 210.246070256,210.119158158,209.992051086,209.864749253,209.737252869,
463 209.609562146,209.481677294,209.353598524,209.225326046,209.096860071,
464 208.968200809,208.839348469,208.710303261,208.581065394,208.451635077,
465 208.322012519,208.192197928,208.062191513,207.931993481,207.801604041,
466 207.671023398,207.540251762,207.409289338,207.278136334,207.146792955,
467 207.015259407,206.883535897,206.75162263,206.61951981,206.487227642,
468 206.354746332,206.222076083,206.089217099,205.956169583,205.82293374,
469 205.689509771,205.555897879,205.422098267,205.288111136,205.153936688,
470 205.019575125,204.885026646,204.750291453,204.615369746,204.480261724,
471 204.344967587,204.209487534,204.073821763,203.937970474,203.801933864,
472 203.66571213,203.52930547,203.392714081,203.255938159,203.1189779,
473 202.9818335,202.844505154,202.706993058,202.569297405,202.43141839,
474 202.293356206,202.155111047,202.016683105,201.878072574,201.739279645,
475 201.60030451,201.46114736,201.321808386,201.182287779,201.042585728,
476 200.902702422,200.762638052,200.622392806,200.481966872,200.341360438,
477 200.200573692,200.059606819,199.918460008,199.777133444,199.635627312,
478 199.493941798,199.352077087,199.210033363,199.067810809,198.92540961,
479 198.782829948,198.640072006,198.497135966,198.354022009,198.210730316,
480 198.067261068,197.923614446,197.779790629,197.635789796,197.491612126,
481 197.347257797,197.202726987,197.058019875,196.913136635,196.768077446,
482 196.622842482,196.477431919,196.331845933,196.186084697,196.040148386,
483 195.894037174,195.747751232,195.601290734,195.454655852,195.307846758,
484 195.160863622,195.013706614,194.866375906,194.718871667,194.571194065,
485 194.423343269,194.275319448,194.127122768,193.978753398,193.830211503,
486 193.681497249,193.532610803,193.383552329,193.234321992,193.084919955,
487 192.935346382,192.785601437,192.635685281,192.485598078,192.335339987,
488 192.18491117,192.034311788,191.883542,191.732601966,191.581491845,
489 191.430211795,191.278761974,191.127142539,190.975353646,190.823395454,
490 190.671268116,190.518971788,190.366506625,190.213872781,190.06107041,
491 189.908099664,189.754960697,189.60165366,189.448178705,189.294535983,
492 189.140725644,188.986747838,188.832602716,188.678290424,188.523811112,
493 188.369164928,188.214352019,188.059372531,187.904226611,187.748914404,
494 187.593436056,187.43779171,187.281981512,187.126005604,186.96986413,
495 186.813557231,186.65708505,186.500447728,186.343645406,186.186678223,
496 186.029546321,185.872249837,185.714788911,185.55716368,185.399374282,
497 185.241420854,185.083303532,184.925022453,184.766577751,184.607969561,
498 184.449198018,184.290263255,184.131165406,183.971904603,183.812480977,
499 183.652894661,183.493145785,183.333234481,183.173160876,183.012925102,
500 182.852527286,182.691967558,182.531246043,182.37036287,182.209318165,
501 182.048112055,181.886744663,181.725216116,181.563526538,181.401676052,
502 181.239664781,181.077492849,180.915160377,180.752667487,180.5900143,
503 180.427200936,180.264227516,180.101094157,179.937800981,179.774348103,
504 179.610735643,179.446963717,179.283032441,179.118941933,178.954692306,
505 178.790283677,178.625716159,178.460989866,178.296104912,178.131061408,
506 177.965859467,177.800499201,177.634980721,177.469304136,177.303469557,
507 177.137477093,176.971326853,176.805018945,176.638553477,176.471930555,
508 176.305150286,176.138212776,175.971118131,175.803866455,175.636457852,
509 175.468892427,175.301170281,175.133291519,174.965256242,174.797064551,
510 174.628716547,174.460212331,174.291552002,174.12273566,173.953763402,
511 173.784635329,173.615351536,173.44591212,173.276317179,173.106566808,
512 172.936661103,172.766600157,172.596384066,172.426012922,172.255486819,
513 172.084805849,171.913970105,171.742979677,171.571834657,171.400535134,
514 171.229081198,171.057472939,170.885710445,170.713793803,170.541723102,
515 170.369498428,170.197119867,170.024587505,169.851901428,169.67906172,
516 169.506068464,169.332921745,169.159621646,168.986168248,168.812561633,
517 168.638801884,168.464889079,168.2908233,168.116604626,167.942233136,
518 167.767708909,167.593032021,167.418202552,167.243220576,167.068086171,
519 166.892799412,166.717360374,166.541769131,166.366025758,166.190130327,
520 166.014082912,165.837883585,165.661532417,165.48502948,165.308374843,
521 165.131568578,164.954610753,164.777501437,164.600240698,164.422828605,
522 164.245265224,164.067550622,163.889684865,163.711668018,163.533500146,
523 163.355181313,163.176711584,162.998091022,162.819319688,162.640397646,
524 162.461324957,162.28210168,162.102727878,161.92320361,161.743528935,
525 161.563703911,161.383728597,161.203603051,161.023327328,160.842901487,
526 160.662325582,160.481599669,160.300723803,160.119698037,159.938522426,
527 159.757197022,159.575721877,159.394097045,159.212322576,159.03039852,
528 158.848324929,158.666101851,158.483729336,158.301207432,158.118536187,
529 157.935715649,157.752745864,157.569626879,157.38635874,157.20294149,
530 157.019375176,156.83565984,156.651795527,156.467782279,156.283620139,
531 156.099309148,155.914849347,155.730240777,155.545483478,155.36057749,
532 155.175522851,154.9903196,154.804967774,154.61946741,154.433818546,
533 154.248021217,154.062075459,153.875981307,153.689738795,153.503347956,
534 153.316808825,153.130121434,152.943285814,152.756301998,152.569170017,
535 152.3818899,152.194461677,152.006885379,151.819161033,151.631288668,
536 151.443268311,151.25509999,151.06678373,150.878319558,150.689707498,
537 150.500947577,150.312039817,150.122984243,149.933780877,149.744429742,
538 149.55493086,149.365284253,149.17548994,148.985547943,148.79545828,
539 148.605220971,148.414836035,148.224303489,148.033623351,147.842795638,
540 147.651820366,147.46069755,147.269427206,147.078009348,146.886443991,
541 146.694731147,146.50287083,146.310863051,146.118707824,145.926405158,
542 145.733955065,145.541357554,145.348612635,145.155720318,144.962680609,
543 144.769493518,144.576159051,144.382677215,144.189048016,143.995271461,
544 143.801347552,143.607276296,143.413057696,143.218691756,143.024178478,
545 142.829517864,142.634709916,142.439754635,142.244652022,142.049402077,
546 141.854004798,141.658460186,141.462768238,141.266928951,141.070942324,
547 140.874808353,140.678527034,140.482098363,140.285522334,140.088798942,
548 139.891928181,139.694910044,139.497744525,139.300431614,139.102971305,
549 138.905363588,138.707608454,138.509705892,138.311655894,138.113458446,
550 137.915113539,137.71662116,137.517981296,137.319193934,137.120259061,
551 136.921176662,136.721946723,136.522569228,136.323044162,136.123371508,
552 135.923551249,135.723583369,135.523467849,135.32320467,135.122793815,
553 134.922235263,134.721528995,134.52067499,134.319673227,134.118523685,
554 133.917226342,133.715781176,133.514188163,133.31244728,133.110558503,
555 132.908521808,132.70633717,132.504004564,132.301523963,132.098895342,
556 131.896118674,131.693193931,131.490121086,131.286900111,131.083530977,
557 130.880013655,130.676348115,130.472534329,130.268572264,130.064461891,
558 129.860203179,129.655796095,129.451240608,129.246536686,129.041684295,
559 128.836683403,128.631533975,128.426235979,128.220789379,128.015194141,
560 127.80945023,127.603557611,127.397516247,127.191326104,126.984987144,
561 126.778499331,126.571862629,126.365076999,126.158142404,125.951058808,
562 125.74382617,125.536444455,125.328913622,125.121233634,124.913404451,
563 124.705426035,124.497298346,124.289021346,124.080594993,123.87201925,
564 123.663294075,123.45441943,123.245395274,123.036221568,122.826898272,
565 122.617425345,122.407802748,122.198030441,121.988108384,121.778036537,
566 121.567814861,121.357443316,121.146921862,120.936250462,120.725429075,
567 120.514457662,120.303336187,120.09206461,119.880642893,119.669071,
568 119.457348893,119.245476537,119.033453894,118.821280929,118.608957608,
569 118.396483896,118.18385976,117.971085166,117.758160083,117.545084479,
570 117.331858324,117.118481589,116.904954244,116.691276262,116.477447617,
571 116.263468283,116.049338237,115.835057456,115.620625918,115.406043603,
572 115.191310494,114.976426573,114.761391825,114.546206237,114.330869797,
573 114.115382497,113.899744328,113.683955284,113.468015365,113.251924567,
574 113.035682894,112.819290349,112.60274694,112.386052677,112.169207573,
575 111.952211643,111.735064908,111.517767389,111.300319114,111.082720112,
576 110.864970417,110.647070067,110.429019104,110.210817576,109.992465532,
577 109.77396303,109.55531013,109.336506899,109.117553408,108.898449735,
578 108.679195963,108.459792182,108.240238489,108.020534985,107.800681781,
579 107.580678994,107.360526749,107.140225178,106.919774422,106.69917463,
580 106.478425962,106.257528585,106.036482676,105.815288423,105.593946025,
581 105.372455689,105.150817638,104.929032102,104.707099327,104.48501957,
582 104.262793102,104.040420207,103.817901185,103.595236351,103.372426033,
583 103.149470578,102.926370349,102.703125726,102.479737108,102.256204914,
584 102.032529581,101.808711566,101.58475135,101.360649435,101.136406344,
585 100.912022628,100.687498859,100.462835637,100.23803359,100.013093371,
586 99.7880156641,99.5628011832,99.3374506734,99.1119649126,98.8863447123,
587 98.6605909195,98.4347044173,98.2086861271,97.9825370096,97.7562580661,
588 97.5298503407,97.3033149214,97.076652942,96.8498655839,96.6229540776,
589 96.3959197048,96.1687638004,95.9414877543,95.7140930135,95.4865810843,
590 95.2589535346,95.0312119958,94.8033581658,94.5753938109,94.3473207683,
591 94.1191409492,93.8908563411,93.6624690106,93.4339811063,93.205394862,
592 92.9767125993,92.7479367311,92.5190697648,92.2901143054,92.0610730592,
593 91.8319488373,91.602744559,91.373463256,91.1441080758,90.9146822859,
594 90.6851892779,90.4556325714,90.2260158187,89.9963428088,89.7666174721,
595 89.536843885,89.3070262745,89.0771690233,88.8472766741,88.6173539356,
596 88.3874056866,88.1574369818,87.9274530572,87.697459335,87.4674614297,
597 87.237465153,87.0074765201,86.7775017551,86.5475472965,86.3176198036,
598 86.087726162,85.8578734896,85.6280691424,85.3983207206,85.1686360744,
599 84.9390233102,84.7094907959,84.4800471675,84.2507013342,84.0214624844,
600 83.7923400915,83.5633439187,83.334484025,83.1057707701,82.8772148192,
601 82.6488271479,82.4206190466,82.1926021248,81.9647883147,81.7371898752,
602 81.5098193947,81.282689794,81.0558143286,80.8292065906,80.6028805099,
603 80.3768503551,80.1511307336,79.9257365914,79.7006832114,79.4759862124,
604 79.2516615459,79.0277254929,78.80419466,78.5810859742,78.3584166771,
605 78.1362043179,77.914466746,77.6932221017,77.4724888073,77.2522855555,
606 77.0326312982,76.8135452334,76.5950467914,76.3771556195,76.1598915665,
607 75.943274665,75.7273251137,75.5120632578,75.297509569,75.0836846242,
608 74.8706090831,74.6583036656,74.4467891271,74.2360862344,74.0262157397,
609 73.8171983546,73.609054723,73.4018053941,73.195470794,72.9900711983,
610 72.7856267028,72.5821571954,72.3796823271,72.1782214839,71.9777937575,
611 71.7784179177,71.5801123841,71.3828951991,71.1867840008,70.9917959968,
612 70.7979479394,70.6052561006,70.413736249,70.2234036275,70.0342729319,
613 69.8463582915,69.6596732499,69.4742307486,69.2900431108,69.1071220272,
614 68.925478544,68.7451230512,68.5660652733,68.3883142621,68.2118783899,
615 68.0367653452,67.8629821298,67.6905350579,67.5194297558,67.349671164,
616 67.1812635406,67.0142104662,66.8485148499,66.6841789368,66.5212043171,
617 66.359591936,66.1993421046,66.0404545127,65.8829282415,65.7267617781,
618 65.5719530301,65.4184993417,65.2663975098,65.1156438011,64.9662339694,
619 64.8181632736,64.6714264963,64.5260179616,64.3819315545,64.2391607398,
620 64.0976985804,63.9575377573,63.8186705879,63.6810890449,63.5447847755,
621 63.4097491195,63.2759731279,63.1434475806,63.0121630047,62.8821096914,
622 62.7532777134,62.6256569412,62.4992370596,62.3740075834,62.2499578725,
623 62.1270771474,62.0053545027,61.8847789218,61.7653392897,61.6470244065,
624 61.5298229991,61.4137237339,61.2987152275,61.1847860581,61.0719247757,
625 60.9601199122,60.8493599906,60.7396335345,60.630929076,60.5232351645,
626 60.4165403737,60.3108333094,60.2061026159,60.1023369826,59.9995251502,
627 59.8976559158,59.7967181389,59.6967007458,59.5975927344,59.4993831786,
628 59.4020612319,59.3056161312,59.2100372005,59.1153138535,59.0214355966,
629 58.9283920315,58.8361728577,58.7447678742,58.6541669817,58.5643601843,
630 58.4753375907,58.3870894158,58.2996059815,58.2128777181,58.1268951645,
631 58.0416489694,57.9571298914,57.8733287998,57.7902366743,57.7078446055,
632 57.6261437948,57.5451255545,57.4647813073,57.3851025863,57.3060810344,
633 57.2277084041,57.1499765569,57.0728774627,56.9964031993,56.9205459515,
634 56.8452980105,56.7706517731,56.6965997408,56.6231345189,56.5502488157,
635 56.4779354416,56.4061873078,56.3349974256,56.2643589053,56.1942649551,
636 56.12470888,56.0556840808,55.9871840529,55.9192023854,55.8517327594,
637 55.7847689478,55.7183048131,55.6523343072,55.5868514695,55.5218504263,
638 55.4573253892,55.3932706543,55.3296806009,55.2665496903,55.2038724646,
639 55.1416435458,55.0798576345,55.0185095087,54.9575940229,54.8971061066,
640 54.8370407637,54.7773930709,54.718158177,54.6593313016,54.6009077341,
641 54.5428828326,54.4852520229,54.4280107972,54.3711547138,54.3146793951,
642 54.2585805273,54.2028538591,54.147495201,54.092500424,54.0378654587,
643 53.9835862945,53.9296589787,53.8760796154,53.8228443647,53.7699494418,
644 53.7173911161,53.6651657104,53.6132695999,53.5616992114,53.5104510228,
645 53.4595215617,53.408907405,53.358605178,53.3086115536,53.2589232516,
646 53.2095370379,53.1604497237,53.1116581648,53.0631592611,53.0149499554,
647 52.9670272332,52.9193881217,52.8720296893,52.8249490449,52.7781433372,
648 52.7316097539,52.6853455215,52.6393479043,52.5936142039,52.5481417587,
649 52.5029279432,52.4579701673,52.4132658761,52.3688125489,52.3246076991,
650 52.2806488732,52.2369336506,52.193459643,52.1502244938,52.1072258777,
651 52.0644615,52.0219290964,51.9796264325,51.9375513029,51.8957015313,
652 51.8540749699,51.8126694984,51.7714830245,51.7305134827,51.6897588342,
653 51.6492170664,51.6088861928,51.568764252,51.5288493078,51.4891394485,
654 51.4496327869,51.4103274594,51.3712216261,51.3323134703,51.2936011979,
655 51.2550830374,51.2167572394,51.1786220761,51.1406758414,51.1029168502,
656 51.065343438,51.0279539611,50.9907467956,50.9537203379,50.9168730035,
657 50.8802032274,50.8437094637,50.8073901849,50.7712438821,50.7352690645,
658 50.6994642591,50.6638280107,50.6283588811,50.5930554497,50.5579163121,
659 50.522940081,50.4881253853,50.4534708698,50.4189751955,50.3846370388,
660 50.3504550916,50.3164280609,50.2825546688,50.2488336522,50.2152637622,
661 50.1818437647,50.1485724393,50.1154485799,50.0824709937,50.0496385019,
662 50.0169499386,49.9844041515,49.9520000008,49.9197363597,49.8876121142,
663 49.8556261623,49.8237774146,49.7920647936,49.7604872338,49.7290436813,
664 49.6977330941,49.6665544412,49.6355067033,49.6045888718,49.5737999493,
665 49.5431389491,49.5126048954,49.4821968226,49.4519137756,49.4217548096,
666 49.3917189898,49.3618053914,49.3320130994,49.3023412085,49.2727888229,
667 49.2433550565,49.2140390322,49.1848398821,49.1557567476,49.1267887789,
668 49.0979351349,49.0691949835,49.040567501,49.0120518721,48.9836472901,
669 48.9553529564,48.9271680807,48.8990918806,48.8711235817,48.8432624174,
670 48.815507629,48.7878584653,48.7603141827,48.732874045,48.7055373233,
671 48.6783032962,48.6511712493,48.6241404752,48.5972102736,48.5703799512,
672 48.5436488213,48.517016204,48.4904814261,48.464043821,48.4377027285,
673 48.4114574948,48.3853074723,48.35925202,48.3332905028,48.3074222917,
674 48.2816467637,48.2559633019,48.2303712951,48.204870138,48.179459231,
675 48.1541379801,48.1289057971,48.103762099,48.0787063085,48.0537378537,
676 48.0288561678,48.0040606896,47.9793508627,47.9547261362,47.9301859641,
677 47.9057298055,47.8813571243,47.8570673896,47.832860075,47.8087346591,
678 47.7846906251,47.7607274611,47.7368446597,47.7130417179,47.6893181375,
679 47.6656734245,47.6421070895,47.6186186475,47.5952076176,47.5718735233,
680 47.5486158923,47.5254342566,47.5023281519,47.4792971185,47.4563407004,
681 47.4334584457,47.4106499063,47.3879146382,47.3652522011,47.3426621586,
682 47.3201440779,47.2976975301,47.27532209,47.2530173358,47.2307828496,
683 47.2086182168,47.1865230265,47.1644968713,47.142539347,47.1206500531,
684 47.0988285923,47.0770745708,47.0553875978,47.033767286,47.0122132513,
685 46.9907251128,46.9693024927,46.9479450163,46.926652312,46.9054240114,
686 46.884259749,46.8631591622,46.8421218916,46.8211475806,46.8002358755,
687 46.7793864255,46.7585988825,46.7378729014,46.7172081399,46.6966042582,
688 46.6760609195,46.6555777895,46.6351545368,46.6147908322,46.5944863497,
689 46.5742407654,46.5540537582,46.5339250095,46.5138542031,46.4938410254,
690 46.4738851652,46.4539863139,46.434144165,46.4143584145,46.394628761,
691 46.374954905,46.3553365498,46.3357734005,46.3162651648,46.2968115526,
692 46.2774122759,46.258067049,46.2387755882,46.2195376123,46.200352842,
693 46.181221,46.1621418113,46.143115003,46.124140304,46.1052174456,
694 46.0863461607,46.0675261845,46.0487572541,46.0300391084,46.0113714885,
695 45.9927541372,45.9741867993,45.9556692215,45.9372011522,45.9187823419,
696 45.9004125427,45.8820915086,45.8638189954,45.8455947607,45.8274185639,
697 45.8092901659,45.7912093296,45.7731758195,45.7551894018,45.7372498443,
698 45.7193569166,45.7015103899,45.683710037,45.6659556324,45.648246952,
699 45.6305837735,45.6129658761,45.5953930405,45.5778650491,45.5603816856,
700 45.5429427354,45.5255479853,45.5081972237,45.4908902404,45.4736268266,
701 45.4564067751,45.4392298799,45.4220959367,45.4050047424,45.3879560955,
702 45.3709497956,45.3539856439,45.3370634429,45.3201829964,45.3033441096,
703 45.286546589,45.2697902423,45.2530748788,45.2364003088,45.2197663439,
704 45.2031727971,45.1866194827,45.170106216,45.1536328136,45.1371990936,
705 45.120804875,45.1044499781,45.0881342244,45.0718574366,45.0556194386,
706 45.0394200553,45.0232591129,45.0071364388,44.9910518613,44.97500521,
707 44.9589963155,44.9430250097,44.9270911254,44.9111944966,44.8953349582,
708 44.8795123463,44.8637264982,44.8479772519,44.8322644468,44.816587923,
709 44.8009475218,44.7853430856,44.7697744577,44.7542414822,44.7387440046,
710 44.7232818711,44.7078549288,44.6924630261,44.677106012,44.6617837367,
711 44.6464960512,44.6312428075,44.6160238584,44.6008390578,44.5856882605,
712 44.570571322,44.5554880988,44.5404384485,44.5254222292,44.5104393001,
713 44.4954895213,44.4805727536,44.4656888589,44.4508376997,44.4360191394,
714 44.4212330422,44.4064792734,44.3917576987,44.3770681849,44.3624105996,
715 44.347784811,44.3331906883,44.3186281014,44.3040969209,44.2895970184,
716 44.2751282661,44.2606905369,44.2462837046,44.2319076438,44.2175622296,
717 44.2032473381,44.188962846,44.1747086307,44.1604845704,44.1462905441,
718 44.1321264312,44.1179921121,44.1038874679,44.0898123802,44.0757667314,
719 44.0617504046,44.0477632835,44.0338052526,44.0198761971,44.0059760025,
720 43.9921045555,43.978261743,43.9644474528,43.9506615732,43.9369039933,
721 43.9231746028,43.9094732918,43.8957999513,43.8821544728,43.8685367485,
722 43.854946671,43.8413841338,43.8278490309,43.8143412567,43.8008607064,
723 43.7874072758,43.7739808611,43.7605813594,43.747208668,43.733862685,
724 43.720543309,43.7072504393,43.6939839756,43.6807438181,43.6675298677,
725 43.6543420258,43.6411801944,43.628044276,43.6149341734,43.6018497904,
726 43.5887910309,43.5757577997,43.5627500017,43.5497675426,43.5368103287,
727 43.5238782665,43.5109712632,43.4980892264,43.4852320645,43.4723996859,
728 43.459592,43.4468089162,43.4340503448,43.4213161963,43.4086063818,
729 43.395920813,43.3832594017,43.3706220606,43.3580087026,43.3454192411,
730 43.33285359,43.3203116637,43.3077933769,43.2952986449,43.2828273833,
731 43.2703795084,43.2579549366,43.2455535849,43.2331753709,43.2208202124,
732 43.2084880276,43.1961787354,43.1838922548,43.1716285054,43.1593874071,
733 43.1471688805,43.1349728462,43.1227992256,43.1106479402,43.0985189119,
734 43.0864120634,43.0743273173,43.0622645969,43.0502238257,43.0382049278,
735 43.0262078276,43.0142324497,43.0022787194,42.9903465622,42.9784359039,
736 42.9665466709,42.9546787897,42.9428321874,42.9310067914,42.9192025293,
737 42.9074193294,42.89565712,42.88391583,42.8721953886,42.8604957252,
738 42.8488167698,42.8371584525,42.825520704,42.8139034551,42.8023066371,
739 42.7907301817,42.7791740206,42.7676380862,42.7561223111,42.7446266282,
740 42.7331509707,42.7216952722,42.7102594667,42.6988434883,42.6874472716,
741 42.6760707514,42.664713863,42.6533765417,42.6420587235,42.6307603444,
742 42.6194813408,42.6082216494,42.5969812074,42.5857599519,42.5745578207,
743 42.5633747516,42.5522106829,42.5410655531,42.529939301,42.5188318657,
744 42.5077431866,42.4966732034,42.485621856,42.4745890847,42.4635748299,
745 42.4525790326,42.4416016337,42.4306425747,42.4197017972,42.4087792431,
746 42.3978748545,42.3869885739,42.3761203441,42.365270108,42.3544378088,
747 42.3436233901,42.3328267957,42.3220479695,42.3112868559,42.3005433995,
748 42.2898175449,42.2791092374,42.2684184221,42.2577450447,42.2470890509,
749 42.2364503869,42.2258289989,42.2152248334,42.2046378373,42.1940679577,
750 42.1835151416,42.1729793368,42.1624604909,42.1519585519,42.1414734681,
751 42.1310051879,42.1205536599,42.1101188331,42.0997006567,42.08929908,
752 42.0789140527,42.0685455244,42.0581934454,42.0478577658,42.0375384362,
753 42.0272354073,42.0169486299,42.0066780553,41.9964236349,41.9861853201,
754 41.9759630629,41.9657568151,41.955566529,41.9453921571,41.935233652,
755 41.9250909665,41.9149640537,41.9048528668,41.8947573593,41.8846774848,
756 41.8746131972,41.8645644507,41.8545311993,41.8445133977,41.8345110004,
757 41.8245239623,41.8145522385,41.8045957842,41.7946545548,41.784728506,
758 41.7748175936,41.7649217736,41.7550410021,41.7451752356,41.7353244307,
759 41.725488544,41.7156675325,41.7058613534,41.696069964,41.6862933217,
760 41.6765313841,41.6667841092,41.657051455,41.6473333796,41.6376298415,
761 41.6279407991,41.6182662112,41.6086060367,41.5989602347,41.5893287644,
762 41.5797115852,41.5701086567,41.5605199386,41.5509453909,41.5413849736,
763 41.531838647,41.5223063714,41.5127881076,41.5032838162,41.493793458,
764 41.4843169943,41.4748543861,41.4654055949,41.4559705822,41.4465493097,
765 41.4371417393,41.427747833,41.4183675529,41.4090008614,41.3996477209,
766 41.3903080941,41.3809819438,41.3716692328,41.3623699242,41.3530839814,
767 41.3438113676,41.3345520464,41.3253059814,41.3160731366,41.3068534757,
768 41.2976469631,41.2884535628,41.2792732394,41.2701059573,41.2609516812,
769 41.251810376,41.2426820066,41.2335665381,41.2244639357,41.2153741649,
770 41.2062971912,41.1972329801,41.1881814975,41.1791427094,41.1701165817,
771 41.1611030807,41.1521021727,41.1431138241,41.1341380016,41.1251746718,
772 41.1162238016,41.1072853581,41.0983593082,41.0894456193,41.0805442586,
773 41.0716551938,41.0627783924,41.0539138221,41.0450614508,41.0362212466,
774 41.0273931776,41.0185772119,41.0097733179,41.0009814642,40.9922016194,
775 40.9834337521,40.9746778312,40.9659338257,40.9572017046,40.9484814373,
776 40.9397729929,40.931076341,40.9223914511,40.9137182928,40.905056836,
777 40.8964070505,40.8877689064,40.8791423738,40.8705274229,40.8619240242,
778 40.853332148,40.8447517649,40.8361828457,40.8276253611,40.8190792821,
779 40.8105445796,40.8020212248,40.7935091889,40.7850084433,40.7765189594,
780 40.7680407088,40.7595736631,40.7511177941,40.7426730737,40.7342394738,
781 40.7258169666,40.7174055242,40.7090051189,40.7006157231,40.6922373093,
782 40.68386985,40.6755133181,40.6671676862,40.6588329272,40.6505090143,
783 40.6421959203,40.6338936187,40.6256020825,40.6173212853,40.6090512004,
784 40.6007918016,40.5925430624,40.5843049567,40.5760774582,40.567860541,
785 40.5596541792,40.5514583468,40.5432730181,40.5350981675,40.5269337693,
786 40.5187797982,40.5106362286,40.5025030354,40.4943801934,40.4862676773,
787 40.4781654622,40.4700735231,40.4619918353,40.4539203738,40.4458591142,
788 40.4378080318,40.429767102,40.4217363005,40.4137156031,40.4057049853,
789 40.3977044232,40.3897138925,40.3817333695,40.37376283,40.3658022505,
790 40.357851607,40.3499108761,40.3419800341,40.3340590575,40.3261479229,
791 40.3182466072,40.3103550869,40.302473339,40.2946013404,40.2867390681,
792 40.2788864992,40.2710436109,40.2632103804,40.2553867851,40.2475728023,
793 40.2397684096,40.2319735845,40.2241883047,40.2164125479,40.2086462918,
794 40.2008895143,40.1931421935,40.1854043073,40.1776758338,40.1699567512,
795 40.1622470377,40.1545466718,40.1468556316,40.1391738959,40.131501443,
796 40.1238382516,40.1161843004,40.1085395682,40.1009040337,40.093277676,
797 40.0856604739,40.0780524066,40.0704534531,40.0628635927,40.0552828046,
798 40.0477110681,40.0401483626,40.0325946677,40.0250499628,40.0175142275,
799 40.0099874416,40.0024695847,39.9949606367,39.9874605775,39.979969387,
800 39.9724870452,39.9650135322,39.9575488282,39.9500929133,39.9426457678,
801 39.9352073722,39.9277777067,39.9203567518,39.9129444882,39.9055408964,
802 39.898145957,39.8907596508,39.8833819586,39.8760128612,39.8686523396,
803 39.8613003748,39.8539569477,39.8466220395,39.8392956313,39.8319777044,
804 39.8246682402,39.8173672198,39.8100746247,39.8027904365,39.7955146366,
805 39.7882472066,39.7809881283,39.7737373832,39.7664949532,39.75926082,
806 39.7520349657,39.7448173721,39.7376080212,39.7304068951,39.7232139759,
807 39.7160292458,39.708852687,39.7016842819,39.6945240127,39.6873718619,
808 39.6802278119,39.6730918453,39.6659639446,39.6588440925,39.6517322716,
809 39.6446284646,39.6375326544,39.6304448239,39.6233649558,39.6162930333,
810 39.6092290392,39.6021729567,39.5951247688,39.5880844588,39.5810520098,
811 39.5740274052,39.5670106282,39.5600016623,39.5530004909,39.5460070974,
812 39.5390214655,39.5320435786,39.5250734205,39.5181109748,39.5111562253,
813 39.5042091557,39.4972697499,39.4903379919,39.4834138654,39.4764973546,
814 39.4695884435,39.4626871162,39.4557933567,39.4489071494,39.4420284784,
815 39.435157328,39.4282936826,39.4214375266,39.4145888443,39.4077476203,
816 39.4009138391,39.3940874853,39.3872685434,39.3804569982,39.3736528344,
817 39.3668560367,39.36006659,39.353284479,39.3465096888,39.3397422042,
818 39.3329820103,39.3262290921,39.3194834346,39.3127450231,39.3060138426,
819 39.2992898784,39.2925731158,39.2858635401,39.2791611366,39.2724658907,
820 39.2657777879,39.2590968136,39.2524229534,39.2457561929,39.2390965176,
821 39.2324439132,39.2257983655,39.2191598602,39.212528383,39.2059039198,
822 39.1992864564,39.1926759788,39.186072473,39.1794759249,39.1728863205,
823 39.166303646,39.1597278875,39.153159031,39.1465970629,39.1400419694,
824 39.1334937368,39.1269523513,39.1204177994,39.1138900674,39.1073691419,
825 39.1008550092,39.094347656,39.0878470687,39.081353234,39.0748661385,
826 39.068385769,39.0619121121,39.0554451545,39.0489848832,39.0425312849,
827 39.0360843464,39.0296440548,39.023210397,39.0167833599,39.0103629306,
828 39.0039490962,38.9975418437,38.9911411603,38.9847470331,38.9783594495,
829 38.9719783965,38.9656038616,38.959235832,38.9528742952,38.9465192384,
830 38.9401706492,38.933828515,38.9274928232,38.9211635616,38.9148407175,
831 38.9085242787,38.9022142328,38.8959105674,38.8896132703,38.8833223293,
832 38.877037732,38.8707594665,38.8644875204,38.8582218817,38.8519625383,
833 38.8457094782,38.8394626894,38.8332221598,38.8269878777,38.8207598309,
834 38.8145380078,38.8083223964,38.802112985,38.7959097617,38.7897127148,
835 38.7835218327,38.7773371036,38.7711585159,38.7649860581,38.7588197184,
836 38.7526594855,38.7465053477,38.7403572936,38.7342153118,38.7280793908,
837 38.7219495192,38.7158256858,38.7097078791,38.7035960879,38.697490301,
838 38.691390507,38.6852966949,38.6792088534,38.6731269715,38.667051038,
839 38.6609810418
840 }
841 }
842 };
+0
-844
src/LV2/gxamp.lv2/DSP/12ax7.cc less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 // generated by ../../tools/tube_transfer.py
21 // tube: 12AX7
22 // plate current function: triode
23 // mu: 100
24 // kx: 1.4
25 // kg1: 1060
26 // kp: 600
27 // kvb: 300
28
29 table1d_imp<2001> tubetable_12AX7[2] =
30 {
31 {
32 // Ri = 68k
33 -5,5,200,2001, {
34 249.98706929,249.986851225,249.986629489,249.986404021,249.986174757,
35 249.985941635,249.985704589,249.985463554,249.985218463,249.984969247,
36 249.984715838,249.984458166,249.984196158,249.983929743,249.983658846,
37 249.983383392,249.983103306,249.982818508,249.982528921,249.982234464,
38 249.981935056,249.981630613,249.981321052,249.981006287,249.98068623,
39 249.980360793,249.980029887,249.979693419,249.979351296,249.979003424,
40 249.978649708,249.978290048,249.977924346,249.9775525,249.977174409,
41 249.976789967,249.976399069,249.976001606,249.97559747,249.975186548,
42 249.974768727,249.974343893,249.973911927,249.973472711,249.973026125,
43 249.972572044,249.972110345,249.9716409,249.971163579,249.970678252,
44 249.970184785,249.969683043,249.969172887,249.968654177,249.968126772,
45 249.967590526,249.967045292,249.96649092,249.965927258,249.965354153,
46 249.964771446,249.964178978,249.963576587,249.962964107,249.962341372,
47 249.961708211,249.96106445,249.960409914,249.959744424,249.959067797,
48 249.95837985,249.957680393,249.956969237,249.956246188,249.955511048,
49 249.954763616,249.95400369,249.953231063,249.952445523,249.951646857,
50 249.950834849,249.950009276,249.949169916,249.94831654,249.947448916,
51 249.946566809,249.945669979,249.944758184,249.943831177,249.942888706,
52 249.941930516,249.940956349,249.93996594,249.938959023,249.937935324,
53 249.936894568,249.935836475,249.934760758,249.933667127,249.932555289,
54 249.931424944,249.930275788,249.929107511,249.9279198,249.926712337,
55 249.925484796,249.92423685,249.922968162,249.921678394,249.9203672,
56 249.91903423,249.917679127,249.916301529,249.914901069,249.913477372,
57 249.912030061,249.910558748,249.909063042,249.907542547,249.905996856,
58 249.904425561,249.902828244,249.901204482,249.899553844,249.897875894,
59 249.896170188,249.894436274,249.892673696,249.890881989,249.889060679,
60 249.887209288,249.885327328,249.883414305,249.881469716,249.879493052,
61 249.877483793,249.875441414,249.87336538,249.87125515,249.869110171,
62 249.866929885,249.864713724,249.86246111,249.860171458,249.857844173,
63 249.855478652,249.853074281,249.850630438,249.848146491,249.845621799,
64 249.843055711,249.840447565,249.837796689,249.835102404,249.832364016,
65 249.829580824,249.826752115,249.823877166,249.820955243,249.8179856,
66 249.81496748,249.811900117,249.80878273,249.80561453,249.802394713,
67 249.799122465,249.795796959,249.792417358,249.788982809,249.785492449,
68 249.781945403,249.778340779,249.774677678,249.770955183,249.767172365,
69 249.763328284,249.759421981,249.75545249,249.751418824,249.747319988,
70 249.743154968,249.738922738,249.734622257,249.730252468,249.725812301,
71 249.72130067,249.716716471,249.712058589,249.70732589,249.702517225,
72 249.697631429,249.692667321,249.687623703,249.682499361,249.677293063,
73 249.672003562,249.666629592,249.661169871,249.655623098,249.649987954,
74 249.644263106,249.638447197,249.632538857,249.626536694,249.620439299,
75 249.614245244,249.607953082,249.601561346,249.59506855,249.588473189,
76 249.581773739,249.574968653,249.568056367,249.561035295,249.553903831,
77 249.546660348,249.5393032,249.531830718,249.524241211,249.516532969,
78 249.508704259,249.500753327,249.492678397,249.48447767,249.476149326,
79 249.467691521,249.459102391,249.450380046,249.441522576,249.432528047,
80 249.423394501,249.414119957,249.404702411,249.395139834,249.385430176,
81 249.37557136,249.365561287,249.355397831,249.345078845,249.334602156,
82 249.323965565,249.313166851,249.302203767,249.291074039,249.27977537,
83 249.268305439,249.256661896,249.244842368,249.232844458,249.220665739,
84 249.208303762,249.195756051,249.183020104,249.170093394,249.156973366,
85 249.143657441,249.130143014,249.116427453,249.102508098,249.088382267,
86 249.074047249,249.059500307,249.044738677,249.029759572,249.014560175,
87 248.999137645,248.983489114,248.967611688,248.951502446,248.935158442,
88 248.918576704,248.901754233,248.884688005,248.867374969,248.84981205,
89 248.831996145,248.813924127,248.795592843,248.776999115,248.75813974,
90 248.739011488,248.719611106,248.699935316,248.679980814,248.659744274,
91 248.639222342,248.618411645,248.597308781,248.575910327,248.554212837,
92 248.532212841,248.509906845,248.487291335,248.464362771,248.441117595,
93 248.417552224,248.393663055,248.369446462,248.344898801,248.320016406,
94 248.29479559,248.269232647,248.243323852,248.217065459,248.190453706,
95 248.163484811,248.136154974,248.108460379,248.080397191,248.05196156,
96 248.02314962,247.993957487,247.964381265,247.934417041,247.904060889,
97 247.87330887,247.84215703,247.810601403,247.778638011,247.746262866,
98 247.713471967,247.680261303,247.646626855,247.612564592,247.578070476,
99 247.543140461,247.507770494,247.471956513,247.435694453,247.398980241,
100 247.3618098,247.32417905,247.286083906,247.247520279,247.208484082,
101 247.168971222,247.128977607,247.088499146,247.047531747,247.00607132,
102 246.964113777,246.921655031,246.878691002,246.835217611,246.791230785,
103 246.746726457,246.701700566,246.656149058,246.610067887,246.563453015,
104 246.516300414,246.468606066,246.420365964,246.371576111,246.322232524,
105 246.272331232,246.221868279,246.170839722,246.119241634,246.067070104,
106 246.014321237,245.960991157,245.907076004,245.852571939,245.79747514,
107 245.74178181,245.685488167,245.628590455,245.571084939,245.512967907,
108 245.454235672,245.394884569,245.334910961,245.274311236,245.213081807,
109 245.151219115,245.08871963,245.02557985,244.9617963,244.897365536,
110 244.832284146,244.766548747,244.700155987,244.633102547,244.565385141,
111 244.497000515,244.427945449,244.358216758,244.287811291,244.216725932,
112 244.144957602,244.072503257,243.999359889,243.92552453,243.850994248,
113 243.775766147,243.699837372,243.623205106,243.545866572,243.467819032,
114 243.389059786,243.309586179,243.229395592,243.148485449,243.066853216,
115 242.984496398,242.901412546,242.817599248,242.733054138,242.647774892,
116 242.561759227,242.475004906,242.387509732,242.299271553,242.210288262,
117 242.120557793,242.030078124,241.938847279,241.846863324,241.754124371,
118 241.660628575,241.566374134,241.471359294,241.375582341,241.279041608,
119 241.181735472,241.083662355,240.984820721,240.885209081,240.784825989,
120 240.683670043,240.581739885,240.479034203,240.375551726,240.271291229,
121 240.166251531,240.060431493,239.95383002,239.846446061,239.738278607,
122 239.629326695,239.5195894,239.409065844,239.29775519,239.185656641,
123 239.072769446,238.959092892,238.84462631,238.729369072,238.61332059,
124 238.496480317,238.378847747,238.260422414,238.141203892,238.021191795,
125 237.900385775,237.778785524,237.656390773,237.533201291,237.409216884,
126 237.284437398,237.158862715,237.032492753,236.905327469,236.777366855,
127 236.648610938,236.519059783,236.388713489,236.257572188,236.125636051,
128 235.992905278,235.859380107,235.725060807,235.58994768,235.454041062,
129 235.31734132,235.179848852,235.041564089,234.902487493,234.762619556,
130 234.6219608,234.480511776,234.338273067,234.195245283,234.051429062,
131 233.906825072,233.761434008,233.615256591,233.468293572,233.320545726,
132 233.172013855,233.022698786,232.872601372,232.721722492,232.570063047,
133 232.417623965,232.264406196,232.110410713,231.955638512,231.800090614,
134 231.643768059,231.48667191,231.328803251,231.170163188,231.010752847,
135 230.850573373,230.689625933,230.527911712,230.365431915,230.202187764,
136 230.0381805,229.873411384,229.707881693,229.541592719,229.374545774,
137 229.206742186,229.038183299,228.868870471,228.698805078,228.527988509,
138 228.356422169,228.184107477,228.011045867,227.837238785,227.662687692,
139 227.487394061,227.311359378,227.134585141,226.957072863,226.778824064,
140 226.59984028,226.420123056,226.239673947,226.058494521,225.876586355,
141 225.693951036,225.510590161,225.326505336,225.141698178,224.956170309,
142 224.769923365,224.582958985,224.39527882,224.206884527,224.017777772,
143 223.827960226,223.637433569,223.446199487,223.254259674,223.061615828,
144 222.868269655,222.674222866,222.479477179,222.284034315,222.087896002,
145 221.891063973,221.693539966,221.495325721,221.296422987,221.096833513,
146 220.896559053,220.695601367,220.493962216,220.291643365,220.088646583,
147 219.884973642,219.680626315,219.475606381,219.269915618,219.063555809,
148 218.856528737,218.64883619,218.440479954,218.231461819,218.021783577,
149 217.811447019,217.600453941,217.388806137,217.176505402,216.963553533,
150 216.749952328,216.535703584,216.3208091,216.105270675,215.889090106,
151 215.672269193,215.454809735,215.23671353,215.017982376,214.798618071,
152 214.578622412,214.357997196,214.136744219,213.914865275,213.692362159,
153 213.469236664,213.245490582,213.021125704,212.796143819,212.570546714,
154 212.344336178,212.117513994,211.890081946,211.662041815,211.433395383,
155 211.204144425,210.97429072,210.74383604,210.512782158,210.281130844,
156 210.048883865,209.816042987,209.582609974,209.348586585,209.113974579,
157 208.878775712,208.642991738,208.406624407,208.169675468,207.932146665,
158 207.694039743,207.455356441,207.216098496,206.976267643,206.735865613,
159 206.494894135,206.253354936,206.011249738,205.76858026,205.52534822,
160 205.281555332,205.037203306,204.792293851,204.54682867,204.300809466,
161 204.054237936,203.807115776,203.559444679,203.311226332,203.062462422,
162 202.813154631,202.563304638,202.312914121,202.06198475,201.810518197,
163 201.558516128,201.305980206,201.05291209,200.799313438,200.545185904,
164 200.290531137,200.035350786,199.779646493,199.5234199,199.266672645,
165 199.009406363,198.751622683,198.493323236,198.234509646,197.975183536,
166 197.715346523,197.455000226,197.194146256,196.932786223,196.670921736,
167 196.408554398,196.145685811,195.882317572,195.618451279,195.354088524,
168 195.089230896,194.823879985,194.558037374,194.291704646,194.024883381,
169 193.757575156,193.489781546,193.221504124,192.952744459,192.68350412,
170 192.413784672,192.143587679,191.872914702,191.601767301,191.330147033,
171 191.058055454,190.785494118,190.512464577,190.238968382,189.965007082,
172 189.690582224,189.415695355,189.14034802,188.864541763,188.588278126,
173 188.311558653,188.034384883,187.756758358,187.478680617,187.200153199,
174 186.921177645,186.641755492,186.36188828,186.081577548,185.800824834,
175 185.519631679,185.237999622,184.955930205,184.673424969,184.390485457,
176 184.107113213,183.823309782,183.539076713,183.254415552,182.969327853,
177 182.683815168,182.397879052,182.111521065,181.824742767,181.537545724,
178 181.249931504,180.961901678,180.673457823,180.384601519,180.095334351,
179 179.805657909,179.515573788,179.225083588,178.934188917,178.642891387,
180 178.351192617,178.059094236,177.766597877,177.473705181,177.1804178,
181 176.886737393,176.592665628,176.298204182,176.003354745,175.708119016,
182 175.412498704,175.116495531,174.820111234,174.523347558,174.226206264,
183 173.92868913,173.630797944,173.332534512,173.033900658,172.734898219,
184 172.435529055,172.13579504,171.835698069,171.53524006,171.234422948,
185 170.933248694,170.631719279,170.32983671,170.027603019,169.725020263,
186 169.422090529,169.118815931,168.815198611,168.511240746,168.206944541,
187 167.902312237,167.597346111,167.292048474,166.986421676,166.680468107,
188 166.374190197,166.06759042,165.760671293,165.453435381,165.145885296,
189 164.8380237,164.529853307,164.221376886,163.912597261,163.603517315,
190 163.294139991,162.984468296,162.674505303,162.36425415,162.05371805,
191 161.742900285,161.431804217,161.120433284,160.808791007,160.496880994,
192 160.184706939,159.872272629,159.559581944,159.246638866,158.933447477,
193 158.620011964,158.306336627,157.992425878,157.678284247,157.363916386,
194 157.049327076,156.734521226,156.419503883,156.104280235,155.788855613,
195 155.473235502,155.15742554,154.841431529,154.525259436,154.2089154,
196 153.89240574,153.575736958,153.258915746,152.941948993,152.624843791,
197 152.307607442,151.990247462,151.672771591,151.3551878,151.037504296,
198 150.719729528,150.4018722,150.083941272,149.765945972,149.4478958,
199 149.129800541,148.811670267,148.493515348,148.17534646,147.857174591,
200 147.539011052,147.220867482,146.90275586,146.584688509,146.266678104,
201 145.948737684,145.630880657,145.313120806,144.995472301,144.677949704,
202 144.360567975,144.043342481,143.726289002,143.409423738,143.092763314,
203 142.776324787,142.46012565,142.144183838,141.828517734,141.513146167,
204 141.198088421,140.883364237,140.56899381,140.254997798,139.941397314,
205 139.628213931,139.31546968,139.003187046,138.691388964,138.380098818,
206 138.069340432,137.759138065,137.449516402,137.140500548,136.832116012,
207 136.524388701,136.217344903,135.911011273,135.605414819,135.300582882,
208 134.99654312,134.693323486,134.390952204,134.089457749,133.788868823,
209 133.489214324,133.190523322,132.89282503,132.596148773,132.300523955,
210 132.005980028,131.712546456,131.420252683,131.129128093,130.839201977,
211 130.550503492,130.263061625,129.97690515,129.692062595,129.408562198,
212 129.126431866,128.845699141,128.566391153,128.288534586,128.012155639,
213 127.737279983,127.463932729,127.19213839,126.921920841,126.653303293,
214 126.386308253,126.120957494,125.857272028,125.595272075,125.334977038,
215 125.076405477,124.819575089,124.564502686,124.311204176,124.059694549,
216 123.809987864,123.562097233,123.316034816,123.071811813,122.829438459,
217 122.588924021,122.3502768,122.113504129,121.878612383,121.645606978,
218 121.414492385,121.185272137,120.957948844,120.732524201,120.508999009,
219 120.287373188,120.067645798,119.849815055,119.633878355,119.419832294,
220 119.207672691,118.997394612,118.788992394,118.582459671,118.377789395,
221 118.174973871,117.974004772,117.774873176,117.577569586,117.382083958,
222 117.188405731,116.996523847,116.806426787,116.618102586,116.431538869,
223 116.246722869,116.063641457,115.882281163,115.702628206,115.524668508,
224 115.348387726,115.173771271,115.000804328,114.82947188,114.659758727,
225 114.491649506,114.325128711,114.160180708,113.996789759,113.834940032,
226 113.674615621,113.515800563,113.358478849,113.20263444,113.048251282,
227 112.895313317,112.743804495,112.593708787,112.445010196,112.297692766,
228 112.151740591,112.007137828,111.863868702,111.721917517,111.581268659,
229 111.441906608,111.303815943,111.166981347,111.031387613,110.897019652,
230 110.763862493,110.63190129,110.501121329,110.371508026,110.243046933,
231 110.115723745,109.989524294,109.864434561,109.740440669,109.617528892,
232 109.495685656,109.374897534,109.255151254,109.1364337,109.018731905,
233 108.902033061,108.786324515,108.671593767,108.557828476,108.445016453,
234 108.333145667,108.222204241,108.112180452,108.003062732,107.894839664,
235 107.787499986,107.681032587,107.575426505,107.470670928,107.366755194,
236 107.263668787,107.161401337,107.059942619,106.959282552,106.859411195,
237 106.760318751,106.661995559,106.564432098,106.467618982,106.37154696,
238 106.276206914,106.181589858,106.087686935,105.994489418,105.901988705,
239 105.81017632,105.719043911,105.628583246,105.538786217,105.44964483,
240 105.361151211,105.273297602,105.186076356,105.09947994,105.013500931,
241 104.928132016,104.843365988,104.759195746,104.675614294,104.592614738,
242 104.510190286,104.428334244,104.347040018,104.266301109,104.186111115,
243 104.106463726,104.027352725,103.948771984,103.870715468,103.793177227,
244 103.716151398,103.639632204,103.563613952,103.48809103,103.41305791,
245 103.33850914,103.26443935,103.190843246,103.117715611,103.045051301,
246 102.972845249,102.901092457,102.829788,102.758927024,102.688504742,
247 102.618516438,102.54895746,102.479823222,102.411109205,102.342810952,
248 102.274924068,102.207444221,102.140367139,102.07368861,102.007404481,
249 101.941510654,101.876003092,101.810877811,101.746130883,101.681758433,
250 101.617756641,101.554121738,101.490850007,101.427937781,101.365381444,
251 101.303177428,101.241322214,101.179812331,101.118644352,101.057814898,
252 100.997320637,100.937158279,100.877324577,100.817816329,100.758630377,
253 100.6997636,100.641212922,100.582975306,100.525047756,100.467427312,
254 100.410111057,100.353096108,100.296379621,100.23995879,100.183830844,
255 100.127993045,100.072442696,100.017177128,99.9621937113,99.9074898464,
256 99.8530629679,99.7989105427,99.7450300696,99.6914190787,99.6380751312,
257 99.5849958187,99.5321787628,99.4796216147,99.4273220547,99.3752777916,
258 99.3234865625,99.2719461323,99.2206542933,99.1696088648,99.1188076924,
259 99.0682486481,99.0179296296,98.9678485599,98.918003387,98.8683920837,
260 98.8190126467,98.769863097,98.7209414788,98.6722458598,98.6237743302,
261 98.5755250031,98.5274960135,98.4796855184,98.4320916962,98.3847127468,
262 98.3375468908,98.2905923695,98.2438474444,98.1973103972,98.1509795293,
263 98.1048531614,98.0589296337,98.013207305,97.9676845528,97.922359773,
264 97.8772313798,97.8322978049,97.7875574979,97.7430089255,97.6986505718,
265 97.6544809376,97.6104985402,97.5667019136,97.5230896077,97.4796601886,
266 97.4364122381,97.3933443532,97.3504551465,97.3077432458,97.2652072933,
267 97.2228459464,97.1806578767,97.1386417702,97.0967963268,97.0551202605,
268 97.0136122989,96.9722711833,96.931095668,96.8900845209,96.8492365225,
269 96.8085504664,96.7680251586,96.7276594179,96.687452075,96.6474019731,
270 96.6075079673,96.5677689244,96.528183723,96.4887512533,96.4494704166,
271 96.4103401258,96.3713593045,96.3325268876,96.2938418206,96.2553030595,
272 96.2169095712,96.1786603327,96.1405543314,96.1025905648,96.0647680402,
273 96.0270857751,95.9895427965,95.9521381411,95.9148708551,95.8777399941,
274 95.840744623,95.8038838156,95.767156655,95.7305622332,95.6940996508,
275 95.6577680174,95.621566451,95.5854940781,95.5495500336,95.5137334607,
276 95.4780435108,95.4424793434,95.4070401257,95.3717250333,95.3365332491,
277 95.3014639639,95.2665163763,95.231689692,95.1969831244,95.1623958942,
278 95.1279272293,95.0935763647,95.0593425426,95.0252250121,94.9912230293,
279 94.957335857,94.9235627648,94.889903029,94.8563559325,94.8229207646,
280 94.7895968211,94.7563834042,94.7232798225,94.6902853904,94.6573994289,
281 94.6246212649,94.5919502312,94.5593856666,94.5269269159,94.4945733296,
282 94.4623242638,94.4301790804,94.398137147,94.3661978366,94.3343605276,
283 94.3026246041,94.2709894553,94.2394544758,94.2080190654,94.1766826291,
284 94.145444577,94.1143043243,94.0832612913,94.052314903,94.0214645895,
285 93.9907097857,93.9600499313,93.9294844707,93.899012853,93.8686345319,
286 93.8383489659,93.8081556177,93.7780539548,93.7480434489,93.7181235762,
287 93.6882938173,93.658553657,93.6289025843,93.5993400927,93.5698656795,
288 93.5404788464,93.5111790989,93.4819659468,93.4528389037,93.4237974873,
289 93.3948412191,93.3659696245,93.3371822327,93.3084785767,93.2798581933,
290 93.2513206229,93.2228654096,93.1944921013,93.1662002492,93.1379894083,
291 93.109859137,93.0818089971,93.0538385542,93.0259473769,92.9981350374,
292 92.9704011112,92.9427451771,92.9151668171,92.8876656167,92.8602411644,
293 92.8328930518,92.8056208739,92.7784242286,92.7513027171,92.7242559433,
294 92.6972835146,92.670385041,92.6435601356,92.6168084145,92.5901294966,
295 92.5635230038,92.5369885607,92.5105257949,92.4841343366,92.4578138189,
296 92.4315638777,92.4053841514,92.3792742812,92.353233911,92.3272626873,
297 92.3013602592,92.2755262785,92.2497603994,92.2240622787,92.1984315757,
298 92.1728679522,92.1473710724,92.1219406032,92.0965762136,92.0712775751,
299 92.0460443617,92.0208762495,91.9957729173,91.9707340457,91.9457593182,
300 91.9208484199,91.8960010388,91.8712168645,91.8464955894,91.8218369075,
301 91.7972405155,91.7727061118,91.7482333973,91.7238220746,91.6994718488,
302 91.6751824268,91.6509535176,91.6267848322,91.6026760837,91.5786269871,
303 91.5546372594,91.5307066197,91.5068347888,91.4830214895,91.4592664466,
304 91.4355693866,91.4119300382,91.3883481315,91.3648233988,91.3413555741,
305 91.3179443931,91.2945895935,91.2712909146,91.2480480975,91.224860885,
306 91.2017290219,91.1786522542,91.1556303301,91.1326629992,91.1097500128,
307 91.086891124,91.0640860873,91.041334659,91.0186365969,90.9959916605,
308 90.9733996109,90.9508602106,90.9283732238,90.9059384162,90.883555555,
309 90.8612244091,90.8389447485,90.8167163451,90.7945389721,90.7724124041,
310 90.7503364174,90.7283107894,90.7063352991,90.6844097271,90.6625338551,
311 90.6407074663,90.6189303453,90.5972022781,90.5755230521,90.5538924558,
312 90.5323102793,90.510776314,90.4892903525,90.4678521887,90.4464616179,
313 90.4251184365,90.4038224425,90.3825734349,90.3613712139,90.3402155812,
314 90.3191063395,90.2980432928,90.2770262463,90.2560550065,90.2351293809,
315 90.2142491783,90.1934142087,90.1726242833,90.1518792142,90.131178815,
316 90.1105229001,90.0899112853,90.0693437874,90.0488202242,90.0283404148,
317 90.0079041793,89.9875113389,89.9671617157,89.9468551333,89.9265914158,
318 89.9063703888,89.8861918787,89.866055713,89.8459617203,89.82590973,
319 89.8058995729,89.7859310803,89.7660040849,89.7461184202,89.7262739206,
320 89.7064704218,89.68670776,89.6669857728,89.6473042984,89.6276631762,
321 89.6080622464,89.5885013501,89.5689803294,89.5494990274,89.5300572878,
322 89.5106549554,89.491291876,89.4719678961,89.4526828632,89.4334366256,
323 89.4142290324,89.3950599338,89.3759291805,89.3568366244,89.3377821181,
324 89.3187655149,89.2997866691,89.2808454357,89.2619416708,89.2430752308,
325 89.2242459734,89.2054537569,89.1866984403,89.1679798835,89.1492979471,
326 89.1306524926,89.1120433823,89.0934704789,89.0749336464,89.056432749,
327 89.0379676522,89.0195382218,89.0011443245,88.9827858277,88.9644625997,
328 88.9461745092,88.927921426,88.9097032202,88.8915197629,88.8733709258,
329 88.8552565813,88.8371766024,88.8191308631,88.8011192377,88.7831416014,
330 88.7651978299,88.7472877998,88.7294113881,88.7115684728,88.6937589321,
331 88.6759826453,88.658239492,88.6405293526,88.6228521081,88.6052076402,
332 88.5875958312,88.5700165638,88.5524697217,88.5349551889,88.5174728501,
333 88.5000225908,88.4826042968,88.4652178545,88.4478631513,88.4305400746,
334 88.413248513,88.3959883551,88.3787594905,88.3615618091,88.3443952016,
335 88.3272595591,88.3101547733,88.2930807364,88.2760373414,88.2590244815,
336 88.2420420507,88.2250899434,88.2081680546,88.1912762799,88.1744145152,
337 88.1575826573,88.1407806031,88.1240082504,88.1072654973,88.0905522424,
338 88.0738683849,88.0572138245,88.0405884613,88.0239921962,88.0074249301,
339 87.9908865649,87.9743770026,87.9578961459,87.941443898,87.9250201625,
340 87.9086248434,87.8922578454,87.8759190734,87.859608433,87.8433258301,
341 87.8270711713,87.8108443633,87.7946453135,87.7784739298,87.7623301204,
342 87.746213794,87.7301248597,87.7140632271,87.6980288064,87.6820215078,
343 87.6660412424,87.6500879215,87.6341614567,87.6182617604,87.6023887451,
344 87.5865423238,87.57072241,87.5549289176,87.5391617608,87.5234208543,
345 87.5077061131,87.4920174528,87.4763547894,87.4607180389,87.4451071183,
346 87.4295219444,87.4139624349,87.3984285076,87.3829200807,87.3674370729,
347 87.3519794032,87.3365469909,87.321139756,87.3057576185,87.2904004989,
348 87.2750683183,87.2597609977,87.2444784589,87.2292206238,87.2139874149,
349 87.1987787547,87.1835945665,87.1684347736,87.1532992998,87.1381880693,
350 87.1231010065,87.1080380363,87.0929990838,87.0779840746,87.0629929344,
351 87.0480255896,87.0330819666,87.0181619923,87.0032655939,86.988392699,
352 86.9735432353,86.9587171311,86.9439143149,86.9291347155,86.914378262,
353 86.899644884,86.8849345112,86.8702470737,86.855582502,86.8409407267,
354 86.8263216789,86.81172529,86.7971514915,86.7826002155,86.7680713942,
355 86.7535649602,86.7390808462,86.7246189855,86.7101793115,86.695761758,
356 86.681366259,86.6669927487,86.6526411619,86.6383114334,86.6240034983,
357 86.6097172923,86.5954527509,86.5812098103,86.5669884067,86.5527884768,
358 86.5386099573,86.5244527855,86.5103168987,86.4962022346,86.4821087312,
359 86.4680363266,86.4539849594,86.4399545682,86.4259450922,86.4119564705,
360 86.3979886428,86.3840415487,86.3701151284,86.356209322,86.3423240703,
361 86.328459314,86.3146149941,86.3007910521,86.2869874293,86.2732040677,
362 86.2594409093,86.2456978963,86.2319749714,86.2182720773,86.204589157,
363 86.1909261539,86.1772830113,86.1636596731,86.1500560831,86.1364721857,
364 86.1229079253,86.1093632464,86.0958380941,86.0823324135,86.0688461498,
365 86.0553792488,86.0419316561,86.0285033179,86.0150941804,86.0017041901,
366 85.9883332936,85.9749814379,85.9616485701,85.9483346376,85.935039588,
367 85.9217633689,85.9085059285,85.8952672149,85.8820471765,85.868845762,
368 85.8556629201,85.8424986001,85.829352751,85.8162253223,85.8031162638,
369 85.7900255253,85.7769530568,85.7638988086,85.7508627312,85.7378447752,
370 85.7248448915,85.7118630312,85.6988991455,85.6859531858,85.6730251039,
371 85.6601148515,85.6472223807,85.6343476437,85.6214905929,85.608651181,
372 85.5958293606,85.5830250847,85.5702383066,85.5574689796,85.5447170572,
373 85.531982493,85.5192652411,85.5065652554,85.4938824903,85.4812169001,
374 85.4685684394,85.4559370631,85.4433227262,85.4307253837,85.4181449909,
375 85.4055815034,85.3930348768,85.380505067,85.36799203,85.3554957218,
376 85.3430160989,85.3305531178,85.3181067352,85.3056769079,85.2932635929,
377 85.2808667474,85.2684863287,85.2561222943,85.243774602,85.2314432095,
378 85.2191280748,85.2068291561,85.1945464117,85.1822798,85.1700292797,
379 85.1577948095,85.1455763484,85.1333738555,85.1211872901,85.1090166115,
380 85.0968617793,85.0847227531,85.0725994929,85.0604919587,85.0484001106,
381 85.036323909,85.0242633142,85.0122182869,85.0001887879,84.988174778,
382 84.9761762183,84.96419307,84.9522252944,84.940272853,84.9283357074,
383 84.9164138193,84.9045071507,84.8926156637,84.8807393203,84.8688780829,
384 84.8570319141,84.8452007763,84.8333846323,84.821583445,84.8097971775,
385 84.7980257927,84.7862692541,84.7745275251,84.7628005691,84.7510883499,
386 84.7393908313,84.7277079772,84.7160397517,84.704386119,84.6927470434,
387 84.6811224894,84.6695124216,84.6579168048,84.6463356037,84.6347687833,
388 84.6232163088,84.6116781453,84.6001542582,84.588644613,84.5771491752,
389 84.5656679107,84.5542007852,84.5427477647,84.5313088153,84.5198839031,
390 84.5084729946,84.4970760562,84.4856930544,84.4743239558,84.4629687275,
391 84.4516273361,84.4402997488,84.4289859327,84.4176858551,84.4063994834,
392 84.395126785,84.3838677277,84.372622279,84.3613904068,84.3501720791,
393 84.338967264,84.3277759297,84.3165980443,84.3054335763,84.2942824943,
394 84.2831447667,84.2720203625,84.2609092503,84.2498113991,84.238726778,
395 84.2276553561,84.2165971027,84.2055519872,84.194519979,84.1835010476,
396 84.1724951629,84.1615022946,84.1505224125,84.1395554866,84.1286014871,
397 84.1176603842,84.1067321481,84.0958167492,84.0849141581,84.0740243453,
398 84.0631472816,84.0522829378,84.0414312847,84.0305922934,84.0197659349,
399 84.0089521804,83.9981510014,83.987362369,83.9765862548,83.9658226305,
400 83.9550714676,83.944332738,83.9336064135,83.922892466,83.9121908677,
401 83.9015015907,83.8908246072,83.8801598895,83.8695074102,83.8588671416,
402 83.8482390564,83.8376231274,83.8270193272,83.8164276289,83.8058480053,
403 83.7952804295,83.7847248747,83.774181314,83.763649721,83.7531300688,
404 83.7426223311,83.7321264815,83.7216424936,83.7111703411,83.700709998,
405 83.6902614382,83.6798246356,83.6693995644,83.6589861988,83.648584513,
406 83.6381944814,83.6278160785,83.6174492788,83.6070940568,83.5967503873,
407 83.586418245,83.5760976048,83.5657884417,83.5554907305,83.5452044465,
408 83.5349295648,83.5246660606,83.5144139094,83.5041730864,83.4939435673,
409 83.4837253275,83.4735183427,83.4633225887,83.4531380413,83.4429646763,
410 83.4328024696,83.4226513974,83.4125114358,83.4023825609,83.392264749,
411 83.3821579764,83.3720622196,83.361977455,83.3519036592,83.3418408089,
412 83.3317888807,83.3217478514,83.3117176979,83.3016983972,83.2916899262,
413 83.281692262,83.2717053817,83.2617292627,83.251763882,83.2418092172,
414 83.2318652457,83.2219319449,83.2120092924,83.2020972659,83.1921958431,
415 83.1823050018,83.1724247198,83.162554975,83.1526957454,83.1428470091,
416 83.1330087443,83.123180929,83.1133635416,83.1035565603,83.0937599636,
417 83.08397373,83.0741978379,83.064432266,83.0546769929,83.0449319973,
418 83.035197258,83.0254727539,83.0157584639,83.006054367,82.9963604422,
419 82.9866766686,82.9770030254,82.9673394918,82.9576860472,82.9480426709,
420 82.9384093423,82.9287860409,82.9191727463,82.9095694381,82.8999760959,
421 82.8903926995,82.8808192286,82.8712556633,82.8617019832,82.8521581685,
422 82.8426241992,82.8331000553,82.8235857171,82.8140811647,82.8045863785,
423 82.7951013386,82.7856260257,82.77616042,82.7667045022,82.7572582527,
424 82.7478216522,82.7383946815,82.7289773211,82.719569552,82.710171355,
425 82.700782711,82.6914036009,82.6820340059,82.6726739069,82.6633232851,
426 82.6539821217,82.644650398,82.6353280953,82.6260151948,82.6167116781,
427 82.6074175266,82.5981327217,82.5888572452,82.5795910786,82.5703342036,
428 82.5610866019,82.5518482554,82.5426191458,82.5333992551,82.5241885652,
429 82.5149870582,82.505794716,82.4966115208,82.4874374547,82.4782724999,
430 82.4691166388,82.4599698535,82.4508321266,82.4417034403,82.4325837772,
431 82.4234731197,82.4143714505,82.4052787521,82.3961950073,82.3871201986,
432 82.378054309,82.3689973211,82.3599492179,82.3509099823,82.3418795973,
433 82.3328580457,82.3238453108,82.3148413756,82.3058462233,82.296859837,
434 82.2878822
435 }
436 },
437 {
438 // Ri = 250k
439 -5,5,200,2001, {
440 249.98706929,249.986851225,249.986629489,249.986404021,249.986174757,
441 249.985941635,249.985704589,249.985463554,249.985218463,249.984969247,
442 249.984715838,249.984458166,249.984196158,249.983929743,249.983658846,
443 249.983383392,249.983103306,249.982818508,249.982528921,249.982234464,
444 249.981935056,249.981630613,249.981321052,249.981006287,249.98068623,
445 249.980360793,249.980029887,249.979693419,249.979351296,249.979003424,
446 249.978649708,249.978290048,249.977924346,249.9775525,249.977174409,
447 249.976789967,249.976399069,249.976001606,249.97559747,249.975186548,
448 249.974768727,249.974343893,249.973911927,249.973472711,249.973026125,
449 249.972572044,249.972110345,249.9716409,249.971163579,249.970678252,
450 249.970184785,249.969683043,249.969172887,249.968654177,249.968126772,
451 249.967590526,249.967045292,249.96649092,249.965927258,249.965354153,
452 249.964771446,249.964178978,249.963576587,249.962964107,249.962341372,
453 249.961708211,249.96106445,249.960409914,249.959744424,249.959067797,
454 249.95837985,249.957680393,249.956969237,249.956246188,249.955511048,
455 249.954763616,249.95400369,249.953231063,249.952445523,249.951646857,
456 249.950834849,249.950009276,249.949169916,249.94831654,249.947448916,
457 249.946566809,249.945669979,249.944758184,249.943831177,249.942888706,
458 249.941930516,249.940956349,249.93996594,249.938959023,249.937935324,
459 249.936894568,249.935836475,249.934760758,249.933667127,249.932555289,
460 249.931424944,249.930275788,249.929107511,249.9279198,249.926712337,
461 249.925484796,249.92423685,249.922968162,249.921678394,249.9203672,
462 249.91903423,249.917679127,249.916301529,249.914901069,249.913477372,
463 249.912030061,249.910558748,249.909063042,249.907542547,249.905996856,
464 249.904425561,249.902828244,249.901204482,249.899553844,249.897875894,
465 249.896170188,249.894436274,249.892673696,249.890881989,249.889060679,
466 249.887209288,249.885327328,249.883414305,249.881469716,249.879493052,
467 249.877483793,249.875441414,249.87336538,249.87125515,249.869110171,
468 249.866929885,249.864713724,249.86246111,249.860171458,249.857844173,
469 249.855478652,249.853074281,249.850630438,249.848146491,249.845621799,
470 249.843055711,249.840447565,249.837796689,249.835102404,249.832364016,
471 249.829580824,249.826752115,249.823877166,249.820955243,249.8179856,
472 249.81496748,249.811900117,249.80878273,249.80561453,249.802394713,
473 249.799122465,249.795796959,249.792417358,249.788982809,249.785492449,
474 249.781945403,249.778340779,249.774677678,249.770955183,249.767172365,
475 249.763328284,249.759421981,249.75545249,249.751418824,249.747319988,
476 249.743154968,249.738922738,249.734622257,249.730252468,249.725812301,
477 249.72130067,249.716716471,249.712058589,249.70732589,249.702517225,
478 249.697631429,249.692667321,249.687623703,249.682499361,249.677293063,
479 249.672003562,249.666629592,249.661169871,249.655623098,249.649987954,
480 249.644263106,249.638447197,249.632538857,249.626536694,249.620439299,
481 249.614245244,249.607953082,249.601561346,249.59506855,249.588473189,
482 249.581773739,249.574968653,249.568056367,249.561035295,249.553903831,
483 249.546660348,249.5393032,249.531830718,249.524241211,249.516532969,
484 249.508704259,249.500753327,249.492678397,249.48447767,249.476149326,
485 249.467691521,249.459102391,249.450380046,249.441522576,249.432528047,
486 249.423394501,249.414119957,249.404702411,249.395139834,249.385430176,
487 249.37557136,249.365561287,249.355397831,249.345078845,249.334602156,
488 249.323965565,249.313166851,249.302203767,249.291074039,249.27977537,
489 249.268305439,249.256661896,249.244842368,249.232844458,249.220665739,
490 249.208303762,249.195756051,249.183020104,249.170093394,249.156973366,
491 249.143657441,249.130143014,249.116427453,249.102508098,249.088382267,
492 249.074047249,249.059500307,249.044738677,249.029759572,249.014560175,
493 248.999137645,248.983489114,248.967611688,248.951502446,248.935158442,
494 248.918576704,248.901754233,248.884688005,248.867374969,248.84981205,
495 248.831996145,248.813924127,248.795592843,248.776999115,248.75813974,
496 248.739011488,248.719611106,248.699935316,248.679980814,248.659744274,
497 248.639222342,248.618411645,248.597308781,248.575910327,248.554212837,
498 248.532212841,248.509906845,248.487291335,248.464362771,248.441117595,
499 248.417552224,248.393663055,248.369446462,248.344898801,248.320016406,
500 248.29479559,248.269232647,248.243323852,248.217065459,248.190453706,
501 248.163484811,248.136154974,248.108460379,248.080397191,248.05196156,
502 248.02314962,247.993957487,247.964381265,247.934417041,247.90406089,
503 247.87330887,247.84215703,247.810601403,247.778638011,247.746262866,
504 247.713471967,247.680261304,247.646626855,247.612564592,247.578070476,
505 247.543140462,247.507770494,247.471956513,247.435694453,247.398980241,
506 247.361809801,247.32417905,247.286083906,247.24752028,247.208484082,
507 247.168971222,247.128977608,247.088499147,247.047531748,247.006071321,
508 246.964113777,246.921655032,246.878691002,246.835217611,246.791230786,
509 246.746726458,246.701700567,246.656149059,246.610067888,246.563453016,
510 246.516300415,246.468606067,246.420365965,246.371576112,246.322232525,
511 246.272331233,246.22186828,246.170839723,246.119241635,246.067070105,
512 246.014321238,245.960991158,245.907076005,245.85257194,245.797475142,
513 245.741781811,245.685488168,245.628590456,245.57108494,245.512967909,
514 245.454235673,245.394884571,245.334910963,245.274311238,245.213081809,
515 245.151219118,245.088719633,245.025579852,244.961796302,244.897365539,
516 244.832284149,244.76654875,244.70015599,244.633102551,244.565385144,
517 244.497000518,244.427945453,244.358216762,244.287811295,244.216725936,
518 244.144957607,244.072503262,243.999359895,243.925524536,243.850994253,
519 243.775766153,243.699837378,243.623205113,243.545866579,243.467819039,
520 243.389059794,243.309586187,243.2293956,243.148485458,243.066853225,
521 242.984496408,242.901412556,242.817599259,242.733054149,242.647774903,
522 242.561759239,242.475004919,242.387509745,242.299271568,242.210288277,
523 242.120557808,242.03007814,241.938847296,241.846863343,241.75412439,
524 241.660628595,241.566374155,241.471359316,241.375582364,241.279041632,
525 241.181735498,241.083662381,240.984820749,240.88520911,240.78482602,
526 240.683670075,240.581739919,240.479034238,240.375551763,240.271291268,
527 240.166251571,240.060431535,239.953830064,239.846446107,239.738278656,
528 239.629326745,239.519589453,239.4090659,239.297755248,239.185656702,
529 239.072769509,238.959092958,238.84462638,238.729369145,238.613320666,
530 238.496480396,238.37884783,238.260422501,238.141203983,238.02119189,
531 237.900385875,237.778785628,237.656390882,237.533201405,237.409217004,
532 237.284437524,237.158862846,237.03249289,236.905327613,236.777367005,
533 236.648611095,236.519059947,236.38871366,236.257572368,236.125636239,
534 235.992905475,235.859380313,235.725061022,235.589947905,235.454041297,
535 235.317341565,235.179849108,235.041564357,234.902487774,234.762619849,
536 234.621961106,234.480512096,234.338273402,234.195245633,234.051429428,
537 233.906825454,233.761434407,233.615257009,233.468294009,233.320546182,
538 233.172014331,233.022699284,232.872601892,232.721723035,232.570063615,
539 232.417624559,232.264406816,232.110411361,231.955639189,231.800091321,
540 231.643768797,231.486672681,231.328804057,231.17016403,231.010753726,
541 230.850574292,230.689626893,230.527912715,230.365432962,230.202188857,
542 230.038181642,229.873412577,229.707882938,229.541594019,229.374547132,
543 229.206743604,229.038184779,228.868872017,228.698806692,228.527990194,
544 228.356423928,228.184109314,228.011047785,227.837240787,227.662689782,
545 227.487396243,227.311361655,227.134587519,226.957075345,226.778826655,
546 226.599842984,226.420125878,226.239676893,226.058497596,225.876589564,
547 225.693954385,225.510593656,225.326508984,225.141701984,224.956174281,
548 224.769927509,224.58296331,224.395283333,224.206889237,224.017782686,
549 223.827965353,223.637438918,223.446205069,223.254265497,223.061621903,
550 222.868275994,222.674229479,222.479484077,222.284041512,222.08790351,
551 221.891071805,221.693548135,221.495334244,221.296431876,221.096842785,
552 220.896568725,220.695611455,220.493972738,220.29165434,220.08865803,
553 219.88498558,219.680638766,219.475619366,219.269929161,219.063569932,
554 218.856543466,218.648851549,218.440495971,218.231478522,218.021800994,
555 217.811465182,217.60047288,217.388825884,217.176525993,216.963575003,
556 216.749974714,216.535726925,216.320833437,216.105296048,215.88911656,
557 215.672296774,215.45483849,215.236743508,215.018013629,214.798650652,
558 214.578656378,214.358032605,214.136781131,213.914903754,213.692402271,
559 213.469278477,213.245534168,213.021171136,212.796191175,212.570596077,
560 212.344387629,212.117567622,211.890137843,211.662100076,211.433456105,
561 211.204207714,210.974356681,210.743904787,210.512853806,210.281205515,
562 210.048961685,209.816124088,209.582694492,209.348674664,209.114066368,
563 208.878871366,208.643091418,208.406728281,208.169783711,207.93225946,
564 207.694157278,207.455478915,207.216226114,206.97640062,206.736004172,
565 206.49503851,206.253505367,206.011406477,205.768743571,205.525518376,
566 205.281732618,205.037388018,204.792486297,204.547029172,204.301018358,
567 204.054455568,203.80734251,203.559680893,203.31147242,203.062718793,
568 202.813421712,202.563582874,202.313203973,202.062286701,201.810832747,
569 201.558843799,201.306321542,201.053267658,200.799683826,200.545571726,
570 200.290933032,200.035769418,199.780082556,199.523874114,199.26714576,
571 199.00989916,198.752135977,198.493857873,198.235066508,197.97576354,
572 197.715950626,197.455629421,197.19480158,196.933468754,196.671632596,
573 196.409294756,196.146456882,195.883120624,195.619287629,195.354959544,
574 195.090138015,194.824824689,194.559021212,194.292729229,194.025950385,
575 193.758686328,193.490938703,193.222709157,192.953999338,192.684810894,
576 192.415145475,192.145004731,191.874390314,191.603303879,191.331747082,
577 191.059721579,190.787229033,190.514271105,190.240849462,189.966965773,
578 189.69262171,189.417818949,189.14255917,188.866844059,188.590675304,
579 188.314054599,188.036983645,187.759464146,187.481497813,187.203086365,
580 186.924231527,186.64493503,186.365198614,186.085024028,185.804413028,
581 185.523367379,185.241888858,184.95997925,184.677640352,184.394873972,
582 184.11168193,183.828066057,183.544028199,183.259570217,182.974693983,
583 182.689401387,182.403694334,182.117574747,181.831044563,181.544105742,
584 181.25676026,180.969010115,180.680857324,180.392303929,180.103351992,
585 179.814003602,179.524260869,179.234125934,178.943600962,178.652688148,
586 178.361389716,178.069707923,177.777645057,177.485203439,177.192385426,
587 176.899193414,176.605629834,176.311697159,176.017397903,175.722734622,
588 175.42770992,175.132326446,174.836586898,174.540494025,174.244050629,
589 173.947259568,173.650123755,173.352646164,173.054829832,172.756677859,
590 172.458193411,172.159379726,171.860240112,171.560777954,171.260996712,
591 170.960899932,170.660491239,170.359774348,170.058753063,169.757431286,
592 169.455813011,169.153902337,168.851703468,168.549220714,168.246458503,
593 167.943421374,167.640113993,167.336541149,167.032707762,166.728618886,
594 166.424279716,166.119695592,165.814872003,165.509814594,165.204529171,
595 164.899021704,164.593298336,164.287365388,163.981229364,163.674896958,
596 163.36837506,163.061670761,162.754791362,162.447744379,162.140537551,
597 161.833178847,161.525676469,161.218038867,160.91027474,160.602393044,
598 160.294403003,159.986314114,159.678136154,159.369879193,159.061553594,
599 158.753170027,158.444739474,158.13627324,157.827782957,157.519280595,
600 157.21077847,156.90228925,156.593825964,156.285402011,155.977031166,
601 155.668727586,155.360505823,155.052380826,154.744367948,154.436482957,
602 154.128742038,153.821161801,153.513759285,153.206551968,152.899557763,
603 152.592795032,152.286282581,151.980039672,151.674086016,151.368441781,
604 151.063127591,150.758164527,150.453574123,150.149378371,149.84559971,
605 149.542261029,149.239385659,148.936997368,148.635120356,148.333779243,
606 148.032999061,147.732805244,147.433223619,147.134280384,146.836002101,
607 146.538415678,146.241548349,145.945427656,145.650081429,145.355537765,
608 145.061825,144.768971689,144.477006578,144.185958573,143.895856717,
609 143.606730155,143.318608101,143.031519811,142.745494544,142.460561528,
610 142.176749925,141.894088794,141.612607053,141.33233344,141.053296478,
611 140.775524432,140.499045269,140.223886626,139.950075761,139.677639521,
612 139.406604303,139.13699601,138.86884002,138.602161147,138.336983605,
613 138.073330973,137.811226163,137.550691387,137.291748127,137.034417106,
614 136.778718261,136.524670718,136.272292766,136.021601842,135.772614503,
615 135.525346418,135.279812345,135.036026122,134.79400066,134.553747926,
616 134.315278945,134.078603792,133.843731591,133.610670518,133.379427799,
617 133.150009719,132.922421627,132.696667945,132.472752176,132.25067692,
618 132.030443888,131.812053912,131.595506968,131.380802191,131.167937895,
619 130.956911595,130.747720026,130.540359167,130.334824266,130.13110986,
620 129.929209804,129.729117294,129.53082489,129.334324549,129.139607641,
621 128.946664984,128.755486867,128.566063074,128.378382911,128.192435235,
622 128.008208475,127.82569066,127.644869442,127.465732122,127.288265674,
623 127.112456765,126.938291784,126.765756859,126.594837879,126.425520519,
624 126.257790258,126.091632396,125.92703208,125.763974314,125.602443985,
625 125.442425874,125.283904673,125.126865007,124.971291439,124.817168494,
626 124.664480664,124.51321243,124.363348265,124.214872655,124.067770102,
627 123.922025141,123.777622345,123.634546339,123.492781803,123.352313488,
628 123.213126215,123.075204892,122.938534511,122.803100162,122.668887034,
629 122.535880424,122.404065739,122.273428504,122.143954363,122.015629084,
630 121.888438563,121.76236883,121.637406044,121.513536504,121.390746648,
631 121.269023054,121.148352444,121.028721683,120.910117783,120.792527903,
632 120.675939349,120.560339577,120.445716191,120.332056945,120.219349742,
633 120.107582636,119.996743831,119.886821679,119.777804682,119.669681491,
634 119.562440905,119.45607187,119.350563481,119.245904975,119.142085739,
635 119.039095299,118.936923328,118.835559639,118.734994187,118.635217064,
636 118.536218503,118.437988872,118.340518677,118.243798555,118.147819277,
637 118.052571748,117.958046998,117.864236189,117.771130609,117.678721671,
638 117.587000912,117.495959991,117.405590688,117.315884902,117.226834649,
639 117.138432063,117.050669391,116.963538993,116.87703334,116.791145014,
640 116.705866704,116.621191207,116.537111424,116.453620361,116.370711124,
641 116.288376922,116.206611062,116.125406949,116.044758083,115.964658061,
642 115.885100572,115.806079397,115.727588408,115.649621564,115.572172916,
643 115.495236596,115.418806826,115.342877908,115.267444229,115.192500255,
644 115.118040534,115.04405969,114.970552425,114.89751352,114.824937826,
645 114.752820271,114.681155856,114.60993965,114.539166794,114.4688325,
646 114.398932045,114.329460774,114.260414097,114.191787491,114.123576494,
647 114.055776708,113.988383796,113.921393483,113.854801553,113.788603846,
648 113.722796265,113.657374766,113.592335361,113.527674118,113.463387161,
649 113.399470663,113.335920853,113.27273401,113.209906463,113.147434593,
650 113.085314829,113.023543648,112.962117574,112.901033179,112.840287082,
651 112.779875944,112.719796474,112.660045423,112.600619585,112.541515797,
652 112.482730939,112.42426193,112.36610573,112.308259341,112.250719802,
653 112.19348419,112.136549623,112.079913253,112.023572271,111.967523904,
654 111.911765414,111.856294098,111.801107289,111.746202353,111.691576689,
655 111.637227729,111.583152939,111.529349816,111.475815888,111.422548715,
656 111.369545886,111.316805023,111.264323773,111.212099817,111.160130862,
657 111.108414643,111.056948924,111.005731497,110.954760178,110.904032814,
658 110.853547274,110.803301456,110.75329328,110.703520696,110.653981674,
659 110.60467421,110.555596324,110.50674606,110.458121485,110.409720688,
660 110.361541782,110.313582902,110.265842202,110.218317863,110.171008082,
661 110.123911081,110.077025099,110.030348399,109.983879261,109.937615986,
662 109.891556896,109.845700329,109.800044645,109.754588221,109.709329453,
663 109.664266754,109.619398556,109.57472331,109.530239481,109.485945553,
664 109.441840028,109.397921423,109.354188272,109.310639125,109.267272548,
665 109.224087122,109.181081447,109.138254133,109.095603809,109.053129118,
666 109.010828717,108.968701278,108.926745487,108.884960045,108.843343665,
667 108.801895077,108.760613021,108.719496253,108.67854354,108.637753663,
668 108.597125417,108.556657609,108.516349056,108.476198591,108.436205057,
669 108.39636731,108.356684217,108.317154657,108.277777521,108.238551712,
670 108.199476141,108.160549735,108.121771427,108.083140165,108.044654905,
671 108.006314614,107.96811827,107.930064861,107.892153386,107.854382852,
672 107.816752278,107.77926069,107.741907128,107.704690637,107.667610274,
673 107.630665104,107.593854203,107.557176653,107.520631548,107.48421799,
674 107.447935087,107.41178196,107.375757736,107.339861549,107.304092545,
675 107.268449875,107.2329327,107.197540188,107.162271514,107.127125864,
676 107.092102428,107.057200405,107.022419004,106.987757437,106.953214926,
677 106.9187907,106.884483995,106.850294054,106.816220127,106.78226147,
678 106.748417348,106.714687031,106.681069796,106.647564927,106.614171713,
679 106.580889453,106.547717448,106.514655009,106.48170145,106.448856093,
680 106.416118267,106.383487304,106.350962545,106.318543335,106.286229026,
681 106.254018974,106.221912543,106.189909101,106.158008021,106.126208684,
682 106.094510473,106.06291278,106.031414999,106.000016532,105.968716784,
683 105.937515166,105.906411094,105.87540399,105.844493279,105.813678393,
684 105.782958766,105.752333841,105.721803061,105.691365878,105.661021745,
685 105.630770122,105.600610472,105.570542264,105.540564971,105.51067807,
686 105.480881041,105.451173372,105.421554551,105.392024073,105.362581436,
687 105.333226143,105.3039577,105.274775617,105.245679411,105.216668597,
688 105.1877427,105.158901246,105.130143764,105.101469788,105.072878857,
689 105.04437051,105.015944294,104.987599757,104.959336451,104.931153932,
690 104.903051759,104.875029495,104.847086706,104.819222962,104.791437835,
691 104.763730902,104.736101743,104.708549941,104.681075081,104.653676754,
692 104.626354551,104.599108068,104.571936905,104.544840663,104.517818946,
693 104.490871364,104.463997527,104.437197048,104.410469545,104.383814638,
694 104.357231948,104.330721102,104.304281728,104.277913457,104.251615922,
695 104.225388761,104.199231613,104.173144119,104.147125925,104.121176677,
696 104.095296026,104.069483624,104.043739125,104.018062189,103.992452474,
697 103.966909643,103.941433361,103.916023296,103.890679118,103.865400498,
698 103.840187112,103.815038637,103.789954751,103.764935137,103.739979478,
699 103.715087461,103.690258774,103.665493107,103.640790154,103.616149609,
700 103.59157117,103.567054536,103.542599408,103.51820549,103.493872487,
701 103.469600108,103.445388062,103.42123606,103.397143817,103.373111047,
702 103.34913747,103.325222804,103.301366771,103.277569095,103.253829501,
703 103.230147716,103.206523469,103.182956493,103.159446518,103.13599328,
704 103.112596516,103.089255964,103.065971363,103.042742456,103.019568986,
705 102.996450698,102.97338734,102.950378659,102.927424406,102.904524334,
706 102.881678195,102.858885746,102.836146742,102.813460943,102.790828108,
707 102.768247999,102.74572038,102.723245015,102.700821671,102.678450115,
708 102.656130116,102.633861446,102.611643877,102.589477183,102.567361139,
709 102.545295522,102.523280109,102.501314681,102.479399019,102.457532905,
710 102.435716122,102.413948457,102.392229695,102.370559624,102.348938035,
711 102.327364716,102.305839461,102.284362062,102.262932314,102.241550013,
712 102.220214956,102.198926941,102.177685768,102.156491237,102.135343152,
713 102.114241314,102.093185529,102.072175603,102.051211342,102.030292555,
714 102.009419051,101.98859064,101.967807134,101.947068347,101.926374091,
715 101.905724182,101.885118436,101.864556671,101.844038704,101.823564356,
716 101.803133447,101.782745799,101.762401235,101.742099578,101.721840653,
717 101.701624287,101.681450305,101.661318537,101.641228811,101.621180958,
718 101.601174808,101.581210193,101.561286947,101.541404903,101.521563896,
719 101.501763763,101.482004341,101.462285466,101.442606979,101.422968719,
720 101.403370526,101.383812242,101.36429371,101.344814774,101.325375276,
721 101.305975064,101.286613983,101.267291879,101.248008601,101.228763999,
722 101.20955792,101.190390216,101.171260738,101.152169339,101.133115871,
723 101.114100189,101.095122146,101.076181599,101.057278403,101.038412416,
724 101.019583497,101.000791503,100.982036294,100.96331773,100.944635673,
725 100.925989984,100.907380526,100.888807163,100.870269758,100.851768177,
726 100.833302284,100.814871947,100.796477033,100.778117409,100.759792944,
727 100.741503507,100.723248969,100.705029199,100.68684407,100.668693453,
728 100.650577222,100.632495249,100.614447409,100.596433577,100.578453629,
729 100.56050744,100.542594887,100.524715848,100.506870202,100.489057826,
730 100.471278601,100.453532406,100.435819123,100.418138632,100.400490816,
731 100.382875557,100.365292739,100.347742246,100.330223961,100.312737771,
732 100.29528356,100.277861215,100.260470623,100.243111672,100.225784249,
733 100.208488243,100.191223543,100.17399004,100.156787623,100.139616184,
734 100.122475614,100.105365804,100.088286649,100.07123804,100.054219871,
735 100.037232038,100.020274434,100.003346955,99.9864494965,99.9695819554,
736 99.9527442284,99.935936213,99.9191578071,99.9024089092,99.8856894183,
737 99.8689992338,99.8523382559,99.8357063851,99.8191035222,99.8025295689,
738 99.7859844271,99.7694679993,99.7529801885,99.7365208981,99.7200900321,
739 99.7036874949,99.6873131914,99.6709670269,99.6546489073,99.6383587388,
740 99.6220964281,99.6058618826,99.5896550097,99.5734757178,99.5573239152,
741 99.5411995111,99.5251024148,99.5090325364,99.492989786,99.4769740745,
742 99.460985313,99.4450234132,99.4290882872,99.4131798474,99.3972980067,
743 99.3814426785,99.3656137764,99.3498112147,99.3340349078,99.3182847708,
744 99.3025607191,99.2868626683,99.2711905347,99.2555442348,99.2399236857,
745 99.2243288047,99.2087595095,99.1932157183,99.1776973497,99.1622043225,
746 99.146736556,99.1312939699,99.1158764842,99.1004840195,99.0851164964,
747 99.0697738362,99.0544559603,99.0391627907,99.0238942497,99.0086502598,
748 98.993430744,98.9782356258,98.9630648287,98.9479182768,98.9327958945,
749 98.9176976065,98.902623338,98.8875730143,98.8725465613,98.857543905,
750 98.8425649718,98.8276096887,98.8126779826,98.7977697811,98.7828850119,
751 98.7680236031,98.7531854831,98.7383705808,98.7235788251,98.7088101455,
752 98.6940644717,98.6793417336,98.6646418617,98.6499647867,98.6353104394,
753 98.6206787511,98.6060696534,98.5914830783,98.5769189578,98.5623772246,
754 98.5478578113,98.533360651,98.5188856772,98.5044328236,98.490002024,
755 98.4755932127,98.4612063243,98.4468412937,98.4324980559,98.4181765464,
756 98.4038767009,98.3895984552,98.3753417457,98.361106509,98.3468926817,
757 98.332700201,98.3185290043,98.3043790291,98.2902502134,98.2761424952,
758 98.2620558131,98.2479901058,98.2339453121,98.2199213714,98.205918223,
759 98.1919358068,98.1779740627,98.164032931,98.1501123522,98.136212267,
760 98.1223326165,98.108473342,98.0946343849,98.080815687,98.0670171904,
761 98.0532388372,98.03948057,98.0257423315,98.0120240648,97.9983257129,
762 97.9846472195,97.9709885281,97.9573495827,97.9437303276,97.930130707,
763 97.9165506656,97.9029901484,97.8894491003,97.8759274667,97.8624251931,
764 97.8489422254,97.8354785095,97.8220339916,97.8086086182,97.795202336,
765 97.7818150918,97.7684468328,97.7550975062,97.7417670596,97.7284554407,
766 97.7151625976,97.7018884783,97.6886330313,97.6753962052,97.6621779488,
767 97.648978211,97.6357969412,97.6226340887,97.6094896032,97.5963634346,
768 97.5832555327,97.570165848,97.5570943308,97.5440409318,97.5310056019,
769 97.5179882919,97.5049889533,97.4920075374,97.4790439958,97.4660982804,
770 97.4531703431,97.4402601362,97.427367612,97.4144927232,97.4016354224,
771 97.3887956627,97.3759733971,97.3631685791,97.350381162,97.3376110997,
772 97.3248583459,97.3121228548,97.2994045805,97.2867034775,97.2740195003,
773 97.2613526038,97.2487027429,97.2360698727,97.2234539485,97.2108549257,
774 97.1982727601,97.1857074075,97.1731588237,97.1606269651,97.1481117878,
775 97.1356132485,97.1231313037,97.1106659104,97.0982170254,97.0857846061,
776 97.0733686096,97.0609689935,97.0485857155,97.0362187333,97.0238680049,
777 97.0115334885,96.9992151424,96.9869129251,96.974626795,96.9623567111,
778 96.9501026322,96.9378645174,96.925642326,96.9134360174,96.901245551,
779 96.8890708866,96.8769119841,96.8647688034,96.8526413048,96.8405294484,
780 96.8284331947,96.8163525044,96.8042873382,96.792237657,96.7802034217,
781 96.7681845937,96.7561811342,96.7441930046,96.7322201667,96.7202625821,
782 96.7083202128,96.6963930208,96.6844809683,96.6725840175,96.660702131,
783 96.6488352713,96.6369834012,96.6251464835,96.6133244813,96.6015173576,
784 96.5897250758,96.5779475993,96.5661848916,96.5544369164,96.5427036375,
785 96.5309850188,96.5192810244,96.5075916186,96.4959167655,96.4842564298,
786 96.472610576,96.4609791688,96.449362173,96.4377595536,96.4261712758,
787 96.4145973047,96.4030376057,96.3914921443,96.379960886,96.3684437966,
788 96.3569408419,96.3454519879,96.3339772007,96.3225164464,96.3110696914,
789 96.2996369022,96.2882180452,96.2768130873,96.2654219951,96.2540447357,
790 96.242681276,96.2313315832,96.2199956245,96.2086733674,96.1973647793,
791 96.1860698279,96.1747884809,96.1635207061,96.1522664715,96.1410257451,
792 96.1297984951,96.1185846898,96.1073842976,96.096197287,96.0850236266,
793 96.0738632851,96.0627162315,96.0515824345,96.0404618634,96.0293544871,
794 96.018260275,96.0071791965,95.9961112211,95.9850563182,95.9740144577,
795 95.9629856092,95.9519697427,95.9409668282,95.9299768358,95.9189997356,
796 95.908035498,95.8970840934,95.8861454923,95.8752196653,95.8643065831,
797 95.8534062165,95.8425185365,95.8316435139,95.82078112,95.8099313258,
798 95.7990941028,95.7882694223,95.7774572558,95.7666575748,95.7558703512,
799 95.7450955566,95.7343331628,95.723583142,95.7128454661,95.7021201073,
800 95.6914070379,95.6807062301,95.6700176564,95.6593412894,95.6486771016,
801 95.6380250658,95.6273851547,95.6167573413,95.6061415985,95.5955378994,
802 95.5849462171,95.5743665249,95.5637987962,95.5532430042,95.5426991226,
803 95.532167125,95.521646985,95.5111386764,95.500642173,95.4901574488,
804 95.4796844778,95.4692232342,95.4587736921,95.4483358257,95.4379096096,
805 95.4274950181,95.4170920257,95.406700607,95.3963207368,95.3859523898,
806 95.375595541,95.3652501651,95.3549162373,95.3445937326,95.3342826263,
807 95.3239828935,95.3136945097,95.3034174503,95.2931516907,95.2828972066,
808 95.2726539735,95.2624219673,95.2522011637,95.2419915386,95.231793068,
809 95.221605728,95.2114294947,95.2012643442,95.1911102528,95.1809671969,
810 95.1708351529,95.1607140973,95.1506040066,95.1405048576,95.1304166269,
811 95.1203392913,95.1102728277,95.100217213,95.0901724243,95.0801384386,
812 95.070115233,95.0601027849,95.0501010715,95.0401100701,95.0301297583,
813 95.0201601135,95.0102011132,95.0002527353,94.9903149573,94.9803877571,
814 94.9704711125,94.9605650015,94.950669402,94.9407842921,94.93090965,
815 94.9210454538,94.9111916818,94.9013483124,94.8915153239,94.8816926948,
816 94.8718804037,94.8620784292,94.8522867499,94.8425053445,94.8327341919,
817 94.8229732709,94.8132225604,94.8034820394,94.793751687,94.7840314824,
818 94.7743214046,94.7646214329,94.7549315467,94.7452517252,94.7355819481,
819 94.7259221946,94.7162724445,94.7066326773,94.6970028726,94.6873830104,
820 94.6777730702,94.6681730321,94.658582876,94.6490025817,94.6394321295,
821 94.6298714993,94.6203206714,94.610779626,94.6012483433,94.5917268037,
822 94.5822149877,94.5727128756,94.563220448,94.5537376855,94.5442645687,
823 94.5348010783,94.525347195,94.5159028997,94.5064681732,94.4970429965,
824 94.4876273505,94.4782212162,94.4688245748,94.4594374074,94.4500596952,
825 94.4406914195,94.4313325615,94.4219831026,94.4126430243,94.403312308,
826 94.3939909353,94.3846788878,94.375376147,94.3660826947,94.3567985126,
827 94.3475235826,94.3382578864,94.329001406,94.3197541234,94.3105160205,
828 94.3012870794,94.2920672823,94.2828566112,94.2736550485,94.2644625763,
829 94.255279177,94.2461048331,94.2369395268,94.2277832407,94.2186359572,
830 94.2094976591,94.2003683288,94.1912479492,94.1821365028,94.1730339724,
831 94.163940341,94.1548555913,94.1457797063,94.136712669,94.1276544623,
832 94.1186050694,94.1095644733,94.1005326572,94.0915096044,94.082495298,
833 94.0734897214,94.064492858,94.0555046911,94.0465252043,94.0375543809,
834 94.0285922045,94.0196386587,94.0106937272,94.0017573936,93.9928296417,
835 93.9839104552,93.974999818,93.9660977138,93.9572041267,93.9483190405,
836 93.9394424393,93.9305743071,93.921714628,93.9128633861,93.9040205657,
837 93.8951861508,93.8863601258,93.8775424751,93.8687331828,93.8599322335,
838 93.8511396116,93.8423553016,93.8335792879,93.8248115552,93.816052088,
839 93.8073008711,93.798557889,93.7898231266,93.7810965686,93.7723781999,
840 93.7636680053
841 }
842 }
843 };
+0
-824
src/LV2/gxamp.lv2/DSP/6C16.cc less more
0 // generated by ../../tools/tube_transfer.py
1 // tube: 6C16
2 // plate current function: triode
3 // mu: 42.2
4 // kx: 2.21
5 // kg1: 393
6 // kp: 629
7 // kvb: 446
8
9 table1d_imp<2001> tubetable_6C16[2] =
10 {
11 {
12 // Ri = 68k
13 -5,5,200,2001, {
14 214.806581677,214.650587712,214.494441388,214.338143449,214.181694635,
15 214.025095677,213.868347304,213.711450238,213.554405194,213.397212884,
16 213.239874013,213.082389282,212.924759385,212.766985013,212.60906685,
17 212.451005576,212.292801864,212.134456385,211.975969802,211.817342776,
18 211.658575961,211.499670005,211.340625555,211.181443251,211.022123727,
19 210.862667614,210.703075539,210.543348122,210.383485982,210.22348973,
20 210.063359973,209.903097317,209.742702359,209.582175694,209.421517913,
21 209.260729602,209.099811343,208.938763714,208.777587287,208.616282633,
22 208.454850316,208.293290899,208.131604938,207.969792986,207.807855593,
23 207.645793304,207.483606661,207.321296202,207.15886246,206.996305965,
24 206.833627244,206.67082682,206.507905211,206.344862933,206.181700497,
25 206.018418412,205.855017182,205.691497309,205.527859289,205.364103618,
26 205.200230785,205.036241278,204.872135582,204.707914176,204.543577538,
27 204.379126141,204.214560458,204.049880955,203.885088096,203.720182343,
28 203.555164155,203.390033984,203.224792285,203.059439505,202.893976089,
29 202.728402482,202.562719123,202.396926447,202.23102489,202.065014882,
30 201.898896852,201.732671223,201.56633842,201.399898861,201.233352963,
31 201.066701141,200.899943805,200.733081363,200.566114223,200.399042787,
32 200.231867455,200.064588626,199.897206695,199.729722054,199.562135094,
33 199.394446202,199.226655764,199.058764161,198.890771775,198.722678983,
34 198.554486159,198.386193678,198.217801909,198.04931122,197.880721977,
35 197.712034543,197.54324928,197.374366545,197.205386696,197.036310087,
36 196.86713707,196.697867994,196.528503206,196.359043053,196.189487877,
37 196.019838019,195.850093818,195.680255611,195.510323732,195.340298515,
38 195.170180288,194.999969382,194.829666122,194.659270832,194.488783835,
39 194.318205451,194.147535999,193.976775794,193.805925153,193.634984386,
40 193.463953805,193.292833719,193.121624434,192.950326255,192.778939486,
41 192.607464428,192.43590138,192.264250641,192.092512505,191.920687267,
42 191.74877522,191.576776653,191.404691857,191.232521118,191.060264721,
43 190.887922951,190.715496088,190.542984415,190.370388209,190.197707747,
44 190.024943305,189.852095157,189.679163575,189.50614883,189.33305119,
45 189.159870923,188.986608295,188.813263571,188.639837013,188.466328882,
46 188.292739439,188.119068941,187.945317645,187.771485807,187.597573681,
47 187.423581518,187.249509571,187.075358088,186.901127317,186.726817506,
48 186.552428899,186.377961741,186.203416274,186.028792738,185.854091375,
49 185.679312422,185.504456116,185.329522693,185.154512388,184.979425434,
50 184.804262062,184.629022504,184.453706988,184.278315742,184.102848994,
51 183.927306968,183.751689889,183.57599798,183.400231463,183.224390558,
52 183.048475484,182.872486461,182.696423704,182.520287429,182.344077852,
53 182.167795186,181.991439642,181.815011432,181.638510767,181.461937854,
54 181.285292902,181.108576118,180.931787707,180.754927872,180.577996819,
55 180.400994749,180.223921863,180.046778361,179.869564443,179.692280306,
56 179.514926148,179.337502164,179.16000855,178.982445499,178.804813204,
57 178.627111857,178.449341649,178.27150277,178.093595408,177.915619752,
58 177.737575989,177.559464305,177.381284884,177.203037911,177.024723568,
59 176.846342039,176.667893504,176.489378144,176.310796138,176.132147665,
60 175.953432902,175.774652027,175.595805214,175.416892639,175.237914476,
61 175.058870898,174.879762077,174.700588185,174.521349393,174.342045871,
62 174.162677786,173.983245308,173.803748604,173.624187839,173.444563181,
63 173.264874792,173.085122839,172.905307483,172.725428887,172.545487212,
64 172.365482621,172.185415271,172.005285324,171.825092937,171.644838268,
65 171.464521474,171.284142712,171.103702136,170.923199902,170.742636163,
66 170.562011074,170.381324785,170.20057745,170.019769219,169.838900242,
67 169.65797067,169.476980651,169.295930334,169.114819866,168.933649395,
68 168.752419065,168.571129024,168.389779415,168.208370384,168.026902072,
69 167.845374625,167.663788182,167.482142887,167.300438881,167.118676302,
70 166.936855292,166.754975989,166.573038531,166.391043057,166.208989703,
71 166.026878606,165.844709901,165.662483725,165.480200212,165.297859496,
72 165.11546171,164.933006988,164.750495462,164.567927263,164.385302523,
73 164.202621372,164.019883941,163.837090358,163.654240754,163.471335255,
74 163.288373991,163.105357087,162.922284672,162.739156871,162.555973809,
75 162.372735612,162.189442404,162.00609431,161.822691453,161.639233955,
76 161.45572194,161.272155529,161.088534844,160.904860005,160.721131134,
77 160.537348349,160.353511771,160.169621519,159.98567771,159.801680463,
78 159.617629896,159.433526124,159.249369266,159.065159437,158.880896752,
79 158.696581327,158.512213277,158.327792715,158.143319755,157.958794511,
80 157.774217096,157.589587621,157.4049062,157.220172943,157.035387961,
81 156.850551366,156.665663268,156.480723775,156.295732998,156.110691046,
82 155.925598028,155.74045405,155.555259222,155.37001365,155.184717441,
83 154.999370702,154.813973539,154.628526057,154.443028363,154.25748056,
84 154.071882754,153.886235049,153.700537548,153.514790354,153.328993572,
85 153.143147302,152.957251649,152.771306713,152.585312596,152.3992694,
86 152.213177225,152.027036171,151.840846339,151.654607829,151.46832074,
87 151.28198517,151.09560122,150.909168986,150.722688568,150.536160062,
88 150.349583566,150.162959178,149.976286994,149.78956711,149.602799623,
89 149.415984628,149.22912222,149.042212495,148.855255548,148.668251473,
90 148.481200364,148.294102315,148.106957419,147.919765771,147.732527463,
91 147.545242587,147.357911237,147.170533503,146.983109479,146.795639255,
92 146.608122923,146.420560573,146.232952297,146.045298185,145.857598327,
93 145.669852813,145.482061732,145.294225174,145.106343228,144.918415983,
94 144.730443527,144.542425949,144.354363336,144.166255777,143.978103358,
95 143.789906168,143.601664294,143.413377821,143.225046837,143.036671428,
96 142.848251681,142.65978768,142.471279512,142.282727262,142.094131015,
97 141.905490856,141.71680687,141.528079142,141.339307755,141.150492794,
98 140.961634343,140.772732485,140.583787303,140.394798882,140.205767303,
99 140.016692651,139.827575006,139.638414453,139.449211072,139.259964947,
100 139.070676158,138.881344788,138.691970919,138.50255463,138.313096004,
101 138.123595121,137.934052062,137.744466908,137.554839739,137.365170636,
102 137.175459677,136.985706944,136.795912515,136.606076471,136.416198891,
103 136.226279854,136.036319439,135.846317724,135.65627479,135.466190714,
104 135.276065574,135.08589945,134.895692419,134.70544456,134.515155949,
105 134.324826666,134.134456787,133.94404639,133.753595552,133.563104351,
106 133.372572864,133.182001167,132.991389337,132.800737452,132.610045587,
107 132.41931382,132.228542226,132.037730882,131.846879864,131.655989247,
108 131.465059109,131.274089524,131.083080569,130.892032318,130.700944849,
109 130.509818235,130.318652552,130.127447876,129.936204281,129.744921843,
110 129.553600637,129.362240737,129.170842219,128.979405156,128.787929624,
111 128.596415698,128.404863451,128.213272959,128.021644295,127.829977533,
112 127.638272749,127.446530017,127.254749409,127.062931001,126.871074867,
113 126.679181079,126.487249713,126.295280842,126.103274541,125.911230881,
114 125.719149938,125.527031786,125.334876497,125.142684145,124.950454804,
115 124.758188548,124.565885449,124.373545582,124.18116902,123.988755837,
116 123.796306105,123.603819898,123.41129729,123.218738354,123.026143164,
117 122.833511792,122.640844313,122.448140799,122.255401324,122.062625961,
118 121.869814784,121.676967866,121.484085281,121.291167101,121.098213401,
119 120.905224253,120.712199732,120.51913991,120.326044862,120.132914661,
120 119.93974938,119.746549093,119.553313874,119.360043796,119.166738933,
121 118.973399359,118.780025148,118.586616373,118.393173109,118.19969543,
122 118.006183409,117.81263712,117.619056639,117.425442039,117.231793394,
123 117.038110779,116.844394268,116.650643936,116.456859857,116.263042107,
124 116.069190759,115.87530589,115.681387573,115.487435884,115.293450898,
125 115.09943269,114.905381337,114.711296912,114.517179492,114.323029153,
126 114.128845971,113.93463002,113.740381379,113.546100122,113.351786326,
127 113.157440068,112.963061424,112.768650472,112.574207287,112.379731948,
128 112.185224531,111.990685114,111.796113774,111.601510589,111.406875638,
129 111.212208997,111.017510746,110.822780964,110.628019727,110.433227116,
130 110.238403209,110.043548087,109.848661827,109.65374451,109.458796215,
131 109.263817024,109.068807015,108.87376627,108.678694869,108.483592894,
132 108.288460425,108.093297545,107.898104334,107.702880875,107.507627251,
133 107.312343543,107.117029835,106.921686209,106.726312749,106.530909539,
134 106.335476663,106.140014205,105.944522249,105.749000881,105.553450185,
135 105.357870248,105.162261155,104.966622992,104.770955847,104.575259805,
136 104.379534954,104.183781382,103.987999177,103.792188428,103.596349222,
137 103.40048165,103.204585801,103.008661765,102.812709632,102.616729493,
138 102.420721441,102.224685566,102.02862196,101.832530717,101.636411929,
139 101.440265691,101.244092096,101.047891239,100.851663216,100.655408121,
140 100.459126052,100.262817104,100.066481377,99.8701189658,99.673729971,
141 99.477314491,99.2808726256,99.0844044752,98.8879101407,98.6913897236,
142 98.4948433264,98.2982710519,98.1016730037,97.9050492862,97.7084000044,
143 97.5117252641,97.3150251718,97.1182998349,96.9215493615,96.7247738603,
144 96.5279734411,96.3311482144,96.1342982917,95.9374237851,95.7405248079,
145 95.5436014741,95.3466538988,95.1496821978,94.9526864881,94.7556668877,
146 94.5586235156,94.3615564917,94.1644659371,93.9673519741,93.7702147259,
147 93.5730543171,93.3758708733,93.1786645213,92.9814353893,92.7841836066,
148 92.5869093039,92.3896126132,92.1922936679,91.9949526028,91.7975895541,
149 91.6002046595,91.4027980582,91.205369891,91.0079203002,90.8104494298,
150 90.6129574255,90.4154444347,90.2179106065,90.0203560919,89.8227810438,
151 89.6251856168,89.4275699678,89.2299342554,89.0322786405,88.8346032859,
152 88.636908357,88.4391940209,88.2414604476,88.0437078089,87.8459362796,
153 87.6481460367,87.4503372598,87.2525101312,87.0546648361,86.8568015623,
154 86.6589205007,86.461021845,86.2631057922,86.0651725422,85.8672222985,
155 85.6692552677,85.47127166,85.2732716892,85.0752555725,84.8772235314,
156 84.6791757908,84.4811125799,84.2830341322,84.084940685,83.8868324806,
157 83.6887097654,83.4905727907,83.2924218127,83.0942570925,82.8960788963,
158 82.6978874958,82.499683168,82.3014661959,82.1032368679,81.9049954788,
159 81.7067423296,81.5084777275,81.3102019866,81.1119154278,80.9136183791,
160 80.7153111759,80.516994161,80.3186676851,80.1203321072,79.9219877944,
161 79.7236351224,79.5252744761,79.3269062494,79.1285308459,78.9301486789,
162 78.7317601719,78.533365759,78.3349658854,78.1365610071,77.9381515922,
163 77.7397381206,77.5413210848,77.34290099,77.1444783551,76.9460537123,
164 76.7476276085,76.5492006051,76.350773279,76.1523462226,75.9539200451,
165 75.7554953721,75.5570728472,75.3586531317,75.160236906,74.9618248697,
166 74.7634177425,74.5650162649,74.3666211991,74.1682333293,73.969853463,
167 73.7714824312,73.57312109,73.3747703208,73.1764310315,72.9781041575,
168 72.7797906624,72.5814915392,72.3832078112,72.1849405333,71.9866907928,
169 71.7884597106,71.5902484426,71.3920581808,71.1938901544,70.9957456312,
170 70.7976259192,70.5995323675,70.4014663683,70.203429358,70.0054228187,
171 69.8074482801,69.6095073209,69.4116015707,69.2137327114,69.0159024793,
172 68.8181126671,68.6203651253,68.4226617647,68.2250045581,68.0273955426,
173 67.8298368217,67.6323305676,67.4348790234,67.2374845055,67.0401494061,
174 66.8428761956,66.6456674255,66.4485257304,66.2514538315,66.0544545389,
175 65.8575307545,65.6606854752,65.4639217957,65.2672429117,65.070652123,
176 64.8741528369,64.6777485713,64.4814429582,64.2852397473,64.0891428094,
177 63.89315614,63.6972838629,63.5015302341,63.3058996458,63.1103966298,
178 62.9150258617,62.7197921649,62.5247005146,62.3297560418,62.1349640375,
179 61.9403299569,61.7458594236,61.5515582334,61.3574323592,61.1634879547,
180 60.9697313588,60.7761690999,60.5828078998,60.3896546781,60.1967165562,
181 60.0040008615,59.811515131,59.6192671154,59.427264783,59.2355163231,
182 59.0440301495,58.852814904,58.6618794596,58.4712329231,58.2808846382,
183 58.090844188,57.9011213969,57.7117263328,57.5226693086,57.3339608836,
184 57.1456118642,56.9576333046,56.7700365068,56.58283302,56.3960346403,
185 56.2096534086,56.0237016094,55.8381917678,55.6531366466,55.4685492428,
186 55.284442783,55.1008307186,54.9177267197,54.7351446693,54.5530986556,
187 54.3716029642,54.1906720696,54.0103206254,53.8305634543,53.6514155368,
188 53.4728919991,53.295008101,53.1177792216,52.9412208454,52.7653485472,
189 52.5901779759,52.4157248378,52.2420048797,52.0690338701,51.8968275811,
190 51.7254017683,51.5547721516,51.3849543941,51.2159640815,51.0478167004,
191 50.8805276169,50.7141120546,50.5485850721,50.3839615409,50.220256123,
192 50.0574832487,49.895657094,49.7347915589,49.5749002458,49.4159964377,
193 49.2580930777,49.1012027484,48.9453376526,48.7905095938,48.6367299582,
194 48.4840096974,48.3323593121,48.1817888365,48.0323078239,47.8839253338,
195 47.7366499195,47.5904896174,47.4454519373,47.3015438542,47.1587718012,
196 47.0171416637,46.876658775,46.7373279131,46.5991532994,46.4621385973,
197 46.326286914,46.1916008015,46.0580822608,45.9257327457,45.7945531685,
198 45.6645439069,45.5357048113,45.4080352138,45.2815339377,45.1561993078,
199 45.032029162,44.9090208631,44.7871713114,44.6664769582,44.5469338196,
200 44.4285374906,44.3112831602,44.195165626,44.08017931,43.9663182736,
201 43.8535762342,43.7419465802,43.6314223873,43.5219964345,43.4136612197,
202 43.3064089756,43.2002316854,43.0951210982,42.9910687444,42.8880659502,
203 42.7861038533,42.6851734163,42.5852654418,42.4863705854,42.3884793696,
204 42.2915821966,42.1956693612,42.1007310628,42.0067574174,41.913738469,
205 41.8216642003,41.7305245439,41.6403093918,41.5510086055,41.4626120252,
206 41.3751094786,41.2884907892,41.2027457849,41.1178643049,41.0338362075,
207 40.9506513767,40.8682997286,40.7867712177,40.7060558425,40.6261436509,
208 40.5470247451,40.4686892867,40.3911275007,40.3143296798,40.238286188,
209 40.1629874645,40.0884240263,40.0145864718,39.9414654832,39.869051829,
210 39.7973363663,39.7263100428,39.6559638986,39.5862890679,39.5172767805,
211 39.4489183628,39.381205239,39.3141289323,39.2476810652,39.1818533604,
212 39.1166376415,39.0520258329,38.9880099602,38.9245821507,38.861734633,
213 38.799459737,38.7377498939,38.6765976358,38.6159955956,38.5559365061,
214 38.4964132002,38.4374186098,38.3789457655,38.3209877958,38.2635379265,
215 38.20658948,38.1501358741,38.0941706218,38.03868733,37.9836796987,
216 37.9291415199,37.8750666772,37.821449144,37.7682829833,37.7155623461,
217 37.6632814707,37.6114346815,37.5600163879,37.5090210835,37.4584433446,
218 37.4082778296,37.3585192774,37.3091625068,37.260202415,37.2116339769,
219 37.1634522436,37.1156523417,37.0682294717,37.0211789077,36.9744959955,
220 36.9281761519,36.882214864,36.8366076874,36.7913502455,36.7464382288,
221 36.7018673933,36.6576335597,36.6137326126,36.5701604991,36.5269132281,
222 36.4839868692,36.4413775518,36.3990814641,36.3570948521,36.3154140187,
223 36.2740353227,36.2329551782,36.1921700533,36.1516764693,36.1114710002,
224 36.0715502713,36.0319109585,35.9925497878,35.953463534,35.9146490203,
225 35.8761031172,35.8378227417,35.7998048569,35.7620464706,35.7245446353,
226 35.6872964468,35.6502990438,35.6135496072,35.5770453592,35.5407835628,
227 35.5047615211,35.4689765763,35.4334261096,35.3981075401,35.3630183243,
228 35.3281559555,35.2935179634,35.2591019128,35.2249054039,35.190926071,
229 35.1571615823,35.1236096394,35.0902679764,35.0571343594,35.0242065864,
230 34.9914824864,34.9589599188,34.9266367732,34.8945109687,34.8625804535,
231 34.8308432042,34.7992972259,34.7679405508,34.7367712388,34.7057873762,
232 34.6749870757,34.6443684758,34.6139297407,34.5836690592,34.553584645,
233 34.523674736,34.4939375938,34.4643715034,34.4349747732,34.4057457337,
234 34.3766827382,34.3477841616,34.3190484007,34.2904738733,34.2620590183,
235 34.2338022949,34.2057021827,34.1777571813,34.1499658098,34.1223266066,
236 34.094838129,34.067498953,34.0403076731,34.0132629019,33.9863632696,
237 33.9596074241,33.9329940306,33.906521771,33.8801893442,33.8539954655,
238 33.8279388664,33.8020182942,33.7762325121,33.7505802987,33.7250604478,
239 33.6996717682,33.6744130834,33.6492832315,33.624281065,33.5994054503,
240 33.5746552679,33.5500294117,33.5255267892,33.5011463214,33.4768869419,
241 33.4527475975,33.4287272476,33.404824864,33.3810394309,33.3573699445,
242 33.333815413,33.3103748565,33.2870473064,33.2638318058,33.2407274087,
243 33.2177331806,33.1948481976,33.1720715466,33.1494023254,33.1268396418,
244 33.1043826143,33.0820303713,33.0597820513,33.0376368026,33.0155937833,
245 32.9936521611,32.971811113,32.9500698254,32.928427494,32.9068833234,
246 32.885436527,32.8640863273,32.8428319553,32.8216726506,32.8006076611,
247 32.7796362431,32.7587576613,32.7379711881,32.7172761042,32.696671698,
248 32.6761572657,32.6557321111,32.6353955456,32.615146888,32.5949854646,
249 32.5749106086,32.5549216607,32.5350179685,32.5151988864,32.4954637759,
250 32.4758120052,32.4562429491,32.4367559889,32.4173505127,32.3980259148,
251 32.3787815958,32.3596169627,32.3405314284,32.3215244122,32.3025953392,
252 32.2837436404,32.2649687528,32.246270119,32.2276471875,32.2090994121,
253 32.1906262525,32.1722271737,32.1539016461,32.1356491454,32.1174691527,
254 32.0993611542,32.0813246412,32.0633591103,32.0454640627,32.027639005,
255 32.0098834483,31.9921969088,31.9745789073,31.9570289692,31.9395466249,
256 31.922131409,31.9047828608,31.8875005241,31.870283947,31.8531326821,
257 31.8360462862,31.8190243203,31.8020663499,31.7851719442,31.768340677,
258 31.7515721256,31.7348658718,31.7182215011,31.7016386029,31.6851167705,
259 31.6686556011,31.6522546954,31.6359136583,31.6196320978,31.603409626,
260 31.5872458584,31.571140414,31.5550929153,31.5391029884,31.5231702628,
261 31.5072943712,31.49147495,31.4757116385,31.4600040794,31.4443519189,
262 31.4287548061,31.4132123933,31.3977243359,31.3822902925,31.3669099247,
263 31.3515828971,31.3363088772,31.3210875356,31.3059185458,31.2908015839,
264 31.2757363292,31.2607224636,31.245759672,31.2308476417,31.2159860631,
265 31.2011746291,31.1864130351,31.1717009795,31.1570381631,31.1424242891,
266 31.1278590637,31.1133421951,31.0988733943,31.0844523748,31.0700788523,
267 31.0557525451,31.0414731739,31.0272404614,31.0130541332,30.9989139168,
268 30.9848195421,30.9707707411,30.9567672485,30.9428088006,30.9288951362,
269 30.9150259964,30.9012011241,30.8874202647,30.8736831652,30.8599895751,
270 30.8463392459,30.8327319308,30.8191673854,30.805645367,30.7921656351,
271 30.778727951,30.7653320779,30.751977781,30.7386648273,30.7253929858,
272 30.7121620271,30.6989717239,30.6858218505,30.6727121831,30.6596424997,
273 30.64661258,30.6336222053,30.6206711589,30.6077592256,30.5948861919,
274 30.582051846,30.5692559778,30.5564983788,30.543778842,30.5310971622,
275 30.5184531356,30.5058465602,30.4932772352,30.4807449617,30.4682495421,
276 30.4557907804,30.4433684821,30.430982454,30.4186325047,30.4063184439,
277 30.394040083,30.3817972346,30.369589713,30.3574173335,30.3452799132,
278 30.3331772701,30.3211092241,30.309075596,30.2970762081,30.285110884,
279 30.2731794486,30.2612817281,30.24941755,30.237586743,30.2257891371,
280 30.2140245634,30.2022928546,30.1905938442,30.1789273672,30.1672932596,
281 30.1556913586,30.1441215028,30.1325835317,30.1210772861,30.1096026079,
282 30.09815934,30.0867473267,30.0753664132,30.0640164459,30.0526972721,
283 30.0414087405,30.0301507006,30.018923003,30.0077254995,29.9965580428,
284 29.9854204867,29.974312686,29.9632344964,29.9521857749,29.9411663791,
285 29.930176168,29.9192150012,29.9082827395,29.8973792446,29.8865043791,
286 29.8756580067,29.8648399918,29.8540501999,29.8432884974,29.8325547515,
287 29.8218488304,29.8111706032,29.8005199399,29.7898967112,29.7793007888,
288 29.7687320454,29.7581903544,29.74767559,29.7371876273,29.7267263422,
289 29.7162916116,29.705883313,29.6955013249,29.6851455263,29.6748157973,
290 29.6645120188,29.6542340722,29.64398184,29.6337552052,29.6235540517,
291 29.6133782642,29.6032277281,29.5931023295,29.5830019553,29.5729264931,
292 29.5628758312,29.5528498587,29.5428484654,29.5328715418,29.5229189789,
293 29.5129906688,29.503086504,29.4932063777,29.4833501839,29.4735178172,
294 29.4637091728,29.4539241467,29.4441626356,29.4344245366,29.4247097476,
295 29.4150181672,29.4053496945,29.3957042294,29.3860816723,29.3764819242,
296 29.3669048868,29.3573504624,29.3478185538,29.3383090646,29.3288218988,
297 29.3193569611,29.3099141568,29.3004933916,29.2910945721,29.2817176051,
298 29.2723623983,29.2630288597,29.2537168981,29.2444264227,29.2351573433,
299 29.2259095701,29.2166830142,29.2074775868,29.1982931999,29.189129766,
300 29.1799871982,29.1708654098,29.161764315,29.1526838283,29.1436238647,
301 29.1345843399,29.1255651698,29.1165662711,29.1075875607,29.0986289563,
302 29.0896903759,29.0807717379,29.0718729614,29.0629939658,29.054134671,
303 29.0452949975,29.0364748662,29.0276741982,29.0188929155,29.0101309403,
304 29.0013881953,28.9926646035,28.9839600886,28.9752745746,28.9666079859,
305 28.9579602474,28.9493312845,28.9407210228,28.9321293887,28.9235563085,
306 28.9150017094,28.9064655188,28.8979476644,28.8894480746,28.880966678,
307 28.8725034037,28.864058181,28.8556309398,28.8472216105,28.8388301235,
308 28.8304564099,28.8221004011,28.813762029,28.8054412256,28.7971379235,
309 28.7888520556,28.7805835552,28.772332356,28.764098392,28.7558815975,
310 28.7476819073,28.7394992566,28.7313335807,28.7231848155,28.7150528972,
311 28.7069377621,28.6988393474,28.69075759,28.6826924275,28.6746437979,
312 28.6666116394,28.6585958904,28.6505964899,28.6426133771,28.6346464915,
313 28.626695773,28.6187611617,28.6108425982,28.6029400232,28.595053378,
314 28.5871826039,28.5793276427,28.5714884365,28.5636649277,28.5558570589,
315 28.5480647731,28.5402880136,28.532526724,28.5247808482,28.5170503302,
316 28.5093351147,28.5016351463,28.4939503701,28.4862807313,28.4786261758,
317 28.4709866492,28.4633620978,28.4557524681,28.4481577067,28.4405777608,
318 28.4330125775,28.4254621044,28.4179262893,28.4104050804,28.4028984259,
319 28.3954062746,28.3879285752,28.3804652769,28.3730163292,28.3655816816,
320 28.3581612841,28.3507550868,28.3433630402,28.3359850949,28.3286212019,
321 28.3212713123,28.3139353775,28.3066133492,28.2993051793,28.2920108199,
322 28.2847302234,28.2774633423,28.2702101296,28.2629705384,28.2557445219,
323 28.2485320337,28.2413330275,28.2341474574,28.2269752777,28.2198164427,
324 28.2126709072,28.205538626,28.1984195544,28.1913136475,28.1842208611,
325 28.1771411508,28.1700744728,28.1630207831,28.1559800382,28.1489521948,
326 28.1419372097,28.13493504,28.1279456429,28.1209689759,28.1140049966,
327 28.107053663,28.1001149332,28.0931887653,28.0862751179,28.0793739497,
328 28.0724852196,28.0656088866,28.0587449099,28.0518932492,28.0450538639,
329 28.038226714,28.0314117595,28.0246089606,28.0178182778,28.0110396715,
330 28.0042731028,27.9975185324,27.9907759215,27.9840452315,27.9773264239,
331 27.9706194605,27.9639243029,27.9572409134,27.9505692542,27.9439092876,
332 27.9372609763,27.9306242829,27.9239991704,27.917385602,27.9107835408,
333 27.9041929503,27.8976137942,27.8910460361,27.8844896401,27.8779445702,
334 27.8714107907,27.8648882661,27.8583769608,27.8518768397,27.8453878678,
335 27.8389100099,27.8324432315,27.8259874979,27.8195427746,27.8131090273,
336 27.806686222,27.8002743245,27.7938733011,27.7874831181,27.781103742,
337 27.7747351393,27.7683772768,27.7620301215,27.7556936405,27.7493678008,
338 27.74305257,27.7367479154,27.7304538047,27.7241702058,27.7178970865,
339 27.7116344149,27.7053821593,27.6991402879,27.6929087694,27.6866875722,
340 27.6804766652,27.6742760174,27.6680855976,27.6619053752,27.6557353194,
341 27.6495753996,27.6434255855,27.6372858468,27.6311561533,27.6250364749,
342 27.6189267819,27.6128270443,27.6067372327,27.6006573174,27.594587269,
343 27.5885270585,27.5824766565,27.5764360341,27.5704051624,27.5643840127,
344 27.5583725563,27.5523707647,27.5463786095,27.5403960625,27.5344230955,
345 27.5284596804,27.5225057894,27.5165613947,27.5106264685,27.5047009834,
346 27.4987849119,27.4928782266,27.4869809004,27.4810929061,27.4752142168,
347 27.4693448056,27.4634846457,27.4576337105,27.4517919735,27.4459594082,
348 27.4401359884,27.4343216877,27.4285164802,27.4227203398,27.4169332407,
349 27.411155157,27.4053860632,27.3996259336,27.3938747428,27.3881324655,
350 27.3823990764,27.3766745503,27.3709588622,27.3652519873,27.3595539006,
351 27.3538645774,27.3481839931,27.3425121231,27.3368489431,27.3311944287,
352 27.3255485556,27.3199112998,27.3142826371,27.3086625437,27.3030509957,
353 27.2974479694,27.291853441,27.2862673871,27.2806897842,27.2751206089,
354 27.2695598379,27.2640074481,27.2584634164,27.2529277198,27.2474003354,
355 27.2418812403,27.2363704118,27.2308678274,27.2253734644,27.2198873005,
356 27.2144093132,27.2089394803,27.2034777796,27.1980241889,27.1925786864,
357 27.18714125,27.181711858,27.1762904885,27.1708771199,27.1654717306,
358 27.1600742991,27.1546848041,27.1493032241,27.1439295379,27.1385637244,
359 27.1332057625,27.1278556311,27.1225133094,27.1171787765,27.1118520117,
360 27.1065329942,27.1012217036,27.0959181192,27.0906222206,27.0853339875,
361 27.0800533996,27.0747804366,27.0695150786,27.0642573053,27.0590070968,
362 27.0537644333,27.048529295,27.0433016619,27.0380815146,27.0328688334,
363 27.0276635988,27.0224657913,27.0172753915,27.0120923803,27.0069167383,
364 27.0017484463,26.9965874854,26.9914338364,26.9862874805,26.9811483988,
365 26.9760165725,26.9708919829,26.9657746112,26.960664439,26.9555614477,
366 26.9504656189,26.9453769341,26.9402953751,26.9352209236,26.9301535615,
367 26.9250932707,26.920040033,26.9149938306,26.9099546455,26.9049224599,
368 26.899897256,26.8948790161,26.8898677226,26.8848633578,26.8798659043,
369 26.8748753447,26.8698916614,26.8649148373,26.8599448551,26.8549816974,
370 26.8500253473,26.8450757877,26.8401330015,26.8351969718,26.8302676817,
371 26.8253451143,26.820429253,26.815520081,26.8106175817,26.8057217385,
372 26.8008325349,26.7959499543,26.7910739805,26.786204597,26.7813417876,
373 26.7764855361,26.7716358262,26.7667926419,26.7619559671,26.7571257859,
374 26.7523020822,26.7474848402,26.7426740441,26.737869678,26.7330717264,
375 26.7282801735,26.7234950037,26.7187162015,26.7139437514,26.7091776379,
376 26.7044178457,26.6996643594,26.6949171638,26.6901762436,26.6854415837,
377 26.680713169,26.6759909844,26.6712750148,26.6665652454,26.6618616612,
378 26.6571642474,26.6524729891,26.6477878717,26.6431088804,26.6384360006,
379 26.6337692177,26.6291085171,26.6244538844,26.6198053051,26.6151627648,
380 26.6105262491,26.6058957438,26.6012712347,26.5966527074,26.592040148,
381 26.5874335422,26.5828328761,26.5782381356,26.5736493067,26.5690663756,
382 26.5644893285,26.5599181514,26.5553528306,26.5507933525,26.5462397032,
383 26.5416918693,26.5371498371,26.5326135931,26.5280831239,26.5235584158,
384 26.5190394557,26.5145262301,26.5100187257,26.5055169292,26.5010208275,
385 26.4965304073,26.4920456556,26.4875665593,26.4830931052,26.4786252805,
386 26.4741630721,26.4697064672,26.4652554529,26.4608100163,26.4563701447,
387 26.4519358254,26.4475070456,26.4430837927,26.4386660541,26.4342538172,
388 26.4298470695,26.4254457985,26.4210499918,26.4166596369,26.4122747215,
389 26.4078952332,26.4035211598,26.3991524891,26.3947892088,26.3904313068,
390 26.3860787709,26.3817315891,26.3773897493,26.3730532396,26.3687220479,
391 26.3643961623,26.360075571,26.3557602621,26.3514502237,26.3471454442,
392 26.3428459118,26.3385516148,26.3342625415,26.3299786803,26.3257000197,
393 26.3214265481,26.3171582539,26.3128951257,26.3086371522,26.3043843218,
394 26.3001366232,26.2958940452,26.2916565763,26.2874242055,26.2831969213,
395 26.2789747128,26.2747575687,26.2705454778,26.2663384293,26.2621364119,
396 26.2579394148,26.2537474269,26.2495604373,26.2453784351,26.2412014095,
397 26.2370293495,26.2328622446,26.2287000837,26.2245428563,26.2203905517,
398 26.2162431591,26.212100668,26.2079630678,26.2038303479,26.1997024978,
399 26.1955795069,26.1914613649,26.1873480613,26.1832395857,26.1791359278,
400 26.1750370772,26.1709430235,26.1668537567,26.1627692664,26.1586895424,
401 26.1546145745,26.1505443526,26.1464788667,26.1424181066,26.1383620622,
402 26.1343107237,26.1302640809,26.1262221239,26.1221848429,26.1181522279,
403 26.114124269,26.1101009565,26.1060822805,26.1020682313,26.098058799,
404 26.0940539741,26.0900537468,26.0860581075,26.0820670466,26.0780805544,
405 26.0740986214,26.070121238,26.0661483949,26.0621800824,26.0582162911,
406 26.0542570117,26.0503022347,26.0463519507,26.0424061505,26.0384648247,
407 26.0345279641,26.0305955593,26.0266676012,26.0227440806,26.0188249883,
408 26.0149103152,26.0110000522,26.0070941901,26.00319272,25.9992956327,
409 25.9954029194,25.9915145709,25.9876305784,25.983750933,25.9798756257,
410 25.9760046476,25.97213799,25.9682756441,25.9644176009,25.9605638518,
411 25.956714388,25.9528692009,25.9490282816,25.9451916216,25.9413592122,
412 25.9375310449,25.9337071109,25.9298874018,25.9260719091,25.9222606242,
413 25.9184535386,25.9146506439,25.9108519316,25.9070573933,25.9032670207,
414 25.8994808054
415 }
416 },
417 {
418 // Ri = 250k
419 -5,5,200,2001, {
420 214.806581677,214.650587712,214.494441388,214.338143449,214.181694635,
421 214.025095677,213.868347304,213.711450238,213.554405194,213.397212884,
422 213.239874013,213.082389282,212.924759385,212.766985013,212.60906685,
423 212.451005576,212.292801864,212.134456385,211.975969802,211.817342776,
424 211.658575961,211.499670005,211.340625555,211.181443251,211.022123727,
425 210.862667614,210.703075539,210.543348122,210.383485982,210.22348973,
426 210.063359973,209.903097317,209.742702359,209.582175694,209.421517913,
427 209.260729602,209.099811343,208.938763714,208.777587287,208.616282633,
428 208.454850316,208.293290899,208.131604938,207.969792986,207.807855593,
429 207.645793304,207.483606661,207.321296202,207.15886246,206.996305965,
430 206.833627244,206.67082682,206.507905211,206.344862933,206.181700497,
431 206.018418412,205.855017182,205.691497309,205.527859289,205.364103618,
432 205.200230785,205.036241278,204.872135582,204.707914176,204.543577538,
433 204.379126141,204.214560458,204.049880955,203.885088096,203.720182343,
434 203.555164155,203.390033984,203.224792285,203.059439505,202.893976089,
435 202.728402482,202.562719123,202.396926447,202.23102489,202.065014882,
436 201.898896852,201.732671223,201.56633842,201.399898861,201.233352963,
437 201.066701141,200.899943805,200.733081363,200.566114223,200.399042787,
438 200.231867455,200.064588626,199.897206695,199.729722054,199.562135094,
439 199.394446202,199.226655764,199.058764161,198.890771775,198.722678983,
440 198.554486159,198.386193678,198.217801909,198.04931122,197.880721977,
441 197.712034543,197.54324928,197.374366545,197.205386696,197.036310087,
442 196.86713707,196.697867994,196.528503206,196.359043053,196.189487877,
443 196.019838019,195.850093818,195.680255611,195.510323732,195.340298515,
444 195.170180288,194.999969382,194.829666122,194.659270832,194.488783835,
445 194.318205451,194.147535999,193.976775794,193.805925153,193.634984386,
446 193.463953805,193.292833719,193.121624434,192.950326255,192.778939486,
447 192.607464428,192.43590138,192.264250641,192.092512505,191.920687267,
448 191.74877522,191.576776653,191.404691857,191.232521118,191.060264721,
449 190.887922951,190.715496088,190.542984415,190.370388209,190.197707747,
450 190.024943305,189.852095157,189.679163575,189.50614883,189.33305119,
451 189.159870923,188.986608295,188.813263571,188.639837013,188.466328882,
452 188.292739439,188.119068941,187.945317645,187.771485807,187.597573681,
453 187.423581518,187.249509571,187.075358088,186.901127317,186.726817506,
454 186.552428899,186.377961741,186.203416274,186.028792738,185.854091375,
455 185.679312422,185.504456116,185.329522693,185.154512388,184.979425434,
456 184.804262062,184.629022504,184.453706988,184.278315742,184.102848994,
457 183.927306968,183.751689889,183.57599798,183.400231463,183.224390558,
458 183.048475484,182.872486461,182.696423704,182.520287429,182.344077852,
459 182.167795186,181.991439642,181.815011432,181.638510767,181.461937854,
460 181.285292902,181.108576118,180.931787707,180.754927872,180.577996819,
461 180.400994749,180.223921863,180.046778361,179.869564443,179.692280306,
462 179.514926148,179.337502164,179.16000855,178.982445499,178.804813204,
463 178.627111857,178.449341649,178.27150277,178.093595408,177.915619752,
464 177.737575989,177.559464305,177.381284884,177.203037911,177.024723568,
465 176.846342039,176.667893504,176.489378144,176.310796138,176.132147665,
466 175.953432902,175.774652027,175.595805214,175.416892639,175.237914476,
467 175.058870898,174.879762077,174.700588185,174.521349393,174.342045871,
468 174.162677786,173.983245308,173.803748604,173.624187839,173.444563181,
469 173.264874793,173.085122839,172.905307483,172.725428887,172.545487212,
470 172.365482621,172.185415272,172.005285324,171.825092937,171.644838268,
471 171.464521475,171.284142712,171.103702136,170.923199902,170.742636163,
472 170.562011074,170.381324785,170.20057745,170.019769219,169.838900242,
473 169.65797067,169.476980651,169.295930334,169.114819867,168.933649395,
474 168.752419065,168.571129024,168.389779415,168.208370384,168.026902072,
475 167.845374625,167.663788183,167.482142888,167.300438881,167.118676302,
476 166.936855292,166.754975989,166.573038531,166.391043057,166.208989703,
477 166.026878606,165.844709901,165.662483725,165.480200212,165.297859496,
478 165.115461711,164.933006988,164.750495462,164.567927263,164.385302523,
479 164.202621372,164.019883941,163.837090359,163.654240754,163.471335256,
480 163.288373991,163.105357088,162.922284672,162.739156871,162.555973809,
481 162.372735612,162.189442405,162.006094311,161.822691453,161.639233956,
482 161.455721941,161.27215553,161.088534844,160.904860006,160.721131134,
483 160.53734835,160.353511772,160.169621519,159.985677711,159.801680464,
484 159.617629896,159.433526125,159.249369267,159.065159438,158.880896753,
485 158.696581328,158.512213278,158.327792716,158.143319756,157.958794512,
486 157.774217097,157.589587623,157.404906201,157.220172944,157.035387963,
487 156.850551368,156.665663269,156.480723777,156.295733,156.110691048,
488 155.925598029,155.740454052,155.555259223,155.370013651,155.184717443,
489 154.999370704,154.813973541,154.62852606,154.443028365,154.257480563,
490 154.071882757,153.886235051,153.70053755,153.514790357,153.328993575,
491 153.143147306,152.957251652,152.771306717,152.5853126,152.399269404,
492 152.213177229,152.027036175,151.840846344,151.654607834,151.468320744,
493 151.281985175,151.095601225,150.909168991,150.722688573,150.536160067,
494 150.349583572,150.162959184,149.976287,149.789567117,149.60279963,
495 149.415984635,149.229122227,149.042212503,148.855255556,148.668251481,
496 148.481200372,148.294102323,148.106957428,147.919765781,147.732527473,
497 147.545242597,147.357911247,147.170533514,146.98310949,146.795639267,
498 146.608122935,146.420560586,146.232952311,146.045298199,145.857598342,
499 145.669852828,145.482061748,145.294225191,145.106343245,144.918416001,
500 144.730443545,144.542425968,144.354363356,144.166255797,143.97810338,
501 143.789906191,143.601664317,143.413377845,143.225046862,143.036671454,
502 142.848251708,142.659787708,142.471279541,142.282727292,142.094131047,
503 141.905490889,141.716806905,141.528079178,141.339307792,141.150492833,
504 140.961634383,140.772732527,140.583787347,140.394798927,140.20576735,
505 140.016692699,139.827575057,139.638414505,139.449211127,139.259965004,
506 139.070676217,138.88134485,138.691970983,138.502554697,138.313096073,
507 138.123595193,137.934052137,137.744466986,137.55483982,137.36517072,
508 137.175459765,136.985707035,136.79591261,136.60607657,136.416198993,
509 136.22627996,136.036319549,135.846317839,135.656274909,135.466190838,
510 135.276065704,135.085899585,134.895692559,134.705444705,134.5151561,
511 134.324826823,134.13445695,133.944046559,133.753595729,133.563104534,
512 133.372573054,133.182001365,132.991389543,132.800737666,132.61004581,
513 132.419314051,132.228542467,132.037731132,131.846880124,131.655989518,
514 131.46505939,131.274089817,131.083080873,130.892032635,130.700945177,
515 130.509818577,130.318652908,130.127448245,129.936204665,129.744922243,
516 129.553601052,129.362241169,129.170842668,128.979405623,128.78793011,
517 128.596416203,128.404863976,128.213273504,128.021644862,127.829978123,
518 127.638273363,127.446530654,127.254750072,127.062931691,126.871075583,
519 126.679181825,126.487250488,126.295281648,126.103275378,125.911231752,
520 125.719150844,125.527032727,125.334877475,125.142685163,124.950455862,
521 124.758189648,124.565886593,124.373546772,124.181170257,123.988757122,
522 123.796307442,123.603821288,123.411298735,123.218739857,123.026144726,
523 122.833513416,122.640846001,122.448142555,122.255403149,122.062627859,
524 121.869816757,121.676969918,121.484087414,121.291169319,121.098215706,
525 120.90522665,120.712202224,120.519142502,120.326047556,120.132917462,
526 119.939752292,119.746552121,119.553317022,119.360047069,119.166742336,
527 118.973402897,118.780028826,118.586620198,118.393177086,118.199699564,
528 118.006187707,117.81264159,117.619061286,117.42544687,117.231798417,
529 117.038116001,116.844399697,116.650649581,116.456865726,116.263048209,
530 116.069197103,115.875312486,115.68139443,115.487443014,115.293458311,
531 115.099440397,114.905389349,114.711305243,114.517188154,114.323038158,
532 114.128855333,113.934639754,113.740391499,113.546110644,113.351797266,
533 113.157451442,112.963073249,112.768662766,112.574220069,112.379745237,
534 112.185238347,111.990699479,111.796128709,111.601526117,111.406891782,
535 111.212225782,111.017528197,110.822799106,110.62803859,110.433246727,
536 110.238423599,110.043569285,109.848683866,109.653767423,109.458820038,
537 109.263841792,109.068832766,108.873793042,108.678722704,108.483621833,
538 108.288490512,108.093328825,107.898136855,107.702914687,107.507662403,
539 107.31238009,107.117067832,106.921725713,106.726353821,106.53095224,
540 106.335521058,106.14006036,105.944570235,105.749050771,105.553502054,
541 105.357924174,105.16231722,104.966681281,104.771016447,104.575322809,
542 104.379600457,104.183849483,103.98806998,103.792262038,103.596425752,
543 103.400561215,103.204668521,103.008747766,102.812799044,102.616822451,
544 102.420818085,102.224786042,102.028726421,101.832639321,101.63652484,
545 101.440383079,101.244214139,101.048018121,100.851795129,100.655545265,
546 100.459268634,100.26296534,100.06663549,99.8702791895,99.6738965474,
547 99.4774876719,99.2810526729,99.0845916608,98.8881047476,98.691592046,
548 98.4950536699,98.2984897344,98.1019003557,97.9052856512,97.7086457396,
549 97.5119807408,97.315290776,97.1185759679,96.9218364403,96.7250723187,
550 96.52828373,96.3314708025,96.1346336663,95.9377724527,95.7408872952,
551 95.5439783285,95.3470456894,95.1500895163,94.9531099497,94.7561071318,
552 94.5590812068,94.3620323212,94.1649606233,93.9678662638,93.7707493956,
553 93.5736101738,93.3764487561,93.1792653025,92.9820599756,92.7848329407,
554 92.5875843657,92.3903144214,92.1930232816,91.9957111228,91.7983781248,
555 91.6010244707,91.4036503465,91.2062559421,91.0088414506,90.8114070689,
556 90.6139529975,90.4164794409,90.2189866076,90.0214747103,89.823943966,
557 89.626394596,89.4288268263,89.2312408877,89.0336370159,88.8360154516,
558 88.6383764408,88.4407202349,88.243047091,88.045357272,87.8476510469,
559 87.6499286907,87.4521904852,87.2544367185,87.0566676858,86.8588836897,
560 86.6610850397,86.4632720534,86.2654450561,86.0676043814,85.8697503714,
561 85.6718833771,85.4740037586,85.2761118852,85.0782081364,84.8802929016,
562 84.6823665808,84.4844295847,84.2864823355,84.0885252669,83.8905588249,
563 83.6925834679,83.4945996672,83.2966079077,83.0986086881,82.9006025218,
564 82.7025899369,82.504571477,82.3065477019,82.1085191881,81.9104865291,
565 81.7124503365,81.5144112404,81.31636989,81.1183269543,80.9202831233,
566 80.7222391079,80.5241956415,80.3261534801,80.1281134038,79.9300762172,
567 79.7320427503,79.5340138598,79.3359904296,79.1379733722,78.9399636292,
568 78.7419621732,78.5439700078,78.3459881699,78.14801773,77.9500597938,
569 77.7521155034,77.5541860386,77.3562726184,77.1583765021,76.960498991,
570 76.7626414298,76.5648052081,76.3669917621,76.1692025763,75.971439185,
571 75.7737031742,75.5759961834,75.3783199075,75.1806760987,74.9830665686,
572 74.78549319,74.5879578994,74.3904626989,74.1930096588,73.9956009193,
573 73.7982386937,73.6009252702,73.4036630149,73.2064543742,73.0093018775,
574 72.8122081401,72.6151758657,72.4182078498,72.2213069825,72.0244762512,
575 71.8277187444,71.6310376545,71.4344362812,71.2379180349,71.0414864401,
576 70.8451451392,70.6488978956,70.4527485979,70.2567012634,70.0607600418,
577 69.8649292195,69.6692132231,69.4736166236,69.2781441408,69.0828006466,
578 68.8875911702,68.6925209014,68.4975951954,68.302819577,68.1081997447,
579 67.9137415753,67.7194511279,67.5253346485,67.3313985744,67.137649538,
580 66.9440943715,66.750740111,66.5575940006,66.3646634965,66.1719562709,
581 65.979480216,65.7872434478,65.5952543092,65.4035213744,65.2120534512,
582 65.0208595845,64.8299490593,64.6393314028,64.4490163873,64.2590140316,
583 64.0693346033,63.8799886194,63.6909868482,63.502340309,63.3140602728,
584 63.1261582616,62.9386460478,62.7515356528,62.5648393451,62.3785696378,
585 62.1927392856,62.0073612811,61.8224488501,61.6380154473,61.4540747498,
586 61.2706406511,61.0877272534,60.9053488602,60.7235199671,60.5422552522,
587 60.3615695659,60.1814779194,60.0019954732,59.8231375236,59.6449194893,
588 59.467356897,59.290465366,59.1142605922,58.9387583312,58.7639743808,
589 58.5899245626,58.4166247035,58.2440906157,58.0723380767,57.9013828089,
590 57.7312404584,57.5619265734,57.3934565824,57.2258457724,57.0591092663,
591 56.8932620005,56.7283187029,56.5642938699,56.4012017447,56.2390562951,
592 56.0778711918,55.9176597869,55.7584350933,55.6002097646,55.442996075,
593 55.2868059006,55.1316507015,54.9775415045,54.8244888866,54.67250296,
594 54.521593358,54.3717692215,54.2230391876,54.0754113787,53.928893393,
595 53.7834922966,53.6392146163,53.4960663344,53.3540528842,53.213179147,
596 53.0734494507,52.9348675694,52.7974367242,52.6611595853,52.5260382756,
597 52.392074375,52.2592689262,52.1276224411,51.9971349089,51.8678058046,
598 51.7396340988,51.6126182678,51.4867563052,51.3620457335,51.2384836172,
599 51.1160665754,50.9947907962,50.8746520501,50.7556457053,50.6377667424,
600 50.5210097692,50.4053690366,50.2908384541,50.177411605,50.0650817627,
601 49.953841906,49.8436847348,49.7346026858,49.626587948,49.5196324774,
602 49.4137280128,49.30886609,49.2050380567,49.1022350863,49.0004481925,
603 48.899668242,48.7998859685,48.7010919851,48.6032767968,48.5064308127,
604 48.4105443574,48.3156076826,48.2216109775,48.1285443795,48.0363979842,
605 47.9451618546,47.8548260307,47.7653805379,47.6768153954,47.5891206244,
606 47.5022862551,47.4163023342,47.3311589317,47.2468461468,47.1633541147,
607 47.0806730113,46.9987930595,46.9177045334,46.8373977633,46.7578631402,
608 46.6790911195,46.6010722248,46.5237970519,46.4472562712,46.3714406313,
609 46.2963409615,46.2219481742,46.1482532672,46.0752473257,46.0029215242,
610 45.9312671284,45.8602754958,45.789938078,45.7202464213,45.6511921675,
611 45.582767055,45.5149629195,45.4477716941,45.3811854103,45.3151961979,
612 45.249796285,45.1849779988,45.1207337645,45.0570561064,44.9939376466,
613 44.9313711053,44.8693493005,44.8078651471,44.746911657,44.686481938,
614 44.6265691936,44.567166722,44.5082679158,44.449866261,44.391955336,
615 44.3345288112,44.2775804481,44.2211040981,44.1650937017,44.1095432878,
616 44.0544469725,43.9997989584,43.9455935331,43.8918250688,43.8384880208,
617 43.7855769268,43.7330864057,43.6810111566,43.6293459579,43.5780856658,
618 43.5272252138,43.4767596114,43.426683943,43.3769933668,43.3276831139,
619 43.2787484874,43.230184861,43.181987678,43.1341524507,43.0866747587,
620 43.0395502487,42.9927746327,42.9463436875,42.9002532535,42.8544992337,
621 42.8090775929,42.7639843566,42.7192156101,42.6747674974,42.6306362206,
622 42.5868180387,42.5433092665,42.5001062744,42.4572054868,42.4146033815,
623 42.3722964889,42.3302813911,42.2885547209,42.2471131613,42.2059534443,
624 42.1650723503,42.1244667073,42.0841333903,42.0440693199,42.0042714625,
625 41.9647368285,41.9254624723,41.8864454915,41.8476830258,41.8091722568,
626 41.7709104067,41.7328947382,41.6951225536,41.6575911941,41.6202980392,
627 41.5832405061,41.5464160489,41.5098221582,41.4734563605,41.4373162174,
628 41.4013993251,41.3657033141,41.3302258481,41.294964624,41.2599173708,
629 41.2250818496,41.1904558528,41.1560372035,41.1218237553,41.0878133915,
630 41.0540040246,41.0203935961,40.9869800759,40.9537614617,40.9207357786,
631 40.8879010787,40.8552554409,40.8227969699,40.7905237962,40.7584340756,
632 40.7265259888,40.694797741,40.6632475612,40.6318737025,40.6006744409,
633 40.5696480755,40.5387929281,40.5081073423,40.477589684,40.4472383402,
634 40.4170517192,40.3870282502,40.3571663827,40.3274645866,40.2979213512,
635 40.2685351859,40.2393046187,40.210228197,40.1813044866,40.1525320716,
636 40.1239095543,40.0954355544,40.0671087095,40.0389276741,40.0108911199,
637 39.982997735,39.955246224,39.9276353079,39.9001637232,39.8728302225,
638 39.8456335736,39.8185725594,39.7916459781,39.7648526423,39.7381913793,
639 39.7116610306,39.6852604519,39.6589885127,39.6328440961,39.6068260988,
640 39.5809334306,39.5551650145,39.5295197862,39.5039966942,39.4785946995,
641 39.4533127753,39.4281499069,39.4031050918,39.3781773388,39.3533656688,
642 39.3286691137,39.304086717,39.2796175331,39.2552606273,39.2310150758,
643 39.2068799653,39.1828543931,39.1589374668,39.1351283041,39.1114260327,
644 39.0878297902,39.064338724,39.0409519911,39.0176687579,38.9944882003,
645 38.9714095031,38.9484318604,38.9255544753,38.9027765596,38.8800973337,
646 38.8575160268,38.8350318765,38.8126441286,38.7903520373,38.7681548648,
647 38.7460518814,38.7240423652,38.7021256022,38.6803008859,38.6585675176,
648 38.636924806,38.6153720669,38.5939086239,38.5725338073,38.5512469547,
649 38.5300474107,38.5089345267,38.4879076609,38.4669661783,38.4461094505,
650 38.4253368556,38.4046477781,38.384041609,38.3635177454,38.3430755908,
651 38.3227145546,38.3024340525,38.2822335058,38.2621123421,38.2420699944,
652 38.2221059018,38.2022195088,38.1824102656,38.1626776278,38.1430210566,
653 38.1234400185,38.1039339853,38.0845024341,38.065144847,38.0458607114,
654 38.0266495197,38.0075107692,37.9884439622,37.9694486057,37.9505242119,
655 37.9316702972,37.912886383,37.8941719953,37.8755266647,37.8569499261,
656 37.838441319,37.8200003873,37.8016266793,37.7833197474,37.7650791485,
657 37.7469044434,37.7287951972,37.7107509792,37.6927713625,37.6748559244,
658 37.6570042459,37.6392159121,37.621490512,37.6038276382,37.5862268871,
659 37.568687859,37.5512101577,37.5337933905,37.5164371687,37.4991411068,
660 37.4819048228,37.4647279384,37.4476100786,37.4305508715,37.4135499491,
661 37.3966069463,37.3797215014,37.3628932558,37.3461218542,37.3294069446,
662 37.3127481779,37.296145208,37.2795976922,37.2631052905,37.2466676661,
663 37.2302844849,37.2139554159,37.197680131,37.1814583048,37.1652896148,
664 37.1491737414,37.1331103675,37.1170991789,37.1011398641,37.0852321142,
665 37.069375623,37.0535700867,37.0378152045,37.0221106777,37.0064562103,
666 36.990851509,36.9752962825,36.9597902425,36.9443331026,36.9289245791,
667 36.9135643906,36.8982522581,36.8829879046,36.8677710558,36.8526014395,
668 36.8374787856,36.8224028263,36.8073732962,36.7923899319,36.7774524719,
669 36.7625606573,36.747714231,36.7329129381,36.7181565255,36.7034447426,
670 36.6887773404,36.6741540721,36.6595746928,36.6450389596,36.6305466316,
671 36.6160974695,36.6016912363,36.5873276967,36.5730066171,36.5587277661,
672 36.5444909137,36.530295832,36.5161422947,36.5020300775,36.4879589576,
673 36.473928714,36.4599391274,36.4459899804,36.4320810569,36.4182121427,
674 36.4043830253,36.3905934937,36.3768433384,36.3631323519,36.3494603278,
675 36.3358270615,36.32223235,36.3086759918,36.2951577868,36.2816775364,
676 36.2682350438,36.2548301133,36.2414625508,36.2281321637,36.2148387608,
677 36.2015821522,36.1883621497,36.1751785661,36.1620312159,36.1489199148,
678 36.1358444799,36.1228047297,36.1098004839,36.0968315636,36.0838977911,
679 36.0709989901,36.0581349856,36.0453056038,36.0325106721,36.0197500193,
680 36.0070234752,35.9943308711,35.9816720393,35.9690468132,35.9564550278,
681 35.9438965189,35.9313711235,35.9188786799,35.9064190275,35.8939920068,
682 35.8815974594,35.869235228,35.8569051565,35.8446070897,35.8323408738,
683 35.8201063558,35.8079033838,35.7957318069,35.7835914756,35.771482241,
684 35.7594039553,35.747356472,35.7353396454,35.7233533306,35.7113973841,
685 35.6994716631,35.6875760259,35.6757103316,35.6638744405,35.6520682136,
686 35.640291513,35.6285442016,35.6168261434,35.6051372032,35.5934772466,
687 35.5818461403,35.5702437517,35.5586699493,35.5471246023,35.5356075808,
688 35.5241187557,35.512657999,35.5012251833,35.489820182,35.4784428696,
689 35.4670931211,35.4557708126,35.4444758209,35.4332080234,35.4219672987,
690 35.4107535258,35.3995665848,35.3884063562,35.3772727218,35.3661655635,
691 35.3550847646,35.3440302088,35.3330017805,35.321999365,35.3110228483,
692 35.300072117,35.2891470586,35.2782475612,35.2673735136,35.2565248054,
693 35.2457013268,35.2349029688,35.2241296228,35.2133811812,35.2026575371,
694 35.1919585838,35.1812842159,35.1706343282,35.1600088162,35.1494075763,
695 35.1388305053,35.1282775008,35.1177484608,35.1072432842,35.0967618704,
696 35.0863041192,35.0758699315,35.0654592084,35.0550718516,35.0447077637,
697 35.0343668477,35.0240490072,35.0137541462,35.0034821697,34.9932329829,
698 34.9830064918,34.9728026027,34.9626212228,34.9524622596,34.9423256212,
699 34.9322112164,34.9221189543,34.9120487447,34.9020004979,34.8919741248,
700 34.8819695366,34.8719866453,34.8620253633,34.8520856033,34.842167279,
701 34.8322703041,34.8223945932,34.8125400611,34.8027066232,34.7928941955,
702 34.7831026943,34.7733320366,34.7635821397,34.7538529214,34.7441443,
703 34.7344561944,34.7247885237,34.7151412076,34.7055141664,34.6959073207,
704 34.6863205914,34.6767539002,34.6672071689,34.6576803201,34.6481732765,
705 34.6386859615,34.6292182987,34.6197702123,34.6103416268,34.6009324673,
706 34.5915426592,34.5821721282,34.5728208006,34.5634886031,34.5541754628,
707 34.544881307,34.5356060638,34.5263496612,34.517112028,34.5078930933,
708 34.4986927864,34.4895110373,34.4803477761,34.4712029334,34.4620764403,
709 34.4529682279,34.4438782282,34.4348063732,34.4257525953,34.4167168273,
710 34.4076990026,34.3986990546,34.3897169172,34.3807525248,34.3718058119,
711 34.3628767135,34.353965165,34.3450711019,34.3361944604,34.3273351768,
712 34.3184931877,34.3096684302,34.3008608417,34.2920703598,34.2832969226,
713 34.2745404684,34.2658009359,34.2570782641,34.2483723923,34.2396832601,
714 34.2310108075,34.2223549748,34.2137157025,34.2050929316,34.1964866032,
715 34.1878966587,34.1793230401,34.1707656894,34.1622245491,34.1536995617,
716 34.1451906704,34.1366978184,34.1282209493,34.1197600069,34.1113149355,
717 34.1028856794,34.0944721833,34.0860743924,34.0776922518,34.0693257072,
718 34.0609747043,34.0526391894,34.0443191087,34.0360144089,34.027725037,
719 34.0194509401,34.0111920657,34.0029483616,33.9947197757,33.9865062562,
720 33.9783077517,33.970124211,33.9619555829,33.9538018168,33.9456628623,
721 33.937538669,33.929429187,33.9213343666,33.9132541583,33.9051885128,
722 33.8971373811,33.8891007144,33.8810784643,33.8730705825,33.8650770208,
723 33.8570977314,33.8491326669,33.8411817798,33.833245023,33.8253223496,
724 33.8174137129,33.8095190666,33.8016383643,33.7937715601,33.7859186082,
725 33.7780794631,33.7702540793,33.7624424119,33.7546444159,33.7468600466,
726 33.7390892595,33.7313320104,33.7235882552,33.7158579501,33.7081410514,
727 33.7004375158,33.6927472999,33.6850703608,33.6774066556,33.6697561417,
728 33.6621187768,33.6544945186,33.646883325,33.6392851544,33.6316999649,
729 33.6241277153,33.6165683642,33.6090218706,33.6014881937,33.5939672928,
730 33.5864591274,33.5789636572,33.5714808422,33.5640106423,33.5565530179,
731 33.5491079294,33.5416753374,33.5342552028,33.5268474865,33.5194521497,
732 33.5120691538,33.5046984602,33.4973400307,33.489993827,33.4826598114,
733 33.475337946,33.4680281931,33.4607305153,33.4534448754,33.4461712362,
734 33.4389095608,33.4316598125,33.4244219546,33.4171959506,33.4099817644,
735 33.4027793597,33.3955887006,33.3884097513,33.3812424763,33.3740868399,
736 33.3669428069,33.3598103421,33.3526894105,33.3455799772,33.3384820076,
737 33.3313954671,33.3243203212,33.3172565359,33.3102040768,33.3031629102,
738 33.2961330022,33.2891143192,33.2821068276,33.2751104942,33.2681252856,
739 33.2611511689,33.254188111,33.2472360793,33.2402950411,33.2333649639,
740 33.2264458153,33.2195375632,33.2126401754,33.20575362,33.1988778652,
741 33.1920128793,33.1851586308,33.1783150883,33.1714822206,33.1646599965,
742 33.157848385,33.1510473553,33.1442568766,33.1374769184,33.1307074501,
743 33.1239484414,33.1171998621,33.1104616821,33.1037338714,33.0970164003,
744 33.090309239,33.0836123579,33.0769257276,33.0702493187,33.063583102,
745 33.0569270484,33.050281129,33.0436453148,33.0370195773,33.0304038877,
746 33.0237982176,33.0172025386,33.0106168224,33.004041041,32.9974751662,
747 32.9909191702,32.9843730252,32.9778367035,32.9713101775,32.9647934199,
748 32.9582864031,32.9517891002,32.9453014838,32.938823527,32.932355203,
749 32.9258964848,32.919447346,32.9130077598,32.9065776998,32.9001571398,
750 32.8937460533,32.8873444143,32.8809521968,32.8745693748,32.8681959225,
751 32.8618318142,32.8554770243,32.8491315272,32.8427952975,32.8364683099,
752 32.8301505393,32.8238419604,32.8175425484,32.8112522782,32.8049711251,
753 32.7986990644,32.7924360713,32.7861821216,32.7799371906,32.7737012541,
754 32.7674742879,32.7612562677,32.7550471697,32.7488469698,32.7426556442,
755 32.7364731692,32.730299521,32.7241346761,32.717978611,32.7118313024,
756 32.705692727,32.6995628615,32.6934416828,32.6873291679,32.6812252939,
757 32.6751300379,32.6690433772,32.6629652891,32.656895751,32.6508347404,
758 32.6447822349,32.6387382122,32.6327026501,32.6266755264,32.620656819,
759 32.614646506,32.6086445654,32.6026509754,32.5966657144,32.5906887606,
760 32.5847200926,32.5787596887,32.5728075277,32.5668635881,32.5609278488,
761 32.5550002886,32.5490808863,32.5431696211,32.537266472,32.5313714181,
762 32.5254844387,32.519605513,32.5137346206,32.5078717408,32.5020168532,
763 32.4961699374,32.4903309731,32.4844999401,32.4786768182,32.4728615874,
764 32.4670542276,32.4612547189,32.4554630416,32.4496791757,32.4439031016,
765 32.4381347996,32.4323742503,32.426621434,32.4208763314,32.4151389231,
766 32.4094091899,32.4036871126,32.3979726719,32.3922658489,32.3865666246,
767 32.38087498,32.3751908962,32.3695143546,32.3638453363,32.3581838227,
768 32.3525297952,32.3468832354,32.3412441247,32.3356124448,32.3299881773,
769 32.3243713041,32.3187618069,32.3131596676,32.3075648682,32.3019773906,
770 32.296397217,32.2908243294,32.2852587101,32.2797003414,32.2741492056,
771 32.268605285,32.2630685622,32.2575390196,32.2520166399,32.2465014056,
772 32.2409932995,32.2354923044,32.229998403,32.2245115783,32.2190318133,
773 32.2135590908,32.208093394,32.202634706,32.1971830101,32.1917382894,
774 32.1863005272,32.1808697069,32.175445812,32.170028826,32.1646187322,
775 32.1592155144,32.1538191563,32.1484296414,32.1430469536,32.1376710768,
776 32.1323019947,32.1269396913,32.1215841506,32.1162353567,32.1108932936,
777 32.1055579455,32.1002292966,32.0949073313,32.0895920337,32.0842833883,
778 32.0789813795,32.0736859917,32.0683972096,32.0631150177,32.0578394006,
779 32.052570343,32.0473078297,32.0420518455,32.0368023751,32.0315594036,
780 32.0263229158,32.0210928968,32.0158693316,32.0106522053,32.0054415031,
781 32.0002372101,31.9950393117,31.989847793,31.9846626396,31.9794838367,
782 31.9743113698,31.9691452245,31.9639853862,31.9588318406,31.9536845733,
783 31.9485435701,31.9434088165,31.9382802985,31.9331580018,31.9280419124,
784 31.9229320162,31.9178282991,31.9127307472,31.9076393466,31.9025540833,
785 31.8974749435,31.8924019134,31.8873349793,31.8822741275,31.8772193443,
786 31.8721706161,31.8671279293,31.8620912705,31.857060626,31.8520359826,
787 31.8470173268,31.8420046452,31.8369979246,31.8319971517,31.8270023133,
788 31.8220133962,31.8170303872,31.8120532733,31.8070820415,31.8021166787,
789 31.797157172,31.7922035084,31.7872556751,31.7823136593,31.7773774481,
790 31.7724470288,31.7675223886,31.762603515,31.7576903953,31.7527830168,
791 31.7478813671,31.7429854336,31.7380952039,31.7332106655,31.728331806,
792 31.7234586132,31.7185910746,31.713729178,31.7088729112,31.7040222619,
793 31.6991772181,31.6943377676,31.6895038984,31.6846755983,31.6798528554,
794 31.6750356577,31.6702239933,31.6654178504,31.660617217,31.6558220813,
795 31.6510324316,31.6462482561,31.6414695432,31.636696281,31.6319284582,
796 31.6271660629,31.6224090837,31.6176575091,31.6129113276,31.6081705277,
797 31.6034350979,31.5987050271,31.5939803036,31.5892609164,31.5845468541,
798 31.5798381054,31.5751346592,31.5704365043,31.5657436296,31.5610560239,
799 31.5563736762,31.5516965754,31.5470247107,31.5423580709,31.5376966452,
800 31.5330404227,31.5283893925,31.5237435438,31.5191028657,31.5144673476,
801 31.5098369787,31.5052117483,31.5005916457,31.4959766602,31.4913667814,
802 31.4867619986,31.4821623013,31.477567679,31.4729781212,31.4683936175,
803 31.4638141574,31.4592397306,31.4546703267,31.4501059355,31.4455465465,
804 31.4409921497,31.4364427347,31.4318982914,31.4273588096,31.4228242792,
805 31.4182946901,31.4137700321,31.4092502953,31.4047354697,31.4002255452,
806 31.395720512,31.39122036,31.3867250795,31.3822346605,31.3777490932,
807 31.3732683678,31.3687924745,31.3643214037,31.3598551455,31.3553936903,
808 31.3509370284,31.3464851502,31.3420380461,31.3375957065,31.3331581218,
809 31.3287252826,31.3242971794,31.3198738027,31.315455143,31.311041191,
810 31.3066319372,31.3022273724,31.2978274871,31.2934322722,31.2890417183,
811 31.2846558161,31.2802745565,31.2758979303,31.2715259284,31.2671585414,
812 31.2627957605,31.2584375764,31.2540839802,31.2497349627,31.245390515,
813 31.2410506282,31.2367152932,31.2323845011,31.228058243,31.2237365101,
814 31.2194192934,31.2151065843,31.2107983738,31.2064946532,31.2021954137,
815 31.1979006466,31.1936103433,31.189324495,31.1850430931,31.180766129,
816 31.176493594,31.1722254796,31.1679617772,31.1637024784,31.1594475745,
817 31.1551970572,31.1509509179,31.1467091483,31.1424717399,31.1382386843,
818 31.1340099732,31.1297855982,31.1255655511,31.1213498235,31.1171384071,
819 31.1129312938,31.1087284753,31.1045299434,31.1003356899,31.0961457067,
820 31.0919599856
821 }
822 }
823 };
+0
-824
src/LV2/gxamp.lv2/DSP/6DJ8.cc less more
0 // generated by ../../tools/tube_transfer.py
1 // tube: 6DJ8
2 // plate current function: triode
3 // mu: 28
4 // kx: 1.3
5 // kg1: 330
6 // kp: 320
7 // kvb: 300
8
9 table1d_imp<2001> tubetable_6DJ8[2] =
10 {
11 {
12 // Ri = 68k
13 -5,5,200,2001, {
14 137.512728867,137.399223264,137.285690251,137.17212984,137.058542039,
15 136.944926859,136.831284308,136.717614396,136.603917133,136.490192528,
16 136.37644059,136.262661328,136.148854752,136.035020871,135.921159694,
17 135.80727123,135.693355487,135.579412475,135.465442203,135.351444679,
18 135.237419911,135.12336791,135.009288682,134.895182238,134.781048584,
19 134.66688773,134.552699684,134.438484454,134.324242049,134.209972477,
20 134.095675745,133.981351862,133.867000836,133.752622675,133.638217387,
21 133.523784979,133.40932546,133.294838836,133.180325116,133.065784308,
22 132.951216418,132.836621455,132.721999425,132.607350337,132.492674197,
23 132.377971012,132.263240791,132.148483539,132.033699265,131.918887974,
24 131.804049675,131.689184374,131.574292077,131.459372792,131.344426526,
25 131.229453284,131.114453074,130.999425902,130.884371775,130.769290699,
26 130.654182681,130.539047726,130.423885842,130.308697033,130.193481308,
27 130.078238671,129.962969128,129.847672686,129.732349351,129.616999128,
28 129.501622024,129.386218043,129.270787192,129.155329476,129.039844901,
29 128.924333473,128.808795197,128.693230078,128.577638121,128.462019333,
30 128.346373717,128.230701281,128.115002027,127.999275963,127.883523091,
31 127.767743419,127.65193695,127.536103689,127.420243641,127.304356811,
32 127.188443204,127.072502824,126.956535675,126.840541763,126.724521091,
33 126.608473664,126.492399486,126.376298562,126.260170896,126.144016492,
34 126.027835354,125.911627486,125.795392892,125.679131576,125.562843542,
35 125.446528794,125.330187335,125.213819169,125.0974243,124.981002732,
36 124.864554467,124.74807951,124.631577864,124.515049532,124.398494517,
37 124.281912824,124.165304454,124.048669411,123.932007699,123.815319319,
38 123.698604276,123.581862572,123.465094209,123.348299192,123.231477521,
39 123.114629201,122.997754234,122.880852622,122.763924367,122.646969473,
40 122.529987942,122.412979775,122.295944976,122.178883547,122.061795488,
41 121.944680804,121.827539496,121.710371565,121.593177014,121.475955845,
42 121.358708059,121.241433658,121.124132644,121.006805019,120.889450784,
43 120.772069941,120.654662491,120.537228435,120.419767776,120.302280513,
44 120.18476665,120.067226186,119.949659123,119.832065462,119.714445204,
45 119.596798349,119.4791249,119.361424857,119.24369822,119.12594499,
46 119.008165168,118.890358755,118.772525751,118.654666156,118.536779972,
47 118.418867198,118.300927835,118.182961883,118.064969342,117.946950213,
48 117.828904495,117.710832189,117.592733295,117.474607812,117.356455741,
49 117.238277081,117.120071832,117.001839993,116.883581565,116.765296547,
50 116.646984939,116.52864674,116.410281948,116.291890565,116.173472589,
51 116.055028019,115.936556854,115.818059094,115.699534738,115.580983784,
52 115.462406232,115.343802081,115.225171329,115.106513975,114.987830018,
53 114.869119456,114.750382289,114.631618514,114.51282813,114.394011136,
54 114.27516753,114.15629731,114.037400475,113.918477022,113.799526951,
55 113.680550258,113.561546942,113.442517002,113.323460434,113.204377236,
56 113.085267407,112.966130945,112.846967846,112.727778109,112.608561731,
57 112.489318709,112.370049041,112.250752725,112.131429757,112.012080135,
58 111.892703857,111.773300918,111.653871317,111.53441505,111.414932115,
59 111.295422508,111.175886226,111.056323266,110.936733624,110.817117298,
60 110.697474283,110.577804577,110.458108176,110.338385076,110.218635274,
61 110.098858766,109.979055549,109.859225617,109.739368969,109.619485599,
62 109.499575504,109.379638679,109.259675121,109.139684826,109.019667789,
63 108.899624005,108.779553471,108.659456182,108.539332134,108.419181322,
64 108.299003742,108.178799389,108.058568258,107.938310344,107.818025643,
65 107.697714149,107.577375859,107.457010766,107.336618867,107.216200154,
66 107.095754624,106.975282272,106.854783091,106.734257077,106.613704224,
67 106.493124526,106.372517979,106.251884576,106.131224312,106.010537181,
68 105.889823177,105.769082295,105.648314528,105.52751987,105.406698316,
69 105.28584986,105.164974495,105.044072215,104.923143013,104.802186884,
70 104.681203821,104.560193818,104.439156867,104.318092963,104.197002099,
71 104.075884268,103.954739463,103.833567678,103.712368905,103.591143138,
72 103.46989037,103.348610593,103.2273038,103.105969985,102.98460914,
73 102.863221257,102.74180633,102.62036435,102.498895311,102.377399205,
74 102.255876023,102.134325759,102.012748405,101.891143952,101.769512394,
75 101.647853721,101.526167926,101.404455002,101.282714939,101.16094773,
76 101.039153366,100.917331839,100.795483141,100.673607263,100.551704197,
77 100.429773934,100.307816465,100.185831783,100.063819877,99.9417807401,
78 99.8197143622,99.6976207349,99.575499849,99.4533516955,99.3311762653,
79 99.2089735491,99.0867435378,98.964486222,98.8422015924,98.7198896394,
80 98.5975503536,98.4751837255,98.3527897454,98.2303684035,98.1079196902,
81 97.9854435957,97.86294011,97.7404092232,97.6178509253,97.4952652063,
82 97.3726520559,97.250011464,97.1273434204,97.0046479148,96.8819249367,
83 96.7591744756,96.6363965212,96.5135910627,96.3907580897,96.2678975913,
84 96.1450095569,96.0220939755,95.8991508364,95.7761801285,95.6531818408,
85 95.5301559623,95.4071024818,95.2840213882,95.1609126701,95.0377763163,
86 94.9146123152,94.7914206556,94.6682013258,94.5449543144,94.4216796095,
87 94.2983771996,94.1750470729,94.0516892175,93.9283036216,93.8048902731,
88 93.6814491601,93.5579802705,93.4344835922,93.3109591128,93.1874068203,
89 93.0638267021,92.940218746,92.8165829395,92.6929192701,92.5692277251,
90 92.4455082919,92.3217609579,92.1979857102,92.0741825361,91.9503514226,
91 91.8264923567,91.7026053255,91.5786903159,91.4547473147,91.3307763088,
92 91.2067772848,91.0827502295,90.9586951294,90.8346119711,90.7105007411,
93 90.5863614258,90.4621940116,90.3379984848,90.2137748316,90.0895230382,
94 89.9652430908,89.8409349754,89.7165986779,89.5922341844,89.4678414807,
95 89.3434205527,89.218971386,89.0944939665,88.9699882796,88.8454543111,
96 88.7208920464,88.596301471,88.4716825703,88.3470353296,88.2223597342,
97 88.0976557693,87.9729234202,87.8481626718,87.7233735093,87.5985559176,
98 87.4737098817,87.3488353864,87.2239324165,87.0990009569,86.9740409921,
99 86.8490525069,86.7240354858,86.5989899134,86.4739157741,86.3488130523,
100 86.2236817325,86.0985217988,85.9733332355,85.8481160269,85.7228701571,
101 85.5975956101,85.47229237,85.3469604207,85.2215997461,85.0962103302,
102 84.9707921567,84.8453452094,84.719869472,84.5943649281,84.4688315614,
103 84.3432693553,84.2176782934,84.092058359,83.9664095357,83.8407318067,
104 83.7150251553,83.5892895648,83.4635250183,83.337731499,83.2119089899,
105 83.0860574742,82.9601769347,82.8342673545,82.7083287164,82.5823610033,
106 82.456364198,82.3303382832,82.2042832416,82.078199056,81.9520857088,
107 81.8259431828,81.6997714604,81.5735705241,81.4473403564,81.3210809396,
108 81.1947922561,81.0684742883,80.9421270183,80.8157504285,80.6893445011,
109 80.5629092181,80.4364445617,80.309950514,80.1834270571,80.0568741728,
110 79.9302918433,79.8036800504,79.677038776,79.550368002,79.4236677102,
111 79.2969378824,79.1701785004,79.0433895459,78.9165710006,78.7897228462,
112 78.6628450643,78.5359376366,78.4090005446,78.2820337698,78.1550372939,
113 78.0280110983,77.9009551645,77.7738694739,77.6467540081,77.5196087483,
114 77.3924336761,77.2652287728,77.1379940197,77.0107293981,76.8834348895,
115 76.756110475,76.6287561361,76.5013718539,76.3739576098,76.2465133849,
116 76.1190391605,75.9915349179,75.8640006383,75.7364363029,75.6088418928,
117 75.4812173894,75.3535627738,75.2258780272,75.0981631308,74.9704180658,
118 74.8426428134,74.7148373548,74.5870016713,74.459135744,74.3312395542,
119 74.203313083,74.0753563118,73.9473692218,73.8193517943,73.6913040105,
120 73.5632258517,73.4351172993,73.3069783346,73.178808939,73.0506090938,
121 72.9223787804,72.7941179804,72.6658266751,72.537504846,72.4091524748,
122 72.2807695429,72.1523560319,72.0239119235,71.8954371994,71.7669318413,
123 71.6383958309,71.5098291501,71.3812317808,71.2526037048,71.1239449041,
124 70.9952553608,70.866535057,70.7377839747,70.6090020962,70.4801894039,
125 70.3513458799,70.2224715068,70.0935662671,69.9646301433,69.835663118,
126 69.706665174,69.5776362942,69.4485764614,69.3194856586,69.190363869,
127 69.0612110757,68.932027262,68.8028124113,68.6735665071,68.544289533,
128 68.4149814728,68.2856423104,68.1562720296,68.0268706146,67.8974380496,
129 67.767974319,67.6384794072,67.508953299,67.379395979,67.2498074323,
130 67.1201876439,66.990536599,66.8608542831,66.7311406816,66.6013957805,
131 66.4716195655,66.3418120229,66.2119731387,66.0821028996,65.9522012923,
132 65.8222683035,65.6923039203,65.5623081301,65.4322809203,65.3022222787,
133 65.1721321933,65.0420106521,64.9118576437,64.7816731566,64.65145718,
134 64.5212097028,64.3909307146,64.2606202051,64.1302781642,63.9999045824,
135 63.86949945,63.7390627581,63.6085944978,63.4780946606,63.3475632383,
136 63.2170002231,63.0864056074,62.955779384,62.8251215463,62.6944320876,
137 62.563711002,62.4329582837,62.3021739275,62.1713579283,62.0405102818,
138 61.9096309838,61.7787200307,61.6477774192,61.5168031466,61.3857972106,
139 61.2547596093,61.1236903414,60.9925894061,60.8614568029,60.7302925321,
140 60.5990965942,60.4678689907,60.3366097231,60.205318794,60.0739962062,
141 59.9426419632,59.8112560693,59.6798385291,59.5483893481,59.4169085323,
142 59.2853960884,59.1538520239,59.0222763469,58.8906690661,58.7590301912,
143 58.6273597325,58.4956577011,58.3639241087,58.2321589683,58.1003622931,
144 57.9685340977,57.8366743971,57.7047832076,57.5728605462,57.4409064308,
145 57.3089208804,57.1769039148,57.0448555549,56.9127758226,56.7806647409,
146 56.6485223339,56.5163486267,56.3841436456,56.251907418,56.1196399725,
147 55.9873413389,55.8550115484,55.7226506333,55.5902586273,55.4578355654,
148 55.3253814839,55.1928964206,55.0603804149,54.9278335073,54.7952557401,
149 54.6626471571,54.5300078037,54.3973377269,54.2646369754,54.1319055996,
150 53.9991436517,53.8663511857,53.7335282574,53.6006749245,53.4677912468,
151 53.3348772861,53.2019331059,53.0689587724,52.9359543534,52.8029199192,
152 52.6698555425,52.5367612981,52.4036372633,52.2704835179,52.1373001442,
153 52.0040872271,51.8708448542,51.7375731158,51.6042721052,51.4709419183,
154 51.3375826542,51.204194415,51.070777306,50.9373314355,50.8038569154,
155 50.6703538609,50.5368223907,50.4032626271,50.2696746961,50.1360587275,
156 50.0024148551,49.8687432167,49.7350439541,49.6013172136,49.4675631456,
157 49.3337819053,49.1999736524,49.0661385513,48.9322767715,48.7983884873,
158 48.6644738783,48.5305331297,48.3965664318,48.2625739808,48.1285559787,
159 47.9945126336,47.8604441597,47.7263507774,47.592232714,47.4580902033,
160 47.3239234861,47.1897328106,47.0555184321,46.9212806137,46.7870196261,
161 46.6527357484,46.5184292679,46.3841004803,46.2497496903,46.1153772119,
162 45.9809833681,45.846568492,45.7121329263,45.5776770243,45.4432011498,
163 45.3087056776,45.1741909936,45.0396574956,44.9051055933,44.7705357088,
164 44.635948277,44.5013437459,44.3667225771,44.2320852465,44.0974322441,
165 43.962764075,43.8280812598,43.6933843349,43.5586738531,43.4239503843,
166 43.2892145156,43.1544668524,43.0197080186,42.8849386573,42.7501594316,
167 42.6153710249,42.4805741417,42.3457695087,42.2109578746,42.0761400117,
168 41.9413167163,41.8064888093,41.6716571374,41.5368225735,41.401986018,
169 41.2671483992,41.1323106748,40.9974738322,40.8626388899,40.7278068984,
170 40.5929789412,40.4581561358,40.3233396351,40.1885306281,40.0537303414,
171 39.9189400403,39.78416103,39.6493946568,39.5146423098,39.3799054219,
172 39.2451854712,39.1104839826,38.9758025293,38.8411427342,38.7065062715,
173 38.5718948684,38.4373103067,38.3027544245,38.1682291179,38.0337363429,
174 37.8992781174,37.7648565227,37.6304737057,37.4961318809,37.3618333323,
175 37.2275804158,37.093375561,36.9592212736,36.8251201375,36.6910748171,
176 36.55708806,36.4231626987,36.2893016539,36.1555079361,36.0217846488,
177 35.8881349906,35.7545622582,35.6210698488,35.4876612628,35.3543401068,
178 35.2211100958,35.0879750567,34.9549389303,34.822005775,34.6891797689,
179 34.556465213,34.4238665343,34.2913882882,34.1590351614,34.0268119754,
180 33.8947236884,33.7627753988,33.6309723478,33.499319922,33.3678236562,
181 33.236489236,33.1053225003,32.9743294439,32.8435162196,32.7128891409,
182 32.5824546835,32.4522194881,32.3221903615,32.1923742787,32.0627783842,
183 31.9334099937,31.8042765947,31.6753858474,31.5467455858,31.4183638174,
184 31.2902487238,31.1624086599,31.0348521538,30.9075879057,30.7806247864,
185 30.6539718359,30.5276382612,30.4016334335,30.275966886,30.1506483095,
186 30.0256875494,29.9010946007,29.7768796032,29.6530528365,29.5296247133,
187 29.4066057737,29.2840066773,29.1618381963,29.0401112068,28.9188366802,
188 28.7980256739,28.6776893212,28.557838821,28.4384854266,28.3196404341,
189 28.2013151706,28.083520981,27.9662692154,27.8495712153,27.7334382994,
190 27.6178817497,27.502912796,27.3885426015,27.274782247,27.1616427153,
191 27.0491348756,26.9372694673,26.8260570842,26.7155081583,26.605632944,
192 26.4964415017,26.3879436828,26.2801491135,26.1730671799,26.066707013,
193 25.9610774742,25.8561871411,25.7520442943,25.6486569043,25.5460326191,
194 25.4441787527,25.343102274,25.2428097972,25.1433075719,25.0446014749,
195 24.9466970027,24.8495992647,24.7533129776,24.6578424604,24.5631916308,
196 24.4693640021,24.3763626815,24.284190369,24.1928493573,24.102341533,
197 24.0126683781,23.9238309727,23.8358299992,23.7486657456,23.6623381119,
198 23.576846615,23.492190396,23.4083682275,23.3253785212,23.2432193369,
199 23.1618883911,23.0813830671,23.0017004246,22.9228372103,22.8447898684,
200 22.7675545521,22.6911271343,22.6155032194,22.5406781549,22.4666470431,
201 22.3934047528,22.3209459315,22.2492650165,22.1783562475,22.1082136777,
202 22.0388311858,21.9702024871,21.9023211449,21.8351805819,21.7687740907,
203 21.7030948443,21.6381359073,21.573890245,21.5103507342,21.4475101722,
204 21.3853612859,21.3238967417,21.2631091529,21.2029910891,21.1435350836,
205 21.0847336411,21.0265792455,20.9690643664,20.9121814661,20.8559230061,
206 20.800281453,20.7452492842,20.6908189936,20.6369830967,20.5837341354,
207 20.5310646827,20.4789673469,20.4274347758,20.3764596604,20.3260347384,
208 20.2761527978,20.2268066794,20.1779892802,20.1296935556,20.081912522,
209 20.034639259,19.9878669114,19.941588691,19.8957978783,19.8504878237,
210 19.8056519493,19.7612837498,19.7173767936,19.6739247233,19.6309212573,
211 19.5883601896,19.5462353909,19.5045408084,19.4632704669,19.4224184683,
212 19.3819789922,19.3419462957,19.3023147134,19.2630786571,19.2242326162,
213 19.1857711566,19.1476889213,19.109980629,19.0726410748,19.0356651289,
214 18.9990477362,18.9627839162,18.9268687619,18.8912974396,18.8560651877,
215 18.8211673166,18.7865992077,18.7523563125,18.7184341523,18.6848283169,
216 18.6515344643,18.6185483195,18.5858656739,18.5534823845,18.5213943728,
217 18.4895976244,18.4580881876,18.4268621732,18.3959157529,18.3652451591,
218 18.3348466836,18.3047166771,18.2748515479,18.2452477615,18.2159018395,
219 18.1868103586,18.1579699502,18.1293772992,18.1010291432,18.0729222719,
220 18.0450535259,18.0174197962,17.9900180234,17.9628451967,17.9358983531,
221 17.9091745768,17.8826709984,17.856384794,17.8303131846,17.804453435,
222 17.7788028537,17.7533587915,17.7281186413,17.7030798369,17.6782398529,
223 17.6535962035,17.629146442,17.60488816,17.5808189872,17.5569365901,
224 17.5332386719,17.5097229715,17.4863872631,17.4632293556,17.4402470917,
225 17.4174383478,17.3948010329,17.3723330884,17.3500324875,17.3278972343,
226 17.3059253639,17.2841149411,17.2624640605,17.2409708457,17.2196334488,
227 17.19845005,17.177418857,17.1565381047,17.1358060544,17.1152209936,
228 17.0947812357,17.0744851191,17.0543310071,17.0343172874,17.0144423714,
229 16.9947046944,16.9751027147,16.9556349131,16.9362997931,16.9170958798,
230 16.8980217202,16.8790758822,16.8602569547,16.8415635471,16.8229942888,
231 16.804547829,16.7862228364,16.7680179988,16.7499320229,16.7319636336,
232 16.714111574,16.6963746054,16.6787515061,16.661241072,16.6438421159,
233 16.6265534672,16.6093739717,16.5923024914,16.5753379039,16.5584791027,
234 16.5417249963,16.5250745085,16.5085265778,16.4920801573,16.4757342144,
235 16.4594877306,16.4433397013,16.4272891353,16.4113350551,16.3954764962,
236 16.3797125071,16.3640421492,16.3484644962,16.3329786343,16.3175836618,
237 16.3022786889,16.2870628377,16.2719352417,16.2568950459,16.2419414064,
238 16.2270734904,16.2122904759,16.1975915515,16.1829759164,16.1684427801,
239 16.1539913623,16.1396208926,16.1253306106,16.1111197655,16.0969876161,
240 16.0829334306,16.0689564863,16.0550560698,16.0412314765,16.0274820108,
241 16.0138069857,16.0002057227,15.9866775518,15.9732218113,15.9598378476,
242 15.9465250152,15.9332826765,15.9201102017,15.9070069688,15.8939723631,
243 15.8810057776,15.8681066125,15.8552742754,15.8425081808,15.8298077503,
244 15.8171724125,15.8046016028,15.7920947632,15.7796513423,15.7672707954,
245 15.754952584,15.7426961761,15.7305010459,15.7183666735,15.7062925455,
246 15.694278154,15.6823229973,15.6704265793,15.6585884097,15.6468080039,
247 15.6350848828,15.6234185725,15.611808605,15.6002545171,15.5887558512,
248 15.5773121548,15.5659229802,15.5545878851,15.543306432,15.5320781883,
249 15.5209027261,15.5097796223,15.4987084586,15.4876888213,15.476720301,
250 15.465802493,15.454934997,15.4441174172,15.4333493618,15.4226304434,
251 15.4119602788,15.4013384891,15.3907646991,15.3802385379,15.3697596385,
252 15.3593276378,15.3489421765,15.3386028993,15.3283094545,15.3180614942,
253 15.3078586739,15.2977006532,15.2875870947,15.277517665,15.267492034,
254 15.2575098748,15.2475708642,15.2376746822,15.2278210121,15.2180095404,
255 15.208239957,15.1985119547,15.1888252296,15.1791794809,15.1695744108,
256 15.1600097243,15.1504851298,15.1410003383,15.1315550638,15.1221490232,
257 15.1127819361,15.1034535249,15.094163515,15.0849116342,15.0756976132,
258 15.0665211851,15.057382086,15.0482800541,15.0392148306,15.030186159,
259 15.0211937853,15.012237458,15.003316928,14.9944319486,14.9855822755,
260 14.9767676668,14.9679878826,14.9592426857,14.950531841,14.9418551155,
261 14.9332122786,14.9246031017,14.9160273584,14.9074848247,14.8989752782,
262 14.8904984989,14.8820542689,14.8736423721,14.8652625946,14.8569147243,
263 14.8485985512,14.8403138672,14.832060466,14.8238381434,14.8156466968,
264 14.8074859258,14.7993556314,14.7912556167,14.7831856865,14.7751456474,
265 14.7671353076,14.7591544771,14.7512029678,14.7432805929,14.7353871675,
266 14.7275225084,14.7196864338,14.7118787638,14.7040993197,14.6963479248,
267 14.6886244037,14.6809285825,14.6732602889,14.6656193522,14.6580056031,
268 14.6504188737,14.6428589975,14.6353258098,14.6278191469,14.6203388467,
269 14.6128847485,14.6054566928,14.5980545218,14.5906780788,14.5833272083,
270 14.5760017565,14.5687015706,14.5614264991,14.554176392,14.5469511003,
271 14.5397504764,14.532574374,14.5254226477,14.5182951536,14.511191749,
272 14.5041122922,14.4970566428,14.4900246616,14.4830162103,14.476031152,
273 14.4690693508,14.4621306719,14.4552149818,14.4483221476,14.4414520381,
274 14.4346045227,14.427779472,14.4209767576,14.4141962524,14.4074378298,
275 14.4007013648,14.3939867329,14.3872938109,14.3806224764,14.3739726081,
276 14.3673440856,14.3607367896,14.3541506013,14.3475854034,14.3410410791,
277 14.3345175128,14.3280145895,14.3215321954,14.3150702174,14.3086285433,
278 14.3022070619,14.2958056626,14.2894242359,14.283062673,14.276720866,
279 14.2703987079,14.2640960923,14.2578129137,14.2515490676,14.24530445,
280 14.2390789579,14.232872489,14.2266849416,14.2205162152,14.2143662096,
281 14.2082348255,14.2021219646,14.1960275289,14.1899514215,14.1838935459,
282 14.1778538067,14.1718321088,14.165828358,14.1598424609,14.1538743246,
283 14.1479238569,14.1419909664,14.1360755623,14.1301775544,14.1242968532,
284 14.11843337,14.1125870164,14.106757705,14.1009453487,14.0951498615,
285 14.0893711574,14.0836091515,14.0778637594,14.0721348971,14.0664224814,
286 14.0607264296,14.0550466597,14.0493830902,14.0437356402,14.0381042293,
287 14.0324887777,14.0268892062,14.0213054361,14.0157373894,14.0101849885,
288 14.0046481563,13.9991268163,13.9936208926,13.9881303098,13.9826549929,
289 13.9771948675,13.9717498598,13.9663198964,13.9609049044,13.9555048114,
290 13.9501195456,13.9447490356,13.9393932105,13.9340519998,13.9287253336,
291 13.9234131425,13.9181153575,13.91283191,13.9075627319,13.9023077557,
292 13.8970669141,13.8918401405,13.8866273686,13.8814285326,13.876243567,
293 13.871072407,13.865914988,13.860771246,13.8556411172,13.8505245383,
294 13.8454214467,13.8403317797,13.8352554755,13.8301924725,13.8251427093,
295 13.8201061252,13.8150826598,13.8100722531,13.8050748454,13.8000903775,
296 13.7951187905,13.790160026,13.7852140259,13.7802807323,13.775360088,
297 13.7704520359,13.7655565194,13.7606734822,13.7558028685,13.7509446227,
298 13.7460986895,13.7412650141,13.7364435419,13.7316342189,13.7268369912,
299 13.7220518053,13.717278608,13.7125173466,13.7077679684,13.7030304215,
300 13.6983046538,13.693590614,13.6888882508,13.6841975133,13.679518351,
301 13.6748507136,13.6701945512,13.665549814,13.6609164529,13.6562944187,
302 13.6516836627,13.6470841366,13.6424957921,13.6379185813,13.6333524569,
303 13.6287973714,13.6242532779,13.6197201297,13.6151978803,13.6106864838,
304 13.6061858941,13.6016960656,13.5972169532,13.5927485117,13.5882906964,
305 13.5838434627,13.5794067665,13.5749805636,13.5705648106,13.5661594637,
306 13.5617644799,13.5573798162,13.5530054299,13.5486412786,13.54428732,
307 13.5399435123,13.5356098136,13.5312861826,13.526972578,13.5226689589,
308 13.5183752845,13.5140915142,13.5098176079,13.5055535255,13.5012992271,
309 13.4970546733,13.4928198245,13.4885946418,13.4843790862,13.4801731191,
310 13.4759767019,13.4717897965,13.4676123647,13.4634443689,13.4592857713,
311 13.4551365347,13.4509966219,13.4468659959,13.4427446199,13.4386324575,
312 13.4345294722,13.4304356279,13.4263508888,13.422275219,13.418208583,
313 13.4141509456,13.4101022715,13.4060625259,13.4020316739,13.3980096811,
314 13.393996513,13.3899921354,13.3859965145,13.3820096163,13.3780314073,
315 13.374061854,13.3701009232,13.3661485818,13.362204797,13.358269536,
316 13.3543427662,13.3504244554,13.3465145714,13.3426130821,13.3387199557,
317 13.3348351605,13.3309586652,13.3270904383,13.3232304487,13.3193786654,
318 13.3155350575,13.3116995946,13.3078722459,13.3040529813,13.3002417706,
319 13.2964385836,13.2926433907,13.2888561621,13.2850768682,13.2813054797,
320 13.2775419674,13.2737863022,13.2700384552,13.2662983976,13.2625661008,
321 13.2588415363,13.2551246758,13.2514154912,13.2477139545,13.2440200377,
322 13.2403337131,13.2366549531,13.2329837303,13.2293200174,13.2256637873,
323 13.2220150128,13.2183736671,13.2147397235,13.2111131554,13.2074939363,
324 13.2038820398,13.2002774397,13.19668011,13.1930900248,13.1895071582,
325 13.1859314845,13.1823629783,13.178801614,13.1752473665,13.1717002105,
326 13.168160121,13.1646270732,13.1611010422,13.1575820033,13.1540699321,
327 13.1505648041,13.1470665951,13.1435752808,13.1400908372,13.1366132404,
328 13.1331424666,13.1296784921,13.1262212933,13.1227708467,13.1193271291,
329 13.1158901171,13.1124597877,13.1090361179,13.1056190848,13.1022086655,
330 13.0988048375,13.0954075782,13.0920168651,13.0886326759,13.0852549884,
331 13.0818837805,13.0785190301,13.0751607154,13.0718088145,13.0684633057,
332 13.0651241676,13.0617913785,13.0584649171,13.0551447622,13.0518308925,
333 13.048523287,13.0452219246,13.0419267846,13.0386378462,13.0353550886,
334 13.0320784913,13.0288080338,13.0255436958,13.0222854569,13.019033297,
335 13.0157871959,13.0125471336,13.0093130904,13.0060850462,13.0028629815,
336 12.9996468766,12.9964367119,12.993232468,12.9900341256,12.9868416654,
337 12.9836550682,12.9804743149,12.9772993866,12.9741302643,12.9709669292,
338 12.9678093625,12.9646575458,12.9615114602,12.9583710875,12.9552364092,
339 12.9521074069,12.9489840625,12.9458663579,12.9427542749,12.9396477957,
340 12.9365469022,12.9334515768,12.9303618016,12.9272775591,12.9241988316,
341 12.9211256016,12.9180578519,12.9149955649,12.9119387235,12.9088873106,
342 12.9058413089,12.9028007015,12.8997654714,12.8967356018,12.8937110759,
343 12.8906918769,12.8876779882,12.8846693933,12.8816660756,12.8786680187,
344 12.8756752064,12.8726876222,12.86970525,12.8667280736,12.8637560771,
345 12.8607892443,12.8578275594,12.8548710066,12.8519195701,12.848973234,
346 12.8460319829,12.8430958011,12.8401646731,12.8372385835,12.8343175169,
347 12.831401458,12.8284903916,12.8255843025,12.8226831755,12.8197869957,
348 12.8168957481,12.8140094178,12.8111279898,12.8082514496,12.8053797822,
349 12.8025129731,12.7996510076,12.7967938713,12.7939415497,12.7910940284,
350 12.7882512929,12.7854133292,12.7825801228,12.7797516597,12.7769279257,
351 12.7741089069,12.7712945892,12.7684849587,12.7656800016,12.762879704,
352 12.7600840522,12.7572930325,12.7545066312,12.7517248349,12.74894763,
353 12.7461750029,12.7434069404,12.7406434291,12.7378844557,12.7351300068,
354 12.7323800695,12.7296346305,12.7268936767,12.7241571952,12.721425173,
355 12.7186975971,12.7159744547,12.7132557331,12.7105414194,12.7078315009,
356 12.7051259651,12.7024247993,12.699727991,12.6970355276,12.6943473968,
357 12.6916635861,12.6889840833,12.6863088759,12.6836379519,12.680971299,
358 12.678308905,12.6756507579,12.6729968456,12.6703471562,12.6677016776,
359 12.6650603981,12.6624233057,12.6597903887,12.6571616353,12.6545370337,
360 12.6519165725,12.6493002398,12.6466880242,12.6440799142,12.6414758982,
361 12.6388759649,12.6362801029,12.6336883008,12.6311005473,12.6285168312,
362 12.6259371414,12.6233614666,12.6207897957,12.6182221177,12.6156584215,
363 12.6130986962,12.6105429308,12.6079911145,12.6054432363,12.6028992855,
364 12.6003592512,12.5978231229,12.5952908898,12.5927625412,12.5902380665,
365 12.5877174553,12.585200697,12.582687781,12.580178697,12.5776734346,
366 12.5751719835,12.5726743332,12.5701804736,12.5676903943,12.5652040853,
367 12.5627215363,12.5602427373,12.5577676781,12.5552963487,12.5528287392,
368 12.5503648395,12.5479046397,12.54544813,12.5429953005,12.5405461414,
369 12.5381006428,12.5356587952,12.5332205887,12.5307860138,12.5283550607,
370 12.52592772,12.523503982,12.5210838372,12.5186672762,12.5162542895,
371 12.5138448677,12.5114390014,12.5090366814,12.5066378982,12.5042426426,
372 12.5018509054,12.4994626774,12.4970779493,12.4946967122,12.4923189569,
373 12.4899446743,12.4875738554,12.4852064912,12.4828425728,12.4804820912,
374 12.4781250374,12.4757714028,12.4734211784,12.4710743554,12.468730925,
375 12.4663908786,12.4640542075,12.4617209029,12.4593909562,12.4570643588,
376 12.4547411022,12.4524211778,12.4501045771,12.4477912916,12.4454813129,
377 12.4431746326,12.4408712422,12.4385711334,12.4362742979,12.4339807274,
378 12.4316904136,12.4294033483,12.4271195232,12.4248389303,12.4225615613,
379 12.4202874082,12.4180164628,12.4157487171,12.413484163,12.4112227927,
380 12.408964598,12.406709571,12.4044577039,12.4022089887,12.3999634176,
381 12.3977209827,12.3954816763,12.3932454906,12.3910124178,12.3887824501,
382 12.38655558,12.3843317998,12.3821111017,12.3798934782,12.3776789218,
383 12.3754674248,12.3732589797,12.371053579,12.3688512153,12.366651881,
384 12.3644555688,12.3622622713,12.3600719811,12.3578846908,12.3557003931,
385 12.3535190807,12.3513407464,12.3491653829,12.3469929829,12.3448235394,
386 12.342657045,12.3404934928,12.3383328755,12.336175186,12.3340204173,
387 12.3318685624,12.3297196142,12.3275735657,12.3254304099,12.3232901399,
388 12.3211527488,12.3190182296,12.3168865756,12.3147577797,12.3126318353,
389 12.3105087354,12.3083884733,12.3062710423,12.3041564356,12.3020446464,
390 12.2999356681,12.2978294941,12.2957261176,12.2936255321,12.2915277309,
391 12.2894327075,12.2873404553,12.2852509678,12.2831642384,12.2810802607,
392 12.2789990281,12.2769205344,12.2748447729,12.2727717373,12.2707014213,
393 12.2686338185,12.2665689225,12.2645067269,12.2624472256,12.2603904123,
394 12.2583362806,12.2562848243,12.2542360373,12.2521899133,12.2501464462,
395 12.2481056297,12.2460674579,12.2440319245,12.2419990234,12.2399687487,
396 12.2379410942,12.2359160539,12.2338936219,12.231873792,12.2298565583,
397 12.227841915,12.225829856,12.2238203754,12.2218134674,12.2198091261,
398 12.2178073455,12.2158081199,12.2138114435,12.2118173105,12.209825715,
399 12.2078366513,12.2058501137,12.2038660965,12.2018845939,12.1999056003,
400 12.1979291099,12.1959551172,12.1939836165,12.1920146022,12.1900480687,
401 12.1880840104,12.1861224218,12.1841632973,12.1822066314,12.1802524186,
402 12.1783006534,12.1763513304,12.174404444,12.1724599888,12.1705179595,
403 12.1685783507,12.1666411568,12.1647063727,12.1627739928,12.160844012,
404 12.1589164248,12.156991226,12.1550684103,12.1531479725,12.1512299072,
405 12.1493142093,12.1474008735,12.1454898947,12.1435812676,12.1416749871,
406 12.1397710481,12.1378694453,12.1359701738,12.1340732283,12.1321786038,
407 12.1302862953,12.1283962977,12.1265086058,12.1246232148,12.1227401197,
408 12.1208593153,12.1189807968,12.1171045592,12.1152305975,12.1133589068,
409 12.1114894822,12.1096223189,12.1077574118,12.1058947562,12.1040343472,
410 12.1021761799,12.1003202496,12.0984665514,12.0966150806,12.0947658323,
411 12.0929188017,12.0910739843,12.0892313751,12.0873909695,12.0855527628,
412 12.0837167503,12.0818829273,12.0800512891,12.0782218311,12.0763945487,
413 12.0745694373,12.0727464922,12.0709257088,12.0691070826,12.067290609,
414 12.0654762834
415 }
416 },
417 {
418 // Ri = 250k
419 -5,5,200,2001, {
420 137.512728867,137.399223264,137.285690251,137.17212984,137.058542039,
421 136.944926859,136.831284308,136.717614396,136.603917133,136.490192528,
422 136.37644059,136.262661328,136.148854752,136.035020871,135.921159694,
423 135.80727123,135.693355487,135.579412475,135.465442203,135.351444679,
424 135.237419911,135.12336791,135.009288682,134.895182238,134.781048584,
425 134.66688773,134.552699684,134.438484454,134.324242049,134.209972477,
426 134.095675745,133.981351862,133.867000836,133.752622675,133.638217387,
427 133.523784979,133.40932546,133.294838836,133.180325116,133.065784308,
428 132.951216418,132.836621455,132.721999425,132.607350337,132.492674197,
429 132.377971012,132.263240791,132.148483539,132.033699265,131.918887974,
430 131.804049675,131.689184374,131.574292077,131.459372792,131.344426526,
431 131.229453284,131.114453074,130.999425902,130.884371775,130.769290699,
432 130.654182681,130.539047726,130.423885842,130.308697033,130.193481308,
433 130.078238671,129.962969128,129.847672686,129.732349351,129.616999128,
434 129.501622024,129.386218043,129.270787192,129.155329476,129.039844901,
435 128.924333473,128.808795197,128.693230078,128.577638121,128.462019333,
436 128.346373717,128.230701281,128.115002027,127.999275963,127.883523091,
437 127.767743419,127.65193695,127.536103689,127.420243641,127.304356811,
438 127.188443204,127.072502824,126.956535675,126.840541763,126.724521091,
439 126.608473664,126.492399486,126.376298562,126.260170896,126.144016492,
440 126.027835354,125.911627486,125.795392892,125.679131576,125.562843542,
441 125.446528794,125.330187335,125.213819169,125.0974243,124.981002732,
442 124.864554467,124.74807951,124.631577864,124.515049532,124.398494517,
443 124.281912824,124.165304454,124.048669411,123.932007699,123.815319319,
444 123.698604276,123.581862572,123.465094209,123.348299192,123.231477521,
445 123.114629201,122.997754234,122.880852622,122.763924367,122.646969473,
446 122.529987942,122.412979775,122.295944976,122.178883547,122.061795488,
447 121.944680804,121.827539496,121.710371565,121.593177014,121.475955845,
448 121.358708059,121.241433658,121.124132644,121.006805019,120.889450784,
449 120.772069941,120.654662491,120.537228435,120.419767776,120.302280513,
450 120.18476665,120.067226186,119.949659123,119.832065462,119.714445204,
451 119.596798349,119.4791249,119.361424857,119.24369822,119.12594499,
452 119.008165168,118.890358755,118.772525751,118.654666156,118.536779972,
453 118.418867198,118.300927835,118.182961883,118.064969342,117.946950213,
454 117.828904495,117.710832189,117.592733295,117.474607812,117.356455741,
455 117.238277081,117.120071832,117.001839993,116.883581565,116.765296548,
456 116.646984939,116.52864674,116.410281948,116.291890565,116.173472589,
457 116.055028019,115.936556854,115.818059094,115.699534738,115.580983784,
458 115.462406232,115.343802081,115.225171329,115.106513975,114.987830018,
459 114.869119456,114.750382289,114.631618514,114.51282813,114.394011136,
460 114.27516753,114.15629731,114.037400475,113.918477022,113.799526951,
461 113.680550258,113.561546942,113.442517002,113.323460434,113.204377236,
462 113.085267407,112.966130945,112.846967846,112.727778109,112.608561731,
463 112.489318709,112.370049041,112.250752725,112.131429757,112.012080135,
464 111.892703857,111.773300918,111.653871317,111.53441505,111.414932115,
465 111.295422508,111.175886226,111.056323266,110.936733624,110.817117298,
466 110.697474283,110.577804577,110.458108176,110.338385076,110.218635274,
467 110.098858766,109.979055549,109.859225618,109.739368969,109.619485599,
468 109.499575504,109.379638679,109.259675121,109.139684826,109.019667789,
469 108.899624005,108.779553471,108.659456182,108.539332134,108.419181322,
470 108.299003742,108.178799389,108.058568258,107.938310344,107.818025643,
471 107.69771415,107.577375859,107.457010766,107.336618867,107.216200154,
472 107.095754624,106.975282272,106.854783091,106.734257077,106.613704224,
473 106.493124526,106.372517979,106.251884576,106.131224312,106.010537181,
474 105.889823177,105.769082295,105.648314528,105.52751987,105.406698317,
475 105.28584986,105.164974495,105.044072215,104.923143013,104.802186884,
476 104.681203821,104.560193818,104.439156867,104.318092963,104.197002099,
477 104.075884268,103.954739463,103.833567678,103.712368905,103.591143138,
478 103.46989037,103.348610593,103.227303801,103.105969985,102.98460914,
479 102.863221258,102.74180633,102.620364351,102.498895311,102.377399205,
480 102.255876023,102.134325759,102.012748405,101.891143953,101.769512394,
481 101.647853721,101.526167927,101.404455002,101.282714939,101.16094773,
482 101.039153366,100.917331839,100.795483141,100.673607263,100.551704197,
483 100.429773934,100.307816466,100.185831783,100.063819878,99.9417807406,
484 99.8197143628,99.6976207354,99.5754998496,99.4533516961,99.3311762659,
485 99.2089735498,99.0867435385,98.9644862227,98.8422015931,98.7198896402,
486 98.5975503544,98.4751837263,98.3527897462,98.2303684044,98.1079196912,
487 97.9854435967,97.862940111,97.7404092242,97.6178509264,97.4952652074,
488 97.3726520571,97.2500114653,97.1273434217,97.0046479161,96.881924938,
489 96.759174477,96.6363965227,96.5135910643,96.3907580913,96.267897593,
490 96.1450095586,96.0220939773,95.8991508382,95.7761801304,95.6531818428,
491 95.5301559644,95.407102484,95.2840213905,95.1609126725,95.0377763187,
492 94.9146123178,94.7914206583,94.6682013286,94.5449543172,94.4216796125,
493 94.2983772027,94.1750470761,94.0516892209,93.9283036251,93.8048902767,
494 93.6814491639,93.5579802744,93.4344835962,93.3109591171,93.1874068247,
495 93.0638267067,92.9402187508,92.8165829445,92.6929192752,92.5692277304,
496 92.4455082975,92.3217609637,92.1979857163,92.0741825423,91.9503514291,
497 91.8264923635,91.7026053326,91.5786903232,91.4547473223,91.3307763167,
498 91.206777293,91.082750238,90.9586951383,90.8346119803,90.7105007507,
499 90.5863614358,90.462194022,90.3379984956,90.2137748429,90.0895230499,
500 89.965243103,89.840934988,89.7165986911,89.5922341981,89.467841495,
501 89.3434205675,89.2189714014,89.0944939825,88.9699882963,88.8454543284,
502 88.7208920644,88.5963014897,88.4716825897,88.3470353498,88.2223597552,
503 88.0976557912,87.9729234429,87.8481626954,87.7233735338,87.5985559431,
504 87.4737099082,87.3488354139,87.2239324452,87.0990009867,86.9740410231,
505 86.8490525391,86.7240355193,86.5989899482,86.4739158103,86.34881309,
506 86.2236817716,86.0985218395,85.9733332779,85.8481160709,85.7228702028,
507 85.5975956577,85.4722924194,85.3469604721,85.2215997996,85.0962103858,
508 84.9707922146,84.8453452696,84.7198695345,84.5943649931,84.4688316289,
509 84.3432694255,84.2176783664,84.092058435,83.9664096147,83.8407318888,
510 83.7150252407,83.5892896536,83.4635251106,83.3377315949,83.2119090897,
511 83.0860575779,82.9601770426,82.8342674667,82.708328833,82.5823611245,
512 82.456364324,82.3303384143,82.2042833779,82.0781991977,81.9520858562,
513 81.825943336,81.6997716197,81.5735706898,81.4473405286,81.3210811187,
514 81.1947924423,81.0684744819,80.9421272196,80.8157506378,80.6893447187,
515 80.5629094444,80.436444797,80.3099507586,80.1834273114,80.0568744373,
516 79.9302921182,79.8036803362,79.6770390732,79.550368311,79.4236680315,
517 79.2969382165,79.1701788478,79.0433899071,78.9165713762,78.7897232367,
518 78.6628454704,78.5359380588,78.4090009835,78.2820342262,78.1550377685,
519 78.0280115917,77.9009556775,77.7738700074,77.6467545627,77.519609325,
520 77.3924342757,77.2652293962,77.1379946679,77.0107300721,76.8834355903,
521 76.7561112037,76.6287568937,76.5013726416,76.3739584288,76.2465142365,
522 76.119040046,75.9915358386,75.8640015956,75.7364372982,75.6088429277,
523 75.4812184654,75.3535638926,75.2258791905,75.0981643403,74.9704193234,
524 74.842644121,74.7148387145,74.587003085,74.4591372139,74.3312410825,
525 74.2033146721,74.0753579641,73.9473709398,73.8193535805,73.6913058677,
526 73.5632277828,73.4351193072,73.3069804223,73.1788111097,73.0506113508,
527 72.9223811272,72.7941204204,72.6658292121,72.537507484,72.4091552176,
528 72.2807723947,72.1523589971,72.0239150066,71.8954404051,71.7669351744,
529 71.6383992966,71.5098327536,71.3812355275,71.2526076005,71.1239489547,
530 70.9952595725,70.8665394361,70.7377885279,70.6090068305,70.4801943263,
531 70.3513509981,70.2224768285,70.0935718004,69.9646358965,69.8356691,
532 69.7066713939,69.5776427614,69.4485831857,69.3194926503,69.1903711386,
533 69.0612186344,68.9320351212,68.802820583,68.6735750037,68.5442983675,
534 68.4149906585,68.2856518613,68.1562819603,68.0268809401,67.8974487857,
535 67.7679854819,67.638491014,67.5089653673,67.3794085272,67.2498204794,
536 67.1202012097,66.9905507042,66.8608689491,66.7311559309,66.601411636,
537 66.4716360515,66.3418291643,66.2119909618,66.0821214314,65.9522205608,
538 65.8222883382,65.6923247516,65.5623297897,65.4323034412,65.302245695,
539 65.1721565406,65.0420359675,64.9118839657,64.7817005253,64.6514856368,
540 64.5212392911,64.3909614794,64.2606521931,64.1303114242,63.9999391648,
541 63.8695354075,63.7391001453,63.6086333716,63.47813508,63.3476052649,
542 63.2170439207,63.0864510425,62.9558266257,62.8251706663,62.6944831608,
543 62.5637641059,62.4330134991,62.3022313383,62.1714176218,62.0405723488,
544 61.9096955186,61.7787871314,61.6478471879,61.5168756894,61.3858726377,
545 61.2548380355,61.1237718859,60.9926741928,60.8615449607,60.730384195,
546 60.5991919017,60.4679680876,60.3367127601,60.2054259277,60.0741075994,
547 59.9427577854,59.8113764964,59.6799637443,59.5485195417,59.4170439022,
548 59.2855368404,59.1539983719,59.0224285133,58.8908272824,58.7591946978,
549 58.6275307794,58.4958355482,58.3641090265,58.2323512377,58.1005622064,
550 57.9687419586,57.8368905217,57.7050079243,57.5730941965,57.4411493697,
551 57.3091734771,57.1771665531,57.0451286339,56.9130597573,56.7809599628,
552 56.6488292914,56.5166677863,56.3844754921,56.2522524556,56.1199987253,
553 55.9877143521,55.8553993885,55.7230538895,55.5906779121,55.4582715156,
554 55.3258347616,55.1933677144,55.0608704404,54.9283430087,54.7957854911,
555 54.6631979622,54.5305804991,54.3979331822,54.2652560946,54.1325493226,
556 53.9998129557,53.8670470866,53.7342518116,53.6014272301,53.4685734456,
557 53.3356905649,53.202778699,53.0698379626,52.9368684747,52.8038703584,
558 52.6708437413,52.5377887554,52.4047055373,52.2715942288,52.1384549761,
559 52.005287931,51.8720932505,51.7388710969,51.6056216384,51.4723450489,
560 51.3390415085,51.2057112034,51.0723543264,50.9389710768,50.8055616609,
561 50.6721262922,50.5386651916,50.4051785874,50.271666716,50.1381298218,
562 50.0045681577,49.8709819854,49.7373715755,49.6037372078,49.470079172,
563 49.3363977676,49.2026933043,49.0689661028,48.9352164944,48.8014448221,
564 48.6676514405,48.5338367167,48.40000103,48.2661447731,48.1322683519,
565 47.9983721867,47.8644567117,47.7305223766,47.5965696462,47.4625990014,
566 47.3286109398,47.1946059759,47.0605846422,46.9265474893,46.792495087,
567 46.6584280245,46.5243469117,46.3902523791,46.2561450792,46.122025687,
568 45.9878949008,45.853753443,45.7196020608,45.5854415275,45.4512726429,
569 45.3170962344,45.1829131581,45.0487242995,44.9145305749,44.7803329321,
570 44.6461323516,44.5119298478,44.3777264702,44.2435233043,44.1093214733,
571 43.9751221389,43.8409265029,43.7067358086,43.5725513419,43.4383744332,
572 43.3042064584,43.1700488409,43.0359030526,42.9017706161,42.7676531062,
573 42.6335521515,42.4994694361,42.3654067018,42.2313657496,42.0973484418,
574 41.9633567039,41.8293925267,41.6954579684,41.5615551566,41.4276862907,
575 41.293853644,41.1600595658,41.0263064842,40.8925969082,40.7589334302,
576 40.6253187286,40.4917555701,40.3582468127,40.2247954079,40.0914044039,
577 39.9580769478,39.8248162888,39.691625781,39.5585088858,39.4254691754,
578 39.2925103354,39.1596361679,39.0268505942,38.8941576581,38.7615615286,
579 38.6290665035,38.4966770114,38.3643976159,38.2322330175,38.1001880572,
580 37.9682677194,37.8364771346,37.7048215822,37.5733064936,37.4419374545,
581 37.3107202079,37.1796606565,37.0487648651,36.9180390628,36.7874896455,
582 36.6571231776,36.526946394,36.3969662016,36.2671896813,36.1376240885,
583 36.0082768545,35.8791555875,35.7502680727,35.6216222725,35.4932263267,
584 35.3650885517,35.23721744,35.1096216587,34.9823100482,34.8552916201,
585 34.7285755548,34.6021711986,34.4760880604,34.3503358077,34.2249242626,
586 34.0998633968,33.9751633259,33.8508343041,33.7268867171,33.6033310755,
587 33.4801780068,33.3574382475,33.2351226341,33.1132420942,32.9918076357,
588 32.8708303373,32.7503213367,32.6302918195,32.5107530067,32.3917161423,
589 32.2731924804,32.1551932711,32.037729747,31.9208131085,31.8044545095,
590 31.6886650419,31.5734557206,31.4588374679,31.3448210978,31.2314173004,
591 31.1186366258,31.0064894684,30.8949860509,30.7841364092,30.6739503761,
592 30.5644375666,30.455607363,30.3474688999,30.2400310502,30.1333024117,
593 30.0272912935,29.9220057037,29.8174533375,29.7136415657,29.6105774244,
594 29.5082676055,29.4067184471,29.3059359261,29.2059256507,29.1066928541,
595 29.0082423889,28.9105787231,28.8137059359,28.7176277156,28.6223473578,
596 28.5278677641,28.4341914432,28.3413205108,28.2492566924,28.1580013255,
597 28.0675553634,27.9779193796,27.8890935724,27.8010777713,27.7138714431,
598 27.6274736993,27.5418833035,27.4570986796,27.373117921,27.289938799,
599 27.2075587732,27.1259750009,27.0451843475,26.965183397,26.8859684628,
600 26.8075355984,26.7298806087,26.652999061,26.5768862962,26.5015374399,
601 26.426947414,26.3531109471,26.2800225865,26.2076767084,26.1360675291,
602 26.0651891153,25.9950353953,25.9256001685,25.8568771158,25.7888598095,
603 25.7215417227,25.6549162387,25.5889766601,25.5237162175,25.4591280777,
604 25.3952053525,25.331941106,25.2693283624,25.2073601134,25.1460293249,
605 25.0853289441,25.0252519052,24.9657911364,24.9069395648,24.8486901225,
606 24.7910357516,24.7339694092,24.677484072,24.6215727409,24.5662284448,
607 24.5114442449,24.4572132382,24.4035285609,24.3503833915,24.2977709541,
608 24.2456845208,24.1941174145,24.1430630113,24.0925147424,24.0424660964,
609 23.992910621,23.9438419248,23.8952536784,23.8471396162,23.7994935376,
610 23.7523093077,23.7055808586,23.6593021901,23.6134673704,23.5680705368,
611 23.5231058959,23.4785677245,23.4344503694,23.3907482481,23.3474558483,
612 23.3045677287,23.2620785186,23.2199829176,23.1782756959,23.1369516941,
613 23.0960058224,23.055433061,23.0152284591,22.9753871351,22.9359042758,
614 22.8967751359,22.8579950378,22.8195593706,22.7814635902,22.743703218,
615 22.7062738406,22.6691711094,22.6323907394,22.5959285091,22.5597802593,
616 22.5239418928,22.4884093734,22.4531787255,22.4182460329,22.3836074384,
617 22.3492591431,22.3151974054,22.2814185405,22.2479189191,22.2146949676,
618 22.1817431664,22.1490600496,22.1166422042,22.0844862693,22.0525889354,
619 22.0209469434,21.9895570842,21.9584161977,21.9275211724,21.896868944,
620 21.8664564954,21.8362808557,21.8063390992,21.7766283451,21.7471457566,
621 21.7178885402,21.6888539452,21.6600392626,21.631441825,21.6030590054,
622 21.5748882168,21.5469269116,21.5191725808,21.4916227535,21.4642749962,
623 21.4371269121,21.4101761408,21.3834203573,21.3568572718,21.3304846287,
624 21.3043002064,21.2783018166,21.2524873036,21.2268545441,21.2014014463,
625 21.1761259495,21.1510260236,21.1260996686,21.1013449141,21.0767598189,
626 21.0523424701,21.0280909831,21.004003501,20.9800781938,20.9563132586,
627 20.9327069183,20.9092574221,20.8859630443,20.8628220842,20.8398328657,
628 20.8169937368,20.7943030693,20.7717592581,20.7493607214,20.7271058996,
629 20.7049932554,20.6830212735,20.6611884598,20.6394933414,20.617934466,
630 20.5965104018,20.5752197372,20.5540610799,20.5330330574,20.512134316,
631 20.491363521,20.4707193559,20.4502005225,20.4298057403,20.4095337464,
632 20.3893832953,20.3693531584,20.3494421236,20.3296489955,20.3099725947,
633 20.2904117577,20.2709653368,20.2516321995,20.2324112284,20.2133013213,
634 20.1943013902,20.1754103619,20.1566271772,20.1379507909,20.1193801714,
635 20.1009143009,20.0825521747,20.0642928011,20.0461352015,20.0280784098,
636 20.0101214725,19.9922634483,19.9745034079,19.9568404342,19.9392736215,
637 19.9218020757,19.9044249141,19.8871412651,19.8699502683,19.8528510738,
638 19.8358428425,19.818924746,19.8020959659,19.7853556942,19.7687031328,
639 19.7521374934,19.7356579977,19.7192638768,19.702954371,19.6867287302,
640 19.6705862133,19.6545260883,19.6385476318,19.6226501296,19.6068328756,
641 19.5910951724,19.5754363311,19.5598556707,19.5443525186,19.5289262099,
642 19.5135760879,19.4983015033,19.4831018147,19.4679763881,19.4529245969,
643 19.4379458218,19.4230394509,19.4082048791,19.3934415084,19.3787487479,
644 19.3641260131,19.3495727265,19.3350883172,19.3206722206,19.3063238786,
645 19.2920427395,19.2778282577,19.263679894,19.2495971149,19.2355793932,
646 19.2216262073,19.2077370416,19.1939113861,19.1801487367,19.1664485945,
647 19.1528104664,19.1392338645,19.1257183064,19.1122633148,19.0988684177,
648 19.0855331483,19.0722570446,19.0590396499,19.0458805122,19.0327791844,
649 19.0197352243,19.0067481941,18.993817661,18.9809431967,18.9681243774,
650 18.9553607836,18.9426520006,18.9299976177,18.9173972287,18.9048504315,
651 18.8923568283,18.8799160254,18.8675276332,18.855191266,18.8429065421,
652 18.8306730839,18.8184905175,18.8063584728,18.7942765836,18.7822444873,
653 18.7702618249,18.7583282413,18.7464433847,18.734606907,18.7228184636,
654 18.7110777131,18.6993843177,18.6877379431,18.6761382579,18.6645849344,
655 18.6530776479,18.6416160769,18.6301999032,18.6188288114,18.6075024895,
656 18.5962206284,18.5849829221,18.5737890673,18.5626387639,18.5515317145,
657 18.5404676247,18.5294462029,18.5184671601,18.5075302104,18.4966350702,
658 18.4857814588,18.4749690983,18.4641977132,18.4534670307,18.4427767803,
659 18.4321266945,18.4215165079,18.4109459577,18.4004147836,18.3899227277,
660 18.3794695343,18.3690549502,18.3586787246,18.3483406089,18.3380403567,
661 18.327777724,18.3175524689,18.3073643518,18.2972131352,18.2870985837,
662 18.2770204641,18.2669785453,18.2569725982,18.2470023957,18.2370677129,
663 18.2271683268,18.2173040164,18.2074745625,18.1976797481,18.187919358,
664 18.1781931787,18.1685009989,18.1588426089,18.149217801,18.1396263691,
665 18.1300681091,18.1205428184,18.1110502966,18.1015903445,18.0921627649,
666 18.0827673623,18.0734039429,18.0640723142,18.0547722859,18.0455036688,
667 18.0362662756,18.0270599206,18.0178844194,18.0087395894,17.9996252494,
668 17.9905412198,17.9814873225,17.9724633808,17.9634692195,17.9545046649,
669 17.9455695447,17.9366636879,17.9277869252,17.9189390885,17.9101200109,
670 17.9013295273,17.8925674735,17.883833687,17.8751280064,17.8664502716,
671 17.857800324,17.849178006,17.8405831614,17.8320156354,17.8234752741,
672 17.8149619251,17.8064754372,17.7980156603,17.7895824455,17.7811756451,
673 17.7727951126,17.7644407026,17.7561122709,17.7478096744,17.7395327711,
674 17.7312814201,17.7230554816,17.714854817,17.7066792887,17.69852876,
675 17.6904030955,17.6823021608,17.6742258224,17.6661739479,17.6581464059,
676 17.6501430661,17.642163799,17.6342084763,17.6262769706,17.6183691553,
677 17.6104849049,17.6026240949,17.5947866017,17.5869723025,17.5791810756,
678 17.5714128001,17.5636673559,17.5559446241,17.5482444865,17.5405668256,
679 17.5329115251,17.5252784694,17.5176675436,17.510078634,17.5025116274,
680 17.4949664116,17.4874428751,17.4799409074,17.4724603986,17.4650012398,
681 17.4575633227,17.4501465398,17.4427507845,17.4353759509,17.4280219338,
682 17.4206886288,17.4133759324,17.4060837415,17.3988119541,17.3915604686,
683 17.3843291844,17.3771180014,17.3699268203,17.3627555424,17.35560407,
684 17.3484723057,17.341360153,17.3342675159,17.3271942994,17.3201404088,
685 17.3131057502,17.3060902305,17.2990937569,17.2921162377,17.2851575813,
686 17.2782176971,17.2712964951,17.2643938858,17.2575097803,17.2506440905,
687 17.2437967285,17.2369676075,17.2301566409,17.2233637429,17.2165888281,
688 17.2098318119,17.2030926101,17.1963711391,17.189667316,17.1829810581,
689 17.1763122836,17.1696609112,17.1630268599,17.1564100495,17.1498104003,
690 17.1432278329,17.1366622687,17.1301136294,17.1235818374,17.1170668156,
691 17.1105684871,17.1040867758,17.0976216062,17.0911729029,17.0847405913,
692 17.0783245972,17.0719248468,17.0655412669,17.0591737847,17.0528223279,
693 17.0464868247,17.0401672035,17.0338633936,17.0275753244,17.0213029259,
694 17.0150461285,17.008804863,17.0025790607,16.9963686535,16.9901735733,
695 16.9839937528,16.9778291251,16.9716796235,16.9655451818,16.9594257344,
696 16.9533212159,16.9472315614,16.9411567063,16.9350965866,16.9290511385,
697 16.9230202986,16.9170040041,16.9110021924,16.9050148013,16.8990417691,
698 16.8930830343,16.8871385358,16.8812082131,16.8752920059,16.8693898542,
699 16.8635016985,16.8576274795,16.8517671385,16.8459206169,16.8400878566,
700 16.8342687999,16.8284633893,16.8226715677,16.8168932783,16.8111284648,
701 16.8053770711,16.7996390414,16.7939143204,16.7882028529,16.7825045842,
702 16.7768194599,16.7711474258,16.7654884282,16.7598424137,16.7542093289,
703 16.7485891212,16.7429817379,16.7373871268,16.731805236,16.7262360139,
704 16.7206794092,16.7151353708,16.7096038479,16.7040847902,16.6985781476,
705 16.69308387,16.687601908,16.6821322124,16.676674734,16.6712294241,
706 16.6657962344,16.6603751165,16.6549660228,16.6495689054,16.6441837172,
707 16.6388104109,16.6334489397,16.6280992572,16.6227613169,16.617435073,
708 16.6121204796,16.6068174911,16.6015260624,16.5962461483,16.5909777043,
709 16.5857206857,16.5804750482,16.575240748,16.5700177411,16.5648059841,
710 16.5596054337,16.5544160468,16.5492377806,16.5440705926,16.5389144403,
711 16.5337692817,16.5286350749,16.5235117782,16.5183993502,16.5132977498,
712 16.5082069358,16.5031268677,16.4980575048,16.4929988068,16.4879507336,
713 16.4829132453,16.4778863024,16.4728698652,16.4678638946,16.4628683516,
714 16.4578831973,16.4529083931,16.4479439006,16.4429896815,16.438045698,
715 16.4331119121,16.4281882863,16.4232747832,16.4183713655,16.4134779963,
716 16.4085946388,16.4037212562,16.3988578123,16.3940042707,16.3891605954,
717 16.3843267505,16.3795027004,16.3746884096,16.3698838428,16.3650889649,
718 16.3603037408,16.3555281359,16.3507621156,16.3460056454,16.3412586913,
719 16.336521219,16.3317931948,16.3270745849,16.3223653558,16.3176654741,
720 16.3129749068,16.3082936207,16.303621583,16.298958761,16.2943051222,
721 16.2896606343,16.285025265,16.2803989824,16.2757817546,16.2711735499,
722 16.2665743366,16.2619840836,16.2574027594,16.2528303331,16.2482667737,
723 16.2437120505,16.2391661329,16.2346289903,16.2301005925,16.2255809094,
724 16.2210699108,16.2165675671,16.2120738484,16.2075887252,16.203112168,
725 16.1986441477,16.194184635,16.189733601,16.1852910168,16.1808568537,
726 16.1764310832,16.1720136768,16.1676046063,16.1632038434,16.1588113602,
727 16.1544271288,16.1500511214,16.1456833105,16.1413236685,16.1369721682,
728 16.1326287822,16.1282934836,16.1239662453,16.1196470405,16.1153358426,
729 16.1110326249,16.1067373611,16.1024500248,16.0981705898,16.0938990301,
730 16.0896353196,16.0853794327,16.0811313435,16.0768910266,16.0726584563,
731 16.0684336075,16.0642164549,16.0600069734,16.055805138,16.0516109239,
732 16.0474243062,16.0432452604,16.0390737619,16.0349097864,16.0307533095,
733 16.026604307,16.022462755,16.0183286294,16.0142019064,16.0100825622,
734 16.0059705733,16.0018659161,15.9977685672,15.9936785032,15.9895957011,
735 15.9855201377,15.98145179,15.9773906352,15.9733366504,15.9692898131,
736 15.9652501006,15.9612174904,15.9571919603,15.9531734879,15.949162051,
737 15.9451576277,15.941160196,15.9371697339,15.9331862197,15.9292096318,
738 15.9252399486,15.9212771486,15.9173212104,15.9133721128,15.9094298345,
739 15.9054943544,15.9015656517,15.8976437053,15.8937284944,15.8898199983,
740 15.8859181964,15.8820230682,15.8781345932,15.874252751,15.8703775214,
741 15.8665088841,15.8626468192,15.8587913065,15.8549423262,15.8510998585,
742 15.8472638835,15.8434343817,15.8396113335,15.8357947194,15.8319845199,
743 15.8281807158,15.8243832879,15.8205922169,15.8168074838,15.8130290697,
744 15.8092569556,15.8054911227,15.8017315522,15.7979782256,15.7942311241,
745 15.7904902294,15.7867555229,15.7830269864,15.7793046016,15.7755883502,
746 15.7718782142,15.7681741756,15.7644762164,15.7607843186,15.7570984646,
747 15.7534186365,15.7497448167,15.7460769876,15.7424151318,15.7387592317,
748 15.7351092701,15.7314652295,15.7278270929,15.7241948431,15.720568463,
749 15.7169479355,15.7133332439,15.7097243711,15.7061213004,15.7025240152,
750 15.6989324987,15.6953467343,15.6917667056,15.6881923961,15.6846237894,
751 15.6810608692,15.6775036193,15.6739520235,15.6704060657,15.6668657298,
752 15.6633309998,15.6598018599,15.6562782942,15.652760287,15.6492478224,
753 15.6457408848,15.6422394587,15.6387435286,15.6352530788,15.6317680941,
754 15.6282885592,15.6248144586,15.6213457773,15.6178825,15.6144246117,
755 15.6109720973,15.6075249419,15.6040831305,15.6006466483,15.5972154805,
756 15.5937896123,15.5903690291,15.5869537163,15.5835436592,15.5801388435,
757 15.5767392546,15.5733448782,15.5699556999,15.5665717054,15.5631928806,
758 15.5598192113,15.5564506833,15.5530872827,15.5497289954,15.5463758074,
759 15.543027705,15.5396846742,15.5363467014,15.5330137727,15.5296858744,
760 15.5263629931,15.5230451151,15.5197322269,15.5164243151,15.5131213662,
761 15.5098233669,15.5065303039,15.5032421639,15.4999589337,15.4966806003,
762 15.4934071504,15.4901385711,15.4868748494,15.4836159722,15.4803619267,
763 15.4771127001,15.4738682796,15.4706286523,15.4673938057,15.464163727,
764 15.4609384036,15.457717823,15.4545019727,15.4512908402,15.4480844132,
765 15.4448826791,15.4416856258,15.4384932409,15.4353055122,15.4321224276,
766 15.4289439748,15.4257701418,15.4226009166,15.4194362872,15.4162762415,
767 15.4131207678,15.409969854,15.4068234885,15.4036816594,15.400544355,
768 15.3974115636,15.3942832736,15.3911594733,15.3880401512,15.3849252958,
769 15.3818148956,15.3787089391,15.3756074151,15.3725103121,15.3694176188,
770 15.366329324,15.3632454164,15.3601658849,15.3570907183,15.3540199055,
771 15.3509534355,15.3478912972,15.3448334797,15.341779972,15.3387307632,
772 15.3356858425,15.3326451991,15.3296088221,15.3265767009,15.3235488246,
773 15.3205251828,15.3175057647,15.3144905597,15.3114795573,15.308472747,
774 15.3054701184,15.3024716609,15.2994773642,15.2964872179,15.2935012118,
775 15.2905193354,15.2875415787,15.2845679312,15.281598383,15.2786329238,
776 15.2756715436,15.2727142322,15.2697609796,15.2668117759,15.2638666111,
777 15.2609254752,15.2579883584,15.2550552508,15.2521261426,15.249201024,
778 15.2462798852,15.2433627166,15.2404495084,15.2375402511,15.2346349349,
779 15.2317335503,15.2288360878,15.2259425378,15.2230528908,15.2201671375,
780 15.2172852684,15.2144072741,15.2115331453,15.2086628726,15.2057964467,
781 15.2029338585,15.2000750986,15.197220158,15.1943690274,15.1915216977,
782 15.1886781598,15.1858384047,15.1830024233,15.1801702066,15.1773417457,
783 15.1745170316,15.1716960554,15.1688788083,15.1660652813,15.1632554657,
784 15.1604493526,15.1576469334,15.1548481993,15.1520531416,15.1492617516,
785 15.1464740206,15.1436899402,15.1409095017,15.1381326965,15.1353595161,
786 15.1325899521,15.1298239959,15.1270616392,15.1243028735,15.1215476904,
787 15.1187960816,15.1160480388,15.1133035537,15.1105626179,15.1078252234,
788 15.1050913618,15.1023610249,15.0996342047,15.0969108929,15.0941910815,
789 15.0914747624,15.0887619276,15.086052569,15.0833466786,15.0806442485,
790 15.0779452707,15.0752497372,15.0725576403,15.0698689721,15.0671837246,
791 15.0645018902,15.0618234609,15.0591484291,15.0564767869,15.0538085268,
792 15.051143641,15.0484821218,15.0458239617,15.0431691529,15.0405176879,
793 15.0378695592,15.0352247593,15.0325832805,15.0299451154,15.0273102566,
794 15.0246786966,15.022050428,15.0194254434,15.0168037355,15.0141852968,
795 15.0115701201,15.0089581981,15.0063495236,15.0037440891,15.0011418876,
796 14.9985429119,14.9959471547,14.9933546088,14.9907652673,14.9881791229,
797 14.9855961686,14.9830163972,14.9804398018,14.9778663754,14.9752961109,
798 14.9727290013,14.9701650398,14.9676042193,14.965046533,14.962491974,
799 14.9599405354,14.9573922104,14.9548469921,14.9523048738,14.9497658486,
800 14.9472299098,14.9446970507,14.9421672646,14.9396405447,14.9371168844,
801 14.9345962771,14.932078716,14.9295641947,14.9270527064,14.9245442447,
802 14.9220388029,14.9195363747,14.9170369533,14.9145405324,14.9120471055,
803 14.9095566662,14.9070692079,14.9045847244,14.9021032092,14.8996246559,
804 14.8971490582,14.8946764098,14.8922067044,14.8897399356,14.8872760973,
805 14.884815183,14.8823571867,14.8799021021,14.877449923,14.8750006433,
806 14.8725542567,14.8701107571,14.8676701385,14.8652323947,14.8627975196,
807 14.8603655072,14.8579363515,14.8555100463,14.8530865858,14.8506659638,
808 14.8482481745,14.8458332119,14.84342107,14.841011743,14.8386052248,
809 14.8362015098,14.8338005919,14.8314024654,14.8290071244,14.8266145631,
810 14.8242247756,14.8218377564,14.8194534995,14.8170719992,14.8146932498,
811 14.8123172457,14.809943981,14.8075734502,14.8052056476,14.8028405675,
812 14.8004782043,14.7981185525,14.7957616063,14.7934073604,14.791055809,
813 14.7887069467,14.7863607679,14.7840172671,14.7816764389,14.7793382777,
814 14.7770027781,14.7746699347,14.7723397421,14.7700121947,14.7676872873,
815 14.7653650145,14.7630453708,14.760728351,14.7584139497,14.7561021616,
816 14.7537929814,14.7514864038,14.7491824235,14.7468810354,14.7445822341,
817 14.7422860144,14.7399923711,14.7377012991,14.7354127931,14.733126848,
818 14.7308434587,14.72856262,14.7262843267,14.7240085739,14.7217353563,
819 14.719464669,14.7171965068,14.7149308648,14.7126677378,14.7104071209,
820 14.7081490091
821 }
822 }
823 };
+0
-840
src/LV2/gxamp.lv2/DSP/6V6.cc less more
0 /*
1 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
2 * Copyright (C) 2011 Pete Shorthose
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 * ---------------------------------------------------------------------------
18 *
19 * This is the 6V6 tube table
20 * This file is part of the Guitarix Audio Engine
21 *
22 * ----------------------------------------------------------------------------
23 */
24
25 table1d_imp<2001> tubetable_6V6[2] =
26 {
27 {
28 // Ri = 68k
29 -5,5,200,2001, {
30 239.919843376,239.854937108,239.789738489,239.724247218,239.658462996,
31 239.592385535,239.526014546,239.459349752,239.392390878,239.325137654,
32 239.257589818,239.189747112,239.121609284,239.053176087,238.984447281,
33 238.91542263,238.846101903,238.776484877,238.706571332,238.636361055,
34 238.565853836,238.495049475,238.423947772,238.352548536,238.280851579,
35 238.208856722,238.136563787,238.063972604,237.991083007,237.917894835,
36 237.844407935,237.770622155,237.696537352,237.622153385,237.54747012,
37 237.472487429,237.397205186,237.321623273,237.245741575,237.169559984,
38 237.093078396,237.016296711,236.939214835,236.86183268,236.78415016,
39 236.706167196,236.627883714,236.549299644,236.470414921,236.391229484,
40 236.311743279,236.231956253,236.151868362,236.071479563,235.99078982,
41 235.9097991,235.828507376,235.746914624,235.665020826,235.582825967,
42 235.500330038,235.417533033,235.334434951,235.251035796,235.167335575,
43 235.083334301,234.999031988,234.914428659,234.829524337,234.744319051,
44 234.658812834,234.573005723,234.48689776,234.400488988,234.313779459,
45 234.226769224,234.13945834,234.05184687,233.963934876,233.875722429,
46 233.7872096,233.698396466,233.609283107,233.519869606,233.430156051,
47 233.340142534,233.249829147,233.159215991,233.068303166,232.977090779,
48 232.885578937,232.793767753,232.701657342,232.609247824,232.516539321,
49 232.423531959,232.330225867,232.236621177,232.142718023,232.048516546,
50 231.954016887,231.85921919,231.764123605,231.66873028,231.573039372,
51 231.477051037,231.380765434,231.284182727,231.187303082,231.090126667,
52 230.992653654,230.894884217,230.796818534,230.698456783,230.599799147,
53 230.500845813,230.401596966,230.302052798,230.202213502,230.102079273,
54 230.001650309,229.900926811,229.799908981,229.698597024,229.596991149,
55 229.495091566,229.392898486,229.290412124,229.187632698,229.084560426,
56 228.98119553,228.877538233,228.77358876,228.66934734,228.564814202,
57 228.459989578,228.354873701,228.249466808,228.143769136,228.037780925,
58 227.931502416,227.824933853,227.718075481,227.610927548,227.503490301,
59 227.395763992,227.287748873,227.179445197,227.070853221,226.961973202,
60 226.852805398,226.743350071,226.633607482,226.523577894,226.413261574,
61 226.302658786,226.1917698,226.080594885,225.969134311,225.857388351,
62 225.745357278,225.633041366,225.520440893,225.407556135,225.294387371,
63 225.180934881,225.067198945,224.953179846,224.838877868,224.724293293,
64 224.609426409,224.494277501,224.378846857,224.263134765,224.147141516,
65 224.030867399,223.914312706,223.79747773,223.680362764,223.562968102,
66 223.445294038,223.32734087,223.209108892,223.090598404,222.971809703,
67 222.852743088,222.733398858,222.613777314,222.493878757,222.373703489,
68 222.253251812,222.132524028,222.011520442,221.890241357,221.768687078,
69 221.64685791,221.524754159,221.402376131,221.279724132,221.15679847,
70 221.033599452,220.910127386,220.78638258,220.662365343,220.538075983,
71 220.413514811,220.288682136,220.163578268,220.038203517,219.912558193,
72 219.786642608,219.660457072,219.534001897,219.407277394,219.280283874,
73 219.15302165,219.025491033,218.897692335,218.769625868,218.641291945,
74 218.512690877,218.383822977,218.254688558,218.125287932,217.995621411,
75 217.865689308,217.735491935,217.605029605,217.47430263,217.343311321,
76 217.212055993,217.080536955,216.948754521,216.816709003,216.684400712,
77 216.551829959,216.418997057,216.285902317,216.152546049,216.018928564,
78 215.885050174,215.750911189,215.616511919,215.481852673,215.346933762,
79 215.211755495,215.076318182,214.94062213,214.804667649,214.668455047,
80 214.531984632,214.395256711,214.258271591,214.121029579,213.983530982,
81 213.845776106,213.707765256,213.569498737,213.430976855,213.292199913,
82 213.153168215,213.013882065,212.874341767,212.734547621,212.594499931,
83 212.454198998,212.313645122,212.172838605,212.031779746,211.890468845,
84 211.748906201,211.607092111,211.465026874,211.322710786,211.180144145,
85 211.037327247,210.894260386,210.750943858,210.607377956,210.463562975,
86 210.319499207,210.175186945,210.03062648,209.885818102,209.740762104,
87 209.595458773,209.449908399,209.30411127,209.158067675,209.011777899,
88 208.865242228,208.718460949,208.571434346,208.424162703,208.276646303,
89 208.128885428,207.980880361,207.832631382,207.684138772,207.53540281,
90 207.386423774,207.237201943,207.087737593,206.938031001,206.788082442,
91 206.637892191,206.487460522,206.336787708,206.185874021,206.034719731,
92 205.883325111,205.73169043,205.579815955,205.427701956,205.275348699,
93 205.122756451,204.969925477,204.816856041,204.663548407,204.510002838,
94 204.356219595,204.20219894,204.047941132,203.893446431,203.738715095,
95 203.583747381,203.428543545,203.273103843,203.117428529,202.961517858,
96 202.80537208,202.648991449,202.492376215,202.335526628,202.178442936,
97 202.021125388,201.86357423,201.705789708,201.547772068,201.389521553,
98 201.231038406,201.072322869,200.913375184,200.75419559,200.594784326,
99 200.435141631,200.275267741,200.115162893,199.954827322,199.794261261,
100 199.633464944,199.472438602,199.311182467,199.149696769,198.987981736,
101 198.826037597,198.663864578,198.501462905,198.338832802,198.175974495,
102 198.012888205,197.849574154,197.686032562,197.52226365,197.358267635,
103 197.194044735,197.029595166,196.864919145,196.700016884,196.534888597,
104 196.369534496,196.203954793,196.038149697,195.872119417,195.70586416,
105 195.539384134,195.372679544,195.205750595,195.03859749,194.871220431,
106 194.703619619,194.535795255,194.367747539,194.199476666,194.030982836,
107 193.862266242,193.69332708,193.524165544,193.354781825,193.185176116,
108 193.015348605,192.845299483,192.675028937,192.504537154,192.333824319,
109 192.162890617,191.991736232,191.820361346,191.648766139,191.476950793,
110 191.304915485,191.132660394,190.960185696,190.787491567,190.61457818,
111 190.44144571,190.268094328,190.094524205,189.92073551,189.746728413,
112 189.572503081,189.398059679,189.223398374,189.048519329,188.873422706,
113 188.698108668,188.522577375,188.346828986,188.17086366,187.994681553,
114 187.818282821,187.641667619,187.4648361,187.287788416,187.110524719,
115 186.933045159,186.755349884,186.577439042,186.399312779,186.220971241,
116 186.042414571,185.863642913,185.684656407,185.505455195,185.326039416,
117 185.146409208,184.966564707,184.78650605,184.606233371,184.425746802,
118 184.245046478,184.064132527,183.88300508,183.701664266,183.520110212,
119 183.338343043,183.156362885,182.974169862,182.791764095,182.609145707,
120 182.426314816,182.243271543,182.060016004,181.876548316,181.692868595,
121 181.508976953,181.324873504,181.14055836,180.95603163,180.771293424,
122 180.58634385,180.401183013,180.215811021,180.030227975,179.844433981,
123 179.658429138,179.472213549,179.285787311,179.099150523,178.912303282,
124 178.725245682,178.537977819,178.350499785,178.162811672,177.974913571,
125 177.78680557,177.598487758,177.409960222,177.221223046,177.032276316,
126 176.843120113,176.653754521,176.464179619,176.274395486,176.084402201,
127 175.894199839,175.703788477,175.513168189,175.322339047,175.131301123,
128 174.940054487,174.748599208,174.556935354,174.365062992,174.172982186,
129 173.980693001,173.788195499,173.595489741,173.402575787,173.209453697,
130 173.016123528,172.822585335,172.628839174,172.434885098,172.240723159,
131 172.046353409,171.851775896,171.65699067,171.461997778,171.266797264,
132 171.071389174,170.87577355,170.679950435,170.483919869,170.28768189,
133 170.091236537,169.894583847,169.697723853,169.500656591,169.303382093,
134 169.105900389,168.90821151,168.710315484,168.512212338,168.313902098,
135 168.115384789,167.916660433,167.717729053,167.518590668,167.319245298,
136 167.11969296,166.919933671,166.719967446,166.519794298,166.31941424,
137 166.118827282,165.918033434,165.717032704,165.515825098,165.314410622,
138 165.112789281,164.910961076,164.708926008,164.506684078,164.304235284,
139 164.101579623,163.898717091,163.695647681,163.492371386,163.288888199,
140 163.085198108,162.881301103,162.67719717,162.472886295,162.268368463,
141 162.063643656,161.858711857,161.653573044,161.448227196,161.242674291,
142 161.036914304,160.83094721,160.62477298,160.418391588,160.211803002,
143 160.005007191,159.798004121,159.590793759,159.383376069,159.175751012,
144 158.967918551,158.759878644,158.551631251,158.343176326,158.134513827,
145 157.925643705,157.716565915,157.507280405,157.297787126,157.088086025,
146 156.878177048,156.66806014,156.457735244,156.247202301,156.036461253,
147 155.825512036,155.614354589,155.402988847,155.191414744,154.979632212,
148 154.767641183,154.555441585,154.343033346,154.130416393,153.91759065,
149 153.704556041,153.491312486,153.277859907,153.064198221,152.850327345,
150 152.636247195,152.421957684,152.207458725,151.992750227,151.7778321,
151 151.562704251,151.347366586,151.131819009,150.916061423,150.700093728,
152 150.483915823,150.267527608,150.050928976,149.834119824,149.617100043,
153 149.399869526,149.182428161,148.964775837,148.746912439,148.528837853,
154 148.310551961,148.092054646,147.873345786,147.65442526,147.435292944,
155 147.215948713,146.99639244,146.776623997,146.556643254,146.336450078,
156 146.116044336,145.895425893,145.674594613,145.453550356,145.232292983,
157 145.010822352,144.789138319,144.567240739,144.345129466,144.122804351,
158 143.900265243,143.677511992,143.454544443,143.231362442,143.007965832,
159 142.784354453,142.560528148,142.336486752,142.112230104,141.887758038,
160 141.663070388,141.438166985,141.213047659,140.987712238,140.762160551,
161 140.536392421,140.310407672,140.084206127,139.857787605,139.631151926,
162 139.404298906,139.177228362,138.949940108,138.722433955,138.494709716,
163 138.266767199,138.038606213,137.810226563,137.581628056,137.352810494,
164 137.12377368,136.894517415,136.665041496,136.435345723,136.205429892,
165 135.975293798,135.744937235,135.514359995,135.283561869,135.052542648,
166 134.82130212,134.589840073,134.358156292,134.126250564,133.894122672,
167 133.661772399,133.429199528,133.19640384,132.963385115,132.730143131,
168 132.496677668,132.262988503,132.029075413,131.794938175,131.560576562,
169 131.325990352,131.091179317,130.856143233,130.620881872,130.385395008,
170 130.149682414,129.913743863,129.677579128,129.441187981,129.204570195,
171 128.967725544,128.730653801,128.493354739,128.255828133,128.018073758,
172 127.780091388,127.541880801,127.303441774,127.064774085,126.825877513,
173 126.58675184,126.347396848,126.107812322,125.867998046,125.627953809,
174 125.387679402,125.147174616,124.906439246,124.665473091,124.424275951,
175 124.18284763,123.941187934,123.699296676,123.457173669,123.214818733,
176 122.97223169,122.729412369,122.486360602,122.243076228,121.99955909,
177 121.755809038,121.511825927,121.26760962,121.023159987,120.778476904,
178 120.533560256,120.288409935,120.043025842,119.797407887,119.551555992,
179 119.305470084,119.059150105,118.812596006,118.565807749,118.318785311,
180 118.071528678,117.824037853,117.57631285,117.328353699,117.080160446,
181 116.831733152,116.583071896,116.334176775,116.085047901,115.835685411,
182 115.586089457,115.336260215,115.086197883,114.835902681,114.585374855,
183 114.334614673,114.083622432,113.832398456,113.580943098,113.329256739,
184 113.077339793,112.825192708,112.572815961,112.320210071,112.067375588,
185 111.814313105,111.561023251,111.307506702,111.053764172,110.799796425,
186 110.545604269,110.291188564,110.036550219,109.781690197,109.526609517,
187 109.271309257,109.015790552,108.760054603,108.504102673,108.247936094,
188 107.99155627,107.734964676,107.478162863,107.221152462,106.963935187,
189 106.706512834,106.448887292,106.191060538,105.933034646,105.674811791,
190 105.416394248,105.157784399,104.89898474,104.639997879,104.380826542,
191 104.121473582,103.861941977,103.602234839,103.342355417,103.082307103,
192 102.822093435,102.561718104,102.30118496,102.040498015,101.779661449,
193 101.518679619,101.25755706,100.996298495,100.734908838,100.473393204,
194 100.211756913,99.9500054931,99.6881446953,99.4261804934,99.1641190935,
195 98.9019669409,98.6397307266,98.3774173951,98.115034151,97.8525884667,
196 97.5900880897,97.32754105,97.0649556675,96.8023405592,96.5397046474,
197 96.2770571663,96.01440767,95.7517660395,95.4891424902,95.226547579,
198 94.9639922112,94.7014876479,94.4390455122,94.1766777957,93.9143968652,
199 93.6522154685,93.39014674,93.1282042061,92.8664017902,92.6047538171,
200 92.3432750174,92.0819805307,91.820885909,91.5600071186,91.2993605427,
201 91.0389629817,90.7788316539,90.5189841954,90.2594386585,90.0002135096,
202 89.7413276266,89.4828002945,89.2246512005,88.9669004284,88.709568451,
203 88.4526761221,88.196244667,87.940295672,87.6848510727,87.4299331406,
204 87.1755644693,86.9217679583,86.6685667964,86.4159844438,86.1640446119,
205 85.9127712432,85.6621884888,85.4123206855,85.163192331,84.914828058,
206 84.6672526082,84.4204908033,84.1745675171,83.9295076449,83.6853360732,
207 83.4420776478,83.1997571419,82.9583992232,82.7180284205,82.4786690901,
208 82.2403453816,82.0030812043,81.7669001925,81.5318256718,81.2978806254,
209 81.0650876604,80.8334689751,80.6030463265,80.373840999,80.1458737738,
210 79.9191648987,79.6937340602,79.469600356,79.2467822688,79.025297642,
211 78.8051636567,78.5863968102,78.3690128963,78.1530269874,77.9384534185,
212 77.7253057722,77.5135968673,77.3033387471,77.0945426718,76.8872191109,
213 76.6813777391,76.4770274327,76.274176269,76.0728315269,75.8729996892,
214 75.674686447,75.4778967059,75.2826345928,75.0889034655,74.896705923,
215 74.7060438173,74.5169182664,74.3293296689,74.1432777192,73.958761424,
216 73.7757791196,73.5943284902,73.4144065864,73.2360098455,73.0591341108,
217 72.8837746527,72.7099261894,72.5375829084,72.3667384877,72.1973861174,
218 72.0295185219,71.8631279807,71.698206351,71.5347450886,71.3727352695,
219 71.2121676108,71.0530324916,70.895319974,70.7390198224,70.5841215239,
220 70.4306143075,70.2784871629,70.127728859,69.9783279618,69.8302728517,
221 69.6835517406,69.5381526878,69.3940636164,69.251272328,69.1097665175,
222 68.9695337873,68.8305616607,68.692837595,68.556348994,68.4210832195,
223 68.2870276031,68.1541694565,68.0224960825,67.8919947839,67.7626528733,
224 67.6344576819,67.5073965675,67.3814569225,67.2566261813,67.132891827,
225 67.0102413984,66.8886624955,66.7681427857,66.6486700089,66.5302319826,
226 66.4128166063,66.2964118658,66.1810058376,66.0665866919,65.9531426963,
227 65.8406622188,65.7291337307,65.6185458088,65.5088871381,65.4001465135,
228 65.2923128418,65.1853751436,65.0793225539,64.9741443241,64.869829823,
229 64.7663685372,64.6637500722,64.5619641527,64.4610006235,64.3608494493,
230 64.261500715,64.1629446261,64.0651715079,63.9681718061,63.8719360861,
231 63.776455033,63.6817194506,63.5877202614,63.4944485058,63.4018953417,
232 63.3100520431,63.2189100002,63.1284607182,63.038695816,62.9496070262,
233 62.8611861931,62.7734252727,62.6863163309,62.5998515428,62.5140231916,
234 62.4288236674,62.344245466,62.2602811881,62.1769235376,62.094165321,
235 62.0119994454,61.9304189184,61.8494168459,61.7689864313,61.6891209743,
236 61.6098138696,61.5310586057,61.4528487634,61.3751780152,61.2980401233,
237 61.2214289391,61.1453384013,61.0697625353,60.9946954515,60.9201313444,
238 60.8460644913,60.772489251,60.699400063,60.6267914458,60.554657996,
239 60.4829943874,60.4117953693,60.3410557658,60.2707704748,60.2009344661,
240 60.1315427815,60.0625905326,59.9940729003,59.9259851339,59.8583225495,
241 59.7910805294,59.724254521,59.6578400356,59.5918326476,59.5262279936,
242 59.4610217712,59.3962097382,59.3317877115,59.2677515663,59.2040972355,
243 59.140820708,59.0779180285,59.0153852966,58.9532186654,58.8914143412,
244 58.8299685825,58.768877699,58.708138051,58.6477460488,58.5876981511,
245 58.5279908653,58.4686207459,58.4095843943,58.3508784577,58.2924996285,
246 58.2344446436,58.1767102838,58.119293373,58.0621907773,58.005399405,
247 57.948916205,57.892738167,57.8368623204,57.7812857339,57.7260055146,
248 57.6710188078,57.616322796,57.5619146987,57.5077917713,57.4539513053,
249 57.4003906269,57.3471070972,57.2940981111,57.241361097,57.1888935166,
250 57.1366928636,57.084756664,57.0330824751,56.9816678854,56.9305105136,
251 56.8796080089,56.8289580495,56.7785583433,56.7284066266,56.6785006639,
252 56.6288382478,56.5794171979,56.5302353612,56.4812906111,56.432580847,
253 56.3841039945,56.3358580041,56.2878408518,56.2400505378,56.1924850868,
254 56.1451425476,56.0980209921,56.0511185157,56.0044332366,55.9579632956,
255 55.9117068555,55.8656621011,55.8198272387,55.7742004958,55.7287801209,
256 55.6835643831,55.6385515716,55.5937399958,55.5491279849,55.5047138872,
257 55.4604960706,55.4164729216,55.3726428452,55.3290042651,55.2855556227,
258 55.2422953775,55.1992220065,55.1563340038,55.1136298808,55.0711081657,
259 55.0287674032,54.9866061544,54.9446229966,54.9028165229,54.8611853421,
260 54.8197280785,54.7784433715,54.7373298757,54.6963862605,54.6556112098,
261 54.6150034221,54.5745616098,54.5342844997,54.4941708323,54.4542193616,
262 54.4144288551,54.3747980937,54.3353258713,54.2960109948,54.2568522837,
263 54.2178485702,54.1789986988,54.1403015262,54.1017559213,54.0633607649,
264 54.0251149495,53.9870173791,53.9490669694,53.9112626471,53.8736033501,
265 53.8360880275,53.7987156391,53.7614851554,53.7243955574,53.6874458368,
266 53.6506349953,53.6139620448,53.5774260075,53.5410259151,53.5047608095,
267 53.4686297419,53.4326317732,53.3967659736,53.3610314227,53.3254272092,
268 53.2899524309,53.2546061945,53.2193876154,53.184295818,53.149329935,
269 53.1144891078,53.079772486,53.0451792278,53.0107084993,52.9763594747,
270 52.9421313363,52.9080232742,52.8740344864,52.8401641783,52.8064115633,
271 52.772775862,52.7392563025,52.7058521203,52.672562558,52.6393868653,
272 52.6063242993,52.5733741236,52.5405356091,52.5078080332,52.4751906802,
273 52.442682841,52.4102838131,52.3779929004,52.3458094133,52.3137326685,
274 52.281761989,52.2498967038,52.2181361484,52.1864796639,52.1549265977,
275 52.123476303,52.0921281387,52.0608814697,52.0297356664,51.998690105,
276 51.9677441672,51.9368972401,51.9061487165,51.8754979942,51.8449444767,
277 51.8144875727,51.7841266957,51.7538612649,51.7236907043,51.6936144428,
278 51.6636319146,51.6337425585,51.6039458184,51.5742411427,51.544627985,
279 51.5151058032,51.4856740601,51.4563322228,51.4270797633,51.3979161578,
280 51.3688408872,51.3398534365,51.3109532954,51.2821399576,51.2534129212,
281 51.2247716884,51.1962157658,51.1677446638,51.1393578971,51.1110549843,
282 51.0828354481,51.0546988151,51.0266446158,50.9986723845,50.9707816593,
283 50.9429719823,50.9152428991,50.8875939591,50.8600247153,50.8325347244,
284 50.8051235466,50.7777907458,50.7505358892,50.7233585476,50.6962582952,
285 50.6692347097,50.6422873719,50.6154158663,50.5886197804,50.5618987051,
286 50.5352522345,50.5086799659,50.4821814997,50.4557564396,50.4294043921,
287 50.4031249672,50.3769177775,50.3507824389,50.3247185701,50.2987257929,
288 50.2728037319,50.2469520147,50.2211702716,50.1954581358,50.1698152434,
289 50.1442412332,50.1187357466,50.0932984281,50.0679289244,50.0426268854,
290 50.0173919631,49.9922238125,49.967122091,49.9420864588,49.9171165783,
291 49.8922121146,49.8673727353,49.8425981105,49.8178879127,49.7932418167,
292 49.7686594998,49.7441406417,49.7196849244,49.6952920323,49.670961652,
293 49.6466934725,49.622487185,49.5983424828,49.5742590617,49.5502366195,
294 49.5262748563,49.5023734741,49.4785321775,49.4547506727,49.4310286684,
295 49.4073658752,49.3837620058,49.3602167748,49.336729899,49.3133010971,
296 49.28993009,49.2666166002,49.2433603524,49.2201610732,49.197018491,
297 49.1739323363,49.1509023413,49.12792824,49.1050097686,49.0821466646,
298 49.0593386678,49.0365855194,49.0138869628,48.9912427428,48.968652606,
299 48.9461163009,48.9236335776,48.901204188,48.8788278855,48.8565044252,
300 48.8342335641,48.8120150606,48.7898486748,48.7677341684,48.7456713047,
301 48.7236598486,48.7016995666,48.6797902266,48.6579315983,48.6361234527,
302 48.6143655624,48.5926577015,48.5709996457,48.5493911719,48.5278320588,
303 48.5063220864,48.484861036,48.4634486905,48.4420848342,48.4207692528,
304 48.3995017333,48.3782820642,48.3571100353,48.3359854377,48.314908064,
305 48.2938777081,48.272894165,48.2519572313,48.2310667048,48.2102223845,
306 48.1894240707,48.1686715652,48.1479646707,48.1273031914,48.1066869326,
307 48.0861157009,48.0655893041,48.0451075513,48.0246702526,48.0042772194,
308 47.9839282643,47.963623201,47.9433618444,47.9231440105,47.9029695165,
309 47.8828381808,47.8627498227,47.8427042628,47.8227013227,47.8027408252,
310 47.7828225941,47.7629464542,47.7431122316,47.7233197533,47.7035688473,
311 47.6838593428,47.6641910699,47.6445638598,47.6249775446,47.6054319576,
312 47.5859269331,47.5664623061,47.5470379129,47.5276535906,47.5083091774,
313 47.4890045124,47.4697394356,47.450513788,47.4313274116,47.4121801493,
314 47.3930718448,47.3740023428,47.3549714891,47.3359791301,47.3170251133,
315 47.2981092869,47.2792315003,47.2603916035,47.2415894475,47.2228248841,
316 47.2040977659,47.1854079466,47.1667552804,47.1481396226,47.1295608293,
317 47.1110187573,47.0925132644,47.0740442089,47.0556114503,47.0372148487,
318 47.0188542649,47.0005295607,46.9822405986,46.9639872418,46.9457693543,
319 46.9275868009,46.9094394473,46.8913271597,46.8732498052,46.8552072516,
320 46.8371993674,46.8192260219,46.8012870852,46.7833824279,46.7655119216,
321 46.7476754383,46.7298728509,46.712104033,46.6943688588,46.6766672034,
322 46.6589989423,46.6413639518,46.6237621091,46.6061932917,46.5886573779,
323 46.5711542468,46.5536837781,46.5362458519,46.5188403494,46.501467152,
324 46.4841261421,46.4668172024,46.4495402166,46.4322950687,46.4150816434,
325 46.3978998262,46.3807495031,46.3636305605,46.3465428857,46.3294863665,
326 46.3124608912,46.2954663489,46.2785026291,46.261569622,46.2446672182,
327 46.2277953091,46.2109537865,46.1941425428,46.1773614712,46.1606104651,
328 46.1438894186,46.1271982264,46.1105367837,46.0939049864,46.0773027305,
329 46.0607299131,46.0441864315,46.0276721836,46.0111870677,45.9947309829,
330 45.9783038286,45.9619055047,45.9455359118,45.9291949509,45.9128825234,
331 45.8965985314,45.8803428774,45.8641154643,45.8479161957,45.8317449755,
332 45.8156017082,45.7994862988,45.7833986526,45.7673386755,45.751306274,
333 45.7353013548,45.7193238253,45.7033735933,45.6874505668,45.6715546547,
334 45.6556857661,45.6398438106,45.6240286981,45.6082403393,45.5924786449,
335 45.5767435264,45.5610348956,45.5453526646,45.5296967462,45.5140670535,
336 45.4984635,45.4828859995,45.4673344665,45.4518088158,45.4363089625,
337 45.4208348222,45.4053863109,45.3899633451,45.3745658416,45.3591937176,
338 45.3438468908,45.328525279,45.3132288009,45.297957375,45.2827109208,
339 45.2674893576,45.2522926056,45.2371205849,45.2219732164,45.2068504212,
340 45.1917521207,45.1766782368,45.1616286916,45.1466034078,45.1316023084,
341 45.1166253165,45.101672356,45.0867433507,45.0718382252,45.0569569041,
342 45.0420993126,45.027265376,45.0124550203,44.9976681714,44.9829047559,
343 44.9681647005,44.9534479326,44.9387543794,44.924083969,44.9094366294,
344 44.8948122891,44.8802108769,44.865632322,44.8510765539,44.8365435024,
345 44.8220330976,44.8075452698,44.7930799499,44.778637069,44.7642165583,
346 44.7498183497,44.735442375,44.7210885667,44.7067568573,44.6924471798,
347 44.6781594673,44.6638936534,44.6496496719,44.6354274569,44.6212269429,
348 44.6070480645,44.5928907568,44.578754955,44.5646405947,44.5505476118,
349 44.5364759423,44.5224255228,44.50839629,44.4943881808,44.4804011325,
350 44.4664350827,44.4524899692,44.43856573,44.4246623036,44.4107796285,
351 44.3969176438,44.3830762885,44.369255502,44.3554552242,44.341675395,
352 44.3279159545,44.3141768433,44.3004580021,44.2867593719,44.2730808939,
353 44.2594225098,44.2457841612,44.2321657901,44.2185673388,44.2049887499,
354 44.191429966,44.1778909302,44.1643715857,44.150871876,44.1373917448,
355 44.1239311362,44.1104899942,44.0970682634,44.0836658884,44.0702828141,
356 44.0569189857,44.0435743485,44.0302488482,44.0169424307,44.0036550418,
357 43.990386628,43.9771371358,43.9639065119,43.9506947033,43.9375016571,
358 43.9243273208,43.911171642,43.8980345685,43.8849160484,43.8718160299,
359 43.8587344616,43.8456712922,43.8326264705,43.8195999457,43.8065916671,
360 43.7936015843,43.780629647,43.7676758052,43.7547400091,43.7418222089,
361 43.7289223553,43.7160403991,43.7031762912,43.6903299827,43.6775014252,
362 43.66469057,43.6518973691,43.6391217743,43.6263637378,43.613623212,
363 43.6009001494,43.5881945027,43.5755062248,43.5628352689,43.5501815883,
364 43.5375451365,43.524925867,43.5123237339,43.499738691,43.4871706927,
365 43.4746196934,43.4620856476,43.4495685102,43.437068236,43.4245847802,
366 43.4121180981,43.3996681453,43.3872348772,43.3748182499,43.3624182192,
367 43.3500347414,43.3376677729,43.32531727,43.3129831897,43.3006654886,
368 43.2883641239,43.2760790527,43.2638102324,43.2515576206,43.2393211749,
369 43.2271008533,43.2148966136,43.2027084142,43.1905362133,43.1783799696,
370 43.1662396416,43.1541151882,43.1420065683,43.1299137412,43.1178366661,
371 43.1057753025,43.0937296101,43.0816995485,43.0696850777,43.0576861577,
372 43.0457027489,43.0337348116,43.0217823063,43.0098451938,42.9979234347,
373 42.9860169902,42.9741258213,42.9622498893,42.9503891557,42.938543582,
374 42.9267131299,42.9148977612,42.9030974381,42.8913121225,42.8795417768,
375 42.8677863635,42.856045845,42.8443201841,42.8326093436,42.8209132865,
376 42.809231976,42.7975653752,42.7859134476,42.7742761567,42.7626534662,
377 42.7510453398,42.7394517416,42.7278726355,42.7163079857,42.7047577566,
378 42.6932219127,42.6817004185,42.6701932388,42.6587003383,42.6472216822,
379 42.6357572354,42.6243069633,42.6128708311,42.6014488044,42.5900408488,
380 42.57864693,42.5672670139,42.5559010665,42.5445490538,42.5332109421,
381 42.5218866978,42.5105762873,42.4992796772,42.4879968343,42.4767277253,
382 42.4654723173,42.4542305773,42.4430024724,42.4317879701,42.4205870377,
383 42.4093996427,42.3982257529,42.3870653359,42.3759183598,42.3647847924,
384 42.3536646019,42.3425577565,42.3314642245,42.3203839745,42.309316975,
385 42.2982631946,42.2872226021,42.2761951665,42.2651808567,42.2541796418,
386 42.2431914911,42.2322163739,42.2212542596,42.2103051178,42.1993689181,
387 42.1884456302,42.1775352242,42.1666376698,42.1557529372,42.1448809965,
388 42.1340218181,42.1231753722,42.1123416295,42.1015205604,42.0907121357,
389 42.0799163261,42.0691331025,42.058362436,42.0476042976,42.0368586585,
390 42.0261254899,42.0154047634,42.0046964503,41.9940005222,41.9833169508,
391 41.972645708,41.9619867655,41.9513400953,41.9407056694,41.9300834602,
392 41.9194734397,41.9088755803,41.8982898545,41.8877162349,41.8771546939,
393 41.8666052044,41.8560677391,41.845542271,41.8350287731,41.8245272183,
394 41.81403758,41.8035598313,41.7930939457,41.7826398964,41.7721976572,
395 41.7617672016,41.7513485032,41.740941536,41.7305462738,41.7201626905,
396 41.7097907601,41.699430457,41.6890817552,41.6787446291,41.668419053,
397 41.6581050015,41.6478024491,41.6375113705,41.6272317404,41.6169635335,
398 41.6067067249,41.5964612895,41.5862272023,41.5760044385,41.5657929734,
399 41.5555927821,41.5454038401,41.535226123,41.5250596061,41.5149042652,
400 41.5047600759,41.4946270141,41.4845050556,41.4743941762,41.4642943522,
401 41.4542055595,41.4441277743,41.4340609729,41.4240051315,41.4139602267,
402 41.4039262349,41.3939031326,41.3838908964,41.3738895031,41.3638989294,
403 41.3539191523,41.3439501485,41.3339918952,41.3240443693,41.3141075481,
404 41.3041814088,41.2942659286,41.2843610849,41.2744668552,41.2645832169,
405 41.2547101477,41.2448476251,41.234995627,41.225154131,41.2153231151,
406 41.2055025572,41.1956924352,41.1858927273,41.1761034116,41.1663244663,
407 41.1565558696,41.1467976,41.1370496357,41.1273119554,41.1175845375,
408 41.1078673606,41.0981604035,41.0884636448,41.0787770634,41.0691006382,
409 41.059434348,41.049778172,41.0401320891,41.0304960786,41.0208701195,
410 41.0112541912,41.0016482731,40.9920523444,40.9824663846,40.9728903734,
411 40.9633242901,40.9537681146,40.9442218265,40.9346854055,40.9251588316,
412 40.9156420845,40.9061351443,40.8966379909,40.8871506045,40.8776729651,
413 40.868205053,40.8587468484,40.8492983317,40.8398594831,40.8304302833,
414 40.8210107125,40.8116007515,40.8022003807,40.792809581,40.7834283329,
415 40.7740566174,40.7646944152,40.7553417072,40.7459984744,40.7366646979,
416 40.7273403586,40.7180254378,40.7087199165,40.6994237762,40.6901369979,
417 40.6808595632,40.6715914533,40.6623326499,40.6530831343,40.6438428882,
418 40.6346118932,40.625390131,40.6161775833,40.6069742319,40.5977800587,
419 40.5885950455,40.5794191744,40.5702524272,40.5610947862,40.5519462333,
420 40.5428067507,40.5336763208,40.5245549257,40.5154425477,40.5063391692,
421 40.4972447727,40.4881593407,40.4790828555,40.4700152999,40.4609566565,
422 40.4519069079,40.4428660369,40.4338340262,40.4248108587,40.4157965172,
423 40.4067909847,40.3977942441,40.3888062786,40.3798270711,40.3708566047,
424 40.3618948628,40.3529418284,40.3439974848,40.3350618154,40.3261348035,
425 40.3172164326,40.3083066861,40.2994055475,40.2905130003,40.2816290283,
426 40.2727536149,40.2638867439,40.2550283991,40.2461785643,40.2373372232,
427 40.2285043598,40.219679958,40.2108640017,40.202056475,40.1932573619,
428 40.1844666466,40.1756843131,40.1669103458,40.1581447288,40.1493874464,
429 40.1406384829,40.1318978228,40.1231654504,40.1144413503,40.1057255068,
430 40.0970179046
431 }
432 },
433 {
434 // Ri = 250k
435 -5,5,200,2001, {
436 239.919843376,239.854937108,239.789738489,239.724247218,239.658462996,
437 239.592385535,239.526014546,239.459349752,239.392390878,239.325137654,
438 239.257589818,239.189747112,239.121609284,239.053176087,238.984447281,
439 238.91542263,238.846101903,238.776484877,238.706571332,238.636361055,
440 238.565853836,238.495049475,238.423947772,238.352548536,238.280851579,
441 238.208856722,238.136563787,238.063972604,237.991083007,237.917894835,
442 237.844407935,237.770622155,237.696537352,237.622153385,237.54747012,
443 237.472487429,237.397205186,237.321623273,237.245741575,237.169559984,
444 237.093078396,237.016296711,236.939214835,236.86183268,236.78415016,
445 236.706167196,236.627883714,236.549299644,236.470414921,236.391229484,
446 236.311743279,236.231956253,236.151868362,236.071479563,235.99078982,
447 235.9097991,235.828507376,235.746914624,235.665020826,235.582825967,
448 235.500330038,235.417533033,235.334434951,235.251035796,235.167335575,
449 235.083334301,234.999031988,234.914428659,234.829524337,234.744319051,
450 234.658812834,234.573005723,234.48689776,234.400488988,234.313779459,
451 234.226769224,234.13945834,234.05184687,233.963934876,233.875722429,
452 233.7872096,233.698396466,233.609283107,233.519869606,233.430156051,
453 233.340142534,233.249829147,233.159215991,233.068303166,232.977090779,
454 232.885578937,232.793767753,232.701657342,232.609247824,232.516539321,
455 232.423531959,232.330225867,232.236621177,232.142718023,232.048516546,
456 231.954016887,231.85921919,231.764123605,231.66873028,231.573039372,
457 231.477051037,231.380765434,231.284182727,231.187303082,231.090126667,
458 230.992653654,230.894884217,230.796818534,230.698456783,230.599799147,
459 230.500845813,230.401596966,230.302052798,230.202213502,230.102079273,
460 230.001650309,229.900926811,229.799908981,229.698597024,229.596991149,
461 229.495091566,229.392898486,229.290412124,229.187632698,229.084560426,
462 228.98119553,228.877538233,228.77358876,228.66934734,228.564814202,
463 228.459989578,228.354873701,228.249466808,228.143769136,228.037780925,
464 227.931502416,227.824933853,227.718075481,227.610927548,227.503490301,
465 227.395763992,227.287748873,227.179445197,227.070853221,226.961973202,
466 226.852805398,226.743350071,226.633607482,226.523577894,226.413261574,
467 226.302658786,226.1917698,226.080594885,225.969134311,225.857388351,
468 225.745357278,225.633041366,225.520440893,225.407556135,225.294387371,
469 225.180934881,225.067198945,224.953179846,224.838877868,224.724293293,
470 224.609426409,224.494277501,224.378846857,224.263134765,224.147141516,
471 224.030867399,223.914312706,223.79747773,223.680362764,223.562968102,
472 223.445294038,223.32734087,223.209108892,223.090598404,222.971809703,
473 222.852743088,222.733398858,222.613777314,222.493878757,222.373703489,
474 222.253251812,222.132524028,222.011520442,221.890241357,221.768687078,
475 221.64685791,221.524754159,221.402376131,221.279724132,221.15679847,
476 221.033599452,220.910127386,220.78638258,220.662365343,220.538075983,
477 220.413514811,220.288682136,220.163578268,220.038203517,219.912558193,
478 219.786642608,219.660457072,219.534001897,219.407277394,219.280283874,
479 219.15302165,219.025491033,218.897692335,218.769625868,218.641291945,
480 218.512690877,218.383822977,218.254688558,218.125287932,217.995621411,
481 217.865689308,217.735491935,217.605029605,217.47430263,217.343311321,
482 217.212055993,217.080536955,216.948754521,216.816709003,216.684400712,
483 216.551829959,216.418997057,216.285902317,216.152546049,216.018928564,
484 215.885050174,215.750911189,215.616511919,215.481852673,215.346933762,
485 215.211755495,215.076318182,214.94062213,214.804667649,214.668455047,
486 214.531984632,214.395256711,214.258271591,214.121029579,213.983530982,
487 213.845776106,213.707765256,213.569498737,213.430976855,213.292199913,
488 213.153168215,213.013882066,212.874341767,212.734547621,212.594499931,
489 212.454198998,212.313645123,212.172838605,212.031779747,211.890468845,
490 211.748906201,211.607092111,211.465026874,211.322710786,211.180144146,
491 211.037327247,210.894260386,210.750943858,210.607377956,210.463562975,
492 210.319499207,210.175186945,210.03062648,209.885818102,209.740762104,
493 209.595458773,209.449908399,209.304111271,209.158067675,209.011777899,
494 208.865242229,208.71846095,208.571434346,208.424162703,208.276646303,
495 208.128885429,207.980880362,207.832631383,207.684138772,207.53540281,
496 207.386423774,207.237201943,207.087737593,206.938031001,206.788082442,
497 206.637892192,206.487460523,206.336787708,206.185874021,206.034719732,
498 205.883325112,205.73169043,205.579815956,205.427701956,205.2753487,
499 205.122756451,204.969925477,204.816856041,204.663548407,204.510002838,
500 204.356219596,204.202198941,204.047941133,203.893446432,203.738715096,
501 203.583747382,203.428543546,203.273103844,203.11742853,202.961517859,
502 202.805372081,202.64899145,202.492376216,202.335526629,202.178442938,
503 202.021125389,201.863574231,201.70578971,201.547772069,201.389521554,
504 201.231038407,201.072322871,200.913375185,200.754195591,200.594784328,
505 200.435141633,200.275267743,200.115162895,199.954827324,199.794261263,
506 199.633464946,199.472438604,199.31118247,199.149696771,198.987981739,
507 198.826037599,198.66386458,198.501462908,198.338832806,198.175974498,
508 198.012888208,197.849574157,197.686032566,197.522263653,197.358267639,
509 197.194044739,197.029595171,196.864919149,196.700016888,196.534888602,
510 196.369534501,196.203954798,196.038149702,195.872119422,195.705864166,
511 195.53938414,195.372679551,195.205750602,195.038597496,194.871220438,
512 194.703619627,194.535795263,194.367747547,194.199476675,194.030982844,
513 193.862266251,193.69332709,193.524165554,193.354781836,193.185176127,
514 193.015348617,192.845299495,192.675028949,192.504537166,192.333824332,
515 192.162890631,191.991736246,191.820361361,191.648766155,191.476950809,
516 191.304915502,191.132660411,190.960185714,190.787491586,190.6145782,
517 190.441445731,190.268094349,190.094524227,189.920735533,189.746728437,
518 189.572503106,189.398059705,189.223398401,189.048519357,188.873422736,
519 188.698108699,188.522577407,188.34682902,188.170863695,187.994681589,
520 187.818282858,187.641667658,187.46483614,187.287788459,187.110524763,
521 186.933045205,186.755349932,186.577439092,186.399312831,186.220971295,
522 186.042414627,185.863642971,185.684656468,185.505455258,185.326039482,
523 185.146409276,184.966564778,184.786506124,184.606233447,184.425746882,
524 184.245046561,184.064132614,183.883005171,183.70166436,183.52011031,
525 183.338343145,183.156362991,182.974169972,182.79176421,182.609145826,
526 182.426314941,182.243271672,182.060016139,181.876548456,181.69286874,
527 181.508977105,181.324873662,181.140558524,180.956031801,180.771293602,
528 180.586344035,180.401183206,180.215811221,180.030228184,179.844434198,
529 179.658429365,179.472213784,179.285787556,179.099150778,178.912303547,
530 178.725245958,178.537978106,178.350500084,178.162811983,177.974913895,
531 177.786805907,177.598488109,177.409960587,177.221223426,177.032276711,
532 176.843120525,176.653754949,176.464180064,176.274395949,176.084402683,
533 175.894200341,175.703788999,175.513168732,175.322339612,175.131301711,
534 174.940055099,174.748599845,174.556936017,174.365063682,174.172982904,
535 173.980693748,173.788196276,173.59549055,173.402576629,173.209454574,
536 173.01612444,172.822586284,172.628840161,172.434886125,172.240724228,
537 172.046354521,171.851777054,171.656991875,171.461999032,171.266798569,
538 171.071390532,170.875774963,170.679951906,170.483921399,170.287683483,
539 170.091238194,169.894585571,169.697725648,169.500658458,169.303384036,
540 169.105902411,168.908213614,168.710317673,168.512214616,168.313904469,
541 168.115387256,167.916663,167.717731724,167.518593448,167.31924819,
542 167.11969597,166.919936804,166.719970706,166.51979769,166.319417769,
543 166.118830954,165.918037255,165.71703668,165.515829236,165.314414928,
544 165.112793761,164.910965738,164.70893086,164.506689127,164.304240538,
545 164.10158509,163.898722779,163.6956536,163.492377545,163.288894608,
546 163.085204777,162.881308042,162.677204391,162.472893809,162.268376282,
547 162.063651792,161.858720322,161.653581853,161.448236362,161.242683829,
548 161.036924229,160.830957537,160.624783727,160.41840277,160.211814637,
549 160.005019298,159.79801672,159.590806869,159.38338971,159.175765206,
550 158.967933321,158.759894013,158.551647242,158.343192966,158.134531141,
551 157.925661722,157.716584662,157.507299912,157.297807424,157.088107145,
552 156.878199025,156.668083008,156.457759039,156.247227061,156.036487016,
553 155.825538844,155.614382484,155.403017872,155.191444946,154.979663638,
554 154.767673882,154.55547561,154.34306875,154.130453232,153.917628982,
555 153.704595926,153.491353989,153.277903091,153.064243155,152.850374101,
556 152.636295846,152.422008306,152.207511398,151.992805035,151.777889129,
557 151.562763591,151.347428331,151.131883256,150.916128273,150.700163287,
558 150.483988202,150.267602919,150.051007339,149.834201362,149.617184885,
559 149.399957805,149.182520017,148.964871415,148.74701189,148.528941333,
560 148.310659634,148.092166681,147.873462361,147.654546557,147.435419156,
561 147.216080038,146.996529086,146.776766179,146.556791196,146.336604013,
562 146.116204508,145.895592554,145.674768025,145.453730794,145.23248073,
563 145.011017705,144.789341586,144.56745224,144.345349535,144.123033334,
564 143.900503503,143.677759903,143.454802397,143.231630845,143.008245106,
565 142.784645041,142.560830506,142.336801358,142.112557454,141.888098647,
566 141.663424793,141.438535745,141.213431356,140.988111477,140.76257596,
567 140.536824656,140.310857414,140.084674085,139.858274517,139.631658559,
568 139.40482606,139.177776866,138.950510827,138.72302779,138.495327601,
569 138.267410109,138.039275161,137.810922605,137.582352287,137.353564057,
570 137.124557761,136.89533325,136.665890372,136.436228977,136.206348916,
571 135.976250041,135.745932202,135.515395255,135.284639054,135.053663455,
572 134.822468314,134.591053492,134.359418849,134.127564247,133.895489551,
573 133.663194629,133.430679348,133.197943581,132.964987203,132.73181009,
574 132.498412124,132.264793187,132.030953168,131.796891958,131.562609451,
575 131.328105548,131.093380151,130.85843317,130.623264518,130.387874115,
576 130.152261884,129.916427758,129.680371672,129.444093571,129.207593404,
577 128.970871129,128.733926713,128.496760129,128.259371358,128.021760393,
578 127.783927234,127.545871891,127.307594385,127.069094748,126.830373023,
579 126.591429265,126.352263542,126.112875935,125.873266537,125.633435457,
580 125.393382821,125.153108766,124.91261345,124.671897045,124.430959742,
581 124.189801752,123.948423304,123.706824648,123.465006057,123.222967823,
582 122.980710263,122.738233721,122.495538562,122.252625181,122.009493998,
583 121.766145463,121.522580057,121.278798292,121.034800711,120.790587894,
584 120.546160453,120.30151904,120.056664344,119.811597095,119.566318064,
585 119.320828067,119.075127963,118.82921866,118.583101115,118.336776335,
586 118.090245381,117.84350937,117.596569475,117.349426929,117.102083029,
587 116.854539134,116.606796673,116.358857143,116.110722114,115.862393231,
588 115.613872218,115.365160881,115.116261108,114.867174879,114.61790426,
589 114.368451414,114.118818604,113.86900819,113.619022642,113.368864537,
590 113.118536565,112.868041535,112.617382378,112.366562149,112.115584036,
591 111.864451361,111.613167587,111.361736321,111.11016132,110.858446499,
592 110.60659593,110.354613852,110.102504677,109.850272992,109.597923569,
593 109.345461366,109.09289154,108.840219447,108.587450649,108.334590925,
594 108.081646272,107.828622915,107.575527312,107.322366164,107.069146415,
595 106.815875267,106.562560181,106.309208889,106.055829395,105.802429989,
596 105.549019247,105.295606044,105.042199559,104.78880928,104.535445014,
597 104.282116893,104.028835379,103.775611272,103.522455718,103.26938021,
598 103.016396602,102.763517107,102.510754307,102.258121157,102.00563099,
599 101.75329752,101.501134848,101.249157464,100.997380252,100.74581849,
600 100.494487852,100.243404412,99.9925846399,99.7420454065,99.4918039784,
601 99.2418780182,98.992285581,98.7430451111,98.4941754376,98.2456957684,
602 97.9976256841,97.7499851301,97.5027944079,97.2560741654,97.0098453854,
603 96.764129374,96.5189477467,96.2743224139,96.030275565,95.7868296514,
604 95.5440073677,95.3018316327,95.0603255681,94.8195124769,94.5794158196,
605 94.3400591904,94.1014662917,93.8636609074,93.6266668754,93.3905080596,
606 93.1552083202,92.9207914838,92.687281313,92.4547014744,92.2230755076,
607 91.9924267924,91.7627785162,91.5341536421,91.3065748752,91.0800646308,
608 90.8546450013,90.6303377244,90.4071641513,90.1851452154,89.9643014023,
609 89.7446527197,89.5262186689,89.309018217,89.0930697707,88.8783911506,
610 88.6649995678,88.452911601,88.2421431758,88.0327095454,87.8246252726,
611 87.6179042144,87.4125595073,87.2086035549,87.0060480178,86.8049038042,
612 86.6051810635,86.4068891809,86.2100367742,86.0146316924,85.820681016,
613 85.6281910588,85.4371673718,85.2476147483,85.059537231,84.8729381203,
614 84.6878199835,84.5041846669,84.3220333071,84.1413663453,83.9621835415,
615 83.78448399,83.6082661365,83.4335277947,83.2602661648,83.088477852,
616 82.918158886,82.7493047404,82.581910353,82.4159701465,82.2514780484,
617 82.0884275127,81.9268115401,81.7666226995,81.6078531484,81.450494654,
618 81.2945386136,81.1399760753,80.9867977578,80.8349940706,80.6845551334,
619 80.5354707951,80.387730653,80.2413240706,80.0962401958,79.9524679782,
620 79.8099961858,79.668813422,79.5289081407,79.3902686621,79.2528831875,
621 79.1167398133,78.9818265451,78.8481313104,78.7156419717,78.5843463383,
622 78.4542321781,78.3252872283,78.1974992063,78.0708558196,77.9453447751,
623 77.8209537885,77.6976705926,77.5754829453,77.4543786377,77.3343455008,
624 77.2153714125,77.097444304,76.9805521656,76.8646830525,76.7498250897,
625 76.6359664772,76.5230954944,76.411200504,76.3002699564,76.1902923926,
626 76.081256448,75.9731508553,75.865964447,75.7596861581,75.6543050282,
627 75.5498102036,75.446190939,75.3434365993,75.2415366608,75.1404807122,
628 75.0402584562,74.94085971,74.8422744057,74.7444925918,74.6475044324,
629 74.5513002088,74.4558703183,74.3612052756,74.2672957116,74.1741323741,
630 74.0817061269,73.9900079501,73.8990289392,73.8087603045,73.7191933711,
631 73.630319578,73.542130477,73.4546177327,73.3677731209,73.2815885286,
632 73.1960559524,73.1111674979,73.0269153786,72.943291915,72.8602895336,
633 72.7779007657,72.6961182464,72.6149347136,72.5343430066,72.4543360653,
634 72.3749069287,72.296048734,72.2177547155,72.140018203,72.062832621,
635 71.9861914875,71.9100884125,71.834517097,71.7594713319,71.6849449967,
636 71.6109320582,71.5374265695,71.4644226687,71.3919145776,71.3198966008,
637 71.2483631244,71.1773086147,71.1067276173,71.0366147558,70.9669647305,
638 70.8977723176,70.829032368,70.7607398058,70.692889628,70.6254769025,
639 70.5584967677,70.491944431,70.4258151681,70.3601043217,70.2948073007,
640 70.2299195789,70.1654366943,70.1013542477,70.0376679022,69.974373382,
641 69.9114664714,69.848943014,69.7867989115,69.7250301233,69.663632665,
642 69.6026026079,69.5419360781,69.4816292553,69.4216783727,69.3620797151,
643 69.302829619,69.2439244713,69.1853607088,69.127134817,69.0692433298,
644 69.0116828285,68.9544499408,68.8975413407,68.8409537471,68.7846839236,
645 68.7287286773,68.6730848588,68.6177493608,68.5627191177,68.5079911053,
646 68.4535623394,68.399429876,68.3455908099,68.2920422747,68.238781442,
647 68.1858055204,68.1331117557,68.0806974294,68.0285598591,67.9766963971,
648 67.9251044304,67.8737813799,67.8227247,67.7719318779,67.7214004334,
649 67.671127918,67.6211119148,67.5713500377,67.521839931,67.4725792692,
650 67.4235657562,67.3747971248,67.3262711367,67.2779855816,67.2299382769,
651 67.1821270675,67.1345498251,67.0872044479,67.0400888603,66.9932010121,
652 66.9465388788,66.9001004606,66.8538837821,66.8078868926,66.7621078646,
653 66.7165447945,66.6711958016,66.626059028,66.5811326384,66.5364148192,
654 66.491903779,66.4475977476,66.4034949759,66.3595937358,66.3158923195,
655 66.2723890395,66.2290822282,66.1859702377,66.1430514394,66.1003242235,
656 66.0577869994,66.0154381946,65.9732762552,65.9312996451,65.8895068457,
657 65.8478963563,65.806466693,65.7652163892,65.7241439947,65.6832480761,
658 65.642527216,65.6019800131,65.5616050819,65.5214010526,65.4813665705,
659 65.4415002962,65.4018009052,65.3622670877,65.3228975484,65.2836910063,
660 65.2446461946,65.2057618602,65.1670367641,65.1284696804,65.0900593968,
661 65.0518047142,65.0137044463,64.9757574197,64.9379624738,64.9003184602,
662 64.8628242429,64.825478698,64.7882807137,64.7512291898,64.7143230378,
663 64.6775611809,64.6409425534,64.6044661009,64.5681307798,64.5319355578,
664 64.4958794131,64.4599613344,64.4241803212,64.388535383,64.3530255396,
665 64.317649821,64.282407267,64.2472969272,64.2123178609,64.1774691369,
666 64.1427498335,64.1081590383,64.0736958481,64.0393593686,64.0051487146,
667 63.9710630098,63.9371013865,63.9032629857,63.8695469568,63.8359524576,
668 63.8024786545,63.7691247216,63.7358898415,63.7027732045,63.669774009,
669 63.636891461,63.6041247743,63.5714731704,63.5389358781,63.5065121337,
670 63.4742011808,63.4420022703,63.4099146602,63.3779376154,63.3460704081,
671 63.3143123171,63.2826626281,63.2511206336,63.2196856325,63.1883569306,
672 63.1571338399,63.1260156789,63.0950017724,63.0640914515,63.0332840535,
673 63.0025789217,62.9719754055,62.9414728602,62.9110706472,62.8807681334,
674 62.8505646917,62.8204597006,62.7904525442,62.7605426122,62.7307292997,
675 62.7010120074,62.6713901411,62.6418631122,62.6124303372,62.5830912378,
676 62.5538452407,62.5246917779,62.4956302862,62.4666602075,62.4377809884,
677 62.4089920806,62.3802929404,62.3516830289,62.3231618119,62.2947287596,
678 62.2663833472,62.238125054,62.2099533641,62.1818677657,62.1538677518,
679 62.1259528192,62.0981224695,62.0703762081,62.0427135449,62.0151339937,
680 61.9876370727,61.9602223038,61.9328892131,61.9056373307,61.8784661904,
681 61.8513753301,61.8243642916,61.7974326202,61.7705798651,61.7438055793,
682 61.7171093194,61.6904906456,61.6639491218,61.6374843153,61.6110957971,
683 61.5847831416,61.5585459265,61.5323837333,61.5062961465,61.4802827541,
684 61.4543431474,61.4284769208,61.4026836724,61.376963003,61.3513145168,
685 61.3257378211,61.3002325264,61.2747982461,61.2494345967,61.2241411979,
686 61.1989176721,61.1737636448,61.1486787445,61.1236626024,61.0987148526,
687 61.0738351323,61.049023081,61.0242783416,60.9996005592,60.9749893819,
688 60.9504444605,60.9259654483,60.9015520014,60.8772037785,60.8529204409,
689 60.8287016523,60.8045470791,60.7804563903,60.7564292571,60.7324653534,
690 60.7085643554,60.6847259419,60.660949794,60.637235595,60.6135830308,
691 60.5899917896,60.5664615617,60.5429920399,60.5195829191,60.4962338965,
692 60.4729446717,60.4497149461,60.4265444237,60.4034328102,60.3803798139,
693 60.357385145,60.3344485156,60.3115696402,60.2887482352,60.2659840191,
694 60.2432767122,60.2206260372,60.1980317183,60.1754934821,60.1530110568,
695 60.1305841728,60.1082125622,60.0858959592,60.0636340995,60.041426721,
696 60.0192735634,59.9971743681,59.9751288783,59.9531368392,59.9311979974,
697 59.9093121016,59.8874789021,59.865698151,59.8439696018,59.8222930102,
698 59.8006681332,59.7790947295,59.7575725597,59.7361013857,59.7146809713,
699 59.6933110816,59.6719914837,59.6507219459,59.6295022382,59.6083321322,
700 59.587211401,59.5661398192,59.5451171629,59.5241432098,59.5032177389,
701 59.4823405308,59.4615113675,59.4407300325,59.4199963107,59.3993099884,
702 59.3786708534,59.3580786947,59.3375333029,59.3170344698,59.2965819887,
703 59.2761756541,59.2558152619,59.2355006095,59.2152314953,59.1950077192,
704 59.1748290824,59.1546953873,59.1346064375,59.1145620381,59.0945619952,
705 59.0746061163,59.05469421,59.0348260863,59.0150015562,58.9952204321,
706 58.9754825273,58.9557876566,58.9361356358,58.9165262819,58.896959413,
707 58.8774348483,58.8579524084,58.8385119146,58.8191131897,58.7997560573,
708 58.7804403424,58.7611658707,58.7419324694,58.7227399664,58.7035881909,
709 58.684476973,58.665406144,58.6463755361,58.6273849825,58.6084343176,
710 58.5895233766,58.5706519958,58.5518200125,58.533027265,58.5142735925,
711 58.4955588353,58.4768828345,58.4582454322,58.4396464715,58.4210857965,
712 58.402563252,58.384078684,58.3656319393,58.3472228655,58.3288513112,
713 58.310517126,58.2922201602,58.2739602651,58.2557372929,58.2375510965,
714 58.2194015299,58.2012884478,58.1832117056,58.16517116,58.1471666681,
715 58.129198088,58.1112652786,58.0933680997,58.0755064118,58.0576800761,
716 58.039888955,58.0221329113,58.0044118086,57.9867255116,57.9690738855,
717 57.9514567963,57.9338741109,57.9163256968,57.8988114223,57.8813311564,
718 57.8638847691,57.8464721308,57.8290931127,57.8117475869,57.7944354261,
719 57.7771565037,57.7599106939,57.7426978714,57.7255179118,57.7083706914,
720 57.691256087,57.6741739762,57.6571242374,57.6401067494,57.6231213918,
721 57.6061680451,57.58924659,57.5723569081,57.5554988818,57.5386723939,
722 57.5218773279,57.505113568,57.488380999,57.4716795062,57.4550089757,
723 57.4383692942,57.4217603489,57.4051820278,57.3886342192,57.3721168123,
724 57.3556296967,57.3391727627,57.3227459011,57.3063490034,57.2899819617,
725 57.2736446684,57.2573370167,57.2410589004,57.2248102138,57.2085908517,
726 57.1924007095,57.1762396831,57.1601076691,57.1440045645,57.127930267,
727 57.1118846745,57.0958676858,57.0798792,57.063919117,57.0479873368,
728 57.0320837602,57.0162082886,57.0003608236,56.9845412676,56.9687495233,
729 56.952985494,56.9372490836,56.9215401962,56.9058587367,56.8902046103,
730 56.8745777228,56.8589779803,56.8434052895,56.8278595578,56.8123406926,
731 56.796848602,56.7813831948,56.7659443798,56.7505320667,56.7351461652,
732 56.719786586,56.7044532397,56.6891460378,56.6738648919,56.6586097143,
733 56.6433804175,56.6281769146,56.6129991191,56.597846945,56.5827203065,
734 56.5676191185,56.5525432961,56.537492755,56.5224674112,56.507467181,
735 56.4924919814,56.4775417297,56.4626163434,56.4477157406,56.4328398399,
736 56.41798856,56.4031618202,56.3883595402,56.37358164,56.35882804,
737 56.3440986611,56.3293934243,56.3147122514,56.3000550642,56.2854217851,
738 56.2708123367,56.2562266421,56.2416646249,56.2271262086,56.2126113176,
739 56.1981198764,56.1836518097,56.1692070429,56.1547855016,56.1403871117,
740 56.1260117995,56.1116594916,56.097330115,56.0830235971,56.0687398656,
741 56.0544788483,56.0402404738,56.0260246706,56.0118313678,55.9976604948,
742 55.9835119812,55.969385757,55.9552817525,55.9411998985,55.9271401258,
743 55.9131023657,55.89908655,55.8850926104,55.8711204792,55.8571700891,
744 55.8432413727,55.8293342633,55.8154486945,55.8015845998,55.7877419134,
745 55.7739205698,55.7601205035,55.7463416495,55.7325839431,55.7188473199,
746 55.7051317156,55.6914370665,55.677763309,55.6641103798,55.6504782158,
747 55.6368667544,55.6232759331,55.6097056897,55.5961559624,55.5826266896,
748 55.5691178099,55.5556292623,55.542160986,55.5287129205,55.5152850055,
749 55.501877181,55.4884893873,55.475121565,55.4617736549,55.448445598,
750 55.4351373357,55.4218488095,55.4085799613,55.3953307332,55.3821010675,
751 55.3688909069,55.3557001941,55.3425288723,55.3293768848,55.3162441752,
752 55.3031306873,55.2900363653,55.2769611534,55.2639049962,55.2508678385,
753 55.2378496253,55.2248503018,55.2118698137,55.1989081067,55.1859651266,
754 55.1730408198,55.1601351326,55.1472480117,55.134379404,55.1215292566,
755 55.1086975168,55.0958841322,55.0830890507,55.0703122201,55.0575535887,
756 55.0448131049,55.0320907175,55.0193863752,55.0067000272,54.9940316227,
757 54.9813811114,54.9687484428,54.956133567,54.943536434,54.9309569943,
758 54.9183951983,54.9058509969,54.893324341,54.8808151818,54.8683234706,
759 54.8558491591,54.8433921989,54.8309525421,54.8185301409,54.8061249475,
760 54.7937369146,54.7813659949,54.7690121413,54.7566753071,54.7443554455,
761 54.73205251,54.7197664544,54.7074972325,54.6952447985,54.6830091066,
762 54.6707901112,54.6585877671,54.646402029,54.634232852,54.6220801911,
763 54.6099440019,54.5978242398,54.5857208606,54.5736338202,54.5615630746,
764 54.5495085801,54.5374702932,54.5254481704,54.5134421685,54.5014522444,
765 54.4894783554,54.4775204586,54.4655785116,54.4536524719,54.4417422974,
766 54.429847946,54.4179693758,54.4061065451,54.3942594124,54.3824279364,
767 54.3706120757,54.3588117893,54.3470270364,54.3352577761,54.323503968,
768 54.3117655715,54.3000425465,54.2883348527,54.2766424504,54.2649652996,
769 54.2533033607,54.2416565943,54.2300249609,54.2184084215,54.206806937,
770 54.1952204684,54.1836489771,54.1720924245,54.1605507722,54.1490239817,
771 54.1375120151,54.1260148343,54.1145324014,54.1030646788,54.0916116288,
772 54.0801732141,54.0687493974,54.0573401415,54.0459454094,54.0345651643,
773 54.0231993694,54.0118479883,54.0005109843,53.9891883213,53.977879963,
774 53.9665858734,53.9553060167,53.944040357,53.9327888587,53.9215514863,
775 53.9103282045,53.8991189781,53.8879237718,53.8767425508,53.8655752802,
776 53.8544219253,53.8432824515,53.8321568244,53.8210450096,53.8099469729,
777 53.7988626803,53.7877920977,53.7767351915,53.7656919278,53.7546622731,
778 53.7436461939,53.7326436569,53.721654629,53.7106790769,53.6997169678,
779 53.6887682688,53.6778329471,53.6669109702,53.6560023055,53.6451069207,
780 53.6342247836,53.6233558619,53.6125001237,53.6016575371,53.5908280702,
781 53.5800116914,53.5692083692,53.558418072,53.5476407686,53.5368764276,
782 53.5261250181,53.5153865089,53.5046608693,53.4939480683,53.4832480754,
783 53.47256086,53.4618863916,53.4512246399,53.4405755746,53.4299391657,
784 53.419315383,53.4087041967,53.398105577,53.3875194941,53.3769459184,
785 53.3663848205,53.355836171,53.3452999404,53.3347760998,53.3242646199,
786 53.3137654719,53.3032786267,53.2928040557,53.2823417301,53.2718916214,
787 53.261453701,53.2510279406,53.240614312,53.2302127868,53.2198233371,
788 53.2094459348,53.1990805521,53.1887271611,53.1783857341,53.1680562435,
789 53.1577386619,53.1474329617,53.1371391157,53.1268570966,53.1165868773,
790 53.1063284308,53.09608173,53.0858467482,53.0756234586,53.0654118344,
791 53.0552118491,53.0450234762,53.0348466893,53.0246814621,53.0145277683,
792 53.0043855819,52.9942548766,52.9841356267,52.9740278062,52.9639313893,
793 52.9538463503,52.9437726636,52.9337103037,52.9236592451,52.9136194624,
794 52.9035909305,52.8935736241,52.883567518,52.8735725874,52.8635888072,
795 52.8536161525,52.8436545987,52.833704121,52.8237646948,52.8138362956,
796 52.8039188989,52.7940124804,52.7841170158,52.7742324808,52.7643588514,
797 52.7544961035,52.7446442132,52.7348031565,52.7249729097,52.7151534489,
798 52.7053447507,52.6955467913,52.6857595473,52.6759829952,52.6662171118,
799 52.6564618738,52.6467172578,52.636983241,52.6272598001,52.6175469122,
800 52.6078445544,52.598152704,52.5884713381,52.5788004341,52.5691399694,
801 52.5594899214,52.5498502678,52.5402209861,52.5306020539,52.5209934492,
802 52.5113951496,52.5018071332,52.4922293778,52.4826618616,52.4731045626,
803 52.463557459,52.4540205291,52.4444937512,52.4349771037,52.425470565,
804 52.4159741138,52.4064877284,52.3970113878,52.3875450705,52.3780887554,
805 52.3686424213,52.3592060472,52.3497796121,52.340363095,52.3309564751,
806 52.3215597316,52.3121728436,52.3027957907,52.293428552,52.2840711072,
807 52.2747234357,52.2653855171,52.2560573311,52.2467388573,52.2374300756,
808 52.2281309658,52.2188415077,52.2095616814,52.2002914668,52.1910308441,
809 52.1817797934,52.1725382949,52.1633063289,52.1540838757,52.1448709156,
810 52.1356674293,52.1264733971,52.1172887997,52.1081136176,52.0989478315,
811 52.0897914223,52.0806443707,52.0715066576,52.0623782639,52.0532591707,
812 52.0441493588,52.0350488095,52.0259575039,52.0168754232,52.0078025486,
813 51.9987388616,51.9896843435,51.9806389757,51.9716027398,51.9625756172,
814 51.9535575896,51.9445486387,51.9355487462,51.9265578938,51.9175760635,
815 51.908603237,51.8996393962,51.8906845233,51.8817386003,51.8728016091,
816 51.8638735321,51.8549543514,51.8460440492,51.8371426079,51.8282500099,
817 51.8193662375,51.8104912732,51.8016250996,51.7927676992,51.7839190547,
818 51.7750791486,51.7662479639,51.7574254831,51.7486116892,51.7398065651,
819 51.7310100936,51.7222222578,51.7134430406,51.7046724253,51.6959103948,
820 51.6871569323,51.6784120212,51.6696756447,51.660947786,51.6522284287,
821 51.643517556,51.6348151515,51.6261211987,51.6174356812,51.6087585825,
822 51.6000898864,51.5914295766,51.5827776367,51.5741340507,51.5654988023,
823 51.5568718755,51.5482532542,51.5396429225,51.5310408642,51.5224470636,
824 51.5138615047,51.5052841718,51.496715049,51.4881541206,51.4796013709,
825 51.4710567843,51.4625203452,51.453992038,51.4454718472,51.4369597573,
826 51.428455753,51.4199598188,51.4114719394,51.4029920995,51.3945202839,
827 51.3860564773,51.3776006646,51.3691528308,51.3607129606,51.352281039,
828 51.3438570512,51.3354409821,51.3270328167,51.3186325404,51.3102401382,
829 51.3018555953,51.293478897,51.2851100286,51.2767489755,51.268395723,
830 51.2600502566,51.2517125617,51.2433826238,51.2350604285,51.2267459613,
831 51.218439208,51.210140154,51.2018487853,51.1935650874,51.1852890462,
832 51.1770206476,51.1687598773,51.1605067213,51.1522611655,51.1440231959,
833 51.1357927985,51.1275699594,51.1193546647,51.1111469005,51.1029466529,
834 51.0947539083,51.0865686527,51.0783908726,51.0702205543,51.062057684,
835 51.0539022483,51.0457542335,51.0376136261,51.0294804127,51.0213545797,
836 51.0132361137
837 }
838 }
839 };
+0
-33
src/LV2/gxamp.lv2/DSP/ampulse_former.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18 #include <stdint.h>
19
20 class Ampf
21 {
22 public:
23 inline void compute(int32_t count, float *input0, float *output0, float value) {
24 double fSlow0 = value * value * 0.01;
25 for (int32_t i=0; i<count; i++) {
26 output0[i] = fSlow0 * input0[i];
27 }
28 };
29 Ampf() {};
30 ~Ampf() {};
31 };
32
+0
-342
src/LV2/gxamp.lv2/DSP/cab_data.cc less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 struct CabDesc
21 {
22 int32_t ir_count;
23 uint32_t ir_sr;
24 float ir_data[];
25 };
26
27 template <int32_t tab_size>
28 struct CabDesc_imp
29 {
30 int32_t ir_count;
31 uint32_t ir_sr;
32 float ir_data[tab_size];
33 operator CabDesc&()
34 {
35 return *(CabDesc*)this;
36 }
37 };
38 /**----------------------------- cabinet impulse response data --------------------------------**/
39 CabDesc_imp<192> cab_data_HighGain =
40 {
41 192, 48000,
42 {
43 0.147081, 0.208808, 0.208996, 0.163228, 0.0858905, -0.0119104, -0.0932825, -0.121011, -0.0999426, -0.071073, -0.0403973, -0.00214844, 0.0287018,
44 0.0381079, 0.0372284, 0.0330389, 0.0252979, 0.0141394, 0.00118835, -0.00764709, -0.00751953, 0.00262512, 0.0143475, 0.0174762, 0.0168384, 0.0179126,
45 0.00738525, -0.0114069, -0.0192352, -0.0145825, -0.0179932, -0.0244049, -0.0173956, -0.00357178, 0.00643188, 0.0108966, 0.0132935, 0.0123737, 0.00680786,
46 -0.000214844, -0.0040686, -0.00533752, -0.00738525, -0.00539124, -0.00171875, 0.00156433, 0.00481384, 0.0038739, -0.00666016, -0.018866, -0.0216522, -0.0171606,
47 -0.00717712, 0.00770081, 0.0209003, 0.0251971, 0.0221222, 0.0157977, 0.00453857, -0.0107892, -0.022478, -0.029165, -0.0303467, 0, -0.0169592,
48 -0.00966125, -0.00163147, 0.00273254, 0.000436401, -0.00282654, -0.00791565, -0.0136493, -0.0128436, -0.00564636, 0.00298096, 0.0090033, 0.00841248, 0.00201416,
49 -0.00579407, -0.0119171, -0.0145624, -0.0128436, -0.00741211, 0.000543823, 0.00414917, 0.00414917, 0.00114136, -0.00778809, -0.021377, -0.0325623, -0.0386584,
50 -0.038974, -0.0333679, -0.0221289, -0.0107825, -0.00453186, -0.00127563, -0.000261841, 0.000631104, 0.000537109, 0.000355835, 0.00114136, 0.00174561, 0.00104065,
51 -0.000100708, -0.00128906, -0.00083252, 0.00146362, 0.00234314, 0.000443115, -0.00245056, -0.00782165, -0.0164423, -0.0250092, -0.0309644, -0.0314343, -0.0265063,
52 -0.0176508, -0.00496155, 0.00805664, 0.0157843, 0.0171069, 0.0131055, 0.00613647, -0.00216187, -0.00804321, -0.0117157, 0, -0.015321, -0.0154352,
53 -0.013374, -0.00994995, -0.00672058, -0.00353821, -0.00110779, 0.000678101, 0.00250427, -0.00564636, 0.00298096, 0.0090033, 0.00841248, 0.00201416, -0.00579407,
54 -0.0119171, -0.0145624, -0.0128436, -0.00741211, 0.000543823, 0.00414917, 0.00414917, 0.00114136, -0.00778809, -0.021377, -0.0325623, -0.0386584, -0.038974,
55 -0.0333679, -0.0221289, -0.0107825, -0.00453186, -0.00127563, -0.000261841, 0.000631104, 0.000537109, 0.000355835, 0.00114136, 0.00174561, 0.00104065, -0.000100708,
56 -0.00128906, -0.00083252, 0.00146362, 0.00234314, 0.000443115, -0.00245056, -0.00782165, -0.0164423, -0.0250092, -0.0309644, -0.0314343, -0.0265063, -0.0176508,
57 -0.00496155, 0.00805664, 0.0157843, 0.0171069, 0.0131055, 0.00613647, -0.00216187, -0.00804321, -0.0117157, 0
58 }
59 };
60
61 CabDesc_imp<192> cab_data_AC30 =
62 {
63 192, 48000,
64 {
65 7.32422e-05, 0.00015564, 0.00302429, 0.0057251, 0.00652466, 0.00614014, 0.00662537, 0.00419922, 0.00424194, -0.00379334, -0.00308838, -0.0103577, -0.0165436,
66 -0.0208832, -0.0206482, -0.027774, -0.0240204, -0.0231415, -0.0195801, -0.0178253, -0.015921, -0.0149628, -0.0164642, -0.0195465, -0.0218109, -0.0230652,
67 -0.0246216, -0.0256104, -0.0260925, -0.0210358, -0.0207489, -0.015863, -0.0106201, -0.0106628, -0.00259705, 0.00690613, 0.0146484, 0.026236, 0.0348633,
68 0.0506409, 0.0615387, 0.0747467, 0.0847351, 0.0917419, 0.0999908, 0.0957062, 0.093335, 0.0774262, 0.0564789, 0.0312073, 0.00177002, -0.0296539,
69 -0.047522, -0.0584259, -0.0557098, -0.0279785, 0.00585632, 0.0454926, 0.0777039, 0.0871948, 0.0838074, 0.0664886, 0.039389, 0.0180054, 0.00166931,
70 -0.00537415, 0.00290527, 0.00549622, 0.0210938, 0.0162201, 0.0135376, 0.00706482, 0.00458679, -0.00133667, 0.00446777, 0.00727539, 0.0085144, 0.00765076,
71 0.00744324, 0.00810852, 0.011911, 0.0117432, 0.00995789, 0.0141144, 0.0146301, 0.01651, 0.0221497, 0.0218842, 0.0201477, 0.0221466, 0.0210632,
72 0.0162018, 0.0183746, 0.0163727, 0.0168152, 0.0135895, 0.013208, 0.013208, 0.0101379, 0.0105713, 0.0109039, 0.0103699, 0.00718689, 0.0068634,
73 0.00429993, 0.0033844, 0.00050354, -9.15527e-05, 0.00460815, 0.00307617, 0.00213318, 0.00421143, 0.00546875, 0.00121155, 0.00124817, 0.0053894, 0.00281677,
74 0.0017395, 0.00368652, 0.00334778, 0.00233459, 0.00368347, 0.000366211, 0.00219727, 0.00175476, -0.00145874, 0.0006073, -0.000961304, -0.000509644, 0.00078125,
75 -0.00332336, 0.00331726, 0.000183105, -0.000747681, 0.00293274, -0.000637817, 0.000924683, -0.00149231, -0.00195312, -0.000564575, -0.00177917, 0.000491333, 0.00137024,
76 0.00274353, -0.000256348, 0.0024353, -0.00281372, -0.00131531, -0.00141602, -0.00289307, 0.000964355, 0.00017395, 0.00233765, -0.000726318, -0.000454712, -0.00398254,
77 -0.00518494, 0.000839233, 0.0168152, 0.0135895, 0.013208, 0.013208, 0.0101379, 0.0105713, 0.0109039, 0.0103699, 0.00718689, 0.0068634, 0.00429993,
78 0.0033844, 0.00050354, -9.15527e-05, 0.00460815, 0.00307617, 0.00213318, 0.00421143, 0.00546875, 0.00121155, 0.00124817, 0.0053894, 0.00281677, 0.0017395,
79 0.00368652, 0.00334778, 0.00233459, 0.00368347, 0.000366211, 0.00219727, 0.00175476, -0.00145874, 0.0006073, -0.000961304
80 }
81 };
82
83 CabDesc_imp<511> cab_data_1x15 =
84 {
85 511, 48000,
86 {
87 0.000134277, 0.000299072, 0.000500488, 0.000701904, 0.000897217, 0.00107422, 0.0012207, 0.00134277, 0.00166016, 0.00279541, 0.00596924, 0.0129211, 0.0255066,
88 0.0450439, 0.0717041, 0.103967, 0.138361, 0.169751, 0.192133, 0.199994, 0.189673, 0.160516, 0.115253, 0.0595947, 0.00111084, -0.0523376,
89 -0.09422, -0.120544, -0.130334, -0.125336, -0.109198, -0.0863647, -0.0610535, -0.036554, -0.015033, 0.00230103, 0.0147949, 0.0221741, 0.0244629,
90 0.0220886, 0.015863, 0.00692749, -0.00336914, -0.0137573, -0.0232178, -0.0311218, -0.0372253, -0.041571, -0.0443298, -0.0456299, -0.0454651, -0.0437683,
91 -0.0405396, -0.0360168, -0.0307495, -0.0255127, -0.0211731, -0.018396, -0.0174988, -0.0183716, -0.0206116, -0.0236694, -0.0270508, 0, -0.0337097,
92 -0.0368042, -0.0396301, -0.0419495, -0.0433411, -0.0432739, -0.0412781, -0.0371643, -0.0311523, -0.0238831, -0.016272, -0.00932617, -0.00390625, -0.000634766,
93 0.000219727, -0.00123291, -0.0045166, -0.00890503, -0.013562, -0.0176819, -0.0205872, -0.021814, -0.0211914, -0.0188721, -0.0152954, -0.0111328, -0.00716553,
94 -0.00413818, -0.00258789, -0.00273437, -0.00445557, -0.00733032, -0.0107849, -0.0142944, -0.0174927, -0.0202332, -0.0226074, -0.0248291, -0.027124, -0.0295776,
95 -0.0320679, -0.0342712, -0.0357727, -0.0361938, -0.0352844, -0.0329712, -0.0293701, -0.0247498, -0.0194946, -0.0140198, -0.00877075, -0.00415649, -0.00057373,
96 0.00169678, 0.00249634, 0.00189209, 0.000170898, -0.00219727, -0.0046814, -0.0067749, -0.00814209, -0.0086731, -0.00847778, 0, -0.00687866, -0.00581055,
97 -0.0045227, -0.0027832, -0.000341797, 0.00289307, 0.0067627, 0.0108215, 0.0144226, 0.0168823, 0.017688, 0.0166565, 0.0139832, 0.010199, 0.00598755,
98 0.00205688, -0.0010376, -0.00300293, -0.00379028, -0.00352173, -0.00244141, -0.000805664, 0.00119019, 0.00338745, 0.00569458, 0.00802002, 0.0102478, 0.0122314,
99 0.0138184, 0.0148865, 0.0153687, 0.0152466, 0.014563, 0.0133667, 0.0117493, 0.00982056, 0.00775146, 0.00578003, 0.00420532, 0.003302, 0.00330811,
100 0.00438232, 0.00649414, 0.00944214, 0.0127869, 0.0159607, 0.0184021, 0.0197144, 0.0197632, 0.0186768, 0.0167664, 0.0143921, 0.0118164, 0.00919189,
101 0.00656738, 0.00415039, 0.00236816, 0.00170288, 0.00239258, 0.00419922, 0.00649414, 0.00848999, 0.00963135, 0, 0.00950928, 0.00913696, 0.00916748,
102 0.00994873, 0.0114441, 0.0129517, 0.0133057, 0.0118164, 0.00891113, 0.00587769, 0.00390625, 0.00344238, 0.00426636, 0.00597534, 0.00808716, 0.0100098,
103 0.011261, 0.0118774, 0.0124756, 0.0137451, 0.0159851, 0.0189636, 0.0220642, 0.0245972, 0.0260681, 0.0262634, 0.0252197, 0.0232483, 0.0209595,
104 0.0191345, 0.018335, 0.0185791, 0.0194336, 0.0203552, 0.0208679, 0.0206482, 0.0198303, 0.0189514, 0.0185608, 0.0187256, 0.0190613, 0.0190186,
105 0.0180847, 0.0159729, 0.0129333, 0.00982666, 0.00770264, 0.00709839, 0.00768433, 0.00869141, 0.009552, 0.0102844, 0.0112671, 0.0126709, 0.0141357,
106 0.0149963, 0.0149658, 0.0143555, 0.0136536, 0.0131897, 0.0129456, 0.0123962, 0.01073, 0, 0.003302, -0.00055542, -0.00249023, -0.00183716,
107 0.000653076, 0.00330811, 0.00470581, 0.00438232, 0.00276489, 0.000653076, -0.00116577, -0.00214233, -0.00214233, -0.00164795, -0.00159912, -0.00278931, -0.00516357,
108 -0.0078186, -0.00956421, -0.00946655, -0.00714111, -0.00299683, 0.00181885, 0.00605469, 0.00899658, 0.010614, 0.0112976, 0.0117004, 0.0124268, 0.0136475,
109 0.0148865, 0.0155334, 0.0153259, 0.0143738, 0.0128174, 0.0107178, 0.00843506, 0.00675659, 0.00626831, 0.00688477, 0.00808716, 0.00939941, 0.0105408,
110 0.0111877, 0.0109558, 0.00969238, 0.00762939, 0.00519409, 0.00283203, 0.000946045, -0.000274658, -0.00098877, -0.00159302, -0.00229492, -0.00292969, -0.00309448,
111 -0.00252686, -0.00139771, -0.000219727, 0.000463867, 0.000421143, -0.000146484, -0.000793457, 0, -0.00114136, -0.000982666, -0.000830078, -0.000634766, -0.000286865,
112 0.000250244, 0.00090332, 0.00143433, 0.00161133, 0.00128174, 0.000592041, -0.000128174, -0.000628662, -0.00098877, -0.00145874, -0.00221558, -0.0032898, -0.00459595,
113 -0.00594482, -0.00700684, -0.00742798, -0.0071106, -0.00638428, -0.00586548, -0.00601807, -0.00681152, -0.00780029, -0.00846558, -0.00839844, -0.00752563, -0.00609741,
114 -0.00449829, -0.00308838, -0.00220947, -0.00217285, -0.00292969, -0.0039978, -0.00477905, -0.00494995, -0.0045105, -0.0036377, -0.00254517, -0.00152588, -0.000872803,
115 -0.000720215, -0.000958252, -0.00129395, -0.00142212, -0.00125122, -0.00102539, -0.00112915, -0.00167236, -0.00245972, -0.00327759, -0.00406494, -0.00474854, -0.00515747,
116 -0.00513916, -0.00465698, -0.00377808, -0.00269775, -0.00169678, -0.0010437, 0, -0.00129395, -0.00206299, -0.00284424, -0.00324097, -0.00306396, -0.0024292,
117 -0.00175171, -0.0015686, -0.00222778, -0.00378418, -0.00597534, -0.00823975, -0.00977173, -0.00990601, -0.00860596, -0.00648804, -0.00442505, -0.00300903, -0.0024292,
118 -0.00257568, -0.00314331, -0.00378418, -0.00437622, -0.0050293, -0.00586548, -0.00681763, -0.00765991, -0.0081604, -0.00825195, -0.00813599, -0.00806274, -0.00805664,
119 -0.00791626, -0.00751343, -0.00697632, -0.006604, -0.00667725, -0.00727539, -0.00825195, -0.00933228, -0.0102417, -0.01073, -0.0106934, -0.0101929, -0.00941772,
120 -0.00853272, -0.00772705, -0.00722046, -0.0071167, -0.00734253, -0.00775757, -0.00819702, -0.00848389, -0.0085022, -0.00836792, -0.00825806, -0.00820312, -0.00802002,
121 -0.00759277, -0.00710449, -0.00682373, -0.00691528, -0.00737305, 0, -0.00810547, -0.00736694, -0.00585938, -0.00427246, -0.00317993, -0.00258789, -0.00221558,
122 -0.00192871, -0.00171509, -0.00146484, -0.00110474, -0.000738525, -0.00057373, -0.000805664, -0.0015564, -0.00251465, -0.00287476, -0.00202026, -0.000274658, 0.00140381,
123 0.00223389, 0.00211182, 0.00143433, 0.000683594, 7.93457e-05, -0.000537109, -0.00145874, -0.00272217, -0.00408325, -0.00528564, -0.00620117, -0.00673828, -0.00682373,
124 -0.006427, -0.00548706, -0.0039917, -0.00223999, -0.000958252, -0.000842285, -0.00187988, -0.00343628, -0.00494385, -0.00612793, -0.00692139, -0.00733032, -0.00742798,
125 -0.00737305, -0.00731201, -0.00737305, -0.00758667, -0.00773926, -0.00747681, -0.00657959, -0.0052002, -0.00383911, -0.00291748, -0.00247192, -0.00231934, -0.00227661,
126 -0.00219116, -0.00198364, -0.00184937, -0.0019043
127 }
128 };
129
130 CabDesc_imp<998> cab_data_mesa =
131 {
132 998, 48000,
133 {
134 0.00020752, 0.000354004, 0.000421143, 0.000354004, 0.000213623, 3.05176e-05, 0.00010376, 0.00178223, 0.00993652, 0.0342224, 0.0856934, 0.154669, 0.199994,
135 0.186456, 0.115784, 0.0149719, -0.0793213, -0.134674, -0.144513, -0.121069, -0.0771423, -0.0290222, 0.00469971, 0.0174072, 0.0143616, 0.00430908,
136 -0.00318604, -0.00372925, 0.00308228, 0.014386, 0.0227295, 0.0225159, 0.0127075, -0.000439453, -0.00760498, -0.00966797, -0.0125916, -0.015387, -0.0153625,
137 -0.0173401, -0.0275513, -0.0406067, -0.044635, -0.0366638, -0.0249084, -0.0157288, -0.00880737, -0.00385742, 0.000500488, 0.00552368, 0.0072937, 0.00379639,
138 -0.000646973, -0.00421143, -0.011554, -0.0231873, -0.0317993, -0.0343262, -0.0347473, -0.0345398, -0.0317749, -0.0270691, -0.0201294, 0, 0.00819702,
139 0.0214722, 0.0278442, 0.0240112, 0.010791, -0.00495605, -0.0165405, -0.0211426, -0.0202087, -0.0174377, -0.0157532, -0.0155273, -0.0153198, -0.0130981,
140 -0.00821533, -0.00350952, -0.00205688, -0.00298462, -0.00479736, -0.00900879, -0.0153992, -0.0206055, -0.0214661, -0.0169678, -0.00876465, 0.000488281, 0.00910034,
141 0.0159668, 0.0195923, 0.0187073, 0.0139221, 0.0071228, -0.000280762, -0.00716553, -0.012561, -0.0164307, -0.0199951, -0.0237122, -0.0257385, -0.0239319,
142 -0.0181946, -0.00994263, -0.00133057, 0.00576782, 0.010498, 0.0131409, 0.0147278, 0.0158875, 0.0163879, 0.0148132, 0.00995483, 0.00288696, -0.00346069,
143 -0.00641479, -0.00625, -0.00564575, -0.00671997, -0.00940552, -0.0114258, -0.01026, -0.00533447, 0.00151367, 0.0074646, 0, 0.0127625, 0.0132996,
144 0.0135132, 0.0130554, 0.0112, 0.00772705, 0.00321655, -0.00134888, -0.00551147, -0.00891724, -0.0106873, -0.0100708, -0.00715332, -0.00227051, 0.00411987,
145 0.0107239, 0.016272, 0.0203125, 0.022467, 0.0223083, 0.0198242, 0.0156982, 0.0109863, 0.00653687, 0.00307007, 0.000872803, -0.000744629, -0.00249634,
146 -0.00411987, -0.00512085, -0.00524902, -0.00421753, -0.00172119, 0.00222168, 0.00689087, 0.010907, 0.0132263, 0.0137146, 0.0125244, 0.0100891, 0.00727539,
147 0.00509033, 0.00405273, 0.00396118, 0.0043396, 0.00493164, 0.00542603, 0.00534058, 0.00458984, 0.00357666, 0.00273437, 0.0024231, 0.00309448, 0.00482178,
148 0.00687866, 0.00841064, 0.00910645, 0.00899658, 0.00805054, 0.006427, 0.00455933, 0.00275269, 0.00125732, 0, 0.000964355, 0.00222168, 0.00396729,
149 0.0059021, 0.0078064, 0.009552, 0.0110535, 0.0121948, 0.0128662, 0.0129578, 0.012384, 0.0112732, 0.00984497, 0.00819092, 0.00645752, 0.00488892,
150 0.00383301, 0.00350952, 0.00369263, 0.00373535, 0.0032898, 0.00265503, 0.00245361, 0.00301514, 0.00424194, 0.0057251, 0.00699463, 0.00770874, 0.00772095,
151 0.00706177, 0.00592041, 0.00457764, 0.00320435, 0.00202026, 0.0015625, 0.00206299, 0.00321655, 0.00463257, 0.00596924, 0.00702515, 0.00765381, 0.00772705,
152 0.0072937, 0.00652466, 0.00553589, 0.00446167, 0.0034668, 0.00252686, 0.00158691, 0.000775146, 0.000366211, 0.000671387, 0.00159912, 0.00280151, 0.00404663,
153 0.00512695, 0.00581055, 0.00594482, 0.00556641, 0.00476074, 0.00366211, 0.00255737, 0.00169678, 0, 1.83105e-05, -0.00131226, -0.00247803, -0.00265503,
154 -0.00128174, 0.00134277, 0.00421143, 0.00625, 0.00690918, 0.00640869, 0.00543823, 0.00447388, 0.00372314, 0.00337524, 0.00349121, 0.00390015, 0.00432129,
155 0.00459595, 0.00484009, 0.0052002, 0.00544434, 0.00530396, 0.00480957, 0.00409546, 0.00325317, 0.00251465, 0.00203857, 0.00178833, 0.00170288, 0.00159302,
156 0.000994873, -0.000476074, -0.0026123, -0.00474854, -0.00640259, -0.00733032, -0.00740356, -0.00665894, -0.00523682, -0.00335083, -0.00142822, -6.71387e-05, 0.000408936,
157 0.000183105, -0.0003479, -0.000793457, -0.000964355, -0.000891113, -0.000732422, -0.000738525, -0.000964355, -0.00133057, -0.00180054, -0.00220337, -0.00218506, -0.00158081,
158 -0.000720215, -7.93457e-05, 0.000146484, -6.71387e-05, -0.000610352, -0.00110474, -0.00126953, 0, -0.00128784, -0.0015564, -0.00216064, -0.00307617, -0.00404053,
159 -0.00465088, -0.00470581, -0.00445557, -0.00430298, -0.00430908, -0.00435791, -0.00424805, -0.00397339, -0.00395508, -0.00460815, -0.00584717, -0.00720825, -0.00813599,
160 -0.00832519, -0.00797729, -0.00750732, -0.00708618, -0.00664063, -0.00593872, -0.00474854, -0.0031311, -0.00148315, -0.000238037, 0.000390625, 0.000585938, 0.000726318,
161 0.000933838, 0.000982666, 0.000683594, 0.000134277, -0.000610352, -0.00168457, -0.00303955, -0.00440063, -0.00553589, -0.00634155, -0.00675659, -0.0067749, -0.00652466,
162 -0.00618896, -0.00598755, -0.00613403, -0.00653687, -0.00679932, -0.00665283, -0.00618896, -0.00574951, -0.00565186, -0.00585327, -0.00618286, -0.0065979, -0.0069519,
163 -0.00705566, -0.00687866, -0.0065979, -0.00651245, -0.0067688, -0.00722046, 0, -0.0078064, -0.00776367, -0.00752563, -0.00704346, -0.00639648, -0.00576782,
164 -0.00524292, -0.00474243, -0.0041748, -0.0034729, -0.00264282, -0.00183716, -0.00136108, -0.00144043, -0.00202637, -0.00288086, -0.0036438, -0.00405884, -0.00415649,
165 -0.00408325, -0.00391846, -0.00388184, -0.00430298, -0.00526123, -0.00645142, -0.00740356, -0.00783691, -0.0078186, -0.00752563, -0.0071228, -0.0067749, -0.00652466,
166 -0.00638428, -0.00629883, -0.00604248, -0.00536499, -0.00426025, -0.00298462, -0.00195312, -0.00154419, -0.00193481, -0.00302734, -0.00447388, -0.00574341, -0.00636597,
167 -0.00614014, -0.00529175, -0.00437622, -0.00377197, -0.003479, -0.00327759, -0.00300903, -0.00270386, -0.00245972, -0.00234985, -0.0024353, -0.00270996, -0.00309448,
168 -0.00352173, -0.00393677, -0.00419312, -0.00418701, -0.0039978, 0, -0.00402832, -0.00458374, -0.00532837, -0.005896, -0.00601807, -0.0057312, -0.00526123,
169 -0.00478516, -0.00427246, -0.00363159, -0.00289917, -0.00217896, -0.00143433, -0.000671387, -0.000115967, 4.88281e-05, -0.000170898, -0.000628662, -0.00112305, -0.00148315,
170 -0.00166016, -0.00158691, -0.00130005, -0.0010498, -0.00102539, -0.00118408, -0.00130615, -0.00123901, -0.0010376, -0.000842285, -0.000750732, -0.000866699, -0.00122681,
171 -0.00176392, -0.00228882, -0.00263062, -0.00264893, -0.00224609, -0.00150757, -0.000787353, -0.000402832, -0.00032959, -0.000372314, -0.000372314, -0.000292969, -0.000256348,
172 -0.000335693, -0.000579834, -0.00102539, -0.00154419, -0.00183105, -0.00153809, -0.000518799, 0.000946045, 0.00230713, 0.00316162, 0.00335693, 0.00296631, 0.00222778,
173 0.00140381, 0.000646973, 7.93457e-05, -0.000170898, 0, 0.000274658, 0.000653076, 0.000897217, 0.000958252, 0.000909424, 0.000769043, 0.000439453, -6.71387e-05,
174 -0.000585938, -0.00101318, -0.00117798, -0.00098877, -0.000537109, 7.93457e-05, 0.000738525, 0.00130615, 0.00176392, 0.00203247, 0.0020874, 0.00213623, 0.00238037,
175 0.00283203, 0.00335083, 0.00372314, 0.00384521, 0.00388184, 0.00405884, 0.00445557, 0.0050293, 0.00566406, 0.00620117, 0.00649414, 0.00648804, 0.00636597,
176 0.00634155, 0.00631714, 0.00599976, 0.00523071, 0.00402832, 0.00261841, 0.00146484, 0.000964355, 0.00115967, 0.00184937, 0.00275269, 0.00346069, 0.00374146,
177 0.00368042, 0.00341187, 0.00301514, 0.00268555, 0.00259399, 0.00274658, 0.0031189, 0.00361328, 0.00412598, 0.00467529, 0.00530396, 0.00591431, 0.00632935,
178 0.00639038, 0.00603027, 0.0053772, 0, 0.00407715, 0.00383301, 0.00391846, 0.00430908, 0.00491943, 0.00549927, 0.00586548, 0.00602417, 0.00604858,
179 0.00595703, 0.00576782, 0.00549927, 0.00517578, 0.00482178, 0.00442505, 0.00401001, 0.00368042, 0.00354004, 0.00357666, 0.00366821, 0.00357666, 0.00313721,
180 0.00250244, 0.00204468, 0.00209961, 0.00266724, 0.00348511, 0.00422363, 0.00466309, 0.00472412, 0.00450439, 0.00418701, 0.00392456, 0.00380249, 0.00386353,
181 0.00403442, 0.00414429, 0.00406494, 0.00377197, 0.00343018, 0.00335083, 0.00368042, 0.00422363, 0.00473022, 0.00508423, 0.00529175, 0.00541992, 0.00542603,
182 0.00516357, 0.00466309, 0.00414429, 0.00379639, 0.00368042, 0.00370483, 0.0036377, 0.00335693, 0.00293579, 0.00256958, 0.00245972, 0.00263672, 0.00300903,
183 0.00341797, 0.00365601, 0, 0.00307617, 0.00255127, 0.00218506, 0.00219727, 0.00264893, 0.00332031, 0.00391846, 0.0041687, 0.00391235, 0.003125,
184 0.00195923, 0.000811768, 4.27246e-05, -0.00020752, -1.2207e-05, 0.000360107, 0.000640869, 0.000836182, 0.00111694, 0.00157471, 0.00203857, 0.00219116, 0.00186157,
185 0.00125732, 0.000714111, 0.000439453, 0.000439453, 0.000628662, 0.000939941, 0.00133057, 0.00170288, 0.00184326, 0.00162354, 0.00111084, 0.000567627, 0.000268555,
186 0.000402832, 0.00100708, 0.00194702, 0.00292969, 0.00361328, 0.00385132, 0.00372925, 0.00351562, 0.00337524, 0.00336304, 0.00350952, 0.00374146, 0.00383301,
187 0.00354614, 0.00275879, 0.00159302, 0.000384521, -0.000482178, -0.000805664, -0.000689697, -0.000463867, -0.000354004, -0.000396729, -0.000531006, -0.00057373, -0.000396729,
188 -5.49316e-05, 0, 0.000469971, 0.000543213, 0.000585938, 0.00057373, 0.000549316, 0.000640869, 0.000933838, 0.00141602, 0.00189819, 0.0020752, 0.00189209,
189 0.00155029, 0.00125122, 0.00108643, 0.000970459, 0.000750732, 0.000415039, -2.44141e-05, -0.000592041, -0.00117188, -0.00150146, -0.00147095, -0.0012146, -0.000878906,
190 -0.000488281, -0.00012207, 0, -0.000292969, -0.000915527, -0.00164185, -0.00223389, -0.00253296, -0.00244141, -0.00209351, -0.00177002, -0.00170288, -0.00192261,
191 -0.0022644, -0.00248413, -0.00239868, -0.00198975, -0.00142212, -0.000860596, -0.000415039, -0.000158691, -0.00012207, -0.000256348, -0.000482178, -0.000695801, -0.000848389,
192 -0.000927734, -0.000946045, -0.000939941, -0.0010437, -0.00131836, -0.00169067, -0.00202637, -0.00227051, -0.00241699, -0.00246582, -0.00250244, -0.00266724, -0.00296021,
193 0, -0.00341187, -0.00338745, -0.00332642, -0.00344849, -0.00390015, -0.00459595, -0.00522461, -0.00548096, -0.00523682, -0.0045227, -0.0034668, -0.00231934,
194 -0.00135498, -0.000799561, -0.000775146, -0.00130615, -0.0022522, -0.00331421, -0.00413818, -0.00449829, -0.00435791, -0.00378418, -0.00299072, -0.00223389, -0.00169678,
195 -0.00142822, -0.00144043, -0.00167236, -0.00197754, -0.00217285, -0.00220337, -0.00216064, -0.00215454, -0.00221558, -0.00228882, -0.00228882, -0.00217896, -0.00213623,
196 -0.00233765, -0.00270996, -0.00301514, -0.00308228, -0.00292358, -0.00275269, -0.0027771, -0.00298462, -0.003302, -0.00374756, -0.00420532, -0.00446777, -0.00442505,
197 -0.00404663, -0.0034668, -0.00297852, -0.00267334, -0.00245361, -0.00227051, -0.00206299, -0.00181885, -0.00161133, -0.00145874, -0.00135498, -0.00132446, 0,
198 -0.00187378, -0.00247803, -0.00302734, -0.003302, -0.00321045, -0.00291138, -0.00266724, -0.00250244, -0.00241089, -0.00245972, -0.00256958, -0.00256348, -0.00234985,
199 -0.00192261, -0.00144043, -0.00112305, -0.00112915, -0.00136108, -0.00153809, -0.00159302, -0.00164795, -0.0017395, -0.00180664, -0.00184937, -0.00197754, -0.00223999,
200 -0.00251465, -0.00269165, -0.00288086, -0.00316772, -0.00349121, -0.00375977, -0.00385742, -0.00371094, -0.00339966, -0.00303955, -0.00262451, -0.00217896, -0.00176392,
201 -0.00141602, -0.00116577, -0.00111084, -0.00134888, -0.00174561, -0.0020752, -0.00227661, -0.00241699, -0.00247192, -0.00234985, -0.0020752, -0.00184326, -0.00172119,
202 -0.00158691, -0.0013855, -0.0012085, -0.00117188, -0.00127563, -0.00143433, -0.00153198, -0.00150146, -0.0013855, -0.00123901, -0.00100708, 0, -0.000286865,
203 -1.83105e-05, 2.44141e-05, -9.15527e-05, -0.000158691, 1.2207e-05, 0.000415039, 0.000878906, 0.00119019, 0.00124512, 0.00113525, 0.000933838, 0.000610352, 0.000189209,
204 -0.00020752, -0.000457764, -0.00055542, -0.000561523, -0.000488281, -0.0003479, -0.000152588, 4.88281e-05, 0.000201416, 0.000262451, 0.000250244, 0.000189209, 0.000140381,
205 0.00010376, 7.32422e-05, 4.88281e-05, 6.71387e-05, 0.000146484, 0.000262451, 0.000323486, 0.000262451, 0.000115967, -5.49316e-05, -0.000201416, -0.000244141, -0.000146484,
206 -1.83105e-05, 1.83105e-05, -2.44141e-05, -4.27246e-05, -4.27246e-05, -5.49316e-05, -3.05176e-05, 0.00010376, 0.000335693, 0.000592041, 0.000823975, 0.0010437, 0.00131836,
207 0.00168457, 0.0020874, 0.00249634, 0.00282593, 0.00292358, 0.0027771, 0.00250854, 0.00221558, 0.00195923, 0.00170288, 0, 0.000933838, 0.000415039,
208 -1.83105e-05, -0.000213623, -0.000146484, 0.00012207, 0.000463867, 0.000720215, 0.000805664, 0.000756836, 0.00065918, 0.000561523, 0.000506592, 0.000500488, 0.00055542,
209 0.000683594, 0.000848389, 0.00103149, 0.0012207, 0.00142212, 0.00163574, 0.0019104, 0.00223389, 0.00251465, 0.00263062, 0.00249634, 0.00221558, 0.00200806,
210 0.00203247, 0.00227051, 0.00252686, 0.00252686, 0.00219116, 0.00170898, 0.00132446, 0.00119019, 0.00130615, 0.00154419
211 }
212 };
213
214 CabDesc_imp<192> contrast_ir_desc =
215 {
216 192, 48000,
217 {
218 0.147081, 0.208808, 0.208996, 0.163228, 0.0858905, -0.0119104, -0.0932825, -0.121011, -0.0999426, -0.071073, -0.0403973, -0.00214844, 0.0287018,
219 0.0381079, 0.0372284, 0.0330389, 0.0252979, 0.0141394, 0.00118835, -0.00764709, -0.00751953, 0.00262512, 0.0143475, 0.0174762, 0.0168384, 0.0179126,
220 0.00738525, -0.0114069, -0.0192352, -0.0145825, -0.0179932, -0.0244049, -0.0173956, -0.00357178, 0.00643188, 0.0108966, 0.0132935, 0.0123737, 0.00680786,
221 -0.000214844, -0.0040686, -0.00533752, -0.00738525, -0.00539124, -0.00171875, 0.00156433, 0.00481384, 0.0038739, -0.00666016, -0.018866, -0.0216522, -0.0171606,
222 -0.00717712, 0.00770081, 0.0209003, 0.0251971, 0.0221222, 0.0157977, 0.00453857, -0.0107892, -0.022478, -0.029165, -0.0303467, 0, -0.0169592,
223 -0.00966125, -0.00163147, 0.00273254, 0.000436401, -0.00282654, -0.00791565, -0.0136493, -0.0128436, -0.00564636, 0.00298096, 0.0090033, 0.00841248, 0.00201416,
224 -0.00579407, -0.0119171, -0.0145624, -0.0128436, -0.00741211, 0.000543823, 0.00414917, 0.00414917, 0.00114136, -0.00778809, -0.021377, -0.0325623, -0.0386584,
225 -0.038974, -0.0333679, -0.0221289, -0.0107825, -0.00453186, -0.00127563, -0.000261841, 0.000631104, 0.000537109, 0.000355835, 0.00114136, 0.00174561, 0.00104065,
226 -0.000100708, -0.00128906, -0.00083252, 0.00146362, 0.00234314, 0.000443115, -0.00245056, -0.00782165, -0.0164423, -0.0250092, -0.0309644, -0.0314343, -0.0265063,
227 -0.0176508, -0.00496155, 0.00805664, 0.0157843, 0.0171069, 0.0131055, 0.00613647, -0.00216187, -0.00804321, -0.0117157, 0, -0.015321, -0.0154352,
228 -0.013374, -0.00994995, -0.00672058, -0.00353821, -0.00110779, 0.000678101, 0.00250427, -0.00564636, 0.00298096, 0.0090033, 0.00841248, 0.00201416, -0.00579407,
229 -0.0119171, -0.0145624, -0.0128436, -0.00741211, 0.000543823, 0.00414917, 0.00414917, 0.00114136, -0.00778809, -0.021377, -0.0325623, -0.0386584, -0.038974,
230 -0.0333679, -0.0221289, -0.0107825, -0.00453186, -0.00127563, -0.000261841, 0.000631104, 0.000537109, 0.000355835, 0.00114136, 0.00174561, 0.00104065, -0.000100708,
231 -0.00128906, -0.00083252, 0.00146362, 0.00234314, 0.000443115, -0.00245056, -0.00782165, -0.0164423, -0.0250092, -0.0309644, -0.0314343, -0.0265063, -0.0176508,
232 -0.00496155, 0.00805664, 0.0157843, 0.0171069, 0.0131055, 0.00613647, -0.00216187, -0.00804321, -0.0117157, 0
233 }
234 };
235
236 CabDesc_imp<1000> cab_data_4x12 =
237 {
238 1000, 48000,
239 {
240 0.0210554,0.0750885,0.139243,0.180713,0.184139,0.144903,0.0686037,-0.0185033,-0.0886042,-0.12552,
241 -0.121363,-0.0787852,-0.0213013,0.0229356,0.0411458,0.0370145,0.0195269,-0.00133213,-0.0152812,-0.0145159,
242 -0.00183383,0.0137818,0.0256187,0.0286779,0.0207782,0.0077942,-0.00120299,-0.0031918,-0.00206098,-0.00135227,
243 -0.00140983,-0.00497816,-0.0130377,-0.0218103,-0.0277226,-0.0286464,-0.0215221,-0.00951618,-0.00086607,0.0013951,
244 4.17435e-05,-0.00319773,-0.00740044,-0.00716618,-0.00255126,0.00219789,0.00519503,0.00521192,0.000273707,-0.00618929,
245 -0.00908,-0.010311,-0.0123735,-0.0142287,-0.017697,-0.0241029,-0.0284137,-0.0277091,-0.0227469,-0.0152625,
246 -0.00519387,0.00359817,0.00729039,0.00671523,0.00318916,-0.00156796,-0.0063908,-0.00976712,-0.0129904,-0.017544,
247 -0.022616,-0.0259348,-0.0261542,-0.0244839,-0.0203182,-0.0130093,-0.00603727,-0.0032797,-0.00488236,-0.00846209,
248 -0.0130562,-0.0172578,-0.019061,-0.0178728,-0.0150705,-0.0105603,-0.00434051,0.000776129,0.00313197,0.00289589,
249 0.00099021,-0.00304687,-0.00856731,-0.0134404,-0.0173033,-0.019982,-0.0200995,-0.0189035,-0.0176908,-0.0158077,
250 -0.0144982,-0.0144288,-0.0148401,-0.0143923,-0.0124568,-0.00914924,-0.00554664,-0.00161911,0.00204186,0.00466298,
251 0.00609433,0.00586043,0.00444049,0.00230369,-0.000460247,-0.00331487,-0.00620476,-0.00860464,-0.00977339,-0.0103904,
252 -0.010582,-0.010316,-0.00959965,-0.0079265,-0.00490751,-0.000773675,0.00326292,0.0060596,0.00712823,0.0062126,
253 0.00304346,-0.00120159,-0.00554078,-0.00940086,-0.0116814,-0.0115473,-0.00920741,-0.00570695,-0.00192381,0.00131636,
254 0.00313601,0.00310522,0.0019866,0.00024603,-0.00151895,-0.00254442,-0.00257635,-0.00162088,0.000189493,0.00233523,
255 0.00431406,0.00546426,0.00550678,0.00412306,0.00163322,-0.00135299,-0.00397516,-0.00564887,-0.00616138,-0.00556616,
256 -0.00411866,-0.00213908,-0.000414186,0.000858571,0.00146968,0.00134177,0.000706731,0.000101598,-2.74503e-05,0.000216126,
257 0.000921334,0.00170689,0.00206986,0.00178904,0.00108999,0.000418435,-0.000329494,-0.00108679,-0.00160318,-0.00186207,
258 -0.00184908,-0.00174925,-0.0017532,-0.00168678,-0.00128635,-0.000532894,0.000551346,0.00173037,0.00285549,0.00381329,
259 0.00444954,0.00483888,0.00505528,0.00517976,0.00536394,0.00566848,0.00582878,0.00582337,0.00573454,0.00568407,
260 0.005573,0.00543545,0.00536728,0.00536814,0.00553587,0.00596405,0.00663779,0.00725726,0.00749624,0.00707181,
261 0.00588561,0.00408059,0.00192134,3.47446e-05,-0.00100598,-0.000915017,4.2448e-05,0.00134795,0.00249509,0.00322568,
262 0.0035816,0.00386374,0.00451921,0.00540239,0.0062616,0.00694728,0.0072783,0.00703991,0.00629145,0.00535576,
263 0.00433242,0.0032916,0.00256128,0.00234155,0.00256369,0.00301814,0.00356167,0.00389767,0.00377937,0.00333664,
264 0.00305993,0.00308825,0.00323129,0.00347644,0.00368722,0.00369027,0.0035434,0.0033256,0.00313601,0.00318107,
265 0.00358381,0.00415188,0.00472327,0.00508203,0.00512893,0.00469563,0.00385072,0.00285837,0.00193384,0.0011745,
266 0.000625585,0.000444931,0.000447908,0.000509171,0.000766472,0.00131361,0.00198278,0.00252006,0.00288339,0.00305278,
267 0.00301612,0.00284385,0.0027595,0.0028841,0.00307673,0.00335143,0.00374592,0.00420453,0.00472283,0.00537605,
268 0.00605867,0.00667969,0.0071488,0.00726939,0.00694415,0.00626471,0.00550721,0.0049613,0.00471663,0.00477505,
269 0.00498066,0.00516581,0.00520946,0.00505574,0.00483425,0.00468391,0.00466834,0.00471656,0.00470018,0.00453961,
270 0.0042108,0.00375276,0.00315533,0.00236797,0.00148797,0.000770994,0.000356717,0.000263414,0.000411073,0.00065758,
271 0.000956942,0.00116598,0.00118259,0.0010794,0.00090411,0.000730068,0.000713639,0.00101561,0.00158903,0.0022272,
272 0.00269874,0.00283804,0.00266545,0.00230882,0.00195122,0.00177202,0.0018221,0.00198835,0.00219707,0.0024585,
273 0.00262623,0.00258478,0.00247114,0.00236725,0.00229178,0.00227378,0.00223327,0.0020942,0.0018775,0.00165049,
274 0.00145125,0.0013392,0.00133322,0.0013771,0.00146459,0.00154074,0.00148781,0.00131534,0.00115589,0.00110735,
275 0.00111562,0.00117102,0.0011977,0.00112514,0.000940195,0.000626312,0.000241008,-0.000110301,-0.000294454,-0.00026455,
276 -3.9153e-05,0.000364625,0.000848391,0.00124397,0.00133727,0.00111349,0.00081935,0.000737272,0.000979052,0.00152794,
277 0.00229764,0.00300549,0.00349459,0.00378848,0.00383738,0.00362037,0.00319689,0.00261696,0.00202673,0.00153753,
278 0.0010692,0.000529509,-3.48582e-05,-0.000518806,-0.000836461,-0.000893089,-0.000683757,-0.00041539,-0.000240531,-0.000199855,
279 -0.00040037,-0.000829803,-0.00130214,-0.00175941,-0.00214005,-0.00239538,-0.00255126,-0.00260319,-0.00258167,-0.00258312,
280 -0.00261625,-0.00257821,-0.00243703,-0.00224874,-0.002035,-0.0018443,-0.00177327,-0.00182376,-0.00196122,-0.00222559,
281 -0.00246046,-0.0023872,-0.00200267,-0.00146368,-0.000895475,-0.000426638,-0.000116391,8.54413e-05,0.000229487,0.000434546,
282 0.000783401,0.00125185,0.00170428,0.00195945,0.00191818,0.00165093,0.0013,0.000928947,0.00048422,-4.45158e-05,
283 -0.000552028,-0.000942422,-0.00123235,-0.00149559,-0.00177645,-0.00204586,-0.00228739,-0.00245312,-0.00249216,-0.00238563,
284 -0.00216864,-0.00195288,-0.00184076,-0.0018401,-0.00190445,-0.00195077,-0.0018578,-0.00162677,-0.00132209,-0.00103643,
285 -0.000946898,-0.00112221,-0.00150406,-0.00195615,-0.00229437,-0.00239499,-0.00218277,-0.0017268,-0.00124285,-0.00091104,
286 -0.000849391,-0.00104366,-0.00129184,-0.00138022,-0.00126944,-0.00107845,-0.000937854,-0.000922902,-0.00107965,-0.00139665,
287 -0.00174952,-0.00198203,-0.00202984,-0.00187962,-0.0015708,-0.00124176,-0.00109158,-0.00130834,-0.0019349,-0.00284735,
288 -0.00377169,-0.00432535,-0.00427272,-0.00367104,-0.00275803,-0.00184037,-0.00124326,-0.00112073,-0.00138117,-0.00175739,
289 -0.00199908,-0.00197451,-0.00163986,-0.00107954,-0.000508739,-0.000136274,-2.69049e-05,-0.000195924,-0.000604997,-0.00107277,
290 -0.00139074,-0.00147588,-0.00138458,-0.00119441,-0.00105561,-0.00112623,-0.00139983,-0.00174871,-0.00207738,-0.00232496,
291 -0.00235838,-0.00213469,-0.00182601,-0.00162957,-0.00156907,-0.00164833,-0.00185294,-0.00208449,-0.002181,-0.00207736,
292 -0.00181851,-0.00145291,-0.00105886,-0.000777402,-0.000693301,-0.000780538,-0.000966736,-0.00110846,-0.00100441,-0.000639605,
293 -0.000167997,0.000278684,0.000595589,0.000718707,0.000677736,0.000535644,0.000359331,0.000214058,0.000116118,-2.04741e-05,
294 -0.000248734,-0.000545983,-0.00088025,-0.00122061,-0.0015376,-0.00175523,-0.00175457,-0.00148886,-0.00107979,-0.000750293,
295 -0.000715752,-0.00112187,-0.0019394,-0.0029335,-0.00377016,-0.00421975,-0.00417837,-0.00370331,-0.00304405,-0.00245053,
296 -0.00210699,-0.00207797,-0.0022711,-0.00249086,-0.00253708,-0.00230403,-0.00181831,-0.00124433,-0.000780152,-0.000599361,
297 -0.00073175,-0.00104361,-0.00127435,-0.00119859,-0.000762859,-8.26917e-05,0.000629675,0.00112308,0.00126592,0.0011715,
298 0.00103854,0.000983915,0.00102964,0.00109781,0.00111035,0.000980961,0.000642923,0.000128366,-0.000457361,-0.000965123,
299 -0.00129109,-0.00143212,-0.00144318,-0.0014024,-0.00139796,-0.00148234,-0.00166874,-0.00191579,-0.00211699,-0.00215912,
300 -0.0020502,-0.00183696,-0.00155674,-0.00122281,-0.000867206,-0.000589227,-0.000474017,-0.000498718,-0.000541393,-0.000489083,
301 -0.000283456,6.39901e-05,0.000442908,0.000769699,0.000966486,0.000987869,0.000807193,0.000472449,6.91029e-05,-0.000300749,
302 -0.000520124,-0.000506989,-0.000277707,-7.49884e-07,0.000197924,0.000303067,0.000322268,0.000290614,0.000293023,0.000353695,
303 0.000410527,0.000420457,0.000342197,0.000133297,-0.000165088,-0.000453839,-0.000679258,-0.000834689,-0.000952602,-0.00110901,
304 -0.00138581,-0.00176734,-0.00213167,-0.00235534,-0.00238038,-0.0022105,-0.0018848,-0.00142392,-0.000878386,-0.000337561,
305 0.000124526,0.000442113,0.000576183,0.000579069,0.000590295,0.000704595,0.000887021,0.00101477,0.0010045,0.000847664,
306 0.000575138,0.000306771,0.000121299,3.08588e-05,9.36218e-06,-8.68729e-05,-0.000309611,-0.000568184,-0.000781879,-0.00090086,
307 -0.000816373,-0.000530804,-0.00015868,0.000212172,0.000470813,0.000541848,0.000420117,0.000213262,5.74002e-05,5.44461e-05,
308 0.000231169,0.000503149,0.000735295,0.000831939,0.000801057,0.00070564,0.000658602,0.000765108,0.00102202,0.00132866,
309 0.00158623,0.00171223,0.00161877,0.00138119,0.00109374,0.000773789,0.000429865,0.000119368,-0.000121345,-0.000232623,
310 -0.000125412,0.000170474,0.000515011,0.000714866,0.000659852,0.000381759,2.34736e-05,-0.000255279,-0.000353581,-0.00027348,
311 -8.40097e-05,0.000180108,0.000442772,0.000595703,0.00059443,0.000443181,0.00020006,-4.72427e-05,-0.000237849,-0.000336152,
312 -0.000260891,-1.77245e-06,0.000308816,0.000549233,0.000726773,0.000843596,0.000880568,0.000881363,0.000886135,0.000917471,
313 0.000981234,0.00105438,0.00110092,0.0011346,0.00116191,0.00120611,0.00130918,0.00150924,0.00173518,0.00188839,
314 0.0019312,0.00182619,0.00154596,0.00111546,0.000674054,0.000338175,0.000137615,6.37174e-05,9.953e-05,0.000188198,
315 0.000251211,0.000265322,0.000236736,0.000180904,0.000111483,2.96318e-05,-4.73336e-05,-8.53731e-05,-1.88834e-05,0.000190425,
316 0.000533576,0.000938581,0.00131834,0.00155549,0.00158925,0.00148725,0.0013572,0.00129875,0.00134022,0.00146789,
317 0.00163836,0.00174532,0.00169876,0.00147691,0.00111449,0.000735204,0.000492014,0.000435092,0.000515761,0.000663783,
318 0.000799262,0.00084905,0.000801557,0.000690779,0.000557527,0.000428524,0.000314815,0.00019497,5.04922e-05,-0.000104847,
319 -0.000234282,-0.000318564,-0.000372079,-0.000385258,-0.00035599,-0.0003227,-0.000303067,-0.000293341,-0.000320655,-0.000354127,
320 -0.000328881,-0.000232259,-0.000107938,1.18163e-05,0.000143091,0.000270049,0.000361626,0.000452498,0.00056314,0.000661147,
321 0.000724365,0.000744134,0.000727273,0.00072107,0.000736863,0.000779379,0.000855094,0.000962941,0.00110471,0.00125183,
322 0.001321,0.00125508,0.00107511,0.000815532,0.000494719,0.000180608,-4.70381e-05,-0.000147682,-0.000113164,2.06559e-05,
323 0.000179654,0.000301226,0.00036008,0.000352877,0.000314178,0.000264527,0.000197424,0.000127707,7.75789e-05,3.03816e-05,
324 -4.49248e-05,-0.000123981,-0.000188198,-0.000230032,-0.000205332,-9.22811e-05,8.61003e-05,0.000310111,0.000546188,0.00074752,
325 0.000886044,0.000967781,0.000983915,0.000906905,0.000743066,0.000538462,0.000377373,0.000343151,0.000430569,0.000540598,
326 0.000564958,0.000431751,0.000133502,-0.000251643,-0.000614836,-0.000844801,-0.00086966,-0.000704595,-0.000452021,-0.000232532,
327 -0.00011021,-9.40536e-05,-0.000144818,-0.000166747,-0.000102916,5.03785e-05,0.000256278,0.000434682,0.000496309,0.000419026,
328 0.000240804,4.47203e-05,-9.02133e-05,-0.000122117,-6.04452e-05,1.82926e-05,5.15602e-05,1.39297e-05,-0.00012089,-0.00033004,
329 -0.000557345,-0.000726751,-0.000759268,-0.000650285,-0.000450657,-0.00021608,3.68579e-05,0.000297704,0.000538644,0.000710049,
330 0.00077363,0.000723092,0.000614791,0.000532167,0.000514057,0.00058116,0.000682076,0.00072566,0.000673282,0.000508217,
331 0.000270299,6.37401e-05,-5.79001e-05,-0.000104257,-9.17585e-05,-6.15359e-05,-5.7741e-05,-7.34204e-05,-8.94407e-05,-0.000104779,
332 -0.00013891,-0.000166588,-0.000132638,-2.27237e-05,0.000174609,0.00045193,0.00072032,0.000864434,0.000871569,0.000768994,
333 0.00059284,0.00041948,0.000294795,0.000222579,0.000194515,0.000144409,-1.60202e-05,-0.000275753,-0.000566662,-0.00085005,
334 -0.00107913,-0.00119302,-0.00120593,-0.00115421,-0.00108797,-0.00107377,-0.00112567,-0.00117748,-0.00117754,-0.00112203,
335 -0.00103152,-0.000931128,-0.000873637,-0.000869274,-0.000861684,-0.000822599,-0.000761041,-0.000649717,-0.000460974,-0.000247598,
336 -6.14223e-05,9.10313e-05,0.000194265,0.000208968,0.000170814,0.000139069,0.000142114,0.000191107,0.000249529,0.000275162,
337 0.000279048,0.000277048,0.000268231,0.000283933,0.000336425,0.000397711,0.000432933,0.0004093,0.00032804,0.000203196,
338 6.06951e-05,-4.35841e-05,-8.5464e-05,-7.4602e-05,-3.88122e-05,-4.04483e-05,-0.000130343,-0.00030134,-0.000497514,-0.000679258,
339 -0.000815623,-0.000864775,-0.000821327,-0.000721615,-0.000589863,-0.000465223,-0.000387599,-0.000366648,-0.000385849,-0.000436
340 }
341 };
+0
-2146
src/LV2/gxamp.lv2/DSP/gx_amp.cc less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 inline void GxAmpMono::clear_state_f()
21 {
22 for (int32_t i=0; i<2; i++) fRec0[i] = 0;
23 for (int32_t i=0; i<2; i++) fRec7[i] = 0;
24 for (int32_t i=0; i<2; i++) fRec18[i] = 0;
25 for (int32_t i=0; i<3; i++) fRec17[i] = 0;
26 for (int32_t i=0; i<2; i++) fVec0[i] = 0;
27 for (int32_t i=0; i<2; i++) fRec16[i] = 0;
28 for (int32_t i=0; i<2; i++) fRec15[i] = 0;
29 for (int32_t i=0; i<3; i++) fRec14[i] = 0;
30 for (int32_t i=0; i<2; i++) fVec1[i] = 0;
31 for (int32_t i=0; i<2; i++) fRec13[i] = 0;
32 for (int32_t i=0; i<3; i++) fRec12[i] = 0;
33 for (int32_t i=0; i<3; i++) fRec11[i] = 0;
34 for (int32_t i=0; i<2; i++) fRec22[i] = 0;
35 for (int32_t i=0; i<3; i++) fRec21[i] = 0;
36 for (int32_t i=0; i<2; i++) fVec2[i] = 0;
37 for (int32_t i=0; i<2; i++) fRec20[i] = 0;
38 for (int32_t i=0; i<3; i++) fRec19[i] = 0;
39 for (int32_t i=0; i<2; i++) fRec26[i] = 0;
40 for (int32_t i=0; i<3; i++) fRec25[i] = 0;
41 for (int32_t i=0; i<3; i++) fRec24[i] = 0;
42 for (int32_t i=0; i<3; i++) fRec23[i] = 0;
43 for (int32_t i=0; i<2; i++) fRec28[i] = 0;
44 for (int32_t i=0; i<3; i++) fRec27[i] = 0;
45 for (int32_t i=0; i<2; i++) fVec3[i] = 0;
46 for (int32_t i=0; i<2; i++) fRec10[i] = 0;
47 for (int32_t i=0; i<2; i++) fRec29[i] = 0;
48 for (int32_t i=0; i<3; i++) fRec9[i] = 0;
49 for (int32_t i=0; i<2; i++) fRec8[i] = 0;
50 for (int32_t i=0; i<2; i++) fVec4[i] = 0;
51 for (int32_t i=0; i<2; i++) fRec6[i] = 0;
52 for (int32_t i=0; i<2; i++) fRec30[i] = 0;
53 for (int32_t i=0; i<3; i++) fRec5[i] = 0;
54 for (int32_t i=0; i<2; i++) fRec4[i] = 0;
55 for (int32_t i=0; i<2; i++) fVec5[i] = 0;
56 for (int32_t i=0; i<2; i++) fRec3[i] = 0;
57 for (int32_t i=0; i<2; i++) fRec31[i] = 0;
58 for (int32_t i=0; i<3; i++) fRec2[i] = 0;
59 for (int32_t i=0; i<2; i++) fRec1[i] = 0;
60 }
61
62 inline void GxAmpMono::init(uint32_t samplingFreq)
63 {
64
65 fSamplingFreq = samplingFreq;
66 fslider0 = 0;
67 iConst0 = min(192000, max(1, fSamplingFreq));
68 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
69 fConst2 = (1 + fConst1);
70 fConst3 = (0 - ((1 - fConst1) / fConst2));
71 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
72 fConst5 = (1 + fConst4);
73 fConst6 = (0 - ((1 - fConst4) / fConst5));
74 fConst7 = tan((942.4777960769379 / iConst0));
75 fConst8 = (1.0 / faustpower<2>(fConst7));
76 fConst9 = (2 * (1 - fConst8));
77 fConst10 = (1.0 / fConst7);
78 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
79 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
80 fConst13 = tan((3769.9111843077517 / iConst0));
81 fConst14 = (1.0 / faustpower<2>(fConst13));
82 fConst15 = (2 * (1 - fConst14));
83 fConst16 = (1.0 / fConst13);
84 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
85 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
86 fConst19 = (1.0 / fConst18);
87 fConst20 = (1 + fConst16);
88 fConst21 = (0 - ((1 - fConst16) / fConst20));
89 fConst22 = tan((10053.096491487338 / iConst0));
90 fConst23 = (1.0 / faustpower<2>(fConst22));
91 fConst24 = (2 * (1 - fConst23));
92 fConst25 = (1.0 / fConst22);
93 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
94 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
95 fConst28 = (1.0 / fConst27);
96 fConst29 = (1 + fConst25);
97 fConst30 = (0 - ((1 - fConst25) / fConst29));
98 fConst31 = tan((47123.8898038469 / iConst0));
99 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
100 fConst33 = (1.0 / fConst31);
101 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
102 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
103 fConst36 = (1.0 / fConst35);
104 fConst37 = (0 - fConst1);
105 fConst38 = (1.0 / (fConst2 * fConst35));
106 fConst39 = (1.0 / fConst29);
107 fConst40 = (0 - fConst16);
108 fConst41 = (1.0 / (fConst20 * fConst27));
109 fConst42 = (2 * (0 - fConst14));
110 fConst43 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
111 fConst44 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
112 fConst45 = (1 + fConst10);
113 fConst46 = (0 - ((1 - fConst10) / fConst45));
114 fConst47 = (0 - fConst10);
115 fConst48 = (1.0 / (fConst45 * fConst18));
116 fConst49 = (2 * (0 - fConst8));
117 fConst50 = (1 + ((fConst16 - 1.0) / fConst13));
118 fConst51 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
119 fConst52 = (0 - fConst25);
120 fConst53 = (2 * (0 - fConst23));
121 fConst54 = (1.0 / fConst5);
122 fConst55 = (1.0 / tan((270.1769682087222 / iConst0)));
123 fConst56 = (1 + fConst55);
124 fConst57 = (0 - ((1 - fConst55) / fConst56));
125 fConst58 = (0.027 / fConst56);
126 fConst59 = (0.025 / fConst2);
127 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
128 fConst61 = (1 + fConst60);
129 fConst62 = (0 - ((1 - fConst60) / fConst61));
130 fConst63 = (0.015 / fConst61);
131 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
132 fConst65 = (1 + fConst64);
133 fConst66 = (0 - ((1 - fConst64) / fConst65));
134 fConst67 = (0.0082 / fConst65);
135 clear_state_f();
136 }
137
138 void GxAmpMono::connect(uint32_t port,void* data)
139 {
140 switch ((PortIndex)port)
141 {
142 case AMP_MASTERGAIN:
143 fslider0_ = (float*)data;
144 break;
145 case AMP_PREGAIN:
146 fslider1_ = (float*)data;
147 break;
148 case AMP_WET_DRY:
149 fslider2_ = (float*)data;
150 break;
151 case AMP_DRIVE:
152 fslider3_ = (float*)data;
153 break;
154 default:
155 break;
156 }
157 }
158
159 void GxAmpMono::run_12ax7(uint32_t n_samples, float* input, float* output)
160 {
161 fslider0 = (*fslider0_);
162 fslider1 = (*fslider1_);
163 fslider2 = (*fslider2_);
164 fslider3 = (*fslider3_);
165 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
166 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
167 double fSlow2 = (1.000000000000001e-05 * fslider2);
168 double fSlow3 = fslider3;
169 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
170 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
171 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
172 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
173 double fSlow8 = (2 * (fSlow3 - 0.5));
174 double fSlow9 = (1 - max(0, (0 - fSlow8)));
175 double fSlow10 = (1.25 * fSlow3);
176 double fSlow11 = (1 - max(0, fSlow8));
177 for (uint32_t i=0; i<n_samples; i++)
178 {
179 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
180 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
181 double fTemp0 = (fConst9 * fRec11[1]);
182 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
183 double fTemp1 = (double)input[i];
184 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
185 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
186 fVec0[0] = fTemp2;
187 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
188 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
189 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
190 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
191 fVec1[0] = fTemp3;
192 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
193 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
194 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
195 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
196 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
197 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
198 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
199 fVec2[0] = fTemp5;
200 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
201 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
202 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
203 double fTemp7 = (fConst9 * fRec23[1]);
204 double fTemp8 = (fConst15 * fRec24[1]);
205 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
206 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
207 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
208 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
209 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
210 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
211 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
212 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
213 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
214 fVec3[0] = fTemp11;
215 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
216 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
217 double fTemp12 = (1 - fRec18[0]);
218 fRec9[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fTemp1 * ((fSlow11 * fRec18[0]) + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 1.581656)) - 191.42014814814814);
219 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
220 double fTemp13 = (fRec8[0] * fRec7[0]);
221 fVec4[0] = fTemp13;
222 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
223 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
224 fRec5[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec30[0] + fRec6[0]) - 1.204285)) - 169.71433333333334);
225 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
226 double fTemp14 = (fRec7[0] * fRec4[0]);
227 fVec5[0] = fTemp14;
228 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
229 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
230 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec31[0] + fRec3[0]) - 0.840703)) - 147.47524390243905);
231 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
232 output[i] = (float)(fRec1[0] * fRec0[0]);
233 // post processing
234 fRec1[1] = fRec1[0];
235 fRec2[2] = fRec2[1];
236 fRec2[1] = fRec2[0];
237 fRec31[1] = fRec31[0];
238 fRec3[1] = fRec3[0];
239 fVec5[1] = fVec5[0];
240 fRec4[1] = fRec4[0];
241 fRec5[2] = fRec5[1];
242 fRec5[1] = fRec5[0];
243 fRec30[1] = fRec30[0];
244 fRec6[1] = fRec6[0];
245 fVec4[1] = fVec4[0];
246 fRec8[1] = fRec8[0];
247 fRec9[2] = fRec9[1];
248 fRec9[1] = fRec9[0];
249 fRec29[1] = fRec29[0];
250 fRec10[1] = fRec10[0];
251 fVec3[1] = fVec3[0];
252 fRec27[2] = fRec27[1];
253 fRec27[1] = fRec27[0];
254 fRec28[1] = fRec28[0];
255 fRec23[2] = fRec23[1];
256 fRec23[1] = fRec23[0];
257 fRec24[2] = fRec24[1];
258 fRec24[1] = fRec24[0];
259 fRec25[2] = fRec25[1];
260 fRec25[1] = fRec25[0];
261 fRec26[1] = fRec26[0];
262 fRec19[2] = fRec19[1];
263 fRec19[1] = fRec19[0];
264 fRec20[1] = fRec20[0];
265 fVec2[1] = fVec2[0];
266 fRec21[2] = fRec21[1];
267 fRec21[1] = fRec21[0];
268 fRec22[1] = fRec22[0];
269 fRec11[2] = fRec11[1];
270 fRec11[1] = fRec11[0];
271 fRec12[2] = fRec12[1];
272 fRec12[1] = fRec12[0];
273 fRec13[1] = fRec13[0];
274 fVec1[1] = fVec1[0];
275 fRec14[2] = fRec14[1];
276 fRec14[1] = fRec14[0];
277 fRec15[1] = fRec15[0];
278 fRec16[1] = fRec16[0];
279 fVec0[1] = fVec0[0];
280 fRec17[2] = fRec17[1];
281 fRec17[1] = fRec17[0];
282 fRec18[1] = fRec18[0];
283 fRec7[1] = fRec7[0];
284 fRec0[1] = fRec0[0];
285 }
286 }
287
288 void GxAmpMono::run_12AT7(uint32_t n_samples, float* input, float* output)
289 {
290 fslider0 = (*fslider0_);
291 fslider1 = (*fslider1_);
292 fslider2 = (*fslider2_);
293 fslider3 = (*fslider3_);
294 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
295 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
296 double fSlow2 = (1.000000000000001e-05 * fslider2);
297 double fSlow3 = fslider3;
298 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
299 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
300 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
301 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
302 double fSlow8 = (2 * (fSlow3 - 0.5));
303 double fSlow9 = (1 - max(0, (0 - fSlow8)));
304 double fSlow10 = (1.25 * fSlow3);
305 double fSlow11 = (1 - max(0, fSlow8));
306 for (uint32_t i=0; i<n_samples; i++)
307 {
308 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
309 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
310 double fTemp0 = (fConst9 * fRec11[1]);
311 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
312 double fTemp1 = (double)input[i];
313 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
314 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
315 fVec0[0] = fTemp2;
316 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
317 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
318 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
319 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
320 fVec1[0] = fTemp3;
321 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
322 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
323 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
324 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
325 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
326 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
327 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
328 fVec2[0] = fTemp5;
329 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
330 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
331 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
332 double fTemp7 = (fConst9 * fRec23[1]);
333 double fTemp8 = (fConst15 * fRec24[1]);
334 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
335 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
336 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
337 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
338 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
339 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
340 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
341 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
342 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
343 fVec3[0] = fTemp11;
344 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
345 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
346 double fTemp12 = (1 - fRec18[0]);
347 fRec9[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fTemp1 * ((fSlow11 * fRec18[0]) + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 2.617753)) - 153.04618518518518);
348 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
349 double fTemp13 = (fRec8[0] * fRec7[0]);
350 fVec4[0] = fTemp13;
351 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
352 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
353 fRec5[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec30[0] + fRec6[0]) - 1.887332)) - 124.17786666666666);
354 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
355 double fTemp14 = (fRec7[0] * fRec4[0]);
356 fVec5[0] = fTemp14;
357 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
358 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
359 fRec2[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec31[0] + fRec3[0]) - 1.256962)) - 96.7119512195122);
360 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
361 output[i] = (float)(fRec1[0] * fRec0[0]);
362 // post processing
363 fRec1[1] = fRec1[0];
364 fRec2[2] = fRec2[1];
365 fRec2[1] = fRec2[0];
366 fRec31[1] = fRec31[0];
367 fRec3[1] = fRec3[0];
368 fVec5[1] = fVec5[0];
369 fRec4[1] = fRec4[0];
370 fRec5[2] = fRec5[1];
371 fRec5[1] = fRec5[0];
372 fRec30[1] = fRec30[0];
373 fRec6[1] = fRec6[0];
374 fVec4[1] = fVec4[0];
375 fRec8[1] = fRec8[0];
376 fRec9[2] = fRec9[1];
377 fRec9[1] = fRec9[0];
378 fRec29[1] = fRec29[0];
379 fRec10[1] = fRec10[0];
380 fVec3[1] = fVec3[0];
381 fRec27[2] = fRec27[1];
382 fRec27[1] = fRec27[0];
383 fRec28[1] = fRec28[0];
384 fRec23[2] = fRec23[1];
385 fRec23[1] = fRec23[0];
386 fRec24[2] = fRec24[1];
387 fRec24[1] = fRec24[0];
388 fRec25[2] = fRec25[1];
389 fRec25[1] = fRec25[0];
390 fRec26[1] = fRec26[0];
391 fRec19[2] = fRec19[1];
392 fRec19[1] = fRec19[0];
393 fRec20[1] = fRec20[0];
394 fVec2[1] = fVec2[0];
395 fRec21[2] = fRec21[1];
396 fRec21[1] = fRec21[0];
397 fRec22[1] = fRec22[0];
398 fRec11[2] = fRec11[1];
399 fRec11[1] = fRec11[0];
400 fRec12[2] = fRec12[1];
401 fRec12[1] = fRec12[0];
402 fRec13[1] = fRec13[0];
403 fVec1[1] = fVec1[0];
404 fRec14[2] = fRec14[1];
405 fRec14[1] = fRec14[0];
406 fRec15[1] = fRec15[0];
407 fRec16[1] = fRec16[0];
408 fVec0[1] = fVec0[0];
409 fRec17[2] = fRec17[1];
410 fRec17[1] = fRec17[0];
411 fRec18[1] = fRec18[0];
412 fRec7[1] = fRec7[0];
413 fRec0[1] = fRec0[0];
414 }
415 }
416
417 void GxAmpMono::run_6C16(uint32_t n_samples, float* input, float* output)
418 {
419 fslider0 = (*fslider0_);
420 fslider1 = (*fslider1_);
421 fslider2 = (*fslider2_);
422 fslider3 = (*fslider3_);
423 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
424 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
425 double fSlow2 = (1.000000000000001e-05 * fslider2);
426 double fSlow3 = fslider3;
427 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
428 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
429 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
430 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
431 double fSlow8 = (2 * (fSlow3 - 0.5));
432 double fSlow9 = (1 - max(0, (0 - fSlow8)));
433 double fSlow10 = (1.25 * fSlow3);
434 double fSlow11 = (1 - max(0, fSlow8));
435 for (uint32_t i=0; i<n_samples; i++)
436 {
437 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
438 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
439 double fTemp0 = (fConst9 * fRec11[1]);
440 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
441 double fTemp1 = (double)input[i];
442 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
443 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
444 fVec0[0] = fTemp2;
445 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
446 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
447 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
448 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
449 fVec1[0] = fTemp3;
450 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
451 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
452 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
453 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
454 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
455 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
456 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
457 fVec2[0] = fTemp5;
458 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
459 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
460 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
461 double fTemp7 = (fConst9 * fRec23[1]);
462 double fTemp8 = (fConst15 * fRec24[1]);
463 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
464 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
465 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
466 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
467 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
468 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
469 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
470 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
471 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
472 fVec3[0] = fTemp11;
473 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
474 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
475 double fTemp12 = (1 - fRec18[0]);
476 fRec9[0] = (Ftube(TUBE_TABLE_6C16_68k, (((fTemp1 * ((fSlow11 * fRec18[0]) + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 2.921806)) - 141.78496296296294);
477 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
478 double fTemp13 = (fRec8[0] * fRec7[0]);
479 fVec4[0] = fTemp13;
480 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
481 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
482 fRec5[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec30[0] + fRec6[0]) - 2.097743)) - 110.15046666666666);
483 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
484 double fTemp14 = (fRec7[0] * fRec4[0]);
485 fVec5[0] = fTemp14;
486 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
487 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
488 fRec2[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec31[0] + fRec3[0]) - 1.378742)) - 81.86073170731709);
489 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
490 output[i] = (float)(fRec1[0] * fRec0[0]);
491 // post processing
492 fRec1[1] = fRec1[0];
493 fRec2[2] = fRec2[1];
494 fRec2[1] = fRec2[0];
495 fRec31[1] = fRec31[0];
496 fRec3[1] = fRec3[0];
497 fVec5[1] = fVec5[0];
498 fRec4[1] = fRec4[0];
499 fRec5[2] = fRec5[1];
500 fRec5[1] = fRec5[0];
501 fRec30[1] = fRec30[0];
502 fRec6[1] = fRec6[0];
503 fVec4[1] = fVec4[0];
504 fRec8[1] = fRec8[0];
505 fRec9[2] = fRec9[1];
506 fRec9[1] = fRec9[0];
507 fRec29[1] = fRec29[0];
508 fRec10[1] = fRec10[0];
509 fVec3[1] = fVec3[0];
510 fRec27[2] = fRec27[1];
511 fRec27[1] = fRec27[0];
512 fRec28[1] = fRec28[0];
513 fRec23[2] = fRec23[1];
514 fRec23[1] = fRec23[0];
515 fRec24[2] = fRec24[1];
516 fRec24[1] = fRec24[0];
517 fRec25[2] = fRec25[1];
518 fRec25[1] = fRec25[0];
519 fRec26[1] = fRec26[0];
520 fRec19[2] = fRec19[1];
521 fRec19[1] = fRec19[0];
522 fRec20[1] = fRec20[0];
523 fVec2[1] = fVec2[0];
524 fRec21[2] = fRec21[1];
525 fRec21[1] = fRec21[0];
526 fRec22[1] = fRec22[0];
527 fRec11[2] = fRec11[1];
528 fRec11[1] = fRec11[0];
529 fRec12[2] = fRec12[1];
530 fRec12[1] = fRec12[0];
531 fRec13[1] = fRec13[0];
532 fVec1[1] = fVec1[0];
533 fRec14[2] = fRec14[1];
534 fRec14[1] = fRec14[0];
535 fRec15[1] = fRec15[0];
536 fRec16[1] = fRec16[0];
537 fVec0[1] = fVec0[0];
538 fRec17[2] = fRec17[1];
539 fRec17[1] = fRec17[0];
540 fRec18[1] = fRec18[0];
541 fRec7[1] = fRec7[0];
542 fRec0[1] = fRec0[0];
543 }
544 }
545
546 void GxAmpMono::run_6V6(uint32_t n_samples, float* input, float* output)
547 {
548 fslider0 = (*fslider0_);
549 fslider1 = (*fslider1_);
550 fslider2 = (*fslider2_);
551 fslider3 = (*fslider3_);
552 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
553 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
554 double fSlow2 = (1.000000000000001e-05 * fslider2);
555 double fSlow3 = fslider3;
556 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
557 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
558 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
559 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
560 double fSlow8 = (2 * (fSlow3 - 0.5));
561 double fSlow9 = (1 - max(0, (0 - fSlow8)));
562 double fSlow10 = (1.25 * fSlow3);
563 double fSlow11 = (1 - max(0, fSlow8));
564 for (uint32_t i=0; i<n_samples; i++)
565 {
566 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
567 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
568 double fTemp0 = (fConst9 * fRec11[1]);
569 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
570 double fTemp1 = (double)input[i];
571 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
572 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
573 fVec0[0] = fTemp2;
574 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
575 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
576 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
577 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
578 fVec1[0] = fTemp3;
579 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
580 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
581 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
582 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
583 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
584 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
585 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
586 fVec2[0] = fTemp5;
587 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
588 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
589 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
590 double fTemp7 = (fConst9 * fRec23[1]);
591 double fTemp8 = (fConst15 * fRec24[1]);
592 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
593 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
594 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
595 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
596 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
597 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
598 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
599 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
600 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
601 fVec3[0] = fTemp11;
602 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
603 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
604 double fTemp12 = (1 - fRec18[0]);
605 fRec9[0] = (Ftube(TUBE_TABLE_6V6_68k, (((fTemp1 * ((fSlow11 * fRec18[0]) + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 2.29615)) - 164.9574074074074);
606 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
607 double fTemp13 = (fRec8[0] * fRec7[0]);
608 fVec4[0] = fTemp13;
609 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
610 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
611 fRec5[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec30[0] + fRec6[0]) - 1.675587)) - 138.2942);
612 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
613 double fTemp14 = (fRec7[0] * fRec4[0]);
614 fVec5[0] = fTemp14;
615 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
616 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
617 fRec2[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec31[0] + fRec3[0]) - 1.130462)) - 112.13878048780487);
618 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
619 output[i] = (float)(fRec1[0] * fRec0[0]);
620 // post processing
621 fRec1[1] = fRec1[0];
622 fRec2[2] = fRec2[1];
623 fRec2[1] = fRec2[0];
624 fRec31[1] = fRec31[0];
625 fRec3[1] = fRec3[0];
626 fVec5[1] = fVec5[0];
627 fRec4[1] = fRec4[0];
628 fRec5[2] = fRec5[1];
629 fRec5[1] = fRec5[0];
630 fRec30[1] = fRec30[0];
631 fRec6[1] = fRec6[0];
632 fVec4[1] = fVec4[0];
633 fRec8[1] = fRec8[0];
634 fRec9[2] = fRec9[1];
635 fRec9[1] = fRec9[0];
636 fRec29[1] = fRec29[0];
637 fRec10[1] = fRec10[0];
638 fVec3[1] = fVec3[0];
639 fRec27[2] = fRec27[1];
640 fRec27[1] = fRec27[0];
641 fRec28[1] = fRec28[0];
642 fRec23[2] = fRec23[1];
643 fRec23[1] = fRec23[0];
644 fRec24[2] = fRec24[1];
645 fRec24[1] = fRec24[0];
646 fRec25[2] = fRec25[1];
647 fRec25[1] = fRec25[0];
648 fRec26[1] = fRec26[0];
649 fRec19[2] = fRec19[1];
650 fRec19[1] = fRec19[0];
651 fRec20[1] = fRec20[0];
652 fVec2[1] = fVec2[0];
653 fRec21[2] = fRec21[1];
654 fRec21[1] = fRec21[0];
655 fRec22[1] = fRec22[0];
656 fRec11[2] = fRec11[1];
657 fRec11[1] = fRec11[0];
658 fRec12[2] = fRec12[1];
659 fRec12[1] = fRec12[0];
660 fRec13[1] = fRec13[0];
661 fVec1[1] = fVec1[0];
662 fRec14[2] = fRec14[1];
663 fRec14[1] = fRec14[0];
664 fRec15[1] = fRec15[0];
665 fRec16[1] = fRec16[0];
666 fVec0[1] = fVec0[0];
667 fRec17[2] = fRec17[1];
668 fRec17[1] = fRec17[0];
669 fRec18[1] = fRec18[0];
670 fRec7[1] = fRec7[0];
671 fRec0[1] = fRec0[0];
672 }
673 }
674
675
676 void GxAmpMono::run_6DJ8(uint32_t n_samples, float* input, float* output)
677 {
678 fslider0 = (*fslider0_);
679 fslider1 = (*fslider1_);
680 fslider2 = (*fslider2_);
681 fslider3 = (*fslider3_);
682 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
683 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
684 double fSlow2 = (1.000000000000001e-05 * fslider2);
685 double fSlow3 = fslider3;
686 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
687 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
688 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
689 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
690 double fSlow8 = (2 * (fSlow3 - 0.5));
691 double fSlow9 = (1 - max(0, (0 - fSlow8)));
692 double fSlow10 = (1.25 * fSlow3);
693 double fSlow11 = (1 - max(0, fSlow8));
694 for (uint32_t i=0; i<n_samples; i++)
695 {
696 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
697 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
698 double fTemp0 = (fConst9 * fRec11[1]);
699 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
700 double fTemp1 = (double)input[i];
701 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
702 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
703 fVec0[0] = fTemp2;
704 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
705 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
706 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
707 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
708 fVec1[0] = fTemp3;
709 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
710 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
711 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
712 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
713 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
714 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
715 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
716 fVec2[0] = fTemp5;
717 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
718 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
719 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
720 double fTemp7 = (fConst9 * fRec23[1]);
721 double fTemp8 = (fConst15 * fRec24[1]);
722 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
723 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
724 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
725 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
726 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
727 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
728 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
729 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
730 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
731 fVec3[0] = fTemp11;
732 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
733 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
734 double fTemp12 = (1 - fRec18[0]);
735 fRec9[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fTemp1 * ((fSlow11 * fRec18[0]) + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 1.863946)) - 60.96496296296296);
736 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
737 double fTemp13 = (fRec8[0] * fRec7[0]);
738 fVec4[0] = fTemp13;
739 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
740 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
741 fRec5[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec30[0] + fRec6[0]) - 1.271609)) - 45.22606666666667);
742 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
743 double fTemp14 = (fRec7[0] * fRec4[0]);
744 fVec5[0] = fTemp14;
745 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
746 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
747 fRec2[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec31[0] + fRec3[0]) - 0.797043)) - 32.799634146341475);
748 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
749 output[i] = (float)(fRec1[0] * fRec0[0]);
750 // post processing
751 fRec1[1] = fRec1[0];
752 fRec2[2] = fRec2[1];
753 fRec2[1] = fRec2[0];
754 fRec31[1] = fRec31[0];
755 fRec3[1] = fRec3[0];
756 fVec5[1] = fVec5[0];
757 fRec4[1] = fRec4[0];
758 fRec5[2] = fRec5[1];
759 fRec5[1] = fRec5[0];
760 fRec30[1] = fRec30[0];
761 fRec6[1] = fRec6[0];
762 fVec4[1] = fVec4[0];
763 fRec8[1] = fRec8[0];
764 fRec9[2] = fRec9[1];
765 fRec9[1] = fRec9[0];
766 fRec29[1] = fRec29[0];
767 fRec10[1] = fRec10[0];
768 fVec3[1] = fVec3[0];
769 fRec27[2] = fRec27[1];
770 fRec27[1] = fRec27[0];
771 fRec28[1] = fRec28[0];
772 fRec23[2] = fRec23[1];
773 fRec23[1] = fRec23[0];
774 fRec24[2] = fRec24[1];
775 fRec24[1] = fRec24[0];
776 fRec25[2] = fRec25[1];
777 fRec25[1] = fRec25[0];
778 fRec26[1] = fRec26[0];
779 fRec19[2] = fRec19[1];
780 fRec19[1] = fRec19[0];
781 fRec20[1] = fRec20[0];
782 fVec2[1] = fVec2[0];
783 fRec21[2] = fRec21[1];
784 fRec21[1] = fRec21[0];
785 fRec22[1] = fRec22[0];
786 fRec11[2] = fRec11[1];
787 fRec11[1] = fRec11[0];
788 fRec12[2] = fRec12[1];
789 fRec12[1] = fRec12[0];
790 fRec13[1] = fRec13[0];
791 fVec1[1] = fVec1[0];
792 fRec14[2] = fRec14[1];
793 fRec14[1] = fRec14[0];
794 fRec15[1] = fRec15[0];
795 fRec16[1] = fRec16[0];
796 fVec0[1] = fVec0[0];
797 fRec17[2] = fRec17[1];
798 fRec17[1] = fRec17[0];
799 fRec18[1] = fRec18[0];
800 fRec7[1] = fRec7[0];
801 fRec0[1] = fRec0[0];
802 }
803 }
804
805
806 // static wrappers
807 void GxAmpMono::init_static(uint32_t samplingFreq, GxAmpMono *p)
808 {
809 p->init(samplingFreq);
810 }
811
812 void GxAmpMono::connect_static(uint32_t port,void* data, GxAmpMono *p)
813 {
814 p->connect(port, data);
815 }
816
817
818 /////////////////////////////// STEREO /////////////////////////////////
819
820
821 inline void GxAmpStereo::clear_state_f()
822 {
823 for (int32_t i=0; i<2; i++) fRec0[i] = 0;
824 for (int32_t i=0; i<2; i++) fRec7[i] = 0;
825 for (int32_t i=0; i<2; i++) fRec18[i] = 0;
826 for (int32_t i=0; i<3; i++) fRec17[i] = 0;
827 for (int32_t i=0; i<2; i++) fVec0[i] = 0;
828 for (int32_t i=0; i<2; i++) fRec16[i] = 0;
829 for (int32_t i=0; i<2; i++) fRec15[i] = 0;
830 for (int32_t i=0; i<3; i++) fRec14[i] = 0;
831 for (int32_t i=0; i<2; i++) fVec1[i] = 0;
832 for (int32_t i=0; i<2; i++) fRec13[i] = 0;
833 for (int32_t i=0; i<3; i++) fRec12[i] = 0;
834 for (int32_t i=0; i<3; i++) fRec11[i] = 0;
835 for (int32_t i=0; i<2; i++) fRec22[i] = 0;
836 for (int32_t i=0; i<3; i++) fRec21[i] = 0;
837 for (int32_t i=0; i<2; i++) fVec2[i] = 0;
838 for (int32_t i=0; i<2; i++) fRec20[i] = 0;
839 for (int32_t i=0; i<3; i++) fRec19[i] = 0;
840 for (int32_t i=0; i<2; i++) fRec26[i] = 0;
841 for (int32_t i=0; i<3; i++) fRec25[i] = 0;
842 for (int32_t i=0; i<3; i++) fRec24[i] = 0;
843 for (int32_t i=0; i<3; i++) fRec23[i] = 0;
844 for (int32_t i=0; i<2; i++) fRec28[i] = 0;
845 for (int32_t i=0; i<3; i++) fRec27[i] = 0;
846 for (int32_t i=0; i<2; i++) fVec3[i] = 0;
847 for (int32_t i=0; i<2; i++) fRec10[i] = 0;
848 for (int32_t i=0; i<2; i++) fRec29[i] = 0;
849 for (int32_t i=0; i<3; i++) fRec9[i] = 0;
850 for (int32_t i=0; i<2; i++) fRec8[i] = 0;
851 for (int32_t i=0; i<2; i++) fVec4[i] = 0;
852 for (int32_t i=0; i<2; i++) fRec6[i] = 0;
853 for (int32_t i=0; i<2; i++) fRec30[i] = 0;
854 for (int32_t i=0; i<3; i++) fRec5[i] = 0;
855 for (int32_t i=0; i<2; i++) fRec4[i] = 0;
856 for (int32_t i=0; i<2; i++) fVec5[i] = 0;
857 for (int32_t i=0; i<2; i++) fRec3[i] = 0;
858 for (int32_t i=0; i<2; i++) fRec31[i] = 0;
859 for (int32_t i=0; i<3; i++) fRec2[i] = 0;
860 for (int32_t i=0; i<2; i++) fRec1[i] = 0;
861 for (int32_t i=0; i<3; i++) fRec47[i] = 0;
862 for (int32_t i=0; i<2; i++) fVec6[i] = 0;
863 for (int32_t i=0; i<2; i++) fRec46[i] = 0;
864 for (int32_t i=0; i<2; i++) fRec45[i] = 0;
865 for (int32_t i=0; i<3; i++) fRec44[i] = 0;
866 for (int32_t i=0; i<2; i++) fVec7[i] = 0;
867 for (int32_t i=0; i<2; i++) fRec43[i] = 0;
868 for (int32_t i=0; i<3; i++) fRec42[i] = 0;
869 for (int32_t i=0; i<3; i++) fRec41[i] = 0;
870 for (int32_t i=0; i<2; i++) fRec51[i] = 0;
871 for (int32_t i=0; i<3; i++) fRec50[i] = 0;
872 for (int32_t i=0; i<2; i++) fVec8[i] = 0;
873 for (int32_t i=0; i<2; i++) fRec49[i] = 0;
874 for (int32_t i=0; i<3; i++) fRec48[i] = 0;
875 for (int32_t i=0; i<2; i++) fRec55[i] = 0;
876 for (int32_t i=0; i<3; i++) fRec54[i] = 0;
877 for (int32_t i=0; i<3; i++) fRec53[i] = 0;
878 for (int32_t i=0; i<3; i++) fRec52[i] = 0;
879 for (int32_t i=0; i<2; i++) fRec57[i] = 0;
880 for (int32_t i=0; i<3; i++) fRec56[i] = 0;
881 for (int32_t i=0; i<2; i++) fVec9[i] = 0;
882 for (int32_t i=0; i<2; i++) fRec40[i] = 0;
883 for (int32_t i=0; i<2; i++) fRec58[i] = 0;
884 for (int32_t i=0; i<3; i++) fRec39[i] = 0;
885 for (int32_t i=0; i<2; i++) fRec38[i] = 0;
886 for (int32_t i=0; i<2; i++) fVec10[i] = 0;
887 for (int32_t i=0; i<2; i++) fRec37[i] = 0;
888 for (int32_t i=0; i<2; i++) fRec59[i] = 0;
889 for (int32_t i=0; i<3; i++) fRec36[i] = 0;
890 for (int32_t i=0; i<2; i++) fRec35[i] = 0;
891 for (int32_t i=0; i<2; i++) fVec11[i] = 0;
892 for (int32_t i=0; i<2; i++) fRec34[i] = 0;
893 for (int32_t i=0; i<2; i++) fRec60[i] = 0;
894 for (int32_t i=0; i<3; i++) fRec33[i] = 0;
895 for (int32_t i=0; i<2; i++) fRec32[i] = 0;
896 }
897
898
899 inline void GxAmpStereo::init(uint32_t samplingFreq)
900 {
901 fSamplingFreq = samplingFreq;
902 iConst0 = min(192000, max(1, fSamplingFreq));
903 fConst1 = (1.0 / tan((97.38937226128358 / iConst0)));
904 fConst2 = (1 + fConst1);
905 fConst3 = (0 - ((1 - fConst1) / fConst2));
906 fConst4 = (1.0 / tan((20517.741620594938 / iConst0)));
907 fConst5 = (1 + fConst4);
908 fConst6 = (0 - ((1 - fConst4) / fConst5));
909 fConst7 = tan((942.4777960769379 / iConst0));
910 fConst8 = (1.0 / faustpower<2>(fConst7));
911 fConst9 = (2 * (1 - fConst8));
912 fConst10 = (1.0 / fConst7);
913 fConst11 = (1 + ((fConst10 - 1.0) / fConst7));
914 fConst12 = (1.0 / (1 + ((1.0 + fConst10) / fConst7)));
915 fConst13 = tan((3769.9111843077517 / iConst0));
916 fConst14 = (1.0 / faustpower<2>(fConst13));
917 fConst15 = (2 * (1 - fConst14));
918 fConst16 = (1.0 / fConst13);
919 fConst17 = (1 + ((fConst16 - 1.0000000000000004) / fConst13));
920 fConst18 = (1 + ((fConst16 + 1.0000000000000004) / fConst13));
921 fConst19 = (1.0 / fConst18);
922 fConst20 = (1 + fConst16);
923 fConst21 = (0 - ((1 - fConst16) / fConst20));
924 fConst22 = tan((10053.096491487338 / iConst0));
925 fConst23 = (1.0 / faustpower<2>(fConst22));
926 fConst24 = (2 * (1 - fConst23));
927 fConst25 = (1.0 / fConst22);
928 fConst26 = (1 + ((fConst25 - 1.0000000000000004) / fConst22));
929 fConst27 = (1 + ((1.0000000000000004 + fConst25) / fConst22));
930 fConst28 = (1.0 / fConst27);
931 fConst29 = (1 + fConst25);
932 fConst30 = (0 - ((1 - fConst25) / fConst29));
933 fConst31 = tan((47123.8898038469 / iConst0));
934 fConst32 = (2 * (1 - (1.0 / faustpower<2>(fConst31))));
935 fConst33 = (1.0 / fConst31);
936 fConst34 = (1 + ((fConst33 - 1.414213562373095) / fConst31));
937 fConst35 = (1 + ((1.414213562373095 + fConst33) / fConst31));
938 fConst36 = (1.0 / fConst35);
939 fConst37 = (0 - fConst1);
940 fConst38 = (1.0 / (fConst2 * fConst35));
941 fConst39 = (1.0 / fConst29);
942 fConst40 = (0 - fConst16);
943 fConst41 = (1.0 / (fConst20 * fConst27));
944 fConst42 = (2 * (0 - fConst14));
945 fConst43 = (1 + ((fConst10 - 1.0000000000000004) / fConst7));
946 fConst44 = (1.0 / (1 + ((fConst10 + 1.0000000000000004) / fConst7)));
947 fConst45 = (1 + fConst10);
948 fConst46 = (0 - ((1 - fConst10) / fConst45));
949 fConst47 = (0 - fConst10);
950 fConst48 = (1.0 / (fConst45 * fConst18));
951 fConst49 = (2 * (0 - fConst8));
952 fConst50 = (1 + ((fConst16 - 1.0) / fConst13));
953 fConst51 = (1.0 / (1 + ((1.0 + fConst16) / fConst13)));
954 fConst52 = (0 - fConst25);
955 fConst53 = (2 * (0 - fConst23));
956 fConst54 = (1.0 / fConst5);
957 fConst55 = (1.0 / tan((270.1769682087222 / iConst0)));
958 fConst56 = (1 + fConst55);
959 fConst57 = (0 - ((1 - fConst55) / fConst56));
960 fConst58 = (0.027 / fConst56);
961 fConst59 = (0.025 / fConst2);
962 fConst60 = (1.0 / tan((414.6902302738527 / iConst0)));
963 fConst61 = (1 + fConst60);
964 fConst62 = (0 - ((1 - fConst60) / fConst61));
965 fConst63 = (0.015 / fConst61);
966 fConst64 = (1.0 / tan((609.4689747964198 / iConst0)));
967 fConst65 = (1 + fConst64);
968 fConst66 = (0 - ((1 - fConst64) / fConst65));
969 fConst67 = (0.0082 / fConst65);
970 clear_state_f();
971 }
972
973 void GxAmpStereo::connect(uint32_t port,void* data)
974 {
975 switch ((PortIndex)port)
976 {
977 case AMP_MASTERGAIN:
978 fslider0_ = (float*)data;
979 break;
980 case AMP_PREGAIN:
981 fslider1_ = (float*)data;
982 break;
983 case AMP_WET_DRY:
984 fslider2_ = (float*)data;
985 break;
986 case AMP_DRIVE:
987 fslider3_ = (float*)data;
988 break;
989 default:
990 break;
991 }
992 }
993
994 inline void GxAmpStereo::run_12ax7(uint32_t count, float *input0, float *input1, float *output0, float *output1)
995 {
996 fslider0 = (*fslider0_);
997 fslider1 = (*fslider1_);
998 fslider2 = (*fslider2_);
999 fslider3 = (*fslider3_);
1000 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
1001 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
1002 double fSlow2 = (1.000000000000001e-05 * fslider2);
1003 double fSlow3 = fslider3;
1004 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
1005 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
1006 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
1007 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
1008 double fSlow8 = (2 * (fSlow3 - 0.5));
1009 double fSlow9 = (1 - max(0, (0 - fSlow8)));
1010 double fSlow10 = (1.25 * fSlow3);
1011 double fSlow11 = (1 - max(0, fSlow8));
1012 for (uint32_t i=0; i<count; i++)
1013 {
1014 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
1015 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
1016 double fTemp0 = (fConst9 * fRec11[1]);
1017 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
1018 double fTemp1 = (double)input0[i];
1019 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
1020 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
1021 fVec0[0] = fTemp2;
1022 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
1023 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
1024 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
1025 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
1026 fVec1[0] = fTemp3;
1027 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
1028 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
1029 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
1030 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
1031 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
1032 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
1033 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
1034 fVec2[0] = fTemp5;
1035 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
1036 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
1037 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
1038 double fTemp7 = (fConst9 * fRec23[1]);
1039 double fTemp8 = (fConst15 * fRec24[1]);
1040 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
1041 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
1042 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
1043 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
1044 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
1045 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
1046 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
1047 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
1048 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
1049 fVec3[0] = fTemp11;
1050 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
1051 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
1052 double fTemp12 = (1 - fRec18[0]);
1053 double fTemp13 = (fSlow11 * fRec18[0]);
1054 fRec9[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fTemp1 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 1.581656)) - 191.42014814814814);
1055 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
1056 double fTemp14 = (fRec8[0] * fRec7[0]);
1057 fVec4[0] = fTemp14;
1058 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
1059 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
1060 fRec5[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec30[0] + fRec6[0]) - 1.204285)) - 169.71433333333334);
1061 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
1062 double fTemp15 = (fRec7[0] * fRec4[0]);
1063 fVec5[0] = fTemp15;
1064 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
1065 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
1066 fRec2[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec31[0] + fRec3[0]) - 0.840703)) - 147.47524390243905);
1067 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
1068 output0[i] = (float)(fRec1[0] * fRec0[0]);
1069 double fTemp16 = (fConst9 * fRec41[1]);
1070 double fTemp17 = (double)input1[i];
1071 fRec47[0] = ((fTemp17 * fRec18[0]) - (fConst36 * ((fConst34 * fRec47[2]) + (fConst32 * fRec47[1]))));
1072 double fTemp18 = (fRec47[2] + (fRec47[0] + (2 * fRec47[1])));
1073 fVec6[0] = fTemp18;
1074 fRec46[0] = ((fConst38 * ((fConst37 * fVec6[1]) + (fConst1 * fVec6[0]))) + (fConst3 * fRec46[1]));
1075 fRec45[0] = ((fConst39 * (fRec46[0] + fRec46[1])) + (fConst30 * fRec45[1]));
1076 fRec44[0] = (fRec45[0] - (fConst28 * ((fConst26 * fRec44[2]) + (fConst24 * fRec44[1]))));
1077 double fTemp19 = (fRec44[2] + (fRec44[0] + (2 * fRec44[1])));
1078 fVec7[0] = fTemp19;
1079 fRec43[0] = ((fConst41 * ((fConst40 * fVec7[1]) + (fConst16 * fVec7[0]))) + (fConst21 * fRec43[1]));
1080 fRec42[0] = (fRec43[0] - (fConst19 * ((fConst17 * fRec42[2]) + (fConst15 * fRec42[1]))));
1081 fRec41[0] = ((fConst19 * (((fConst14 * fRec42[0]) + (fConst42 * fRec42[1])) + (fConst14 * fRec42[2]))) - (fConst12 * ((fConst11 * fRec41[2]) + fTemp16)));
1082 double fTemp20 = max(-1, min(1, (fSlow4 * (fRec41[2] + (fConst12 * (fTemp16 + (fConst11 * fRec41[0])))))));
1083 fRec51[0] = ((fConst41 * (fVec7[0] + fVec7[1])) + (fConst21 * fRec51[1]));
1084 fRec50[0] = (fRec51[0] - (fConst19 * ((fConst17 * fRec50[2]) + (fConst15 * fRec50[1]))));
1085 double fTemp21 = (fRec50[2] + (fRec50[0] + (2 * fRec50[1])));
1086 fVec8[0] = fTemp21;
1087 fRec49[0] = ((fConst48 * ((fConst47 * fVec8[1]) + (fConst10 * fVec8[0]))) + (fConst46 * fRec49[1]));
1088 fRec48[0] = (fRec49[0] - (fConst44 * ((fConst43 * fRec48[2]) + (fConst9 * fRec48[1]))));
1089 double fTemp22 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec48[0]) + (fConst49 * fRec48[1])) + (fConst8 * fRec48[2])))));
1090 double fTemp23 = (fConst9 * fRec52[1]);
1091 double fTemp24 = (fConst15 * fRec53[1]);
1092 fRec55[0] = ((fConst39 * ((fConst52 * fRec46[1]) + (fConst25 * fRec46[0]))) + (fConst30 * fRec55[1]));
1093 fRec54[0] = (fRec55[0] - (fConst28 * ((fConst26 * fRec54[2]) + (fConst24 * fRec54[1]))));
1094 fRec53[0] = ((fConst28 * (((fConst23 * fRec54[0]) + (fConst53 * fRec54[1])) + (fConst23 * fRec54[2]))) - (fConst51 * ((fConst50 * fRec53[2]) + fTemp24)));
1095 fRec52[0] = ((fRec53[2] + (fConst51 * (fTemp24 + (fConst50 * fRec53[0])))) - (fConst12 * ((fConst11 * fRec52[2]) + fTemp23)));
1096 double fTemp25 = max(-1, min(1, (fSlow6 * (fRec52[2] + (fConst12 * (fTemp23 + (fConst11 * fRec52[0])))))));
1097 fRec57[0] = ((fConst48 * (fVec8[0] + fVec8[1])) + (fConst46 * fRec57[1]));
1098 fRec56[0] = (fRec57[0] - (fConst44 * ((fConst43 * fRec56[2]) + (fConst9 * fRec56[1]))));
1099 double fTemp26 = max(-1, min(1, (fSlow7 * (fRec56[2] + (fRec56[0] + (2 * fRec56[1]))))));
1100 double fTemp27 = ((1.2589412 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (1.584893192 * ((fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))) + ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + (0.8413951417869425 * (fTemp20 * (1 - (0.3333333333333333 * faustpower<2>(fTemp20)))))))));
1101 fVec9[0] = fTemp27;
1102 fRec40[0] = ((fConst54 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec40[1]));
1103 fRec58[0] = ((fConst58 * (fRec39[1] + fRec39[2])) + (fConst57 * fRec58[1]));
1104 fRec39[0] = (Ftube(TUBE_TABLE_12AX7_68k, (((fTemp17 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp17 * fTemp12)))) - 1)))))) + (fRec58[0] + (fSlow9 * fRec40[0]))) - 1.581656)) - 191.42014814814814);
1105 fRec38[0] = ((fConst59 * ((fConst37 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
1106 double fTemp28 = (fRec7[0] * fRec38[0]);
1107 fVec10[0] = fTemp28;
1108 fRec37[0] = ((fConst54 * (fVec10[0] + fVec10[1])) + (fConst6 * fRec37[1]));
1109 fRec59[0] = ((fConst63 * (fRec36[1] + fRec36[2])) + (fConst62 * fRec59[1]));
1110 fRec36[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec59[0] + fRec37[0]) - 1.204285)) - 169.71433333333334);
1111 fRec35[0] = ((fConst59 * ((fConst37 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
1112 double fTemp29 = (fRec7[0] * fRec35[0]);
1113 fVec11[0] = fTemp29;
1114 fRec34[0] = ((fConst54 * (fVec11[0] + fVec11[1])) + (fConst6 * fRec34[1]));
1115 fRec60[0] = ((fConst67 * (fRec33[1] + fRec33[2])) + (fConst66 * fRec60[1]));
1116 fRec33[0] = (Ftube(TUBE_TABLE_12AX7_250k, ((fRec60[0] + fRec34[0]) - 0.840703)) - 147.47524390243905);
1117 fRec32[0] = ((fConst59 * ((fConst37 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
1118 output1[i] = (float)(fRec0[0] * fRec32[0]);
1119 // post processing
1120 fRec32[1] = fRec32[0];
1121 fRec33[2] = fRec33[1];
1122 fRec33[1] = fRec33[0];
1123 fRec60[1] = fRec60[0];
1124 fRec34[1] = fRec34[0];
1125 fVec11[1] = fVec11[0];
1126 fRec35[1] = fRec35[0];
1127 fRec36[2] = fRec36[1];
1128 fRec36[1] = fRec36[0];
1129 fRec59[1] = fRec59[0];
1130 fRec37[1] = fRec37[0];
1131 fVec10[1] = fVec10[0];
1132 fRec38[1] = fRec38[0];
1133 fRec39[2] = fRec39[1];
1134 fRec39[1] = fRec39[0];
1135 fRec58[1] = fRec58[0];
1136 fRec40[1] = fRec40[0];
1137 fVec9[1] = fVec9[0];
1138 fRec56[2] = fRec56[1];
1139 fRec56[1] = fRec56[0];
1140 fRec57[1] = fRec57[0];
1141 fRec52[2] = fRec52[1];
1142 fRec52[1] = fRec52[0];
1143 fRec53[2] = fRec53[1];
1144 fRec53[1] = fRec53[0];
1145 fRec54[2] = fRec54[1];
1146 fRec54[1] = fRec54[0];
1147 fRec55[1] = fRec55[0];
1148 fRec48[2] = fRec48[1];
1149 fRec48[1] = fRec48[0];
1150 fRec49[1] = fRec49[0];
1151 fVec8[1] = fVec8[0];
1152 fRec50[2] = fRec50[1];
1153 fRec50[1] = fRec50[0];
1154 fRec51[1] = fRec51[0];
1155 fRec41[2] = fRec41[1];
1156 fRec41[1] = fRec41[0];
1157 fRec42[2] = fRec42[1];
1158 fRec42[1] = fRec42[0];
1159 fRec43[1] = fRec43[0];
1160 fVec7[1] = fVec7[0];
1161 fRec44[2] = fRec44[1];
1162 fRec44[1] = fRec44[0];
1163 fRec45[1] = fRec45[0];
1164 fRec46[1] = fRec46[0];
1165 fVec6[1] = fVec6[0];
1166 fRec47[2] = fRec47[1];
1167 fRec47[1] = fRec47[0];
1168 fRec1[1] = fRec1[0];
1169 fRec2[2] = fRec2[1];
1170 fRec2[1] = fRec2[0];
1171 fRec31[1] = fRec31[0];
1172 fRec3[1] = fRec3[0];
1173 fVec5[1] = fVec5[0];
1174 fRec4[1] = fRec4[0];
1175 fRec5[2] = fRec5[1];
1176 fRec5[1] = fRec5[0];
1177 fRec30[1] = fRec30[0];
1178 fRec6[1] = fRec6[0];
1179 fVec4[1] = fVec4[0];
1180 fRec8[1] = fRec8[0];
1181 fRec9[2] = fRec9[1];
1182 fRec9[1] = fRec9[0];
1183 fRec29[1] = fRec29[0];
1184 fRec10[1] = fRec10[0];
1185 fVec3[1] = fVec3[0];
1186 fRec27[2] = fRec27[1];
1187 fRec27[1] = fRec27[0];
1188 fRec28[1] = fRec28[0];
1189 fRec23[2] = fRec23[1];
1190 fRec23[1] = fRec23[0];
1191 fRec24[2] = fRec24[1];
1192 fRec24[1] = fRec24[0];
1193 fRec25[2] = fRec25[1];
1194 fRec25[1] = fRec25[0];
1195 fRec26[1] = fRec26[0];
1196 fRec19[2] = fRec19[1];
1197 fRec19[1] = fRec19[0];
1198 fRec20[1] = fRec20[0];
1199 fVec2[1] = fVec2[0];
1200 fRec21[2] = fRec21[1];
1201 fRec21[1] = fRec21[0];
1202 fRec22[1] = fRec22[0];
1203 fRec11[2] = fRec11[1];
1204 fRec11[1] = fRec11[0];
1205 fRec12[2] = fRec12[1];
1206 fRec12[1] = fRec12[0];
1207 fRec13[1] = fRec13[0];
1208 fVec1[1] = fVec1[0];
1209 fRec14[2] = fRec14[1];
1210 fRec14[1] = fRec14[0];
1211 fRec15[1] = fRec15[0];
1212 fRec16[1] = fRec16[0];
1213 fVec0[1] = fVec0[0];
1214 fRec17[2] = fRec17[1];
1215 fRec17[1] = fRec17[0];
1216 fRec18[1] = fRec18[0];
1217 fRec7[1] = fRec7[0];
1218 fRec0[1] = fRec0[0];
1219 }
1220 }
1221
1222 inline void GxAmpStereo::run_6V6(uint32_t count, float *input0, float *input1, float *output0, float *output1)
1223 {
1224 fslider0 = (*fslider0_);
1225 fslider1 = (*fslider1_);
1226 fslider2 = (*fslider2_);
1227 fslider3 = (*fslider3_);
1228 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
1229 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
1230 double fSlow2 = (1.000000000000001e-05 * fslider2);
1231 double fSlow3 = fslider3;
1232 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
1233 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
1234 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
1235 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
1236 double fSlow8 = (2 * (fSlow3 - 0.5));
1237 double fSlow9 = (1 - max(0, (0 - fSlow8)));
1238 double fSlow10 = (1.25 * fSlow3);
1239 double fSlow11 = (1 - max(0, fSlow8));
1240 for (uint32_t i=0; i<count; i++)
1241 {
1242 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
1243 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
1244 double fTemp0 = (fConst9 * fRec11[1]);
1245 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
1246 double fTemp1 = (double)input0[i];
1247 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
1248 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
1249 fVec0[0] = fTemp2;
1250 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
1251 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
1252 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
1253 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
1254 fVec1[0] = fTemp3;
1255 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
1256 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
1257 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
1258 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
1259 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
1260 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
1261 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
1262 fVec2[0] = fTemp5;
1263 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
1264 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
1265 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
1266 double fTemp7 = (fConst9 * fRec23[1]);
1267 double fTemp8 = (fConst15 * fRec24[1]);
1268 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
1269 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
1270 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
1271 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
1272 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
1273 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
1274 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
1275 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
1276 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
1277 fVec3[0] = fTemp11;
1278 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
1279 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
1280 double fTemp12 = (1 - fRec18[0]);
1281 double fTemp13 = (fSlow11 * fRec18[0]);
1282 fRec9[0] = (Ftube(TUBE_TABLE_6V6_68k, (((fTemp1 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 2.29615)) - 164.9574074074074);
1283 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
1284 double fTemp14 = (fRec8[0] * fRec7[0]);
1285 fVec4[0] = fTemp14;
1286 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
1287 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
1288 fRec5[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec30[0] + fRec6[0]) - 1.675587)) - 138.2942);
1289 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
1290 double fTemp15 = (fRec7[0] * fRec4[0]);
1291 fVec5[0] = fTemp15;
1292 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
1293 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
1294 fRec2[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec31[0] + fRec3[0]) - 1.130462)) - 112.13878048780487);
1295 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
1296 output0[i] = (float)(fRec1[0] * fRec0[0]);
1297 double fTemp16 = (fConst9 * fRec41[1]);
1298 double fTemp17 = (double)input1[i];
1299 fRec47[0] = ((fTemp17 * fRec18[0]) - (fConst36 * ((fConst34 * fRec47[2]) + (fConst32 * fRec47[1]))));
1300 double fTemp18 = (fRec47[2] + (fRec47[0] + (2 * fRec47[1])));
1301 fVec6[0] = fTemp18;
1302 fRec46[0] = ((fConst38 * ((fConst37 * fVec6[1]) + (fConst1 * fVec6[0]))) + (fConst3 * fRec46[1]));
1303 fRec45[0] = ((fConst39 * (fRec46[0] + fRec46[1])) + (fConst30 * fRec45[1]));
1304 fRec44[0] = (fRec45[0] - (fConst28 * ((fConst26 * fRec44[2]) + (fConst24 * fRec44[1]))));
1305 double fTemp19 = (fRec44[2] + (fRec44[0] + (2 * fRec44[1])));
1306 fVec7[0] = fTemp19;
1307 fRec43[0] = ((fConst41 * ((fConst40 * fVec7[1]) + (fConst16 * fVec7[0]))) + (fConst21 * fRec43[1]));
1308 fRec42[0] = (fRec43[0] - (fConst19 * ((fConst17 * fRec42[2]) + (fConst15 * fRec42[1]))));
1309 fRec41[0] = ((fConst19 * (((fConst14 * fRec42[0]) + (fConst42 * fRec42[1])) + (fConst14 * fRec42[2]))) - (fConst12 * ((fConst11 * fRec41[2]) + fTemp16)));
1310 double fTemp20 = max(-1, min(1, (fSlow4 * (fRec41[2] + (fConst12 * (fTemp16 + (fConst11 * fRec41[0])))))));
1311 fRec51[0] = ((fConst41 * (fVec7[0] + fVec7[1])) + (fConst21 * fRec51[1]));
1312 fRec50[0] = (fRec51[0] - (fConst19 * ((fConst17 * fRec50[2]) + (fConst15 * fRec50[1]))));
1313 double fTemp21 = (fRec50[2] + (fRec50[0] + (2 * fRec50[1])));
1314 fVec8[0] = fTemp21;
1315 fRec49[0] = ((fConst48 * ((fConst47 * fVec8[1]) + (fConst10 * fVec8[0]))) + (fConst46 * fRec49[1]));
1316 fRec48[0] = (fRec49[0] - (fConst44 * ((fConst43 * fRec48[2]) + (fConst9 * fRec48[1]))));
1317 double fTemp22 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec48[0]) + (fConst49 * fRec48[1])) + (fConst8 * fRec48[2])))));
1318 double fTemp23 = (fConst9 * fRec52[1]);
1319 double fTemp24 = (fConst15 * fRec53[1]);
1320 fRec55[0] = ((fConst39 * ((fConst52 * fRec46[1]) + (fConst25 * fRec46[0]))) + (fConst30 * fRec55[1]));
1321 fRec54[0] = (fRec55[0] - (fConst28 * ((fConst26 * fRec54[2]) + (fConst24 * fRec54[1]))));
1322 fRec53[0] = ((fConst28 * (((fConst23 * fRec54[0]) + (fConst53 * fRec54[1])) + (fConst23 * fRec54[2]))) - (fConst51 * ((fConst50 * fRec53[2]) + fTemp24)));
1323 fRec52[0] = ((fRec53[2] + (fConst51 * (fTemp24 + (fConst50 * fRec53[0])))) - (fConst12 * ((fConst11 * fRec52[2]) + fTemp23)));
1324 double fTemp25 = max(-1, min(1, (fSlow6 * (fRec52[2] + (fConst12 * (fTemp23 + (fConst11 * fRec52[0])))))));
1325 fRec57[0] = ((fConst48 * (fVec8[0] + fVec8[1])) + (fConst46 * fRec57[1]));
1326 fRec56[0] = (fRec57[0] - (fConst44 * ((fConst43 * fRec56[2]) + (fConst9 * fRec56[1]))));
1327 double fTemp26 = max(-1, min(1, (fSlow7 * (fRec56[2] + (fRec56[0] + (2 * fRec56[1]))))));
1328 double fTemp27 = ((1.2589412 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (1.584893192 * ((fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))) + ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + (0.8413951417869425 * (fTemp20 * (1 - (0.3333333333333333 * faustpower<2>(fTemp20)))))))));
1329 fVec9[0] = fTemp27;
1330 fRec40[0] = ((fConst54 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec40[1]));
1331 fRec58[0] = ((fConst58 * (fRec39[1] + fRec39[2])) + (fConst57 * fRec58[1]));
1332 fRec39[0] = (Ftube(TUBE_TABLE_6V6_68k, (((fTemp17 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp17 * fTemp12)))) - 1)))))) + (fRec58[0] + (fSlow9 * fRec40[0]))) - 2.29615)) - 164.9574074074074);
1333 fRec38[0] = ((fConst59 * ((fConst37 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
1334 double fTemp28 = (fRec7[0] * fRec38[0]);
1335 fVec10[0] = fTemp28;
1336 fRec37[0] = ((fConst54 * (fVec10[0] + fVec10[1])) + (fConst6 * fRec37[1]));
1337 fRec59[0] = ((fConst63 * (fRec36[1] + fRec36[2])) + (fConst62 * fRec59[1]));
1338 fRec36[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec59[0] + fRec37[0]) - 1.675587)) - 138.2942);
1339 fRec35[0] = ((fConst59 * ((fConst37 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
1340 double fTemp29 = (fRec7[0] * fRec35[0]);
1341 fVec11[0] = fTemp29;
1342 fRec34[0] = ((fConst54 * (fVec11[0] + fVec11[1])) + (fConst6 * fRec34[1]));
1343 fRec60[0] = ((fConst67 * (fRec33[1] + fRec33[2])) + (fConst66 * fRec60[1]));
1344 fRec33[0] = (Ftube(TUBE_TABLE_6V6_250k, ((fRec60[0] + fRec34[0]) - 1.130462)) - 112.13878048780487);
1345 fRec32[0] = ((fConst59 * ((fConst37 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
1346 output1[i] = (float)(fRec0[0] * fRec32[0]);
1347 // post processing
1348 fRec32[1] = fRec32[0];
1349 fRec33[2] = fRec33[1];
1350 fRec33[1] = fRec33[0];
1351 fRec60[1] = fRec60[0];
1352 fRec34[1] = fRec34[0];
1353 fVec11[1] = fVec11[0];
1354 fRec35[1] = fRec35[0];
1355 fRec36[2] = fRec36[1];
1356 fRec36[1] = fRec36[0];
1357 fRec59[1] = fRec59[0];
1358 fRec37[1] = fRec37[0];
1359 fVec10[1] = fVec10[0];
1360 fRec38[1] = fRec38[0];
1361 fRec39[2] = fRec39[1];
1362 fRec39[1] = fRec39[0];
1363 fRec58[1] = fRec58[0];
1364 fRec40[1] = fRec40[0];
1365 fVec9[1] = fVec9[0];
1366 fRec56[2] = fRec56[1];
1367 fRec56[1] = fRec56[0];
1368 fRec57[1] = fRec57[0];
1369 fRec52[2] = fRec52[1];
1370 fRec52[1] = fRec52[0];
1371 fRec53[2] = fRec53[1];
1372 fRec53[1] = fRec53[0];
1373 fRec54[2] = fRec54[1];
1374 fRec54[1] = fRec54[0];
1375 fRec55[1] = fRec55[0];
1376 fRec48[2] = fRec48[1];
1377 fRec48[1] = fRec48[0];
1378 fRec49[1] = fRec49[0];
1379 fVec8[1] = fVec8[0];
1380 fRec50[2] = fRec50[1];
1381 fRec50[1] = fRec50[0];
1382 fRec51[1] = fRec51[0];
1383 fRec41[2] = fRec41[1];
1384 fRec41[1] = fRec41[0];
1385 fRec42[2] = fRec42[1];
1386 fRec42[1] = fRec42[0];
1387 fRec43[1] = fRec43[0];
1388 fVec7[1] = fVec7[0];
1389 fRec44[2] = fRec44[1];
1390 fRec44[1] = fRec44[0];
1391 fRec45[1] = fRec45[0];
1392 fRec46[1] = fRec46[0];
1393 fVec6[1] = fVec6[0];
1394 fRec47[2] = fRec47[1];
1395 fRec47[1] = fRec47[0];
1396 fRec1[1] = fRec1[0];
1397 fRec2[2] = fRec2[1];
1398 fRec2[1] = fRec2[0];
1399 fRec31[1] = fRec31[0];
1400 fRec3[1] = fRec3[0];
1401 fVec5[1] = fVec5[0];
1402 fRec4[1] = fRec4[0];
1403 fRec5[2] = fRec5[1];
1404 fRec5[1] = fRec5[0];
1405 fRec30[1] = fRec30[0];
1406 fRec6[1] = fRec6[0];
1407 fVec4[1] = fVec4[0];
1408 fRec8[1] = fRec8[0];
1409 fRec9[2] = fRec9[1];
1410 fRec9[1] = fRec9[0];
1411 fRec29[1] = fRec29[0];
1412 fRec10[1] = fRec10[0];
1413 fVec3[1] = fVec3[0];
1414 fRec27[2] = fRec27[1];
1415 fRec27[1] = fRec27[0];
1416 fRec28[1] = fRec28[0];
1417 fRec23[2] = fRec23[1];
1418 fRec23[1] = fRec23[0];
1419 fRec24[2] = fRec24[1];
1420 fRec24[1] = fRec24[0];
1421 fRec25[2] = fRec25[1];
1422 fRec25[1] = fRec25[0];
1423 fRec26[1] = fRec26[0];
1424 fRec19[2] = fRec19[1];
1425 fRec19[1] = fRec19[0];
1426 fRec20[1] = fRec20[0];
1427 fVec2[1] = fVec2[0];
1428 fRec21[2] = fRec21[1];
1429 fRec21[1] = fRec21[0];
1430 fRec22[1] = fRec22[0];
1431 fRec11[2] = fRec11[1];
1432 fRec11[1] = fRec11[0];
1433 fRec12[2] = fRec12[1];
1434 fRec12[1] = fRec12[0];
1435 fRec13[1] = fRec13[0];
1436 fVec1[1] = fVec1[0];
1437 fRec14[2] = fRec14[1];
1438 fRec14[1] = fRec14[0];
1439 fRec15[1] = fRec15[0];
1440 fRec16[1] = fRec16[0];
1441 fVec0[1] = fVec0[0];
1442 fRec17[2] = fRec17[1];
1443 fRec17[1] = fRec17[0];
1444 fRec18[1] = fRec18[0];
1445 fRec7[1] = fRec7[0];
1446 fRec0[1] = fRec0[0];
1447 }
1448 }
1449
1450 inline void GxAmpStereo::run_6DJ8(uint32_t count, float *input0, float *input1, float *output0, float *output1)
1451 {
1452 fslider0 = (*fslider0_);
1453 fslider1 = (*fslider1_);
1454 fslider2 = (*fslider2_);
1455 fslider3 = (*fslider3_);
1456 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
1457 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
1458 double fSlow2 = (1.000000000000001e-05 * fslider2);
1459 double fSlow3 = fslider3;
1460 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
1461 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
1462 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
1463 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
1464 double fSlow8 = (2 * (fSlow3 - 0.5));
1465 double fSlow9 = (1 - max(0, (0 - fSlow8)));
1466 double fSlow10 = (1.25 * fSlow3);
1467 double fSlow11 = (1 - max(0, fSlow8));
1468 for (uint32_t i=0; i<count; i++)
1469 {
1470 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
1471 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
1472 double fTemp0 = (fConst9 * fRec11[1]);
1473 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
1474 double fTemp1 = (double)input0[i];
1475 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
1476 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
1477 fVec0[0] = fTemp2;
1478 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
1479 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
1480 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
1481 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
1482 fVec1[0] = fTemp3;
1483 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
1484 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
1485 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
1486 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
1487 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
1488 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
1489 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
1490 fVec2[0] = fTemp5;
1491 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
1492 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
1493 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
1494 double fTemp7 = (fConst9 * fRec23[1]);
1495 double fTemp8 = (fConst15 * fRec24[1]);
1496 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
1497 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
1498 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
1499 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
1500 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
1501 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
1502 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
1503 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
1504 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
1505 fVec3[0] = fTemp11;
1506 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
1507 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
1508 double fTemp12 = (1 - fRec18[0]);
1509 double fTemp13 = (fSlow11 * fRec18[0]);
1510 fRec9[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fTemp1 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 1.863946)) - 60.96496296296296);
1511 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
1512 double fTemp14 = (fRec8[0] * fRec7[0]);
1513 fVec4[0] = fTemp14;
1514 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
1515 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
1516 fRec5[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec30[0] + fRec6[0]) - 1.271609)) - 45.22606666666667);
1517 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
1518 double fTemp15 = (fRec7[0] * fRec4[0]);
1519 fVec5[0] = fTemp15;
1520 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
1521 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
1522 fRec2[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec31[0] + fRec3[0]) - 0.797043)) - 32.799634146341475);
1523 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
1524 output0[i] = (float)(fRec1[0] * fRec0[0]);
1525 double fTemp16 = (fConst9 * fRec41[1]);
1526 double fTemp17 = (double)input1[i];
1527 fRec47[0] = ((fTemp17 * fRec18[0]) - (fConst36 * ((fConst34 * fRec47[2]) + (fConst32 * fRec47[1]))));
1528 double fTemp18 = (fRec47[2] + (fRec47[0] + (2 * fRec47[1])));
1529 fVec6[0] = fTemp18;
1530 fRec46[0] = ((fConst38 * ((fConst37 * fVec6[1]) + (fConst1 * fVec6[0]))) + (fConst3 * fRec46[1]));
1531 fRec45[0] = ((fConst39 * (fRec46[0] + fRec46[1])) + (fConst30 * fRec45[1]));
1532 fRec44[0] = (fRec45[0] - (fConst28 * ((fConst26 * fRec44[2]) + (fConst24 * fRec44[1]))));
1533 double fTemp19 = (fRec44[2] + (fRec44[0] + (2 * fRec44[1])));
1534 fVec7[0] = fTemp19;
1535 fRec43[0] = ((fConst41 * ((fConst40 * fVec7[1]) + (fConst16 * fVec7[0]))) + (fConst21 * fRec43[1]));
1536 fRec42[0] = (fRec43[0] - (fConst19 * ((fConst17 * fRec42[2]) + (fConst15 * fRec42[1]))));
1537 fRec41[0] = ((fConst19 * (((fConst14 * fRec42[0]) + (fConst42 * fRec42[1])) + (fConst14 * fRec42[2]))) - (fConst12 * ((fConst11 * fRec41[2]) + fTemp16)));
1538 double fTemp20 = max(-1, min(1, (fSlow4 * (fRec41[2] + (fConst12 * (fTemp16 + (fConst11 * fRec41[0])))))));
1539 fRec51[0] = ((fConst41 * (fVec7[0] + fVec7[1])) + (fConst21 * fRec51[1]));
1540 fRec50[0] = (fRec51[0] - (fConst19 * ((fConst17 * fRec50[2]) + (fConst15 * fRec50[1]))));
1541 double fTemp21 = (fRec50[2] + (fRec50[0] + (2 * fRec50[1])));
1542 fVec8[0] = fTemp21;
1543 fRec49[0] = ((fConst48 * ((fConst47 * fVec8[1]) + (fConst10 * fVec8[0]))) + (fConst46 * fRec49[1]));
1544 fRec48[0] = (fRec49[0] - (fConst44 * ((fConst43 * fRec48[2]) + (fConst9 * fRec48[1]))));
1545 double fTemp22 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec48[0]) + (fConst49 * fRec48[1])) + (fConst8 * fRec48[2])))));
1546 double fTemp23 = (fConst9 * fRec52[1]);
1547 double fTemp24 = (fConst15 * fRec53[1]);
1548 fRec55[0] = ((fConst39 * ((fConst52 * fRec46[1]) + (fConst25 * fRec46[0]))) + (fConst30 * fRec55[1]));
1549 fRec54[0] = (fRec55[0] - (fConst28 * ((fConst26 * fRec54[2]) + (fConst24 * fRec54[1]))));
1550 fRec53[0] = ((fConst28 * (((fConst23 * fRec54[0]) + (fConst53 * fRec54[1])) + (fConst23 * fRec54[2]))) - (fConst51 * ((fConst50 * fRec53[2]) + fTemp24)));
1551 fRec52[0] = ((fRec53[2] + (fConst51 * (fTemp24 + (fConst50 * fRec53[0])))) - (fConst12 * ((fConst11 * fRec52[2]) + fTemp23)));
1552 double fTemp25 = max(-1, min(1, (fSlow6 * (fRec52[2] + (fConst12 * (fTemp23 + (fConst11 * fRec52[0])))))));
1553 fRec57[0] = ((fConst48 * (fVec8[0] + fVec8[1])) + (fConst46 * fRec57[1]));
1554 fRec56[0] = (fRec57[0] - (fConst44 * ((fConst43 * fRec56[2]) + (fConst9 * fRec56[1]))));
1555 double fTemp26 = max(-1, min(1, (fSlow7 * (fRec56[2] + (fRec56[0] + (2 * fRec56[1]))))));
1556 double fTemp27 = ((1.2589412 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (1.584893192 * ((fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))) + ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + (0.8413951417869425 * (fTemp20 * (1 - (0.3333333333333333 * faustpower<2>(fTemp20)))))))));
1557 fVec9[0] = fTemp27;
1558 fRec40[0] = ((fConst54 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec40[1]));
1559 fRec58[0] = ((fConst58 * (fRec39[1] + fRec39[2])) + (fConst57 * fRec58[1]));
1560 fRec39[0] = (Ftube(TUBE_TABLE_6DJ8_68k, (((fTemp17 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp17 * fTemp12)))) - 1)))))) + (fRec58[0] + (fSlow9 * fRec40[0]))) - 1.863946)) - 60.96496296296296);
1561 fRec38[0] = ((fConst59 * ((fConst37 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
1562 double fTemp28 = (fRec7[0] * fRec38[0]);
1563 fVec10[0] = fTemp28;
1564 fRec37[0] = ((fConst54 * (fVec10[0] + fVec10[1])) + (fConst6 * fRec37[1]));
1565 fRec59[0] = ((fConst63 * (fRec36[1] + fRec36[2])) + (fConst62 * fRec59[1]));
1566 fRec36[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec59[0] + fRec37[0]) - 1.271609)) - 45.22606666666667);
1567 fRec35[0] = ((fConst59 * ((fConst37 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
1568 double fTemp29 = (fRec7[0] * fRec35[0]);
1569 fVec11[0] = fTemp29;
1570 fRec34[0] = ((fConst54 * (fVec11[0] + fVec11[1])) + (fConst6 * fRec34[1]));
1571 fRec60[0] = ((fConst67 * (fRec33[1] + fRec33[2])) + (fConst66 * fRec60[1]));
1572 fRec33[0] = (Ftube(TUBE_TABLE_6DJ8_250k, ((fRec60[0] + fRec34[0]) - 0.797043)) - 32.799634146341475);
1573 fRec32[0] = ((fConst59 * ((fConst37 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
1574 output1[i] = (float)(fRec0[0] * fRec32[0]);
1575 // post processing
1576 fRec32[1] = fRec32[0];
1577 fRec33[2] = fRec33[1];
1578 fRec33[1] = fRec33[0];
1579 fRec60[1] = fRec60[0];
1580 fRec34[1] = fRec34[0];
1581 fVec11[1] = fVec11[0];
1582 fRec35[1] = fRec35[0];
1583 fRec36[2] = fRec36[1];
1584 fRec36[1] = fRec36[0];
1585 fRec59[1] = fRec59[0];
1586 fRec37[1] = fRec37[0];
1587 fVec10[1] = fVec10[0];
1588 fRec38[1] = fRec38[0];
1589 fRec39[2] = fRec39[1];
1590 fRec39[1] = fRec39[0];
1591 fRec58[1] = fRec58[0];
1592 fRec40[1] = fRec40[0];
1593 fVec9[1] = fVec9[0];
1594 fRec56[2] = fRec56[1];
1595 fRec56[1] = fRec56[0];
1596 fRec57[1] = fRec57[0];
1597 fRec52[2] = fRec52[1];
1598 fRec52[1] = fRec52[0];
1599 fRec53[2] = fRec53[1];
1600 fRec53[1] = fRec53[0];
1601 fRec54[2] = fRec54[1];
1602 fRec54[1] = fRec54[0];
1603 fRec55[1] = fRec55[0];
1604 fRec48[2] = fRec48[1];
1605 fRec48[1] = fRec48[0];
1606 fRec49[1] = fRec49[0];
1607 fVec8[1] = fVec8[0];
1608 fRec50[2] = fRec50[1];
1609 fRec50[1] = fRec50[0];
1610 fRec51[1] = fRec51[0];
1611 fRec41[2] = fRec41[1];
1612 fRec41[1] = fRec41[0];
1613 fRec42[2] = fRec42[1];
1614 fRec42[1] = fRec42[0];
1615 fRec43[1] = fRec43[0];
1616 fVec7[1] = fVec7[0];
1617 fRec44[2] = fRec44[1];
1618 fRec44[1] = fRec44[0];
1619 fRec45[1] = fRec45[0];
1620 fRec46[1] = fRec46[0];
1621 fVec6[1] = fVec6[0];
1622 fRec47[2] = fRec47[1];
1623 fRec47[1] = fRec47[0];
1624 fRec1[1] = fRec1[0];
1625 fRec2[2] = fRec2[1];
1626 fRec2[1] = fRec2[0];
1627 fRec31[1] = fRec31[0];
1628 fRec3[1] = fRec3[0];
1629 fVec5[1] = fVec5[0];
1630 fRec4[1] = fRec4[0];
1631 fRec5[2] = fRec5[1];
1632 fRec5[1] = fRec5[0];
1633 fRec30[1] = fRec30[0];
1634 fRec6[1] = fRec6[0];
1635 fVec4[1] = fVec4[0];
1636 fRec8[1] = fRec8[0];
1637 fRec9[2] = fRec9[1];
1638 fRec9[1] = fRec9[0];
1639 fRec29[1] = fRec29[0];
1640 fRec10[1] = fRec10[0];
1641 fVec3[1] = fVec3[0];
1642 fRec27[2] = fRec27[1];
1643 fRec27[1] = fRec27[0];
1644 fRec28[1] = fRec28[0];
1645 fRec23[2] = fRec23[1];
1646 fRec23[1] = fRec23[0];
1647 fRec24[2] = fRec24[1];
1648 fRec24[1] = fRec24[0];
1649 fRec25[2] = fRec25[1];
1650 fRec25[1] = fRec25[0];
1651 fRec26[1] = fRec26[0];
1652 fRec19[2] = fRec19[1];
1653 fRec19[1] = fRec19[0];
1654 fRec20[1] = fRec20[0];
1655 fVec2[1] = fVec2[0];
1656 fRec21[2] = fRec21[1];
1657 fRec21[1] = fRec21[0];
1658 fRec22[1] = fRec22[0];
1659 fRec11[2] = fRec11[1];
1660 fRec11[1] = fRec11[0];
1661 fRec12[2] = fRec12[1];
1662 fRec12[1] = fRec12[0];
1663 fRec13[1] = fRec13[0];
1664 fVec1[1] = fVec1[0];
1665 fRec14[2] = fRec14[1];
1666 fRec14[1] = fRec14[0];
1667 fRec15[1] = fRec15[0];
1668 fRec16[1] = fRec16[0];
1669 fVec0[1] = fVec0[0];
1670 fRec17[2] = fRec17[1];
1671 fRec17[1] = fRec17[0];
1672 fRec18[1] = fRec18[0];
1673 fRec7[1] = fRec7[0];
1674 fRec0[1] = fRec0[0];
1675 }
1676 }
1677
1678 inline void GxAmpStereo::run_12AT7(uint32_t count, float *input0, float *input1, float *output0, float *output1)
1679 {
1680 fslider0 = (*fslider0_);
1681 fslider1 = (*fslider1_);
1682 fslider2 = (*fslider2_);
1683 fslider3 = (*fslider3_);
1684 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
1685 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
1686 double fSlow2 = (1.000000000000001e-05 * fslider2);
1687 double fSlow3 = fslider3;
1688 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
1689 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
1690 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
1691 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
1692 double fSlow8 = (2 * (fSlow3 - 0.5));
1693 double fSlow9 = (1 - max(0, (0 - fSlow8)));
1694 double fSlow10 = (1.25 * fSlow3);
1695 double fSlow11 = (1 - max(0, fSlow8));
1696 for (uint32_t i=0; i<count; i++)
1697 {
1698 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
1699 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
1700 double fTemp0 = (fConst9 * fRec11[1]);
1701 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
1702 double fTemp1 = (double)input0[i];
1703 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
1704 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
1705 fVec0[0] = fTemp2;
1706 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
1707 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
1708 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
1709 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
1710 fVec1[0] = fTemp3;
1711 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
1712 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
1713 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
1714 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
1715 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
1716 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
1717 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
1718 fVec2[0] = fTemp5;
1719 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
1720 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
1721 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
1722 double fTemp7 = (fConst9 * fRec23[1]);
1723 double fTemp8 = (fConst15 * fRec24[1]);
1724 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
1725 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
1726 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
1727 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
1728 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
1729 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
1730 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
1731 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
1732 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
1733 fVec3[0] = fTemp11;
1734 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
1735 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
1736 double fTemp12 = (1 - fRec18[0]);
1737 double fTemp13 = (fSlow11 * fRec18[0]);
1738 fRec9[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fTemp1 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 2.617753)) - 153.04618518518518);
1739 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
1740 double fTemp14 = (fRec8[0] * fRec7[0]);
1741 fVec4[0] = fTemp14;
1742 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
1743 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
1744 fRec5[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec30[0] + fRec6[0]) - 1.887332)) - 124.17786666666666);
1745 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
1746 double fTemp15 = (fRec7[0] * fRec4[0]);
1747 fVec5[0] = fTemp15;
1748 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
1749 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
1750 fRec2[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec31[0] + fRec3[0]) - 1.256962)) - 96.7119512195122);
1751 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
1752 output0[i] = (float)(fRec1[0] * fRec0[0]);
1753 double fTemp16 = (fConst9 * fRec41[1]);
1754 double fTemp17 = (double)input1[i];
1755 fRec47[0] = ((fTemp17 * fRec18[0]) - (fConst36 * ((fConst34 * fRec47[2]) + (fConst32 * fRec47[1]))));
1756 double fTemp18 = (fRec47[2] + (fRec47[0] + (2 * fRec47[1])));
1757 fVec6[0] = fTemp18;
1758 fRec46[0] = ((fConst38 * ((fConst37 * fVec6[1]) + (fConst1 * fVec6[0]))) + (fConst3 * fRec46[1]));
1759 fRec45[0] = ((fConst39 * (fRec46[0] + fRec46[1])) + (fConst30 * fRec45[1]));
1760 fRec44[0] = (fRec45[0] - (fConst28 * ((fConst26 * fRec44[2]) + (fConst24 * fRec44[1]))));
1761 double fTemp19 = (fRec44[2] + (fRec44[0] + (2 * fRec44[1])));
1762 fVec7[0] = fTemp19;
1763 fRec43[0] = ((fConst41 * ((fConst40 * fVec7[1]) + (fConst16 * fVec7[0]))) + (fConst21 * fRec43[1]));
1764 fRec42[0] = (fRec43[0] - (fConst19 * ((fConst17 * fRec42[2]) + (fConst15 * fRec42[1]))));
1765 fRec41[0] = ((fConst19 * (((fConst14 * fRec42[0]) + (fConst42 * fRec42[1])) + (fConst14 * fRec42[2]))) - (fConst12 * ((fConst11 * fRec41[2]) + fTemp16)));
1766 double fTemp20 = max(-1, min(1, (fSlow4 * (fRec41[2] + (fConst12 * (fTemp16 + (fConst11 * fRec41[0])))))));
1767 fRec51[0] = ((fConst41 * (fVec7[0] + fVec7[1])) + (fConst21 * fRec51[1]));
1768 fRec50[0] = (fRec51[0] - (fConst19 * ((fConst17 * fRec50[2]) + (fConst15 * fRec50[1]))));
1769 double fTemp21 = (fRec50[2] + (fRec50[0] + (2 * fRec50[1])));
1770 fVec8[0] = fTemp21;
1771 fRec49[0] = ((fConst48 * ((fConst47 * fVec8[1]) + (fConst10 * fVec8[0]))) + (fConst46 * fRec49[1]));
1772 fRec48[0] = (fRec49[0] - (fConst44 * ((fConst43 * fRec48[2]) + (fConst9 * fRec48[1]))));
1773 double fTemp22 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec48[0]) + (fConst49 * fRec48[1])) + (fConst8 * fRec48[2])))));
1774 double fTemp23 = (fConst9 * fRec52[1]);
1775 double fTemp24 = (fConst15 * fRec53[1]);
1776 fRec55[0] = ((fConst39 * ((fConst52 * fRec46[1]) + (fConst25 * fRec46[0]))) + (fConst30 * fRec55[1]));
1777 fRec54[0] = (fRec55[0] - (fConst28 * ((fConst26 * fRec54[2]) + (fConst24 * fRec54[1]))));
1778 fRec53[0] = ((fConst28 * (((fConst23 * fRec54[0]) + (fConst53 * fRec54[1])) + (fConst23 * fRec54[2]))) - (fConst51 * ((fConst50 * fRec53[2]) + fTemp24)));
1779 fRec52[0] = ((fRec53[2] + (fConst51 * (fTemp24 + (fConst50 * fRec53[0])))) - (fConst12 * ((fConst11 * fRec52[2]) + fTemp23)));
1780 double fTemp25 = max(-1, min(1, (fSlow6 * (fRec52[2] + (fConst12 * (fTemp23 + (fConst11 * fRec52[0])))))));
1781 fRec57[0] = ((fConst48 * (fVec8[0] + fVec8[1])) + (fConst46 * fRec57[1]));
1782 fRec56[0] = (fRec57[0] - (fConst44 * ((fConst43 * fRec56[2]) + (fConst9 * fRec56[1]))));
1783 double fTemp26 = max(-1, min(1, (fSlow7 * (fRec56[2] + (fRec56[0] + (2 * fRec56[1]))))));
1784 double fTemp27 = ((1.2589412 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (1.584893192 * ((fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))) + ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + (0.8413951417869425 * (fTemp20 * (1 - (0.3333333333333333 * faustpower<2>(fTemp20)))))))));
1785 fVec9[0] = fTemp27;
1786 fRec40[0] = ((fConst54 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec40[1]));
1787 fRec58[0] = ((fConst58 * (fRec39[1] + fRec39[2])) + (fConst57 * fRec58[1]));
1788 fRec39[0] = (Ftube(TUBE_TABLE_12AT7_68k, (((fTemp17 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp17 * fTemp12)))) - 1)))))) + (fRec58[0] + (fSlow9 * fRec40[0]))) - 2.617753)) - 153.04618518518518);
1789 fRec38[0] = ((fConst59 * ((fConst37 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
1790 double fTemp28 = (fRec7[0] * fRec38[0]);
1791 fVec10[0] = fTemp28;
1792 fRec37[0] = ((fConst54 * (fVec10[0] + fVec10[1])) + (fConst6 * fRec37[1]));
1793 fRec59[0] = ((fConst63 * (fRec36[1] + fRec36[2])) + (fConst62 * fRec59[1]));
1794 fRec36[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec59[0] + fRec37[0]) - 1.887332)) - 124.17786666666666);
1795 fRec35[0] = ((fConst59 * ((fConst37 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
1796 double fTemp29 = (fRec7[0] * fRec35[0]);
1797 fVec11[0] = fTemp29;
1798 fRec34[0] = ((fConst54 * (fVec11[0] + fVec11[1])) + (fConst6 * fRec34[1]));
1799 fRec60[0] = ((fConst67 * (fRec33[1] + fRec33[2])) + (fConst66 * fRec60[1]));
1800 fRec33[0] = (Ftube(TUBE_TABLE_12AT7_250k, ((fRec60[0] + fRec34[0]) - 1.256962)) - 96.7119512195122);
1801 fRec32[0] = ((fConst59 * ((fConst37 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
1802 output1[i] = (float)(fRec0[0] * fRec32[0]);
1803 // post processing
1804 fRec32[1] = fRec32[0];
1805 fRec33[2] = fRec33[1];
1806 fRec33[1] = fRec33[0];
1807 fRec60[1] = fRec60[0];
1808 fRec34[1] = fRec34[0];
1809 fVec11[1] = fVec11[0];
1810 fRec35[1] = fRec35[0];
1811 fRec36[2] = fRec36[1];
1812 fRec36[1] = fRec36[0];
1813 fRec59[1] = fRec59[0];
1814 fRec37[1] = fRec37[0];
1815 fVec10[1] = fVec10[0];
1816 fRec38[1] = fRec38[0];
1817 fRec39[2] = fRec39[1];
1818 fRec39[1] = fRec39[0];
1819 fRec58[1] = fRec58[0];
1820 fRec40[1] = fRec40[0];
1821 fVec9[1] = fVec9[0];
1822 fRec56[2] = fRec56[1];
1823 fRec56[1] = fRec56[0];
1824 fRec57[1] = fRec57[0];
1825 fRec52[2] = fRec52[1];
1826 fRec52[1] = fRec52[0];
1827 fRec53[2] = fRec53[1];
1828 fRec53[1] = fRec53[0];
1829 fRec54[2] = fRec54[1];
1830 fRec54[1] = fRec54[0];
1831 fRec55[1] = fRec55[0];
1832 fRec48[2] = fRec48[1];
1833 fRec48[1] = fRec48[0];
1834 fRec49[1] = fRec49[0];
1835 fVec8[1] = fVec8[0];
1836 fRec50[2] = fRec50[1];
1837 fRec50[1] = fRec50[0];
1838 fRec51[1] = fRec51[0];
1839 fRec41[2] = fRec41[1];
1840 fRec41[1] = fRec41[0];
1841 fRec42[2] = fRec42[1];
1842 fRec42[1] = fRec42[0];
1843 fRec43[1] = fRec43[0];
1844 fVec7[1] = fVec7[0];
1845 fRec44[2] = fRec44[1];
1846 fRec44[1] = fRec44[0];
1847 fRec45[1] = fRec45[0];
1848 fRec46[1] = fRec46[0];
1849 fVec6[1] = fVec6[0];
1850 fRec47[2] = fRec47[1];
1851 fRec47[1] = fRec47[0];
1852 fRec1[1] = fRec1[0];
1853 fRec2[2] = fRec2[1];
1854 fRec2[1] = fRec2[0];
1855 fRec31[1] = fRec31[0];
1856 fRec3[1] = fRec3[0];
1857 fVec5[1] = fVec5[0];
1858 fRec4[1] = fRec4[0];
1859 fRec5[2] = fRec5[1];
1860 fRec5[1] = fRec5[0];
1861 fRec30[1] = fRec30[0];
1862 fRec6[1] = fRec6[0];
1863 fVec4[1] = fVec4[0];
1864 fRec8[1] = fRec8[0];
1865 fRec9[2] = fRec9[1];
1866 fRec9[1] = fRec9[0];
1867 fRec29[1] = fRec29[0];
1868 fRec10[1] = fRec10[0];
1869 fVec3[1] = fVec3[0];
1870 fRec27[2] = fRec27[1];
1871 fRec27[1] = fRec27[0];
1872 fRec28[1] = fRec28[0];
1873 fRec23[2] = fRec23[1];
1874 fRec23[1] = fRec23[0];
1875 fRec24[2] = fRec24[1];
1876 fRec24[1] = fRec24[0];
1877 fRec25[2] = fRec25[1];
1878 fRec25[1] = fRec25[0];
1879 fRec26[1] = fRec26[0];
1880 fRec19[2] = fRec19[1];
1881 fRec19[1] = fRec19[0];
1882 fRec20[1] = fRec20[0];
1883 fVec2[1] = fVec2[0];
1884 fRec21[2] = fRec21[1];
1885 fRec21[1] = fRec21[0];
1886 fRec22[1] = fRec22[0];
1887 fRec11[2] = fRec11[1];
1888 fRec11[1] = fRec11[0];
1889 fRec12[2] = fRec12[1];
1890 fRec12[1] = fRec12[0];
1891 fRec13[1] = fRec13[0];
1892 fVec1[1] = fVec1[0];
1893 fRec14[2] = fRec14[1];
1894 fRec14[1] = fRec14[0];
1895 fRec15[1] = fRec15[0];
1896 fRec16[1] = fRec16[0];
1897 fVec0[1] = fVec0[0];
1898 fRec17[2] = fRec17[1];
1899 fRec17[1] = fRec17[0];
1900 fRec18[1] = fRec18[0];
1901 fRec7[1] = fRec7[0];
1902 fRec0[1] = fRec0[0];
1903 }
1904 }
1905
1906
1907 inline void GxAmpStereo::run_6C16(uint32_t count, float *input0, float *input1, float *output0, float *output1)
1908 {
1909 fslider0 = (*fslider0_);
1910 fslider1 = (*fslider1_);
1911 fslider2 = (*fslider2_);
1912 fslider3 = (*fslider3_);
1913 double fSlow0 = (0.0010000000000000009 * pow(10,(0.05 * fslider0)));
1914 double fSlow1 = (0.0010000000000000009 * pow(10,(0.05 * fslider1)));
1915 double fSlow2 = (1.000000000000001e-05 * fslider2);
1916 double fSlow3 = fslider3;
1917 double fSlow4 = pow(1e+01,(1.2 * fSlow3));
1918 double fSlow5 = (fConst44 * pow(1e+01,(2 * fSlow3)));
1919 double fSlow6 = pow(1e+01,(0.8 * fSlow3));
1920 double fSlow7 = (fConst44 * pow(1e+01,(0.9 * fSlow3)));
1921 double fSlow8 = (2 * (fSlow3 - 0.5));
1922 double fSlow9 = (1 - max(0, (0 - fSlow8)));
1923 double fSlow10 = (1.25 * fSlow3);
1924 double fSlow11 = (1 - max(0, fSlow8));
1925 for (uint32_t i=0; i<count; i++)
1926 {
1927 fRec0[0] = (fSlow0 + (0.999 * fRec0[1]));
1928 fRec7[0] = (fSlow1 + (0.999 * fRec7[1]));
1929 double fTemp0 = (fConst9 * fRec11[1]);
1930 fRec18[0] = (fSlow2 + (0.999 * fRec18[1]));
1931 double fTemp1 = (double)input0[i];
1932 fRec17[0] = ((fTemp1 * fRec18[0]) - (fConst36 * ((fConst34 * fRec17[2]) + (fConst32 * fRec17[1]))));
1933 double fTemp2 = (fRec17[2] + (fRec17[0] + (2 * fRec17[1])));
1934 fVec0[0] = fTemp2;
1935 fRec16[0] = ((fConst38 * ((fConst37 * fVec0[1]) + (fConst1 * fVec0[0]))) + (fConst3 * fRec16[1]));
1936 fRec15[0] = ((fConst39 * (fRec16[0] + fRec16[1])) + (fConst30 * fRec15[1]));
1937 fRec14[0] = (fRec15[0] - (fConst28 * ((fConst26 * fRec14[2]) + (fConst24 * fRec14[1]))));
1938 double fTemp3 = (fRec14[2] + (fRec14[0] + (2 * fRec14[1])));
1939 fVec1[0] = fTemp3;
1940 fRec13[0] = ((fConst41 * ((fConst40 * fVec1[1]) + (fConst16 * fVec1[0]))) + (fConst21 * fRec13[1]));
1941 fRec12[0] = (fRec13[0] - (fConst19 * ((fConst17 * fRec12[2]) + (fConst15 * fRec12[1]))));
1942 fRec11[0] = ((fConst19 * (((fConst14 * fRec12[0]) + (fConst42 * fRec12[1])) + (fConst14 * fRec12[2]))) - (fConst12 * ((fConst11 * fRec11[2]) + fTemp0)));
1943 double fTemp4 = max(-1, min(1, (fSlow4 * (fRec11[2] + (fConst12 * (fTemp0 + (fConst11 * fRec11[0])))))));
1944 fRec22[0] = ((fConst41 * (fVec1[0] + fVec1[1])) + (fConst21 * fRec22[1]));
1945 fRec21[0] = (fRec22[0] - (fConst19 * ((fConst17 * fRec21[2]) + (fConst15 * fRec21[1]))));
1946 double fTemp5 = (fRec21[2] + (fRec21[0] + (2 * fRec21[1])));
1947 fVec2[0] = fTemp5;
1948 fRec20[0] = ((fConst48 * ((fConst47 * fVec2[1]) + (fConst10 * fVec2[0]))) + (fConst46 * fRec20[1]));
1949 fRec19[0] = (fRec20[0] - (fConst44 * ((fConst43 * fRec19[2]) + (fConst9 * fRec19[1]))));
1950 double fTemp6 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec19[0]) + (fConst49 * fRec19[1])) + (fConst8 * fRec19[2])))));
1951 double fTemp7 = (fConst9 * fRec23[1]);
1952 double fTemp8 = (fConst15 * fRec24[1]);
1953 fRec26[0] = ((fConst39 * ((fConst52 * fRec16[1]) + (fConst25 * fRec16[0]))) + (fConst30 * fRec26[1]));
1954 fRec25[0] = (fRec26[0] - (fConst28 * ((fConst26 * fRec25[2]) + (fConst24 * fRec25[1]))));
1955 fRec24[0] = ((fConst28 * (((fConst23 * fRec25[0]) + (fConst53 * fRec25[1])) + (fConst23 * fRec25[2]))) - (fConst51 * ((fConst50 * fRec24[2]) + fTemp8)));
1956 fRec23[0] = ((fRec24[2] + (fConst51 * (fTemp8 + (fConst50 * fRec24[0])))) - (fConst12 * ((fConst11 * fRec23[2]) + fTemp7)));
1957 double fTemp9 = max(-1, min(1, (fSlow6 * (fRec23[2] + (fConst12 * (fTemp7 + (fConst11 * fRec23[0])))))));
1958 fRec28[0] = ((fConst48 * (fVec2[0] + fVec2[1])) + (fConst46 * fRec28[1]));
1959 fRec27[0] = (fRec28[0] - (fConst44 * ((fConst43 * fRec27[2]) + (fConst9 * fRec27[1]))));
1960 double fTemp10 = max(-1, min(1, (fSlow7 * (fRec27[2] + (fRec27[0] + (2 * fRec27[1]))))));
1961 double fTemp11 = ((1.2589412 * (fTemp10 * (1 - (0.3333333333333333 * faustpower<2>(fTemp10))))) + (1.584893192 * ((fTemp9 * (1 - (0.3333333333333333 * faustpower<2>(fTemp9)))) + ((fTemp6 * (1 - (0.3333333333333333 * faustpower<2>(fTemp6)))) + (0.8413951417869425 * (fTemp4 * (1 - (0.3333333333333333 * faustpower<2>(fTemp4)))))))));
1962 fVec3[0] = fTemp11;
1963 fRec10[0] = ((fConst54 * (fVec3[0] + fVec3[1])) + (fConst6 * fRec10[1]));
1964 fRec29[0] = ((fConst58 * (fRec9[1] + fRec9[2])) + (fConst57 * fRec29[1]));
1965 double fTemp12 = (1 - fRec18[0]);
1966 double fTemp13 = (fSlow11 * fRec18[0]);
1967 fRec9[0] = (Ftube(TUBE_TABLE_6C16_68k, (((fTemp1 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp1 * fTemp12)))) - 1)))))) + (fRec29[0] + (fSlow9 * fRec10[0]))) - 2.921806)) - 141.78496296296294);
1968 fRec8[0] = ((fConst59 * ((fConst37 * fRec9[1]) + (fConst1 * fRec9[0]))) + (fConst3 * fRec8[1]));
1969 double fTemp14 = (fRec8[0] * fRec7[0]);
1970 fVec4[0] = fTemp14;
1971 fRec6[0] = ((fConst54 * (fVec4[0] + fVec4[1])) + (fConst6 * fRec6[1]));
1972 fRec30[0] = ((fConst63 * (fRec5[1] + fRec5[2])) + (fConst62 * fRec30[1]));
1973 fRec5[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec30[0] + fRec6[0]) - 2.097743)) - 110.15046666666666);
1974 fRec4[0] = ((fConst59 * ((fConst37 * fRec5[1]) + (fConst1 * fRec5[0]))) + (fConst3 * fRec4[1]));
1975 double fTemp15 = (fRec7[0] * fRec4[0]);
1976 fVec5[0] = fTemp15;
1977 fRec3[0] = ((fConst54 * (fVec5[0] + fVec5[1])) + (fConst6 * fRec3[1]));
1978 fRec31[0] = ((fConst67 * (fRec2[1] + fRec2[2])) + (fConst66 * fRec31[1]));
1979 fRec2[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec31[0] + fRec3[0]) - 1.378742)) - 81.86073170731709);
1980 fRec1[0] = ((fConst59 * ((fConst37 * fRec2[1]) + (fConst1 * fRec2[0]))) + (fConst3 * fRec1[1]));
1981 output0[i] = (float)(fRec1[0] * fRec0[0]);
1982 double fTemp16 = (fConst9 * fRec41[1]);
1983 double fTemp17 = (double)input1[i];
1984 fRec47[0] = ((fTemp17 * fRec18[0]) - (fConst36 * ((fConst34 * fRec47[2]) + (fConst32 * fRec47[1]))));
1985 double fTemp18 = (fRec47[2] + (fRec47[0] + (2 * fRec47[1])));
1986 fVec6[0] = fTemp18;
1987 fRec46[0] = ((fConst38 * ((fConst37 * fVec6[1]) + (fConst1 * fVec6[0]))) + (fConst3 * fRec46[1]));
1988 fRec45[0] = ((fConst39 * (fRec46[0] + fRec46[1])) + (fConst30 * fRec45[1]));
1989 fRec44[0] = (fRec45[0] - (fConst28 * ((fConst26 * fRec44[2]) + (fConst24 * fRec44[1]))));
1990 double fTemp19 = (fRec44[2] + (fRec44[0] + (2 * fRec44[1])));
1991 fVec7[0] = fTemp19;
1992 fRec43[0] = ((fConst41 * ((fConst40 * fVec7[1]) + (fConst16 * fVec7[0]))) + (fConst21 * fRec43[1]));
1993 fRec42[0] = (fRec43[0] - (fConst19 * ((fConst17 * fRec42[2]) + (fConst15 * fRec42[1]))));
1994 fRec41[0] = ((fConst19 * (((fConst14 * fRec42[0]) + (fConst42 * fRec42[1])) + (fConst14 * fRec42[2]))) - (fConst12 * ((fConst11 * fRec41[2]) + fTemp16)));
1995 double fTemp20 = max(-1, min(1, (fSlow4 * (fRec41[2] + (fConst12 * (fTemp16 + (fConst11 * fRec41[0])))))));
1996 fRec51[0] = ((fConst41 * (fVec7[0] + fVec7[1])) + (fConst21 * fRec51[1]));
1997 fRec50[0] = (fRec51[0] - (fConst19 * ((fConst17 * fRec50[2]) + (fConst15 * fRec50[1]))));
1998 double fTemp21 = (fRec50[2] + (fRec50[0] + (2 * fRec50[1])));
1999 fVec8[0] = fTemp21;
2000 fRec49[0] = ((fConst48 * ((fConst47 * fVec8[1]) + (fConst10 * fVec8[0]))) + (fConst46 * fRec49[1]));
2001 fRec48[0] = (fRec49[0] - (fConst44 * ((fConst43 * fRec48[2]) + (fConst9 * fRec48[1]))));
2002 double fTemp22 = max(-1, min(1, (fSlow5 * (((fConst8 * fRec48[0]) + (fConst49 * fRec48[1])) + (fConst8 * fRec48[2])))));
2003 double fTemp23 = (fConst9 * fRec52[1]);
2004 double fTemp24 = (fConst15 * fRec53[1]);
2005 fRec55[0] = ((fConst39 * ((fConst52 * fRec46[1]) + (fConst25 * fRec46[0]))) + (fConst30 * fRec55[1]));
2006 fRec54[0] = (fRec55[0] - (fConst28 * ((fConst26 * fRec54[2]) + (fConst24 * fRec54[1]))));
2007 fRec53[0] = ((fConst28 * (((fConst23 * fRec54[0]) + (fConst53 * fRec54[1])) + (fConst23 * fRec54[2]))) - (fConst51 * ((fConst50 * fRec53[2]) + fTemp24)));
2008 fRec52[0] = ((fRec53[2] + (fConst51 * (fTemp24 + (fConst50 * fRec53[0])))) - (fConst12 * ((fConst11 * fRec52[2]) + fTemp23)));
2009 double fTemp25 = max(-1, min(1, (fSlow6 * (fRec52[2] + (fConst12 * (fTemp23 + (fConst11 * fRec52[0])))))));
2010 fRec57[0] = ((fConst48 * (fVec8[0] + fVec8[1])) + (fConst46 * fRec57[1]));
2011 fRec56[0] = (fRec57[0] - (fConst44 * ((fConst43 * fRec56[2]) + (fConst9 * fRec56[1]))));
2012 double fTemp26 = max(-1, min(1, (fSlow7 * (fRec56[2] + (fRec56[0] + (2 * fRec56[1]))))));
2013 double fTemp27 = ((1.2589412 * (fTemp26 * (1 - (0.3333333333333333 * faustpower<2>(fTemp26))))) + (1.584893192 * ((fTemp25 * (1 - (0.3333333333333333 * faustpower<2>(fTemp25)))) + ((fTemp22 * (1 - (0.3333333333333333 * faustpower<2>(fTemp22)))) + (0.8413951417869425 * (fTemp20 * (1 - (0.3333333333333333 * faustpower<2>(fTemp20)))))))));
2014 fVec9[0] = fTemp27;
2015 fRec40[0] = ((fConst54 * (fVec9[0] + fVec9[1])) + (fConst6 * fRec40[1]));
2016 fRec58[0] = ((fConst58 * (fRec39[1] + fRec39[2])) + (fConst57 * fRec58[1]));
2017 fRec39[0] = (Ftube(TUBE_TABLE_6C16_68k, (((fTemp17 * (fTemp13 + (fTemp12 * (1 + (fSlow10 * ((4 - (4 * fabs((fTemp17 * fTemp12)))) - 1)))))) + (fRec58[0] + (fSlow9 * fRec40[0]))) - 2.921806)) - 141.78496296296294);
2018 fRec38[0] = ((fConst59 * ((fConst37 * fRec39[1]) + (fConst1 * fRec39[0]))) + (fConst3 * fRec38[1]));
2019 double fTemp28 = (fRec7[0] * fRec38[0]);
2020 fVec10[0] = fTemp28;
2021 fRec37[0] = ((fConst54 * (fVec10[0] + fVec10[1])) + (fConst6 * fRec37[1]));
2022 fRec59[0] = ((fConst63 * (fRec36[1] + fRec36[2])) + (fConst62 * fRec59[1]));
2023 fRec36[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec59[0] + fRec37[0]) - 2.097743)) - 110.15046666666666);
2024 fRec35[0] = ((fConst59 * ((fConst37 * fRec36[1]) + (fConst1 * fRec36[0]))) + (fConst3 * fRec35[1]));
2025 double fTemp29 = (fRec7[0] * fRec35[0]);
2026 fVec11[0] = fTemp29;
2027 fRec34[0] = ((fConst54 * (fVec11[0] + fVec11[1])) + (fConst6 * fRec34[1]));
2028 fRec60[0] = ((fConst67 * (fRec33[1] + fRec33[2])) + (fConst66 * fRec60[1]));
2029 fRec33[0] = (Ftube(TUBE_TABLE_6C16_250k, ((fRec60[0] + fRec34[0]) - 1.378742)) - 81.86073170731709);
2030 fRec32[0] = ((fConst59 * ((fConst37 * fRec33[1]) + (fConst1 * fRec33[0]))) + (fConst3 * fRec32[1]));
2031 output1[i] = (float)(fRec0[0] * fRec32[0]);
2032 // post processing
2033 fRec32[1] = fRec32[0];
2034 fRec33[2] = fRec33[1];
2035 fRec33[1] = fRec33[0];
2036 fRec60[1] = fRec60[0];
2037 fRec34[1] = fRec34[0];
2038 fVec11[1] = fVec11[0];
2039 fRec35[1] = fRec35[0];
2040 fRec36[2] = fRec36[1];
2041 fRec36[1] = fRec36[0];
2042 fRec59[1] = fRec59[0];
2043 fRec37[1] = fRec37[0];
2044 fVec10[1] = fVec10[0];
2045 fRec38[1] = fRec38[0];
2046 fRec39[2] = fRec39[1];
2047 fRec39[1] = fRec39[0];
2048 fRec58[1] = fRec58[0];
2049 fRec40[1] = fRec40[0];
2050 fVec9[1] = fVec9[0];
2051 fRec56[2] = fRec56[1];
2052 fRec56[1] = fRec56[0];
2053 fRec57[1] = fRec57[0];
2054 fRec52[2] = fRec52[1];
2055 fRec52[1] = fRec52[0];
2056 fRec53[2] = fRec53[1];
2057 fRec53[1] = fRec53[0];
2058 fRec54[2] = fRec54[1];
2059 fRec54[1] = fRec54[0];
2060 fRec55[1] = fRec55[0];
2061 fRec48[2] = fRec48[1];
2062 fRec48[1] = fRec48[0];
2063 fRec49[1] = fRec49[0];
2064 fVec8[1] = fVec8[0];
2065 fRec50[2] = fRec50[1];
2066 fRec50[1] = fRec50[0];
2067 fRec51[1] = fRec51[0];
2068 fRec41[2] = fRec41[1];
2069 fRec41[1] = fRec41[0];
2070 fRec42[2] = fRec42[1];
2071 fRec42[1] = fRec42[0];
2072 fRec43[1] = fRec43[0];
2073 fVec7[1] = fVec7[0];
2074 fRec44[2] = fRec44[1];
2075 fRec44[1] = fRec44[0];
2076 fRec45[1] = fRec45[0];
2077 fRec46[1] = fRec46[0];
2078 fVec6[1] = fVec6[0];
2079 fRec47[2] = fRec47[1];
2080 fRec47[1] = fRec47[0];
2081 fRec1[1] = fRec1[0];
2082 fRec2[2] = fRec2[1];
2083 fRec2[1] = fRec2[0];
2084 fRec31[1] = fRec31[0];
2085 fRec3[1] = fRec3[0];
2086 fVec5[1] = fVec5[0];
2087 fRec4[1] = fRec4[0];
2088 fRec5[2] = fRec5[1];
2089 fRec5[1] = fRec5[0];
2090 fRec30[1] = fRec30[0];
2091 fRec6[1] = fRec6[0];
2092 fVec4[1] = fVec4[0];
2093 fRec8[1] = fRec8[0];
2094 fRec9[2] = fRec9[1];
2095 fRec9[1] = fRec9[0];
2096 fRec29[1] = fRec29[0];
2097 fRec10[1] = fRec10[0];
2098 fVec3[1] = fVec3[0];
2099 fRec27[2] = fRec27[1];
2100 fRec27[1] = fRec27[0];
2101 fRec28[1] = fRec28[0];
2102 fRec23[2] = fRec23[1];
2103 fRec23[1] = fRec23[0];
2104 fRec24[2] = fRec24[1];
2105 fRec24[1] = fRec24[0];
2106 fRec25[2] = fRec25[1];
2107 fRec25[1] = fRec25[0];
2108 fRec26[1] = fRec26[0];
2109 fRec19[2] = fRec19[1];
2110 fRec19[1] = fRec19[0];
2111 fRec20[1] = fRec20[0];
2112 fVec2[1] = fVec2[0];
2113 fRec21[2] = fRec21[1];
2114 fRec21[1] = fRec21[0];
2115 fRec22[1] = fRec22[0];
2116 fRec11[2] = fRec11[1];
2117 fRec11[1] = fRec11[0];
2118 fRec12[2] = fRec12[1];
2119 fRec12[1] = fRec12[0];
2120 fRec13[1] = fRec13[0];
2121 fVec1[1] = fVec1[0];
2122 fRec14[2] = fRec14[1];
2123 fRec14[1] = fRec14[0];
2124 fRec15[1] = fRec15[0];
2125 fRec16[1] = fRec16[0];
2126 fVec0[1] = fVec0[0];
2127 fRec17[2] = fRec17[1];
2128 fRec17[1] = fRec17[0];
2129 fRec18[1] = fRec18[0];
2130 fRec7[1] = fRec7[0];
2131 fRec0[1] = fRec0[0];
2132 }
2133 }
2134
2135
2136 // static wrappers
2137 void GxAmpStereo::init_static(uint32_t samplingFreq, GxAmpStereo *p)
2138 {
2139 p->init(samplingFreq);
2140 }
2141
2142 void GxAmpStereo::connect_static(uint32_t port,void* data, GxAmpStereo *p)
2143 {
2144 p->connect(port, data);
2145 }
+0
-337
src/LV2/gxamp.lv2/DSP/gx_amp.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_AMP_H_
22 #define SRC_HEADERS_GX_AMP_H_
23
24 #include "valve.h"
25
26 // plugin class
27 class GxAmpMono
28 {
29 private:
30 uint32_t fSamplingFreq;
31 float fslider0;
32 float *fslider0_;
33 double fRec0[2];
34 int32_t iConst0;
35 double fConst1;
36 double fConst2;
37 double fConst3;
38 double fConst4;
39 double fConst5;
40 double fConst6;
41 float fslider1;
42 float *fslider1_;
43 double fRec7[2];
44 double fConst7;
45 double fConst8;
46 double fConst9;
47 double fConst10;
48 double fConst11;
49 double fConst12;
50 double fConst13;
51 double fConst14;
52 double fConst15;
53 double fConst16;
54 double fConst17;
55 double fConst18;
56 double fConst19;
57 double fConst20;
58 double fConst21;
59 double fConst22;
60 double fConst23;
61 double fConst24;
62 double fConst25;
63 double fConst26;
64 double fConst27;
65 double fConst28;
66 double fConst29;
67 double fConst30;
68 double fConst31;
69 double fConst32;
70 double fConst33;
71 double fConst34;
72 double fConst35;
73 double fConst36;
74 float fslider2;
75 float *fslider2_;
76 double fRec18[2];
77 double fRec17[3];
78 double fVec0[2];
79 double fConst37;
80 double fConst38;
81 double fRec16[2];
82 double fConst39;
83 double fRec15[2];
84 double fRec14[3];
85 double fVec1[2];
86 double fConst40;
87 double fConst41;
88 double fRec13[2];
89 double fRec12[3];
90 double fConst42;
91 double fRec11[3];
92 float fslider3;
93 float *fslider3_;
94 double fConst43;
95 double fConst44;
96 double fConst45;
97 double fConst46;
98 double fRec22[2];
99 double fRec21[3];
100 double fVec2[2];
101 double fConst47;
102 double fConst48;
103 double fRec20[2];
104 double fRec19[3];
105 double fConst49;
106 double fConst50;
107 double fConst51;
108 double fConst52;
109 double fRec26[2];
110 double fRec25[3];
111 double fConst53;
112 double fRec24[3];
113 double fRec23[3];
114 double fRec28[2];
115 double fRec27[3];
116 double fVec3[2];
117 double fConst54;
118 double fRec10[2];
119 double fConst55;
120 double fConst56;
121 double fConst57;
122 double fConst58;
123 double fRec29[2];
124 double fRec9[3];
125 double fConst59;
126 double fRec8[2];
127 double fVec4[2];
128 double fRec6[2];
129 double fConst60;
130 double fConst61;
131 double fConst62;
132 double fConst63;
133 double fRec30[2];
134 double fRec5[3];
135 double fRec4[2];
136 double fVec5[2];
137 double fRec3[2];
138 double fConst64;
139 double fConst65;
140 double fConst66;
141 double fConst67;
142 double fRec31[2];
143 double fRec2[3];
144 double fRec1[2];
145 void clear_state_f();
146 void init(uint32_t samplingFreq);
147 void connect(uint32_t port,void* data);
148
149 public:
150 void run_6V6(uint32_t n_samples,float* input, float* output);
151 void run_6C16(uint32_t n_samples, float* input, float* output);
152 void run_12AT7(uint32_t n_samples, float* input, float* output);
153 void run_12ax7(uint32_t n_samples, float* input, float* output);
154 void run_6DJ8(uint32_t n_samples, float* input, float* output);
155 static void init_static(uint32_t samplingFreq, GxAmpMono *p);
156 static void connect_static(uint32_t port,void* data, GxAmpMono *p);
157 //static void run_static(uint32_t n_samples, float* input, float* output, GxAmpMono *p);
158 GxAmpMono() {};
159 ~GxAmpMono() {};
160 };
161
162
163 class GxAmpStereo
164 {
165 private:
166 uint32_t fSamplingFreq;
167 float fslider0;
168 float *fslider0_;
169 double fRec0[2];
170 int32_t iConst0;
171 double fConst1;
172 double fConst2;
173 double fConst3;
174 double fConst4;
175 double fConst5;
176 double fConst6;
177 float fslider1;
178 float *fslider1_;
179 double fRec7[2];
180 double fConst7;
181 double fConst8;
182 double fConst9;
183 double fConst10;
184 double fConst11;
185 double fConst12;
186 double fConst13;
187 double fConst14;
188 double fConst15;
189 double fConst16;
190 double fConst17;
191 double fConst18;
192 double fConst19;
193 double fConst20;
194 double fConst21;
195 double fConst22;
196 double fConst23;
197 double fConst24;
198 double fConst25;
199 double fConst26;
200 double fConst27;
201 double fConst28;
202 double fConst29;
203 double fConst30;
204 double fConst31;
205 double fConst32;
206 double fConst33;
207 double fConst34;
208 double fConst35;
209 double fConst36;
210 float fslider2;
211 float *fslider2_;
212 double fRec18[2];
213 double fRec17[3];
214 double fVec0[2];
215 double fConst37;
216 double fConst38;
217 double fRec16[2];
218 double fConst39;
219 double fRec15[2];
220 double fRec14[3];
221 double fVec1[2];
222 double fConst40;
223 double fConst41;
224 double fRec13[2];
225 double fRec12[3];
226 double fConst42;
227 double fRec11[3];
228 float fslider3;
229 float *fslider3_;
230 double fConst43;
231 double fConst44;
232 double fConst45;
233 double fConst46;
234 double fRec22[2];
235 double fRec21[3];
236 double fVec2[2];
237 double fConst47;
238 double fConst48;
239 double fRec20[2];
240 double fRec19[3];
241 double fConst49;
242 double fConst50;
243 double fConst51;
244 double fConst52;
245 double fRec26[2];
246 double fRec25[3];
247 double fConst53;
248 double fRec24[3];
249 double fRec23[3];
250 double fRec28[2];
251 double fRec27[3];
252 double fVec3[2];
253 double fConst54;
254 double fRec10[2];
255 double fConst55;
256 double fConst56;
257 double fConst57;
258 double fConst58;
259 double fRec29[2];
260 double fRec9[3];
261 double fConst59;
262 double fRec8[2];
263 double fVec4[2];
264 double fRec6[2];
265 double fConst60;
266 double fConst61;
267 double fConst62;
268 double fConst63;
269 double fRec30[2];
270 double fRec5[3];
271 double fRec4[2];
272 double fVec5[2];
273 double fRec3[2];
274 double fConst64;
275 double fConst65;
276 double fConst66;
277 double fConst67;
278 double fRec31[2];
279 double fRec2[3];
280 double fRec1[2];
281 double fRec47[3];
282 double fVec6[2];
283 double fRec46[2];
284 double fRec45[2];
285 double fRec44[3];
286 double fVec7[2];
287 double fRec43[2];
288 double fRec42[3];
289 double fRec41[3];
290 double fRec51[2];
291 double fRec50[3];
292 double fVec8[2];
293 double fRec49[2];
294 double fRec48[3];
295 double fRec55[2];
296 double fRec54[3];
297 double fRec53[3];
298 double fRec52[3];
299 double fRec57[2];
300 double fRec56[3];
301 double fVec9[2];
302 double fRec40[2];
303 double fRec58[2];
304 double fRec39[3];
305 double fRec38[2];
306 double fVec10[2];
307 double fRec37[2];
308 double fRec59[2];
309 double fRec36[3];
310 double fRec35[2];
311 double fVec11[2];
312 double fRec34[2];
313 double fRec60[2];
314 double fRec33[3];
315 double fRec32[2];
316 void clear_state_f();
317 void init(uint32_t samplingFreq);
318 void connect(uint32_t port,void* data);
319
320
321 public:
322 void run_6V6(uint32_t n_samples,float* input,float* input1, float* output, float* output1);
323 void run_6C16(uint32_t n_samples, float* input,float* input1, float* output, float* output1);
324 void run_12AT7(uint32_t n_samples, float* input,float* input1, float* output, float* output1);
325 void run_12ax7(uint32_t n_samples, float* input,float* input1, float* output, float* output1);
326 void run_6DJ8(uint32_t n_samples, float* input,float* input1, float* output, float* output1);
327 static void init_static(uint32_t samplingFreq, GxAmpStereo *p);
328 static void connect_static(uint32_t port,void* data, GxAmpStereo *p);
329 //static void run_static(uint32_t n_samples, float* input,float* input1, float* output, float* output1, GxAmpStereo *p);
330 GxAmpStereo() {};
331 ~GxAmpStereo() {};
332 };
333
334
335
336 #endif //SRC_HEADERS_GX_AMP_H_
+0
-337
src/LV2/gxamp.lv2/DSP/gx_convolver.cc less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include "gx_convolver.h"
20 #include <string.h>
21 /****************************************************************
22 ** some pieces in this file are copied from jconvolver
23 */
24
25 #define max(x, y) (((x) > (y)) ? (x) : (y))
26 /****************************************************************
27 ** GxConvolverBase
28 */
29
30 GxConvolverBase::~GxConvolverBase()
31 {
32 if (is_runnable())
33 {
34 stop_process();
35 }
36 }
37
38 void GxConvolverBase::adjust_values(
39 uint32_t audio_size, uint32_t& count, uint32_t& offset,
40 uint32_t& delay, uint32_t& ldelay, uint32_t& length,
41 uint32_t& size, uint32_t& bufsize)
42 {
43
44 if (bufsize < count)
45 {
46 bufsize = count;
47 }
48 if (bufsize < Convproc::MINPART)
49 {
50 bufsize = Convproc::MINPART;
51 }
52 if (offset > audio_size)
53 {
54 offset = audio_size;
55 }
56 if (!size)
57 {
58 if (offset + length > audio_size)
59 {
60
61 length = audio_size - offset;
62 }
63 if (!length)
64 {
65 length = audio_size - offset;
66 }
67 size = max(delay, ldelay) + offset + length;
68 }
69 else
70 {
71 if (delay > size)
72 {
73 delay = size;
74 }
75 if (ldelay > size)
76 {
77 ldelay = size;
78 }
79 if (offset > size - max(delay, ldelay))
80 {
81 offset = size - max(delay, ldelay);
82 }
83 if (length > size - max(delay, ldelay) - offset)
84 {
85 length = size - max(delay, ldelay) - offset;
86
87 }
88 if (!length)
89 {
90 length = size - max(delay, ldelay) - offset;
91 }
92 }
93 }
94
95 bool GxConvolverBase::start(int32_t policy, int32_t priority)
96 {
97 int32_t rc = start_process(priority, policy);
98 if (rc != 0)
99 {
100
101 return false;
102 }
103 ready = true;
104 return true;
105 }
106
107 bool GxConvolverBase::checkstate()
108 {
109 if (state() == Convproc::ST_WAIT)
110 {
111 if (check_stop())
112 {
113 ready = false;
114 }
115 else
116 {
117 return false;
118 }
119 }
120 else if (state() == ST_STOP)
121 {
122 ready = false;
123 }
124 return true;
125 }
126
127 /****************************************************************
128 ** GxSimpleConvolver
129 */
130
131 class CheckResample
132 {
133 private:
134 float *vec;
135 gx_resample::BufferResampler& resamp;
136 public:
137 CheckResample(gx_resample::BufferResampler& resamp_): vec(0), resamp(resamp_) {}
138 float *resample(int32_t *count, float *impresp, uint32_t imprate, uint32_t samplerate)
139 {
140 if (imprate != samplerate)
141 {
142 vec = resamp.process(imprate, *count, impresp, samplerate, count);
143 if (!vec)
144 {
145 if (samplerate)
146 {
147 }
148 else
149 {
150 }
151 return 0;
152 }
153 return vec;
154 }
155 return impresp;
156 }
157 ~CheckResample()
158 {
159 if (vec)
160 {
161 delete vec;
162 }
163 }
164 };
165
166 bool GxSimpleConvolver::configure(int32_t count, float *impresp, uint32_t imprate)
167 {
168 //printf("try configure()\n");
169 CheckResample r(resamp);
170 impresp = r.resample(&count, impresp, imprate, samplerate);
171 if (!impresp)
172 {
173 printf("no impresp\n");
174 return false;
175 }
176 cleanup();
177 uint32_t bufsize = buffersize;
178 if (bufsize < Convproc::MINPART)
179 {
180 bufsize = Convproc::MINPART;
181 }
182 if (Convproc::configure(1, 1, count, buffersize,
183 bufsize, bufsize)) // Convproc::MAXPART
184 {
185 printf("no configure\n");
186 return false;
187 }
188 if (impdata_create(0, 0, 1, impresp, 0, count))
189 {
190 printf("no impdata_create()\n");
191 return false;
192 }
193 //printf("configure()\n");
194
195 return true;
196 }
197
198 bool GxSimpleConvolver::update(int32_t count, float *impresp, uint32_t imprate)
199 {
200 CheckResample r(resamp);
201 impresp = r.resample(&count, impresp, imprate, samplerate);
202 if (!impresp)
203 {
204 return false;
205 }
206 if (impdata_update(0, 0, 1, impresp, 0, count))
207 {
208 return false;
209 }
210 return true;
211 }
212
213 bool GxSimpleConvolver::compute(int32_t count, float* input, float *output)
214 {
215 // printf("try run\n");
216 if (state() != Convproc::ST_PROC)
217 {
218 //printf("state() != ST_PROC\n");
219 if (input != output)
220 {
221 memcpy(output, input, count * sizeof(float));
222 }
223 if (state() == Convproc::ST_WAIT)
224 {
225 //printf("state() == ST_WAIT\n");
226 check_stop();
227 }
228 if (state() == ST_STOP)
229 {
230 //printf("state() == ST_STOP\n");
231 ready = false;
232 }
233 return true;
234 }
235 memcpy(inpdata(0), input, count * sizeof(float));
236
237 int32_t flags = process(sync);
238
239 memcpy(output, outdata(0), count * sizeof(float));
240 //printf("run\n");
241 return flags == 0;
242 }
243
244 void GxSimpleConvolver::run_static(uint32_t n_samples, GxSimpleConvolver *p, float *output)
245 {
246 if (!p->compute((int32_t)n_samples, output, output))
247 printf("convolver didn't run\n");
248 }
249
250 //////////////stero/////////////////
251
252 bool GxSimpleConvolver::configure_stereo(int32_t count, float *impresp, uint32_t imprate)
253 {
254 //printf("try configure()\n");
255 CheckResample r(resamp);
256 impresp = r.resample(&count, impresp, imprate, samplerate);
257 if (!impresp)
258 {
259 printf("no impresp\n");
260 return false;
261 }
262 cleanup();
263 uint32_t bufsize = buffersize;
264 if (bufsize < Convproc::MINPART)
265 {
266 bufsize = Convproc::MINPART;
267 }
268 if (Convproc::configure(2, 2, count, buffersize,
269 bufsize, bufsize)) // Convproc::MAXPART
270 {
271 printf("no configure\n");
272 return false;
273 }
274 if (impdata_create(0, 0, 1, impresp, 0, count) & impdata_create(1, 1, 1, impresp, 0, count))
275 {
276 printf("no impdata_create()\n");
277 return false;
278 }
279 //printf("configure()\n");
280
281 return true;
282 }
283
284 bool GxSimpleConvolver::update_stereo(int32_t count, float *impresp, uint32_t imprate)
285 {
286 CheckResample r(resamp);
287 impresp = r.resample(&count, impresp, imprate, samplerate);
288 if (!impresp)
289 {
290 return false;
291 }
292 if (impdata_update(0, 0, 1, impresp, 0, count) & impdata_update(1, 1, 1, impresp, 0, count))
293 {
294 return false;
295 }
296 return true;
297 }
298
299 bool GxSimpleConvolver::compute_stereo(int32_t count, float* input, float* input1, float *output, float *output1)
300 {
301 // printf("try run\n");
302 if (state() != Convproc::ST_PROC)
303 {
304 //printf("state() != ST_PROC\n");
305 if (input != output)
306 {
307 memcpy(output, input, count * sizeof(float));
308 memcpy(output1, input1, count * sizeof(float));
309 }
310 if (state() == Convproc::ST_WAIT)
311 {
312 //printf("state() == ST_WAIT\n");
313 check_stop();
314 }
315 if (state() == ST_STOP)
316 {
317 //printf("state() == ST_STOP\n");
318 ready = false;
319 }
320 return true;
321 }
322 memcpy(inpdata(0), input, count * sizeof(float));
323 memcpy(inpdata(1), input1, count * sizeof(float));
324 int32_t flags = process(sync);
325
326 memcpy(output, outdata(0), count * sizeof(float));
327 memcpy(output1, outdata(1), count * sizeof(float));
328 //printf("run\n");
329 return flags == 0;
330 }
331
332 void GxSimpleConvolver::run_static_stereo(uint32_t n_samples, GxSimpleConvolver *p, float *output, float *output1)
333 {
334 if (!p->compute_stereo((int32_t)n_samples, output, output1, output, output1))
335 printf("convolver didn't run\n");
336 }
+0
-112
src/LV2/gxamp.lv2/DSP/gx_convolver.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #pragma once
21
22 #ifndef SRC_HEADERS_GX_CONVOLVER_H_
23 #define SRC_HEADERS_GX_CONVOLVER_H_
24
25 #include <zita-convolver.h>
26 #include <stdint.h>
27 #include "gx_resampler.h"
28 /* GxConvolver */
29
30
31 class GxConvolverBase: protected Convproc
32 {
33 protected:
34 volatile bool ready;
35 bool sync;
36 void adjust_values(uint32_t audio_size, uint32_t& count, uint32_t& offset,
37 uint32_t& delay, uint32_t& ldelay, uint32_t& length,
38 uint32_t& size, uint32_t& bufsize);
39 uint32_t buffersize;
40 uint32_t samplerate;
41 GxConvolverBase(): ready(false), sync(false), buffersize(), samplerate() {}
42 ~GxConvolverBase();
43 public:
44 inline void set_buffersize(uint32_t sz)
45 {
46 buffersize = sz;
47 }
48 inline uint32_t get_buffersize()
49 {
50 return buffersize;
51 }
52 inline void set_samplerate(uint32_t sr)
53 {
54 samplerate = sr;
55 }
56 inline uint32_t get_samplerate()
57 {
58 return samplerate;
59 }
60 bool checkstate();
61 using Convproc::state;
62 inline void set_not_runnable()
63 {
64 ready = false;
65 }
66 inline bool is_runnable()
67 {
68 return ready;
69 }
70 bool start(int32_t policy, int32_t priority);
71 using Convproc::stop_process;
72 inline void set_sync(bool val)
73 {
74 sync = val;
75 }
76 };
77
78
79 class GxSimpleConvolver: public GxConvolverBase
80 {
81 private:
82 gx_resample::BufferResampler& resamp;
83 public:
84 int32_t cab_count;
85 uint32_t cab_sr;
86 float *cab_data;
87 float *cab_data_new;
88 GxSimpleConvolver(gx_resample::BufferResampler& resamp_)
89 : GxConvolverBase(), resamp(resamp_), cab_count(0), cab_sr(0),
90 cab_data(NULL), cab_data_new(NULL) {}
91 bool configure(int32_t count, float *impresp, uint32_t imprate);
92 bool update(int32_t count, float *impresp, uint32_t imprate);
93 bool compute(int32_t count, float* input, float *output);
94 bool compute(int32_t count, float* buffer)
95 {
96 return is_runnable() ? compute_stereo(count, buffer, buffer) : true;
97 }
98
99 bool configure_stereo(int32_t count, float *impresp, uint32_t imprate);
100 bool update_stereo(int32_t count, float *impresp, uint32_t imprate);
101 bool compute_stereo(int32_t count, float* input, float* input1, float *output, float *output1);
102 bool compute_stereo(int32_t count, float* buffer, float* buffer1)
103 {
104 return is_runnable() ? compute_stereo(count, buffer, buffer, buffer1, buffer1) : true;
105 }
106 static void run_static(uint32_t n_samples, GxSimpleConvolver*, float *output);
107 static void run_static_stereo(uint32_t n_samples, GxSimpleConvolver*, float *output, float *output1);
108 };
109
110
111 #endif // SRC_HEADERS_GX_CONVOLVER_H_
+0
-193
src/LV2/gxamp.lv2/DSP/gx_resampler.cc less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include "gx_resampler.h"
20
21 namespace gx_resample
22 {
23
24 // copyed gcd from (zita) resampler.cc to get ratio_a and ratio_b for
25 // calculate the correct buffer size resulting from resample
26 static uint32_t gcd (uint32_t a, uint32_t b)
27 {
28 if (a == 0) return b;
29 if (b == 0) return a;
30 while (1)
31 {
32 if (a > b)
33 {
34 a = a % b;
35 if (a == 0) return b;
36 if (a == 1) return 1;
37 }
38 else
39 {
40 b = b % a;
41 if (b == 0) return a;
42 if (b == 1) return 1;
43 }
44 }
45 return 1;
46 }
47
48 void SimpleResampler::setup(int32_t sampleRate, uint32_t fact)
49 {
50 assert(fact <= MAX_UPSAMPLE);
51 m_fact = fact;
52 const int32_t qual = 16; // resulting in a total delay of 2*qual (0.7ms @44100)
53 // upsampler
54 r_up.setup(sampleRate, sampleRate*fact, 1, qual);
55 // k == inpsize() == 2 * qual
56 // pre-fill with k-1 zeros
57 r_up.inp_count = r_up.inpsize() - 1;
58 r_up.out_count = 1;
59 r_up.inp_data = r_up.out_data = 0;
60 r_up.process();
61 // downsampler
62 r_down.setup(sampleRate*fact, sampleRate, 1, qual);
63 // k == inpsize() == 2 * qual * fact
64 // pre-fill with k-1 zeros
65 r_down.inp_count = r_down.inpsize() - 1;
66 r_down.out_count = 1;
67 r_down.inp_data = r_down.out_data = 0;
68 r_down.process();
69 }
70
71 void SimpleResampler::up(int32_t count, float *input, float *output)
72 {
73 r_up.inp_count = count;
74 r_up.inp_data = input;
75 r_up.out_count = count * m_fact;
76 r_up.out_data = output;
77 r_up.process();
78 assert(r_up.inp_count == 0);
79 assert(r_up.out_count == 0);
80 }
81
82 void SimpleResampler::down(int32_t count, float *input, float *output)
83 {
84 r_down.inp_count = count * m_fact;
85 r_down.inp_data = input;
86 r_down.out_count = count+1; // +1 == trick to drain input
87 r_down.out_data = output;
88 r_down.process();
89 assert(r_down.inp_count == 0);
90 assert(r_down.out_count == 1);
91 }
92
93 float *BufferResampler::process(int32_t fs_inp, int32_t ilen, float *input, int32_t fs_outp, int32_t *olen)
94 {
95 int32_t d = gcd(fs_inp, fs_outp);
96 int32_t ratio_a = fs_inp / d;
97 int32_t ratio_b = fs_outp / d;
98
99 const int32_t qual = 32;
100 if (setup(fs_inp, fs_outp, 1, qual) != 0)
101 {
102 return 0;
103 }
104 // pre-fill with k/2-1 zeros
105 int32_t k = inpsize();
106 inp_count = k/2-1;
107 inp_data = 0;
108 out_count = 1; // must be at least 1 to get going
109 out_data = 0;
110 if (Resampler::process() != 0)
111 {
112 return 0;
113 }
114 inp_count = ilen;
115 int32_t nout = out_count = (ilen * ratio_b + ratio_a - 1) / ratio_a;
116 inp_data = input;
117 float *p = out_data = new float[out_count];
118 if (Resampler::process() != 0)
119 {
120 delete p;
121 return 0;
122 }
123 inp_data = 0;
124 inp_count = k/2;
125 if (Resampler::process() != 0)
126 {
127 delete p;
128 return 0;
129 }
130 assert(inp_count == 0);
131 assert(out_count <= 1);
132 *olen = nout - out_count;
133 //printf("resampled from %i to: %i\n",fs_inp, fs_outp );
134 return p;
135 }
136
137 bool StreamingResampler::setup(int32_t srcRate, int32_t dstRate, int32_t nchan)
138 {
139 int32_t d = gcd(srcRate, dstRate);
140 ratio_a = srcRate / d;
141 ratio_b = dstRate / d;
142
143 const int32_t qual = 32;
144 if (Resampler::setup(srcRate, dstRate, nchan, qual) != 0)
145 {
146 return false;
147 }
148 inp_count = inpsize()/2-1;
149 inp_data = 0;
150 out_count = 1; // must be at least 1 to get going
151 out_data = 0;
152 if (Resampler::process() != 0)
153 {
154 return false;
155 }
156 assert(inp_count == 0);
157 assert(out_count == 1);
158 return true;
159 }
160
161 int32_t StreamingResampler::process(int32_t count, float *input, float *output)
162 {
163 inp_count = count;
164 int32_t olen = out_count = get_max_out_size(count);
165 inp_data = input;
166 out_data = output;
167 if (Resampler::process() != 0)
168 {
169 return 0;
170 }
171 assert(inp_count == 0);
172 return olen - out_count;
173 }
174
175 int32_t StreamingResampler::flush(float *output)
176 {
177 // maximum data written to output:
178 // srcRate > dstRate: ~ 2 * qual
179 // srcRate < dstRate: ~ 2 * qual * dstRate/srcRate
180 inp_data = 0;
181 inp_count = inpsize()/2;
182 out_data = output;
183 int32_t olen = out_count = get_max_out_size(inp_count);
184 if (Resampler::process() != 0)
185 {
186 return 0;
187 }
188 assert(inp_count == 0);
189 return olen - out_count;
190 }
191
192 } // namespace gx_resample
+0
-69
src/LV2/gxamp.lv2/DSP/gx_resampler.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #pragma once
21
22 #ifndef SRC_HEADERS_GX_RESAMPLER_H_
23 #define SRC_HEADERS_GX_RESAMPLER_H_
24
25 #include <zita-resampler/resampler.h>
26 #include <stdint.h>
27 #include <assert.h>
28
29 namespace gx_resample
30 {
31
32 #define MAX_UPSAMPLE 8
33
34 class SimpleResampler
35 {
36 private:
37 Resampler r_up, r_down;
38 int32_t m_fact;
39 public:
40 SimpleResampler(): r_up(), r_down(), m_fact() {}
41 void setup(int32_t sampleRate, uint32_t fact);
42 void up(int32_t count, float *input, float *output);
43 void down(int32_t count, float *input, float *output);
44 };
45
46 class BufferResampler: Resampler
47 {
48 public:
49 float *process(int32_t fs_inp, int32_t ilen, float *input, int32_t fs_outp, int32_t* olen);
50 };
51
52 class StreamingResampler: Resampler
53 {
54 private:
55 int32_t ratio_a;
56 int32_t ratio_b;
57 public:
58 bool setup(int32_t srcRate, int32_t dstRate, int32_t nchan);
59 int32_t get_max_out_size(int32_t i_size)
60 {
61 return (i_size * ratio_b) / ratio_a + 1;
62 }
63 int32_t process(int32_t count, float *input, float *output);
64 int32_t flush(float *output); // check source for max. output size
65 };
66
67 }
68 #endif // SRC_HEADERS_GX_RESAMPLER_H_
+0
-465
src/LV2/gxamp.lv2/DSP/gx_tonestack.cc less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20
21 inline void TonestackMono::clear_state_f()
22 {
23 for (int32_t i=0; i<4; i++) fRec0[i] = 0;
24 }
25
26 inline void TonestackMono::init(uint32_t samplingFreq)
27 {
28
29 fSamplingFreq = samplingFreq;
30 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
31 fConst1 = faustpower<2>(fConst0);
32 fConst2 = (3 * fConst0);
33 clear_state_f();
34 }
35
36 void TonestackMono::connect(uint32_t port,void* data)
37 {
38 switch ((PortIndex)port)
39 {
40 case MID:
41 fslider0_ = (float*)data;
42 break;
43 case BASS:
44 fslider1_ = (float*)data;
45 break;
46 case TREBLE:
47 fslider2_ = (float*)data;
48 break;
49 default:
50 break;
51 }
52 }
53
54 inline void TonestackMono::run(uint32_t n_samples, float *output) //sovtek
55 {
56 float fslider0 = *fslider0_;
57 float fslider1 = *fslider1_;
58 float fslider2 = *fslider2_;
59 double fSlow0 = fslider0;
60 double fSlow1 = (4.9434000000000004e-08 * fSlow0);
61 double fSlow2 = exp((3.4 * (fslider1 - 1)));
62 double fSlow3 = (7.748796000000001e-07 + ((2.8889960000000004e-05 * fSlow2) + (fSlow0 * (((4.943400000000001e-06 * fSlow2) - 1.2634599999999999e-07) - fSlow1))));
63 double fSlow4 = ((1.2443156000000004e-09 * fSlow2) - (1.2443156000000002e-11 * fSlow0));
64 double fSlow5 = (5.345780000000001e-09 * fSlow2);
65 double fSlow6 = (5.345780000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.101464400000001e-11))));
66 double fSlow7 = (fConst0 * fSlow6);
67 double fSlow8 = (0.00022 * fSlow0);
68 double fSlow9 = (0.022470000000000004 * fSlow2);
69 double fSlow10 = (fConst0 * (0.0025277 + (fSlow9 + fSlow8)));
70 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
71 double fSlow12 = (fConst2 * fSlow6);
72 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
73 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
74 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
75 double fSlow16 = fslider2;
76 double fSlow17 = ((fSlow0 * (1.2443156000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.345780000000001e-11 - (5.345780000000001e-11 * fSlow0)))));
77 double fSlow18 = (fConst2 * fSlow17);
78 double fSlow19 = (6.141960000000001e-08 + (((4.859800000000001e-07 * fSlow16) + (fSlow0 * (1.0113400000000001e-07 - fSlow1))) + (fSlow2 * (6.141960000000001e-06 + (4.943400000000001e-06 * fSlow0)))));
79 double fSlow20 = (0.00022470000000000001 + (fSlow9 + (fSlow8 + (0.00023500000000000002 * fSlow16))));
80 double fSlow21 = (fConst0 * fSlow20);
81 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
82 double fSlow23 = (fConst0 * fSlow17);
83 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
84 double fSlow25 = (fConst0 * (0 - fSlow20));
85 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
86 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
87 for (uint32_t i=0; i<n_samples; i++)
88 {
89 fRec0[0] = ((double)output[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
90 output[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
91 // post processing
92 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
93 }
94 }
95
96
97 inline void TonestackMono::run_soldano(uint32_t n_samples, float *output) //soldano
98 {
99 float fslider0 = *fslider0_;
100 float fslider1 = *fslider1_;
101 float fslider2 = *fslider2_;
102 double fSlow0 = fslider0;
103 double fSlow1 = (2.5587500000000006e-07 * fSlow0);
104 double fSlow2 = exp((3.4 * (fslider1 - 1)));
105 double fSlow3 = (7.717400000000001e-07 + ((2.2033600000000005e-05 * fSlow2) + (fSlow0 * (((1.0235000000000001e-05 * fSlow2) - 1.5537499999999997e-07) - fSlow1))));
106 double fSlow4 = ((1.3959000000000001e-09 * fSlow2) - (3.48975e-11 * fSlow0));
107 double fSlow5 = (2.2090000000000005e-09 * fSlow2);
108 double fSlow6 = (5.522500000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.0327500000000007e-11))));
109 double fSlow7 = (fConst0 * fSlow6);
110 double fSlow8 = (0.0005 * fSlow0);
111 double fSlow9 = (0.020470000000000002 * fSlow2);
112 double fSlow10 = (fConst0 * (0.0025092499999999998 + (fSlow9 + fSlow8)));
113 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
114 double fSlow12 = (fConst2 * fSlow6);
115 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
116 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
117 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
118 double fSlow16 = fslider2;
119 double fSlow17 = ((fSlow0 * (3.48975e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.522500000000001e-11 - (5.522500000000001e-11 * fSlow0)))));
120 double fSlow18 = (fConst2 * fSlow17);
121 double fSlow19 = (8.084000000000001e-08 + (((2.2090000000000003e-07 * fSlow16) + (fSlow0 * (3.146250000000001e-07 - fSlow1))) + (fSlow2 * (3.2336000000000007e-06 + (1.0235000000000001e-05 * fSlow0)))));
122 double fSlow20 = (0.00051175 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
123 double fSlow21 = (fConst0 * fSlow20);
124 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
125 double fSlow23 = (fConst0 * fSlow17);
126 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
127 double fSlow25 = (fConst0 * (0 - fSlow20));
128 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
129 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
130 for (uint32_t i=0; i<n_samples; i++)
131 {
132 fRec0[0] = ((double)output[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
133 output[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
134 // post processing
135 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
136 }
137 }
138
139 inline void TonestackMono::run_bassman(uint32_t n_samples, float *output) //bassman
140 {
141 float fslider0 = *fslider0_;
142 float fslider1 = *fslider1_;
143 float fslider2 = *fslider2_;
144 double fSlow0 = fslider0;
145 double fSlow1 = (2.5312500000000006e-07 * fSlow0);
146 double fSlow2 = exp((3.4 * (fslider1 - 1)));
147 double fSlow3 = (7.4525e-07 + ((2.4210000000000004e-05 * fSlow2) + (fSlow0 * (((1.0125e-05 * fSlow2) - 2.75625e-07) - fSlow1))));
148 double fSlow4 = ((7.650000000000002e-10 * fSlow2) - (1.9125000000000002e-11 * fSlow0));
149 double fSlow5 = (1.4000000000000001e-09 * fSlow2);
150 double fSlow6 = (3.500000000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 1.5875000000000007e-11))));
151 double fSlow7 = (fConst0 * fSlow6);
152 double fSlow8 = (0.0005 * fSlow0);
153 double fSlow9 = (0.02025 * fSlow2);
154 double fSlow10 = (fConst0 * (0.0028087500000000005 + (fSlow9 + fSlow8)));
155 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
156 double fSlow12 = (fConst2 * fSlow6);
157 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
158 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
159 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
160 double fSlow16 = fslider2;
161 double fSlow17 = ((fSlow0 * (1.9125000000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (3.500000000000001e-11 - (3.500000000000001e-11 * fSlow0)))));
162 double fSlow18 = (fConst2 * fSlow17);
163 double fSlow19 = (4.525e-08 + (((1.4e-07 * fSlow16) + (fSlow0 * (2.8437500000000003e-07 - fSlow1))) + (fSlow2 * (1.8100000000000002e-06 + (1.0125e-05 * fSlow0)))));
164 double fSlow20 = (0.00050625 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
165 double fSlow21 = (fConst0 * fSlow20);
166 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
167 double fSlow23 = (fConst0 * fSlow17);
168 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
169 double fSlow25 = (fConst0 * (0 - fSlow20));
170 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
171 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
172 for (uint32_t i=0; i<n_samples; i++)
173 {
174 fRec0[0] = ((double)output[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
175 output[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
176 // post processing
177 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
178 }
179
180 }
181
182
183 inline void TonestackMono::run_ampeg(uint32_t n_samples, float *output) //ampeg
184 {
185 float fslider0 = *fslider0_;
186 float fslider1 = *fslider1_;
187 float fslider2 = *fslider2_;
188 double fSlow0 = fslider0;
189 double fSlow1 = (3.0896250000000005e-07 * fSlow0);
190 double fSlow2 = exp((3.4 * (fslider1 - 1)));
191 double fSlow3 = (6.338090000000001e-07 + ((1.8734760000000003e-05 * fSlow2) + (fSlow0 * (((1.2358500000000002e-05 * fSlow2) - 1.361249999999999e-08) - fSlow1))));
192 double fSlow4 = ((1.6037340000000005e-09 * fSlow2) - (4.0093350000000015e-11 * fSlow0));
193 double fSlow5 = (1.8198400000000004e-09 * fSlow2);
194 double fSlow6 = (4.5496000000000015e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 5.40265e-12))));
195 double fSlow7 = (fConst0 * fSlow6);
196 double fSlow8 = (0.00055 * fSlow0);
197 double fSlow9 = (0.022470000000000004 * fSlow2);
198 double fSlow10 = (fConst0 * (0.00208725 + (fSlow9 + fSlow8)));
199 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
200 double fSlow12 = (fConst2 * fSlow6);
201 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
202 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
203 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
204 double fSlow16 = fslider2;
205 double fSlow17 = ((fSlow0 * (4.0093350000000015e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.5496000000000015e-11 - (4.5496000000000015e-11 * fSlow0)))));
206 double fSlow18 = (fConst2 * fSlow17);
207 double fSlow19 = (8.1169e-08 + (((1.6544000000000003e-07 * fSlow16) + (fSlow0 * (3.735875000000001e-07 - fSlow1))) + (fSlow2 * (3.24676e-06 + (1.2358500000000002e-05 * fSlow0)))));
208 double fSlow20 = (0.0005617500000000001 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
209 double fSlow21 = (fConst0 * fSlow20);
210 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
211 double fSlow23 = (fConst0 * fSlow17);
212 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
213 double fSlow25 = (fConst0 * (0 - fSlow20));
214 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
215 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
216 for (uint32_t i=0; i<n_samples; i++)
217 {
218 fRec0[0] = ((double)output[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
219 output[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
220 // post processing
221 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
222 }
223 }
224
225
226 void TonestackMono::init_static(uint32_t samplingFreq, TonestackMono *p)
227 {
228 p->init(samplingFreq);
229 }
230
231 void TonestackMono::connect_static(uint32_t port,void* data, TonestackMono *p)
232 {
233 p->connect(port, data);
234 }
235
236 ////////////////////////////// STEREO //////////////////////////////////
237
238
239 inline void TonestackStereo::clear_state_f()
240 {
241 for (int32_t i=0; i<4; i++) fRec0[i] = 0;
242 for (int32_t i=0; i<4; i++) fRec1[i] = 0;
243 }
244
245
246 inline void TonestackStereo::init(uint32_t samplingFreq)
247 {
248 fSamplingFreq = samplingFreq;
249 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
250 fConst1 = faustpower<2>(fConst0);
251 fConst2 = (3 * fConst0);
252 clear_state_f();
253 }
254
255
256 void TonestackStereo::connect(uint32_t port,void* data)
257 {
258 switch ((PortIndex)port)
259 {
260 case MID:
261 fslider0_ = (float*)data;
262 break;
263 case BASS:
264 fslider1_ = (float*)data;
265 break;
266 case TREBLE:
267 fslider2_ = (float*)data;
268 break;
269 default:
270 break;
271 }
272 }
273
274 inline void TonestackStereo::run(uint32_t count, float *output0, float *output1)
275 {
276 float fslider0 = *fslider0_;
277 float fslider1 = *fslider1_;
278 float fslider2 = *fslider2_;
279 double fSlow0 = fslider0;
280 double fSlow1 = (4.9434000000000004e-08 * fSlow0);
281 double fSlow2 = exp((3.4 * (fslider1 - 1)));
282 double fSlow3 = (7.748796000000001e-07 + ((2.8889960000000004e-05 * fSlow2) + (fSlow0 * (((4.943400000000001e-06 * fSlow2) - 1.2634599999999999e-07) - fSlow1))));
283 double fSlow4 = ((1.2443156000000004e-09 * fSlow2) - (1.2443156000000002e-11 * fSlow0));
284 double fSlow5 = (5.345780000000001e-09 * fSlow2);
285 double fSlow6 = (5.345780000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 4.101464400000001e-11))));
286 double fSlow7 = (fConst0 * fSlow6);
287 double fSlow8 = (0.00022 * fSlow0);
288 double fSlow9 = (0.022470000000000004 * fSlow2);
289 double fSlow10 = (fConst0 * (0.0025277 + (fSlow9 + fSlow8)));
290 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
291 double fSlow12 = (fConst2 * fSlow6);
292 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
293 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
294 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
295 double fSlow16 = fslider2;
296 double fSlow17 = ((fSlow0 * (1.2443156000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.345780000000001e-11 - (5.345780000000001e-11 * fSlow0)))));
297 double fSlow18 = (fConst2 * fSlow17);
298 double fSlow19 = (6.141960000000001e-08 + (((4.859800000000001e-07 * fSlow16) + (fSlow0 * (1.0113400000000001e-07 - fSlow1))) + (fSlow2 * (6.141960000000001e-06 + (4.943400000000001e-06 * fSlow0)))));
299 double fSlow20 = (0.00022470000000000001 + (fSlow9 + (fSlow8 + (0.00023500000000000002 * fSlow16))));
300 double fSlow21 = (fConst0 * fSlow20);
301 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
302 double fSlow23 = (fConst0 * fSlow17);
303 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
304 double fSlow25 = (fConst0 * (0 - fSlow20));
305 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
306 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
307 for (uint32_t i=0; i<count; i++)
308 {
309 fRec0[0] = ((double)output0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
310 output0[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
311 fRec1[0] = ((double)output1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
312 output1[i] = (float)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
313 // post processing
314 for (int32_t i=3; i>0; i--) fRec1[i] = fRec1[i-1];
315 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
316 }
317 }
318
319
320 inline void TonestackStereo::run_soldano(uint32_t count, float *output0, float *output1) //soldano
321 {
322 float fslider0 = *fslider0_;
323 float fslider1 = *fslider1_;
324 float fslider2 = *fslider2_;
325 double fSlow0 = fslider0;
326 double fSlow1 = (2.5587500000000006e-07 * fSlow0);
327 double fSlow2 = exp((3.4 * (fslider1 - 1)));
328 double fSlow3 = (7.717400000000001e-07 + ((2.2033600000000005e-05 * fSlow2) + (fSlow0 * (((1.0235000000000001e-05 * fSlow2) - 1.5537499999999997e-07) - fSlow1))));
329 double fSlow4 = ((1.3959000000000001e-09 * fSlow2) - (3.48975e-11 * fSlow0));
330 double fSlow5 = (2.2090000000000005e-09 * fSlow2);
331 double fSlow6 = (5.522500000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 2.0327500000000007e-11))));
332 double fSlow7 = (fConst0 * fSlow6);
333 double fSlow8 = (0.0005 * fSlow0);
334 double fSlow9 = (0.020470000000000002 * fSlow2);
335 double fSlow10 = (fConst0 * (0.0025092499999999998 + (fSlow9 + fSlow8)));
336 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
337 double fSlow12 = (fConst2 * fSlow6);
338 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
339 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
340 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
341 double fSlow16 = fslider2;
342 double fSlow17 = ((fSlow0 * (3.48975e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (5.522500000000001e-11 - (5.522500000000001e-11 * fSlow0)))));
343 double fSlow18 = (fConst2 * fSlow17);
344 double fSlow19 = (8.084000000000001e-08 + (((2.2090000000000003e-07 * fSlow16) + (fSlow0 * (3.146250000000001e-07 - fSlow1))) + (fSlow2 * (3.2336000000000007e-06 + (1.0235000000000001e-05 * fSlow0)))));
345 double fSlow20 = (0.00051175 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
346 double fSlow21 = (fConst0 * fSlow20);
347 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
348 double fSlow23 = (fConst0 * fSlow17);
349 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
350 double fSlow25 = (fConst0 * (0 - fSlow20));
351 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
352 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
353 for (uint32_t i=0; i<count; i++)
354 {
355 fRec0[0] = ((double)output0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
356 output0[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
357 fRec1[0] = ((double)output1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
358 output1[i] = (float)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
359 // post processing
360 for (int32_t i=3; i>0; i--) fRec1[i] = fRec1[i-1];
361 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
362 }
363 }
364
365 inline void TonestackStereo::run_bassman(uint32_t count, float *output0, float *output1) // bassman
366 {
367 float fslider0 = *fslider0_;
368 float fslider1 = *fslider1_;
369 float fslider2 = *fslider2_;
370 double fSlow0 = fslider0;
371 double fSlow1 = (2.5312500000000006e-07 * fSlow0);
372 double fSlow2 = exp((3.4 * (fslider1 - 1)));
373 double fSlow3 = (7.4525e-07 + ((2.4210000000000004e-05 * fSlow2) + (fSlow0 * (((1.0125e-05 * fSlow2) - 2.75625e-07) - fSlow1))));
374 double fSlow4 = ((7.650000000000002e-10 * fSlow2) - (1.9125000000000002e-11 * fSlow0));
375 double fSlow5 = (1.4000000000000001e-09 * fSlow2);
376 double fSlow6 = (3.500000000000001e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 1.5875000000000007e-11))));
377 double fSlow7 = (fConst0 * fSlow6);
378 double fSlow8 = (0.0005 * fSlow0);
379 double fSlow9 = (0.02025 * fSlow2);
380 double fSlow10 = (fConst0 * (0.0028087500000000005 + (fSlow9 + fSlow8)));
381 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
382 double fSlow12 = (fConst2 * fSlow6);
383 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
384 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
385 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
386 double fSlow16 = fslider2;
387 double fSlow17 = ((fSlow0 * (1.9125000000000002e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (3.500000000000001e-11 - (3.500000000000001e-11 * fSlow0)))));
388 double fSlow18 = (fConst2 * fSlow17);
389 double fSlow19 = (4.525e-08 + (((1.4e-07 * fSlow16) + (fSlow0 * (2.8437500000000003e-07 - fSlow1))) + (fSlow2 * (1.8100000000000002e-06 + (1.0125e-05 * fSlow0)))));
390 double fSlow20 = (0.00050625 + (fSlow9 + (fSlow8 + (6.25e-05 * fSlow16))));
391 double fSlow21 = (fConst0 * fSlow20);
392 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
393 double fSlow23 = (fConst0 * fSlow17);
394 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
395 double fSlow25 = (fConst0 * (0 - fSlow20));
396 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
397 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
398 for (uint32_t i=0; i<count; i++)
399 {
400 fRec0[0] = ((double)output0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
401 output0[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
402 fRec1[0] = ((double)output1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
403 output1[i] = (float)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
404 // post processing
405 for (int32_t i=3; i>0; i--) fRec1[i] = fRec1[i-1];
406 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
407 }
408 }
409
410 inline void TonestackStereo::run_ampeg(uint32_t count, float *output0, float *output1) //ampeg
411 {
412 float fslider0 = *fslider0_;
413 float fslider1 = *fslider1_;
414 float fslider2 = *fslider2_;
415 double fSlow0 = fslider0;
416 double fSlow1 = (3.0896250000000005e-07 * fSlow0);
417 double fSlow2 = exp((3.4 * (fslider1 - 1)));
418 double fSlow3 = (6.338090000000001e-07 + ((1.8734760000000003e-05 * fSlow2) + (fSlow0 * (((1.2358500000000002e-05 * fSlow2) - 1.361249999999999e-08) - fSlow1))));
419 double fSlow4 = ((1.6037340000000005e-09 * fSlow2) - (4.0093350000000015e-11 * fSlow0));
420 double fSlow5 = (1.8198400000000004e-09 * fSlow2);
421 double fSlow6 = (4.5496000000000015e-11 + (fSlow5 + (fSlow0 * (fSlow4 - 5.40265e-12))));
422 double fSlow7 = (fConst0 * fSlow6);
423 double fSlow8 = (0.00055 * fSlow0);
424 double fSlow9 = (0.022470000000000004 * fSlow2);
425 double fSlow10 = (fConst0 * (0.00208725 + (fSlow9 + fSlow8)));
426 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
427 double fSlow12 = (fConst2 * fSlow6);
428 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
429 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
430 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
431 double fSlow16 = fslider2;
432 double fSlow17 = ((fSlow0 * (4.0093350000000015e-11 + fSlow4)) + (fSlow16 * (fSlow5 + (4.5496000000000015e-11 - (4.5496000000000015e-11 * fSlow0)))));
433 double fSlow18 = (fConst2 * fSlow17);
434 double fSlow19 = (8.1169e-08 + (((1.6544000000000003e-07 * fSlow16) + (fSlow0 * (3.735875000000001e-07 - fSlow1))) + (fSlow2 * (3.24676e-06 + (1.2358500000000002e-05 * fSlow0)))));
435 double fSlow20 = (0.0005617500000000001 + (fSlow9 + (fSlow8 + (0.00011750000000000001 * fSlow16))));
436 double fSlow21 = (fConst0 * fSlow20);
437 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
438 double fSlow23 = (fConst0 * fSlow17);
439 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
440 double fSlow25 = (fConst0 * (0 - fSlow20));
441 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
442 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
443 for (uint32_t i=0; i<count; i++)
444 {
445 fRec0[0] = ((double)output0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
446 output0[i] = (float)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
447 fRec1[0] = ((double)output1[i] - (fSlow15 * (((fSlow14 * fRec1[2]) + (fSlow13 * fRec1[1])) + (fSlow11 * fRec1[3]))));
448 output1[i] = (float)(fSlow15 * ((fSlow27 * fRec1[0]) + ((fSlow26 * fRec1[1]) + ((fSlow24 * fRec1[3]) + (fSlow22 * fRec1[2])))));
449 // post processing
450 for (int32_t i=3; i>0; i--) fRec1[i] = fRec1[i-1];
451 for (int32_t i=3; i>0; i--) fRec0[i] = fRec0[i-1];
452 }
453 }
454
455
456 void TonestackStereo::init_static(uint32_t samplingFreq, TonestackStereo *p)
457 {
458 p->init(samplingFreq);
459 }
460
461 void TonestackStereo::connect_static(uint32_t port,void* data, TonestackStereo *p)
462 {
463 p->connect(port, data);
464 }
+0
-93
src/LV2/gxamp.lv2/DSP/gx_tonestack.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GX_TONESTACK_H_
22 #define SRC_HEADERS_GX_TONESTACK_H_
23
24 class TonestackMono
25 {
26 private:
27 int32_t fSamplingFreq;
28 float fslider0;
29 float *fslider0_;
30 float fslider1;
31 float *fslider1_;
32 double fConst0;
33 double fConst1;
34 double fConst2;
35 double fRec0[4];
36 float fslider2;
37 float *fslider2_;
38 void clear_state_f();
39 void init(uint32_t samplingFreq);
40 void connect(uint32_t port,void* data);
41
42
43 public:
44 void run_bassman(uint32_t n_samples, float *output);
45 void run(uint32_t n_samples, float *output);
46 void run_soldano(uint32_t n_samples, float *output);
47 void run_ampeg(uint32_t n_samples, float *output);
48 static void init_static(uint32_t samplingFreq, TonestackMono *p);
49 static void connect_static(uint32_t port,void* data, TonestackMono *p);
50 //static void run_static(uint32_t n_samples, TonestackMono*, float *output);
51
52 TonestackMono() {};
53 ~TonestackMono() {};
54 };
55
56
57
58 class TonestackStereo
59 {
60 private:
61 int32_t fSamplingFreq;
62 float fslider0;
63 float *fslider0_;
64 float fslider1;
65 float *fslider1_;
66 double fConst0;
67 double fConst1;
68 double fConst2;
69 double fRec0[4];
70 double fRec1[4];
71 float fslider2;
72 float *fslider2_;
73 void clear_state_f();
74 void init(uint32_t samplingFreq);
75 void connect(uint32_t port,void* data);
76 public:
77
78 void run_bassman(uint32_t n_samples, float *output, float *output1);
79 void run(uint32_t n_samples, float *output, float *output1);
80 void run_soldano(uint32_t n_samples, float *output, float *output1);
81 void run_ampeg(uint32_t n_samples, float *output, float *output1);
82 static void init_static(uint32_t samplingFreq, TonestackStereo *p);
83 static void connect_static(uint32_t port,void* data, TonestackStereo *p);
84 //static void run_static(uint32_t n_samples, TonestackStereo*, float *output, float *output1);
85 TonestackStereo() {};
86 ~TonestackStereo() {};
87 };
88
89
90
91 #endif //SRC_HEADERS_GX_TONESTACK_H_
92
+0
-34
src/LV2/gxamp.lv2/DSP/impulse_former.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <stdint.h>
20
21 class Impf
22 {
23 public:
24 inline void compute(int32_t count, float *input0, float *output0, float value) {
25 double fSlow0 = value* value * 0.01;
26 for (int32_t i=0; i<count; i++) {
27 output0[i] = fSlow0 * input0[i];
28 }
29 };
30 Impf() {};
31 ~Impf() {};
32 };
33
+0
-114
src/LV2/gxamp.lv2/DSP/valve.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #pragma once
21
22 #ifndef SRC_HEADERS_VALVE_H_
23 #define SRC_HEADERS_VALVE_H_
24
25 /****************************************************************
26 * 1-dimensional function tables for linear interpolation
27 *
28 * table1d and table1d_imp<size> must only differ in the last
29 * element, so that the typecast for tubetab below will work.
30 * Can't use inheritance because then C initializers will not
31 * work and initialization will be more awkward or less efficient.
32 */
33
34 struct table1d // 1-dimensional function table
35 {
36 float low;
37 float high;
38 float istep;
39 int32_t size;
40 float data[];
41 };
42
43 template <int32_t tab_size>
44 struct table1d_imp
45 {
46 float low;
47 float high;
48 float istep;
49 int32_t size;
50 float data[tab_size];
51 operator table1d&() const
52 {
53 return *(table1d*)this;
54 }
55 };
56
57 /*
58 * data tables generated by tools/tube_transfer.py
59 */
60 #include "12ax7.cc"
61 #include "12AT7.cc"
62 #include "6C16.cc"
63 #include "6V6.cc"
64 #include "6DJ8.cc"
65
66 enum
67 {
68 TUBE_TABLE_12AX7_68k,
69 TUBE_TABLE_12AX7_250k,
70 TUBE_TABLE_12AT7_68k,
71 TUBE_TABLE_12AT7_250k,
72 TUBE_TABLE_6C16_68k,
73 TUBE_TABLE_6C16_250k,
74 TUBE_TABLE_6V6_68k,
75 TUBE_TABLE_6V6_250k,
76 TUBE_TABLE_6DJ8_68k,
77 TUBE_TABLE_6DJ8_250k,
78 TUBE_TABLE_SIZE
79 };
80
81 table1d *tubetab[TUBE_TABLE_SIZE] =
82 {
83 &static_cast<table1d&>(tubetable_12AX7[0]),
84 &static_cast<table1d&>(tubetable_12AX7[1]),
85 &static_cast<table1d&>(tubetable_12AT7[0]),
86 &static_cast<table1d&>(tubetable_12AT7[1]),
87 &static_cast<table1d&>(tubetable_6C16[0]),
88 &static_cast<table1d&>(tubetable_6C16[1]),
89 &static_cast<table1d&>(tubetable_6V6[0]),
90 &static_cast<table1d&>(tubetable_6V6[1]),
91 &static_cast<table1d&>(tubetable_6DJ8[0]),
92 &static_cast<table1d&>(tubetable_6DJ8[1]),
93 };
94
95 /*
96 * definitions for ffunction(float Ftube(int32_t,float), "valve.h", "");
97 * in gx_amp.dsp - gx_ampmodul.dsp
98 */
99
100 static inline double Ftube(int32_t table, double Vgk)
101 {
102 const table1d& tab = *tubetab[table];
103 double f = (Vgk - tab.low) * tab.istep;
104 int32_t i = static_cast<int32_t>(f);
105 if (i < 0)
106 return tab.data[0];
107 if (i >= tab.size-1)
108 return tab.data[tab.size-1];
109 f -= i;
110 return tab.data[i]*(1-f) + tab.data[i+1]*f;
111 }
112
113 #endif
src/LV2/gxamp.lv2/GUI/amp21.png less more
Binary diff not shown
+0
-12
src/LV2/gxamp.lv2/GUI/amp21_DISCLAIMER less more
0
1 amp21.png is created by Richard Dalton,
2
3 he gives us permission to distribute it under the terms of the
4 GNU General Public License either version 2 of the License,
5 or (at your option) any later version.
6
7 see: http://www.Ampskindesigns.com
8 for more information
9
10 You should have received a copy of the GNU General Public License
11 If not, see <http://www.gnu.org/licenses/>.
src/LV2/gxamp.lv2/GUI/amp22.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/amp23.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/amp24.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/amp25.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/autowah.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/bass-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/black-knob-middle.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/black-knob-small.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/black-knob.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/booster-knob.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/booster.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/cabinet-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/distortion-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/drive-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/knob-middle.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/knob-small.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/knob.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/mastergain-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/metalic1-knob-middle.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/metalic1-knob-small.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/metalic1-knob.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/mid-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/pregain-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/presence-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/treble-label.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/ts9-knob.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/ts9.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/wah-pedal.png less more
Binary diff not shown
src/LV2/gxamp.lv2/GUI/wah.png less more
Binary diff not shown
+0
-669
src/LV2/gxamp.lv2/StereoAmp/gxamp_stereo.cpp less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <cstdlib>
20 #include <cmath>
21 #include <iostream>
22 #include <cstring>
23 #include <glibmm.h>
24 #include <unistd.h>
25
26 #ifdef __SSE__
27 /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
28 flags to avoid costly denormals */
29 #ifdef __SSE3__
30 #include <pmmintrin.h>
31 inline void AVOIDDENORMALS()
32 {
33 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
34 _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
35 }
36 #else
37 #include <xmmintrin.h>
38 inline void AVOIDDENORMALS()
39 {
40 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
41 }
42 #endif //__SSE3__
43
44 #else
45 inline void AVOIDDENORMALS() {}
46 #endif //__SSE__
47
48 // faust support
49 #define FAUSTFLOAT float
50 #ifndef N_
51 #define N_(String) (String)
52 #endif
53 #define max(x, y) (((x) > (y)) ? (x) : (y))
54 #define min(x, y) (((x) < (y)) ? (x) : (y))
55 template <int32_t N> inline float faustpower(float x)
56 {
57 return powf(x, N);
58 }
59 template <int32_t N> inline double faustpower(double x)
60 {
61 return pow(x, N);
62 }
63 template <int32_t N> inline int32_t faustpower(int32_t x)
64 {
65 return faustpower<N/2>(x) * faustpower<N-N/2>(x);
66 }
67 template <> inline int32_t faustpower<0>(int32_t x)
68 {
69 return 1;
70 }
71 template <> inline int32_t faustpower<1>(int32_t x)
72 {
73 return x;
74 }
75
76 /****************************************************************
77 ** "atomic" value access
78 */
79
80 inline void atomic_set(volatile int32_t* p, int32_t v)
81 {
82 g_atomic_int_set(p, v);
83 }
84
85 inline int32_t atomic_get(volatile int32_t& p)
86 {
87 return g_atomic_int_get(&p);
88 }
89
90 inline bool atomic_compare_and_exchange(volatile int32_t *p, int32_t oldv, int32_t newv)
91 {
92 return g_atomic_int_compare_and_exchange(p, oldv, newv);
93 }
94
95 template <class T>
96 inline void atomic_set(T **p, T *v)
97 {
98 g_atomic_pointer_set(p, v);
99 }
100
101 template <class T>
102 inline void atomic_set_0(T **p)
103 {
104 g_atomic_pointer_set(p, 0);
105 }
106
107 template <class T>
108 inline T *atomic_get(T*& p)
109 {
110 return static_cast<T*>(g_atomic_pointer_get(&p));
111 }
112
113 template <class T>
114 inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv)
115 {
116 return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), oldv, newv);
117 }
118
119
120 #include "gxamp.h"
121 #include "gx_resampler.h"
122 #include "gx_convolver.h"
123 #include "gx_tonestack.h"
124 #include "gx_amp.h"
125 #include "impulse_former.h"
126 #include "ampulse_former.h"
127
128 // define run pointer typs
129 typedef void (GxAmpStereo::*run_amp_stereo)
130 (uint32_t count,float* input, float* input1, float* output, float* output1);
131
132 typedef void (TonestackStereo::*run_tonestack_stereo)
133 (uint32_t count, float *output, float *output1);
134
135 //////////////////////////// STEREO ////////////////////////////////////
136
137 class GxPluginStereo
138 {
139 private:
140 // internal stuff
141 float* output;
142 float* input;
143 float* output1;
144 float* input1;
145 uint32_t tubesel;
146 int32_t prio;
147 TonestackStereo ts;
148 run_tonestack_stereo _ts_ptr;
149 GxAmpStereo amplifier;
150 run_amp_stereo _as_ptr;
151 gx_resample::BufferResampler resamp;
152 GxSimpleConvolver cabconv;
153 Impf impf;
154 gx_resample::BufferResampler resamp1;
155 GxSimpleConvolver ampconv;
156 Ampf ampf;
157 uint32_t bufsize;
158 LV2_Atom_Sequence* c_notice;
159 LV2_Atom_Sequence* n_notice;
160 float *clevel;
161 float clevel_;
162 float cab;
163 bool cab_changed()
164 {
165 return abs(cab - clevel_) > 0.1;
166 }
167 void update_cab()
168 {
169 cab = clevel_;
170 }
171 float *alevel;
172 float alevel_;
173 float pre;
174 bool pre_changed()
175 {
176 return abs(pre - alevel_) > 0.1;
177 }
178 void update_pre()
179 {
180 pre = alevel_;
181 }
182 float val;
183 bool val_changed()
184 {
185 return abs(val - (*alevel) -(*clevel)) > 0.1;
186 }
187 void update_val()
188 {
189 val = (alevel_ + clevel_);
190 }
191 bool doit;
192 volatile int32_t schedule_wait;
193
194
195 public:
196 // LV2 stuff
197 LV2_URID_Map* map;
198 LV2_Worker_Schedule* schedule;
199
200 void set_tubesel_stereo(const LV2_Descriptor* descriptor);
201 inline void run_dsp_stereo(uint32_t n_samples);
202 void connect_stereo(uint32_t port,void* data);
203 inline void init_dsp_stereo(uint32_t rate, uint32_t bufsize_);
204 inline void do_work_stereo();
205 inline void connect_all_stereo_ports(uint32_t port, void* data);
206
207 GxPluginStereo() :
208 output(NULL),
209 input(NULL),
210 output1(NULL),
211 input1(NULL),
212 tubesel(0),
213 prio(0),
214 ts(TonestackStereo()),
215 amplifier(GxAmpStereo()),
216 cabconv(GxSimpleConvolver(resamp)),
217 impf(Impf()),
218 ampconv(GxSimpleConvolver(resamp1)),
219 ampf(Ampf()),
220 bufsize(0),
221 clevel(NULL),
222 clevel_(0),
223 cab(0),
224 alevel(NULL),
225 alevel_(0),
226 pre(0),
227 val(0)
228 {
229 atomic_set(&schedule_wait,0);
230 };
231
232 ~GxPluginStereo()
233 {
234 cabconv.stop_process();
235 ampconv.stop_process();
236 };
237 };
238
239
240 #include "cab_data.cc"
241 #include "gx_tonestack.cc"
242 #include "gx_amp.cc"
243
244 // plugin stuff
245
246 void GxPluginStereo::do_work_stereo()
247 {
248 if (cab_changed())
249 {
250 if (cabconv.is_runnable())
251 {
252 cabconv.set_not_runnable();
253 cabconv.stop_process();
254 }
255 float cab_irdata_c[cabconv.cab_count];
256 impf.compute(cabconv.cab_count, cabconv.cab_data, cab_irdata_c, clevel_);
257 cabconv.cab_data_new = cab_irdata_c;
258 while (!cabconv.checkstate());
259 if (!cabconv.update_stereo(cabconv.cab_count, cabconv.cab_data_new, cabconv.cab_sr))
260 printf("cabconv.update fail.\n");
261 if(!cabconv.start(prio, SCHED_FIFO))
262 printf("cabinet convolver disabled\n");
263 update_cab();
264 //printf("cabinet convolver updated\n");
265 }
266 if (pre_changed())
267 {
268 if (ampconv.is_runnable())
269 {
270 ampconv.set_not_runnable();
271 ampconv.stop_process();
272 }
273 float pre_irdata_c[contrast_ir_desc.ir_count];
274 ampf.compute(contrast_ir_desc.ir_count,contrast_ir_desc.ir_data, pre_irdata_c, alevel_);
275 while (!ampconv.checkstate());
276 if (!ampconv.update_stereo(contrast_ir_desc.ir_count, pre_irdata_c, contrast_ir_desc.ir_sr))
277 printf("ampconv.update fail.\n");
278 if(!ampconv.start(prio, SCHED_FIFO))
279 printf("presence convolver disabled\n");
280 update_pre();
281 //printf("presence convolver updated\n");
282 }
283 update_val();
284 atomic_set(&schedule_wait,0);
285 }
286
287 void GxPluginStereo::set_tubesel_stereo(const LV2_Descriptor* descriptor)
288 {
289 if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12ax7_stereo",descriptor->URI)== 0)
290 {
291 printf("12ax7_stereo\n");
292 _as_ptr = &GxAmpStereo::run_12ax7;
293 _ts_ptr = &TonestackStereo::run;
294 cabconv.cab_count = cab_data_4x12.ir_count;
295 cabconv.cab_sr = cab_data_4x12.ir_sr;
296 cabconv.cab_data = cab_data_4x12.ir_data;
297 tubesel = 1;
298 }
299 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12AT7_stereo",descriptor->URI)== 0)
300 {
301 printf("12AT7_stereo\n");
302 _as_ptr = &GxAmpStereo::run_12AT7;
303 _ts_ptr = &TonestackStereo::run_soldano;
304 cabconv.cab_count = cab_data_AC30.ir_count;
305 cabconv.cab_sr = cab_data_AC30.ir_sr;
306 cabconv.cab_data = cab_data_AC30.ir_data;
307 tubesel = 2;
308 }
309 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6C16_stereo",descriptor->URI)== 0)
310 {
311 printf("6C16_stereo\n");
312 _as_ptr = &GxAmpStereo::run_6C16;
313 _ts_ptr = &TonestackStereo::run_bassman;
314 cabconv.cab_count = cab_data_1x15.ir_count;
315 cabconv.cab_sr = cab_data_1x15.ir_sr;
316 cabconv.cab_data = cab_data_1x15.ir_data;
317 tubesel = 3;
318 }
319 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6V6_stereo",descriptor->URI)== 0)
320 {
321 printf("6V6_stereo\n");
322 _as_ptr = &GxAmpStereo::run_6V6;
323 _ts_ptr = &TonestackStereo::run_soldano;
324 cabconv.cab_count = cab_data_mesa.ir_count;
325 cabconv.cab_sr = cab_data_mesa.ir_sr;
326 cabconv.cab_data = cab_data_mesa.ir_data;
327 tubesel = 4;
328 }
329 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6DJ8_stereo",descriptor->URI)== 0)
330 {
331 printf("6DJ8_stereo\n");
332 _as_ptr = &GxAmpStereo::run_6DJ8;
333 _ts_ptr = &TonestackStereo::run_ampeg;
334 cabconv.cab_count = cab_data_HighGain.ir_count;
335 cabconv.cab_sr = cab_data_HighGain.ir_sr;
336 cabconv.cab_data = cab_data_HighGain.ir_data;
337 tubesel = 5;
338 }
339 else
340 {
341 _as_ptr = &GxAmpStereo::run_12ax7;
342 _ts_ptr = &TonestackStereo::run;
343 cabconv.cab_count = cab_data_4x12.ir_count;
344 cabconv.cab_sr = cab_data_4x12.ir_sr;
345 cabconv.cab_data = cab_data_4x12.ir_data;
346 tubesel = 0;
347 }
348 }
349
350 void GxPluginStereo::init_dsp_stereo(uint32_t rate, uint32_t bufsize_)
351 {
352 AVOIDDENORMALS();
353
354 bufsize = bufsize_;
355 amplifier.init_static(rate, &amplifier);
356 ts.init_static(rate, &ts);
357 //impf.init_static(rate, &impf);
358 //ampf.init_static(rate, &ampf);
359
360 if (bufsize )
361 {
362 #ifdef _POSIX_PRIORITY_SCHEDULING
363 int priomax = sched_get_priority_max(SCHED_FIFO);
364 if ((priomax/2) > 0) prio = priomax/2;
365 #endif
366 cabconv.set_samplerate(rate);
367 cabconv.set_buffersize(bufsize);
368 cabconv.configure_stereo(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
369 if(!cabconv.start(prio, SCHED_FIFO))
370 printf("cabinet convolver disabled\n");
371
372 ampconv.set_samplerate(rate);
373 ampconv.set_buffersize(bufsize);
374 ampconv.configure_stereo(contrast_ir_desc.ir_count, contrast_ir_desc.ir_data, contrast_ir_desc.ir_sr);
375 if(!ampconv.start(prio, SCHED_FIFO))
376 printf("presence convolver disabled\n");
377 }
378 else
379 {
380 printf("convolver disabled\n");
381 }
382 }
383
384
385 void GxPluginStereo::connect_stereo(uint32_t port,void* data)
386 {
387 switch ((PortIndex)port)
388 {
389 case CLevel:
390 clevel = static_cast<float*>(data);
391 break;
392 case ALevel:
393 alevel = static_cast<float*>(data);
394 break;
395 case AMP_CONTROL:
396 c_notice = (LV2_Atom_Sequence*)data;
397 break;
398 case AMP_NOTIFY:
399 n_notice = (LV2_Atom_Sequence*)data;
400 break;
401 case AMP_OUTPUT:
402 output = static_cast<float*>(data);
403 break;
404 case AMP_INPUT:
405 input = static_cast<float*>(data);
406 break;
407 case AMP_OUTPUT1:
408 output1 = static_cast<float*>(data);
409 break;
410 case AMP_INPUT1:
411 input1 = static_cast<float*>(data);
412 break;
413 default:
414 break;
415 }
416 }
417
418 void GxPluginStereo::run_dsp_stereo(uint32_t n_samples)
419 {
420 // run dsp
421 (&amplifier->*_as_ptr)(n_samples, input, input1, output, output1);
422 //amplifier.run_static(n_samples, input, input1, output, output1, &amplifier);
423 ampconv.run_static_stereo(n_samples, &ampconv, output, output1);
424 //ts.run_static(n_samples, &ts, output, output1);
425 (&ts->*_ts_ptr)(n_samples, output, output1);
426 cabconv.run_static_stereo(n_samples, &cabconv, output, output1);
427 // work ?
428 if (!atomic_get(schedule_wait) && val_changed())
429 {
430 clevel_ = (*clevel);
431 alevel_ = (*alevel);
432 atomic_set(&schedule_wait,1);
433 schedule->schedule_work(schedule->handle, sizeof(bool), &doit);
434 }
435 }
436
437 void GxPluginStereo::connect_all_stereo_ports(uint32_t port, void* data)
438 {
439 connect_stereo(port,data);
440 amplifier.connect_static(port,data, &amplifier);
441 ts.connect_static(port,data, &ts);
442 //impf.connect_static(port,data, &impf);
443 //ampf.connect_static(port,data, &ampf);
444 }
445
446 ///////////////////////////// LV2 defines //////////////////////////////
447
448 static LV2_Worker_Status
449 work(LV2_Handle instance,
450 LV2_Worker_Respond_Function respond,
451 LV2_Worker_Respond_Handle handle,
452 uint32_t size,
453 const void* data)
454 {
455 GxPluginStereo* self = (GxPluginStereo*)instance;
456 self->do_work_stereo();
457 return LV2_WORKER_SUCCESS;
458 }
459
460 static LV2_Worker_Status
461 work_response(LV2_Handle instance,
462 uint32_t size,
463 const void* data)
464 {
465 printf("worker respose.\n");
466 return LV2_WORKER_SUCCESS;
467 }
468
469
470 static LV2_Handle
471 instantiate(const LV2_Descriptor* descriptor,
472 double rate,
473 const char* bundle_path,
474 const LV2_Feature* const* features)
475 {
476 GxPluginStereo *self = new GxPluginStereo();
477
478 if (!self)
479 {
480 return NULL;
481 }
482
483 const LV2_Options_Option* options = NULL;
484 uint32_t bufsize = 0;
485 //printf(" %s\n",descriptor->URI);
486
487 for (int32_t i = 0; features[i]; ++i)
488 {
489 if (!strcmp(features[i]->URI, LV2_URID__map))
490 {
491 self->map = (LV2_URID_Map*)features[i]->data;
492 }
493 else if (!strcmp(features[i]->URI, LV2_WORKER__schedule))
494 {
495 self->schedule = (LV2_Worker_Schedule*)features[i]->data;
496 }
497 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
498 {
499 options = (const LV2_Options_Option*)features[i]->data;
500 }
501 }
502 if (!self->schedule)
503 {
504 fprintf(stderr, "Missing feature work:schedule.\n");
505 delete self;
506 return NULL;
507 }
508 if (!self->map)
509 {
510 fprintf(stderr, "Missing feature uri:map.\n");
511 }
512 else if (!options)
513 {
514 fprintf(stderr, "Missing feature options.\n");
515 }
516 else
517 {
518 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
519 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
520
521 for (const LV2_Options_Option* o = options; o->key; ++o)
522 {
523 if (o->context == LV2_OPTIONS_INSTANCE &&
524 o->key == bufsz_max &&
525 o->type == atom_Int)
526 {
527 bufsize = *(const int32_t*)o->value;
528 }
529 }
530
531 if (bufsize == 0)
532 {
533 fprintf(stderr, "No maximum buffer size given.\n");
534 }
535 printf("using block size: %d\n", bufsize);
536 }
537 self->set_tubesel_stereo( descriptor);
538 self->init_dsp_stereo((uint32_t)rate, bufsize);
539
540 return (LV2_Handle)self;
541 }
542
543 static void
544 connect_port(LV2_Handle instance,
545 uint32_t port,
546 void* data)
547 {
548 GxPluginStereo* self = (GxPluginStereo*)instance;
549 self->connect_all_stereo_ports(port, data);
550
551 }
552
553 static void
554 activate(LV2_Handle instance)
555 {
556
557 }
558
559 static void
560 run(LV2_Handle instance, uint32_t n_samples)
561 {
562 GxPluginStereo* self = (GxPluginStereo*)instance;
563 self->run_dsp_stereo(n_samples);
564 }
565
566 static void
567 deactivate(LV2_Handle instance)
568 {
569
570 }
571
572 static void
573 cleanup(LV2_Handle instance)
574 {
575 GxPluginStereo* self = (GxPluginStereo*)instance;
576 delete self;
577 }
578
579 //////////////////////////////////////////////////////////////////
580
581 const void*
582 extension_data(const char* uri)
583 {
584 static const LV2_Worker_Interface worker = { work, work_response, NULL };
585 if (!strcmp(uri, LV2_WORKER__interface))
586 {
587 return &worker;
588 }
589 return NULL;
590 }
591
592 static const LV2_Descriptor descriptor5 =
593 {
594 GXPLUGIN_URI "#12ax7_stereo",
595 instantiate,
596 connect_port,
597 activate,
598 run,
599 deactivate,
600 cleanup,
601 extension_data
602 };
603 static const LV2_Descriptor descriptor6 =
604 {
605 GXPLUGIN_URI "#12AT7_stereo",
606 instantiate,
607 connect_port,
608 activate,
609 run,
610 deactivate,
611 cleanup,
612 extension_data
613 };
614 static const LV2_Descriptor descriptor7 =
615 {
616 GXPLUGIN_URI "#6C16_stereo",
617 instantiate,
618 connect_port,
619 activate,
620 run,
621 deactivate,
622 cleanup,
623 extension_data
624 };
625 static const LV2_Descriptor descriptor8 =
626 {
627 GXPLUGIN_URI "#6V6_stereo",
628 instantiate,
629 connect_port,
630 activate,
631 run,
632 deactivate,
633 cleanup,
634 extension_data
635 };
636 static const LV2_Descriptor descriptor9 =
637 {
638 GXPLUGIN_URI "#6DJ8_stereo",
639 instantiate,
640 connect_port,
641 activate,
642 run,
643 deactivate,
644 cleanup,
645 extension_data
646 };
647
648 extern "C"
649 LV2_SYMBOL_EXPORT
650 const LV2_Descriptor*
651 lv2_descriptor(uint32_t index)
652 {
653 switch (index)
654 {
655 case 0:
656 return &descriptor5;
657 case 1:
658 return &descriptor6;
659 case 2:
660 return &descriptor7;
661 case 3:
662 return &descriptor8;
663 case 4:
664 return &descriptor9;
665 default:
666 return NULL;
667 }
668 }
+0
-765
src/LV2/gxamp.lv2/StereoAmp/gxamp_stereo.ttl less more
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
26 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
27 @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
28 @prefix opt: <http://lv2plug.in/ns/ext/options#> .
29 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
30 @prefix work: <http://lv2plug.in/ns/ext/worker#> .
31
32 <http://guitarix.sourceforge.net#me>
33 a foaf:Person ;
34 foaf:name "Hermann Meyer" ;
35 foaf:mbox <mailto:brummer@web.de> ;
36 rdfs:seeAlso <http://guitarix.sourceforge.net> .
37
38 <http://guitarix.sourceforge.net/plugins/gxamp>
39 a doap:Project ;
40 doap:maintainer <http://guitarix.sourceforge.net#me> ;
41 doap:name "GxAmplifier" .
42
43 <http://guitarix.sourceforge.net/plugins/gxamp#12ax7_stereo>
44 a lv2:Plugin ,
45 lv2:AmplifierPlugin ;
46 doap:maintainer <http://guitarix.sourceforge.net#me> ;
47 doap:name "GxAmplifier stereo";
48 doap:license <http://opensource.org/licenses/isc> ;
49 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
50 lv2:optionalFeature lv2:hardRTCapable ;
51 lv2:requiredFeature urid:map ,
52 bufsz:boundedBlockLength ,
53 work:schedule ;
54 bufsz:minBlockLength 64 ;
55 bufsz:maxBlockLength 8192 ;
56 lv2:extensionData work:interface ;
57
58 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
59
60 lv2:port [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 0 ;
64 lv2:symbol "fslider0_" ;
65 lv2:name "MasterGain";
66 lv2:default -15.0 ;
67 lv2:minimum -20.0 ;
68 lv2:maximum 20.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 1 ;
73 lv2:symbol "fslider1_" ;
74 lv2:name "PreGain";
75 lv2:default -15.0 ;
76 lv2:minimum -20.0 ;
77 lv2:maximum 20.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 2 ;
82 lv2:symbol "fslider2_" ;
83 lv2:name "Distortion";
84 lv2:default 20.0 ;
85 lv2:minimum 1.0 ;
86 lv2:maximum 100.0 ;
87 ] , [
88 a lv2:InputPort ,
89 lv2:ControlPort ;
90 lv2:index 3 ;
91 lv2:symbol "fslider3_" ;
92 lv2:name "Drive";
93 lv2:default 0.25 ;
94 lv2:minimum 0.01 ;
95 lv2:maximum 1.0 ;
96 ] ,[
97 a lv2:InputPort ,
98 lv2:ControlPort ;
99 lv2:index 4 ;
100 lv2:symbol "fslider0_" ;
101 lv2:name "Middle";
102 lv2:default 0.5 ;
103 lv2:minimum 0.0 ;
104 lv2:maximum 1.0 ;
105 ] , [
106 a lv2:InputPort ,
107 lv2:ControlPort ;
108 lv2:index 5 ;
109 lv2:symbol "fslider1_" ;
110 lv2:name "Bass";
111 lv2:default 0.5 ;
112 lv2:minimum 0.0 ;
113 lv2:maximum 1.0 ;
114 ] , [
115 a lv2:InputPort ,
116 lv2:ControlPort ;
117 lv2:index 6 ;
118 lv2:symbol "fslider2_" ;
119 lv2:name "Treble";
120 lv2:default 0.5 ;
121 lv2:minimum 0.0 ;
122 lv2:maximum 1.0 ;
123 ] , [
124 a lv2:InputPort ,
125 lv2:ControlPort ;
126 lv2:index 7 ;
127 lv2:symbol "fslider0_" ;
128 lv2:name "Cabinet";
129 lv2:default 10.0 ;
130 lv2:minimum 1.0 ;
131 lv2:maximum 20.0 ;
132 ] , [
133 a lv2:InputPort ,
134 lv2:ControlPort ;
135 lv2:index 8 ;
136 lv2:symbol "fslider0_" ;
137 lv2:name "Presence";
138 lv2:default 10.0 ;
139 lv2:minimum 1.0 ;
140 lv2:maximum 20.0 ;
141 ] , [
142 a lv2:InputPort ,
143 atom:AtomPort ;
144 atom:bufferType atom:Sequence ;
145 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
146 lv2:index 9 ;
147 lv2:symbol "control" ;
148 lv2:name "Control"
149 ] , [
150 a lv2:OutputPort ,
151 atom:AtomPort ;
152 atom:bufferType atom:Sequence ;
153 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
154 lv2:index 10 ;
155 lv2:symbol "notify" ;
156 lv2:name "Notify"
157 ] , [
158 a lv2:AudioPort ,
159 lv2:OutputPort ;
160 lv2:index 11 ;
161 lv2:symbol "out" ;
162 lv2:name "Out"
163 ] , [
164 a lv2:AudioPort ,
165 lv2:InputPort ;
166 lv2:index 12 ;
167 lv2:symbol "in" ;
168 lv2:name "in"
169 ] , [
170 a lv2:AudioPort ,
171 lv2:OutputPort ;
172 lv2:index 13 ;
173 lv2:symbol "out1" ;
174 lv2:name "Out1"
175 ] , [
176 a lv2:AudioPort ,
177 lv2:InputPort ;
178 lv2:index 14 ;
179 lv2:symbol "in1" ;
180 lv2:name "in1"
181 ] .
182
183 <http://guitarix.sourceforge.net/plugins/gxamp#12AT7_stereo>
184 a lv2:Plugin ,
185 lv2:AmplifierPlugin ;
186 doap:maintainer <http://guitarix.sourceforge.net#me> ;
187 doap:name "GxAmplifier-II stereo";
188 doap:license <http://opensource.org/licenses/isc> ;
189 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
190 lv2:optionalFeature lv2:hardRTCapable ;
191 lv2:requiredFeature urid:map ,
192 bufsz:boundedBlockLength ,
193 work:schedule ;
194 bufsz:minBlockLength 64 ;
195 bufsz:maxBlockLength 8192 ;
196 lv2:extensionData work:interface ;
197
198 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
199
200 lv2:port [
201 a lv2:InputPort ,
202 lv2:ControlPort ;
203 lv2:index 0 ;
204 lv2:symbol "fslider0_" ;
205 lv2:name "MasterGain";
206 lv2:default -15.0 ;
207 lv2:minimum -20.0 ;
208 lv2:maximum 20.0 ;
209 ] , [
210 a lv2:InputPort ,
211 lv2:ControlPort ;
212 lv2:index 1 ;
213 lv2:symbol "fslider1_" ;
214 lv2:name "PreGain";
215 lv2:default -15.0 ;
216 lv2:minimum -20.0 ;
217 lv2:maximum 20.0 ;
218 ] , [
219 a lv2:InputPort ,
220 lv2:ControlPort ;
221 lv2:index 2 ;
222 lv2:symbol "fslider2_" ;
223 lv2:name "Distortion";
224 lv2:default 20.0 ;
225 lv2:minimum 1.0 ;
226 lv2:maximum 100.0 ;
227 ] , [
228 a lv2:InputPort ,
229 lv2:ControlPort ;
230 lv2:index 3 ;
231 lv2:symbol "fslider3_" ;
232 lv2:name "Drive";
233 lv2:default 0.25 ;
234 lv2:minimum 0.01 ;
235 lv2:maximum 1.0 ;
236 ] ,[
237 a lv2:InputPort ,
238 lv2:ControlPort ;
239 lv2:index 4 ;
240 lv2:symbol "fslider0_" ;
241 lv2:name "Middle";
242 lv2:default 0.5 ;
243 lv2:minimum 0.0 ;
244 lv2:maximum 1.0 ;
245 ] , [
246 a lv2:InputPort ,
247 lv2:ControlPort ;
248 lv2:index 5 ;
249 lv2:symbol "fslider1_" ;
250 lv2:name "Bass";
251 lv2:default 0.5 ;
252 lv2:minimum 0.0 ;
253 lv2:maximum 1.0 ;
254 ] , [
255 a lv2:InputPort ,
256 lv2:ControlPort ;
257 lv2:index 6 ;
258 lv2:symbol "fslider2_" ;
259 lv2:name "Treble";
260 lv2:default 0.5 ;
261 lv2:minimum 0.0 ;
262 lv2:maximum 1.0 ;
263 ] , [
264 a lv2:InputPort ,
265 lv2:ControlPort ;
266 lv2:index 7 ;
267 lv2:symbol "fslider0_" ;
268 lv2:name "Cabinet";
269 lv2:default 10.0 ;
270 lv2:minimum 1.0 ;
271 lv2:maximum 20.0 ;
272 ] , [
273 a lv2:InputPort ,
274 lv2:ControlPort ;
275 lv2:index 8 ;
276 lv2:symbol "fslider0_" ;
277 lv2:name "Presence";
278 lv2:default 10.0 ;
279 lv2:minimum 1.0 ;
280 lv2:maximum 20.0 ;
281 ] , [
282 a lv2:InputPort ,
283 atom:AtomPort ;
284 atom:bufferType atom:Sequence ;
285 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
286 lv2:index 9 ;
287 lv2:symbol "control" ;
288 lv2:name "Control"
289 ] , [
290 a lv2:OutputPort ,
291 atom:AtomPort ;
292 atom:bufferType atom:Sequence ;
293 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
294 lv2:index 10 ;
295 lv2:symbol "notify" ;
296 lv2:name "Notify"
297 ] , [
298 a lv2:AudioPort ,
299 lv2:OutputPort ;
300 lv2:index 11 ;
301 lv2:symbol "out" ;
302 lv2:name "Out"
303 ] , [
304 a lv2:AudioPort ,
305 lv2:InputPort ;
306 lv2:index 12 ;
307 lv2:symbol "in" ;
308 lv2:name "in"
309 ] , [
310 a lv2:AudioPort ,
311 lv2:OutputPort ;
312 lv2:index 13 ;
313 lv2:symbol "out1" ;
314 lv2:name "Out1"
315 ] , [
316 a lv2:AudioPort ,
317 lv2:InputPort ;
318 lv2:index 14 ;
319 lv2:symbol "in1" ;
320 lv2:name "in1"
321 ] .
322
323 <http://guitarix.sourceforge.net/plugins/gxamp#6C16_stereo>
324 a lv2:Plugin ,
325 lv2:AmplifierPlugin ;
326 doap:maintainer <http://guitarix.sourceforge.net#me> ;
327 doap:name "GxAmplifier-III stereo";
328 doap:license <http://opensource.org/licenses/isc> ;
329 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
330 lv2:optionalFeature lv2:hardRTCapable ;
331 lv2:requiredFeature urid:map ,
332 bufsz:boundedBlockLength ,
333 work:schedule ;
334 bufsz:minBlockLength 64 ;
335 bufsz:maxBlockLength 8192 ;
336 lv2:extensionData work:interface ;
337
338 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
339
340 lv2:port [
341 a lv2:InputPort ,
342 lv2:ControlPort ;
343 lv2:index 0 ;
344 lv2:symbol "fslider0_" ;
345 lv2:name "MasterGain";
346 lv2:default -15.0 ;
347 lv2:minimum -20.0 ;
348 lv2:maximum 20.0 ;
349 ] , [
350 a lv2:InputPort ,
351 lv2:ControlPort ;
352 lv2:index 1 ;
353 lv2:symbol "fslider1_" ;
354 lv2:name "PreGain";
355 lv2:default -15.0 ;
356 lv2:minimum -20.0 ;
357 lv2:maximum 20.0 ;
358 ] , [
359 a lv2:InputPort ,
360 lv2:ControlPort ;
361 lv2:index 2 ;
362 lv2:symbol "fslider2_" ;
363 lv2:name "Distortion";
364 lv2:default 20.0 ;
365 lv2:minimum 1.0 ;
366 lv2:maximum 100.0 ;
367 ] , [
368 a lv2:InputPort ,
369 lv2:ControlPort ;
370 lv2:index 3 ;
371 lv2:symbol "fslider3_" ;
372 lv2:name "Drive";
373 lv2:default 0.25 ;
374 lv2:minimum 0.01 ;
375 lv2:maximum 1.0 ;
376 ] ,[
377 a lv2:InputPort ,
378 lv2:ControlPort ;
379 lv2:index 4 ;
380 lv2:symbol "fslider0_" ;
381 lv2:name "Middle";
382 lv2:default 0.5 ;
383 lv2:minimum 0.0 ;
384 lv2:maximum 1.0 ;
385 ] , [
386 a lv2:InputPort ,
387 lv2:ControlPort ;
388 lv2:index 5 ;
389 lv2:symbol "fslider1_" ;
390 lv2:name "Bass";
391 lv2:default 0.5 ;
392 lv2:minimum 0.0 ;
393 lv2:maximum 1.0 ;
394 ] , [
395 a lv2:InputPort ,
396 lv2:ControlPort ;
397 lv2:index 6 ;
398 lv2:symbol "fslider2_" ;
399 lv2:name "Treble";
400 lv2:default 0.5 ;
401 lv2:minimum 0.0 ;
402 lv2:maximum 1.0 ;
403 ] , [
404 a lv2:InputPort ,
405 lv2:ControlPort ;
406 lv2:index 7 ;
407 lv2:symbol "fslider0_" ;
408 lv2:name "Cabinet";
409 lv2:default 10.0 ;
410 lv2:minimum 1.0 ;
411 lv2:maximum 20.0 ;
412 ] , [
413 a lv2:InputPort ,
414 lv2:ControlPort ;
415 lv2:index 8 ;
416 lv2:symbol "fslider0_" ;
417 lv2:name "Presence";
418 lv2:default 10.0 ;
419 lv2:minimum 1.0 ;
420 lv2:maximum 20.0 ;
421 ] , [
422 a lv2:InputPort ,
423 atom:AtomPort ;
424 atom:bufferType atom:Sequence ;
425 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
426 lv2:index 9 ;
427 lv2:symbol "control" ;
428 lv2:name "Control"
429 ] , [
430 a lv2:OutputPort ,
431 atom:AtomPort ;
432 atom:bufferType atom:Sequence ;
433 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
434 lv2:index 10 ;
435 lv2:symbol "notify" ;
436 lv2:name "Notify"
437 ] , [
438 a lv2:AudioPort ,
439 lv2:OutputPort ;
440 lv2:index 11 ;
441 lv2:symbol "out" ;
442 lv2:name "Out"
443 ] , [
444 a lv2:AudioPort ,
445 lv2:InputPort ;
446 lv2:index 12 ;
447 lv2:symbol "in" ;
448 lv2:name "in"
449 ] , [
450 a lv2:AudioPort ,
451 lv2:OutputPort ;
452 lv2:index 13 ;
453 lv2:symbol "out1" ;
454 lv2:name "Out1"
455 ] , [
456 a lv2:AudioPort ,
457 lv2:InputPort ;
458 lv2:index 14 ;
459 lv2:symbol "in1" ;
460 lv2:name "in1"
461 ] .
462
463 <http://guitarix.sourceforge.net/plugins/gxamp#6V6_stereo>
464 a lv2:Plugin ,
465 lv2:AmplifierPlugin ;
466 doap:maintainer <http://guitarix.sourceforge.net#me> ;
467 doap:name "GxAmplifier-IV stereo";
468 doap:license <http://opensource.org/licenses/isc> ;
469 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
470 lv2:optionalFeature lv2:hardRTCapable ;
471 lv2:requiredFeature urid:map ,
472 bufsz:boundedBlockLength ,
473 work:schedule ;
474 bufsz:minBlockLength 64 ;
475 bufsz:maxBlockLength 8192 ;
476 lv2:extensionData work:interface ;
477
478 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
479
480 lv2:port [
481 a lv2:InputPort ,
482 lv2:ControlPort ;
483 lv2:index 0 ;
484 lv2:symbol "fslider0_" ;
485 lv2:name "MasterGain";
486 lv2:default -15.0 ;
487 lv2:minimum -20.0 ;
488 lv2:maximum 20.0 ;
489 ] , [
490 a lv2:InputPort ,
491 lv2:ControlPort ;
492 lv2:index 1 ;
493 lv2:symbol "fslider1_" ;
494 lv2:name "PreGain";
495 lv2:default -15.0 ;
496 lv2:minimum -20.0 ;
497 lv2:maximum 20.0 ;
498 ] , [
499 a lv2:InputPort ,
500 lv2:ControlPort ;
501 lv2:index 2 ;
502 lv2:symbol "fslider2_" ;
503 lv2:name "Distortion";
504 lv2:default 20.0 ;
505 lv2:minimum 1.0 ;
506 lv2:maximum 100.0 ;
507 ] , [
508 a lv2:InputPort ,
509 lv2:ControlPort ;
510 lv2:index 3 ;
511 lv2:symbol "fslider3_" ;
512 lv2:name "Drive";
513 lv2:default 0.25 ;
514 lv2:minimum 0.01 ;
515 lv2:maximum 1.0 ;
516 ] ,[
517 a lv2:InputPort ,
518 lv2:ControlPort ;
519 lv2:index 4 ;
520 lv2:symbol "fslider0_" ;
521 lv2:name "Middle";
522 lv2:default 0.5 ;
523 lv2:minimum 0.0 ;
524 lv2:maximum 1.0 ;
525 ] , [
526 a lv2:InputPort ,
527 lv2:ControlPort ;
528 lv2:index 5 ;
529 lv2:symbol "fslider1_" ;
530 lv2:name "Bass";
531 lv2:default 0.5 ;
532 lv2:minimum 0.0 ;
533 lv2:maximum 1.0 ;
534 ] , [
535 a lv2:InputPort ,
536 lv2:ControlPort ;
537 lv2:index 6 ;
538 lv2:symbol "fslider2_" ;
539 lv2:name "Treble";
540 lv2:default 0.5 ;
541 lv2:minimum 0.0 ;
542 lv2:maximum 1.0 ;
543 ] , [
544 a lv2:InputPort ,
545 lv2:ControlPort ;
546 lv2:index 7 ;
547 lv2:symbol "fslider0_" ;
548 lv2:name "Cabinet";
549 lv2:default 10.0 ;
550 lv2:minimum 1.0 ;
551 lv2:maximum 20.0 ;
552 ] , [
553 a lv2:InputPort ,
554 lv2:ControlPort ;
555 lv2:index 8 ;
556 lv2:symbol "fslider0_" ;
557 lv2:name "Presence";
558 lv2:default 10.0 ;
559 lv2:minimum 1.0 ;
560 lv2:maximum 20.0 ;
561 ] , [
562 a lv2:InputPort ,
563 atom:AtomPort ;
564 atom:bufferType atom:Sequence ;
565 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
566 lv2:index 9 ;
567 lv2:symbol "control" ;
568 lv2:name "Control"
569 ] , [
570 a lv2:OutputPort ,
571 atom:AtomPort ;
572 atom:bufferType atom:Sequence ;
573 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
574 lv2:index 10 ;
575 lv2:symbol "notify" ;
576 lv2:name "Notify"
577 ] , [
578 a lv2:AudioPort ,
579 lv2:OutputPort ;
580 lv2:index 11 ;
581 lv2:symbol "out" ;
582 lv2:name "Out"
583 ] , [
584 a lv2:AudioPort ,
585 lv2:InputPort ;
586 lv2:index 12 ;
587 lv2:symbol "in" ;
588 lv2:name "in"
589 ] , [
590 a lv2:AudioPort ,
591 lv2:OutputPort ;
592 lv2:index 13 ;
593 lv2:symbol "out1" ;
594 lv2:name "Out1"
595 ] , [
596 a lv2:AudioPort ,
597 lv2:InputPort ;
598 lv2:index 14 ;
599 lv2:symbol "in1" ;
600 lv2:name "in1"
601 ] .
602
603 <http://guitarix.sourceforge.net/plugins/gxamp#6DJ8_stereo>
604 a lv2:Plugin ,
605 lv2:AmplifierPlugin ;
606 doap:maintainer <http://guitarix.sourceforge.net#me> ;
607 doap:name "GxAmplifier-V stereo";
608 doap:license <http://opensource.org/licenses/isc> ;
609 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
610 lv2:optionalFeature lv2:hardRTCapable ;
611 lv2:requiredFeature urid:map ,
612 bufsz:boundedBlockLength ,
613 work:schedule ;
614 bufsz:minBlockLength 64 ;
615 bufsz:maxBlockLength 8192 ;
616 lv2:extensionData work:interface ;
617
618 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
619
620 lv2:port [
621 a lv2:InputPort ,
622 lv2:ControlPort ;
623 lv2:index 0 ;
624 lv2:symbol "fslider0_" ;
625 lv2:name "MasterGain";
626 lv2:default -15.0 ;
627 lv2:minimum -20.0 ;
628 lv2:maximum 20.0 ;
629 ] , [
630 a lv2:InputPort ,
631 lv2:ControlPort ;
632 lv2:index 1 ;
633 lv2:symbol "fslider1_" ;
634 lv2:name "PreGain";
635 lv2:default -15.0 ;
636 lv2:minimum -20.0 ;
637 lv2:maximum 20.0 ;
638 ] , [
639 a lv2:InputPort ,
640 lv2:ControlPort ;
641 lv2:index 2 ;
642 lv2:symbol "fslider2_" ;
643 lv2:name "Distortion";
644 lv2:default 20.0 ;
645 lv2:minimum 1.0 ;
646 lv2:maximum 100.0 ;
647 ] , [
648 a lv2:InputPort ,
649 lv2:ControlPort ;
650 lv2:index 3 ;
651 lv2:symbol "fslider3_" ;
652 lv2:name "Drive";
653 lv2:default 0.25 ;
654 lv2:minimum 0.01 ;
655 lv2:maximum 1.0 ;
656 ] ,[
657 a lv2:InputPort ,
658 lv2:ControlPort ;
659 lv2:index 4 ;
660 lv2:symbol "fslider0_" ;
661 lv2:name "Middle";
662 lv2:default 0.5 ;
663 lv2:minimum 0.0 ;
664 lv2:maximum 1.0 ;
665 ] , [
666 a lv2:InputPort ,
667 lv2:ControlPort ;
668 lv2:index 5 ;
669 lv2:symbol "fslider1_" ;
670 lv2:name "Bass";
671 lv2:default 0.5 ;
672 lv2:minimum 0.0 ;
673 lv2:maximum 1.0 ;
674 ] , [
675 a lv2:InputPort ,
676 lv2:ControlPort ;
677 lv2:index 6 ;
678 lv2:symbol "fslider2_" ;
679 lv2:name "Treble";
680 lv2:default 0.5 ;
681 lv2:minimum 0.0 ;
682 lv2:maximum 1.0 ;
683 ] , [
684 a lv2:InputPort ,
685 lv2:ControlPort ;
686 lv2:index 7 ;
687 lv2:symbol "fslider0_" ;
688 lv2:name "Cabinet";
689 lv2:default 10.0 ;
690 lv2:minimum 1.0 ;
691 lv2:maximum 20.0 ;
692 ] , [
693 a lv2:InputPort ,
694 lv2:ControlPort ;
695 lv2:index 8 ;
696 lv2:symbol "fslider0_" ;
697 lv2:name "Presence";
698 lv2:default 10.0 ;
699 lv2:minimum 1.0 ;
700 lv2:maximum 20.0 ;
701 ] , [
702 a lv2:InputPort ,
703 atom:AtomPort ;
704 atom:bufferType atom:Sequence ;
705 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
706 lv2:index 9 ;
707 lv2:symbol "control" ;
708 lv2:name "Control"
709 ] , [
710 a lv2:OutputPort ,
711 atom:AtomPort ;
712 atom:bufferType atom:Sequence ;
713 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
714 lv2:index 10 ;
715 lv2:symbol "notify" ;
716 lv2:name "Notify"
717 ] , [
718 a lv2:AudioPort ,
719 lv2:OutputPort ;
720 lv2:index 11 ;
721 lv2:symbol "out" ;
722 lv2:name "Out"
723 ] , [
724 a lv2:AudioPort ,
725 lv2:InputPort ;
726 lv2:index 12 ;
727 lv2:symbol "in" ;
728 lv2:name "in"
729 ] , [
730 a lv2:AudioPort ,
731 lv2:OutputPort ;
732 lv2:index 13 ;
733 lv2:symbol "out1" ;
734 lv2:name "Out1"
735 ] , [
736 a lv2:AudioPort ,
737 lv2:InputPort ;
738 lv2:index 14 ;
739 lv2:symbol "in1" ;
740 lv2:name "in1"
741 ] .
742
743 <http://guitarix.sourceforge.net/plugins/gxamp#gui>
744 a guiext:GtkUI;
745 guiext:binary <gxamp_gui_stereo.so>;
746 guiext:requiredFeature guiext:makeResident;
747 lv2:extensionData work:interface ;
748 guiext:portNotification [
749 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#12ax7>;
750 lv2:symbol "notify" ;
751 guiext:notifyType atom:Blank
752 ] , [
753 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#12AT7>;
754 lv2:symbol "notify" ;
755 guiext:notifyType atom:Blank
756 ] , [
757 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#6C16>;
758 lv2:symbol "notify" ;
759 guiext:notifyType atom:Blank
760 ] , [
761 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#6V6>;
762 lv2:symbol "notify" ;
763 guiext:notifyType atom:Blank
764 ] .
+0
-47
src/LV2/gxamp.lv2/StereoAmp/manifest_stereo.ttl.in less more
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxamp#12ax7_stereo>
23 a lv2:Plugin ;
24 lv2:binary <gxamp_stereo@LIB_EXT@> ;
25 rdfs:seeAlso <gxamp_stereo.ttl> .
26
27 <http://guitarix.sourceforge.net/plugins/gxamp#12AT7_stereo>
28 a lv2:Plugin ;
29 lv2:binary <gxamp_stereo@LIB_EXT@> ;
30 rdfs:seeAlso <gxamp_stereo.ttl> .
31
32 <http://guitarix.sourceforge.net/plugins/gxamp#6C16_stereo>
33 a lv2:Plugin ;
34 lv2:binary <gxamp_stereo@LIB_EXT@> ;
35 rdfs:seeAlso <gxamp_stereo.ttl> .
36
37 <http://guitarix.sourceforge.net/plugins/gxamp#6V6_stereo>
38 a lv2:Plugin ;
39 lv2:binary <gxamp_stereo@LIB_EXT@> ;
40 rdfs:seeAlso <gxamp_stereo.ttl> .
41
42 <http://guitarix.sourceforge.net/plugins/gxamp#6DJ8_stereo>
43 a lv2:Plugin ;
44 lv2:binary <gxamp_stereo@LIB_EXT@> ;
45 rdfs:seeAlso <gxamp_stereo.ttl> .
46
+0
-85
src/LV2/gxamp.lv2/StereoAmp/wscript less more
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle2 = 'gxamp_stereo.lv2'
10
11 src2 = ['gxamp_stereo.cpp',
12 '../DSP/gx_resampler.cc',
13 '../DSP/gx_convolver.cc'
14 ]
15 incl2 = ['../../','./','../', '../DSP']
16 lib2 = []
17 if sys.platform.startswith("linux"):
18 lib2.append('dl')
19 uselib2 = ['LV2CORE','GLIBMM']
20 if bld.env['ZITA_CONVOLVER']:
21 uselib2.append('ZITA_CONVOLVER')
22 else:
23 src2.append('../../../zita-convolver/zita-convolver.cc')
24 incl2.append('../../../zita-convolver');
25 uselib2.append('FFTW3')
26 if bld.env['ZITA_RESAMPLER']:
27 uselib2.append('ZITA_RESAMPLER')
28 else:
29 src2.append('../../../zita-resampler-1.1.0/resampler.cc')
30 src2.append('../../../zita-resampler-1.1.0/resampler-table.cc')
31 incl2.append('../../../zita-resampler-1.1.0')
32 cxxflag2 =[]
33 if not bld.env['OPT'] and bld.env['SSE2']:
34 cxxflag2 = [ "-msse2", "-mfpmath=sse"]
35 lv2_plugin_stereo = bld(
36 features='cxx cshlib ',
37 includes = incl2,
38 lib = lib2,
39 uselib = uselib2,
40 obj_ext = '_3.o',
41 cxxflags = cxxflag2,
42 defines = ["LV2_SO"],
43 target = 'gxamp_stereo',
44 source = src2,
45 install_path = '${LV2DIR}/%s' % bundle2,
46 chmod = 0o755,
47 )
48 lv2_plugin_stereo.env['shlib_PATTERN'] = '%s.so'
49
50 uselib_local3 = []
51 libpath3 = []
52 lib3 = []
53 incl3 = ['../../../../libgxwmm','../../../../libgxw','../']
54 if sys.platform.startswith("linux"):
55 lib3.append('dl')
56 if bld.env["GX_LIB_SHARED"]:
57 lib3 += ['gxwmm','gxw']
58 libpath3 += [bld.path.find_dir("../../../../libgxw/gxw").bldpath(bld.env),
59 bld.path.find_dir("../../../../libgxwmm/gxwmm").bldpath(bld.env)]
60 else:
61 uselib_local3 += ['gxwmm','gxw']
62
63 lv2_plugin_gui_stereo = bld(
64 features='cxx cshlib ',
65 includes = incl3,
66 lib = lib3,
67 uselib = 'LV2CORE GTKMM',
68 libpath = libpath3,
69 obj_ext = '_3.o',
70 uselib_local = uselib_local3,
71 linkflags = '-Wl,-z,nodelete',
72 defines = ["LV2_GUI"],
73 target = 'gxamp_gui_stereo',
74 source = '../widget.cpp ../gxamp_gui.cpp',
75 install_path = '${LV2DIR}/%s' % bundle2,
76 chmod = 0o755,
77 )
78 lv2_plugin_gui_stereo.env['shlib_PATTERN'] = '%s.so'
79
80
81 install_path = '${LV2DIR}/%s' % bundle2,
82 bld.install_files('${LV2DIR}/gxamp_stereo.lv2', 'manifest.ttl')
83 bld.install_files('${LV2DIR}/gxamp_stereo.lv2', 'gxamp_stereo.ttl')
84
+0
-657
src/LV2/gxamp.lv2/gxamp.cpp less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <cstdlib>
20 #include <cmath>
21 #include <iostream>
22 #include <cstring>
23 #include <glibmm.h>
24 #include <unistd.h>
25
26 #ifdef __SSE__
27 /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
28 flags to avoid costly denormals */
29 #ifdef __SSE3__
30 #include <pmmintrin.h>
31 inline void AVOIDDENORMALS()
32 {
33 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
34 _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
35 }
36 #else
37 #include <xmmintrin.h>
38 inline void AVOIDDENORMALS()
39 {
40 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
41 }
42 #endif //__SSE3__
43
44 #else
45 inline void AVOIDDENORMALS() {}
46 #endif //__SSE__
47
48 // faust support
49 #define FAUSTFLOAT float
50 #ifndef N_
51 #define N_(String) (String)
52 #endif
53 #define max(x, y) (((x) > (y)) ? (x) : (y))
54 #define min(x, y) (((x) < (y)) ? (x) : (y))
55 template <int32_t N> inline float faustpower(float x)
56 {
57 return powf(x, N);
58 }
59 template <int32_t N> inline double faustpower(double x)
60 {
61 return pow(x, N);
62 }
63 template <int32_t N> inline int32_t faustpower(int32_t x)
64 {
65 return faustpower<N/2>(x) * faustpower<N-N/2>(x);
66 }
67 template <> inline int32_t faustpower<0>(int32_t x)
68 {
69 return 1;
70 }
71 template <> inline int32_t faustpower<1>(int32_t x)
72 {
73 return x;
74 }
75
76 /****************************************************************
77 ** "atomic" value access
78 */
79
80 inline void atomic_set(volatile int32_t* p, int32_t v)
81 {
82 g_atomic_int_set(p, v);
83 }
84
85 inline int32_t atomic_get(volatile int32_t& p)
86 {
87 return g_atomic_int_get(&p);
88 }
89
90 inline bool atomic_compare_and_exchange(volatile int32_t *p, int32_t oldv, int32_t newv)
91 {
92 return g_atomic_int_compare_and_exchange(p, oldv, newv);
93 }
94
95 template <class T>
96 inline void atomic_set(T **p, T *v)
97 {
98 g_atomic_pointer_set(p, v);
99 }
100
101 template <class T>
102 inline void atomic_set_0(T **p)
103 {
104 g_atomic_pointer_set(p, 0);
105 }
106
107 template <class T>
108 inline T *atomic_get(T*& p)
109 {
110 return static_cast<T*>(g_atomic_pointer_get(&p));
111 }
112
113 template <class T>
114 inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv)
115 {
116 return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), oldv, newv);
117 }
118
119
120 #include "gxamp.h"
121 #include "gx_resampler.h"
122 #include "gx_convolver.h"
123 #include "gx_tonestack.h"
124 #include "gx_amp.h"
125 #include "impulse_former.h"
126 #include "ampulse_former.h"
127
128 // define run pointer typs
129 typedef void (GxAmpMono::*run_amp_mono)
130 (uint32_t count,float* input, float* output);
131
132 typedef void (TonestackMono::*run_tonestack_mono)
133 (uint32_t count, float *output);
134
135 ////////////////////////////// MONO ////////////////////////////////////
136
137 class GxPluginMono
138 {
139 private:
140 // internal stuff
141 float* output;
142 float* input;
143 uint32_t tubesel;
144 int32_t prio;
145 TonestackMono ts;
146 run_tonestack_mono _t_ptr;
147 GxAmpMono amplifier;
148 run_amp_mono _a_ptr;
149 gx_resample::BufferResampler resamp;
150 GxSimpleConvolver cabconv;
151 Impf impf;
152 gx_resample::BufferResampler resamp1;
153 GxSimpleConvolver ampconv;
154 Ampf ampf;
155 uint32_t bufsize;
156 LV2_Atom_Sequence* c_notice;
157 LV2_Atom_Sequence* n_notice;
158 float *clevel;
159 float clevel_;
160 float cab;
161 bool cab_changed()
162 {
163 return abs(cab - clevel_) > 0.1;
164 }
165 void update_cab()
166 {
167 cab = (clevel_);
168 }
169 float *alevel;
170 float alevel_;
171 float pre;
172 bool pre_changed()
173 {
174 return abs(pre - alevel_) > 0.1;
175 }
176 void update_pre()
177 {
178 pre = (alevel_);
179 }
180 float val;
181 bool val_changed()
182 {
183 return abs(val - (*alevel) -(*clevel)) > 0.1;
184 }
185 void update_val()
186 {
187 val = (alevel_) + (clevel_);
188 }
189 bool doit;
190 volatile int32_t schedule_wait;
191
192 public:
193 // LV2 stuff
194 LV2_URID_Map* map;
195 LV2_Worker_Schedule* schedule;
196
197 void set_tubesel_mono(const LV2_Descriptor* descriptor);
198 inline void run_dsp_mono(uint32_t n_samples);
199 void connect_mono(uint32_t port,void* data);
200 inline void init_dsp_mono(uint32_t rate, uint32_t bufsize_);
201 inline void do_work_mono();
202 inline void connect_all_mono_ports(uint32_t port, void* data);
203 // constructor
204 GxPluginMono() :
205 output(NULL),
206 input(NULL),
207 tubesel(0),
208 prio(0),
209 ts(TonestackMono()),
210 amplifier(GxAmpMono()),
211 cabconv(GxSimpleConvolver(resamp)),
212 impf(Impf()),
213 ampconv(GxSimpleConvolver(resamp1)),
214 ampf(Ampf()),
215 bufsize(0),
216 clevel(NULL),
217 clevel_(0),
218 cab(0),
219 alevel(NULL),
220 alevel_(0),
221 pre(0),
222 val(0)
223 {
224 atomic_set(&schedule_wait,0);
225 };
226 // destructor
227 ~GxPluginMono()
228 {
229 cabconv.stop_process();
230 ampconv.stop_process();
231 };
232 };
233
234 #include "cab_data.cc"
235 #include "gx_tonestack.cc"
236 #include "gx_amp.cc"
237
238 // plugin stuff
239
240 void GxPluginMono::do_work_mono()
241 {
242 if (cab_changed())
243 {
244 if (cabconv.is_runnable())
245 {
246 cabconv.set_not_runnable();
247 cabconv.stop_process();
248 }
249 float cab_irdata_c[cabconv.cab_count];
250 impf.compute(cabconv.cab_count, cabconv.cab_data, cab_irdata_c, clevel_);
251 cabconv.cab_data_new = cab_irdata_c;
252 while (!cabconv.checkstate());
253 if (!cabconv.update(cabconv.cab_count, cabconv.cab_data_new, cabconv.cab_sr))
254 printf("cabconv.update fail.\n");
255 if(!cabconv.start(prio, SCHED_FIFO))
256 printf("cabinet convolver disabled\n");
257 update_cab();
258 //printf("cabinet convolver updated\n");
259 }
260 if (pre_changed())
261 {
262 if (ampconv.is_runnable())
263 {
264 ampconv.set_not_runnable();
265 ampconv.stop_process();
266 }
267 float pre_irdata_c[contrast_ir_desc.ir_count];
268 ampf.compute(contrast_ir_desc.ir_count,contrast_ir_desc.ir_data, pre_irdata_c, alevel_);
269 while (!ampconv.checkstate());
270 if (!ampconv.update(contrast_ir_desc.ir_count, pre_irdata_c, contrast_ir_desc.ir_sr))
271 printf("ampconv.update fail.\n");
272 if(!ampconv.start(prio, SCHED_FIFO))
273 printf("presence convolver disabled\n");
274 update_pre();
275 //printf("presence convolver updated\n");
276 }
277 update_val();
278 atomic_set(&schedule_wait,0);
279 }
280
281 void GxPluginMono::set_tubesel_mono(const LV2_Descriptor* descriptor)
282 {
283 if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12ax7",descriptor->URI)== 0)
284 {
285 printf("12ax7\n");
286 _a_ptr = &GxAmpMono::run_12ax7;
287 _t_ptr = &TonestackMono::run;
288 cabconv.cab_count = cab_data_4x12.ir_count;
289 cabconv.cab_sr = cab_data_4x12.ir_sr;
290 cabconv.cab_data = cab_data_4x12.ir_data;
291 tubesel = 1;
292 }
293 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12AT7",descriptor->URI)== 0)
294 {
295 printf("12AT7\n");
296 _a_ptr = &GxAmpMono::run_12AT7;
297 _t_ptr = &TonestackMono::run_soldano;
298 cabconv.cab_count = cab_data_AC30.ir_count;
299 cabconv.cab_sr = cab_data_AC30.ir_sr;
300 cabconv.cab_data = cab_data_AC30.ir_data;
301 tubesel = 2;
302 }
303 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6C16",descriptor->URI)== 0)
304 {
305 printf("6C16\n");
306 _a_ptr = &GxAmpMono::run_6C16;
307 _t_ptr = &TonestackMono::run_bassman;
308 cabconv.cab_count = cab_data_1x15.ir_count;
309 cabconv.cab_sr = cab_data_1x15.ir_sr;
310 cabconv.cab_data = cab_data_1x15.ir_data;
311 tubesel = 3;
312 }
313 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6V6",descriptor->URI)== 0)
314 {
315 printf("6V6\n");
316 _a_ptr = &GxAmpMono::run_6V6;
317 _t_ptr = &TonestackMono::run_soldano;
318 cabconv.cab_count = cab_data_mesa.ir_count;
319 cabconv.cab_sr = cab_data_mesa.ir_sr;
320 cabconv.cab_data = cab_data_mesa.ir_data;
321 tubesel = 4;
322 }
323 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6DJ8",descriptor->URI)== 0)
324 {
325 printf("6DJ8\n");
326 _a_ptr = &GxAmpMono::run_6DJ8;
327 _t_ptr = &TonestackMono::run_ampeg;
328 cabconv.cab_count = cab_data_HighGain.ir_count;
329 cabconv.cab_sr = cab_data_HighGain.ir_sr;
330 cabconv.cab_data = cab_data_HighGain.ir_data;
331 tubesel = 5;
332 }
333 else
334 {
335 _a_ptr = &GxAmpMono::run_12ax7;
336 _t_ptr = &TonestackMono::run;
337 cabconv.cab_count = cab_data_4x12.ir_count;
338 cabconv.cab_sr = cab_data_4x12.ir_sr;
339 cabconv.cab_data = cab_data_4x12.ir_data;
340 tubesel = 0;
341 }
342 }
343
344 void GxPluginMono::init_dsp_mono(uint32_t rate, uint32_t bufsize_)
345 {
346 AVOIDDENORMALS();
347
348 bufsize = bufsize_;
349 amplifier.init_static(rate, &amplifier);
350 ts.init_static(rate, &ts);
351 //impf.init_static(rate, &impf);
352 //ampf.init_static(rate, &ampf);
353
354 if (bufsize )
355 {
356 #ifdef _POSIX_PRIORITY_SCHEDULING
357 int priomax = sched_get_priority_max(SCHED_FIFO);
358 if ((priomax/2) > 0) prio = priomax/2;
359 #endif
360 cabconv.set_samplerate(rate);
361 cabconv.set_buffersize(bufsize);
362 cabconv.configure(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
363 if(!cabconv.start(prio, SCHED_FIFO))
364 printf("cabinet convolver disabled\n");
365
366 ampconv.set_samplerate(rate);
367 ampconv.set_buffersize(bufsize);
368 ampconv.configure(contrast_ir_desc.ir_count, contrast_ir_desc.ir_data, contrast_ir_desc.ir_sr);
369 if(!ampconv.start(prio, SCHED_FIFO))
370 printf("presence convolver disabled\n");
371 }
372 else
373 {
374 printf("convolver disabled\n");
375 }
376 }
377
378
379 void GxPluginMono::connect_mono(uint32_t port,void* data)
380 {
381 switch ((PortIndex)port)
382 {
383 case CLevel:
384 clevel = static_cast<float*>(data);
385 break;
386 case ALevel:
387 alevel = static_cast<float*>(data);
388 break;
389 case AMP_CONTROL:
390 c_notice = (LV2_Atom_Sequence*)data;
391 break;
392 case AMP_NOTIFY:
393 n_notice = (LV2_Atom_Sequence*)data;
394 break;
395 case AMP_OUTPUT:
396 output = static_cast<float*>(data);
397 break;
398 case AMP_INPUT:
399 input = static_cast<float*>(data);
400 break;
401 default:
402 break;
403 }
404 }
405
406 void GxPluginMono::run_dsp_mono(uint32_t n_samples)
407 {
408 // run dsp
409 (&amplifier->*_a_ptr)(n_samples, input, output);
410 //amplifier.run_static(n_samples, input, output, &amplifier);
411 ampconv.run_static(n_samples, &ampconv, output);
412 //ts.run_static(n_samples, &ts, output);
413 (&ts->*_t_ptr)(n_samples, output);
414 cabconv.run_static(n_samples, &cabconv, output);
415 // work ?
416 if (!atomic_get(schedule_wait) && val_changed())
417 {
418 clevel_ = (*clevel);
419 alevel_ = (*alevel);
420 atomic_set(&schedule_wait,1);
421 schedule->schedule_work(schedule->handle, sizeof(bool), &doit);
422 }
423 }
424
425 void GxPluginMono::connect_all_mono_ports(uint32_t port, void* data)
426 {
427 connect_mono(port,data);
428 amplifier.connect_static(port,data, &amplifier);
429 ts.connect_static(port,data, &ts);
430 //impf.connect_static(port,data, &impf);
431 //ampf.connect_static(port,data, &ampf);
432 }
433
434 ///////////////////////////// LV2 defines //////////////////////////////
435
436 static LV2_Worker_Status
437 work(LV2_Handle instance,
438 LV2_Worker_Respond_Function respond,
439 LV2_Worker_Respond_Handle handle,
440 uint32_t size,
441 const void* data)
442 {
443 GxPluginMono* self = (GxPluginMono*)instance;
444 self->do_work_mono();
445 return LV2_WORKER_SUCCESS;
446 }
447
448 static LV2_Worker_Status
449 work_response(LV2_Handle instance,
450 uint32_t size,
451 const void* data)
452 {
453 printf("worker respose.\n");
454 return LV2_WORKER_SUCCESS;
455 }
456
457
458 static LV2_Handle
459 instantiate(const LV2_Descriptor* descriptor,
460 double rate,
461 const char* bundle_path,
462 const LV2_Feature* const* features)
463 {
464
465 GxPluginMono *self = new GxPluginMono();
466 if (!self)
467 {
468 return NULL;
469 }
470
471 const LV2_Options_Option* options = NULL;
472 uint32_t bufsize = 0;
473 //printf(" %s\n",descriptor->URI);
474
475 for (int32_t i = 0; features[i]; ++i)
476 {
477 if (!strcmp(features[i]->URI, LV2_URID__map))
478 {
479 self->map = (LV2_URID_Map*)features[i]->data;
480 }
481 else if (!strcmp(features[i]->URI, LV2_WORKER__schedule))
482 {
483 self->schedule = (LV2_Worker_Schedule*)features[i]->data;
484 }
485 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
486 {
487 options = (const LV2_Options_Option*)features[i]->data;
488 }
489 }
490 if (!self->schedule)
491 {
492 fprintf(stderr, "Missing feature work:schedule.\n");
493 delete self;
494 return NULL;
495 }
496 if (!self->map)
497 {
498 fprintf(stderr, "Missing feature uri:map.\n");
499 }
500 else if (!options)
501 {
502 fprintf(stderr, "Missing feature options.\n");
503 }
504 else
505 {
506 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
507 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
508
509 for (const LV2_Options_Option* o = options; o->key; ++o)
510 {
511 if (o->context == LV2_OPTIONS_INSTANCE &&
512 o->key == bufsz_max &&
513 o->type == atom_Int)
514 {
515 bufsize = *(const int32_t*)o->value;
516 }
517 }
518
519 if (bufsize == 0)
520 {
521 fprintf(stderr, "No maximum buffer size given.\n");
522 }
523 printf("using block size: %d\n", bufsize);
524 }
525 self->set_tubesel_mono( descriptor);
526 self->init_dsp_mono((uint32_t)rate, bufsize);
527
528 return (LV2_Handle)self;
529 }
530
531 static void
532 connect_port(LV2_Handle instance,
533 uint32_t port,
534 void* data)
535 {
536 GxPluginMono* self = (GxPluginMono*)instance;
537 self->connect_all_mono_ports(port, data);
538 }
539
540 static void
541 activate(LV2_Handle instance)
542 {
543
544 }
545
546 static void
547 run(LV2_Handle instance, uint32_t n_samples)
548 {
549 GxPluginMono* self = (GxPluginMono*)instance;
550 self->run_dsp_mono(n_samples);
551 }
552
553 static void
554 deactivate(LV2_Handle instance)
555 {
556
557 }
558
559 static void
560 cleanup(LV2_Handle instance)
561 {
562 GxPluginMono* self = (GxPluginMono*)instance;
563 delete self;
564 }
565
566 //////////////////////////////////////////////////////////////////
567
568 const void*
569 extension_data(const char* uri)
570 {
571 static const LV2_Worker_Interface worker = { work, work_response, NULL };
572 if (!strcmp(uri, LV2_WORKER__interface))
573 {
574 return &worker;
575 }
576 return NULL;
577 }
578
579 static const LV2_Descriptor descriptor =
580 {
581 GXPLUGIN_URI "#12ax7",
582 instantiate,
583 connect_port,
584 activate,
585 run,
586 deactivate,
587 cleanup,
588 extension_data
589 };
590
591 static const LV2_Descriptor descriptor1 =
592 {
593 GXPLUGIN_URI "#12AT7",
594 instantiate,
595 connect_port,
596 activate,
597 run,
598 deactivate,
599 cleanup,
600 extension_data
601 };
602 static const LV2_Descriptor descriptor2 =
603 {
604 GXPLUGIN_URI "#6C16",
605 instantiate,
606 connect_port,
607 activate,
608 run,
609 deactivate,
610 cleanup,
611 extension_data
612 };
613 static const LV2_Descriptor descriptor3 =
614 {
615 GXPLUGIN_URI "#6V6",
616 instantiate,
617 connect_port,
618 activate,
619 run,
620 deactivate,
621 cleanup,
622 extension_data
623 };
624 static const LV2_Descriptor descriptor4 =
625 {
626 GXPLUGIN_URI "#6DJ8",
627 instantiate,
628 connect_port,
629 activate,
630 run,
631 deactivate,
632 cleanup,
633 extension_data
634 };
635
636 extern "C"
637 LV2_SYMBOL_EXPORT
638 const LV2_Descriptor*
639 lv2_descriptor(uint32_t index)
640 {
641 switch (index)
642 {
643 case 0:
644 return &descriptor;
645 case 1:
646 return &descriptor1;
647 case 2:
648 return &descriptor2;
649 case 3:
650 return &descriptor3;
651 case 4:
652 return &descriptor4;
653 default:
654 return NULL;
655 }
656 }
+0
-56
src/LV2/gxamp.lv2/gxamp.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXAMP_H_
22 #define SRC_HEADERS_GXAMP_H_
23
24 #include <lv2.h>
25 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
26 #include <lv2/lv2plug.in/ns/ext/options/options.h>
27 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
28 #include <lv2/lv2plug.in/ns/ext/log/log.h>
29 #include <lv2/lv2plug.in/ns/ext/worker/worker.h>
30 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
31
32 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxamp"
33 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxamp#gui"
34
35
36 typedef enum
37 {
38 AMP_MASTERGAIN = 0,
39 AMP_PREGAIN,
40 AMP_WET_DRY,
41 AMP_DRIVE,
42 MID,
43 BASS,
44 TREBLE,
45 CLevel,
46 ALevel,
47 AMP_CONTROL,
48 AMP_NOTIFY,
49 AMP_OUTPUT,
50 AMP_INPUT,
51 AMP_OUTPUT1,
52 AMP_INPUT1,
53 } PortIndex;
54
55 #endif //SRC_HEADERS_GXAMP_H_
+0
-709
src/LV2/gxamp.lv2/gxamp.ttl less more
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
26 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
27 @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
28 @prefix opt: <http://lv2plug.in/ns/ext/options#> .
29 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
30 @prefix work: <http://lv2plug.in/ns/ext/worker#> .
31
32 <http://guitarix.sourceforge.net#me>
33 a foaf:Person ;
34 foaf:name "Hermann Meyer" ;
35 foaf:mbox <mailto:brummer@web.de> ;
36 rdfs:seeAlso <http://guitarix.sourceforge.net> .
37
38 <http://guitarix.sourceforge.net/plugins/gxamp>
39 a doap:Project ;
40 doap:maintainer <http://guitarix.sourceforge.net#me> ;
41 doap:name "GxAmplifier" .
42
43 <http://guitarix.sourceforge.net/plugins/gxamp#12ax7>
44 a lv2:Plugin ,
45 lv2:AmplifierPlugin ;
46 doap:maintainer <http://guitarix.sourceforge.net#me> ;
47 doap:name "GxAmplifier";
48 doap:license <http://opensource.org/licenses/isc> ;
49 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
50 lv2:optionalFeature lv2:hardRTCapable ;
51 lv2:requiredFeature urid:map ,
52 bufsz:boundedBlockLength ,
53 work:schedule ;
54 bufsz:minBlockLength 64 ;
55 bufsz:maxBlockLength 8192 ;
56 lv2:extensionData work:interface ;
57
58 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
59
60 lv2:port [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 0 ;
64 lv2:symbol "fslider0_" ;
65 lv2:name "MasterGain";
66 lv2:default -15.0 ;
67 lv2:minimum -20.0 ;
68 lv2:maximum 20.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 1 ;
73 lv2:symbol "fslider1_" ;
74 lv2:name "PreGain";
75 lv2:default -15.0 ;
76 lv2:minimum -20.0 ;
77 lv2:maximum 20.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 2 ;
82 lv2:symbol "fslider2_" ;
83 lv2:name "Distortion";
84 lv2:default 20.0 ;
85 lv2:minimum 1.0 ;
86 lv2:maximum 100.0 ;
87 ] , [
88 a lv2:InputPort ,
89 lv2:ControlPort ;
90 lv2:index 3 ;
91 lv2:symbol "fslider3_" ;
92 lv2:name "Drive";
93 lv2:default 0.25 ;
94 lv2:minimum 0.01 ;
95 lv2:maximum 1.0 ;
96 ] ,[
97 a lv2:InputPort ,
98 lv2:ControlPort ;
99 lv2:index 4 ;
100 lv2:symbol "fslider0_" ;
101 lv2:name "Middle";
102 lv2:default 0.5 ;
103 lv2:minimum 0.0 ;
104 lv2:maximum 1.0 ;
105 ] , [
106 a lv2:InputPort ,
107 lv2:ControlPort ;
108 lv2:index 5 ;
109 lv2:symbol "fslider1_" ;
110 lv2:name "Bass";
111 lv2:default 0.5 ;
112 lv2:minimum 0.0 ;
113 lv2:maximum 1.0 ;
114 ] , [
115 a lv2:InputPort ,
116 lv2:ControlPort ;
117 lv2:index 6 ;
118 lv2:symbol "fslider2_" ;
119 lv2:name "Treble";
120 lv2:default 0.5 ;
121 lv2:minimum 0.0 ;
122 lv2:maximum 1.0 ;
123 ] , [
124 a lv2:InputPort ,
125 lv2:ControlPort ;
126 lv2:index 7 ;
127 lv2:symbol "fslider0_" ;
128 lv2:name "Cabinet";
129 lv2:default 10.0 ;
130 lv2:minimum 1.0 ;
131 lv2:maximum 20.0 ;
132 ] , [
133 a lv2:InputPort ,
134 lv2:ControlPort ;
135 lv2:index 8 ;
136 lv2:symbol "fslider0_" ;
137 lv2:name "Presence";
138 lv2:default 10.0 ;
139 lv2:minimum 1.0 ;
140 lv2:maximum 20.0 ;
141 ] , [
142 a lv2:InputPort ,
143 atom:AtomPort ;
144 atom:bufferType atom:Sequence ;
145 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
146 lv2:index 9 ;
147 lv2:symbol "control" ;
148 lv2:name "Control"
149 ] , [
150 a lv2:OutputPort ,
151 atom:AtomPort ;
152 atom:bufferType atom:Sequence ;
153 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
154 lv2:index 10 ;
155 lv2:symbol "notify" ;
156 lv2:name "Notify"
157 ] , [
158 a lv2:AudioPort ,
159 lv2:OutputPort ;
160 lv2:index 11 ;
161 lv2:symbol "out" ;
162 lv2:name "Out"
163 ] , [
164 a lv2:AudioPort ,
165 lv2:InputPort ;
166 lv2:index 12 ;
167 lv2:symbol "in" ;
168 lv2:name "in"
169 ].
170
171 <http://guitarix.sourceforge.net/plugins/gxamp#12AT7>
172 a lv2:Plugin ,
173 lv2:AmplifierPlugin ;
174 doap:maintainer <http://guitarix.sourceforge.net#me> ;
175 doap:name "GxAmplifier-II";
176 doap:license <http://opensource.org/licenses/isc> ;
177 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
178 lv2:optionalFeature lv2:hardRTCapable ;
179 lv2:requiredFeature urid:map ,
180 bufsz:boundedBlockLength ,
181 work:schedule ;
182 bufsz:minBlockLength 64 ;
183 bufsz:maxBlockLength 8192 ;
184 lv2:extensionData work:interface ;
185
186 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
187
188 lv2:port [
189 a lv2:InputPort ,
190 lv2:ControlPort ;
191 lv2:index 0 ;
192 lv2:symbol "fslider0_" ;
193 lv2:name "MasterGain";
194 lv2:default -15.0 ;
195 lv2:minimum -20.0 ;
196 lv2:maximum 20.0 ;
197 ] , [
198 a lv2:InputPort ,
199 lv2:ControlPort ;
200 lv2:index 1 ;
201 lv2:symbol "fslider1_" ;
202 lv2:name "PreGain";
203 lv2:default -15.0 ;
204 lv2:minimum -20.0 ;
205 lv2:maximum 20.0 ;
206 ] , [
207 a lv2:InputPort ,
208 lv2:ControlPort ;
209 lv2:index 2 ;
210 lv2:symbol "fslider2_" ;
211 lv2:name "Distortion";
212 lv2:default 20.0 ;
213 lv2:minimum 1.0 ;
214 lv2:maximum 100.0 ;
215 ] , [
216 a lv2:InputPort ,
217 lv2:ControlPort ;
218 lv2:index 3 ;
219 lv2:symbol "fslider3_" ;
220 lv2:name "Drive";
221 lv2:default 0.25 ;
222 lv2:minimum 0.01 ;
223 lv2:maximum 1.0 ;
224 ] ,[
225 a lv2:InputPort ,
226 lv2:ControlPort ;
227 lv2:index 4 ;
228 lv2:symbol "fslider0_" ;
229 lv2:name "Middle";
230 lv2:default 0.5 ;
231 lv2:minimum 0.0 ;
232 lv2:maximum 1.0 ;
233 ] , [
234 a lv2:InputPort ,
235 lv2:ControlPort ;
236 lv2:index 5 ;
237 lv2:symbol "fslider1_" ;
238 lv2:name "Bass";
239 lv2:default 0.5 ;
240 lv2:minimum 0.0 ;
241 lv2:maximum 1.0 ;
242 ] , [
243 a lv2:InputPort ,
244 lv2:ControlPort ;
245 lv2:index 6 ;
246 lv2:symbol "fslider2_" ;
247 lv2:name "Treble";
248 lv2:default 0.5 ;
249 lv2:minimum 0.0 ;
250 lv2:maximum 1.0 ;
251 ] , [
252 a lv2:InputPort ,
253 lv2:ControlPort ;
254 lv2:index 7 ;
255 lv2:symbol "fslider0_" ;
256 lv2:name "Cabinet";
257 lv2:default 10.0 ;
258 lv2:minimum 1.0 ;
259 lv2:maximum 20.0 ;
260 ] , [
261 a lv2:InputPort ,
262 lv2:ControlPort ;
263 lv2:index 8 ;
264 lv2:symbol "fslider0_" ;
265 lv2:name "Presence";
266 lv2:default 10.0 ;
267 lv2:minimum 1.0 ;
268 lv2:maximum 20.0 ;
269 ] , [
270 a lv2:InputPort ,
271 atom:AtomPort ;
272 atom:bufferType atom:Sequence ;
273 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
274 lv2:index 9 ;
275 lv2:symbol "control" ;
276 lv2:name "Control"
277 ] , [
278 a lv2:OutputPort ,
279 atom:AtomPort ;
280 atom:bufferType atom:Sequence ;
281 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
282 lv2:index 10 ;
283 lv2:symbol "notify" ;
284 lv2:name "Notify"
285 ] , [
286 a lv2:AudioPort ,
287 lv2:OutputPort ;
288 lv2:index 11 ;
289 lv2:symbol "out" ;
290 lv2:name "Out"
291 ] , [
292 a lv2:AudioPort ,
293 lv2:InputPort ;
294 lv2:index 12 ;
295 lv2:symbol "in" ;
296 lv2:name "in"
297 ].
298
299 <http://guitarix.sourceforge.net/plugins/gxamp#6C16>
300 a lv2:Plugin ,
301 lv2:AmplifierPlugin ;
302 doap:maintainer <http://guitarix.sourceforge.net#me> ;
303 doap:name "GxAmplifier-III";
304 doap:license <http://opensource.org/licenses/isc> ;
305 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
306 lv2:optionalFeature lv2:hardRTCapable ;
307 lv2:requiredFeature urid:map ,
308 bufsz:boundedBlockLength ,
309 work:schedule ;
310 bufsz:minBlockLength 64 ;
311 bufsz:maxBlockLength 8192 ;
312 lv2:extensionData work:interface ;
313
314 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
315
316 lv2:port [
317 a lv2:InputPort ,
318 lv2:ControlPort ;
319 lv2:index 0 ;
320 lv2:symbol "fslider0_" ;
321 lv2:name "MasterGain";
322 lv2:default -15.0 ;
323 lv2:minimum -20.0 ;
324 lv2:maximum 20.0 ;
325 ] , [
326 a lv2:InputPort ,
327 lv2:ControlPort ;
328 lv2:index 1 ;
329 lv2:symbol "fslider1_" ;
330 lv2:name "PreGain";
331 lv2:default -15.0 ;
332 lv2:minimum -20.0 ;
333 lv2:maximum 20.0 ;
334 ] , [
335 a lv2:InputPort ,
336 lv2:ControlPort ;
337 lv2:index 2 ;
338 lv2:symbol "fslider2_" ;
339 lv2:name "Distortion";
340 lv2:default 20.0 ;
341 lv2:minimum 1.0 ;
342 lv2:maximum 100.0 ;
343 ] , [
344 a lv2:InputPort ,
345 lv2:ControlPort ;
346 lv2:index 3 ;
347 lv2:symbol "fslider3_" ;
348 lv2:name "Drive";
349 lv2:default 0.25 ;
350 lv2:minimum 0.01 ;
351 lv2:maximum 1.0 ;
352 ] ,[
353 a lv2:InputPort ,
354 lv2:ControlPort ;
355 lv2:index 4 ;
356 lv2:symbol "fslider0_" ;
357 lv2:name "Middle";
358 lv2:default 0.5 ;
359 lv2:minimum 0.0 ;
360 lv2:maximum 1.0 ;
361 ] , [
362 a lv2:InputPort ,
363 lv2:ControlPort ;
364 lv2:index 5 ;
365 lv2:symbol "fslider1_" ;
366 lv2:name "Bass";
367 lv2:default 0.5 ;
368 lv2:minimum 0.0 ;
369 lv2:maximum 1.0 ;
370 ] , [
371 a lv2:InputPort ,
372 lv2:ControlPort ;
373 lv2:index 6 ;
374 lv2:symbol "fslider2_" ;
375 lv2:name "Treble";
376 lv2:default 0.5 ;
377 lv2:minimum 0.0 ;
378 lv2:maximum 1.0 ;
379 ] , [
380 a lv2:InputPort ,
381 lv2:ControlPort ;
382 lv2:index 7 ;
383 lv2:symbol "fslider0_" ;
384 lv2:name "Cabinet";
385 lv2:default 10.0 ;
386 lv2:minimum 1.0 ;
387 lv2:maximum 20.0 ;
388 ] , [
389 a lv2:InputPort ,
390 lv2:ControlPort ;
391 lv2:index 8 ;
392 lv2:symbol "fslider0_" ;
393 lv2:name "Presence";
394 lv2:default 10.0 ;
395 lv2:minimum 1.0 ;
396 lv2:maximum 20.0 ;
397 ] , [
398 a lv2:InputPort ,
399 atom:AtomPort ;
400 atom:bufferType atom:Sequence ;
401 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
402 lv2:index 9 ;
403 lv2:symbol "control" ;
404 lv2:name "Control"
405 ] , [
406 a lv2:OutputPort ,
407 atom:AtomPort ;
408 atom:bufferType atom:Sequence ;
409 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
410 lv2:index 10 ;
411 lv2:symbol "notify" ;
412 lv2:name "Notify"
413 ] , [
414 a lv2:AudioPort ,
415 lv2:OutputPort ;
416 lv2:index 11 ;
417 lv2:symbol "out" ;
418 lv2:name "Out"
419 ] , [
420 a lv2:AudioPort ,
421 lv2:InputPort ;
422 lv2:index 12 ;
423 lv2:symbol "in" ;
424 lv2:name "in"
425 ].
426
427 <http://guitarix.sourceforge.net/plugins/gxamp#6V6>
428 a lv2:Plugin ,
429 lv2:AmplifierPlugin ;
430 doap:maintainer <http://guitarix.sourceforge.net#me> ;
431 doap:name "GxAmplifier-IV";
432 doap:license <http://opensource.org/licenses/isc> ;
433 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
434 lv2:optionalFeature lv2:hardRTCapable ;
435 lv2:requiredFeature urid:map ,
436 bufsz:boundedBlockLength ,
437 work:schedule ;
438 bufsz:minBlockLength 64 ;
439 bufsz:maxBlockLength 8192 ;
440 lv2:extensionData work:interface ;
441
442 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
443
444 lv2:port [
445 a lv2:InputPort ,
446 lv2:ControlPort ;
447 lv2:index 0 ;
448 lv2:symbol "fslider0_" ;
449 lv2:name "MasterGain";
450 lv2:default -15.0 ;
451 lv2:minimum -20.0 ;
452 lv2:maximum 20.0 ;
453 ] , [
454 a lv2:InputPort ,
455 lv2:ControlPort ;
456 lv2:index 1 ;
457 lv2:symbol "fslider1_" ;
458 lv2:name "PreGain";
459 lv2:default -15.0 ;
460 lv2:minimum -20.0 ;
461 lv2:maximum 20.0 ;
462 ] , [
463 a lv2:InputPort ,
464 lv2:ControlPort ;
465 lv2:index 2 ;
466 lv2:symbol "fslider2_" ;
467 lv2:name "Distortion";
468 lv2:default 20.0 ;
469 lv2:minimum 1.0 ;
470 lv2:maximum 100.0 ;
471 ] , [
472 a lv2:InputPort ,
473 lv2:ControlPort ;
474 lv2:index 3 ;
475 lv2:symbol "fslider3_" ;
476 lv2:name "Drive";
477 lv2:default 0.25 ;
478 lv2:minimum 0.01 ;
479 lv2:maximum 1.0 ;
480 ] ,[
481 a lv2:InputPort ,
482 lv2:ControlPort ;
483 lv2:index 4 ;
484 lv2:symbol "fslider0_" ;
485 lv2:name "Middle";
486 lv2:default 0.5 ;
487 lv2:minimum 0.0 ;
488 lv2:maximum 1.0 ;
489 ] , [
490 a lv2:InputPort ,
491 lv2:ControlPort ;
492 lv2:index 5 ;
493 lv2:symbol "fslider1_" ;
494 lv2:name "Bass";
495 lv2:default 0.5 ;
496 lv2:minimum 0.0 ;
497 lv2:maximum 1.0 ;
498 ] , [
499 a lv2:InputPort ,
500 lv2:ControlPort ;
501 lv2:index 6 ;
502 lv2:symbol "fslider2_" ;
503 lv2:name "Treble";
504 lv2:default 0.5 ;
505 lv2:minimum 0.0 ;
506 lv2:maximum 1.0 ;
507 ] , [
508 a lv2:InputPort ,
509 lv2:ControlPort ;
510 lv2:index 7 ;
511 lv2:symbol "fslider0_" ;
512 lv2:name "Cabinet";
513 lv2:default 10.0 ;
514 lv2:minimum 1.0 ;
515 lv2:maximum 20.0 ;
516 ] , [
517 a lv2:InputPort ,
518 lv2:ControlPort ;
519 lv2:index 8 ;
520 lv2:symbol "fslider0_" ;
521 lv2:name "Presence";
522 lv2:default 10.0 ;
523 lv2:minimum 1.0 ;
524 lv2:maximum 20.0 ;
525 ] , [
526 a lv2:InputPort ,
527 atom:AtomPort ;
528 atom:bufferType atom:Sequence ;
529 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
530 lv2:index 9 ;
531 lv2:symbol "control" ;
532 lv2:name "Control"
533 ] , [
534 a lv2:OutputPort ,
535 atom:AtomPort ;
536 atom:bufferType atom:Sequence ;
537 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
538 lv2:index 10 ;
539 lv2:symbol "notify" ;
540 lv2:name "Notify"
541 ] , [
542 a lv2:AudioPort ,
543 lv2:OutputPort ;
544 lv2:index 11 ;
545 lv2:symbol "out" ;
546 lv2:name "Out"
547 ] , [
548 a lv2:AudioPort ,
549 lv2:InputPort ;
550 lv2:index 12 ;
551 lv2:symbol "in" ;
552 lv2:name "in"
553 ].
554
555 <http://guitarix.sourceforge.net/plugins/gxamp#6DJ8>
556 a lv2:Plugin ,
557 lv2:AmplifierPlugin ;
558 doap:maintainer <http://guitarix.sourceforge.net#me> ;
559 doap:name "GxAmplifier-V";
560 doap:license <http://opensource.org/licenses/isc> ;
561 lv2:project <http://guitarix.sourceforge.net/plugins/gxamp> ;
562 lv2:optionalFeature lv2:hardRTCapable ;
563 lv2:requiredFeature urid:map ,
564 bufsz:boundedBlockLength ,
565 work:schedule ;
566 bufsz:minBlockLength 64 ;
567 bufsz:maxBlockLength 8192 ;
568 lv2:extensionData work:interface ;
569
570 guiext:ui <http://guitarix.sourceforge.net/plugins/gxamp#gui>;
571
572 lv2:port [
573 a lv2:InputPort ,
574 lv2:ControlPort ;
575 lv2:index 0 ;
576 lv2:symbol "fslider0_" ;
577 lv2:name "MasterGain";
578 lv2:default -15.0 ;
579 lv2:minimum -20.0 ;
580 lv2:maximum 20.0 ;
581 ] , [
582 a lv2:InputPort ,
583 lv2:ControlPort ;
584 lv2:index 1 ;
585 lv2:symbol "fslider1_" ;
586 lv2:name "PreGain";
587 lv2:default -15.0 ;
588 lv2:minimum -20.0 ;
589 lv2:maximum 20.0 ;
590 ] , [
591 a lv2:InputPort ,
592 lv2:ControlPort ;
593 lv2:index 2 ;
594 lv2:symbol "fslider2_" ;
595 lv2:name "Distortion";
596 lv2:default 20.0 ;
597 lv2:minimum 1.0 ;
598 lv2:maximum 100.0 ;
599 ] , [
600 a lv2:InputPort ,
601 lv2:ControlPort ;
602 lv2:index 3 ;
603 lv2:symbol "fslider3_" ;
604 lv2:name "Drive";
605 lv2:default 0.25 ;
606 lv2:minimum 0.01 ;
607 lv2:maximum 1.0 ;
608 ] ,[
609 a lv2:InputPort ,
610 lv2:ControlPort ;
611 lv2:index 4 ;
612 lv2:symbol "fslider0_" ;
613 lv2:name "Middle";
614 lv2:default 0.5 ;
615 lv2:minimum 0.0 ;
616 lv2:maximum 1.0 ;
617 ] , [
618 a lv2:InputPort ,
619 lv2:ControlPort ;
620 lv2:index 5 ;
621 lv2:symbol "fslider1_" ;
622 lv2:name "Bass";
623 lv2:default 0.5 ;
624 lv2:minimum 0.0 ;
625 lv2:maximum 1.0 ;
626 ] , [
627 a lv2:InputPort ,
628 lv2:ControlPort ;
629 lv2:index 6 ;
630 lv2:symbol "fslider2_" ;
631 lv2:name "Treble";
632 lv2:default 0.5 ;
633 lv2:minimum 0.0 ;
634 lv2:maximum 1.0 ;
635 ] , [
636 a lv2:InputPort ,
637 lv2:ControlPort ;
638 lv2:index 7 ;
639 lv2:symbol "fslider0_" ;
640 lv2:name "Cabinet";
641 lv2:default 10.0 ;
642 lv2:minimum 1.0 ;
643 lv2:maximum 20.0 ;
644 ] , [
645 a lv2:InputPort ,
646 lv2:ControlPort ;
647 lv2:index 8 ;
648 lv2:symbol "fslider0_" ;
649 lv2:name "Presence";
650 lv2:default 10.0 ;
651 lv2:minimum 1.0 ;
652 lv2:maximum 20.0 ;
653 ] , [
654 a lv2:InputPort ,
655 atom:AtomPort ;
656 atom:bufferType atom:Sequence ;
657 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
658 lv2:index 9 ;
659 lv2:symbol "control" ;
660 lv2:name "Control"
661 ] , [
662 a lv2:OutputPort ,
663 atom:AtomPort ;
664 atom:bufferType atom:Sequence ;
665 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
666 lv2:index 10 ;
667 lv2:symbol "notify" ;
668 lv2:name "Notify"
669 ] , [
670 a lv2:AudioPort ,
671 lv2:OutputPort ;
672 lv2:index 11 ;
673 lv2:symbol "out" ;
674 lv2:name "Out"
675 ] , [
676 a lv2:AudioPort ,
677 lv2:InputPort ;
678 lv2:index 12 ;
679 lv2:symbol "in" ;
680 lv2:name "in"
681 ].
682
683 <http://guitarix.sourceforge.net/plugins/gxamp#gui>
684 a guiext:GtkUI;
685 guiext:binary <gxamp_gui.so>;
686 guiext:requiredFeature guiext:makeResident;
687 lv2:extensionData work:interface ;
688 guiext:portNotification [
689 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#12ax7>;
690 lv2:symbol "notify" ;
691 guiext:notifyType atom:Blank
692 ] , [
693 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#12AT7>;
694 lv2:symbol "notify" ;
695 guiext:notifyType atom:Blank
696 ] , [
697 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#6C16>;
698 lv2:symbol "notify" ;
699 guiext:notifyType atom:Blank
700 ] , [
701 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#6V6>;
702 lv2:symbol "notify" ;
703 guiext:notifyType atom:Blank
704 ] , [
705 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxamp#6DJ8>;
706 lv2:symbol "notify" ;
707 guiext:notifyType atom:Blank
708 ] .
+0
-245
src/LV2/gxamp.lv2/gxamp_gui.cpp less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxamp.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GXPluginGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GXPluginGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(GXPluginGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GXPluginGUI () {};
56 ~GXPluginGUI () {};
57 } ;
58
59 void GXPluginGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n"
74 " }\n"
75 "widget '*.";
76 addKnob += plug_name;
77 addKnob += "' style 'gx_";
78 addKnob += plug_name;
79 addKnob += "_dark_skin_icons' ";
80 }
81
82 void GXPluginGUI::set_skin()
83 {
84 Glib::ustring toparse = "pixmap_path ";
85 toparse += " '";
86 toparse += GX_LV2_STYLE_DIR;
87 toparse += "/'\n";
88 toparse += "style \"gx_";
89 toparse += plug_name;
90 toparse += "_dark-paintbox\"\n"
91 " { \n"
92 " GxPaintBox::icon-set =9\n"
93 " stock['amp_skin'] = {{'";
94 toparse += plugskin;
95 toparse += "'}}\n"
96 " }\n"
97 "\n"
98 "style 'gx_head_black_box' \n"
99 " { \n"
100 " fg[NORMAL] = '#afafaf' \n"
101 " }\n";
102 toparse += addKnob;
103
104 toparse += " widget '*.amplabel' style:highest 'gx_head_black_box'\n"
105 "widget '*.";
106 toparse += plug_name;
107 toparse += "' style 'gx_";
108 toparse += plug_name;
109 toparse += "_dark-paintbox' ";
110
111 gtk_rc_parse_string (toparse.c_str());
112 }
113
114 void GXPluginGUI::set_plug_name( const char * plugin_uri)
115 {
116 addKnob = "";
117
118 if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12ax7", plugin_uri) == 0)
119 {
120 plugskin = "amp21.png";
121 plug_name = "12ax7";
122 }
123 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12AT7", plugin_uri) == 0)
124 {
125 plugskin = "amp22.png";
126 plug_name = "12AT7";
127 set_knob("metalic1-knob");
128 }
129 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6C16", plugin_uri) == 0)
130 {
131 plugskin = "amp23.png";
132 plug_name = "6C16";
133 }
134 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6V6", plugin_uri) == 0)
135 {
136 plugskin = "amp24.png";
137 plug_name = "6V6";
138 set_knob("knob");
139 }
140 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6DJ8", plugin_uri) == 0)
141 {
142 plugskin = "amp25.png";
143 plug_name = "6DJ8";
144 set_knob("black-knob");
145 }
146 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12ax7_stereo", plugin_uri) == 0)
147 {
148 plugskin = "amp21.png";
149 plug_name = "12ax7_stereo";
150 }
151 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#12AT7_stereo", plugin_uri) == 0)
152 {
153 plugskin = "amp22.png";
154 plug_name = "12AT7_stereo";
155 set_knob("metalic1-knob");
156 }
157 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6C16_stereo", plugin_uri) == 0)
158 {
159 plugskin = "amp23.png";
160 plug_name = "6C16_stereo";
161 }
162 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6V6_stereo", plugin_uri) == 0)
163 {
164 plugskin = "amp24.png";
165 plug_name = "6V6_stereo";
166 set_knob("knob");
167 }
168 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxamp#6DJ8_stereo", plugin_uri) == 0)
169 {
170 plugskin = "amp25.png";
171 plug_name = "6DJ8_stereo";
172 set_knob("black-knob");
173 }
174 else
175 {
176 plugskin = "amp21.png";
177 plug_name = "12ax7";
178 }
179 }
180
181 GtkWidget* GXPluginGUI::make_gui()
182 {
183 // init the gxwmm library
184 Gxw::init();
185 set_skin();
186 GtkWidget* container = gtk_vbox_new(FALSE, 2);
187 widget = new Widget(plug_name);
188 GtkWidget* cWidget = (GtkWidget*)widget->gobj();
189 gtk_container_add( (GtkContainer*)container, cWidget );
190
191 return container;
192 }
193
194
195 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
196 const char * plugin_uri,
197 const char * bundle_path,
198 LV2UI_Write_Function write_function,
199 LV2UI_Controller controller,
200 LV2UI_Widget * widget,
201 const LV2_Feature * const * features)
202 {
203 GXPluginGUI* self = new GXPluginGUI();
204 if (self == NULL) return NULL;
205 self->set_plug_name_static(self, plugin_uri);
206 *widget = (LV2UI_Widget)self->make_gui_static(self);
207 self->widget->controller = controller;
208 self->widget->write_function = write_function;
209 return (LV2UI_Handle)self;
210 }
211
212 static void cleanup(LV2UI_Handle ui)
213 {
214 GXPluginGUI *pluginGui = (GXPluginGUI *) ui;
215 delete pluginGui->widget;
216 delete pluginGui;
217 }
218
219 static void port_event(LV2UI_Handle ui,
220 uint32_t port_index,
221 uint32_t buffer_size,
222 uint32_t format,
223 const void * buffer)
224 {
225 GXPluginGUI *self = (GXPluginGUI *) ui;
226 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
227 return;
228 }
229
230 static LV2UI_Descriptor descriptors[] =
231 {
232 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
233 };
234
235 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
236 {
237 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
238 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
239 {
240 return NULL;
241 }
242 return descriptors + index;
243 }
244
+0
-46
src/LV2/gxamp.lv2/manifest.ttl.in less more
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxamp#12ax7>
23 a lv2:Plugin ;
24 lv2:binary <gxamp@LIB_EXT@> ;
25 rdfs:seeAlso <gxamp.ttl> .
26
27 <http://guitarix.sourceforge.net/plugins/gxamp#12AT7>
28 a lv2:Plugin ;
29 lv2:binary <gxamp@LIB_EXT@> ;
30 rdfs:seeAlso <gxamp.ttl> .
31
32 <http://guitarix.sourceforge.net/plugins/gxamp#6C16>
33 a lv2:Plugin ;
34 lv2:binary <gxamp@LIB_EXT@> ;
35 rdfs:seeAlso <gxamp.ttl> .
36
37 <http://guitarix.sourceforge.net/plugins/gxamp#6V6>
38 a lv2:Plugin ;
39 lv2:binary <gxamp@LIB_EXT@> ;
40 rdfs:seeAlso <gxamp.ttl> .
41
42 <http://guitarix.sourceforge.net/plugins/gxamp#6DJ8>
43 a lv2:Plugin ;
44 lv2:binary <gxamp@LIB_EXT@> ;
45 rdfs:seeAlso <gxamp.ttl> .
+0
-285
src/LV2/gxamp.lv2/widget.cpp less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24 Widget::Widget(Glib::ustring plug_name)
25 {
26 // init values set by host
27 /*mastergain = -15.0;
28 pregain = -15.0;
29 wet_dry = 20.0;
30 drive = 0.25;
31 mid = 0.5;
32 bass = 0.5;
33 treble = 0.5;
34 clevel = 1.0;
35 alevel = 1.0;*/
36
37
38
39 // set propertys for the main paintbox holding the skin
40 m_paintbox.set_border_width(30);
41 m_paintbox.set_spacing(12);
42 m_paintbox.set_homogeneous(false);
43 m_paintbox.set_name(plug_name);
44 m_paintbox.property_paint_func() = "amp_skin_expose";
45 add(m_paintbox);
46 // box for the controllers
47 m_hbox_.set_spacing(12);
48 m_hbox_.set_homogeneous(false);
49 // this box set space for the upper part of the skin
50 m_hbox1_.set_spacing(12);
51 m_hbox1_.set_border_width(65);
52 // set a vertical box in the paintbox
53 m_paintbox.pack_start(m_vbox_);
54 // and put space box on top
55 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING);
56 // and controller box on bottem
57 m_vbox_.pack_start(m_hbox_,Gtk::PACK_SHRINK);
58
59 // create all controllers
60 make_controller_box(&m_vbox, &m_bigknob, "mastergain", -20, 20, 0.1, mastergain, plug_name);
61 m_bigknob.signal_value_changed().connect(sigc::mem_fun(*this,
62 &Widget::on_knob_value_changed));
63
64 make_controller_box(&m_vbox1, &m_bigknob1, "pregain", -20, 20, 0.1, pregain, plug_name);
65 m_bigknob1.signal_value_changed().connect(sigc::mem_fun(*this,
66 &Widget::on_knob1_value_changed));
67
68 make_controller_box(&m_vbox2, &m_bigknob2, "distortion", 1, 100, 1, wet_dry, plug_name);
69 m_bigknob2.signal_value_changed().connect(sigc::mem_fun(*this,
70 &Widget::on_knob2_value_changed));
71
72 make_controller_box(&m_vbox3, &m_bigknob3, "drive", 0.01, 1, 0.01, drive, plug_name);
73 m_bigknob3.signal_value_changed().connect(sigc::mem_fun(*this,
74 &Widget::on_knob3_value_changed));
75
76 make_controller_box(&m_vbox4, &m_smallknob1, "mid", 0, 1, 0.01, mid, plug_name);
77 m_smallknob1.signal_value_changed().connect(sigc::mem_fun(*this,
78 &Widget::on_knob4_value_changed));
79
80 make_controller_box(&m_vbox5, &m_smallknob2, "bass", 0, 1, 0.01, bass, plug_name);
81 m_smallknob2.signal_value_changed().connect(sigc::mem_fun(*this,
82 &Widget::on_knob5_value_changed));
83
84 make_controller_box(&m_vbox6, &m_smallknob3, "treble", 0, 1, 0.01, treble, plug_name);
85 m_smallknob3.signal_value_changed().connect(sigc::mem_fun(*this,
86 &Widget::on_knob6_value_changed));
87
88 make_controller_box(&m_vbox7, &m_smallknob4, "cabinet", 1, 20, 1, clevel, plug_name);
89 m_smallknob4.signal_value_changed().connect(sigc::mem_fun(*this,
90 &Widget::on_knob7_value_changed));
91
92 make_controller_box(&m_vbox8, &m_smallknob5, "presence", 1, 20, 1, alevel, plug_name);
93 m_smallknob5.signal_value_changed().connect(sigc::mem_fun(*this,
94 &Widget::on_knob8_value_changed));
95
96 // put boxed controllers into controller box
97 m_hbox_.pack_start(m_vboxhh);
98 m_hbox_.pack_start(m_vbox1);
99 m_hbox_.pack_start(m_vbox2);
100 m_hbox_.pack_start(m_vbox3);
101 m_hbox_.pack_start(m_vbox7);
102 m_hbox_.pack_start(m_vbox8);
103 m_hbox_.pack_start(m_vbox);
104 // etxra box for the boxed tonestack controllers
105 m_hbox.set_border_width(8);
106 m_hbox.pack_start(m_vbox5);
107 m_hbox.pack_start(m_vbox4);
108 m_hbox.pack_start(m_vbox6);
109 m_hbox.pack_start(m_vboxii);
110 m_hbox.set_spacing(5);
111 // add tonestack controller box to main controller box
112 m_hbox_.pack_start(m_hbox);
113
114 // connect expose handler as resize handler
115 m_paintbox.signal_expose_event().connect(
116 sigc::mem_fun(this, &Widget::_expose_event), true);
117
118 show_all();
119 }
120
121 Widget::~Widget()
122 {
123
124 }
125 // create stackboxes with controllers from gxw
126 void Widget::make_controller_box(Gtk::VBox *box,
127 Gxw::Regler *regler,
128 Glib::ustring label,
129 float min, float max,
130 float digits, float value,
131 Glib::ustring plug_name)
132 {
133 //Gtk::Label* pr = new Gtk::Label(label, 0);
134 //pr->set_name("amplabel");
135 Glib::ustring label_image = GX_LV2_STYLE_DIR;
136 label_image += "/";
137 label_image += label;
138 label_image += "-label.png";
139 Gtk::Image *pr = new Gtk::Image(label_image);
140
141 Gtk::VBox* b1 = new Gtk::VBox();
142 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
143 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
144 regler->cp_configure("KNOB", label, min, max, digits);
145 regler->set_show_value(false);
146 regler->cp_set_value(value);
147 regler->set_name(plug_name);
148 box->pack_start(*regler,Gtk::PACK_SHRINK);
149 Gtk::VBox* b2 = new Gtk::VBox();
150 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
151 }
152 // set borderwith for paintbox when widget resize
153 // to hold controllers in place
154 bool Widget::_expose_event(GdkEventExpose *event)
155 {
156 int x, y, width, height, depth;
157 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
158 //double_t height = m_paintbox.get_window()->get_height();
159 m_paintbox.set_border_width(height/10);
160 return false;
161 }
162 // receive controller value changes from host
163 void Widget::set_value(uint32_t port_index,
164 uint32_t format,
165 const void * buffer)
166 {
167 if ( format == 0 )
168 {
169 float value = *(float *)buffer;
170 switch ((PortIndex)port_index )
171 {
172 case AMP_MASTERGAIN:
173 mastergain = value;
174 m_bigknob.cp_set_value(mastergain);
175 break;
176 case AMP_PREGAIN:
177 pregain = value;
178 m_bigknob1.cp_set_value(pregain);
179 break;
180 case AMP_WET_DRY:
181 wet_dry = value;
182 m_bigknob2.cp_set_value(wet_dry);
183 break;
184 case AMP_DRIVE:
185 drive = value;
186 m_bigknob3.cp_set_value(drive);
187 break;
188 case MID:
189 mid = value;
190 m_smallknob1.cp_set_value(mid);
191 break;
192 case BASS:
193 bass = value;
194 m_smallknob2.cp_set_value(bass);
195 break;
196 case TREBLE:
197 treble = value;
198 m_smallknob3.cp_set_value(treble);
199 break;
200 case CLevel:
201 clevel = value;
202 m_smallknob4.cp_set_value(clevel);
203 break;
204 case ALevel:
205 alevel = value;
206 m_smallknob5.cp_set_value(alevel);
207 break;
208 default:
209 break;
210 }
211 }
212 }
213 // write value changes to the host->engine
214 void Widget::on_knob_value_changed()
215 {
216 mastergain = m_bigknob.get_value();
217 //std::cout << "mastergain = " << mastergain << std::endl;
218 write_function(controller, (PortIndex)AMP_MASTERGAIN,
219 sizeof(float), 0, (const void*)&mastergain);
220 }
221
222 void Widget::on_knob1_value_changed()
223 {
224 pregain = m_bigknob1.get_value();
225 //std::cout << "pregain = " << pregain << std::endl;
226 write_function(controller, (PortIndex)AMP_PREGAIN,
227 sizeof(float), 0, (const void*)&pregain);
228 }
229
230 void Widget::on_knob2_value_changed()
231 {
232 wet_dry = m_bigknob2.get_value();
233 //std::cout << "wet_dry = " << wet_dry << std::endl;
234 write_function(controller, (PortIndex)AMP_WET_DRY,
235 sizeof(float), 0, (const void*)&wet_dry);
236 }
237
238 void Widget::on_knob3_value_changed()
239 {
240 drive = m_bigknob3.get_value();
241 //std::cout << "drive = " << drive << std::endl;
242 write_function(controller, (PortIndex)AMP_DRIVE,
243 sizeof(float), 0, (const void*)&drive);
244 }
245
246 void Widget::on_knob4_value_changed()
247 {
248 mid = m_smallknob1.get_value();
249 //std::cout << "mid = " << mid << std::endl;
250 write_function(controller, (PortIndex)MID,
251 sizeof(float), 0, (const void*)&mid);
252 }
253
254 void Widget::on_knob5_value_changed()
255 {
256 bass = m_smallknob2.get_value();
257 //std::cout << "bass = " << bass << std::endl;
258 write_function(controller, (PortIndex)BASS,
259 sizeof(float), 0, (const void*)&bass);
260 }
261
262 void Widget::on_knob6_value_changed()
263 {
264 treble = m_smallknob3.get_value();
265 //std::cout << "treble = " << treble << std::endl;
266 write_function(controller, (PortIndex)TREBLE,
267 sizeof(float), 0, (const void*)&treble);
268 }
269
270 void Widget::on_knob7_value_changed()
271 {
272 clevel = m_smallknob4.get_value();
273 //std::cout << "treble = " << clevel << std::endl;
274 write_function(controller, (PortIndex)CLevel,
275 sizeof(float), 0, (const void*)&clevel);
276 }
277
278 void Widget::on_knob8_value_changed()
279 {
280 alevel = m_smallknob5.get_value();
281 //std::cout << "treble = " << alevel << std::endl;
282 write_function(controller, (PortIndex)ALevel,
283 sizeof(float), 0, (const void*)&alevel);
284 }
+0
-109
src/LV2/gxamp.lv2/widget.h less more
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxamp.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 void make_controller_box(Gtk::VBox *box,
35 Gxw::Regler *regler,
36 Glib::ustring label,
37 float min, float max,
38 float digits, float value,
39 Glib::ustring plug_name);
40 bool _expose_event(GdkEventExpose *event);
41 void set_value(uint32_t port_index,
42 uint32_t format,
43 const void * buffer);
44 public:
45
46 // public Lv2 communication stuff
47 LV2UI_Controller controller;
48 LV2UI_Write_Function write_function;
49 static void set_value_static(uint32_t port_index,
50 uint32_t buffer_size,
51 uint32_t format,
52 const void * buffer, Widget *self)
53 {
54 self->set_value(port_index,format,buffer);
55 }
56
57 Widget(Glib::ustring plug_name);
58 ~Widget();
59
60 protected:
61 Gtk::VBox m_vbox_;
62 Gtk::HBox m_hbox_;
63 Gtk::HBox m_hbox1_;
64 Gtk::VBox m_vbox;
65 Gtk::VBox m_vbox1;
66 Gtk::VBox m_vbox2;
67 Gtk::VBox m_vbox3;
68 Gtk::VBox m_vbox4;
69 Gtk::VBox m_vbox5;
70 Gtk::VBox m_vbox6;
71 Gtk::VBox m_vbox7;
72 Gtk::VBox m_vbox8;
73 Gtk::VBox m_vboxhh;
74 Gtk::VBox m_vboxii;
75
76 Gxw::PaintBox m_paintbox;
77 Gtk::HBox m_hbox;
78 Gxw::BigKnob m_bigknob;
79 Gxw::BigKnob m_bigknob1;
80 Gxw::BigKnob m_bigknob2;
81 Gxw::BigKnob m_bigknob3;
82 Gxw::SmallKnob m_smallknob1;
83 Gxw::SmallKnob m_smallknob2;
84 Gxw::SmallKnob m_smallknob3;
85 Gxw::SmallKnobR m_smallknob4;
86 Gxw::SmallKnobR m_smallknob5;
87 void on_knob_value_changed();
88 void on_knob1_value_changed();
89 void on_knob2_value_changed();
90 void on_knob3_value_changed();
91 void on_knob4_value_changed();
92 void on_knob5_value_changed();
93 void on_knob6_value_changed();
94 void on_knob7_value_changed();
95 void on_knob8_value_changed();
96 // stores port values we're currently at.
97 float mastergain;
98 float pregain;
99 float wet_dry;
100 float drive;
101 float mid;
102 float bass;
103 float treble;
104 float clevel;
105 float alevel;
106 };
107
108 #endif //SRC_HEADERS_WIDGET_H_
+0
-84
src/LV2/gxamp.lv2/wscript less more
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxamp.lv2'
10
11 src = ['gxamp.cpp',
12 'DSP/gx_resampler.cc',
13 'DSP/gx_convolver.cc'
14 ]
15 incl = ['../../','./', './DSP']
16 lib = []
17 if sys.platform.startswith("linux"):
18 lib.append('dl')
19 uselib = ['LV2CORE','GLIBMM']
20 if bld.env['ZITA_CONVOLVER']:
21 uselib.append('ZITA_CONVOLVER')
22 else:
23 src.append('../../zita-convolver/zita-convolver.cc')
24 incl.append('../../zita-convolver');
25 uselib.append('FFTW3')
26 if bld.env['ZITA_RESAMPLER']:
27 uselib.append('ZITA_RESAMPLER')
28 else:
29 src.append('../../zita-resampler-1.1.0/resampler.cc')
30 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
31 incl.append('../../zita-resampler-1.1.0')
32 cxxflag =[]
33 if not bld.env['OPT'] and bld.env['SSE2']:
34 cxxflag = [ "-msse2", "-mfpmath=sse"]
35 lv2_plugin = bld(
36 features='cxx cshlib ',
37 includes = incl,
38 lib = lib,
39 uselib = uselib,
40 obj_ext = '_2.o',
41 cxxflags = cxxflag,
42 defines = ["LV2_SO"],
43 target = 'gxamp',
44 source = src,
45 install_path = '${LV2DIR}/%s' % bundle,
46 chmod = 0o755,
47 )
48 lv2_plugin.env['shlib_PATTERN'] = '%s.so'
49
50 uselib_local1 = []
51 libpath1 = []
52 lib1 = []
53 incl = ['../../../libgxwmm','../../../libgxw']
54 if sys.platform.startswith("linux"):
55 lib1.append('dl')
56 if bld.env["GX_LIB_SHARED"]:
57 lib1 += ['gxwmm','gxw']
58 libpath1 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
59 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
60 else:
61 uselib_local1 += ['gxwmm','gxw']
62
63 lv2_plugin_gui = bld(
64 features='cxx cshlib ',
65 includes = incl,
66 lib = lib1,
67 uselib = 'LV2CORE GTKMM',
68 libpath = libpath1,
69 uselib_local = uselib_local1,
70 linkflags = '-Wl,-z,nodelete',
71 defines = ["LV2_GUI"],
72 target = 'gxamp_gui',
73 source = 'widget.cpp gxamp_gui.cpp',
74 install_path = '${LV2DIR}/%s' % bundle,
75 chmod = 0o755,
76 )
77 lv2_plugin_gui.env['shlib_PATTERN'] = '%s.so'
78
79
80 install_path = '${LV2DIR}/%s' % bundle,
81 bld.install_files('${LV2DIR}/gxamp.lv2', 'manifest.ttl')
82 bld.install_files('${LV2DIR}/gxamp.lv2', 'gxamp.ttl')
83
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
2626
2727 <http://guitarix.sourceforge.net#me>
2828 a foaf:Person ;
29 foaf:name "Hermann Meyer" ;
29 foaf:name "Guitarix team" ;
3030 foaf:mbox <mailto:brummer@web.de> ;
3131 rdfs:seeAlso <http://guitarix.sourceforge.net> .
3232
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
00 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
2626
2727 <http://guitarix.sourceforge.net#me>
2828 a foaf:Person ;
29 foaf:name "Hermann Meyer" ;
29 foaf:name "Guitarix team" ;
3030 foaf:mbox <mailto:brummer@web.de> ;
3131 rdfs:seeAlso <http://guitarix.sourceforge.net> .
3232
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxbooster#booster>
23 a lv2:Plugin ;
24 lv2:binary <gxbooster.so> ;
25 rdfs:seeAlso <gxbooster.ttl> .
00 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxechocat.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gxechocat.cc" // dsp class generated by faust -> dsp2cc
26 #ifndef __SSE__
27 #include "noiser.cc"
28 #endif
29 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
30
31 class Gxechocat
32 {
33 private:
34 // internal stuff
35 float* output;
36 float* input;
37 PluginLV2* echocat;
38 #ifndef __SSE__
39 PluginLV2* wn;
40 #endif
41 public:
42
43 inline void run_dsp_mono(uint32_t n_samples);
44 inline void connect_mono(uint32_t port,void* data);
45 inline void init_dsp_mono(uint32_t rate);
46 inline void connect_all_mono_ports(uint32_t port, void* data);
47 inline void activate_f();
48 inline void clean_up();
49 inline void deactivate_f();
50 Gxechocat();
51 ~Gxechocat();
52 };
53
54 // constructor
55 Gxechocat::Gxechocat() :
56 output(NULL),
57 input(NULL),
58 echocat(gxechocat::plugin()) {};
59
60 // destructor
61 Gxechocat::~Gxechocat()
62 {
63 // just to be sure the plug have given free the allocated mem
64 // it didn't hurd if the mem is already given free by clean_up()
65 if (echocat->activate_plugin !=0)
66 echocat->activate_plugin(false, echocat);
67 // delete DSP class
68 echocat->delete_instance(echocat);
69 };
70
71 ////////////////////////////// PLUG-IN CLASS FUNCTIONS ////////////////
72
73 void Gxechocat::init_dsp_mono(uint32_t rate)
74 {
75 AVOIDDENORMALS(); // init th`ee SSE denormal protection
76 #ifndef __SSE__
77 wn = noiser::plugin();
78 wn->set_samplerate(rate, wn);
79 #endif
80 echocat->set_samplerate(rate, echocat); // init the DSP class
81 }
82
83 // connect the Ports used by the plug-in class
84 void Gxechocat::connect_mono(uint32_t port,void* data)
85 {
86
87 switch ((PortIndex)port)
88 {
89 case EFFECTS_OUTPUT:
90 output = static_cast<float*>(data);
91 break;
92 case EFFECTS_INPUT:
93 input = static_cast<float*>(data);
94 break;
95 default:
96 break;
97 }
98 }
99
100 void Gxechocat::activate_f()
101 {
102 // allocate the internal DSP mem
103 if (echocat->activate_plugin !=0)
104 echocat->activate_plugin(true, echocat);
105 }
106
107 void Gxechocat::clean_up()
108 {
109 #ifndef __SSE__
110 wn->delete_instance(wn);;
111 #endif
112 // delete the internal DSP mem
113 if (echocat->activate_plugin !=0)
114 echocat->activate_plugin(false, echocat);
115 }
116
117 void Gxechocat::deactivate_f()
118 {
119 // delete the internal DSP mem
120 if (echocat->activate_plugin !=0)
121 echocat->activate_plugin(false, echocat);
122 }
123
124 void Gxechocat::run_dsp_mono(uint32_t n_samples)
125 {
126 #ifndef __SSE__
127 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
128 #endif
129 echocat->mono_audio(static_cast<int>(n_samples), input,
130 output, echocat);
131 }
132
133 void Gxechocat::connect_all_mono_ports(uint32_t port, void* data)
134 {
135 // connect the Ports used by the plug-in class
136 connect_mono(port,data);
137 // connect the Ports used by the DSP class
138 echocat->connect_ports(port, data, echocat);
139 }
140
141 ///////////////////////////// LV2 defines //////////////////////////////
142
143 static LV2_Handle
144 instantiate(const LV2_Descriptor* descriptor,
145 double rate,
146 const char* bundle_path,
147 const LV2_Feature* const* features)
148 {
149 // init the plug-in class
150
151 Gxechocat *self = new Gxechocat();
152 if (!self)
153 {
154 return NULL;
155 }
156 self->init_dsp_mono((uint32_t)rate);
157
158 return (LV2_Handle)self;
159 }
160
161 static void
162 connect_port(LV2_Handle instance,
163 uint32_t port,
164 void* data)
165 {
166 // connect all ports
167 static_cast<Gxechocat*>(instance)->connect_all_mono_ports(port, data);
168 }
169
170 static void
171 activate(LV2_Handle instance)
172 {
173 // allocate needed mem
174 static_cast<Gxechocat*>(instance)->activate_f();
175 }
176
177 static void
178 run(LV2_Handle instance, uint32_t n_samples)
179 {
180 // run dsp
181 static_cast<Gxechocat*>(instance)->run_dsp_mono(n_samples);
182 }
183
184 static void
185 deactivate(LV2_Handle instance)
186 {
187 // free allocated mem
188 static_cast<Gxechocat*>(instance)->deactivate_f();
189 }
190
191 static void
192 cleanup(LV2_Handle instance)
193 {
194 // well, clean up after us
195 Gxechocat* self = static_cast<Gxechocat*>(instance);
196 self->clean_up();
197 delete self;
198 }
199
200 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
201
202 static const LV2_Descriptor descriptor =
203 {
204 GXPLUGIN_URI "#echocat",
205 instantiate,
206 connect_port,
207 activate,
208 run,
209 deactivate,
210 cleanup,
211 NULL
212 };
213
214 extern "C"
215 LV2_SYMBOL_EXPORT
216 const LV2_Descriptor*
217 lv2_descriptor(uint32_t index)
218 {
219 switch (index)
220 {
221 case 0:
222 return &descriptor;
223 default:
224 return NULL;
225 }
226 }
227
228 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxechocat"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxechocat#gui"
28
29
30 typedef enum
31 {
32 INPUTGAIN,
33 SWELL,
34 SUSTAIN,
35 OUTPUTGAIN,
36 HEAD1,
37 HEAD2,
38 HEAD3,
39 EFFECTS_OUTPUT,
40 EFFECTS_INPUT,
41 } PortIndex;
42
43 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gxechocat>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "GxEchoCat" .
37
38 <http://guitarix.sourceforge.net/plugins/gxechocat#echocat>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxEchoCat";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gxechocat> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gxechocat#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "input_gain" ;
54 lv2:name "Input Gain";
55 lv2:default 0.5 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 1.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "swell" ;
63 lv2:name "Swell";
64 lv2:default 0.0 ;
65 lv2:minimum 0.0 ;
66 lv2:maximum 1.0 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "sustain" ;
72 lv2:name "Sustain";
73 lv2:default 0.0 ;
74 lv2:minimum 0.0 ;
75 lv2:maximum 1.0 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "outputgain" ;
81 lv2:name "OutputGain";
82 lv2:default 0.5 ;
83 lv2:minimum 0.0 ;
84 lv2:maximum 1.0 ;
85 ] , [
86 a lv2:InputPort ,
87 lv2:ControlPort ;
88 lv2:index 4 ;
89 lv2:symbol "head1" ;
90 lv2:name "Head 1";
91 lv2:portProperty lv2:integer;
92 lv2:portProperty lv2:enumeration ;
93 lv2:default 0 ;
94 lv2:minimum 0 ;
95 lv2:maximum 1 ;
96 ] , [
97 a lv2:InputPort ,
98 lv2:ControlPort ;
99 lv2:index 5 ;
100 lv2:symbol "head2" ;
101 lv2:name "Head 2";
102 lv2:portProperty lv2:integer;
103 lv2:portProperty lv2:enumeration ;
104 lv2:default 0 ;
105 lv2:minimum 0 ;
106 lv2:maximum 1 ;
107 ] , [
108 a lv2:InputPort ,
109 lv2:ControlPort ;
110 lv2:index 6 ;
111 lv2:symbol "head3" ;
112 lv2:name "Head 3";
113 lv2:portProperty lv2:integer;
114 lv2:portProperty lv2:enumeration ;
115 lv2:default 0 ;
116 lv2:minimum 0 ;
117 lv2:maximum 1 ;
118 ] ,[
119 a lv2:AudioPort ,
120 lv2:OutputPort ;
121 lv2:index 7 ;
122 lv2:symbol "out" ;
123 lv2:name "Out"
124 ] , [
125 a lv2:AudioPort ,
126 lv2:InputPort ;
127 lv2:index 8 ;
128 lv2:symbol "in" ;
129 lv2:name "In"
130 ].
131
132 <http://guitarix.sourceforge.net/plugins/gxechocat#gui>
133 a guiext:GtkUI;
134 guiext:binary <gxechocat_gui.so>;
135 guiext:requiredFeature guiext:makeResident .
136
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxechocat.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GxechocatGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GxechocatGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(GxechocatGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GxechocatGUI () {};
56 ~GxechocatGUI () {};
57 } ;
58
59 void GxechocatGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n";
68 addKnob += " stock['button_on'] = {{'"
69 "push-switch-on.png'}}\n"
70 " stock['button_off'] = {{'"
71 "push-switch-off.png'}}\n"
72 " }\n"
73 "widget '*.";
74 addKnob += plug_name;
75 addKnob += "' style 'gx_";
76 addKnob += plug_name;
77 addKnob += "_dark_skin_icons' \n"
78 "class '*GxToggleImage' style'gx_";
79 addKnob += plug_name;
80 addKnob += "_dark_skin_icons' \n";
81 }
82
83 void GxechocatGUI::set_skin()
84 {
85 Glib::ustring toparse = "pixmap_path ";
86 toparse += " '";
87 toparse += GX_LV2_STYLE_DIR;
88 toparse += "/'\n";
89 toparse += "style \"gx_";
90 toparse += plug_name;
91 toparse += "_dark-paintbox\"\n"
92 " { \n"
93 "GxPaintBox::skin-gradient = {\n"
94 "{ 65536, 0, 0, 13107, 52428 }, \n"
95 "{ 52428, 0, 0, 0, 52428 },\n"
96 "{ 13107, 0, 0, 13107, 13107 }}\n"
97 " GxPaintBox::icon-set =4\n"
98 " stock['amp_skin'] = {{'";
99 toparse += plugskin;
100 toparse += "'}}\n"
101 " }\n"
102 "\n"
103 "style 'gx_headechocat_box' \n"
104 " { \n"
105 " fg[NORMAL] = '#ebebeb' \n"
106 "font_name = 'sans 7.5 bold' \n"
107 " }\n";
108 toparse += addKnob;
109
110 toparse += " widget '*.amplabel' style:highest 'gx_headechocat_box'\n"
111 "widget '*.";
112 toparse += plug_name;
113 toparse += "' style 'gx_";
114 toparse += plug_name;
115 toparse += "_dark-paintbox' ";
116 toparse += "style 'gx_switch'\n"
117 "{\n"
118 "xthickness = 0\n"
119 "ythickness = 0\n"
120 "GtkButton::inner-border = {0, 0, 0, 0}\n"
121 "GtkButton::default-border = {0, 0, 0, 0}\n"
122 "GtkButton::focus-line-width = 0\n"
123 "GtkButton::focus-padding = 0\n"
124 "GtkButton::interior-focus = 0\n"
125 "GtkButton::child-displacement-x = 0\n"
126 "GtkButton::child-displacement-y = 0\n"
127 " }\n"
128 "widget '*.";
129 toparse += plug_name;
130 toparse += "' style:highest 'gx_switch'";
131
132 gtk_rc_parse_string (toparse.c_str());
133 }
134
135 void GxechocatGUI::set_plug_name( const char * plugin_uri)
136 {
137 addKnob = "";
138
139 if (strcmp("http://guitarix.sourceforge.net/plugins/gxechocat#echocat", plugin_uri) == 0)
140 {
141 plugskin = "echocat.png";
142 plug_name = "gxechocat";
143 set_knob("echocat-knob");
144 }
145 else
146 {
147 plugskin = "echocat.png";
148 plug_name = "gxechocat";
149 }
150 }
151
152 GtkWidget* GxechocatGUI::make_gui()
153 {
154 // init the gxwmm library
155 Gxw::init();
156 set_skin();
157 GtkWidget* container = gtk_vbox_new(FALSE, 0);
158 widget = new Widget(plug_name);
159 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
160 gtk_container_add(GTK_CONTAINER(container), cWidget );
161
162 return container;
163 }
164
165
166 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
167 const char * plugin_uri,
168 const char * bundle_path,
169 LV2UI_Write_Function write_function,
170 LV2UI_Controller controller,
171 LV2UI_Widget * widget,
172 const LV2_Feature * const * features)
173 {
174 GxechocatGUI* self = new GxechocatGUI();
175 if (self == NULL) return NULL;
176 self->set_plug_name_static(self, plugin_uri);
177 *widget = (LV2UI_Widget)self->make_gui_static(self);
178 self->widget->controller = controller;
179 self->widget->write_function = write_function;
180 return (LV2UI_Handle)self;
181 }
182
183 static void cleanup(LV2UI_Handle ui)
184 {
185 GxechocatGUI *pluginGui = static_cast<GxechocatGUI*>(ui);
186 delete pluginGui->widget;
187 delete pluginGui;
188 }
189
190 static void port_event(LV2UI_Handle ui,
191 uint32_t port_index,
192 uint32_t buffer_size,
193 uint32_t format,
194 const void * buffer)
195 {
196 GxechocatGUI *self = static_cast<GxechocatGUI*>(ui);
197 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
198 return;
199 }
200
201 static LV2UI_Descriptor descriptors[] =
202 {
203 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
204 };
205
206 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
207 {
208 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
209 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
210 {
211 return NULL;
212 }
213 return descriptors + index;
214 }
215
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxechocat#echocat>
23 a lv2:Plugin ;
24 lv2:binary <gxechocat.so> ;
25 rdfs:seeAlso <gxechocat.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxechocat#echocat>
23 a lv2:Plugin ;
24 lv2:binary <gxechocat@LIB_EXT@> ;
25 rdfs:seeAlso <gxechocat.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
33 {
34 switch ((PortIndex)port_index )
35 {
36 case INPUTGAIN:
37 return &m_bigknob;
38 case SWELL:
39 return &m_bigknob1;
40 case SUSTAIN:
41 return &m_bigknob2;
42 case OUTPUTGAIN:
43 return &m_bigknob3;
44 case HEAD1:
45 return &m_switch;
46 case HEAD2:
47 return &m_switch1;
48 case HEAD3:
49 return &m_switch2;
50 default:
51 return NULL;
52 }
53 }
54
55 Widget::Widget(Glib::ustring plugname):
56 plug_name(plugname)
57 {
58 // create controllers for port name
59 make_controller_box(&m_vbox2, "GAIN", 0, 1.0, 0.01, INPUTGAIN);
60 make_controller_box(&m_vbox3, "SWELL", 0, 1.0, 0.01, SWELL);
61 make_controller_box(&m_vbox4, "SUSTAIN", 0, 1.0, 0.01, SUSTAIN);
62 make_controller_box(&m_vbox5, "OUTPUT", 0, 1.0, 0.01, OUTPUTGAIN);
63
64 make_switch_box(&m_vbox6, "1", HEAD1);
65 make_switch_box(&m_vbox7, "2", HEAD2);
66 make_switch_box(&m_vbox8, "3", HEAD3);
67 //make_switch_box(&m_vbox9, "HEAD4", HEAD4);
68
69 // set propertys for the main paintbox holding the skin
70 m_paintbox.set_border_width(0);
71 m_paintbox.set_spacing(0);
72 m_paintbox.set_homogeneous(false);
73 m_paintbox.set_name(plug_name);
74 m_paintbox.property_paint_func() = "amp_skin_expose";
75 m_paintbox.set_size_request( 500, 256 ) ;
76
77 add(m_paintbox);
78
79 // One vertical box to wrap all in
80 m_vbox_.set_spacing(0);
81 m_vbox_.set_border_width(0);
82 m_vbox_.set_homogeneous(false);
83
84
85 m_paintbox.pack_start(m_vbox_ , Gtk::PACK_EXPAND_PADDING, 0);
86
87
88 // This is the central controller strip
89 m_hbox1_.set_spacing(20);
90 m_hbox1_.set_border_width(0);
91 m_hbox1_.set_homogeneous(true);
92
93 // put boxed controllers into controller box
94 m_vbox2.set_spacing(6);
95 m_vbox3.set_spacing(6);
96 m_vbox4.set_spacing(6);
97 m_vbox5.set_spacing(6);
98
99 m_hbox1_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
100 m_hbox1_.pack_start(m_vbox2);
101 m_hbox1_.pack_start(m_vbox3);
102 m_hbox1_.pack_start(m_vbox4);
103 m_hbox1_.pack_start(m_vbox5);
104 m_hbox1_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
105
106 // Now the row of switches for the tape heads
107 m_hbox2_.set_spacing(0);
108 m_hbox2_.set_border_width(0);
109 m_hbox2_.set_homogeneous(false);
110 m_hbox2_.pack_start(m_vbox1_, Gtk::PACK_EXPAND_PADDING);
111 m_hbox2_.pack_start(m_vbox6, Gtk::PACK_SHRINK, 0);
112
113 m_hbox2_.pack_start(m_vbox7, Gtk::PACK_SHRINK, 0);
114 m_hbox2_.pack_start(m_vbox8, Gtk::PACK_SHRINK, 0);
115 m_hbox2_.pack_start(m_vbox2_, Gtk::PACK_EXPAND_PADDING);
116 // Now put all layers in main vbox
117
118 m_vbox_.pack_start(m_hbox3_, Gtk::PACK_EXPAND_PADDING, 0);
119 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_SHRINK, 0);
120 m_vbox_.pack_end(m_hbox2_, Gtk::PACK_SHRINK, 0);
121 m_vbox_.pack_end(m_hbox4_, Gtk::PACK_EXPAND_PADDING, 0);
122
123 // connect expose handler as resize handler
124 m_paintbox.signal_expose_event().connect(
125 sigc::mem_fun(this, &Widget::_expose_event), true);
126
127 set_app_paintable(true);
128 show_all();
129 }
130
131 Widget::~Widget()
132 {
133
134 }
135
136 // set borderwith for paintbox when widget resize
137 // to hold controllers in place
138 bool Widget::_expose_event(GdkEventExpose *event)
139 {
140 int x, y, width, height, depth;
141 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
142 //double_t height = m_paintbox.get_window()->get_height();
143 m_paintbox.set_border_width(height/10);
144 return false;
145 }
146
147 // create selectors from gxwmm
148 void Widget::make_selector(Glib::ustring labela,
149 Glib::ustring tables[],
150 size_t _size,
151 float min, float digits,
152 PortIndex port_name)
153 {
154 Gxw::Selector *regler = static_cast<Gxw::Selector*>
155 (get_controller_by_port(port_name));
156 if (regler)
157 {
158 float max = static_cast<float>(_size+1);
159
160 Gtk::TreeModelColumn<Glib::ustring> label;
161 Gtk::TreeModelColumnRecord rec;
162 rec.add(label);
163 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
164
165 for (uint32_t i = 0 ; i< _size; ++i) {
166 ls->append()->set_value(0, tables[i]);
167 }
168 regler->set_model(ls);
169 regler->set_has_tooltip();
170 regler->set_tooltip_text(labela);
171 regler->cp_configure("SELECTOR", labela, min, max, digits);
172 regler->set_show_value(false);
173 regler->set_name(plug_name);
174 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
175 *this, &Widget::on_value_changed), port_name));
176 }
177 }
178
179 // create stackboxes with controllers for port name
180 void Widget::make_controller_box(Gtk::Box *box,
181 Glib::ustring label,
182 float min, float max,
183 float digits,
184 PortIndex port_name)
185 {
186 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
187 get_controller_by_port(port_name));
188 if (regler)
189 {
190 Gtk::Label* pr = new Gtk::Label(label, 0);
191 pr->set_name("amplabel");
192 // use label images instead simple string labes
193 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
194 label_image += "/";
195 label_image += label;
196 label_image += "-label.png";
197 Gtk::Image *pr = new Gtk::Image(label_image);*/
198
199 Gtk::VBox* b1 = new Gtk::VBox();
200 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
201 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
202 regler->cp_configure("KNOB", label, min, max, digits);
203 regler->set_show_value(false);
204 regler->set_name(plug_name);
205 box->pack_start(*regler,Gtk::PACK_SHRINK);
206 Gtk::VBox* b2 = new Gtk::VBox();
207 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
208 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
209 *this, &Widget::on_value_changed), port_name));
210 }
211 }
212
213 // create stackboxes with switch controller for port name
214 void Widget::make_switch_box(Gtk::Box *box,
215 Glib::ustring label,
216 PortIndex port_name)
217 {
218 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
219 get_controller_by_port(port_name));
220 if (regler)
221 {
222 Gtk::Label* pr = new Gtk::Label(label, 0);
223 pr->set_name("amplabel");
224 // use label images instead simple string labes
225 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
226 label_image += "/"+plug_name+"-";
227 label_image += label;
228 label_image += "-label.png";
229 Gtk::Image *pr = new Gtk::Image(label_image);*/
230
231 regler->cp_configure("switch", label, 0, 1, 1);
232 regler->set_can_focus( false ) ;
233
234 regler->set_name(plug_name);
235 regler->set_base_name( "button" );
236 Gtk::VBox* b1 = new Gtk::VBox();
237 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
238 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
239 box->pack_start(*regler,Gtk::PACK_SHRINK);
240
241 Gtk::VBox* b2 = new Gtk::VBox();
242 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
243 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
244 *this, &Widget::on_value_changed), port_name));
245 }
246 }
247
248 // Create the Text Labels from images For Amp
249 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
250 {
251 Glib::ustring label_image = GX_LV2_STYLE_DIR;
252 label_image += "/";
253 label_image += label;
254 label_image += ".png";
255 Gtk::Image *pr = new Gtk::Image(label_image);
256
257
258 Gtk::VBox* b1 = new Gtk::VBox();
259 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
260 if( start ){
261 // std::cout << "Pack Start "<<label<<std::endl;
262 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
263 }else{
264 // std::cout << "Pack End " << label << std::endl;
265 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
266 }
267
268 Gtk::VBox* b2 = new Gtk::VBox();
269 box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
270
271 }
272 // receive controller value changes from host and set them to controller
273 void Widget::set_value(uint32_t port_index,
274 uint32_t format,
275 const void * buffer)
276 {
277 if ( format == 0 )
278 {
279 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
280 get_controller_by_port(port_index));
281 if (regler)
282 {
283 float value = *static_cast<const float*>(buffer);
284 regler->cp_set_value(value);
285 }
286 }
287 }
288
289 // write (UI) controller value changes to the host->engine
290 void Widget::on_value_changed(uint32_t port_index)
291 {
292 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
293 get_controller_by_port(port_index));
294 if (regler)
295 {
296 float value = regler->cp_get_value();
297 write_function(controller, port_index, sizeof(float), 0,
298 static_cast<const void*>(&value));
299 }
300 }
301
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxechocat.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 PortIndex port_name);
53 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
54 bool _expose_event(GdkEventExpose *event);
55
56 void set_value(uint32_t port_index,
57 uint32_t format,
58 const void * buffer);
59 public:
60
61 // public Lv2 communication stuff
62 LV2UI_Controller controller;
63 LV2UI_Write_Function write_function;
64 static void set_value_static(uint32_t port_index,
65 uint32_t buffer_size,
66 uint32_t format,
67 const void * buffer, Widget *self)
68 {
69 self->set_value(port_index,format,buffer);
70 }
71
72 Widget(Glib::ustring plugname);
73 ~Widget();
74
75 protected:
76 Glib::ustring plug_name;
77 Gtk::VBox m_vbox_;
78 Gtk::VBox m_vbox1_;
79 Gtk::VBox m_vbox2_;
80 Gtk::VBox m_vbox;
81 Gtk::VBox m_vbox1;
82 Gtk::VBox m_vbox2;
83 Gtk::VBox m_vbox3;
84 Gtk::VBox m_vbox4;
85 Gtk::VBox m_vbox5;
86 Gtk::VBox m_vbox6;
87 Gtk::VBox m_vbox7;
88 Gtk::VBox m_vbox8;
89 Gtk::VBox m_vbox9;
90 Gtk::HBox m_hbox_;
91 Gtk::HBox m_hbox1_;
92 Gtk::HBox m_hbox2_;
93 Gtk::HBox m_hbox3_;
94 Gtk::HBox m_hbox4_;
95
96 Gxw::PaintBox m_paintbox;
97 Gxw::BigKnob m_bigknob;
98 Gxw::BigKnob m_bigknob1;
99 Gxw::BigKnob m_bigknob2;
100 Gxw::BigKnob m_bigknob3;
101 Gxw::BigKnob m_bigknob4;
102 Gxw::Switch m_switch;
103 Gxw::Switch m_switch1;
104 Gxw::Switch m_switch2;
105 Gxw::Switch m_switch3;
106 };
107
108 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxechocat.lv2'
10
11 src = ['gxechocat.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gxechocat',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gxechocat_gui',
59 source = 'widget.cpp gxechocat_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gxechocat.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gxechocat.lv2', 'gxechocat.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxmetal_amp.h" // define struct PortIndex
24 #include "gx_resampler.h"
25 #include "gx_convolver.h"
26 #include "impulse_former.h"
27 #include "gx_pluginlv2.h" // define struct PluginLV2
28 #include "gxmetal_amp.cc" // dsp class generated by faust -> dsp2cc
29 #ifndef __SSE__
30 #include "noiser.cc"
31 #endif
32 #include "cab_data.cc"
33
34 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
35
36 class Gxmetal_amp
37 {
38 private:
39 // internal stuff
40 float* output;
41 float* input;
42 uint32_t s_rate;
43 int32_t prio;
44 uint32_t bufsize;
45 PluginLV2* tubevib;
46 #ifndef __SSE__
47 PluginLV2* wn;
48 #endif
49 gx_resample::BufferResampler resamp;
50 GxSimpleConvolver cabconv;
51 Impf impf;
52 // LV2 stuff
53 LV2_URID_Map* map;
54
55 inline void run_dsp_mono(uint32_t n_samples);
56 inline void connect_mono(uint32_t port,void* data);
57 inline void init_dsp_mono(uint32_t rate, uint32_t bufsize_);
58 inline void connect_all_mono_ports(uint32_t port, void* data);
59 inline void activate_f();
60 inline void deactivate_f();
61 inline void clean_up();
62 public:
63 // LV2 Descriptor
64 static const LV2_Descriptor descriptor;
65 // static wrapper to private functions
66 static void deactivate(LV2_Handle instance);
67 static void cleanup(LV2_Handle instance);
68 static void run(LV2_Handle instance, uint32_t n_samples);
69 static void activate(LV2_Handle instance);
70 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
71 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
72 double rate, const char* bundle_path,
73 const LV2_Feature* const* features);
74 Gxmetal_amp();
75 ~Gxmetal_amp();
76 };
77
78 // constructor
79 Gxmetal_amp::Gxmetal_amp() :
80 output(NULL),
81 input(NULL),
82 tubevib(gxmetal_amp::plugin()),
83 cabconv(GxSimpleConvolver(resamp)),
84 impf(Impf())
85 {};
86
87 // destructor
88 Gxmetal_amp::~Gxmetal_amp()
89 {
90 // just to be sure the plug have given free the allocated mem
91 // it didn't hurd if the mem is already given free by clean_up()
92 if (tubevib->activate_plugin !=0)
93 tubevib->activate_plugin(false, tubevib);
94 // delete DSP class
95 tubevib->delete_instance(tubevib);
96 cabconv.stop_process();
97 cabconv.cleanup();
98 };
99
100 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
101
102 void Gxmetal_amp::init_dsp_mono(uint32_t rate,uint32_t bufsize_)
103 {
104 AVOIDDENORMALS(); // init the SSE denormal protection
105 bufsize = bufsize_;
106 s_rate = rate;
107
108 #ifndef __SSE__
109 wn = noiser::plugin();
110 wn->set_samplerate(rate, wn);
111 #endif
112
113 tubevib->set_samplerate(rate, tubevib); // init the DSP class
114
115 if (bufsize )
116 {
117 #ifdef _POSIX_PRIORITY_SCHEDULING
118 int priomax = sched_get_priority_max(SCHED_FIFO);
119 if ((priomax/2) > 0) prio = priomax/2;
120 #endif
121 cabconv.cab_count = cab_data_4x12.ir_count;
122 cabconv.cab_sr = cab_data_4x12.ir_sr;
123 cabconv.cab_data = cab_data_4x12.ir_data;
124 impf.compute(cabconv.cab_count, cabconv.cab_data, cabconv.cab_data, 10);
125
126 cabconv.set_samplerate(rate);
127 cabconv.set_buffersize(bufsize);
128 cabconv.configure(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
129 while (!cabconv.checkstate());
130 if(!cabconv.start(prio, SCHED_FIFO))
131 printf("cabinet convolver disabled\n");
132 }
133 else
134 {
135 printf("convolver disabled\n");
136 }
137 }
138
139 // connect the Ports used by the plug-in class
140 void Gxmetal_amp::connect_mono(uint32_t port,void* data)
141 {
142 switch ((PortIndex)port)
143 {
144 case EFFECTS_OUTPUT:
145 output = static_cast<float*>(data);
146 break;
147 case EFFECTS_INPUT:
148 input = static_cast<float*>(data);
149 break;
150 default:
151 break;
152 }
153 }
154
155 void Gxmetal_amp::activate_f()
156 {
157 // allocate the internal DSP mem
158 if (tubevib->activate_plugin !=0)
159 tubevib->activate_plugin(true, tubevib);
160 }
161
162 void Gxmetal_amp::clean_up()
163 {
164 #ifndef __SSE__
165 wn->delete_instance(wn);;
166 #endif
167 // delete the internal DSP mem
168 if (tubevib->activate_plugin !=0)
169 tubevib->activate_plugin(false, tubevib);
170 }
171
172 void Gxmetal_amp::deactivate_f()
173 {
174 // delete the internal DSP mem
175 if (tubevib->activate_plugin !=0)
176 tubevib->activate_plugin(false, tubevib);
177 }
178
179 void Gxmetal_amp::run_dsp_mono(uint32_t n_samples)
180 {
181 #ifndef __SSE__
182 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
183 #endif
184 tubevib->mono_audio(static_cast<int>(n_samples), input,
185 output, tubevib);
186 cabconv.run_static(n_samples, &cabconv, output);
187 }
188
189 void Gxmetal_amp::connect_all_mono_ports(uint32_t port, void* data)
190 {
191 // connect the Ports used by the plug-in class
192 connect_mono(port,data);
193 // connect the Ports used by the DSP class
194 tubevib->connect_ports(port, data, tubevib);
195 }
196
197 ///////////////////////// STATIC CLASS FUNCTIONS /////////////////////
198
199 LV2_Handle
200 Gxmetal_amp::instantiate(const LV2_Descriptor* descriptor,
201 double rate,
202 const char* bundle_path,
203 const LV2_Feature* const* features)
204 {
205 // init the plug-in class
206 Gxmetal_amp *self = new Gxmetal_amp();
207 if (!self)
208 {
209 return NULL;
210 }
211 const LV2_Options_Option* options = NULL;
212 uint32_t bufsize = 0;
213 //printf(" %s\n",descriptor->URI);
214
215 for (int32_t i = 0; features[i]; ++i)
216 {
217 if (!strcmp(features[i]->URI, LV2_URID__map))
218 {
219 self->map = (LV2_URID_Map*)features[i]->data;
220 }
221 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
222 {
223 options = (const LV2_Options_Option*)features[i]->data;
224 }
225 }
226 if (!self->map)
227 {
228 fprintf(stderr, "Missing feature uri:map.\n");
229 }
230 else if (!options)
231 {
232 fprintf(stderr, "Missing feature options.\n");
233 }
234 else
235 {
236 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
237 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
238
239 for (const LV2_Options_Option* o = options; o->key; ++o)
240 {
241 if (o->context == LV2_OPTIONS_INSTANCE &&
242 o->key == bufsz_max &&
243 o->type == atom_Int)
244 {
245 bufsize = *(const int32_t*)o->value;
246 }
247 }
248
249 if (bufsize == 0)
250 {
251 fprintf(stderr, "No maximum buffer size given.\n");
252 }
253 printf("using block size: %d\n", bufsize);
254 }
255 self->init_dsp_mono((uint32_t)rate, bufsize);
256
257 return (LV2_Handle)self;
258 }
259
260 void Gxmetal_amp::connect_port(LV2_Handle instance,
261 uint32_t port,
262 void* data)
263 {
264 // connect all ports
265 static_cast<Gxmetal_amp*>(instance)->connect_all_mono_ports(port, data);
266 }
267
268 void Gxmetal_amp::activate(LV2_Handle instance)
269 {
270 // allocate needed mem
271 static_cast<Gxmetal_amp*>(instance)->activate_f();
272 }
273
274 void Gxmetal_amp::run(LV2_Handle instance, uint32_t n_samples)
275 {
276 // run dsp
277 static_cast<Gxmetal_amp*>(instance)->run_dsp_mono(n_samples);
278 }
279
280 void Gxmetal_amp::deactivate(LV2_Handle instance)
281 {
282 // free allocated mem
283 static_cast<Gxmetal_amp*>(instance)->deactivate_f();
284 }
285
286 void Gxmetal_amp::cleanup(LV2_Handle instance)
287 {
288 // well, clean up after us
289 Gxmetal_amp* self = static_cast<Gxmetal_amp*>(instance);
290 self->clean_up();
291 delete self;
292 }
293
294 const LV2_Descriptor Gxmetal_amp::descriptor =
295 {
296 GXPLUGIN_URI "#metal_amp",
297 instantiate,
298 connect_port,
299 activate,
300 run,
301 deactivate,
302 cleanup,
303 NULL
304 };
305
306 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
307
308 extern "C"
309 LV2_SYMBOL_EXPORT
310 const LV2_Descriptor*
311 lv2_descriptor(uint32_t index)
312 {
313 switch (index)
314 {
315 case 0:
316 return &Gxmetal_amp::descriptor;
317 default:
318 return NULL;
319 }
320 }
321
322 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25 #include "lv2/lv2plug.in/ns/ext/state/state.h"
26 #include "lv2/lv2plug.in/ns/ext/presets/presets.h"
27 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
28 #include <lv2/lv2plug.in/ns/ext/options/options.h>
29 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
30 #include <lv2/lv2plug.in/ns/ext/log/log.h>
31 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
32
33 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxmetal_amp"
34 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxmetal_amp#gui"
35
36
37 typedef enum
38 {
39 TONE,
40 DRIVE,
41 PREGAIN,
42 GAIN1,
43 EFFECTS_OUTPUT,
44 EFFECTS_INPUT,
45 } PortIndex;
46
47 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
24 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
25 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
26 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
27
28 <http://guitarix.sourceforge.net#me>
29 a foaf:Person ;
30 foaf:name "Guitarix team" ;
31 foaf:mbox <mailto:brummer@web.de> ;
32 rdfs:seeAlso <http://guitarix.sourceforge.net> .
33
34 <http://guitarix.sourceforge.net/plugins/gxmetal_amp>
35 a doap:Project ;
36 doap:maintainer <http://guitarix.sourceforge.net#me> ;
37 doap:name "GxMetalAmp" .
38
39 <http://guitarix.sourceforge.net/plugins/gxmetal_amp#metal_amp>
40 a lv2:Plugin ,
41 lv2:EffectPlugin ;
42 doap:maintainer <http://guitarix.sourceforge.net#me> ;
43 doap:name "GxMetalAmp";
44 doap:license <http://opensource.org/licenses/isc> ;
45 lv2:project <http://guitarix.sourceforge.net/plugins/gxmetal_amp> ;
46 lv2:optionalFeature lv2:hardRTCapable ;
47 lv2:requiredFeature bufsz:boundedBlockLength ;
48 bufsz:minBlockLength 64 ;
49 bufsz:maxBlockLength 8192 ;
50
51 guiext:ui <http://guitarix.sourceforge.net/plugins/gxmetal_amp#gui>;
52
53 lv2:port [
54 a lv2:InputPort ,
55 lv2:ControlPort ;
56 lv2:index 0 ;
57 lv2:symbol "TONE" ;
58 lv2:name "TONE";
59 lv2:default 0.5 ;
60 lv2:minimum 0.0 ;
61 lv2:maximum 1.0 ;
62 ] , [
63 a lv2:InputPort ,
64 lv2:ControlPort ;
65 lv2:index 1 ;
66 lv2:symbol "DRIVE" ;
67 lv2:name "DRIVE";
68 lv2:default 10.5 ;
69 lv2:minimum 1.0 ;
70 lv2:maximum 20.0 ;
71 ] , [
72 a lv2:InputPort ,
73 lv2:ControlPort ;
74 lv2:index 2 ;
75 lv2:symbol "PREGAIN" ;
76 lv2:name "PREGAIN";
77 lv2:default 0.0 ;
78 lv2:minimum -2e+01 ;
79 lv2:maximum 2e+01 ;
80 ] , [
81 a lv2:InputPort ,
82 lv2:ControlPort ;
83 lv2:index 3 ;
84 lv2:symbol "GAIN1" ;
85 lv2:name "GAIN1";
86 lv2:default 0.0 ;
87 lv2:minimum -2e+01 ;
88 lv2:maximum 2e+01 ;
89 ] , [
90 a lv2:AudioPort ,
91 lv2:OutputPort ;
92 lv2:index 4 ;
93 lv2:symbol "out" ;
94 lv2:name "Out" ;
95 ] , [
96 a lv2:AudioPort ,
97 lv2:InputPort ;
98 lv2:index 5 ;
99 lv2:symbol "in" ;
100 lv2:name "In" ;
101 ].
102
103 <http://guitarix.sourceforge.net/plugins/gxmetal_amp#gui>
104 a guiext:GtkUI;
105 guiext:binary <gxmetal_amp_gui.so>;
106 guiext:requiredFeature guiext:makeResident .
107
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxmetal_amp.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gxmetal_ampGUI
34 {
35 private:
36
37 Glib::ustring plugskin;
38 Glib::ustring addKnob;
39 Glib::ustring plug_name;
40 void set_knob(Glib::ustring knob);
41 void set_skin();
42 void set_plug_name(const char * plugin_uri);
43 GtkWidget* make_gui();
44 Widget* widget;
45
46 public:
47
48 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
49 const char * plugin_uri,
50 const char * bundle_path,
51 LV2UI_Write_Function write_function,
52 LV2UI_Controller controller,
53 LV2UI_Widget * widget,
54 const LV2_Feature * const * features);
55
56 static void port_event(LV2UI_Handle ui, uint32_t port_index,
57 uint32_t buffer_size, uint32_t format,
58 const void * buffer);
59
60 static LV2UI_Descriptor descriptors[];
61 static void cleanup(LV2UI_Handle ui);
62
63 Gxmetal_ampGUI () {};
64 ~Gxmetal_ampGUI () {};
65 } ;
66
67 void Gxmetal_ampGUI::set_knob(Glib::ustring knob)
68 {
69 addKnob = " style 'gx_";
70 addKnob += plug_name;
71 addKnob += "_dark_skin_icons'\n"
72 " { \n"
73 " stock['bigknob'] = {{'";
74 addKnob += knob;
75 addKnob += ".png'}}\n";
76 addKnob += " stock['smallknobr'] = {{'";
77 addKnob += knob;
78 addKnob += "-middle.png'}}\n";
79 addKnob += " stock['button_on'] = {{'"
80 "chump-switch_on.png'}}\n"
81 " stock['button_off'] = {{'"
82 "chump-switch_off.png'}}\n"
83 " }\n"
84 "widget '*.";
85 addKnob += plug_name;
86 addKnob += "' style 'gx_";
87 addKnob += plug_name;
88 addKnob += "_dark_skin_icons' \n"
89 "class '*GxToggleImage' style'gx_";
90 addKnob += plug_name;
91 addKnob += "_dark_skin_icons' \n";
92 }
93
94 void Gxmetal_ampGUI::set_skin()
95 {
96 Glib::ustring toparse = "pixmap_path ";
97 toparse += " '";
98 toparse += GX_LV2_STYLE_DIR;
99 toparse += "/'\n";
100 toparse += "style \"gx_";
101 toparse += plug_name;
102 toparse += "_dark-paintbox\"\n"
103 " { \n"
104 "GxPaintBox::skin-gradient = {\n"
105 "{ 65536, 0, 0, 13107, 52428 }, \n"
106 "{ 52428, 0, 0, 0, 52428 },\n"
107 "{ 13107, 0, 0, 13107, 13107 }}\n"
108 " GxPaintBox::icon-set =4\n"
109 " stock['amp_skin'] = {{'";
110 toparse += plugskin;
111 toparse += "'}}\n"
112 " }\n"
113 "\n"
114 "style 'gx_headmetal_amp_box' \n"
115 " { \n"
116 " fg[NORMAL] = '#cbc8c8' \n"
117 "font_name = 'sans bold 9.5' \n"
118 " }\n";
119 toparse += addKnob;
120
121 toparse += " widget '*.amplabel' style:highest 'gx_headmetal_amp_box'\n"
122 "widget '*.";
123 toparse += plug_name;
124 toparse += "' style 'gx_";
125 toparse += plug_name;
126 toparse += "_dark-paintbox' ";
127 toparse += "style 'gx_switch'\n"
128 "{\n"
129 "xthickness = 0\n"
130 "ythickness = 0\n"
131 "GtkButton::inner-border = {0, 0, 0, 0}\n"
132 "GtkButton::default-border = {0, 0, 0, 0}\n"
133 "GtkButton::focus-line-width = 0\n"
134 "GtkButton::focus-padding = 0\n"
135 "GtkButton::interior-focus = 0\n"
136 "GtkButton::child-displacement-x = 0\n"
137 "GtkButton::child-displacement-y = 0\n"
138 " }\n"
139 "widget '*.";
140 toparse += plug_name;
141 toparse += "' style:highest 'gx_switch'";
142
143 gtk_rc_parse_string (toparse.c_str());
144 }
145
146 void Gxmetal_ampGUI::set_plug_name(const char * plugin_uri)
147 {
148 addKnob = "";
149
150 if (strcmp("http://guitarix.sourceforge.net/plugins/gxmetal_amp#metal_amp", plugin_uri) == 0)
151 {
152 plugskin = "metalamp.png";
153 plug_name = "gxmetal_amp";
154 set_knob("sn-knob");
155 }
156 else
157 {
158 plugskin = "preampmono.png";
159 plug_name = "gxmetal_amp";
160 }
161 }
162
163 GtkWidget* Gxmetal_ampGUI::make_gui()
164 {
165 // init the gxwmm library
166 Gxw::init();
167 set_skin();
168 GtkWidget* container = gtk_vbox_new(FALSE, 0);
169 widget = new Widget(plug_name);
170 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
171 gtk_container_add(GTK_CONTAINER(container), cWidget );
172
173 return container;
174 }
175
176
177 LV2UI_Handle Gxmetal_ampGUI::instantiate(const struct _LV2UI_Descriptor * descriptor,
178 const char * plugin_uri,
179 const char * bundle_path,
180 LV2UI_Write_Function write_function,
181 LV2UI_Controller controller,
182 LV2UI_Widget * widget,
183 const LV2_Feature * const * features)
184 {
185 Gxmetal_ampGUI* self = new Gxmetal_ampGUI();
186 if (self == NULL) return NULL;
187 self->set_plug_name(plugin_uri);
188 *widget = (LV2UI_Widget)self->make_gui();
189 self->widget->controller = controller;
190 self->widget->write_function = write_function;
191 return (LV2UI_Handle)self;
192 }
193
194 void Gxmetal_ampGUI::cleanup(LV2UI_Handle ui)
195 {
196 Gxmetal_ampGUI *pluginGui = static_cast<Gxmetal_ampGUI*>(ui);
197 delete pluginGui->widget;
198 delete pluginGui;
199 }
200
201 void Gxmetal_ampGUI::port_event(LV2UI_Handle ui,
202 uint32_t port_index,
203 uint32_t buffer_size,
204 uint32_t format,
205 const void * buffer)
206 {
207 Gxmetal_ampGUI *self = static_cast<Gxmetal_ampGUI*>(ui);
208 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
209 return;
210 }
211
212 LV2UI_Descriptor Gxmetal_ampGUI::descriptors[] =
213 {
214 {
215 GXPLUGIN_UI_URI,
216 Gxmetal_ampGUI::instantiate,
217 Gxmetal_ampGUI::cleanup,
218 Gxmetal_ampGUI::port_event,
219 NULL
220 }
221 };
222
223 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
224 {
225 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
226 if (index >= sizeof(Gxmetal_ampGUI::descriptors) /
227 sizeof(Gxmetal_ampGUI::descriptors[0]))
228 {
229 return NULL;
230 }
231 return Gxmetal_ampGUI::descriptors + index;
232 }
233
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxmetal_amp#metal_amp>
23 a lv2:Plugin ;
24 lv2:binary <gxmetal_amp.so> ;
25 rdfs:seeAlso <gxmetal_amp.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxmetal_amp#metal_amp>
23 a lv2:Plugin ;
24 lv2:binary <gxmetal_amp@LIB_EXT@> ;
25 rdfs:seeAlso <gxmetal_amp.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24 /* @get controller by port
25 * this function is used by make_selector() make_controller_box()
26 * set_value() and on_value_changed()
27 * so controller widgets needs only here asined to a port,
28 * and all functions which need acess to the controller widget pointer
29 * can receive them by port number
30 */
31 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
32 {
33 switch ((PortIndex)port_index )
34 {
35 case TONE:
36 return &m_bigknob;
37 case DRIVE:
38 return &m_bigknob1;
39 case PREGAIN:
40 return &m_bigknob2;
41 case GAIN1:
42 return &m_bigknob3;
43 default:
44 return NULL;
45 }
46 }
47
48 Widget::Widget(Glib::ustring plugname):
49 plug_name(plugname)
50 {
51 // create controllers for port name
52 make_controller_box(&m_vbox4, "tone", 0.0, 1.0, 0.01, TONE);
53 make_controller_box(&m_vbox2, "drive", 1.0, 20.0, 0.01, DRIVE);
54 make_controller_box(&m_vbox3, "volume", -2e+01, 2e+01, 0.1 , PREGAIN);
55 make_controller_box(&m_vbox5, "gain", -2e+01, 2e+01, 0.1 , GAIN1);
56
57 // set propertys for the main paintbox holding the skin
58 m_paintbox.set_border_width(20);
59 m_paintbox.set_spacing(0);
60 m_paintbox.set_homogeneous(false);
61 m_paintbox.set_name(plug_name);
62 m_paintbox.property_paint_func() = "amp_skin_expose";
63 //m_paintbox.set_size_request( 425, 260 ) ;
64
65 add(m_paintbox);
66
67 // One vertical box to wrap all in
68 m_vbox_.set_spacing(0);
69 m_vbox_.set_border_width(10);
70 m_vbox_.set_homogeneous(false);
71
72 m_paintbox.pack_start(m_vbox_ , Gtk::PACK_EXPAND_PADDING, 0);
73
74
75 // This is the central controller strip
76 m_hbox1_.set_spacing(45);
77 m_hbox1_.set_border_width(0);
78 m_hbox1_.set_homogeneous(true);
79
80
81 // put boxed controllers into controller box
82 m_vbox2.set_spacing(6);
83 m_vbox2.set_border_width(10);
84 m_vbox3.set_spacing(6);
85 m_vbox3.set_border_width(10);
86 m_vbox4.set_spacing(6);
87 m_vbox4.set_border_width(10);
88 m_vbox5.set_spacing(6);
89 m_vbox5.set_border_width(10);
90
91 //m_hbox1_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
92 m_hbox1_.pack_start(m_vbox2);
93 m_hbox1_.pack_start(m_vbox3);
94 m_hbox1_.pack_start(m_vbox4);
95 m_hbox1_.pack_start(m_vbox5);
96 //m_hbox1_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
97
98 // Npow put all layers in main vbox
99 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING, 0);
100
101
102 // connect expose handler as resize handler
103 m_paintbox.signal_expose_event().connect(
104 sigc::mem_fun(this, &Widget::_expose_event), true);
105
106 set_app_paintable(true);
107 show_all();
108 }
109
110 Widget::~Widget()
111 {
112
113 }
114
115 // set borderwith for paintbox when widget resize
116 // to hold controllers in place
117 bool Widget::_expose_event(GdkEventExpose *event)
118 {
119 int x, y, width, height, depth;
120 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
121 //double_t height = m_paintbox.get_window()->get_height();
122 m_paintbox.set_border_width(height/10);
123 return false;
124 }
125
126 // create selectors from gxwmm
127 void Widget::make_selector(Glib::ustring labela,
128 Glib::ustring tables[],
129 size_t _size,
130 float min, float digits,
131 PortIndex port_name)
132 {
133 Gxw::Selector *regler = static_cast<Gxw::Selector*>
134 (get_controller_by_port(port_name));
135 if (regler)
136 {
137 float max = static_cast<float>(_size+1);
138
139 Gtk::TreeModelColumn<Glib::ustring> label;
140 Gtk::TreeModelColumnRecord rec;
141 rec.add(label);
142 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
143
144 for (uint32_t i = 0 ; i< _size; ++i) {
145 ls->append()->set_value(0, tables[i]);
146 }
147 regler->set_model(ls);
148 regler->set_has_tooltip();
149 regler->set_tooltip_text(labela);
150 regler->cp_configure("SELECTOR", labela, min, max, digits);
151 regler->set_show_value(false);
152 regler->set_name(plug_name);
153 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
154 *this, &Widget::on_value_changed), port_name));
155 }
156 }
157
158 // create stackboxes with controllers for port name
159 void Widget::make_controller_box(Gtk::Box *box,
160 Glib::ustring label,
161 float min, float max,
162 float digits,
163 PortIndex port_name)
164 {
165 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
166 get_controller_by_port(port_name));
167 if (regler)
168 {
169 Gtk::Label* pr = new Gtk::Label(label, 0);
170 pr->set_name("amplabel");
171 // use label images instead simple string labes
172 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
173 label_image += "/";
174 label_image += label;
175 label_image += "-label.png";
176 Gtk::Image *pr = new Gtk::Image(label_image);*/
177
178 Gtk::VBox* b1 = new Gtk::VBox();
179 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
180 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
181 regler->cp_configure("KNOB", label, min, max, digits);
182 regler->set_show_value(false);
183 regler->set_name(plug_name);
184 box->pack_start(*regler,Gtk::PACK_SHRINK);
185 Gtk::VBox* b2 = new Gtk::VBox();
186 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
187 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
188 *this, &Widget::on_value_changed), port_name));
189 }
190 }
191
192 // create stackboxes with switch controller for port name
193 void Widget::make_switch_box(Gtk::Box *box,
194 Glib::ustring label,
195 Glib::ustring label2,
196 PortIndex port_name)
197 {
198 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
199 get_controller_by_port(port_name));
200 if (regler)
201 {
202 Gtk::Label* pr = new Gtk::Label(label, 0);
203 pr->set_name("amplabel");
204 // use label images instead simple string labes
205 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
206 label_image += "/"+plug_name+"-";
207 label_image += label;
208 label_image += "-label.png";
209 Gtk::Image *pr = new Gtk::Image(label_image);*/
210
211 regler->cp_configure("switch", label, 0, 1, 1);
212 regler->set_can_focus( false ) ;
213
214 regler->set_name(plug_name);
215 regler->set_base_name( "button" );
216 Gtk::VBox* b1 = new Gtk::VBox();
217 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
218 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
219 box->pack_start(*regler,Gtk::PACK_SHRINK);
220
221 // 2nd Label
222 Gtk::Label* pr2 = new Gtk::Label(label2, 0);
223 pr2->set_name("amplabel");
224 box->pack_start( *Gtk::manage(pr2),Gtk::PACK_SHRINK);
225
226 Gtk::VBox* b2 = new Gtk::VBox();
227 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
228 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
229 *this, &Widget::on_value_changed), port_name));
230 }
231 }
232
233 // Create the Text Labels from images For Amp
234 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
235 {
236 Glib::ustring label_image = GX_LV2_STYLE_DIR;
237 label_image += "/";
238 label_image += label;
239 label_image += ".png";
240 Gtk::Image *pr = new Gtk::Image(label_image);
241
242
243 Gtk::VBox* b1 = new Gtk::VBox();
244 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
245 if( start ){
246 // std::cout << "Pack Start "<<label<<std::endl;
247 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
248 }else{
249 // std::cout << "Pack End " << label << std::endl;
250 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
251 }
252
253 Gtk::VBox* b2 = new Gtk::VBox();
254 box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
255
256 }
257 // receive controller value changes from host and set them to controller
258 void Widget::set_value(uint32_t port_index,
259 uint32_t format,
260 const void * buffer)
261 {
262 if ( format == 0 )
263 {
264 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
265 get_controller_by_port(port_index));
266 if (regler)
267 {
268 float value = *static_cast<const float*>(buffer);
269 regler->cp_set_value(value);
270 }
271 }
272 }
273
274 // write (UI) controller value changes to the host->engine
275 void Widget::on_value_changed(uint32_t port_index)
276 {
277 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
278 get_controller_by_port(port_index));
279 if (regler)
280 {
281 float value = regler->cp_get_value();
282 write_function(controller, port_index, sizeof(float), 0,
283 static_cast<const void*>(&value));
284 }
285 }
286
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxmetal_amp.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 Glib::ustring label2,
53 PortIndex port_name);
54 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plugname);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::VBox m_vbox;
80 Gtk::VBox m_vbox1;
81 Gtk::VBox m_vbox2;
82 Gtk::VBox m_vbox3;
83 Gtk::VBox m_vbox4;
84 Gtk::VBox m_vbox5;
85 Gtk::VBox m_vbox6;
86 Gtk::VBox m_vbox7;
87 Gtk::HBox m_hbox_;
88 Gtk::HBox m_hbox1_;
89 Gtk::HBox m_hbox2_;
90
91 Gxw::PaintBox m_paintbox;
92 Gxw::SmallKnobR m_bigknob;
93 Gxw::BigKnob m_bigknob1;
94 Gxw::BigKnob m_bigknob2;
95 Gxw::BigKnob m_bigknob3;
96 };
97
98 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxmetal_amp.lv2'
10
11 src = ['gxmetal_amp.cpp',
12 '../DSP/gx_resampler.cc',
13 '../DSP/gx_convolver.cc'
14 ]
15 incl = ['../faust','./', '../DSP']
16 lib = []
17 if sys.platform.startswith("linux"):
18 lib.append('dl')
19 uselib = ['LV2CORE']
20 if bld.env['ZITA_CONVOLVER']:
21 uselib.append('ZITA_CONVOLVER')
22 else:
23 src.append('../../zita-convolver/zita-convolver.cc')
24 incl.append('../../zita-convolver');
25 uselib.append('FFTW3')
26 if bld.env['ZITA_RESAMPLER']:
27 uselib.append('ZITA_RESAMPLER')
28 else:
29 src.append('../../zita-resampler-1.1.0/resampler.cc')
30 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
31 incl.append('../../zita-resampler-1.1.0')
32 if sys.platform.startswith("linux"):
33 lib.append('dl')
34 cxxflag =[]
35 if not bld.env['OPT'] and bld.env['SSE2']:
36 cxxflag = [ "-msse2", "-mfpmath=sse"]
37 lv2_effects = bld(
38 features='cxx cshlib ',
39 includes = incl,
40 lib = lib,
41 uselib = uselib,
42 obj_ext = '_17.o',
43 cxxflags = cxxflag,
44 defines = ["LV2_SO"],
45 target = 'gxmetal_amp',
46 source = src,
47 install_path = '${LV2DIR}/%s' % bundle,
48 chmod = 0o755,
49 )
50 lv2_effects.env['shlib_PATTERN'] = '%s.so'
51
52 uselib_local5 = []
53 libpath5 = []
54 lib5 = []
55 incl5 = ['../../../libgxwmm','../../../libgxw','../']
56 if sys.platform.startswith("linux"):
57 lib5.append('dl')
58 if bld.env["GX_LIB_SHARED"]:
59 lib5 += ['gxwmm','gxw']
60 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
61 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
62 else:
63 uselib_local5 += ['gxwmm','gxw']
64
65 lv2_effetcs_gui = bld(
66 features='cxx cshlib ',
67 includes = incl5,
68 lib = lib5,
69 uselib = 'LV2CORE GTKMM',
70 libpath = libpath5,
71 uselib_local = uselib_local5,
72 linkflags = '-Wl,-z,nodelete',
73 defines = ["LV2_GUI"],
74 target = 'gxmetal_amp_gui',
75 source = 'widget.cpp gxmetal_amp_gui.cpp',
76 install_path = '${LV2DIR}/%s' % bundle,
77 chmod = 0o755,
78 )
79 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
80
81
82 install_path = '${LV2DIR}/%s' % bundle,
83 bld.install_files('${LV2DIR}/gxmetal_amp.lv2', 'manifest.ttl')
84 bld.install_files('${LV2DIR}/gxmetal_amp.lv2', 'gxmetal_amp.ttl')
85
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxmetal_head.h" // define struct PortIndex
24 #include "gx_resampler.h"
25 #include "gx_convolver.h"
26 #include "impulse_former.h"
27 #include "gx_pluginlv2.h" // define struct PluginLV2
28 #include "gxmetal_head.cc" // dsp class generated by faust -> dsp2cc
29 #ifndef __SSE__
30 #include "noiser.cc"
31 #endif
32 #include "cab_data.cc"
33
34 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
35
36 class Gxmetal_head
37 {
38 private:
39 // internal stuff
40 float* output;
41 float* input;
42 uint32_t s_rate;
43 int32_t prio;
44 uint32_t bufsize;
45 PluginLV2* tubevib;
46 #ifndef __SSE__
47 PluginLV2* wn;
48 #endif
49 gx_resample::BufferResampler resamp;
50 GxSimpleConvolver cabconv;
51 Impf impf;
52 // LV2 stuff
53 LV2_URID_Map* map;
54
55 inline void run_dsp_mono(uint32_t n_samples);
56 inline void connect_mono(uint32_t port,void* data);
57 inline void init_dsp_mono(uint32_t rate, uint32_t bufsize_);
58 inline void connect_all_mono_ports(uint32_t port, void* data);
59 inline void activate_f();
60 inline void deactivate_f();
61 inline void clean_up();
62 public:
63 // LV2 Descriptor
64 static const LV2_Descriptor descriptor;
65 // static wrapper to private functions
66 static void deactivate(LV2_Handle instance);
67 static void cleanup(LV2_Handle instance);
68 static void run(LV2_Handle instance, uint32_t n_samples);
69 static void activate(LV2_Handle instance);
70 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
71 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
72 double rate, const char* bundle_path,
73 const LV2_Feature* const* features);
74 Gxmetal_head();
75 ~Gxmetal_head();
76 };
77
78 // constructor
79 Gxmetal_head::Gxmetal_head() :
80 output(NULL),
81 input(NULL),
82 tubevib(gxmetal_head::plugin()),
83 cabconv(GxSimpleConvolver(resamp)),
84 impf(Impf())
85 {};
86
87 // destructor
88 Gxmetal_head::~Gxmetal_head()
89 {
90 // just to be sure the plug have given free the allocated mem
91 // it didn't hurd if the mem is already given free by clean_up()
92 if (tubevib->activate_plugin !=0)
93 tubevib->activate_plugin(false, tubevib);
94 // delete DSP class
95 tubevib->delete_instance(tubevib);
96 cabconv.stop_process();
97 cabconv.cleanup();
98 };
99
100 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
101
102 void Gxmetal_head::init_dsp_mono(uint32_t rate,uint32_t bufsize_)
103 {
104 AVOIDDENORMALS(); // init the SSE denormal protection
105 bufsize = bufsize_;
106 s_rate = rate;
107
108 #ifndef __SSE__
109 wn = noiser::plugin();
110 wn->set_samplerate(rate, wn);
111 #endif
112
113 tubevib->set_samplerate(rate, tubevib); // init the DSP class
114
115 if (bufsize )
116 {
117 #ifdef _POSIX_PRIORITY_SCHEDULING
118 int priomax = sched_get_priority_max(SCHED_FIFO);
119 if ((priomax/2) > 0) prio = priomax/2;
120 #endif
121 cabconv.cab_count = cab_data_4x12.ir_count;
122 cabconv.cab_sr = cab_data_4x12.ir_sr;
123 cabconv.cab_data = cab_data_4x12.ir_data;
124 impf.compute(cabconv.cab_count, cabconv.cab_data, cabconv.cab_data, 10);
125
126 cabconv.set_samplerate(rate);
127 cabconv.set_buffersize(bufsize);
128 cabconv.configure(cabconv.cab_count, cabconv.cab_data, cabconv.cab_sr);
129 while (!cabconv.checkstate());
130 if(!cabconv.start(prio, SCHED_FIFO))
131 printf("cabinet convolver disabled\n");
132 }
133 else
134 {
135 printf("convolver disabled\n");
136 }
137 }
138
139 // connect the Ports used by the plug-in class
140 void Gxmetal_head::connect_mono(uint32_t port,void* data)
141 {
142 switch ((PortIndex)port)
143 {
144 case EFFECTS_OUTPUT:
145 output = static_cast<float*>(data);
146 break;
147 case EFFECTS_INPUT:
148 input = static_cast<float*>(data);
149 break;
150 default:
151 break;
152 }
153 }
154
155 void Gxmetal_head::activate_f()
156 {
157 // allocate the internal DSP mem
158 if (tubevib->activate_plugin !=0)
159 tubevib->activate_plugin(true, tubevib);
160 }
161
162 void Gxmetal_head::clean_up()
163 {
164 #ifndef __SSE__
165 wn->delete_instance(wn);;
166 #endif
167 // delete the internal DSP mem
168 if (tubevib->activate_plugin !=0)
169 tubevib->activate_plugin(false, tubevib);
170 }
171
172 void Gxmetal_head::deactivate_f()
173 {
174 // delete the internal DSP mem
175 if (tubevib->activate_plugin !=0)
176 tubevib->activate_plugin(false, tubevib);
177 }
178
179 void Gxmetal_head::run_dsp_mono(uint32_t n_samples)
180 {
181 #ifndef __SSE__
182 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
183 #endif
184 tubevib->mono_audio(static_cast<int>(n_samples), input,
185 output, tubevib);
186 cabconv.run_static(n_samples, &cabconv, output);
187 }
188
189 void Gxmetal_head::connect_all_mono_ports(uint32_t port, void* data)
190 {
191 // connect the Ports used by the plug-in class
192 connect_mono(port,data);
193 // connect the Ports used by the DSP class
194 tubevib->connect_ports(port, data, tubevib);
195 }
196
197 ///////////////////////// STATIC CLASS FUNCTIONS /////////////////////
198
199 LV2_Handle
200 Gxmetal_head::instantiate(const LV2_Descriptor* descriptor,
201 double rate,
202 const char* bundle_path,
203 const LV2_Feature* const* features)
204 {
205 // init the plug-in class
206 Gxmetal_head *self = new Gxmetal_head();
207 if (!self)
208 {
209 return NULL;
210 }
211 const LV2_Options_Option* options = NULL;
212 uint32_t bufsize = 0;
213 //printf(" %s\n",descriptor->URI);
214
215 for (int32_t i = 0; features[i]; ++i)
216 {
217 if (!strcmp(features[i]->URI, LV2_URID__map))
218 {
219 self->map = (LV2_URID_Map*)features[i]->data;
220 }
221 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
222 {
223 options = (const LV2_Options_Option*)features[i]->data;
224 }
225 }
226 if (!self->map)
227 {
228 fprintf(stderr, "Missing feature uri:map.\n");
229 }
230 else if (!options)
231 {
232 fprintf(stderr, "Missing feature options.\n");
233 }
234 else
235 {
236 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
237 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
238
239 for (const LV2_Options_Option* o = options; o->key; ++o)
240 {
241 if (o->context == LV2_OPTIONS_INSTANCE &&
242 o->key == bufsz_max &&
243 o->type == atom_Int)
244 {
245 bufsize = *(const int32_t*)o->value;
246 }
247 }
248
249 if (bufsize == 0)
250 {
251 fprintf(stderr, "No maximum buffer size given.\n");
252 }
253 printf("using block size: %d\n", bufsize);
254 }
255 self->init_dsp_mono((uint32_t)rate, bufsize);
256
257 return (LV2_Handle)self;
258 }
259
260 void Gxmetal_head::connect_port(LV2_Handle instance,
261 uint32_t port,
262 void* data)
263 {
264 // connect all ports
265 static_cast<Gxmetal_head*>(instance)->connect_all_mono_ports(port, data);
266 }
267
268 void Gxmetal_head::activate(LV2_Handle instance)
269 {
270 // allocate needed mem
271 static_cast<Gxmetal_head*>(instance)->activate_f();
272 }
273
274 void Gxmetal_head::run(LV2_Handle instance, uint32_t n_samples)
275 {
276 // run dsp
277 static_cast<Gxmetal_head*>(instance)->run_dsp_mono(n_samples);
278 }
279
280 void Gxmetal_head::deactivate(LV2_Handle instance)
281 {
282 // free allocated mem
283 static_cast<Gxmetal_head*>(instance)->deactivate_f();
284 }
285
286 void Gxmetal_head::cleanup(LV2_Handle instance)
287 {
288 // well, clean up after us
289 Gxmetal_head* self = static_cast<Gxmetal_head*>(instance);
290 self->clean_up();
291 delete self;
292 }
293
294 const LV2_Descriptor Gxmetal_head::descriptor =
295 {
296 GXPLUGIN_URI "#metal_head",
297 instantiate,
298 connect_port,
299 activate,
300 run,
301 deactivate,
302 cleanup,
303 NULL
304 };
305
306 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
307
308 extern "C"
309 LV2_SYMBOL_EXPORT
310 const LV2_Descriptor*
311 lv2_descriptor(uint32_t index)
312 {
313 switch (index)
314 {
315 case 0:
316 return &Gxmetal_head::descriptor;
317 default:
318 return NULL;
319 }
320 }
321
322 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25 #include "lv2/lv2plug.in/ns/ext/state/state.h"
26 #include "lv2/lv2plug.in/ns/ext/presets/presets.h"
27 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
28 #include <lv2/lv2plug.in/ns/ext/options/options.h>
29 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
30 #include <lv2/lv2plug.in/ns/ext/log/log.h>
31 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
32
33 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxmetal_head"
34 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxmetal_head#gui"
35
36
37 typedef enum
38 {
39 TONE,
40 DRIVE,
41 PREGAIN,
42 GAIN1,
43 EFFECTS_OUTPUT,
44 EFFECTS_INPUT,
45 } PortIndex;
46
47 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
24 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
25 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
26 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
27
28 <http://guitarix.sourceforge.net#me>
29 a foaf:Person ;
30 foaf:name "Guitarix team" ;
31 foaf:mbox <mailto:brummer@web.de> ;
32 rdfs:seeAlso <http://guitarix.sourceforge.net> .
33
34 <http://guitarix.sourceforge.net/plugins/gxmetal_head>
35 a doap:Project ;
36 doap:maintainer <http://guitarix.sourceforge.net#me> ;
37 doap:name "GxMetalHead" .
38
39 <http://guitarix.sourceforge.net/plugins/gxmetal_head#metal_head>
40 a lv2:Plugin ,
41 lv2:EffectPlugin ;
42 doap:maintainer <http://guitarix.sourceforge.net#me> ;
43 doap:name "GxMetalHead";
44 doap:license <http://opensource.org/licenses/isc> ;
45 lv2:project <http://guitarix.sourceforge.net/plugins/gxmetal_head> ;
46 lv2:optionalFeature lv2:hardRTCapable ;
47 lv2:requiredFeature bufsz:boundedBlockLength ;
48 bufsz:minBlockLength 64 ;
49 bufsz:maxBlockLength 8192 ;
50
51 guiext:ui <http://guitarix.sourceforge.net/plugins/gxmetal_head#gui>;
52
53 lv2:port [
54 a lv2:InputPort ,
55 lv2:ControlPort ;
56 lv2:index 0 ;
57 lv2:symbol "TONE" ;
58 lv2:name "TONE";
59 lv2:default 0.5 ;
60 lv2:minimum 0.0 ;
61 lv2:maximum 1.0 ;
62 ] , [
63 a lv2:InputPort ,
64 lv2:ControlPort ;
65 lv2:index 1 ;
66 lv2:symbol "DRIVE" ;
67 lv2:name "DRIVE";
68 lv2:default 0.32 ;
69 lv2:minimum 0.0 ;
70 lv2:maximum 1.0 ;
71 ] , [
72 a lv2:InputPort ,
73 lv2:ControlPort ;
74 lv2:index 2 ;
75 lv2:symbol "PREGAIN" ;
76 lv2:name "PREGAIN";
77 lv2:default 0.0 ;
78 lv2:minimum -2e+01 ;
79 lv2:maximum 2e+01 ;
80 ] , [
81 a lv2:InputPort ,
82 lv2:ControlPort ;
83 lv2:index 3 ;
84 lv2:symbol "GAIN1" ;
85 lv2:name "GAIN1";
86 lv2:default 0.0 ;
87 lv2:minimum -2e+01 ;
88 lv2:maximum 2e+01 ;
89 ] , [
90 a lv2:AudioPort ,
91 lv2:OutputPort ;
92 lv2:index 4 ;
93 lv2:symbol "out" ;
94 lv2:name "Out" ;
95 ] , [
96 a lv2:AudioPort ,
97 lv2:InputPort ;
98 lv2:index 5 ;
99 lv2:symbol "in" ;
100 lv2:name "In" ;
101 ].
102
103 <http://guitarix.sourceforge.net/plugins/gxmetal_head#gui>
104 a guiext:GtkUI;
105 guiext:binary <gxmetal_head_gui.so>;
106 guiext:requiredFeature guiext:makeResident .
107
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxmetal_head.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class Gxmetal_headGUI
34 {
35 private:
36
37 Glib::ustring plugskin;
38 Glib::ustring addKnob;
39 Glib::ustring plug_name;
40 void set_knob(Glib::ustring knob);
41 void set_skin();
42 void set_plug_name(const char * plugin_uri);
43 GtkWidget* make_gui();
44 Widget* widget;
45
46 public:
47
48 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
49 const char * plugin_uri,
50 const char * bundle_path,
51 LV2UI_Write_Function write_function,
52 LV2UI_Controller controller,
53 LV2UI_Widget * widget,
54 const LV2_Feature * const * features);
55
56 static void port_event(LV2UI_Handle ui, uint32_t port_index,
57 uint32_t buffer_size, uint32_t format,
58 const void * buffer);
59
60 static LV2UI_Descriptor descriptors[];
61 static void cleanup(LV2UI_Handle ui);
62
63 Gxmetal_headGUI () {};
64 ~Gxmetal_headGUI () {};
65 } ;
66
67 void Gxmetal_headGUI::set_knob(Glib::ustring knob)
68 {
69 addKnob = " style 'gx_";
70 addKnob += plug_name;
71 addKnob += "_dark_skin_icons'\n"
72 " { \n"
73 " stock['bigknob'] = {{'";
74 addKnob += knob;
75 addKnob += ".png'}}\n";
76 addKnob += " stock['smallknobr'] = {{'";
77 addKnob += knob;
78 addKnob += "-middle.png'}}\n";
79 addKnob += " stock['button_on'] = {{'"
80 "chump-switch_on.png'}}\n"
81 " stock['button_off'] = {{'"
82 "chump-switch_off.png'}}\n"
83 " }\n"
84 "widget '*.";
85 addKnob += plug_name;
86 addKnob += "' style 'gx_";
87 addKnob += plug_name;
88 addKnob += "_dark_skin_icons' \n"
89 "class '*GxToggleImage' style'gx_";
90 addKnob += plug_name;
91 addKnob += "_dark_skin_icons' \n";
92 }
93
94 void Gxmetal_headGUI::set_skin()
95 {
96 Glib::ustring toparse = "pixmap_path ";
97 toparse += " '";
98 toparse += GX_LV2_STYLE_DIR;
99 toparse += "/'\n";
100 toparse += "style \"gx_";
101 toparse += plug_name;
102 toparse += "_dark-paintbox\"\n"
103 " { \n"
104 "GxPaintBox::skin-gradient = {\n"
105 "{ 65536, 0, 0, 13107, 52428 }, \n"
106 "{ 52428, 0, 0, 0, 52428 },\n"
107 "{ 13107, 0, 0, 13107, 13107 }}\n"
108 " GxPaintBox::icon-set =4\n"
109 " stock['amp_skin'] = {{'";
110 toparse += plugskin;
111 toparse += "'}}\n"
112 " }\n"
113 "\n"
114 "style 'gx_headmetal_head_box' \n"
115 " { \n"
116 " fg[NORMAL] = '#d190bc' \n"
117 "font_name = 'sans bold 9.5' \n"
118 " }\n";
119 toparse += addKnob;
120
121 toparse += " widget '*.amplabel' style:highest 'gx_headmetal_head_box'\n"
122 "widget '*.";
123 toparse += plug_name;
124 toparse += "' style 'gx_";
125 toparse += plug_name;
126 toparse += "_dark-paintbox' ";
127 toparse += "style 'gx_switch'\n"
128 "{\n"
129 "xthickness = 0\n"
130 "ythickness = 0\n"
131 "GtkButton::inner-border = {0, 0, 0, 0}\n"
132 "GtkButton::default-border = {0, 0, 0, 0}\n"
133 "GtkButton::focus-line-width = 0\n"
134 "GtkButton::focus-padding = 0\n"
135 "GtkButton::interior-focus = 0\n"
136 "GtkButton::child-displacement-x = 0\n"
137 "GtkButton::child-displacement-y = 0\n"
138 " }\n"
139 "widget '*.";
140 toparse += plug_name;
141 toparse += "' style:highest 'gx_switch'";
142
143 gtk_rc_parse_string (toparse.c_str());
144 }
145
146 void Gxmetal_headGUI::set_plug_name(const char * plugin_uri)
147 {
148 addKnob = "";
149
150 if (strcmp("http://guitarix.sourceforge.net/plugins/gxmetal_head#metal_head", plugin_uri) == 0)
151 {
152 plugskin = "metalhead.png";
153 plug_name = "gxmetal_head";
154 set_knob("nm2-knob");
155 }
156 else
157 {
158 plugskin = "preampmono.png";
159 plug_name = "gxmetal_head";
160 }
161 }
162
163 GtkWidget* Gxmetal_headGUI::make_gui()
164 {
165 // init the gxwmm library
166 Gxw::init();
167 set_skin();
168 GtkWidget* container = gtk_vbox_new(FALSE, 0);
169 widget = new Widget(plug_name);
170 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
171 gtk_container_add(GTK_CONTAINER(container), cWidget );
172
173 return container;
174 }
175
176
177 LV2UI_Handle Gxmetal_headGUI::instantiate(const struct _LV2UI_Descriptor * descriptor,
178 const char * plugin_uri,
179 const char * bundle_path,
180 LV2UI_Write_Function write_function,
181 LV2UI_Controller controller,
182 LV2UI_Widget * widget,
183 const LV2_Feature * const * features)
184 {
185 Gxmetal_headGUI* self = new Gxmetal_headGUI();
186 if (self == NULL) return NULL;
187 self->set_plug_name(plugin_uri);
188 *widget = (LV2UI_Widget)self->make_gui();
189 self->widget->controller = controller;
190 self->widget->write_function = write_function;
191 return (LV2UI_Handle)self;
192 }
193
194 void Gxmetal_headGUI::cleanup(LV2UI_Handle ui)
195 {
196 Gxmetal_headGUI *pluginGui = static_cast<Gxmetal_headGUI*>(ui);
197 delete pluginGui->widget;
198 delete pluginGui;
199 }
200
201 void Gxmetal_headGUI::port_event(LV2UI_Handle ui,
202 uint32_t port_index,
203 uint32_t buffer_size,
204 uint32_t format,
205 const void * buffer)
206 {
207 Gxmetal_headGUI *self = static_cast<Gxmetal_headGUI*>(ui);
208 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
209 return;
210 }
211
212 LV2UI_Descriptor Gxmetal_headGUI::descriptors[] =
213 {
214 {
215 GXPLUGIN_UI_URI,
216 Gxmetal_headGUI::instantiate,
217 Gxmetal_headGUI::cleanup,
218 Gxmetal_headGUI::port_event,
219 NULL
220 }
221 };
222
223 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
224 {
225 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
226 if (index >= sizeof(Gxmetal_headGUI::descriptors) /
227 sizeof(Gxmetal_headGUI::descriptors[0]))
228 {
229 return NULL;
230 }
231 return Gxmetal_headGUI::descriptors + index;
232 }
233
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxmetal_head#metal_head>
23 a lv2:Plugin ;
24 lv2:binary <gxmetal_head.so> ;
25 rdfs:seeAlso <gxmetal_head.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxmetal_head#metal_head>
23 a lv2:Plugin ;
24 lv2:binary <gxmetal_head@LIB_EXT@> ;
25 rdfs:seeAlso <gxmetal_head.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24 /* @get controller by port
25 * this function is used by make_selector() make_controller_box()
26 * set_value() and on_value_changed()
27 * so controller widgets needs only here asined to a port,
28 * and all functions which need acess to the controller widget pointer
29 * can receive them by port number
30 */
31 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
32 {
33 switch ((PortIndex)port_index )
34 {
35 case TONE:
36 return &m_bigknob;
37 case DRIVE:
38 return &m_bigknob1;
39 case PREGAIN:
40 return &m_bigknob2;
41 case GAIN1:
42 return &m_bigknob3;
43 default:
44 return NULL;
45 }
46 }
47
48 Widget::Widget(Glib::ustring plugname):
49 plug_name(plugname)
50 {
51 // create controllers for port name
52 make_controller_box(&m_vbox4, "tone", 0.0, 1.0, 0.01, TONE);
53 make_controller_box(&m_vbox2, "drive", 0.0, 1.0, 0.01, DRIVE);
54 make_controller_box(&m_vbox3, "volume", -2e+01, 2e+01, 0.1 , PREGAIN);
55 make_controller_box(&m_vbox5, "gain", -2e+01, 2e+01, 0.1 , GAIN1);
56
57 // set propertys for the main paintbox holding the skin
58 m_paintbox.set_border_width(20);
59 m_paintbox.set_spacing(0);
60 m_paintbox.set_homogeneous(false);
61 m_paintbox.set_name(plug_name);
62 m_paintbox.property_paint_func() = "amp_skin_expose";
63 //m_paintbox.set_size_request( 425, 260 ) ;
64
65 add(m_paintbox);
66
67 // One vertical box to wrap all in
68 m_vbox_.set_spacing(0);
69 m_vbox_.set_border_width(10);
70 m_vbox_.set_homogeneous(false);
71
72 m_paintbox.pack_start(m_vbox_ , Gtk::PACK_EXPAND_PADDING, 0);
73
74
75 // This is the central controller strip
76 m_hbox1_.set_spacing(45);
77 m_hbox1_.set_border_width(0);
78 m_hbox1_.set_homogeneous(true);
79
80
81 // put boxed controllers into controller box
82 m_vbox2.set_spacing(6);
83 m_vbox2.set_border_width(10);
84 m_vbox3.set_spacing(6);
85 m_vbox3.set_border_width(10);
86 m_vbox4.set_spacing(6);
87 m_vbox4.set_border_width(10);
88 m_vbox5.set_spacing(6);
89 m_vbox5.set_border_width(10);
90
91 //m_hbox1_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
92 m_hbox1_.pack_start(m_vbox2);
93 m_hbox1_.pack_start(m_vbox3);
94 m_hbox1_.pack_start(m_vbox4);
95 m_hbox1_.pack_start(m_vbox5);
96 //m_hbox1_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
97
98 // Npow put all layers in main vbox
99 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING, 0);
100
101
102 // connect expose handler as resize handler
103 m_paintbox.signal_expose_event().connect(
104 sigc::mem_fun(this, &Widget::_expose_event), true);
105
106 set_app_paintable(true);
107 show_all();
108 }
109
110 Widget::~Widget()
111 {
112
113 }
114
115 // set borderwith for paintbox when widget resize
116 // to hold controllers in place
117 bool Widget::_expose_event(GdkEventExpose *event)
118 {
119 int x, y, width, height, depth;
120 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
121 //double_t height = m_paintbox.get_window()->get_height();
122 m_paintbox.set_border_width(height/10);
123 return false;
124 }
125
126 // create selectors from gxwmm
127 void Widget::make_selector(Glib::ustring labela,
128 Glib::ustring tables[],
129 size_t _size,
130 float min, float digits,
131 PortIndex port_name)
132 {
133 Gxw::Selector *regler = static_cast<Gxw::Selector*>
134 (get_controller_by_port(port_name));
135 if (regler)
136 {
137 float max = static_cast<float>(_size+1);
138
139 Gtk::TreeModelColumn<Glib::ustring> label;
140 Gtk::TreeModelColumnRecord rec;
141 rec.add(label);
142 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
143
144 for (uint32_t i = 0 ; i< _size; ++i) {
145 ls->append()->set_value(0, tables[i]);
146 }
147 regler->set_model(ls);
148 regler->set_has_tooltip();
149 regler->set_tooltip_text(labela);
150 regler->cp_configure("SELECTOR", labela, min, max, digits);
151 regler->set_show_value(false);
152 regler->set_name(plug_name);
153 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
154 *this, &Widget::on_value_changed), port_name));
155 }
156 }
157
158 // create stackboxes with controllers for port name
159 void Widget::make_controller_box(Gtk::Box *box,
160 Glib::ustring label,
161 float min, float max,
162 float digits,
163 PortIndex port_name)
164 {
165 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
166 get_controller_by_port(port_name));
167 if (regler)
168 {
169 Gtk::Label* pr = new Gtk::Label(label, 0);
170 pr->set_name("amplabel");
171 // use label images instead simple string labes
172 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
173 label_image += "/";
174 label_image += label;
175 label_image += "-label.png";
176 Gtk::Image *pr = new Gtk::Image(label_image);*/
177
178 Gtk::VBox* b1 = new Gtk::VBox();
179 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
180 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
181 regler->cp_configure("KNOB", label, min, max, digits);
182 regler->set_show_value(false);
183 regler->set_name(plug_name);
184 box->pack_start(*regler,Gtk::PACK_SHRINK);
185 Gtk::VBox* b2 = new Gtk::VBox();
186 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
187 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
188 *this, &Widget::on_value_changed), port_name));
189 }
190 }
191
192 // create stackboxes with switch controller for port name
193 void Widget::make_switch_box(Gtk::Box *box,
194 Glib::ustring label,
195 Glib::ustring label2,
196 PortIndex port_name)
197 {
198 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
199 get_controller_by_port(port_name));
200 if (regler)
201 {
202 Gtk::Label* pr = new Gtk::Label(label, 0);
203 pr->set_name("amplabel");
204 // use label images instead simple string labes
205 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
206 label_image += "/"+plug_name+"-";
207 label_image += label;
208 label_image += "-label.png";
209 Gtk::Image *pr = new Gtk::Image(label_image);*/
210
211 regler->cp_configure("switch", label, 0, 1, 1);
212 regler->set_can_focus( false ) ;
213
214 regler->set_name(plug_name);
215 regler->set_base_name( "button" );
216 Gtk::VBox* b1 = new Gtk::VBox();
217 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
218 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
219 box->pack_start(*regler,Gtk::PACK_SHRINK);
220
221 // 2nd Label
222 Gtk::Label* pr2 = new Gtk::Label(label2, 0);
223 pr2->set_name("amplabel");
224 box->pack_start( *Gtk::manage(pr2),Gtk::PACK_SHRINK);
225
226 Gtk::VBox* b2 = new Gtk::VBox();
227 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
228 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
229 *this, &Widget::on_value_changed), port_name));
230 }
231 }
232
233 // Create the Text Labels from images For Amp
234 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
235 {
236 Glib::ustring label_image = GX_LV2_STYLE_DIR;
237 label_image += "/";
238 label_image += label;
239 label_image += ".png";
240 Gtk::Image *pr = new Gtk::Image(label_image);
241
242
243 Gtk::VBox* b1 = new Gtk::VBox();
244 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
245 if( start ){
246 // std::cout << "Pack Start "<<label<<std::endl;
247 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
248 }else{
249 // std::cout << "Pack End " << label << std::endl;
250 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
251 }
252
253 Gtk::VBox* b2 = new Gtk::VBox();
254 box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
255
256 }
257 // receive controller value changes from host and set them to controller
258 void Widget::set_value(uint32_t port_index,
259 uint32_t format,
260 const void * buffer)
261 {
262 if ( format == 0 )
263 {
264 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
265 get_controller_by_port(port_index));
266 if (regler)
267 {
268 float value = *static_cast<const float*>(buffer);
269 regler->cp_set_value(value);
270 }
271 }
272 }
273
274 // write (UI) controller value changes to the host->engine
275 void Widget::on_value_changed(uint32_t port_index)
276 {
277 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
278 get_controller_by_port(port_index));
279 if (regler)
280 {
281 float value = regler->cp_get_value();
282 write_function(controller, port_index, sizeof(float), 0,
283 static_cast<const void*>(&value));
284 }
285 }
286
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxmetal_head.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 Glib::ustring label2,
53 PortIndex port_name);
54 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plugname);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::VBox m_vbox;
80 Gtk::VBox m_vbox1;
81 Gtk::VBox m_vbox2;
82 Gtk::VBox m_vbox3;
83 Gtk::VBox m_vbox4;
84 Gtk::VBox m_vbox5;
85 Gtk::VBox m_vbox6;
86 Gtk::VBox m_vbox7;
87 Gtk::HBox m_hbox_;
88 Gtk::HBox m_hbox1_;
89 Gtk::HBox m_hbox2_;
90
91 Gxw::PaintBox m_paintbox;
92 Gxw::SmallKnobR m_bigknob;
93 Gxw::BigKnob m_bigknob1;
94 Gxw::BigKnob m_bigknob2;
95 Gxw::BigKnob m_bigknob3;
96 };
97
98 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxmetal_head.lv2'
10
11 src = ['gxmetal_head.cpp',
12 '../DSP/gx_resampler.cc',
13 '../DSP/gx_convolver.cc'
14 ]
15 incl = ['../faust','./', '../DSP']
16 lib = []
17 if sys.platform.startswith("linux"):
18 lib.append('dl')
19 uselib = ['LV2CORE']
20 if bld.env['ZITA_CONVOLVER']:
21 uselib.append('ZITA_CONVOLVER')
22 else:
23 src.append('../../zita-convolver/zita-convolver.cc')
24 incl.append('../../zita-convolver');
25 uselib.append('FFTW3')
26 if bld.env['ZITA_RESAMPLER']:
27 uselib.append('ZITA_RESAMPLER')
28 else:
29 src.append('../../zita-resampler-1.1.0/resampler.cc')
30 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
31 incl.append('../../zita-resampler-1.1.0')
32 if sys.platform.startswith("linux"):
33 lib.append('dl')
34 cxxflag =[]
35 if not bld.env['OPT'] and bld.env['SSE2']:
36 cxxflag = [ "-msse2", "-mfpmath=sse"]
37 lv2_effects = bld(
38 features='cxx cshlib ',
39 includes = incl,
40 lib = lib,
41 uselib = uselib,
42 obj_ext = '_16.o',
43 cxxflags = cxxflag,
44 defines = ["LV2_SO"],
45 target = 'gxmetal_head',
46 source = src,
47 install_path = '${LV2DIR}/%s' % bundle,
48 chmod = 0o755,
49 )
50 lv2_effects.env['shlib_PATTERN'] = '%s.so'
51
52 uselib_local5 = []
53 libpath5 = []
54 lib5 = []
55 incl5 = ['../../../libgxwmm','../../../libgxw','../']
56 if sys.platform.startswith("linux"):
57 lib5.append('dl')
58 if bld.env["GX_LIB_SHARED"]:
59 lib5 += ['gxwmm','gxw']
60 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
61 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
62 else:
63 uselib_local5 += ['gxwmm','gxw']
64
65 lv2_effetcs_gui = bld(
66 features='cxx cshlib ',
67 includes = incl5,
68 lib = lib5,
69 uselib = 'LV2CORE GTKMM',
70 libpath = libpath5,
71 uselib_local = uselib_local5,
72 linkflags = '-Wl,-z,nodelete',
73 defines = ["LV2_GUI"],
74 target = 'gxmetal_head_gui',
75 source = 'widget.cpp gxmetal_head_gui.cpp',
76 install_path = '${LV2DIR}/%s' % bundle,
77 chmod = 0o755,
78 )
79 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
80
81
82 install_path = '${LV2DIR}/%s' % bundle,
83 bld.install_files('${LV2DIR}/gxmetal_head.lv2', 'manifest.ttl')
84 bld.install_files('${LV2DIR}/gxmetal_head.lv2', 'gxmetal_head.ttl')
85
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18 #include <stdio.h>
19 #include <cstdlib>
20 #include <cmath>
21 #include <iostream>
22 #include <cstring>
23 #include <glibmm.h>
24 #include <unistd.h>
25
26 #ifdef __SSE__
27 /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
28 flags to avoid costly denormals */
29 #ifdef __SSE3__
30 #include <pmmintrin.h>
31 inline void AVOIDDENORMALS()
32 {
33 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
34 _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
35 }
36 #else
37 #include <xmmintrin.h>
38 inline void AVOIDDENORMALS()
39 {
40 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
41 }
42 #endif //__SSE3__
43
44 #else
45 inline void AVOIDDENORMALS() {}
46 #endif //__SSE__
47
48 // faust support
49 #define FAUSTFLOAT float
50 #ifndef N_
51 #define N_(String) (String)
52 #endif
53 #define max(x, y) (((x) > (y)) ? (x) : (y))
54 #define min(x, y) (((x) < (y)) ? (x) : (y))
55 template <int32_t N> inline float faustpower(float x)
56 {
57 return powf(x, N);
58 }
59 template <int32_t N> inline double faustpower(double x)
60 {
61 return pow(x, N);
62 }
63 template <int32_t N> inline int32_t faustpower(int32_t x)
64 {
65 return faustpower<N/2>(x) * faustpower<N-N/2>(x);
66 }
67 template <> inline int32_t faustpower<0>(int32_t x)
68 {
69 return 1;
70 }
71 template <> inline int32_t faustpower<1>(int32_t x)
72 {
73 return x;
74 }
75
76 /****************************************************************
77 ** "atomic" value access
78 */
79
80 inline void atomic_set(volatile int32_t* p, int32_t v)
81 {
82 g_atomic_int_set(p, v);
83 }
84
85 inline int32_t atomic_get(volatile int32_t& p)
86 {
87 return g_atomic_int_get(&p);
88 }
89
90 inline bool atomic_compare_and_exchange(volatile int32_t *p, int32_t oldv, int32_t newv)
91 {
92 return g_atomic_int_compare_and_exchange(p, oldv, newv);
93 }
94
95 template <class T>
96 inline void atomic_set(T **p, T *v)
97 {
98 g_atomic_pointer_set(p, v);
99 }
100
101 template <class T>
102 inline void atomic_set_0(T **p)
103 {
104 g_atomic_pointer_set(p, 0);
105 }
106
107 template <class T>
108 inline T *atomic_get(T*& p)
109 {
110 return static_cast<T*>(g_atomic_pointer_get(&p));
111 }
112
113 template <class T>
114 inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv)
115 {
116 return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), oldv, newv);
117 }
118
119
120 #include "gxpreamp.h"
121 #include "gx_preamp.h"
122
123 // define run pointer typs
124 typedef void (GxPreAmpStereo::*run_amp_stereo)
125 (uint32_t count,float* input, float* input1, float* output, float* output1);
126
127
128 //////////////////////////// STEREO ////////////////////////////////////
129
130 class GxPluginStereo
131 {
132 private:
133 // internal stuff
134 float* output;
135 float* input;
136 float* output1;
137 float* input1;
138
139 GxPreAmpStereo amplifier;
140 run_amp_stereo _as_ptr;
141 uint32_t bufsize;
142 bool doit;
143 volatile int32_t schedule_wait;
144
145
146 public:
147 // LV2 stuff
148 LV2_URID_Map* map;
149 LV2_Worker_Schedule* schedule;
150
151 inline void run_dsp_stereo(uint32_t n_samples);
152 void connect_stereo(uint32_t port,void* data);
153 inline void init_dsp_stereo(uint32_t rate, uint32_t bufsize_);
154 inline void do_work_stereo();
155 inline void connect_all_stereo_ports(uint32_t port, void* data);
156
157 GxPluginStereo() :
158 output(NULL),
159 input(NULL),
160 output1(NULL),
161 input1(NULL),
162 amplifier(GxPreAmpStereo()),
163 bufsize(0)
164 {
165 atomic_set(&schedule_wait,0);
166 };
167
168 ~GxPluginStereo()
169 {
170 };
171 };
172
173
174 #include "gx_preamp.cc"
175
176 // plugin stuff
177
178 void GxPluginStereo::do_work_stereo()
179 {
180 // Work for the maxlevels here
181 atomic_set(&schedule_wait,0);
182 }
183
184
185 void GxPluginStereo::init_dsp_stereo(uint32_t rate, uint32_t bufsize_)
186 {
187 AVOIDDENORMALS();
188 bufsize = bufsize_;
189 _as_ptr = &GxPreAmpStereo::run;
190 amplifier.init_static(rate, &amplifier);
191 }
192
193
194 void GxPluginStereo::connect_stereo(uint32_t port,void* data)
195 {
196 switch ((PortIndex)port)
197 {
198
199 case AMP_OUTPUT:
200 output = static_cast<float*>(data);
201 break;
202 case AMP_INPUT:
203 input = static_cast<float*>(data);
204 break;
205 case AMP_OUTPUT1:
206 output1 = static_cast<float*>(data);
207 break;
208 case AMP_INPUT1:
209 input1 = static_cast<float*>(data);
210 break;
211 default:
212 break;
213 }
214 }
215
216 void GxPluginStereo::run_dsp_stereo(uint32_t n_samples)
217 {
218 // run dsp
219 (&amplifier->*_as_ptr)(n_samples, input, input1, output, output1);
220 //amplifier.run_static(n_samples, input, input1, output, output1, &amplifier);
221 // work ?
222 if (!atomic_get(schedule_wait) )
223 {
224 // Do max values and set work
225 atomic_set(&schedule_wait,1);
226 schedule->schedule_work(schedule->handle, sizeof(bool), &doit);
227 }
228 }
229
230 void GxPluginStereo::connect_all_stereo_ports(uint32_t port, void* data)
231 {
232 connect_stereo(port,data);
233 amplifier.connect_static(port,data, &amplifier);
234
235 }
236
237 ///////////////////////////// LV2 defines //////////////////////////////
238
239 static LV2_Worker_Status
240 work(LV2_Handle instance,
241 LV2_Worker_Respond_Function respond,
242 LV2_Worker_Respond_Handle handle,
243 uint32_t size,
244 const void* data)
245 {
246 GxPluginStereo* self = (GxPluginStereo*)instance;
247 self->do_work_stereo();
248 return LV2_WORKER_SUCCESS;
249 }
250
251 static LV2_Worker_Status
252 work_response(LV2_Handle instance,
253 uint32_t size,
254 const void* data)
255 {
256 //printf("worker respose.\n");
257 return LV2_WORKER_SUCCESS;
258 }
259
260
261 static LV2_Handle
262 instantiate(const LV2_Descriptor* descriptor,
263 double rate,
264 const char* bundle_path,
265 const LV2_Feature* const* features)
266 {
267 GxPluginStereo *self = new GxPluginStereo();
268
269 if (!self)
270 {
271 return NULL;
272 }
273
274 const LV2_Options_Option* options = NULL;
275 uint32_t bufsize = 0;
276 fprintf(stderr," %s\n",descriptor->URI);
277
278 for (int32_t i = 0; features[i]; ++i)
279 {
280 if (!strcmp(features[i]->URI, LV2_URID__map))
281 {
282 self->map = (LV2_URID_Map*)features[i]->data;
283 }
284 else if (!strcmp(features[i]->URI, LV2_WORKER__schedule))
285 {
286 self->schedule = (LV2_Worker_Schedule*)features[i]->data;
287 }
288 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
289 {
290 options = (const LV2_Options_Option*)features[i]->data;
291 }
292 }
293 if (!self->schedule)
294 {
295 fprintf(stderr, "Missing feature work:schedule.\n");
296 delete self;
297 return NULL;
298 }
299 if (!self->map)
300 {
301 fprintf(stderr, "Missing feature uri:map.\n");
302 }
303 else if (!options)
304 {
305 fprintf(stderr, "Missing feature options.\n");
306 }
307 else
308 {
309 // IS this where I set up th LV2 Atom for vumeter maxlevels?
310 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
311 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
312
313 for (const LV2_Options_Option* o = options; o->key; ++o)
314 {
315 if (o->context == LV2_OPTIONS_INSTANCE &&
316 o->key == bufsz_max &&
317 o->type == atom_Int)
318 {
319 bufsize = *(const int32_t*)o->value;
320 }
321 }
322
323 if (bufsize == 0)
324 {
325 fprintf(stderr, "No maximum buffer size given.\n");
326 }
327 printf("using block size: %d\n", bufsize);
328 }
329 self->init_dsp_stereo((uint32_t)rate, bufsize);
330
331 return (LV2_Handle)self;
332 }
333
334 static void
335 connect_port(LV2_Handle instance,
336 uint32_t port,
337 void* data)
338 {
339 GxPluginStereo* self = (GxPluginStereo*)instance;
340 self->connect_all_stereo_ports(port, data);
341
342 }
343
344 static void
345 activate(LV2_Handle instance)
346 {
347
348 }
349
350 static void
351 run(LV2_Handle instance, uint32_t n_samples)
352 {
353 GxPluginStereo* self = (GxPluginStereo*)instance;
354 self->run_dsp_stereo(n_samples);
355 }
356
357 static void
358 deactivate(LV2_Handle instance)
359 {
360
361 }
362
363 static void
364 cleanup(LV2_Handle instance)
365 {
366 GxPluginStereo* self = (GxPluginStereo*)instance;
367 delete self;
368 }
369
370 //////////////////////////////////////////////////////////////////
371
372 const void*
373 extension_data(const char* uri)
374 {
375 static const LV2_Worker_Interface worker = { work, work_response, NULL };
376 if (!strcmp(uri, LV2_WORKER__interface))
377 {
378 return &worker;
379 }
380 return NULL;
381 }
382
383 static const LV2_Descriptor descriptor1 =
384 {
385 GXPLUGIN_URI "#preampstereo",
386 instantiate,
387 connect_port,
388 activate,
389 run,
390 deactivate,
391 cleanup,
392 extension_data
393 };
394
395 extern "C"
396 LV2_SYMBOL_EXPORT
397 const LV2_Descriptor*
398 lv2_descriptor(uint32_t index)
399 {
400 switch (index)
401 {
402 case 0:
403 return &descriptor1;
404 default:
405 return NULL;
406 }
407 }
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
26 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
27 @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
28 @prefix opt: <http://lv2plug.in/ns/ext/options#> .
29 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
30 @prefix work: <http://lv2plug.in/ns/ext/worker#> .
31
32 <http://guitarix.sourceforge.net#me>
33 a foaf:Person ;
34 foaf:name "Hermann Meyer" ;
35 foaf:mbox <mailto:brummer@web.de> ;
36 rdfs:seeAlso <http://guitarix.sourceforge.net> .
37
38 <http://guitarix.sourceforge.net/plugins/gxamp>
39 a doap:Project ;
40 doap:maintainer <http://guitarix.sourceforge.net#me> ;
41 doap:name "GxPreAmplifier" .
42
43 <http://guitarix.sourceforge.net/plugins/gxpreamp#preampstereo>
44 a lv2:Plugin ,
45 lv2:AmplifierPlugin ;
46 doap:maintainer <http://guitarix.sourceforge.net#me> ;
47 doap:name "GxPreAmplifier Stereo";
48 doap:license <http://opensource.org/licenses/isc> ;
49 lv2:project <http://guitarix.sourceforge.net/plugins/gxpreamp> ;
50 lv2:optionalFeature lv2:hardRTCapable ;
51 lv2:requiredFeature urid:map ,
52 bufsz:boundedBlockLength ,
53 work:schedule ;
54 bufsz:minBlockLength 64 ;
55 bufsz:maxBlockLength 8192 ;
56 lv2:extensionData work:interface ;
57
58 guiext:ui <http://guitarix.sourceforge.net/plugins/gxpreamp#gui>;
59
60 lv2:port [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 0 ;
64 lv2:symbol "fslider0_" ;
65 lv2:name "Output";
66 lv2:default -0.0 ;
67 lv2:minimum -20.0 ;
68 lv2:maximum 20.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 1 ;
73 lv2:symbol "fslider1_" ;
74 lv2:name "Drive";
75 lv2:default 0.0 ;
76 lv2:minimum -12.0 ;
77 lv2:maximum 12.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 2 ;
82 lv2:symbol "fslider2_" ;
83 lv2:name "Input";
84 lv2:default -0.0 ;
85 lv2:minimum -20 ;
86 lv2:maximum 20 ;
87 ] ,
88 [
89 a lv2:InputPort ,
90 lv2:ControlPort ;
91 lv2:index 3 ;
92 lv2:symbol "fslider3_" ;
93 lv2:name "Resonance";
94 lv2:default 0.0 ;
95 lv2:minimum 0.0 ;
96 lv2:maximum 10.0 ;
97 ] ,
98 [
99 a lv2:InputPort ,
100 lv2:ControlPort ;
101 lv2:index 4 ;
102 lv2:symbol "fslider4_" ;
103 lv2:name "Presence";
104 lv2:default 0.0 ;
105 lv2:minimum 10.0 ;
106 lv2:maximum 0.01 ;
107 ] ,
108 [
109 a lv2:InputPort ,
110 lv2:ControlPort ;
111 lv2:index 5 ;
112 lv2:symbol "fslider5_" ;
113 lv2:name "Feedback";
114 lv2:default -3.0 ;
115 lv2:minimum -75.0 ;
116 lv2:maximum -3.0 ;
117 ], [
118 a lv2:InputPort ,
119 atom:AtomPort ;
120 atom:bufferType atom:Sequence ;
121 atom:supports <http://lv2plug.in/ns/ext/patch#Message> ;
122 lv2:index 6 ;
123 lv2:symbol "notify" ;
124 lv2:name "Notify"
125 ] , [
126 a lv2:AudioPort ,
127 lv2:OutputPort ;
128 lv2:index 7 ;
129 lv2:symbol "out" ;
130 lv2:name "Out"
131 ] , [
132 a lv2:AudioPort ,
133 lv2:InputPort ;
134 lv2:index 8 ;
135 lv2:symbol "in" ;
136 lv2:name "In"
137 ] , [
138 a lv2:AudioPort ,
139 lv2:OutputPort ;
140 lv2:index 9 ;
141 lv2:symbol "out1" ;
142 lv2:name "Out1"
143 ] , [
144 a lv2:AudioPort ,
145 lv2:InputPort ;
146 lv2:index 10 ;
147 lv2:symbol "in1" ;
148 lv2:name "In1"
149 ] .
150
151 <http://guitarix.sourceforge.net/plugins/gxpreamp#gui>
152 a guiext:GtkUI;
153 guiext:binary <gxpreamp_gui_stereo.so>;
154 guiext:requiredFeature guiext:makeResident;
155 lv2:extensionData work:interface ;
156 guiext:portNotification [
157 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxpreamp#preampstereo>;
158 lv2:symbol "notify" ;
159 guiext:notifyType atom:Blank
160 ].
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxpreamp#preampstereo>
23 a lv2:Plugin ;
24 lv2:binary <gxpreamp_stereo.so> ;
25 rdfs:seeAlso <gxpreamp_stereo.ttl> .
26
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxpreamp#preampstereo>
23 a lv2:Plugin ;
24 lv2:binary <gxpreamp_stereo@LIB_EXT@> ;
25 rdfs:seeAlso <gxpreamp_stereo.ttl> .
26
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle2 = 'gxpreamp_stereo.lv2'
10
11 src2 = ['gxpreamp_stereo.cpp'
12 ]
13 incl2 = ['../../','./','../', '../../DSP']
14 lib2 = []
15 if sys.platform.startswith("linux"):
16 lib2.append('dl')
17 uselib2 = ['LV2CORE','GLIBMM']
18 if bld.env['ZITA_CONVOLVER']:
19 uselib2.append('ZITA_CONVOLVER')
20 else:
21 src2.append('../../../zita-convolver/zita-convolver.cc')
22 incl2.append('../../../zita-convolver');
23 uselib2.append('FFTW3')
24 if bld.env['ZITA_RESAMPLER']:
25 uselib2.append('ZITA_RESAMPLER')
26 else:
27 src2.append('../../../zita-resampler-1.1.0/resampler.cc')
28 src2.append('../../../zita-resampler-1.1.0/resampler-table.cc')
29 incl2.append('../../../zita-resampler-1.1.0')
30 cxxflag2 =[]
31 if not bld.env['OPT'] and bld.env['SSE2']:
32 cxxflag2 = [ "-msse2", "-mfpmath=sse"]
33 lv2_plugin_stereo = bld(
34 features='cxx cshlib ',
35 includes = incl2,
36 lib = lib2,
37 uselib = uselib2,
38 obj_ext = '_12.o',
39 cxxflags = cxxflag2,
40 defines = ["LV2_SO"],
41 target = 'gxpreamp_stereo',
42 source = src2,
43 install_path = '${LV2DIR}/%s' % bundle2,
44 chmod = 0o755,
45 )
46 lv2_plugin_stereo.env['shlib_PATTERN'] = '%s.so'
47
48 uselib_local3 = []
49 libpath3 = []
50 lib3 = []
51 incl3 = ['../../../../libgxwmm','../../../../libgxw','../']
52 if sys.platform.startswith("linux"):
53 lib3.append('dl')
54 if bld.env["GX_LIB_SHARED"]:
55 lib3 += ['gxwmm','gxw']
56 libpath3 += [bld.path.find_dir("../../../../libgxw/gxw").bldpath(bld.env),
57 bld.path.find_dir("../../../../libgxwmm/gxwmm").bldpath(bld.env)]
58 else:
59 uselib_local3 += ['gxwmm','gxw']
60
61 lv2_plugin_gui_stereo = bld(
62 features='cxx cshlib ',
63 includes = incl3,
64 lib = lib3,
65 uselib = 'LV2CORE GTKMM',
66 libpath = libpath3,
67 obj_ext = '_3.o',
68 uselib_local = uselib_local3,
69 linkflags = '-Wl,-z,nodelete',
70 defines = ["LV2_GUI"],
71 target = 'gxpreamp_gui_stereo',
72 source = '../widget.cpp ../gxpreamp_gui.cpp',
73 install_path = '${LV2DIR}/%s' % bundle2,
74 chmod = 0o755,
75 )
76 lv2_plugin_gui_stereo.env['shlib_PATTERN'] = '%s.so'
77
78
79 install_path = '${LV2DIR}/%s' % bundle2,
80 bld.install_files('${LV2DIR}/gxpreamp_stereo.lv2', 'manifest.ttl')
81 bld.install_files('${LV2DIR}/gxpreamp_stereo.lv2', 'gxpreamp_stereo.ttl')
82
0 /* Copyright unknown. Code by Laurent de Soras <laurent@ohmforce.com>.
1 */
2
3 #ifndef __pbd_fastlog_h__
4 #define __pbd_fastlog_h__
5
6 #include <math.h> /* for HUGE_VAL */
7
8 static inline float fast_log2 (float val)
9 {
10 /* don't use reinterpret_cast<> because that prevents this
11 from being used by pure C code (for example, GnomeCanvasItems)
12 */
13 union {float f; int i;} t;
14 t.f = val;
15 int * const exp_ptr = &t.i;
16 int x = *exp_ptr;
17 const int log_2 = ((x >> 23) & 255) - 128;
18 x &= ~(255 << 23);
19 x += 127 << 23;
20 *exp_ptr = x;
21
22 val = ((-1.0f/3) * t.f + 2) * t.f - 2.0f/3;
23
24 return (val + log_2);
25 }
26
27 static inline float fast_log (const float val)
28 {
29 return (fast_log2 (val) * 0.69314718f);
30 }
31
32 static inline float fast_log10 (const float val)
33 {
34 return fast_log2(val) / 3.312500f;
35 }
36
37 static inline float minus_infinity() { return -HUGE_VAL; }
38
39 #endif /* __pbd_fastlog_h__ */
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #include <stdio.h>
20 #include <cstdlib>
21 #include <cmath>
22 #include <iostream>
23 #include <cstring>
24 #include <glibmm.h>
25 #include <unistd.h>
26
27 #ifdef __SSE__
28 /* On Intel set FZ (Flush to Zero) and DAZ (Denormals Are Zero)
29 flags to avoid costly denormals */
30 #ifdef __SSE3__
31 #include <pmmintrin.h>
32 inline void AVOIDDENORMALS()
33 {
34 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
35 _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
36 }
37 #else
38 #include <xmmintrin.h>
39 inline void AVOIDDENORMALS()
40 {
41 _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
42 }
43 #endif //__SSE3__
44
45 #else
46 inline void AVOIDDENORMALS() {}
47 #endif //__SSE__
48
49 // faust support
50 #define FAUSTFLOAT float
51 #ifndef N_
52 #define N_(String) (String)
53 #endif
54 #define max(x, y) (((x) > (y)) ? (x) : (y))
55 #define min(x, y) (((x) < (y)) ? (x) : (y))
56 template <int32_t N> inline float faustpower(float x)
57 {
58 return powf(x, N);
59 }
60 template <int32_t N> inline double faustpower(double x)
61 {
62 return pow(x, N);
63 }
64 template <int32_t N> inline int32_t faustpower(int32_t x)
65 {
66 return faustpower<N/2>(x) * faustpower<N-N/2>(x);
67 }
68 template <> inline int32_t faustpower<0>(int32_t x)
69 {
70 return 1;
71 }
72 template <> inline int32_t faustpower<1>(int32_t x)
73 {
74 return x;
75 }
76
77 /****************************************************************
78 ** "atomic" value access
79 */
80
81 inline void atomic_set(volatile int32_t* p, int32_t v)
82 {
83 g_atomic_int_set(p, v);
84 }
85
86 inline int32_t atomic_get(volatile int32_t& p)
87 {
88 return g_atomic_int_get(&p);
89 }
90
91 inline bool atomic_compare_and_exchange(volatile int32_t *p, int32_t oldv, int32_t newv)
92 {
93 return g_atomic_int_compare_and_exchange(p, oldv, newv);
94 }
95
96 template <class T>
97 inline void atomic_set(T **p, T *v)
98 {
99 g_atomic_pointer_set(p, v);
100 }
101
102 template <class T>
103 inline void atomic_set_0(T **p)
104 {
105 g_atomic_pointer_set(p, 0);
106 }
107
108 template <class T>
109 inline T *atomic_get(T*& p)
110 {
111 return static_cast<T*>(g_atomic_pointer_get(&p));
112 }
113
114 template <class T>
115 inline bool atomic_compare_and_exchange(T **p, T *oldv, T *newv)
116 {
117 return g_atomic_pointer_compare_and_exchange(reinterpret_cast<void* volatile*>(p), oldv, newv);
118 }
119
120
121 #include "gxpreamp.h"
122 #include "gx_preamp.h"
123
124 // define run pointer typs
125 typedef void (GxPreAmpMono::*run_amp_mono)
126 (uint32_t count,float* input, float* output);
127
128
129 ////////////////////////////// MONO ////////////////////////////////////
130
131 class GxPluginMono
132 {
133 private:
134 // internal stuff
135 float* output;
136 float* input;
137 GxPreAmpMono amplifier;
138 run_amp_mono _a_ptr;
139 uint32_t bufsize;
140 bool doit;
141 volatile int32_t schedule_wait;
142
143 public:
144
145 LV2_Atom_Forge forge;
146 LV2_Atom_Forge_Frame notify_frame;
147 float* notify_port;
148 float maxlevels_[4];
149 /* URIs */
150 PreampURIs uris;
151
152 // LV2 stuff
153 LV2_URID_Map* map;
154 LV2_Worker_Schedule* schedule;
155
156 inline void run_dsp_mono(uint32_t n_samples);
157 inline void calculate_maxlevels( uint32_t n_samples, float *input, float *output ) ;
158 void connect_mono(uint32_t port,void* data);
159 inline void init_dsp_mono(uint32_t rate, uint32_t bufsize_);
160 inline void do_work_mono();
161 inline void connect_all_mono_ports(uint32_t port, void* data);
162 // constructor
163 GxPluginMono() :
164 output(NULL),
165 input(NULL),
166 amplifier(GxPreAmpMono())
167 {
168 atomic_set(&schedule_wait,0);
169 };
170 // destructor
171 ~GxPluginMono()
172 {
173 };
174 };
175
176 #include "gx_preamp.cc"
177
178 // plugin stuff
179
180 void GxPluginMono::do_work_mono()
181 {
182 // SHP this is where sending of maxlevels will happen
183 /*
184 fprintf(stderr, "Port maxlevels :\n" );
185 for (uint32_t port = 0; port < 2; port++) {
186 fprintf(stderr, "Port %d = %f\n", port, maxlevels_[port] );
187 }
188 */
189
190
191
192
193 atomic_set(&schedule_wait,0);
194 }
195
196
197 void GxPluginMono::init_dsp_mono(uint32_t rate, uint32_t bufsize_)
198 {
199
200 AVOIDDENORMALS();
201 bufsize = bufsize_;
202 _a_ptr = &GxPreAmpMono::run;
203 amplifier.init_static(rate, &amplifier);
204
205 }
206
207
208 void GxPluginMono::connect_mono(uint32_t port,void* data)
209 {
210 switch ((PortIndex)port)
211 {
212 case AMP_OUTPUT:
213 output = static_cast<float*>(data);
214 break;
215 case AMP_INPUT:
216 input = static_cast<float*>(data);
217 break;
218 case MAXLEVEL:
219 notify_port = static_cast<float*>(data);
220 break;
221 default:
222 break;
223 }
224
225 }
226
227 void GxPluginMono::run_dsp_mono(uint32_t n_samples)
228 {
229
230 // Possibly here we calculate maxlevels
231 calculate_maxlevels(n_samples, input, output);
232
233 // run dsp
234 (&amplifier->*_a_ptr)(n_samples, input, output);
235
236
237 // then schedule work
238 // Do every time so no need to have flag
239 if (!atomic_get(schedule_wait))
240 {
241
242 //maxlevels_ = maxlevels ;
243 atomic_set(&schedule_wait,1);
244 schedule->schedule_work(schedule->handle, sizeof(bool), &doit);
245 }
246
247 }
248 void GxPluginMono::calculate_maxlevels( uint32_t n_samples, float *input, float *output )
249 {
250
251 // Mono first
252 // Inputs
253 const float *ports[2] = {input, output};
254 // How many channels at present one in one out
255 for (uint32_t port = 0; port < 2; port++) {
256 float level = -100;
257
258 for (uint32_t i = 0; i < n_samples; i++) {
259 // As this takes absolute value we get no negative values it seems
260 // Need to move the input pot before the dsp to adjust input levels
261 float t = max( ports[port][i], level ) ;
262 // float t = abs(ports[port][i]);
263 if (level < t) {
264 level = t;
265 }
266 }
267 // Here we need to assign values input0, output0, input1, output1
268 maxlevels_[port] = fast_log10(level) ;
269 *(notify_port) = fast_log10(level) ;
270 }
271
272 }
273
274 void GxPluginMono::connect_all_mono_ports(uint32_t port, void* data)
275 {
276 connect_mono(port,data);
277 amplifier.connect_static(port,data, &amplifier);
278 }
279
280 ///////////////////////////// LV2 defines //////////////////////////////
281
282 static LV2_Worker_Status
283 work(LV2_Handle instance,
284 LV2_Worker_Respond_Function respond,
285 LV2_Worker_Respond_Handle handle,
286 uint32_t size,
287 const void* data)
288 {
289 GxPluginMono* self = (GxPluginMono*)instance;
290 self->do_work_mono();
291 return LV2_WORKER_SUCCESS;
292 }
293
294 static LV2_Worker_Status
295 work_response(LV2_Handle instance,
296 uint32_t size,
297 const void* data)
298 {
299 printf("worker respose.\n");
300 return LV2_WORKER_SUCCESS;
301 }
302
303
304 static LV2_Handle
305 instantiate(const LV2_Descriptor* descriptor,
306 double rate,
307 const char* bundle_path,
308 const LV2_Feature* const* features)
309 {
310
311 GxPluginMono *self = new GxPluginMono();
312 if (!self)
313 {
314 return NULL;
315 }
316
317 const LV2_Options_Option* options = NULL;
318 uint32_t bufsize = 0;
319 printf(" %s\n",descriptor->URI);
320
321 for (int32_t i = 0; features[i]; ++i)
322 {
323 if (!strcmp(features[i]->URI, LV2_URID__map))
324 {
325 self->map = (LV2_URID_Map*)features[i]->data;
326 }
327 else if (!strcmp(features[i]->URI, LV2_WORKER__schedule))
328 {
329 self->schedule = (LV2_Worker_Schedule*)features[i]->data;
330 }
331 else if (!strcmp(features[i]->URI, LV2_OPTIONS__options))
332 {
333 options = (const LV2_Options_Option*)features[i]->data;
334 }
335 }
336 if (!self->schedule)
337 {
338 fprintf(stderr, "Missing feature work:schedule.\n");
339 delete self;
340 return NULL;
341 }
342 if (!self->map)
343 {
344 fprintf(stderr, "Missing feature uri:map.\n");
345 }
346 else if (!options)
347 {
348 fprintf(stderr, "Missing feature options.\n");
349 }
350 else
351 {
352 LV2_URID bufsz_max = self->map->map(self->map->handle, LV2_BUF_SIZE__maxBlockLength);
353 LV2_URID atom_Int = self->map->map(self->map->handle, LV2_ATOM__Int);
354
355 for (const LV2_Options_Option* o = options; o->key; ++o)
356 {
357 if (o->context == LV2_OPTIONS_INSTANCE &&
358 o->key == bufsz_max &&
359 o->type == atom_Int)
360 {
361 bufsize = *(const int32_t*)o->value;
362 }
363 }
364
365 if (bufsize == 0)
366 {
367 fprintf(stderr, "No maximum buffer size given.\n");
368 }
369 printf("using block size: %d\n", bufsize);
370 }
371
372
373 /* Map URIs and initialise forge */
374 map_preamp_uris(self->map, &self->uris);
375 lv2_atom_forge_init(&self->forge, self->map);
376
377
378 self->init_dsp_mono((uint32_t)rate, bufsize);
379
380 return (LV2_Handle)self;
381 }
382
383 static void
384 connect_port(LV2_Handle instance,
385 uint32_t port,
386 void* data)
387 {
388 GxPluginMono* self = (GxPluginMono*)instance;
389 self->connect_all_mono_ports(port, data);
390
391 }
392
393 static void
394 activate(LV2_Handle instance)
395 {
396
397 }
398
399 static void
400 run(LV2_Handle instance, uint32_t n_samples)
401 {
402 GxPluginMono* self = (GxPluginMono*)instance;
403
404 //const uint32_t notify_capacity = self->notify_port->atom.size;
405 // Seems to be 8 assume that is bytes
406 // fprintf(stderr, "Notify Capacity = %d\n", notify_capacity );
407 // fprintf(stderr, "Size of float = %lu\n", sizeof( float ) );
408
409 //lv2_atom_forge_set_buffer(&self->forge,(uint8_t*)self->notify_port, notify_capacity);
410 /* Start a sequence in the notify output port. */
411 // lv2_atom_forge_sequence_head(&self->forge, &self->notify_frame, 0);
412 /* Now write the value to the port */
413 //LV2_Atom* msg = (LV2_Atom*)lv2_atom_forge_blank(
414 // &self->forge, &self->notify_frame, 1, self->uris.eg_Maxlevel );
415 // lv2_atom_forge_resource(&self->forge, &self->notify_frame, 1, self->uris.eg_Maxlevel);
416 // Now get core dump so mamybe buffer too small
417 //lv2_atom_forge_property_head(&self->forge, self->uris.eg_maxlevel, 0);
418 //lv2_atom_forge_float( &self->forge, self->maxlevels_[0] ) ;
419 self->run_dsp_mono(n_samples);
420 }
421
422 static void
423 deactivate(LV2_Handle instance)
424 {
425
426 }
427
428 static void
429 cleanup(LV2_Handle instance)
430 {
431 GxPluginMono* self = (GxPluginMono*)instance;
432 delete self;
433 }
434
435 //////////////////////////////////////////////////////////////////
436
437 const void*
438 extension_data(const char* uri)
439 {
440 static const LV2_Worker_Interface worker = { work, work_response, NULL };
441 if (!strcmp(uri, LV2_WORKER__interface))
442 {
443 return &worker;
444 }
445 return NULL;
446 }
447
448 static const LV2_Descriptor descriptor =
449 {
450 GXPLUGIN_URI "#preampmono",
451 instantiate,
452 connect_port,
453 activate,
454 run,
455 deactivate,
456 cleanup,
457 extension_data
458 };
459
460 extern "C"
461 LV2_SYMBOL_EXPORT
462 const LV2_Descriptor*
463 lv2_descriptor(uint32_t index)
464 {
465 switch (index)
466 {
467 case 0:
468 return &descriptor;
469 default:
470 return NULL;
471 }
472 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXPREAMP_H_
22 #define SRC_HEADERS_GXPREAMP_H_
23
24
25 #include <lv2.h>
26 #include "lv2/lv2plug.in/ns/lv2core/lv2.h"
27 #include "lv2/lv2plug.in/ns/ext/atom/forge.h"
28 #include "lv2/lv2plug.in/ns/ext/atom/util.h"
29 #include "lv2/lv2plug.in/ns/ext/log/log.h"
30 #include "lv2/lv2plug.in/ns/ext/patch/patch.h"
31 #include "lv2/lv2plug.in/ns/ext/state/state.h"
32 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
33 #include <lv2/lv2plug.in/ns/ext/options/options.h>
34 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
35 #include <lv2/lv2plug.in/ns/ext/log/log.h>
36 #include <lv2/lv2plug.in/ns/ext/worker/worker.h>
37 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
38
39 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxpreamp"
40 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxpreamp#gui"
41
42 #include "fastlog.h"
43
44 typedef enum
45 {
46 OUTPUT_LEVEL = 0,
47 DRIVE,
48 INPUT_LEVEL,
49 RESONANCE,
50 PRESENCE,
51 FEEDBACK,
52 MAXLEVEL,
53 AMP_OUTPUT,
54 AMP_INPUT,
55 AMP_OUTPUT1,
56 AMP_INPUT1
57 } PortIndex;
58
59 // URIS for VUMeter
60 #define GXPLUGIN__Maxlevel GXPLUGIN_URI"#Maxlevel"
61 #define GXPLUGIN__maxlevel GXPLUGIN_URI"#maxlevel"
62 typedef struct {
63 LV2_URID eg_Maxlevel;
64 LV2_URID eg_maxlevel;
65 } PreampURIs;
66
67 static inline void
68 map_preamp_uris(LV2_URID_Map* map, PreampURIs* uris)
69 {
70 uris->eg_Maxlevel = map->map(map->handle, GXPLUGIN__Maxlevel);
71 uris->eg_maxlevel = map->map(map->handle, GXPLUGIN__maxlevel);
72 }
73 #endif //SRC_HEADERS_GXPREAMP_H_
0 #
1 # Copyright (C) 2013 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
26 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
27 @prefix urid: <http://lv2plug.in/ns/ext/urid#> .
28 @prefix opt: <http://lv2plug.in/ns/ext/options#> .
29 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
30 @prefix work: <http://lv2plug.in/ns/ext/worker#> .
31
32 <http://guitarix.sourceforge.net#me>
33 a foaf:Person ;
34 foaf:name "Guitarix team" ;
35 foaf:mbox <mailto:brummer@web.de> ;
36 rdfs:seeAlso <http://guitarix.sourceforge.net> .
37
38 <http://guitarix.sourceforge.net/plugins/gxamp>
39 a doap:Project ;
40 doap:maintainer <http://guitarix.sourceforge.net#me> ;
41 doap:name "GxPreAmplifier" .
42
43 <http://guitarix.sourceforge.net/plugins/gxpreamp#preampmono>
44 a lv2:Plugin ,
45 lv2:AmplifierPlugin ;
46 doap:maintainer <http://guitarix.sourceforge.net#me> ;
47 doap:name "GxPreAmplifier Mono";
48 doap:license <http://opensource.org/licenses/isc> ;
49 lv2:project <http://guitarix.sourceforge.net/plugins/gxpreamp> ;
50 lv2:optionalFeature lv2:hardRTCapable ;
51 lv2:requiredFeature urid:map ,
52 bufsz:boundedBlockLength ,
53 work:schedule ;
54 bufsz:minBlockLength 64 ;
55 bufsz:maxBlockLength 8192 ;
56 lv2:extensionData work:interface ;
57
58 guiext:ui <http://guitarix.sourceforge.net/plugins/gxpreamp#gui>;
59
60 lv2:port [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 0 ;
64 lv2:symbol "fslider0_" ;
65 lv2:name "Output";
66 lv2:default -0.0 ;
67 lv2:minimum -20.0 ;
68 lv2:maximum 20.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 1 ;
73 lv2:symbol "fslider1_" ;
74 lv2:name "Drive";
75 lv2:default 0.0 ;
76 lv2:minimum -12.0 ;
77 lv2:maximum 12.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 2 ;
82 lv2:symbol "fslider2_" ;
83 lv2:name "Input";
84 lv2:default -0.0 ;
85 lv2:minimum -20 ;
86 lv2:maximum 20 ;
87 ] , [
88 a lv2:InputPort ,
89 lv2:ControlPort ;
90 lv2:index 3 ;
91 lv2:symbol "fslider3_" ;
92 lv2:name "Resonance";
93 lv2:default 0.0 ;
94 lv2:minimum 0.0 ;
95 lv2:maximum 10.0 ;
96 ] ,
97 [
98 a lv2:InputPort ,
99 lv2:ControlPort ;
100 lv2:index 4 ;
101 lv2:symbol "fslider4_" ;
102 lv2:name "Presence";
103 lv2:default 0.0 ;
104 lv2:minimum 10.0 ;
105 lv2:maximum 0.01 ;
106 ] ,
107 [
108 a lv2:InputPort ,
109 lv2:ControlPort ;
110 lv2:index 5 ;
111 lv2:symbol "fslider5_" ;
112 lv2:name "Feedback";
113 lv2:default -3.0 ;
114 lv2:minimum -75.0 ;
115 lv2:maximum -3.0 ;
116 ], [
117 a lv2:OutputPort ,
118 lv2:ControlPort;
119 lv2:index 6 ;
120 lv2:symbol "notify" ;
121 lv2:name "Notify"
122 ] , [
123 a lv2:AudioPort ,
124 lv2:OutputPort ;
125 lv2:index 7 ;
126 lv2:symbol "out" ;
127 lv2:name "Out" ;
128 ] , [
129 a lv2:AudioPort ,
130 lv2:InputPort ;
131 lv2:index 8 ;
132 lv2:symbol "in" ;
133 lv2:name "In" ;
134 ] .
135
136 <http://guitarix.sourceforge.net/plugins/gxpreamp#gui>
137 a guiext:GtkUI;
138 guiext:binary <gxpreamp_gui.so>;
139 guiext:requiredFeature guiext:makeResident;
140 lv2:extensionData work:interface ;
141 guiext:portNotification [
142 guiext:plugin <http://guitarix.sourceforge.net/plugins/gxpreamp#preampmono>;
143 lv2:symbol "notify" ;
144 guiext:notifyType atom:Blank
145 ].
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxpreamp.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GXPluginGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GXPluginGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(GXPluginGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GXPluginGUI () {};
56 ~GXPluginGUI () {};
57 } ;
58
59 void GXPluginGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n"
68 " stock['smallknob'] = {{'";
69 addKnob += knob;
70 addKnob += "-small.png'}}\n"
71 " stock['smallknobr'] = {{'";
72 addKnob += knob;
73 addKnob += "-middle.png'}}\n";
74 addKnob += " }\n"
75 "widget '*.";
76 addKnob += plug_name;
77 addKnob += "' style 'gx_";
78 addKnob += plug_name;
79 addKnob += "_dark_skin_icons' ";
80
81 }
82
83 void GXPluginGUI::set_skin()
84 {
85 Glib::ustring toparse = "pixmap_path ";
86 toparse += " '";
87 toparse += GX_LV2_STYLE_DIR;
88 toparse += "/'\n";
89 toparse += "style \"gx_";
90 toparse += plug_name;
91 toparse += "_dark-paintbox\"\n"
92 " { \n"
93 " GxPaintBox::icon-set =9\n"
94 " stock['amp_skin'] = {{'";
95 toparse += plugskin;
96 toparse += "'}}\n"
97 " }\n"
98 "\n"
99 "style 'gx_head_black_box' \n"
100 " { \n"
101 " fg[NORMAL] = '#dddddd' \n"
102 " }\n";
103 toparse += addKnob;
104
105 toparse += " widget '*.amplabel' style:highest 'gx_head_black_box'\n"
106 "widget '*.";
107 toparse += plug_name;
108 toparse += "' style 'gx_";
109 toparse += plug_name;
110 toparse += "_dark-paintbox' ";
111
112 //fprintf(stderr, "%s\n",toparse.c_str() ) ;
113 gtk_rc_parse_string (toparse.c_str());
114 }
115
116 void GXPluginGUI::set_plug_name( const char * plugin_uri)
117 {
118 addKnob = "";
119
120 if (strcmp("http://guitarix.sourceforge.net/plugins/gxpreamp#preampmono", plugin_uri) == 0)
121 {
122 plugskin = "preampmono.png";
123 plug_name = "preampmono";
124 set_knob("preamp-knob");
125 }
126 else if (strcmp("http://guitarix.sourceforge.net/plugins/gxpreamp#preampstereo", plugin_uri) == 0)
127 {
128 plugskin = "preampstereo.png";
129 plug_name = "preampstereo";
130 set_knob("preamp-knob");
131 }
132 else
133 {
134 plugskin = "preampmono.png";
135 plug_name = "preampmono";
136 set_knob("black-knob");
137 }
138 }
139
140 GtkWidget* GXPluginGUI::make_gui()
141 {
142 // init the gxwmm library
143 Gxw::init();
144 set_skin();
145 GtkWidget* container = gtk_vbox_new(FALSE, 2);
146 widget = new Widget(plug_name);
147 GtkWidget* cWidget = (GtkWidget*)widget->gobj();
148 gtk_container_add( (GtkContainer*)container, cWidget );
149
150 return container;
151 }
152
153
154 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
155 const char * plugin_uri,
156 const char * bundle_path,
157 LV2UI_Write_Function write_function,
158 LV2UI_Controller controller,
159 LV2UI_Widget * widget,
160 const LV2_Feature * const * features)
161 {
162 GXPluginGUI* self = new GXPluginGUI();
163 if (self == NULL) return NULL;
164 self->set_plug_name_static(self, plugin_uri);
165 *widget = (LV2UI_Widget)self->make_gui_static(self);
166 self->widget->controller = controller;
167 self->widget->write_function = write_function;
168 return (LV2UI_Handle)self;
169 }
170
171 static void cleanup(LV2UI_Handle ui)
172 {
173 GXPluginGUI *pluginGui = (GXPluginGUI *) ui;
174 delete pluginGui->widget;
175 delete pluginGui;
176 }
177
178 static void port_event(LV2UI_Handle ui,
179 uint32_t port_index,
180 uint32_t buffer_size,
181 uint32_t format,
182 const void * buffer)
183 {
184 GXPluginGUI *self = (GXPluginGUI *) ui;
185
186 //fprintf(stderr, "Port Index %u\n",port_index ) ;
187 //fprintf(stderr, "Buffer Size %u\n",buffer_size ) ;
188 //fprintf(stderr, "Format %u\n",format ) ;
189 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
190 return;
191 }
192
193 static LV2UI_Descriptor descriptors[] =
194 {
195 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
196 };
197
198 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
199 {
200 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
201 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
202 {
203 return NULL;
204 }
205 return descriptors + index;
206 }
207
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxpreamp#preampmono>
23 a lv2:Plugin ;
24 lv2:binary <gxpreamp.so> ;
25 rdfs:seeAlso <gxpreamp.ttl> .
26
27
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxpreamp#preampmono>
23 a lv2:Plugin ;
24 lv2:binary <gxpreamp@LIB_EXT@> ;
25 rdfs:seeAlso <gxpreamp.ttl> .
26
27
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24 Widget::Widget(Glib::ustring plug_name)
25 {
26
27
28 // set propertys for the main paintbox holding the skin
29 m_paintbox.set_border_width(0);
30 m_paintbox.set_spacing(0);
31 m_paintbox.set_homogeneous(false);
32 m_paintbox.set_name(plug_name);
33 m_paintbox.property_paint_func() = "amp_skin_expose";
34 add(m_paintbox);
35 // box for the controllers
36 m_hbox_.set_spacing(20);
37 m_hbox_.set_homogeneous(false);
38 // this box set space for the upper part of the skin
39 m_hbox1_.set_spacing(32);
40 m_hbox1_.set_border_width(12);
41 make_logo( &m_vbox6, "preamp-guitarix-label" ) ;
42 make_logo( &m_vbox7, "preamp-redeye-label" ) ;
43 m_hbox1_.pack_start(m_vbox6);
44 m_hbox1_.pack_start(m_vbox7);
45
46 // set a vertical box in the paintbox
47 m_paintbox.pack_start(m_vbox_);
48 // and put space box on top
49 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING);
50 // and controller box on bottem
51 m_vbox_.pack_start(m_hbox_,Gtk::PACK_SHRINK);
52
53 // create all controllers
54 make_controller_box(&m_vbox, &m_bigknob, "output", -20, 20, 0.1, output_level, plug_name);
55 m_bigknob.signal_value_changed().connect(sigc::mem_fun(*this,
56 &Widget::on_knob_value_changed));
57
58
59 make_controller_box(&m_vbox1, &m_bigknob1, "drive", -12, 12, 0.1, drive, plug_name);
60 m_bigknob1.signal_value_changed().connect(sigc::mem_fun(*this,
61 &Widget::on_knob1_value_changed));
62
63 make_controller_box(&m_vbox2, &m_bigknob2, "input", -20, 20, 0.1, input_level, plug_name);
64 m_bigknob2.signal_value_changed().connect(sigc::mem_fun(*this,
65 &Widget::on_knob2_value_changed));
66
67 make_controller_box(&m_vbox3, &m_bigknob3, "resonance", 0, 10, 0.1, resonance, plug_name);
68 m_bigknob3.signal_value_changed().connect(sigc::mem_fun(*this,
69 &Widget::on_knob3_value_changed));
70
71 make_controller_box(&m_vbox4, &m_bigknob4, "presence", 0, 10, 0.1, presence, plug_name);
72 m_bigknob4.signal_value_changed().connect(sigc::mem_fun(*this,
73 &Widget::on_knob4_value_changed));
74
75 make_controller_box(&m_vbox5, &m_bigknob5, "feedback", -75, -3, 0.1, feedback, plug_name);
76 m_bigknob5.signal_value_changed().connect(sigc::mem_fun(*this,
77 &Widget::on_knob5_value_changed));
78
79 // put boxed controllers into controller box
80 m_hbox_.pack_start(m_vboxhh);
81
82 m_hbox_.pack_start(m_vbox2);
83 m_hbox_.pack_start(m_vbox1);
84 m_hbox_.pack_start(m_vbox3);
85 m_hbox_.pack_start(m_vbox4);
86
87 // Feedback level depends on valves it seems - hide and set default value
88 // m_hbox_.pack_start(m_vbox5);
89
90 feedback = -3.0 ;
91
92 m_hbox_.pack_start(m_vbox);
93 m_hbox_.pack_start(m_vboxii);
94
95 // connect expose handler as resize handler
96 m_paintbox.signal_expose_event().connect(
97 sigc::mem_fun(this, &Widget::_expose_event), true);
98
99 show_all();
100 }
101
102 Widget::~Widget()
103 {
104
105 }
106 // create stackboxes with controllers from gxw
107 void Widget::make_controller_box(Gtk::VBox *box,
108 Gxw::Regler *regler,
109 Glib::ustring label,
110 float min, float max,
111 float digits, float value,
112 Glib::ustring plug_name)
113 {
114 /* Gtk::Label* pr = new Gtk::Label(label, 0);
115 pr->set_name("amplabel");
116 */
117 Glib::ustring label_image = GX_LV2_STYLE_DIR;
118 label_image += "/preamp-";
119 label_image += label;
120 label_image += "-label.png";
121 Gtk::Image *pr = new Gtk::Image(label_image);
122
123 Gtk::VBox* b1 = new Gtk::VBox();
124 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
125 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
126 regler->cp_configure("KNOB", label, min, max, digits);
127 regler->set_show_value(false);
128 regler->cp_set_value(value);
129 regler->set_name(plug_name);
130 box->pack_start(*regler,Gtk::PACK_SHRINK);
131 Gtk::VBox* b2 = new Gtk::VBox();
132 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
133 }
134
135 // Create the Text Labels For Amp
136 void Widget::make_logo(Gtk::VBox *box,Glib::ustring label)
137 {
138 Glib::ustring label_image = GX_LV2_STYLE_DIR;
139 label_image += "/";
140 label_image += label;
141 label_image += ".png";
142 Gtk::Image *pr = new Gtk::Image(label_image);
143 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
144 }
145
146 // set borderwith for paintbox when widget resize
147 // to hold controllers in place
148 bool Widget::_expose_event(GdkEventExpose *event)
149 {
150 int x, y, width, height, depth;
151 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
152 //double_t height = m_paintbox.get_window()->get_height();
153 m_paintbox.set_border_width(height/10);
154 return false;
155 }
156 // receive controller value changes from host
157 void Widget::set_value(uint32_t port_index,
158 uint32_t format,
159 const void * buffer)
160 {
161 if ( format == 0 )
162 {
163 float value = *(float *)buffer;
164 switch ((PortIndex)port_index )
165 {
166 case OUTPUT_LEVEL:
167 output_level = value;
168 m_bigknob.cp_set_value(output_level);
169 break;
170 case DRIVE:
171 drive = value;
172 m_bigknob1.cp_set_value(drive);
173 break;
174 case INPUT_LEVEL:
175 input_level = value;
176 m_bigknob2.cp_set_value(input_level);
177 break;
178 case RESONANCE:
179 resonance = value;
180 m_bigknob3.cp_set_value(resonance);
181 break;
182 case PRESENCE:
183 presence = value;
184 m_bigknob4.cp_set_value(presence);
185 break;
186 case FEEDBACK:
187 feedback = value;
188 m_bigknob5.cp_set_value(feedback);
189 break;
190 case MAXLEVEL :
191 fprintf(stderr, "MAXLEVEL MESSAGE THROUGH %f\n", value ) ;
192 break;
193 default:
194 break;
195 }
196 }
197 }
198 // write value changes to the host->engine
199 void Widget::on_knob_value_changed()
200 {
201 output_level = m_bigknob.get_value();
202 //std::cout << "output_level = " << output_level << std::endl;
203 write_function(controller, (PortIndex)OUTPUT_LEVEL,
204 sizeof(float), 0, (const void*)&output_level);
205 }
206
207 void Widget::on_knob1_value_changed()
208 {
209 drive = m_bigknob1.get_value();
210 //std::cout << "drive = " << drive << std::endl;
211 write_function(controller, (PortIndex)DRIVE,
212 sizeof(float), 0, (const void*)&drive);
213 }
214
215 void Widget::on_knob2_value_changed()
216 {
217 input_level = m_bigknob2.get_value();
218 //std::cout << "input_level = " << input_level << std::endl;
219 write_function(controller, (PortIndex)INPUT_LEVEL,
220 sizeof(float), 0, (const void*)&input_level);
221 }
222
223
224 void Widget::on_knob3_value_changed()
225 {
226 resonance = m_bigknob3.get_value();
227 //std::cout << "resonance = " << resonance << std::endl;
228 write_function(controller, (PortIndex)RESONANCE,
229 sizeof(float), 0, (const void*)&resonance);
230 }
231
232 void Widget::on_knob4_value_changed()
233 {
234 presence = m_bigknob4.get_value();
235 //std::cout << "presence = " << presence << std::endl;
236 write_function(controller, (PortIndex)PRESENCE,
237 sizeof(float), 0, (const void*)&presence);
238 }
239 void Widget::on_knob5_value_changed()
240 {
241 feedback = m_bigknob5.get_value();
242 // std::cout << "feedback = " << feedback << std::endl;
243 write_function(controller, (PortIndex)FEEDBACK,
244 sizeof(float), 0, (const void*)&feedback);
245 }
246
0 /*
1 *
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15 * --------------------------------------------------------------------------
16 */
17
18 #pragma once
19
20 #ifndef SRC_HEADERS_WIDGET_H_
21 #define SRC_HEADERS_WIDGET_H_
22
23 #include <gtkmm.h>
24 #include <gxwmm.h>
25 #include "gxpreamp.h"
26 #include "../config.h" // for GX_STYLE_DIR
27 // LV2UI stuff
28 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
29
30 class Widget : public Gtk::HBox
31 {
32 private:
33 void make_controller_box(Gtk::VBox *box,
34 Gxw::Regler *regler,
35 Glib::ustring label,
36 float min, float max,
37 float digits, float value,
38 Glib::ustring plug_name);
39 void make_logo(Gtk::VBox *box,Glib::ustring label) ;
40
41 bool _expose_event(GdkEventExpose *event);
42 void set_value(uint32_t port_index,
43 uint32_t format,
44 const void * buffer);
45 public:
46
47 // public Lv2 communication stuff
48 LV2UI_Controller controller;
49 LV2UI_Write_Function write_function;
50 static void set_value_static(uint32_t port_index,
51 uint32_t buffer_size,
52 uint32_t format,
53 const void * buffer, Widget *self)
54 {
55 self->set_value(port_index,format,buffer);
56 }
57
58 Widget(Glib::ustring plug_name);
59 ~Widget();
60
61 protected:
62 Gtk::VBox m_vbox_;
63 Gtk::HBox m_hbox_;
64 Gtk::HBox m_hbox1_;
65 Gtk::VBox m_vbox;
66 Gtk::VBox m_vbox1;
67 Gtk::VBox m_vbox2;
68 Gtk::VBox m_vbox3;
69 Gtk::VBox m_vbox4;
70 Gtk::VBox m_vbox5;
71 Gtk::VBox m_vbox6;
72 Gtk::VBox m_vbox7;
73 Gtk::VBox m_vbox8;
74 Gtk::VBox m_vboxhh;
75 Gtk::VBox m_vboxii;
76
77 Gxw::PaintBox m_paintbox;
78 Gtk::HBox m_hbox;
79 Gxw::BigKnob m_bigknob; // Output fslider0
80 Gxw::BigKnob m_bigknob1; // Drive fslider1
81 Gxw::BigKnob m_bigknob2; // Input fslider2
82 Gxw::BigKnob m_bigknob3; // Resonance fslider3
83 Gxw::BigKnob m_bigknob4; // Presence fslider4
84 Gxw::BigKnob m_bigknob5; // Feedback fslider4
85
86 void on_knob_value_changed();
87 void on_knob1_value_changed();
88 void on_knob2_value_changed();
89 void on_knob3_value_changed();
90 void on_knob4_value_changed();
91 void on_knob5_value_changed();
92 // stores port values we're currently at.
93 float output_level;
94 float drive;
95 float input_level;
96 float resonance;
97 float presence;
98 float feedback;
99 float maxlevels ;
100 };
101
102 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxpreamp.lv2'
10
11 src = ['gxpreamp.cpp'
12 ]
13 incl = ['../../','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE','GLIBMM']
18 if bld.env['ZITA_CONVOLVER']:
19 uselib.append('ZITA_CONVOLVER')
20 else:
21 src.append('../../zita-convolver/zita-convolver.cc')
22 incl.append('../../zita-convolver');
23 uselib.append('FFTW3')
24 if bld.env['ZITA_RESAMPLER']:
25 uselib.append('ZITA_RESAMPLER')
26 else:
27 src.append('../../zita-resampler-1.1.0/resampler.cc')
28 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
29 incl.append('../../zita-resampler-1.1.0')
30 cxxflag =[]
31 if not bld.env['OPT'] and bld.env['SSE2']:
32 cxxflag = [ "-msse2", "-mfpmath=sse"]
33 lv2_plugin = bld(
34 features='cxx cshlib ',
35 includes = incl,
36 lib = lib,
37 uselib = uselib,
38 obj_ext = '_10.o',
39 cxxflags = cxxflag,
40 defines = ["LV2_SO"],
41 target = 'gxpreamp',
42 source = src,
43 install_path = '${LV2DIR}/%s' % bundle,
44 chmod = 0o755,
45 )
46 lv2_plugin.env['shlib_PATTERN'] = '%s.so'
47
48 uselib_local1 = []
49 libpath1 = []
50 lib1 = []
51 incl = ['../../../libgxwmm','../../../libgxw']
52 if sys.platform.startswith("linux"):
53 lib1.append('dl')
54 if bld.env["GX_LIB_SHARED"]:
55 lib1 += ['gxwmm','gxw']
56 libpath1 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
57 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
58 else:
59 uselib_local1 += ['gxwmm','gxw']
60
61 lv2_plugin_gui = bld(
62 features='cxx cshlib ',
63 includes = incl,
64 lib = lib1,
65 uselib = 'LV2CORE GTKMM',
66 libpath = libpath1,
67 uselib_local = uselib_local1,
68 linkflags = '-Wl,-z,nodelete',
69 defines = ["LV2_GUI"],
70 target = 'gxpreamp_gui',
71 source = 'widget.cpp gxpreamp_gui.cpp',
72 install_path = '${LV2DIR}/%s' % bundle,
73 chmod = 0o755,
74 )
75 lv2_plugin_gui.env['shlib_PATTERN'] = '%s.so'
76
77
78 install_path = '${LV2DIR}/%s' % bundle,
79 bld.install_files('${LV2DIR}/gxpreamp.lv2', 'manifest.ttl')
80 bld.install_files('${LV2DIR}/gxpreamp.lv2', 'gxpreamp.ttl')
81
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxtilttone.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gxtilttone.cc" // dsp class generated by faust -> dsp2cc
26 #ifndef __SSE__
27 #include "noiser.cc"
28 #endif
29
30 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
31
32 class Gxtilttone
33 {
34 private:
35 // internal stuff
36 float* output;
37 float* input;
38 PluginLV2* tilttone;
39 #ifndef __SSE__
40 PluginLV2* wn;
41 #endif
42
43 inline void run_dsp_mono(uint32_t n_samples);
44 inline void connect_mono(uint32_t port,void* data);
45 inline void init_dsp_mono(uint32_t rate);
46 inline void connect_all_mono_ports(uint32_t port, void* data);
47 inline void activate_f();
48 inline void deactivate_f();
49 inline void clean_up();
50 public:
51 // LV2 Descriptor
52 static const LV2_Descriptor descriptor;
53 // static wrapper to private functions
54 static void deactivate(LV2_Handle instance);
55 static void cleanup(LV2_Handle instance);
56 static void run(LV2_Handle instance, uint32_t n_samples);
57 static void activate(LV2_Handle instance);
58 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
59 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
60 double rate, const char* bundle_path,
61 const LV2_Feature* const* features);
62 Gxtilttone();
63 ~Gxtilttone();
64 };
65
66 // constructor
67 Gxtilttone::Gxtilttone() :
68 output(NULL),
69 input(NULL),
70 tilttone(gxtilttone::plugin()) {};
71
72 // destructor
73 Gxtilttone::~Gxtilttone()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (tilttone->activate_plugin !=0)
78 tilttone->activate_plugin(false, tilttone);
79 // delete DSP class
80 tilttone->delete_instance(tilttone);
81 };
82
83 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
84
85 void Gxtilttone::init_dsp_mono(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 #ifndef __SSE__
89 wn = noiser::plugin();
90 wn->set_samplerate(rate, wn);
91 #endif
92 tilttone->set_samplerate(rate, tilttone); // init the DSP class
93 }
94
95 // connect the Ports used by the plug-in class
96 void Gxtilttone::connect_mono(uint32_t port,void* data)
97 {
98 switch ((PortIndex)port)
99 {
100 case EFFECTS_OUTPUT:
101 output = static_cast<float*>(data);
102 break;
103 case EFFECTS_INPUT:
104 input = static_cast<float*>(data);
105 break;
106 default:
107 break;
108 }
109 }
110
111 void Gxtilttone::activate_f()
112 {
113 // allocate the internal DSP mem
114 if (tilttone->activate_plugin !=0)
115 tilttone->activate_plugin(true, tilttone);
116 }
117
118 void Gxtilttone::clean_up()
119 {
120 #ifndef __SSE__
121 wn->delete_instance(wn);;
122 #endif
123 // delete the internal DSP mem
124 if (tilttone->activate_plugin !=0)
125 tilttone->activate_plugin(false, tilttone);
126 }
127
128 void Gxtilttone::deactivate_f()
129 {
130 // delete the internal DSP mem
131 if (tilttone->activate_plugin !=0)
132 tilttone->activate_plugin(false, tilttone);
133 }
134
135 void Gxtilttone::run_dsp_mono(uint32_t n_samples)
136 {
137 #ifndef __SSE__
138 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
139 #endif
140 tilttone->mono_audio(static_cast<int>(n_samples), input,
141 output, tilttone);
142 }
143
144 void Gxtilttone::connect_all_mono_ports(uint32_t port, void* data)
145 {
146 // connect the Ports used by the plug-in class
147 connect_mono(port,data);
148 // connect the Ports used by the DSP class
149 tilttone->connect_ports(port, data, tilttone);
150 }
151
152 ///////////////////////// STATIC CLASS FUNCTIONS /////////////////////
153
154 LV2_Handle
155 Gxtilttone::instantiate(const LV2_Descriptor* descriptor,
156 double rate,
157 const char* bundle_path,
158 const LV2_Feature* const* features)
159 {
160 // init the plug-in class
161 Gxtilttone *self = new Gxtilttone();
162 if (!self)
163 {
164 return NULL;
165 }
166
167 self->init_dsp_mono((uint32_t)rate);
168
169 return (LV2_Handle)self;
170 }
171
172 void Gxtilttone::connect_port(LV2_Handle instance,
173 uint32_t port,
174 void* data)
175 {
176 // connect all ports
177 static_cast<Gxtilttone*>(instance)->connect_all_mono_ports(port, data);
178 }
179
180 void Gxtilttone::activate(LV2_Handle instance)
181 {
182 // allocate needed mem
183 static_cast<Gxtilttone*>(instance)->activate_f();
184 }
185
186 void Gxtilttone::run(LV2_Handle instance, uint32_t n_samples)
187 {
188 // run dsp
189 static_cast<Gxtilttone*>(instance)->run_dsp_mono(n_samples);
190 }
191
192 void Gxtilttone::deactivate(LV2_Handle instance)
193 {
194 // free allocated mem
195 static_cast<Gxtilttone*>(instance)->deactivate_f();
196 }
197
198 void Gxtilttone::cleanup(LV2_Handle instance)
199 {
200 // well, clean up after us
201 Gxtilttone* self = static_cast<Gxtilttone*>(instance);
202 self->clean_up();
203 delete self;
204 }
205
206 const LV2_Descriptor Gxtilttone::descriptor =
207 {
208 GXPLUGIN_URI "#tilttone",
209 instantiate,
210 connect_port,
211 activate,
212 run,
213 deactivate,
214 cleanup,
215 NULL
216 };
217
218 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
219
220 extern "C"
221 LV2_SYMBOL_EXPORT
222 const LV2_Descriptor*
223 lv2_descriptor(uint32_t index)
224 {
225 switch (index)
226 {
227 case 0:
228 return &Gxtilttone::descriptor;
229 default:
230 return NULL;
231 }
232 }
233
234 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxtilttone"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxtilttone#gui"
28
29
30 typedef enum
31 {
32 DRIVE,
33 GAIN,
34 TONE,
35 EFFECTS_OUTPUT,
36 EFFECTS_INPUT,
37 } PortIndex;
38
39 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gxtilttone>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "GxTiltTone" .
37
38 <http://guitarix.sourceforge.net/plugins/gxtilttone#tilttone>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxTiltTone";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gxtilttone> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gxtilttone#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "drive" ;
54 lv2:name "Drive";
55 lv2:default 0.0 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 20.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "gain" ;
63 lv2:name "Gain";
64 lv2:default 0.0 ;
65 lv2:minimum 0.0 ;
66 lv2:maximum 20.0 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "tone" ;
72 lv2:name "Tone";
73 lv2:default 0.5 ;
74 lv2:minimum 0.0 ;
75 lv2:maximum 1.0 ;
76 ] , [
77 a lv2:AudioPort ,
78 lv2:OutputPort ;
79 lv2:index 3 ;
80 lv2:symbol "out" ;
81 lv2:name "Out" ;
82 ] , [
83 a lv2:AudioPort ,
84 lv2:InputPort ;
85 lv2:index 4 ;
86 lv2:symbol "in" ;
87 lv2:name "In"
88 ].
89
90 <http://guitarix.sourceforge.net/plugins/gxtilttone#gui>
91 a guiext:GtkUI;
92 guiext:binary <gxtilttone_gui.so>;
93 guiext:requiredFeature guiext:makeResident .
94
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxtilttone.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GxtilttoneGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GxtilttoneGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(GxtilttoneGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GxtilttoneGUI () {};
56 ~GxtilttoneGUI () {};
57 } ;
58
59 void GxtilttoneGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n";
68 addKnob += " stock['button_on'] = {{'"
69 "echo-switch_on.png'}}\n"
70 " stock['button_off'] = {{'"
71 "echo-switch_off.png'}}\n"
72 " }\n"
73 "widget '*.";
74 addKnob += plug_name;
75 addKnob += "' style 'gx_";
76 addKnob += plug_name;
77 addKnob += "_dark_skin_icons' \n"
78 "class '*GxToggleImage' style'gx_";
79 addKnob += plug_name;
80 addKnob += "_dark_skin_icons' \n";
81 }
82
83 void GxtilttoneGUI::set_skin()
84 {
85 Glib::ustring toparse = "pixmap_path ";
86 toparse += " '";
87 toparse += GX_LV2_STYLE_DIR;
88 toparse += "/'\n";
89 toparse += "style \"gx_";
90 toparse += plug_name;
91 toparse += "_dark-paintbox\"\n"
92 " { \n"
93 "GxPaintBox::skin-gradient = {\n"
94 "{ 65536, 0, 0, 13107, 52428 }, \n"
95 "{ 52428, 0, 0, 0, 52428 },\n"
96 "{ 13107, 0, 0, 13107, 13107 }}\n"
97 " GxPaintBox::icon-set =4\n"
98 " stock['amp_skin'] = {{'";
99 toparse += plugskin;
100 toparse += "'}}\n"
101 " }\n"
102 "\n"
103 "style 'gx_headtilttone_box' \n"
104 " { \n"
105 " fg[NORMAL] = '#9c8233' \n"
106 "font_name = 'sans 10.5' \n"
107 " }\n";
108 toparse += addKnob;
109
110 toparse += " widget '*.amplabel' style:highest 'gx_headtilttone_box'\n"
111 "widget '*.";
112 toparse += plug_name;
113 toparse += "' style 'gx_";
114 toparse += plug_name;
115 toparse += "_dark-paintbox' ";
116 toparse += "style 'gx_switch'\n"
117 "{\n"
118 "xthickness = 0\n"
119 "ythickness = 0\n"
120 "GtkButton::inner-border = {0, 0, 0, 0}\n"
121 "GtkButton::default-border = {0, 0, 0, 0}\n"
122 "GtkButton::focus-line-width = 0\n"
123 "GtkButton::focus-padding = 0\n"
124 "GtkButton::interior-focus = 0\n"
125 "GtkButton::child-displacement-x = 0\n"
126 "GtkButton::child-displacement-y = 0\n"
127 " }\n"
128 "widget '*.";
129 toparse += plug_name;
130 toparse += "' style:highest 'gx_switch'";
131
132 gtk_rc_parse_string (toparse.c_str());
133 }
134
135 void GxtilttoneGUI::set_plug_name( const char * plugin_uri)
136 {
137 addKnob = "";
138
139 if (strcmp("http://guitarix.sourceforge.net/plugins/gxtilttone#tilttone", plugin_uri) == 0)
140 {
141 plugskin = "gxtilttone.png";
142 plug_name = "gxtilttone";
143 set_knob("redeyefx-knob");
144 }
145 else
146 {
147 plugskin = "gxtilttone.png";
148 plug_name = "gxtilttone";
149 }
150 }
151
152 GtkWidget* GxtilttoneGUI::make_gui()
153 {
154 // init the gxwmm library
155 Gxw::init();
156 set_skin();
157 GtkWidget* container = gtk_vbox_new(FALSE, 0);
158 widget = new Widget(plug_name);
159 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
160 gtk_container_add(GTK_CONTAINER(container), cWidget );
161
162 return container;
163 }
164
165
166 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
167 const char * plugin_uri,
168 const char * bundle_path,
169 LV2UI_Write_Function write_function,
170 LV2UI_Controller controller,
171 LV2UI_Widget * widget,
172 const LV2_Feature * const * features)
173 {
174 GxtilttoneGUI* self = new GxtilttoneGUI();
175 if (self == NULL) return NULL;
176 self->set_plug_name_static(self, plugin_uri);
177 *widget = (LV2UI_Widget)self->make_gui_static(self);
178 self->widget->controller = controller;
179 self->widget->write_function = write_function;
180 return (LV2UI_Handle)self;
181 }
182
183 static void cleanup(LV2UI_Handle ui)
184 {
185 GxtilttoneGUI *pluginGui = static_cast<GxtilttoneGUI*>(ui);
186 delete pluginGui->widget;
187 delete pluginGui;
188 }
189
190 static void port_event(LV2UI_Handle ui,
191 uint32_t port_index,
192 uint32_t buffer_size,
193 uint32_t format,
194 const void * buffer)
195 {
196 GxtilttoneGUI *self = static_cast<GxtilttoneGUI*>(ui);
197 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
198 return;
199 }
200
201 static LV2UI_Descriptor descriptors[] =
202 {
203 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
204 };
205
206 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
207 {
208 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
209 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
210 {
211 return NULL;
212 }
213 return descriptors + index;
214 }
215
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtilttone#tilttone>
23 a lv2:Plugin ;
24 lv2:binary <gxtilttone.so> ;
25 rdfs:seeAlso <gxtilttone.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtilttone#tilttone>
23 a lv2:Plugin ;
24 lv2:binary <gxtilttone@LIB_EXT@> ;
25 rdfs:seeAlso <gxtilttone.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
33 {
34 switch ((PortIndex)port_index )
35 {
36 case DRIVE:
37 return &m_bigknob;
38 case GAIN:
39 return &m_bigknob1;
40 case TONE:
41 return &m_bigknob2;
42 default:
43 return NULL;
44 }
45 }
46
47 Widget::Widget(Glib::ustring plugname):
48 plug_name(plugname)
49 {
50 // create controllers for port name
51 make_controller_box(&m_vbox2, "DRIVE", 0, 20.0, 0.1, DRIVE);
52 make_controller_box(&m_vbox3, "GAIN", 0.0, 20.0, 0.1, GAIN);
53 make_controller_box(&m_vbox4, "TONE", 0.0, 1.0, 0.01, TONE);
54
55 // set propertys for the main paintbox holding the skin
56 m_paintbox.set_border_width(0);
57 m_paintbox.set_spacing(0);
58 m_paintbox.set_homogeneous(false);
59 m_paintbox.set_name(plug_name);
60 m_paintbox.property_paint_func() = "amp_skin_expose";
61 m_paintbox.set_size_request( 360, 260 ) ;
62
63 add(m_paintbox);
64
65 // One vertical box to wrap all in
66 m_vbox_.set_spacing(0);
67 m_vbox_.set_border_width(0);
68 m_vbox_.set_homogeneous(false);
69
70 m_paintbox.pack_start(m_vbox_ , Gtk::PACK_EXPAND_PADDING, 0);
71
72 // This is the central controller strip
73 m_hbox1_.set_spacing(16);
74 m_hbox1_.set_border_width(0);
75 m_hbox1_.set_homogeneous(false);
76
77
78 // put boxed controllers into controller box
79 m_vbox2.set_spacing(6);
80 m_vbox3.set_spacing(6);
81 m_vbox4.set_spacing(6);
82
83 m_hbox1_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
84 m_hbox1_.pack_start(m_vbox2);
85 m_hbox1_.pack_start(m_vbox3);
86 m_hbox1_.pack_start(m_vbox4);
87 m_hbox1_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
88
89 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING);
90
91
92 // connect expose handler as resize handler
93 m_paintbox.signal_expose_event().connect(
94 sigc::mem_fun(this, &Widget::_expose_event), true);
95
96 set_app_paintable(true);
97 show_all();
98 }
99
100 Widget::~Widget()
101 {
102
103 }
104
105 // set borderwith for paintbox when widget resize
106 // to hold controllers in place
107 bool Widget::_expose_event(GdkEventExpose *event)
108 {
109 int x, y, width, height, depth;
110 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
111 //double_t height = m_paintbox.get_window()->get_height();
112 m_paintbox.set_border_width(height/10);
113 return false;
114 }
115
116 // create selectors from gxwmm
117 void Widget::make_selector(Glib::ustring labela,
118 Glib::ustring tables[],
119 size_t _size,
120 float min, float digits,
121 PortIndex port_name)
122 {
123 Gxw::Selector *regler = static_cast<Gxw::Selector*>
124 (get_controller_by_port(port_name));
125 if (regler)
126 {
127 float max = static_cast<float>(_size+1);
128
129 Gtk::TreeModelColumn<Glib::ustring> label;
130 Gtk::TreeModelColumnRecord rec;
131 rec.add(label);
132 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
133
134 for (uint32_t i = 0 ; i< _size; ++i) {
135 ls->append()->set_value(0, tables[i]);
136 }
137 regler->set_model(ls);
138 regler->set_has_tooltip();
139 regler->set_tooltip_text(labela);
140 regler->cp_configure("SELECTOR", labela, min, max, digits);
141 regler->set_show_value(false);
142 regler->set_name(plug_name);
143 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
144 *this, &Widget::on_value_changed), port_name));
145 }
146 }
147
148 // create stackboxes with controllers for port name
149 void Widget::make_controller_box(Gtk::Box *box,
150 Glib::ustring label,
151 float min, float max,
152 float digits,
153 PortIndex port_name)
154 {
155 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
156 get_controller_by_port(port_name));
157 if (regler)
158 {
159 Gtk::Label* pr = new Gtk::Label(label, 0);
160 pr->set_name("amplabel");
161 // use label images instead simple string labes
162 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
163 label_image += "/";
164 label_image += label;
165 label_image += "-label.png";
166 Gtk::Image *pr = new Gtk::Image(label_image);*/
167
168 Gtk::VBox* b1 = new Gtk::VBox();
169 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
170 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
171 regler->cp_configure("KNOB", label, min, max, digits);
172 regler->set_show_value(false);
173 regler->set_name(plug_name);
174 box->pack_start(*regler,Gtk::PACK_SHRINK);
175 Gtk::VBox* b2 = new Gtk::VBox();
176 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
177 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
178 *this, &Widget::on_value_changed), port_name));
179 }
180 }
181
182 // create stackboxes with switch controller for port name
183 void Widget::make_switch_box(Gtk::Box *box,
184 Glib::ustring label,
185 Glib::ustring label2,
186 PortIndex port_name)
187 {
188 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
189 get_controller_by_port(port_name));
190 if (regler)
191 {
192 Gtk::Label* pr = new Gtk::Label(label, 0);
193 pr->set_name("amplabel");
194 // use label images instead simple string labes
195 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
196 label_image += "/"+plug_name+"-";
197 label_image += label;
198 label_image += "-label.png";
199 Gtk::Image *pr = new Gtk::Image(label_image);*/
200
201 regler->cp_configure("switch", label, 0, 1, 1);
202 regler->set_can_focus( false ) ;
203
204 regler->set_name(plug_name);
205 regler->set_base_name( "button" );
206 Gtk::VBox* b1 = new Gtk::VBox();
207 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
208 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
209 box->pack_start(*regler,Gtk::PACK_SHRINK);
210
211 // 2nd Label
212 Gtk::Label* pr2 = new Gtk::Label(label2, 0);
213 pr2->set_name("amplabel");
214 box->pack_start( *Gtk::manage(pr2),Gtk::PACK_SHRINK);
215
216 Gtk::VBox* b2 = new Gtk::VBox();
217 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
218 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
219 *this, &Widget::on_value_changed), port_name));
220 }
221 }
222
223 // Create the Text Labels from images For Amp
224 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
225 {
226 Glib::ustring label_image = GX_LV2_STYLE_DIR;
227 label_image += "/";
228 label_image += label;
229 label_image += ".png";
230 Gtk::Image *pr = new Gtk::Image(label_image);
231 pr->set_padding( 0, 0 ) ;
232 pr->set_alignment( Gtk::ALIGN_CENTER , Gtk::ALIGN_CENTER ) ;
233
234 // Gtk::VBox* b1 = new Gtk::VBox();
235 // box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
236 if( start ){
237 // std::cout << "Pack Start "<<label<<std::endl;
238 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
239 }else{
240 // std::cout << "Pack End " << label << std::endl;
241 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
242 }
243
244 // Gtk::VBox* b2 = new Gtk::VBox();
245 // box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
246
247 }
248 // receive controller value changes from host and set them to controller
249 void Widget::set_value(uint32_t port_index,
250 uint32_t format,
251 const void * buffer)
252 {
253 if ( format == 0 )
254 {
255 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
256 get_controller_by_port(port_index));
257 if (regler)
258 {
259 float value = *static_cast<const float*>(buffer);
260 regler->cp_set_value(value);
261 }
262 }
263 }
264
265 // write (UI) controller value changes to the host->engine
266 void Widget::on_value_changed(uint32_t port_index)
267 {
268 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
269 get_controller_by_port(port_index));
270 if (regler)
271 {
272 float value = regler->cp_get_value();
273 write_function(controller, port_index, sizeof(float), 0,
274 static_cast<const void*>(&value));
275 }
276 }
277
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxtilttone.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 Glib::ustring label2,
53 PortIndex port_name);
54 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plugname);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::VBox m_vbox1_;
80 Gtk::VBox m_vbox2_;
81 Gtk::VBox m_vbox3_;
82
83 Gtk::VBox m_vbox;
84 Gtk::VBox m_vbox1;
85 Gtk::VBox m_vbox2;
86 Gtk::VBox m_vbox3;
87 Gtk::VBox m_vbox4;
88 Gtk::VBox m_vbox5;
89 Gtk::VBox m_vbox6;
90 Gtk::VBox m_vbox7;
91 Gtk::HBox m_hbox_;
92 Gtk::HBox m_hbox1_;
93 Gtk::HBox m_hbox2_;
94
95 Gxw::PaintBox m_paintbox;
96 Gxw::BigKnob m_bigknob;
97 Gxw::BigKnob m_bigknob1;
98 Gxw::BigKnob m_bigknob2;
99 Gxw::Switch m_switch;
100 };
101
102 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxtilttone.lv2'
10
11 src = ['gxtilttone.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gxtilttone',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gxtilttone_gui',
59 source = 'widget.cpp gxtilttone_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gxtilttone.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gxtilttone.lv2', 'gxtilttone.ttl')
69
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
2626
2727 <http://guitarix.sourceforge.net#me>
2828 a foaf:Person ;
29 foaf:name "Hermann Meyer" ;
29 foaf:name "Guitarix team" ;
3030 foaf:mbox <mailto:brummer@web.de> ;
3131 rdfs:seeAlso <http://guitarix.sourceforge.net> .
3232
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxts9#ts9sim>
23 a lv2:Plugin ;
24 lv2:binary <gxts9.so> ;
25 rdfs:seeAlso <gxts9.ttl> .
00 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
00 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License as published by
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxtubedelay.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gxtubedelay.cc" // dsp class generated by faust -> dsp2cc
26 #ifndef __SSE__
27 #include "noiser.cc"
28 #endif
29
30 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
31
32 class GxTubeDelay
33 {
34 private:
35 // internal stuff
36 float* output;
37 float* input;
38 PluginLV2* tubedelay;
39 #ifndef __SSE__
40 PluginLV2* wn;
41 #endif
42
43 inline void run_dsp_mono(uint32_t n_samples);
44 inline void connect_mono(uint32_t port,void* data);
45 inline void init_dsp_mono(uint32_t rate);
46 inline void connect_all_mono_ports(uint32_t port, void* data);
47 inline void activate_f();
48 inline void deactivate_f();
49 inline void clean_up();
50 public:
51 // LV2 Descriptor
52 static const LV2_Descriptor descriptor;
53 // static wrapper to private functions
54 static void deactivate(LV2_Handle instance);
55 static void cleanup(LV2_Handle instance);
56 static void run(LV2_Handle instance, uint32_t n_samples);
57 static void activate(LV2_Handle instance);
58 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
59 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
60 double rate, const char* bundle_path,
61 const LV2_Feature* const* features);
62 GxTubeDelay();
63 ~GxTubeDelay();
64 };
65
66 // constructor
67 GxTubeDelay::GxTubeDelay() :
68 output(NULL),
69 input(NULL),
70 tubedelay(gxtubedelay::plugin()) {};
71
72 // destructor
73 GxTubeDelay::~GxTubeDelay()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (tubedelay->activate_plugin !=0)
78 tubedelay->activate_plugin(false, tubedelay);
79 // delete DSP class
80 tubedelay->delete_instance(tubedelay);
81 };
82
83 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
84
85 void GxTubeDelay::init_dsp_mono(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 #ifndef __SSE__
89 wn = noiser::plugin();
90 wn->set_samplerate(rate, wn);
91 #endif
92 tubedelay->set_samplerate(rate, tubedelay); // init the DSP class
93 }
94
95 // connect the Ports used by the plug-in class
96 void GxTubeDelay::connect_mono(uint32_t port,void* data)
97 {
98 switch ((PortIndex)port)
99 {
100 case EFFECTS_OUTPUT:
101 output = static_cast<float*>(data);
102 break;
103 case EFFECTS_INPUT:
104 input = static_cast<float*>(data);
105 break;
106 default:
107 break;
108 }
109 }
110
111 void GxTubeDelay::activate_f()
112 {
113 // allocate the internal DSP mem
114 if (tubedelay->activate_plugin !=0)
115 tubedelay->activate_plugin(true, tubedelay);
116 }
117
118 void GxTubeDelay::clean_up()
119 {
120 #ifndef __SSE__
121 wn->delete_instance(wn);;
122 #endif
123 // delete the internal DSP mem
124 if (tubedelay->activate_plugin !=0)
125 tubedelay->activate_plugin(false, tubedelay);
126 }
127
128 void GxTubeDelay::deactivate_f()
129 {
130 // delete the internal DSP mem
131 if (tubedelay->activate_plugin !=0)
132 tubedelay->activate_plugin(false, tubedelay);
133 }
134
135 void GxTubeDelay::run_dsp_mono(uint32_t n_samples)
136 {
137 #ifndef __SSE__
138 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
139 #endif
140 tubedelay->mono_audio(static_cast<int>(n_samples), input,
141 output, tubedelay);
142 }
143
144 void GxTubeDelay::connect_all_mono_ports(uint32_t port, void* data)
145 {
146 // connect the Ports used by the plug-in class
147 connect_mono(port,data);
148 // connect the Ports used by the DSP class
149 tubedelay->connect_ports(port, data, tubedelay);
150 }
151
152 ///////////////////////// PRIVATE CLASS FUNCTIONS /////////////////////
153
154 LV2_Handle
155 GxTubeDelay::instantiate(const LV2_Descriptor* descriptor,
156 double rate,
157 const char* bundle_path,
158 const LV2_Feature* const* features)
159 {
160 // init the plug-in class
161 GxTubeDelay *self = new GxTubeDelay();
162 if (!self)
163 {
164 return NULL;
165 }
166
167 self->init_dsp_mono((uint32_t)rate);
168
169 return (LV2_Handle)self;
170 }
171
172 void GxTubeDelay::connect_port(LV2_Handle instance,
173 uint32_t port,
174 void* data)
175 {
176 // connect all ports
177 static_cast<GxTubeDelay*>(instance)->connect_all_mono_ports(port, data);
178 }
179
180 void GxTubeDelay::activate(LV2_Handle instance)
181 {
182 // allocate needed mem
183 static_cast<GxTubeDelay*>(instance)->activate_f();
184 }
185
186 void GxTubeDelay::run(LV2_Handle instance, uint32_t n_samples)
187 {
188 // run dsp
189 static_cast<GxTubeDelay*>(instance)->run_dsp_mono(n_samples);
190 }
191
192 void GxTubeDelay::deactivate(LV2_Handle instance)
193 {
194 // free allocated mem
195 static_cast<GxTubeDelay*>(instance)->deactivate_f();
196 }
197
198 void GxTubeDelay::cleanup(LV2_Handle instance)
199 {
200 // well, clean up after us
201 GxTubeDelay* self = static_cast<GxTubeDelay*>(instance);
202 self->clean_up();
203 delete self;
204 }
205
206 const LV2_Descriptor GxTubeDelay::descriptor =
207 {
208 GXPLUGIN_URI "#tubedelay",
209 instantiate,
210 connect_port,
211 activate,
212 run,
213 deactivate,
214 cleanup,
215 NULL
216 };
217
218 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
219
220 extern "C"
221 LV2_SYMBOL_EXPORT
222 const LV2_Descriptor*
223 lv2_descriptor(uint32_t index)
224 {
225 switch (index)
226 {
227 case 0:
228 return &GxTubeDelay::descriptor;
229 default:
230 return NULL;
231 }
232 }
233
234 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxtubedelay"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxtubedelay#gui"
28
29
30 typedef enum
31 {
32 GAIN=0,
33 FEEDBACK,
34 DELAY,
35 LEVEL,
36 EFFECTS_OUTPUT,
37 EFFECTS_INPUT,
38 } PortIndex;
39
40 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Hermann Meyer" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gxtubedelay>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "GxRedeyeFx" .
37
38 <http://guitarix.sourceforge.net/plugins/gxtubedelay#tubedelay>
39 a lv2:Plugin ,
40 lv2:DelayPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxTubeDelay";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gxtubedelay> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gxtubedelay#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "fslider0_" ;
54 lv2:name "gain";
55 lv2:default -40.0 ;
56 lv2:minimum -40.0;
57 lv2:maximum 16.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "fslider1_" ;
63 lv2:name "feedback";
64 lv2:default 0.0 ;
65 lv2:minimum 0.0 ;
66 lv2:maximum 10.0 ;
67 ] , [
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "fslider2_" ;
72 lv2:name "delay";
73 lv2:default 0.1 ;
74 lv2:minimum 0.1 ;
75 lv2:maximum 5000.0 ;
76 ] , [
77 a lv2:InputPort ,
78 lv2:ControlPort ;
79 lv2:index 3 ;
80 lv2:symbol "fslider3_" ;
81 lv2:name "level";
82 lv2:default -60.0 ;
83 lv2:minimum -60.0 ;
84 lv2:maximum 0.0 ;
85 ] , [
86 a lv2:AudioPort ,
87 lv2:OutputPort ;
88 lv2:index 4 ;
89 lv2:symbol "out" ;
90 lv2:name "Out"
91 ] , [
92 a lv2:AudioPort ,
93 lv2:InputPort ;
94 lv2:index 5 ;
95 lv2:symbol "in" ;
96 lv2:name "in"
97 ].
98
99 <http://guitarix.sourceforge.net/plugins/gxtubedelay#gui>
100 a guiext:GtkUI;
101 guiext:binary <gxtubedelay_gui.so>;
102 guiext:requiredFeature guiext:makeResident .
103
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxtubedelay.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GxTubeDelayGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GxTubeDelayGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(GxTubeDelayGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GxTubeDelayGUI () {};
56 ~GxTubeDelayGUI () {};
57 } ;
58
59 void GxTubeDelayGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n }\n"
68 "widget '*.";
69 addKnob += plug_name;
70 addKnob += "' style 'gx_";
71 addKnob += plug_name;
72 addKnob += "_dark_skin_icons' ";
73 }
74
75 void GxTubeDelayGUI::set_skin()
76 {
77 Glib::ustring toparse = "pixmap_path ";
78 toparse += " '";
79 toparse += GX_LV2_STYLE_DIR;
80 toparse += "/'\n";
81 toparse += "style \"gx_";
82 toparse += plug_name;
83 toparse += "_dark-paintbox\"\n"
84 " { \n"
85 "GxPaintBox::skin-gradient = {\n"
86 "{ 65536, 0, 0, 13107, 52428 }, \n"
87 "{ 52428, 0, 0, 0, 52428 },\n"
88 "{ 13107, 0, 0, 13107, 13107 }}\n"
89 " GxPaintBox::icon-set =7\n"
90 " stock['amp_skin'] = {{'";
91 toparse += plugskin;
92 toparse += "'}}\n"
93 " }\n"
94 "\n"
95 "style 'gx_head_tubedelay_box' \n"
96 " { \n"
97 " fg[NORMAL] = '#97823f' \n"
98 " }\n";
99 toparse += addKnob;
100
101 toparse += " widget '*.amplabel' style:highest 'gx_head_tubedelay_box'\n"
102 "widget '*.";
103 toparse += plug_name;
104 toparse += "' style 'gx_";
105 toparse += plug_name;
106 toparse += "_dark-paintbox' ";
107 //std::cout << "style = " << toparse.c_str() << std::endl;
108 gtk_rc_parse_string (toparse.c_str());
109 }
110
111 void GxTubeDelayGUI::set_plug_name( const char * plugin_uri)
112 {
113 addKnob = "";
114
115 if (strcmp("http://guitarix.sourceforge.net/plugins/gxtubedelay#tubedelay", plugin_uri) == 0)
116 {
117 plugskin = "tubedelay.png";
118 plug_name = "tubedelay";
119 set_knob("tubedelay-knob");
120 }
121 else
122 {
123 plugskin = "tubedelay.png";
124 plug_name = "tubedelay";
125 }
126 }
127
128 GtkWidget* GxTubeDelayGUI::make_gui()
129 {
130 // init the gxwmm library
131 Gxw::init();
132 set_skin();
133 GtkWidget* container = gtk_vbox_new(FALSE, 2);
134 widget = new Widget(plug_name);
135 GtkWidget* cWidget = (GtkWidget*)widget->gobj();
136 gtk_container_add( (GtkContainer*)container, cWidget );
137
138 return container;
139 }
140
141
142 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
143 const char * plugin_uri,
144 const char * bundle_path,
145 LV2UI_Write_Function write_function,
146 LV2UI_Controller controller,
147 LV2UI_Widget * widget,
148 const LV2_Feature * const * features)
149 {
150 GxTubeDelayGUI* self = new GxTubeDelayGUI();
151 if (self == NULL) return NULL;
152 self->set_plug_name_static(self, plugin_uri);
153 *widget = (LV2UI_Widget)self->make_gui_static(self);
154 self->widget->controller = controller;
155 self->widget->write_function = write_function;
156 return (LV2UI_Handle)self;
157 }
158
159 static void cleanup(LV2UI_Handle ui)
160 {
161 GxTubeDelayGUI *pluginGui = (GxTubeDelayGUI *) ui;
162 delete pluginGui->widget;
163 delete pluginGui;
164 }
165
166 static void port_event(LV2UI_Handle ui,
167 uint32_t port_index,
168 uint32_t buffer_size,
169 uint32_t format,
170 const void * buffer)
171 {
172 GxTubeDelayGUI *self = (GxTubeDelayGUI *) ui;
173
174 // std::cout << "port event = " << port_index << std::endl;
175 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
176 return;
177 }
178
179 static LV2UI_Descriptor descriptors[] =
180 {
181 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
182 };
183
184 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
185 {
186 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
187 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
188 {
189 return NULL;
190 }
191 return descriptors + index;
192 }
193
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtubedelay#tubedelay>
23 a lv2:Plugin ;
24 lv2:binary <gxtubedelay.so> ;
25 rdfs:seeAlso <gxtubedelay.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtubedelay#tubedelay>
23 a lv2:Plugin ;
24 lv2:binary <gxtubedelay@LIB_EXT@> ;
25 rdfs:seeAlso <gxtubedelay.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24 Widget::Widget(Glib::ustring plug_name)
25 {
26 // set propertys for the main paintbox holding the skin
27 m_paintbox.set_border_width(20);
28 m_paintbox.set_spacing(0);
29 m_paintbox.set_homogeneous(false);
30 m_paintbox.set_name(plug_name);
31 m_paintbox.set_size_request(480,260);
32 m_paintbox.property_paint_func() = "amp_skin_expose";
33 add(m_paintbox);
34
35 // box for the controllers
36 m_hbox1_.set_spacing(0);
37 m_hbox1_.set_border_width(0);
38 m_hbox1_.set_homogeneous(false);
39 m_hbox1_.set_size_request(340,30);
40
41 // box for the controllers
42 m_hbox_.set_spacing(10);
43 m_hbox_.set_border_width(40);
44 m_hbox_.set_homogeneous(false);
45 // set a vertical box in the paintbox
46 m_paintbox.pack_start(m_vbox_);
47 // spacer
48 m_vbox_.pack_start(m_hbox1_,Gtk::PACK_SHRINK);
49 // and controller box on top
50 m_vbox_.pack_start(m_hbox_,Gtk::PACK_SHRINK);
51
52 // create all controllers
53 make_controller_box(&m_vbox, &m_bigknob, "delay", 0.1, 5000, 0, gain, plug_name);
54 m_bigknob.signal_value_changed().connect(sigc::mem_fun(*this,
55 &Widget::on_knob_value_changed));
56
57 make_controller_box(&m_vbox1, &m_bigknob1, "feedback", 0, 10, 1, feedback, plug_name);
58 m_bigknob1.signal_value_changed().connect(sigc::mem_fun(*this,
59 &Widget::on_knob1_value_changed));
60
61 make_controller_box(&m_vbox2, &m_bigknob2, "level", 0, 10, 0.1, level, plug_name);
62 m_bigknob2.signal_value_changed().connect(sigc::mem_fun(*this,
63 &Widget::on_knob2_value_changed));
64
65
66 make_controller_box(&m_vbox3, &m_bigknob3, "gain", -40, 16, 0.1, gain, plug_name);
67 m_bigknob3.signal_value_changed().connect(sigc::mem_fun(*this,
68 &Widget::on_knob3_value_changed));
69
70 // put boxed controllers into controller box
71 m_hbox_.pack_start(m_vbox);
72 m_hbox_.pack_start(m_vbox1);
73 m_hbox_.pack_start(m_vbox2);
74 m_hbox_.pack_start(m_vbox3);
75
76
77 // connect expose handler as resize handler
78 m_paintbox.signal_expose_event().connect(
79 sigc::mem_fun(this, &Widget::_expose_event), true);
80
81 set_app_paintable(true);
82 show_all();
83 }
84
85 Widget::~Widget()
86 {
87
88 }
89 // create stackboxes with controllers from gxw
90 void Widget::make_controller_box(Gtk::VBox *box,
91 Gxw::Regler *regler,
92 Glib::ustring label,
93 float min, float max,
94 float digits, float value,
95 Glib::ustring plug_name)
96 {
97 Gtk::Label* pr = new Gtk::Label(label, 0);
98 pr->set_name("amplabel");
99 /*Glib::ustring label_image = GX_STYLE_DIR;
100 label_image += "/";
101 label_image += label;
102 label_image += "-label.png";
103 Gtk::Image *pr = new Gtk::Image(label_image);*/
104
105 Gtk::VBox* b1 = new Gtk::VBox();
106 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
107 //box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
108 regler->cp_configure("KNOB", label, min, max, digits);
109 regler->set_show_value(false);
110 regler->cp_set_value(value);
111 regler->set_name(plug_name);
112 box->pack_start(*regler,Gtk::PACK_SHRINK);
113 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
114 Gtk::VBox* b2 = new Gtk::VBox();
115 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
116 }
117 // set borderwith for paintbox when widget resize
118 // to hold controllers in place
119 bool Widget::_expose_event(GdkEventExpose *event)
120 {
121 int x, y, width, height, depth;
122 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
123 //double_t height = m_paintbox.get_window()->get_height();
124 m_paintbox.set_border_width(height/20);
125 return false;
126 }
127 // receive controller value changes from host
128 void Widget::set_value(uint32_t port_index,
129 uint32_t format,
130 const void * buffer)
131 {
132 if ( format == 0 )
133 {
134 float value = *(float *)buffer;
135 switch ((PortIndex)port_index )
136 {
137 case DELAY:
138 delay = value;
139 m_bigknob.cp_set_value(delay);
140 break;
141 case FEEDBACK:
142 feedback = value;
143 m_bigknob1.cp_set_value(feedback);
144 break;
145 case LEVEL:
146 level = value;
147 m_bigknob2.cp_set_value(level);
148 break;
149 case GAIN:
150 gain = value;
151 m_bigknob3.cp_set_value(gain);
152 break;
153 default:
154 break;
155 }
156 }
157 }
158 // write value changes to the host->engine
159 void Widget::on_knob_value_changed()
160 {
161 delay = m_bigknob.get_value();
162 // std::cout << "delay = " << delay << std::endl;
163 write_function(controller, (PortIndex)DELAY,
164 sizeof(float), 0, (const void*)&delay);
165 }
166
167 void Widget::on_knob1_value_changed()
168 {
169 feedback = m_bigknob1.get_value();
170 // std::cout << "feedback = " << feedback << std::endl;
171 write_function(controller, (PortIndex)FEEDBACK,
172 sizeof(float), 0, (const void*)&feedback);
173 }
174 void Widget::on_knob2_value_changed()
175 {
176 level = m_bigknob2.get_value();
177 // std::cout << "level = " << level << std::endl;
178 write_function(controller, (PortIndex)LEVEL,
179 sizeof(float), 0, (const void*)&level);
180 }
181 void Widget::on_knob3_value_changed()
182 {
183 gain = m_bigknob3.get_value();
184 // std::cout << "gain = " << gain << std::endl;
185 write_function(controller, (PortIndex)GAIN,
186 sizeof(float), 0, (const void*)&gain);
187 }
188
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxtubedelay.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 void make_controller_box(Gtk::VBox *box,
35 Gxw::Regler *regler,
36 Glib::ustring label,
37 float min, float max,
38 float digits, float value,
39 Glib::ustring plug_name);
40 bool _expose_event(GdkEventExpose *event);
41 void set_value(uint32_t port_index,
42 uint32_t format,
43 const void * buffer);
44 public:
45
46 // public Lv2 communication stuff
47 LV2UI_Controller controller;
48 LV2UI_Write_Function write_function;
49 static void set_value_static(uint32_t port_index,
50 uint32_t buffer_size,
51 uint32_t format,
52 const void * buffer, Widget *self)
53 {
54 self->set_value(port_index,format,buffer);
55 }
56
57 Widget(Glib::ustring plug_name);
58 ~Widget();
59
60 protected:
61 Gtk::VBox m_vbox_;
62 Gtk::HBox m_hbox_;
63 Gtk::HBox m_hbox1_;
64 Gtk::VBox m_vbox;
65 Gtk::VBox m_vbox1;
66 Gtk::VBox m_vbox2;
67 Gtk::VBox m_vbox3;
68 Gtk::VBox m_vbox4;
69
70 Gxw::PaintBox m_paintbox;
71 Gtk::HBox m_hbox;
72 Gxw::BigKnob m_bigknob;
73 Gxw::BigKnob m_bigknob1;
74 Gxw::BigKnob m_bigknob2;
75 Gxw::BigKnob m_bigknob3;
76
77 void on_knob_value_changed();
78 void on_knob1_value_changed();
79 void on_knob2_value_changed();
80 void on_knob3_value_changed();
81 // stores port values we're currently at.
82 float gain;
83 float delay;
84 float feedback;
85 float level;
86
87 };
88
89 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxtubedelay.lv2'
10
11 src = ['gxtubedelay.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gxtubedelay',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gxtubedelay_gui',
59 source = 'widget.cpp gxtubedelay_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gxtubedelay.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gxtubedelay.lv2', 'gxtubedelay.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxtubetremelo.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gxtubetremelo.cc" // dsp class generated by faust -> dsp2cc
26 #ifndef __SSE__
27 #include "noiser.cc"
28 #endif
29
30 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
31
32 class Gxtubetremelo
33 {
34 private:
35 // internal stuff
36 float* output;
37 float* input;
38 PluginLV2* tubevib;
39 #ifndef __SSE__
40 PluginLV2* wn;
41 #endif
42
43 inline void run_dsp_mono(uint32_t n_samples);
44 inline void connect_mono(uint32_t port,void* data);
45 inline void init_dsp_mono(uint32_t rate);
46 inline void connect_all_mono_ports(uint32_t port, void* data);
47 inline void activate_f();
48 inline void deactivate_f();
49 inline void clean_up();
50 public:
51 // LV2 Descriptor
52 static const LV2_Descriptor descriptor;
53 // static wrapper to private functions
54 static void deactivate(LV2_Handle instance);
55 static void cleanup(LV2_Handle instance);
56 static void run(LV2_Handle instance, uint32_t n_samples);
57 static void activate(LV2_Handle instance);
58 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
59 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
60 double rate, const char* bundle_path,
61 const LV2_Feature* const* features);
62 Gxtubetremelo();
63 ~Gxtubetremelo();
64 };
65
66 // constructor
67 Gxtubetremelo::Gxtubetremelo() :
68 output(NULL),
69 input(NULL),
70 tubevib(gxtubetremelo::plugin()) {};
71
72 // destructor
73 Gxtubetremelo::~Gxtubetremelo()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (tubevib->activate_plugin !=0)
78 tubevib->activate_plugin(false, tubevib);
79 // delete DSP class
80 tubevib->delete_instance(tubevib);
81 };
82
83 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
84
85 void Gxtubetremelo::init_dsp_mono(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 #ifndef __SSE__
89 wn = noiser::plugin();
90 wn->set_samplerate(rate, wn);
91 #endif
92 tubevib->set_samplerate(rate, tubevib); // init the DSP class
93 }
94
95 // connect the Ports used by the plug-in class
96 void Gxtubetremelo::connect_mono(uint32_t port,void* data)
97 {
98 switch ((PortIndex)port)
99 {
100 case EFFECTS_OUTPUT:
101 output = static_cast<float*>(data);
102 break;
103 case EFFECTS_INPUT:
104 input = static_cast<float*>(data);
105 break;
106 default:
107 break;
108 }
109 }
110
111 void Gxtubetremelo::activate_f()
112 {
113 // allocate the internal DSP mem
114 if (tubevib->activate_plugin !=0)
115 tubevib->activate_plugin(true, tubevib);
116 }
117
118 void Gxtubetremelo::clean_up()
119 {
120 #ifndef __SSE__
121 wn->delete_instance(wn);;
122 #endif
123 // delete the internal DSP mem
124 if (tubevib->activate_plugin !=0)
125 tubevib->activate_plugin(false, tubevib);
126 }
127
128 void Gxtubetremelo::deactivate_f()
129 {
130 // delete the internal DSP mem
131 if (tubevib->activate_plugin !=0)
132 tubevib->activate_plugin(false, tubevib);
133 }
134
135 void Gxtubetremelo::run_dsp_mono(uint32_t n_samples)
136 {
137 #ifndef __SSE__
138 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
139 #endif
140 tubevib->mono_audio(static_cast<int>(n_samples), input,
141 output, tubevib);
142 }
143
144 void Gxtubetremelo::connect_all_mono_ports(uint32_t port, void* data)
145 {
146 // connect the Ports used by the plug-in class
147 connect_mono(port,data);
148 // connect the Ports used by the DSP class
149 tubevib->connect_ports(port, data, tubevib);
150 }
151
152 ///////////////////////// PRIVATE CLASS FUNCTIONS /////////////////////
153
154 LV2_Handle
155 Gxtubetremelo::instantiate(const LV2_Descriptor* descriptor,
156 double rate,
157 const char* bundle_path,
158 const LV2_Feature* const* features)
159 {
160 // init the plug-in class
161 Gxtubetremelo *self = new Gxtubetremelo();
162 if (!self)
163 {
164 return NULL;
165 }
166
167 self->init_dsp_mono((uint32_t)rate);
168
169 return (LV2_Handle)self;
170 }
171
172 void Gxtubetremelo::connect_port(LV2_Handle instance,
173 uint32_t port,
174 void* data)
175 {
176 // connect all ports
177 static_cast<Gxtubetremelo*>(instance)->connect_all_mono_ports(port, data);
178 }
179
180 void Gxtubetremelo::activate(LV2_Handle instance)
181 {
182 // allocate needed mem
183 static_cast<Gxtubetremelo*>(instance)->activate_f();
184 }
185
186 void Gxtubetremelo::run(LV2_Handle instance, uint32_t n_samples)
187 {
188 // run dsp
189 static_cast<Gxtubetremelo*>(instance)->run_dsp_mono(n_samples);
190 }
191
192 void Gxtubetremelo::deactivate(LV2_Handle instance)
193 {
194 // free allocated mem
195 static_cast<Gxtubetremelo*>(instance)->deactivate_f();
196 }
197
198 void Gxtubetremelo::cleanup(LV2_Handle instance)
199 {
200 // well, clean up after us
201 Gxtubetremelo* self = static_cast<Gxtubetremelo*>(instance);
202 self->clean_up();
203 delete self;
204 }
205
206 const LV2_Descriptor Gxtubetremelo::descriptor =
207 {
208 GXPLUGIN_URI "#tubetremelo",
209 instantiate,
210 connect_port,
211 activate,
212 run,
213 deactivate,
214 cleanup,
215 NULL
216 };
217
218 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
219
220 extern "C"
221 LV2_SYMBOL_EXPORT
222 const LV2_Descriptor*
223 lv2_descriptor(uint32_t index)
224 {
225 switch (index)
226 {
227 case 0:
228 return &Gxtubetremelo::descriptor;
229 default:
230 return NULL;
231 }
232 }
233
234 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxtubetremelo"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxtubetremelo#gui"
28
29
30 typedef enum
31 {
32 SINEWAVE,
33 DEPTH,
34 SPEED,
35 GAIN,
36 EFFECTS_OUTPUT,
37 EFFECTS_INPUT,
38 } PortIndex;
39
40 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gxtubetremelo>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "GxTubeTremelo" .
37
38 <http://guitarix.sourceforge.net/plugins/gxtubetremelo#tubetremelo>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxTubeTremelo";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gxtubetremelo> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gxtubetremelo#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "sinewave" ;
54 lv2:name "SineWave";
55 lv2:portProperty lv2:integer;
56 lv2:portProperty lv2:enumeration ;
57 lv2:default 0 ;
58 lv2:minimum 0 ;
59 lv2:maximum 1 ;
60 ] , [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 1 ;
64 lv2:symbol "depth" ;
65 lv2:name "Depth";
66 lv2:default 0.0 ;
67 lv2:minimum 0.0 ;
68 lv2:maximum 1.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 2 ;
73 lv2:symbol "speed" ;
74 lv2:name "Speed";
75 lv2:default 0.1 ;
76 lv2:minimum 0.1 ;
77 lv2:maximum 14.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 3 ;
82 lv2:symbol "gain" ;
83 lv2:name "Gain";
84 lv2:default 0.0 ;
85 lv2:minimum -12.0 ;
86 lv2:maximum 22.0 ;
87 ] , [
88 a lv2:AudioPort ,
89 lv2:OutputPort ;
90 lv2:index 4 ;
91 lv2:symbol "out" ;
92 lv2:name "Out"
93 ] , [
94 a lv2:AudioPort ,
95 lv2:InputPort ;
96 lv2:index 5 ;
97 lv2:symbol "in" ;
98 lv2:name "In"
99 ].
100
101 <http://guitarix.sourceforge.net/plugins/gxtubetremelo#gui>
102 a guiext:GtkUI;
103 guiext:binary <gxtubetremelo_gui.so>;
104 guiext:requiredFeature guiext:makeResident .
105
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxtubetremelo.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GxtubetremeloGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 public:
44
45 Widget* widget;
46 static void set_plug_name_static(GxtubetremeloGUI *self, const char * plugin_uri)
47 {
48 self->set_plug_name(plugin_uri);
49 }
50 static GtkWidget* make_gui_static(GxtubetremeloGUI *self)
51 {
52 return self->make_gui();
53 }
54
55 GxtubetremeloGUI () {};
56 ~GxtubetremeloGUI () {};
57 } ;
58
59 void GxtubetremeloGUI::set_knob( Glib::ustring knob)
60 {
61 addKnob = " style 'gx_";
62 addKnob += plug_name;
63 addKnob += "_dark_skin_icons'\n"
64 " { \n"
65 " stock['bigknob'] = {{'";
66 addKnob += knob;
67 addKnob += ".png'}}\n";
68 addKnob += " stock['button_on'] = {{'"
69 "echo-switch_on.png'}}\n"
70 " stock['button_off'] = {{'"
71 "echo-switch_off.png'}}\n"
72 " }\n"
73 "widget '*.";
74 addKnob += plug_name;
75 addKnob += "' style 'gx_";
76 addKnob += plug_name;
77 addKnob += "_dark_skin_icons' \n"
78 "class '*GxToggleImage' style'gx_";
79 addKnob += plug_name;
80 addKnob += "_dark_skin_icons' \n";
81 }
82
83 void GxtubetremeloGUI::set_skin()
84 {
85 Glib::ustring toparse = "pixmap_path ";
86 toparse += " '";
87 toparse += GX_LV2_STYLE_DIR;
88 toparse += "/'\n";
89 toparse += "style \"gx_";
90 toparse += plug_name;
91 toparse += "_dark-paintbox\"\n"
92 " { \n"
93 "GxPaintBox::skin-gradient = {\n"
94 "{ 65536, 0, 0, 13107, 52428 }, \n"
95 "{ 52428, 0, 0, 0, 52428 },\n"
96 "{ 13107, 0, 0, 13107, 13107 }}\n"
97 " GxPaintBox::icon-set =4\n"
98 " stock['amp_skin'] = {{'";
99 toparse += plugskin;
100 toparse += "'}}\n"
101 " }\n"
102 "\n"
103 "style 'gx_headtubetremelo_box' \n"
104 " { \n"
105 " fg[NORMAL] = '#9c8233' \n"
106 "font_name = 'sans 10.5' \n"
107 " }\n";
108 toparse += addKnob;
109
110 toparse += " widget '*.amplabel' style:highest 'gx_headtubetremelo_box'\n"
111 "widget '*.";
112 toparse += plug_name;
113 toparse += "' style 'gx_";
114 toparse += plug_name;
115 toparse += "_dark-paintbox' ";
116 toparse += "style 'gx_switch'\n"
117 "{\n"
118 "xthickness = 0\n"
119 "ythickness = 0\n"
120 "GtkButton::inner-border = {0, 0, 0, 0}\n"
121 "GtkButton::default-border = {0, 0, 0, 0}\n"
122 "GtkButton::focus-line-width = 0\n"
123 "GtkButton::focus-padding = 0\n"
124 "GtkButton::interior-focus = 0\n"
125 "GtkButton::child-displacement-x = 0\n"
126 "GtkButton::child-displacement-y = 0\n"
127 " }\n"
128 "widget '*.";
129 toparse += plug_name;
130 toparse += "' style:highest 'gx_switch'";
131
132 gtk_rc_parse_string (toparse.c_str());
133 }
134
135 void GxtubetremeloGUI::set_plug_name( const char * plugin_uri)
136 {
137 addKnob = "";
138
139 if (strcmp("http://guitarix.sourceforge.net/plugins/gxtubetremelo#tubetremelo", plugin_uri) == 0)
140 {
141 plugskin = "gxtubetremelo.png";
142 plug_name = "gxtubetremelo";
143 set_knob("redeyefx-knob");
144 }
145 else
146 {
147 plugskin = "gxtubetremelo.png";
148 plug_name = "gxtubetremelo";
149 }
150 }
151
152 GtkWidget* GxtubetremeloGUI::make_gui()
153 {
154 // init the gxwmm library
155 Gxw::init();
156 set_skin();
157 GtkWidget* container = gtk_vbox_new(FALSE, 0);
158 widget = new Widget(plug_name);
159 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
160 gtk_container_add(GTK_CONTAINER(container), cWidget );
161
162 return container;
163 }
164
165
166 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
167 const char * plugin_uri,
168 const char * bundle_path,
169 LV2UI_Write_Function write_function,
170 LV2UI_Controller controller,
171 LV2UI_Widget * widget,
172 const LV2_Feature * const * features)
173 {
174 GxtubetremeloGUI* self = new GxtubetremeloGUI();
175 if (self == NULL) return NULL;
176 self->set_plug_name_static(self, plugin_uri);
177 *widget = (LV2UI_Widget)self->make_gui_static(self);
178 self->widget->controller = controller;
179 self->widget->write_function = write_function;
180 return (LV2UI_Handle)self;
181 }
182
183 static void cleanup(LV2UI_Handle ui)
184 {
185 GxtubetremeloGUI *pluginGui = static_cast<GxtubetremeloGUI*>(ui);
186 delete pluginGui->widget;
187 delete pluginGui;
188 }
189
190 static void port_event(LV2UI_Handle ui,
191 uint32_t port_index,
192 uint32_t buffer_size,
193 uint32_t format,
194 const void * buffer)
195 {
196 GxtubetremeloGUI *self = static_cast<GxtubetremeloGUI*>(ui);
197 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
198 return;
199 }
200
201 static LV2UI_Descriptor descriptors[] =
202 {
203 {GXPLUGIN_UI_URI, instantiate, cleanup, port_event, NULL}
204 };
205
206 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
207 {
208 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
209 if (index >= sizeof(descriptors) / sizeof(descriptors[0]))
210 {
211 return NULL;
212 }
213 return descriptors + index;
214 }
215
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtubetremelo#tubetremelo>
23 a lv2:Plugin ;
24 lv2:binary <gxtubetremelo.so> ;
25 rdfs:seeAlso <gxtubetremelo.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtubetremelo#tubetremelo>
23 a lv2:Plugin ;
24 lv2:binary <gxtubetremelo@LIB_EXT@> ;
25 rdfs:seeAlso <gxtubetremelo.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
33 {
34 switch ((PortIndex)port_index )
35 {
36 case DEPTH:
37 return &m_bigknob;
38 case SPEED:
39 return &m_bigknob1;
40 case GAIN:
41 return &m_bigknob2;
42 case SINEWAVE:
43 return &m_switch;
44 default:
45 return NULL;
46 }
47 }
48
49 Widget::Widget(Glib::ustring plugname):
50 plug_name(plugname)
51 {
52 // create controllers for port name
53 make_controller_box(&m_vbox2, "DEPTH", 0, 1.0, 0.01, DEPTH);
54 make_controller_box(&m_vbox3, "SPEED", 0.1, 14.0, 0.01, SPEED);
55 make_controller_box(&m_vbox4, "GAIN", -12, 22, 0.1, GAIN);
56 make_switch_box(&m_vbox5, "SINE", "TRIANGLE", SINEWAVE);
57
58 // set propertys for the main paintbox holding the skin
59 m_paintbox.set_border_width(0);
60 m_paintbox.set_spacing(0);
61 m_paintbox.set_homogeneous(false);
62 m_paintbox.set_name(plug_name);
63 m_paintbox.property_paint_func() = "amp_skin_expose";
64 m_paintbox.set_size_request( 425, 260 ) ;
65
66 add(m_paintbox);
67
68 // One vertical box to wrap all in
69 m_vbox_.set_spacing(0);
70 m_vbox_.set_border_width(0);
71 m_vbox_.set_homogeneous(false);
72
73 m_paintbox.pack_start(m_vbox_ , Gtk::PACK_EXPAND_PADDING, 0);
74
75
76 // This is the central controller strip
77 m_hbox1_.set_spacing(10);
78 m_hbox1_.set_border_width(0);
79 m_hbox1_.set_homogeneous(true);
80
81
82 // put boxed controllers into controller box
83 m_vbox2.set_spacing(6);
84 m_vbox3.set_spacing(6);
85 m_vbox4.set_spacing(6);
86 m_vbox5.set_spacing(6);
87
88 m_hbox1_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
89 m_hbox1_.pack_start(m_vbox2);
90 m_hbox1_.pack_start(m_vbox3);
91 m_hbox1_.pack_start(m_vbox4);
92 m_hbox1_.pack_start(m_vbox5);
93 m_hbox1_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
94
95 // Npow put all layers in main vbox
96 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING, 0);
97
98
99 // connect expose handler as resize handler
100 m_paintbox.signal_expose_event().connect(
101 sigc::mem_fun(this, &Widget::_expose_event), true);
102
103 set_app_paintable(true);
104 show_all();
105 }
106
107 Widget::~Widget()
108 {
109
110 }
111
112 // set borderwith for paintbox when widget resize
113 // to hold controllers in place
114 bool Widget::_expose_event(GdkEventExpose *event)
115 {
116 int x, y, width, height, depth;
117 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
118 //double_t height = m_paintbox.get_window()->get_height();
119 m_paintbox.set_border_width(height/10);
120 return false;
121 }
122
123 // create selectors from gxwmm
124 void Widget::make_selector(Glib::ustring labela,
125 Glib::ustring tables[],
126 size_t _size,
127 float min, float digits,
128 PortIndex port_name)
129 {
130 Gxw::Selector *regler = static_cast<Gxw::Selector*>
131 (get_controller_by_port(port_name));
132 if (regler)
133 {
134 float max = static_cast<float>(_size+1);
135
136 Gtk::TreeModelColumn<Glib::ustring> label;
137 Gtk::TreeModelColumnRecord rec;
138 rec.add(label);
139 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
140
141 for (uint32_t i = 0 ; i< _size; ++i) {
142 ls->append()->set_value(0, tables[i]);
143 }
144 regler->set_model(ls);
145 regler->set_has_tooltip();
146 regler->set_tooltip_text(labela);
147 regler->cp_configure("SELECTOR", labela, min, max, digits);
148 regler->set_show_value(false);
149 regler->set_name(plug_name);
150 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
151 *this, &Widget::on_value_changed), port_name));
152 }
153 }
154
155 // create stackboxes with controllers for port name
156 void Widget::make_controller_box(Gtk::Box *box,
157 Glib::ustring label,
158 float min, float max,
159 float digits,
160 PortIndex port_name)
161 {
162 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
163 get_controller_by_port(port_name));
164 if (regler)
165 {
166 Gtk::Label* pr = new Gtk::Label(label, 0);
167 pr->set_name("amplabel");
168 // use label images instead simple string labes
169 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
170 label_image += "/";
171 label_image += label;
172 label_image += "-label.png";
173 Gtk::Image *pr = new Gtk::Image(label_image);*/
174
175 Gtk::VBox* b1 = new Gtk::VBox();
176 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
177 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
178 regler->cp_configure("KNOB", label, min, max, digits);
179 regler->set_show_value(false);
180 regler->set_name(plug_name);
181 box->pack_start(*regler,Gtk::PACK_SHRINK);
182 Gtk::VBox* b2 = new Gtk::VBox();
183 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
184 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
185 *this, &Widget::on_value_changed), port_name));
186 }
187 }
188
189 // create stackboxes with switch controller for port name
190 void Widget::make_switch_box(Gtk::Box *box,
191 Glib::ustring label,
192 Glib::ustring label2,
193 PortIndex port_name)
194 {
195 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
196 get_controller_by_port(port_name));
197 if (regler)
198 {
199 Gtk::Label* pr = new Gtk::Label(label, 0);
200 pr->set_name("amplabel");
201 // use label images instead simple string labes
202 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
203 label_image += "/"+plug_name+"-";
204 label_image += label;
205 label_image += "-label.png";
206 Gtk::Image *pr = new Gtk::Image(label_image);*/
207
208 regler->cp_configure("switch", label, 0, 1, 1);
209 regler->set_can_focus( false ) ;
210
211 regler->set_name(plug_name);
212 regler->set_base_name( "button" );
213 Gtk::VBox* b1 = new Gtk::VBox();
214 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
215 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
216 box->pack_start(*regler,Gtk::PACK_SHRINK);
217
218 // 2nd Label
219 Gtk::Label* pr2 = new Gtk::Label(label2, 0);
220 pr2->set_name("amplabel");
221 box->pack_start( *Gtk::manage(pr2),Gtk::PACK_SHRINK);
222
223 Gtk::VBox* b2 = new Gtk::VBox();
224 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
225 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
226 *this, &Widget::on_value_changed), port_name));
227 }
228 }
229
230 // Create the Text Labels from images For Amp
231 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
232 {
233 Glib::ustring label_image = GX_LV2_STYLE_DIR;
234 label_image += "/";
235 label_image += label;
236 label_image += ".png";
237 Gtk::Image *pr = new Gtk::Image(label_image);
238
239
240 Gtk::VBox* b1 = new Gtk::VBox();
241 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
242 if( start ){
243 // std::cout << "Pack Start "<<label<<std::endl;
244 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
245 }else{
246 // std::cout << "Pack End " << label << std::endl;
247 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
248 }
249
250 Gtk::VBox* b2 = new Gtk::VBox();
251 box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
252
253 }
254 // receive controller value changes from host and set them to controller
255 void Widget::set_value(uint32_t port_index,
256 uint32_t format,
257 const void * buffer)
258 {
259 if ( format == 0 )
260 {
261 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
262 get_controller_by_port(port_index));
263 if (regler)
264 {
265 float value = *static_cast<const float*>(buffer);
266 regler->cp_set_value(value);
267 }
268 }
269 }
270
271 // write (UI) controller value changes to the host->engine
272 void Widget::on_value_changed(uint32_t port_index)
273 {
274 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
275 get_controller_by_port(port_index));
276 if (regler)
277 {
278 float value = regler->cp_get_value();
279 write_function(controller, port_index, sizeof(float), 0,
280 static_cast<const void*>(&value));
281 }
282 }
283
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxtubetremelo.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 Glib::ustring label2,
53 PortIndex port_name);
54 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plugname);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::VBox m_vbox;
80 Gtk::VBox m_vbox1;
81 Gtk::VBox m_vbox2;
82 Gtk::VBox m_vbox3;
83 Gtk::VBox m_vbox4;
84 Gtk::VBox m_vbox5;
85 Gtk::VBox m_vbox6;
86 Gtk::VBox m_vbox7;
87 Gtk::HBox m_hbox_;
88 Gtk::HBox m_hbox1_;
89 Gtk::HBox m_hbox2_;
90
91 Gxw::PaintBox m_paintbox;
92 Gxw::BigKnob m_bigknob;
93 Gxw::BigKnob m_bigknob1;
94 Gxw::BigKnob m_bigknob2;
95 Gxw::Switch m_switch;
96 };
97
98 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxtubetremelo.lv2'
10
11 src = ['gxtubetremelo.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gxtubetremelo',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gxtubetremelo_gui',
59 source = 'widget.cpp gxtubetremelo_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gxtubetremelo.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gxtubetremelo.lv2', 'gxtubetremelo.ttl')
69
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxtubevibrato.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gxtubevibrato.cc" // dsp class generated by faust -> dsp2cc
26 #ifndef __SSE__
27 #include "noiser.cc"
28 #endif
29
30 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
31
32 class Gxtubevibrato
33 {
34 private:
35 // internal stuff
36 float* output;
37 float* input;
38 PluginLV2* tubevib;
39 #ifndef __SSE__
40 PluginLV2* wn;
41 #endif
42
43 inline void run_dsp_mono(uint32_t n_samples);
44 inline void connect_mono(uint32_t port,void* data);
45 inline void init_dsp_mono(uint32_t rate);
46 inline void connect_all_mono_ports(uint32_t port, void* data);
47 inline void activate_f();
48 inline void deactivate_f();
49 inline void clean_up();
50 public:
51 // LV2 Descriptor
52 static const LV2_Descriptor descriptor;
53 // static wrapper to private functions
54 static void deactivate(LV2_Handle instance);
55 static void cleanup(LV2_Handle instance);
56 static void run(LV2_Handle instance, uint32_t n_samples);
57 static void activate(LV2_Handle instance);
58 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
59 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
60 double rate, const char* bundle_path,
61 const LV2_Feature* const* features);
62 Gxtubevibrato();
63 ~Gxtubevibrato();
64 };
65
66 // constructor
67 Gxtubevibrato::Gxtubevibrato() :
68 output(NULL),
69 input(NULL),
70 tubevib(gxtubevibrato::plugin()) {};
71
72 // destructor
73 Gxtubevibrato::~Gxtubevibrato()
74 {
75 // just to be sure the plug have given free the allocated mem
76 // it didn't hurd if the mem is already given free by clean_up()
77 if (tubevib->activate_plugin !=0)
78 tubevib->activate_plugin(false, tubevib);
79 // delete DSP class
80 tubevib->delete_instance(tubevib);
81 };
82
83 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
84
85 void Gxtubevibrato::init_dsp_mono(uint32_t rate)
86 {
87 AVOIDDENORMALS(); // init the SSE denormal protection
88 #ifndef __SSE__
89 wn = noiser::plugin();
90 wn->set_samplerate(rate, wn);
91 #endif
92 tubevib->set_samplerate(rate, tubevib); // init the DSP class
93 }
94
95 // connect the Ports used by the plug-in class
96 void Gxtubevibrato::connect_mono(uint32_t port,void* data)
97 {
98 switch ((PortIndex)port)
99 {
100 case EFFECTS_OUTPUT:
101 output = static_cast<float*>(data);
102 break;
103 case EFFECTS_INPUT:
104 input = static_cast<float*>(data);
105 break;
106 default:
107 break;
108 }
109 }
110
111 void Gxtubevibrato::activate_f()
112 {
113 // allocate the internal DSP mem
114 if (tubevib->activate_plugin !=0)
115 tubevib->activate_plugin(true, tubevib);
116 }
117
118 void Gxtubevibrato::clean_up()
119 {
120 #ifndef __SSE__
121 wn->delete_instance(wn);;
122 #endif
123 // delete the internal DSP mem
124 if (tubevib->activate_plugin !=0)
125 tubevib->activate_plugin(false, tubevib);
126 }
127
128 void Gxtubevibrato::deactivate_f()
129 {
130 // delete the internal DSP mem
131 if (tubevib->activate_plugin !=0)
132 tubevib->activate_plugin(false, tubevib);
133 }
134
135 void Gxtubevibrato::run_dsp_mono(uint32_t n_samples)
136 {
137 #ifndef __SSE__
138 wn->mono_audio(static_cast<int>(n_samples), input, input, wn);;
139 #endif
140 tubevib->mono_audio(static_cast<int>(n_samples), input,
141 output, tubevib);
142 }
143
144 void Gxtubevibrato::connect_all_mono_ports(uint32_t port, void* data)
145 {
146 // connect the Ports used by the plug-in class
147 connect_mono(port,data);
148 // connect the Ports used by the DSP class
149 tubevib->connect_ports(port, data, tubevib);
150 }
151
152 ///////////////////////// STATIC CLASS FUNCTIONS /////////////////////
153
154 LV2_Handle
155 Gxtubevibrato::instantiate(const LV2_Descriptor* descriptor,
156 double rate,
157 const char* bundle_path,
158 const LV2_Feature* const* features)
159 {
160 // init the plug-in class
161 Gxtubevibrato *self = new Gxtubevibrato();
162 if (!self)
163 {
164 return NULL;
165 }
166
167 self->init_dsp_mono((uint32_t)rate);
168
169 return (LV2_Handle)self;
170 }
171
172 void Gxtubevibrato::connect_port(LV2_Handle instance,
173 uint32_t port,
174 void* data)
175 {
176 // connect all ports
177 static_cast<Gxtubevibrato*>(instance)->connect_all_mono_ports(port, data);
178 }
179
180 void Gxtubevibrato::activate(LV2_Handle instance)
181 {
182 // allocate needed mem
183 static_cast<Gxtubevibrato*>(instance)->activate_f();
184 }
185
186 void Gxtubevibrato::run(LV2_Handle instance, uint32_t n_samples)
187 {
188 // run dsp
189 static_cast<Gxtubevibrato*>(instance)->run_dsp_mono(n_samples);
190 }
191
192 void Gxtubevibrato::deactivate(LV2_Handle instance)
193 {
194 // free allocated mem
195 static_cast<Gxtubevibrato*>(instance)->deactivate_f();
196 }
197
198 void Gxtubevibrato::cleanup(LV2_Handle instance)
199 {
200 // well, clean up after us
201 Gxtubevibrato* self = static_cast<Gxtubevibrato*>(instance);
202 self->clean_up();
203 delete self;
204 }
205
206 const LV2_Descriptor Gxtubevibrato::descriptor =
207 {
208 GXPLUGIN_URI "#tubevibrato",
209 instantiate,
210 connect_port,
211 activate,
212 run,
213 deactivate,
214 cleanup,
215 NULL
216 };
217
218 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
219
220 extern "C"
221 LV2_SYMBOL_EXPORT
222 const LV2_Descriptor*
223 lv2_descriptor(uint32_t index)
224 {
225 switch (index)
226 {
227 case 0:
228 return &Gxtubevibrato::descriptor;
229 default:
230 return NULL;
231 }
232 }
233
234 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25
26 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxtubevibrato"
27 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxtubevibrato#gui"
28
29
30 typedef enum
31 {
32 SINEWAVE,
33 DEPTH,
34 SPEED,
35 GAIN,
36 EFFECTS_OUTPUT,
37 EFFECTS_INPUT,
38 } PortIndex;
39
40 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
24 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
25 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
26
27 <http://guitarix.sourceforge.net#me>
28 a foaf:Person ;
29 foaf:name "Guitarix team" ;
30 foaf:mbox <mailto:brummer@web.de> ;
31 rdfs:seeAlso <http://guitarix.sourceforge.net> .
32
33 <http://guitarix.sourceforge.net/plugins/gxtubevibrato>
34 a doap:Project ;
35 doap:maintainer <http://guitarix.sourceforge.net#me> ;
36 doap:name "GxTubeVibrato" .
37
38 <http://guitarix.sourceforge.net/plugins/gxtubevibrato#tubevibrato>
39 a lv2:Plugin ,
40 lv2:EffectPlugin ;
41 doap:maintainer <http://guitarix.sourceforge.net#me> ;
42 doap:name "GxTubeVibrato";
43 doap:license <http://opensource.org/licenses/isc> ;
44 lv2:project <http://guitarix.sourceforge.net/plugins/gxtubevibrato> ;
45 lv2:optionalFeature lv2:hardRTCapable ;
46
47 guiext:ui <http://guitarix.sourceforge.net/plugins/gxtubevibrato#gui>;
48
49 lv2:port [
50 a lv2:InputPort ,
51 lv2:ControlPort ;
52 lv2:index 0 ;
53 lv2:symbol "sinewave" ;
54 lv2:name "SineWave";
55 lv2:portProperty lv2:integer;
56 lv2:portProperty lv2:enumeration ;
57 lv2:default 0 ;
58 lv2:minimum 0 ;
59 lv2:maximum 1 ;
60 ] , [
61 a lv2:InputPort ,
62 lv2:ControlPort ;
63 lv2:index 1 ;
64 lv2:symbol "depth" ;
65 lv2:name "Depth";
66 lv2:default 0.0 ;
67 lv2:minimum 0.0 ;
68 lv2:maximum 1.0 ;
69 ] , [
70 a lv2:InputPort ,
71 lv2:ControlPort ;
72 lv2:index 2 ;
73 lv2:symbol "speed" ;
74 lv2:name "Speed";
75 lv2:default 0.1 ;
76 lv2:minimum 0.1 ;
77 lv2:maximum 14.0 ;
78 ] , [
79 a lv2:InputPort ,
80 lv2:ControlPort ;
81 lv2:index 3 ;
82 lv2:symbol "gain" ;
83 lv2:name "Gain";
84 lv2:default 0.0 ;
85 lv2:minimum -12.0 ;
86 lv2:maximum 22.0 ;
87 ] , [
88 a lv2:AudioPort ,
89 lv2:OutputPort ;
90 lv2:index 4 ;
91 lv2:symbol "out" ;
92 lv2:name "Out"
93 ] , [
94 a lv2:AudioPort ,
95 lv2:InputPort ;
96 lv2:index 5 ;
97 lv2:symbol "in" ;
98 lv2:name "In"
99 ].
100
101 <http://guitarix.sourceforge.net/plugins/gxtubevibrato#gui>
102 a guiext:GtkUI;
103 guiext:binary <gxtubevibrato_gui.so>;
104 guiext:requiredFeature guiext:makeResident .
105
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxtubevibrato.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GxtubevibratoGUI
34 {
35 private:
36 Glib::ustring plugskin;
37 Glib::ustring addKnob;
38 Glib::ustring plug_name;
39 void set_knob(Glib::ustring knob);
40 void set_skin();
41 void set_plug_name(const char * plugin_uri);
42 GtkWidget* make_gui();
43 Widget* widget;
44
45 public:
46
47 static LV2UI_Descriptor descriptors[];
48 static void cleanup(LV2UI_Handle ui);
49
50 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
51 const char * plugin_uri,
52 const char * bundle_path,
53 LV2UI_Write_Function write_function,
54 LV2UI_Controller controller,
55 LV2UI_Widget * widget,
56 const LV2_Feature * const * features);
57
58 static void port_event(LV2UI_Handle ui, uint32_t port_index,
59 uint32_t buffer_size, uint32_t format,
60 const void * buffer);
61
62 GxtubevibratoGUI () {};
63 ~GxtubevibratoGUI () {};
64 } ;
65
66 void GxtubevibratoGUI::set_knob( Glib::ustring knob)
67 {
68 addKnob = " style 'gx_";
69 addKnob += plug_name;
70 addKnob += "_dark_skin_icons'\n"
71 " { \n"
72 " stock['bigknob'] = {{'";
73 addKnob += knob;
74 addKnob += ".png'}}\n";
75 addKnob += " stock['button_on'] = {{'"
76 "echo-switch_on.png'}}\n"
77 " stock['button_off'] = {{'"
78 "echo-switch_off.png'}}\n"
79 " }\n"
80 "widget '*.";
81 addKnob += plug_name;
82 addKnob += "' style 'gx_";
83 addKnob += plug_name;
84 addKnob += "_dark_skin_icons' \n"
85 "class '*GxToggleImage' style'gx_";
86 addKnob += plug_name;
87 addKnob += "_dark_skin_icons' \n";
88 }
89
90 void GxtubevibratoGUI::set_skin()
91 {
92 Glib::ustring toparse = "pixmap_path ";
93 toparse += " '";
94 toparse += GX_LV2_STYLE_DIR;
95 toparse += "/'\n";
96 toparse += "style \"gx_";
97 toparse += plug_name;
98 toparse += "_dark-paintbox\"\n"
99 " { \n"
100 "GxPaintBox::skin-gradient = {\n"
101 "{ 65536, 0, 0, 13107, 52428 }, \n"
102 "{ 52428, 0, 0, 0, 52428 },\n"
103 "{ 13107, 0, 0, 13107, 13107 }}\n"
104 " GxPaintBox::icon-set =4\n"
105 " stock['amp_skin'] = {{'";
106 toparse += plugskin;
107 toparse += "'}}\n"
108 " }\n"
109 "\n"
110 "style 'gx_headtubevibrato_box' \n"
111 " { \n"
112 " fg[NORMAL] = '#9c8233' \n"
113 "font_name = 'sans 10.5' \n"
114 " }\n";
115 toparse += addKnob;
116
117 toparse += " widget '*.amplabel' style:highest 'gx_headtubevibrato_box'\n"
118 "widget '*.";
119 toparse += plug_name;
120 toparse += "' style 'gx_";
121 toparse += plug_name;
122 toparse += "_dark-paintbox' ";
123 toparse += "style 'gx_switch'\n"
124 "{\n"
125 "xthickness = 0\n"
126 "ythickness = 0\n"
127 "GtkButton::inner-border = {0, 0, 0, 0}\n"
128 "GtkButton::default-border = {0, 0, 0, 0}\n"
129 "GtkButton::focus-line-width = 0\n"
130 "GtkButton::focus-padding = 0\n"
131 "GtkButton::interior-focus = 0\n"
132 "GtkButton::child-displacement-x = 0\n"
133 "GtkButton::child-displacement-y = 0\n"
134 " }\n"
135 "widget '*.";
136 toparse += plug_name;
137 toparse += "' style:highest 'gx_switch'";
138
139 gtk_rc_parse_string (toparse.c_str());
140 }
141
142 void GxtubevibratoGUI::set_plug_name(const char * plugin_uri)
143 {
144 addKnob = "";
145
146 if (strcmp("http://guitarix.sourceforge.net/plugins/gxtubevibrato#tubevibrato", plugin_uri) == 0)
147 {
148 plugskin = "gxtubevibrato.png";
149 plug_name = "gxtubevibrato";
150 set_knob("redeyefx-knob");
151 }
152 else
153 {
154 plugskin = "gxtubevibrato.png";
155 plug_name = "gxtubevibrato";
156 }
157 }
158
159 GtkWidget* GxtubevibratoGUI::make_gui()
160 {
161 // init the gxwmm library
162 Gxw::init();
163 set_skin();
164 GtkWidget* container = gtk_vbox_new(FALSE, 0);
165 widget = new Widget(plug_name);
166 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
167 gtk_container_add(GTK_CONTAINER(container), cWidget );
168
169 return container;
170 }
171
172
173 LV2UI_Handle GxtubevibratoGUI::instantiate(const struct _LV2UI_Descriptor * descriptor,
174 const char * plugin_uri,
175 const char * bundle_path,
176 LV2UI_Write_Function write_function,
177 LV2UI_Controller controller,
178 LV2UI_Widget * widget,
179 const LV2_Feature * const * features)
180 {
181 GxtubevibratoGUI* self = new GxtubevibratoGUI();
182 if (self == NULL) return NULL;
183 self->set_plug_name(plugin_uri);
184 *widget = (LV2UI_Widget)self->make_gui();
185 self->widget->controller = controller;
186 self->widget->write_function = write_function;
187 return (LV2UI_Handle)self;
188 }
189
190 void GxtubevibratoGUI::cleanup(LV2UI_Handle ui)
191 {
192 GxtubevibratoGUI *pluginGui = static_cast<GxtubevibratoGUI*>(ui);
193 delete pluginGui->widget;
194 delete pluginGui;
195 }
196
197 void GxtubevibratoGUI::port_event(LV2UI_Handle ui, uint32_t port_index,
198 uint32_t buffer_size, uint32_t format,
199 const void * buffer)
200 {
201 GxtubevibratoGUI *self = static_cast<GxtubevibratoGUI*>(ui);
202 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
203 return;
204 }
205
206 LV2UI_Descriptor GxtubevibratoGUI::descriptors[] =
207 {
208 {
209 GXPLUGIN_UI_URI,
210 GxtubevibratoGUI::instantiate,
211 GxtubevibratoGUI::cleanup,
212 GxtubevibratoGUI::port_event,
213 NULL
214 }
215 };
216
217 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
218 {
219 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
220 if (index >= sizeof(GxtubevibratoGUI::descriptors) / sizeof(GxtubevibratoGUI::descriptors[0]))
221 {
222 return NULL;
223 }
224 return GxtubevibratoGUI::descriptors + index;
225 }
226
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtubevibrato#tubevibrato>
23 a lv2:Plugin ;
24 lv2:binary <gxtubevibrato.so> ;
25 rdfs:seeAlso <gxtubevibrato.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtubevibrato#tubevibrato>
23 a lv2:Plugin ;
24 lv2:binary <gxtubevibrato@LIB_EXT@> ;
25 rdfs:seeAlso <gxtubevibrato.ttl> .
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24
25 /* @get controller by port
26 * this function is used by make_selector() make_controller_box()
27 * set_value() and on_value_changed()
28 * so controller widgets needs only here asined to a port,
29 * and all functions which need acess to the controller widget pointer
30 * can receive them by port number
31 */
32 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
33 {
34 switch ((PortIndex)port_index )
35 {
36 case DEPTH:
37 return &m_bigknob;
38 case SPEED:
39 return &m_bigknob1;
40 case GAIN:
41 return &m_bigknob2;
42 case SINEWAVE:
43 return &m_switch;
44 default:
45 return NULL;
46 }
47 }
48
49 Widget::Widget(Glib::ustring plugname):
50 plug_name(plugname)
51 {
52 // create controllers for port name
53 make_controller_box(&m_vbox2, "DEPTH", 0, 1.0, 0.01, DEPTH);
54 make_controller_box(&m_vbox3, "SPEED", 0.1, 14.0, 0.01, SPEED);
55 make_controller_box(&m_vbox4, "GAIN", -12, 22, 0.1, GAIN);
56 make_switch_box(&m_vbox5, "SINE", "TRIANGLE", SINEWAVE);
57
58 // set propertys for the main paintbox holding the skin
59 m_paintbox.set_border_width(0);
60 m_paintbox.set_spacing(0);
61 m_paintbox.set_homogeneous(false);
62 m_paintbox.set_name(plug_name);
63 m_paintbox.property_paint_func() = "amp_skin_expose";
64 m_paintbox.set_size_request( 425, 260 ) ;
65
66 add(m_paintbox);
67
68 // One vertical box to wrap all in
69 m_vbox_.set_spacing(0);
70 m_vbox_.set_border_width(0);
71 m_vbox_.set_homogeneous(false);
72
73 m_paintbox.pack_start(m_vbox_ , Gtk::PACK_EXPAND_PADDING, 0);
74
75
76 // This is the central controller strip
77 m_hbox1_.set_spacing(10);
78 m_hbox1_.set_border_width(0);
79 m_hbox1_.set_homogeneous(true);
80
81
82 // put boxed controllers into controller box
83 m_vbox2.set_spacing(6);
84 m_vbox3.set_spacing(6);
85 m_vbox4.set_spacing(6);
86 m_vbox5.set_spacing(6);
87
88 m_hbox1_.pack_start(m_vbox1, Gtk::PACK_EXPAND_PADDING);
89 m_hbox1_.pack_start(m_vbox2);
90 m_hbox1_.pack_start(m_vbox3);
91 m_hbox1_.pack_start(m_vbox4);
92 m_hbox1_.pack_start(m_vbox5);
93 m_hbox1_.pack_start(m_vbox, Gtk::PACK_EXPAND_PADDING);
94
95 // Npow put all layers in main vbox
96
97 m_vbox_.pack_start(m_hbox1_, Gtk::PACK_EXPAND_PADDING, 0);
98
99
100
101
102 // connect expose handler as resize handler
103 m_paintbox.signal_expose_event().connect(
104 sigc::mem_fun(this, &Widget::_expose_event), true);
105
106 set_app_paintable(true);
107 show_all();
108 }
109
110 Widget::~Widget()
111 {
112
113 }
114
115 // set borderwith for paintbox when widget resize
116 // to hold controllers in place
117 bool Widget::_expose_event(GdkEventExpose *event)
118 {
119 int x, y, width, height, depth;
120 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
121 //double_t height = m_paintbox.get_window()->get_height();
122 m_paintbox.set_border_width(height/10);
123 return false;
124 }
125
126 // create selectors from gxwmm
127 void Widget::make_selector(Glib::ustring labela,
128 Glib::ustring tables[],
129 size_t _size,
130 float min, float digits,
131 PortIndex port_name)
132 {
133 Gxw::Selector *regler = static_cast<Gxw::Selector*>
134 (get_controller_by_port(port_name));
135 if (regler)
136 {
137 float max = static_cast<float>(_size+1);
138
139 Gtk::TreeModelColumn<Glib::ustring> label;
140 Gtk::TreeModelColumnRecord rec;
141 rec.add(label);
142 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
143
144 for (uint32_t i = 0 ; i< _size; ++i) {
145 ls->append()->set_value(0, tables[i]);
146 }
147 regler->set_model(ls);
148 regler->set_has_tooltip();
149 regler->set_tooltip_text(labela);
150 regler->cp_configure("SELECTOR", labela, min, max, digits);
151 regler->set_show_value(false);
152 regler->set_name(plug_name);
153 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
154 *this, &Widget::on_value_changed), port_name));
155 }
156 }
157
158 // create stackboxes with controllers for port name
159 void Widget::make_controller_box(Gtk::Box *box,
160 Glib::ustring label,
161 float min, float max,
162 float digits,
163 PortIndex port_name)
164 {
165 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
166 get_controller_by_port(port_name));
167 if (regler)
168 {
169 Gtk::Label* pr = new Gtk::Label(label, 0);
170 pr->set_name("amplabel");
171 // use label images instead simple string labes
172 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
173 label_image += "/";
174 label_image += label;
175 label_image += "-label.png";
176 Gtk::Image *pr = new Gtk::Image(label_image);*/
177
178 Gtk::VBox* b1 = new Gtk::VBox();
179 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
180 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
181 regler->cp_configure("KNOB", label, min, max, digits);
182 regler->set_show_value(false);
183 regler->set_name(plug_name);
184 box->pack_start(*regler,Gtk::PACK_SHRINK);
185 Gtk::VBox* b2 = new Gtk::VBox();
186 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
187 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
188 *this, &Widget::on_value_changed), port_name));
189 }
190 }
191
192 // create stackboxes with switch controller for port name
193 void Widget::make_switch_box(Gtk::Box *box,
194 Glib::ustring label,
195 Glib::ustring label2,
196 PortIndex port_name)
197 {
198 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
199 get_controller_by_port(port_name));
200 if (regler)
201 {
202 Gtk::Label* pr = new Gtk::Label(label, 0);
203 pr->set_name("amplabel");
204 // use label images instead simple string labes
205 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
206 label_image += "/"+plug_name+"-";
207 label_image += label;
208 label_image += "-label.png";
209 Gtk::Image *pr = new Gtk::Image(label_image);*/
210
211 regler->cp_configure("switch", label, 0, 1, 1);
212 regler->set_can_focus( false ) ;
213
214 regler->set_name(plug_name);
215 regler->set_base_name( "button" );
216 Gtk::VBox* b1 = new Gtk::VBox();
217 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
218 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
219 box->pack_start(*regler,Gtk::PACK_SHRINK);
220
221 // 2nd Label
222 Gtk::Label* pr2 = new Gtk::Label(label2, 0);
223 pr2->set_name("amplabel");
224 box->pack_start( *Gtk::manage(pr2),Gtk::PACK_SHRINK);
225
226 Gtk::VBox* b2 = new Gtk::VBox();
227 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
228 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
229 *this, &Widget::on_value_changed), port_name));
230 }
231 }
232
233 // Create the Text Labels from images For Amp
234 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
235 {
236 Glib::ustring label_image = GX_LV2_STYLE_DIR;
237 label_image += "/";
238 label_image += label;
239 label_image += ".png";
240 Gtk::Image *pr = new Gtk::Image(label_image);
241
242
243 Gtk::VBox* b1 = new Gtk::VBox();
244 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
245 if( start ){
246 // std::cout << "Pack Start "<<label<<std::endl;
247 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
248 }else{
249 // std::cout << "Pack End " << label << std::endl;
250 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
251 }
252
253 Gtk::VBox* b2 = new Gtk::VBox();
254 box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
255
256 }
257 // receive controller value changes from host and set them to controller
258 void Widget::set_value(uint32_t port_index,
259 uint32_t format,
260 const void * buffer)
261 {
262 if ( format == 0 )
263 {
264 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
265 get_controller_by_port(port_index));
266 if (regler)
267 {
268 float value = *static_cast<const float*>(buffer);
269 regler->cp_set_value(value);
270 }
271 }
272 }
273
274 // write (UI) controller value changes to the host->engine
275 void Widget::on_value_changed(uint32_t port_index)
276 {
277 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
278 get_controller_by_port(port_index));
279 if (regler)
280 {
281 float value = regler->cp_get_value();
282 write_function(controller, port_index, sizeof(float), 0,
283 static_cast<const void*>(&value));
284 }
285 }
286
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxtubevibrato.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 Glib::ustring label2,
53 PortIndex port_name);
54 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plugname);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::VBox m_vbox;
80 Gtk::VBox m_vbox1;
81 Gtk::VBox m_vbox2;
82 Gtk::VBox m_vbox3;
83 Gtk::VBox m_vbox4;
84 Gtk::VBox m_vbox5;
85 Gtk::VBox m_vbox6;
86 Gtk::VBox m_vbox7;
87 Gtk::HBox m_hbox_;
88 Gtk::HBox m_hbox1_;
89 Gtk::HBox m_hbox2_;
90
91 Gxw::PaintBox m_paintbox;
92 Gxw::BigKnob m_bigknob;
93 Gxw::BigKnob m_bigknob1;
94 Gxw::BigKnob m_bigknob2;
95 Gxw::Switch m_switch;
96 };
97
98 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxtubevibrato.lv2'
10
11 src = ['gxtubevibrato.cpp'
12 ]
13 incl = ['../faust','./', '../DSP']
14 lib = []
15 if sys.platform.startswith("linux"):
16 lib.append('dl')
17 uselib = ['LV2CORE']
18 cxxflag =[]
19 if not bld.env['OPT'] and bld.env['SSE2']:
20 cxxflag = [ "-msse2", "-mfpmath=sse"]
21 lv2_effects = bld(
22 features='cxx cshlib ',
23 includes = incl,
24 lib = lib,
25 uselib = uselib,
26 obj_ext = '_5.o',
27 cxxflags = cxxflag,
28 defines = ["LV2_SO"],
29 target = 'gxtubevibrato',
30 source = src,
31 install_path = '${LV2DIR}/%s' % bundle,
32 chmod = 0o755,
33 )
34 lv2_effects.env['shlib_PATTERN'] = '%s.so'
35
36 uselib_local5 = []
37 libpath5 = []
38 lib5 = []
39 incl5 = ['../../../libgxwmm','../../../libgxw','../']
40 if sys.platform.startswith("linux"):
41 lib5.append('dl')
42 if bld.env["GX_LIB_SHARED"]:
43 lib5 += ['gxwmm','gxw']
44 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
45 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
46 else:
47 uselib_local5 += ['gxwmm','gxw']
48
49 lv2_effetcs_gui = bld(
50 features='cxx cshlib ',
51 includes = incl5,
52 lib = lib5,
53 uselib = 'LV2CORE GTKMM',
54 libpath = libpath5,
55 uselib_local = uselib_local5,
56 linkflags = '-Wl,-z,nodelete',
57 defines = ["LV2_GUI"],
58 target = 'gxtubevibrato_gui',
59 source = 'widget.cpp gxtubevibrato_gui.cpp',
60 install_path = '${LV2DIR}/%s' % bundle,
61 chmod = 0o755,
62 )
63 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
64
65
66 install_path = '${LV2DIR}/%s' % bundle,
67 bld.install_files('${LV2DIR}/gxtubevibrato.lv2', 'manifest.ttl')
68 bld.install_files('${LV2DIR}/gxtubevibrato.lv2', 'gxtubevibrato.ttl')
69
0 /*
1 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
2 * Copyright (C) 2011 Pete Shorthose
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 * --------------------------------------------------------------------------
18 */
19
20 /* ------- This is the guitarix tuner, part of gx_engine_audio.cpp ------- */
21
22 /****************************************************************
23 ** Pitch Tracker
24 **
25 ** some code and ideas taken from K4Guitune (William Spinelli)
26 ** changed to NSDF method (some code from tartini / Philip McLeod)
27 **
28 */
29
30
31 // downsampling factor
32 static const int DOWNSAMPLE = 2;
33 static const float SIGNAL_THRESHOLD_ON = 0.001;
34 static const float SIGNAL_THRESHOLD_OFF = 0.0009;
35 static const float TRACKER_PERIOD = 0.1;
36 // The size of the read buffer
37 static const int FFT_SIZE = 2048;
38
39
40 void *PitchTracker::static_run(void *p) {
41 (reinterpret_cast<PitchTracker *>(p))->run();
42 return NULL;
43 }
44
45 PitchTracker::PitchTracker()
46 : error(false),
47 busy(false),
48 tick(0),
49 m_pthr(0),
50 resamp(),
51 m_sampleRate(),
52 m_freq(-1),
53 signal_threshold_on(SIGNAL_THRESHOLD_ON),
54 signal_threshold_off(SIGNAL_THRESHOLD_OFF),
55 tracker_period(TRACKER_PERIOD),
56 m_buffersize(),
57 m_fftSize(),
58 m_buffer(new float[FFT_SIZE]),
59 m_bufferIndex(0),
60 m_input(new float[FFT_SIZE]),
61 m_audioLevel(false),
62 m_fftwPlanFFT(0),
63 m_fftwPlanIFFT(0) {
64 const int size = FFT_SIZE + (FFT_SIZE+1) / 2;
65 m_fftwBufferTime = reinterpret_cast<float*>
66 (fftwf_malloc(size * sizeof(*m_fftwBufferTime)));
67 m_fftwBufferFreq = reinterpret_cast<float*>
68 (fftwf_malloc(size * sizeof(*m_fftwBufferFreq)));
69
70 memset(m_buffer, 0, FFT_SIZE * sizeof(*m_buffer));
71 memset(m_input, 0, FFT_SIZE * sizeof(*m_input));
72 memset(m_fftwBufferTime, 0, size * sizeof(*m_fftwBufferTime));
73 memset(m_fftwBufferFreq, 0, size * sizeof(*m_fftwBufferFreq));
74
75 sem_init(&m_trig, 0, 0);
76
77 if (!m_buffer || !m_input || !m_fftwBufferTime || !m_fftwBufferFreq) {
78 error = true;
79 }
80 }
81
82
83 PitchTracker::~PitchTracker() {
84 stop_thread();
85 fftwf_destroy_plan(m_fftwPlanFFT);
86 fftwf_destroy_plan(m_fftwPlanIFFT);
87 fftwf_free(m_fftwBufferTime);
88 fftwf_free(m_fftwBufferFreq);
89 delete[] m_input;
90 delete[] m_buffer;
91 }
92
93 void PitchTracker::set_threshold(float v) {
94 signal_threshold_on = v;
95 signal_threshold_off = v*0.9;
96 }
97
98 void PitchTracker::set_fast_note_detection(bool v) {
99 if (v) {
100 signal_threshold_on = SIGNAL_THRESHOLD_ON * 5;
101 signal_threshold_off = SIGNAL_THRESHOLD_OFF * 5;
102 tracker_period = TRACKER_PERIOD / 10;
103 } else {
104 signal_threshold_on = SIGNAL_THRESHOLD_ON;
105 signal_threshold_off = SIGNAL_THRESHOLD_OFF;
106 tracker_period = TRACKER_PERIOD;
107 }
108 }
109
110 bool PitchTracker::setParameters(int priority, int policy, int sampleRate, int buffersize) {
111 assert(buffersize <= FFT_SIZE);
112
113 if (error) {
114 return false;
115 }
116 m_sampleRate = sampleRate / DOWNSAMPLE;
117 resamp.setup(sampleRate, m_sampleRate, 1, 16); // 16 == least quality
118
119 if (m_buffersize != buffersize) {
120 m_buffersize = buffersize;
121 m_fftSize = m_buffersize + (m_buffersize+1) / 2;
122 fftwf_destroy_plan(m_fftwPlanFFT);
123 fftwf_destroy_plan(m_fftwPlanIFFT);
124 m_fftwPlanFFT = fftwf_plan_r2r_1d(
125 m_fftSize, m_fftwBufferTime, m_fftwBufferFreq,
126 FFTW_R2HC, FFTW_ESTIMATE);
127 m_fftwPlanIFFT = fftwf_plan_r2r_1d(
128 m_fftSize, m_fftwBufferFreq, m_fftwBufferTime,
129 FFTW_HC2R, FFTW_ESTIMATE);
130 }
131
132 if (!m_fftwPlanFFT || !m_fftwPlanIFFT) {
133 error = true;
134 return false;
135 }
136
137 if (!m_pthr) {
138 start_thread(priority, policy);
139 }
140 return !error;
141 }
142
143 void PitchTracker::stop_thread() {
144 pthread_cancel (m_pthr);
145 pthread_join (m_pthr, NULL);
146 }
147
148 void PitchTracker::start_thread(int priority, int policy) {
149 pthread_attr_t attr;
150 struct sched_param spar;
151 spar.sched_priority = priority;
152 pthread_attr_init(&attr);
153 pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_JOINABLE );
154 pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);
155 pthread_attr_setschedpolicy(&attr, policy);
156 pthread_attr_setschedparam(&attr, &spar);
157 pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
158 pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
159 // pthread_attr_setstacksize(&attr, 0x10000);
160 if (pthread_create(&m_pthr, &attr, static_run,
161 reinterpret_cast<void*>(this))) {
162 error = true;
163 }
164 pthread_attr_destroy(&attr);
165 }
166
167 void PitchTracker::init(int priority, int policy, unsigned int samplerate) {
168 setParameters(priority, policy, samplerate, FFT_SIZE);
169 }
170
171 void PitchTracker::reset() {
172 tick = 0;
173 m_bufferIndex = 0;
174 resamp.reset();
175 m_freq = -1;
176 }
177
178 void PitchTracker::add(int count, float* input) {
179 if (error) {
180 return;
181 }
182 resamp.inp_count = count;
183 resamp.inp_data = input;
184 for (;;) {
185 resamp.out_data = &m_buffer[m_bufferIndex];
186 int n = FFT_SIZE - m_bufferIndex;
187 resamp.out_count = n;
188 resamp.process();
189 n -= resamp.out_count; // n := number of output samples
190 if (!n) { // all soaked up by filter
191 return;
192 }
193 m_bufferIndex = (m_bufferIndex + n) % FFT_SIZE;
194 if (resamp.inp_count == 0) {
195 break;
196 }
197 }
198 if (++tick * count >= m_sampleRate * DOWNSAMPLE * tracker_period) {
199 if (busy) {
200 return;
201 }
202 busy = true;
203 tick = 0;
204 copy();
205 sem_post(&m_trig);
206 }
207 }
208
209 void PitchTracker::copy() {
210 int start = (FFT_SIZE + m_bufferIndex - m_buffersize) % FFT_SIZE;
211 int end = (FFT_SIZE + m_bufferIndex) % FFT_SIZE;
212 int cnt = 0;
213 if (start >= end) {
214 cnt = FFT_SIZE - start;
215 memcpy(m_input, &m_buffer[start], cnt * sizeof(*m_input));
216 start = 0;
217 }
218 memcpy(&m_input[cnt], &m_buffer[start], (end - start) * sizeof(*m_input));
219 }
220
221 inline float sq(float x) {
222 return x * x;
223 }
224
225 inline void parabolaTurningPoint(float y_1, float y0, float y1, float xOffset, float *x) {
226 float yTop = y_1 - y1;
227 float yBottom = y1 + y_1 - 2 * y0;
228 if (yBottom != 0.0) {
229 *x = xOffset + yTop / (2 * yBottom);
230 } else {
231 *x = xOffset;
232 }
233 }
234
235 static int findMaxima(float *input, int len, int *maxPositions, int *length, int maxLen) {
236 int pos = 0;
237 int curMaxPos = 0;
238 int overallMaxIndex = 0;
239
240 while (pos < (len-1)/3 && input[pos] > 0.0) {
241 pos += 1; // find the first negitive zero crossing
242 }
243 while (pos < len-1 && input[pos] <= 0.0) {
244 pos += 1; // loop over all the values below zero
245 }
246 if (pos == 0) {
247 pos = 1; // can happen if output[0] is NAN
248 }
249 while (pos < len-1) {
250 if (input[pos] > input[pos-1] && input[pos] >= input[pos+1]) { // a local maxima
251 if (curMaxPos == 0) {
252 curMaxPos = pos; // the first maxima (between zero crossings)
253 } else if (input[pos] > input[curMaxPos]) {
254 curMaxPos = pos; // a higher maxima (between the zero crossings)
255 }
256 }
257 pos += 1;
258 if (pos < len-1 && input[pos] <= 0.0) { // a negative zero crossing
259 if (curMaxPos > 0) { // if there was a maximum
260 maxPositions[*length] = curMaxPos; // add it to the vector of maxima
261 *length += 1;
262 if (overallMaxIndex == 0) {
263 overallMaxIndex = curMaxPos;
264 } else if (input[curMaxPos] > input[overallMaxIndex]) {
265 overallMaxIndex = curMaxPos;
266 }
267 if (*length >= maxLen) {
268 return overallMaxIndex;
269 }
270 curMaxPos = 0; // clear the maximum position, so we start looking for a new ones
271 }
272 while (pos < len-1 && input[pos] <= 0.0) {
273 pos += 1; // loop over all the values below zero
274 }
275 }
276 }
277 if (curMaxPos > 0) { // if there was a maximum in the last part
278 maxPositions[*length] = curMaxPos; // add it to the vector of maxima
279 *length += 1;
280 if (overallMaxIndex == 0) {
281 overallMaxIndex = curMaxPos;
282 } else if (input[curMaxPos] > input[overallMaxIndex]) {
283 overallMaxIndex = curMaxPos;
284 }
285 curMaxPos = 0; // clear the maximum position, so we start looking for a new ones
286 }
287 return overallMaxIndex;
288 }
289
290 static int findsubMaximum(float *input, int len, float threshold) {
291 int indices[10];
292 int length = 0;
293 int overallMaxIndex = findMaxima(input, len, indices, &length, 10);
294 if (length == 0) {
295 return -1;
296 }
297 threshold += (1.0 - threshold) * (1.0 - input[overallMaxIndex]);
298 float cutoff = input[overallMaxIndex] * threshold;
299 for (int j = 0; j < length; j++) {
300 if (input[indices[j]] >= cutoff) {
301 return indices[j];
302 }
303 }
304 // should never get here
305 return -1;
306 }
307
308 void PitchTracker::run() {
309 for (;;) {
310 busy = false;
311 sem_wait(&m_trig);
312 if (error) {
313 continue;
314 }
315 float sum = 0.0;
316 for (int k = 0; k < m_buffersize; ++k) {
317 sum += fabs(m_input[k]);
318 }
319 float threshold = (m_audioLevel ? signal_threshold_off : signal_threshold_on);
320 m_audioLevel = (sum / m_buffersize >= threshold);
321 if ( m_audioLevel == false ) {
322 if (m_freq != 0) {
323 m_freq = 0;
324 new_freq();
325 }
326 continue;
327 }
328
329 memcpy(m_fftwBufferTime, m_input, m_buffersize * sizeof(*m_fftwBufferTime));
330 memset(m_fftwBufferTime+m_buffersize, 0, (m_fftSize - m_buffersize) * sizeof(*m_fftwBufferTime));
331 fftwf_execute(m_fftwPlanFFT);
332 for (int k = 1; k < m_fftSize/2; k++) {
333 m_fftwBufferFreq[k] = sq(m_fftwBufferFreq[k]) + sq(m_fftwBufferFreq[m_fftSize-k]);
334 m_fftwBufferFreq[m_fftSize-k] = 0.0;
335 }
336 m_fftwBufferFreq[0] = sq(m_fftwBufferFreq[0]);
337 m_fftwBufferFreq[m_fftSize/2] = sq(m_fftwBufferFreq[m_fftSize/2]);
338
339 fftwf_execute(m_fftwPlanIFFT);
340
341 double sumSq = 2.0 * static_cast<double>(m_fftwBufferTime[0]) / static_cast<double>(m_fftSize);
342 for (int k = 0; k < m_fftSize - m_buffersize; k++) {
343 m_fftwBufferTime[k] = m_fftwBufferTime[k+1] / static_cast<float>(m_fftSize);
344 }
345
346 int count = (m_buffersize + 1) / 2;
347 for (int k = 0; k < count; k++) {
348 sumSq -= sq(m_input[m_buffersize-1-k]) + sq(m_input[k]);
349 // dividing by zero is very slow, so deal with it seperately
350 if (sumSq > 0.0) {
351 m_fftwBufferTime[k] *= 2.0 / sumSq;
352 } else {
353 m_fftwBufferTime[k] = 0.0;
354 }
355 }
356 const float thres = 0.99; // was 0.6
357 int maxAutocorrIndex = findsubMaximum(m_fftwBufferTime, count, thres);
358
359 float x = 0.0;
360 if (maxAutocorrIndex >= 0) {
361 parabolaTurningPoint(m_fftwBufferTime[maxAutocorrIndex-1],
362 m_fftwBufferTime[maxAutocorrIndex],
363 m_fftwBufferTime[maxAutocorrIndex+1],
364 maxAutocorrIndex+1, &x);
365 x = m_sampleRate / x;
366 if (x > 999.0) { // precision drops above 1000 Hz
367 x = 0.0;
368 }
369 }
370 if (m_freq != x) {
371 m_freq = x;
372 new_freq();
373 }
374 }
375 }
376
377 float PitchTracker::get_estimated_note() {
378 return m_freq <= 0.0 ? 1000.0 : 12 * log2f(2.272727e-03f * m_freq);
379 }
380
381
0 /*
1 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
2 * Copyright (C) 2011 Pete Shorthose
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 * --------------------------------------------------------------------------
18 */
19
20 /* ------- This is the guitarix Engine namespace ------- */
21
22 #pragma once
23
24 #ifndef SRC_HEADERS_GX_PITCH_TRACKER_H_
25 #define SRC_HEADERS_GX_PITCH_TRACKER_H_
26 #include <fftw3.h>
27 #include <semaphore.h>
28
29 /* ------------- Pitch Tracker ------------- */
30
31 class PitchTracker {
32 public:
33 PitchTracker();
34 ~PitchTracker();
35 void init(int priority, int policy, unsigned int samplerate);
36 void add(int count, float *input);
37 float get_estimated_freq() { return m_freq < 0 ? 0 : m_freq; }
38 float get_estimated_note();
39 void stop_thread();
40 void reset();
41 void set_threshold(float v);
42 void set_fast_note_detection(bool v);
43 Glib::Dispatcher new_freq;
44 private:
45 bool setParameters(int priority, int policy, int sampleRate, int fftSize );
46 void run();
47 static void *static_run(void* p);
48 void start_thread(int policy, int priority);
49 void copy();
50 bool error;
51 volatile bool busy;
52 int tick;
53 sem_t m_trig;
54 pthread_t m_pthr;
55 Resampler resamp;
56 int m_sampleRate;
57 float m_freq;
58 // Value of the threshold above which
59 // the processing is activated.
60 float signal_threshold_on;
61 // Value of the threshold below which
62 // the input audio signal is deactivated.
63 float signal_threshold_off;
64 // Time between frequency estimates (in seconds)
65 float tracker_period;
66 // number of samples in input buffer
67 int m_buffersize;
68 // Size of the FFT window.
69 int m_fftSize;
70 // The audio buffer that stores the input signal.
71 float *m_buffer;
72 // Index of the first empty position in the buffer.
73 int m_bufferIndex;
74 // buffer for input signal
75 float *m_input;
76 // Whether or not the input level is high enough.
77 bool m_audioLevel;
78 // Support buffer used to store signals in the time domain.
79 float *m_fftwBufferTime;
80 // Support buffer used to store signals in the frequency domain.
81 float *m_fftwBufferFreq;
82 // Plan to compute the FFT of a given signal.
83 fftwf_plan m_fftwPlanFFT;
84 // Plan to compute the IFFT of a given signal (with additional zero-padding).
85 fftwf_plan m_fftwPlanIFFT;
86 };
87
88
89 #endif // SRC_HEADERS_GX_PITCH_TRACKER_H_
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 ////////////////////////////// LOCAL INCLUDES //////////////////////////
21 #include <glibmm.h>
22 #include "gx_common.h" // faust support and denormal protection (SSE)
23 #include "gxtuner.h" // define struct PortIndex
24 #include "gx_pluginlv2.h" // define struct PluginLV2
25 #include "gx_resampler.h"
26 #include "tuner.cc" // dsp class generated by faust -> dsp2cc
27 #include "gx_pitch_tracker.cpp"
28
29 #include "cab_data.cc"
30
31 ////////////////////////////// PLUG-IN CLASS ///////////////////////////
32
33 class Gxtuner
34 {
35 private:
36 // internal stuff
37 float* output;
38 float* input;
39 float* freq;
40 float threshold;
41 float* threshold_;
42 PluginLV2* tuner_adapter;
43
44 inline void run_dsp_mono(uint32_t n_samples);
45 inline void connect_mono(uint32_t port,void* data);
46 inline void init_dsp_mono(uint32_t rate);
47 inline void connect_all_mono_ports(uint32_t port, void* data);
48 inline void activate_f();
49 inline void deactivate_f();
50 inline void clean_up();
51 public:
52 // LV2 Descriptor
53 static const LV2_Descriptor descriptor;
54 // static wrapper to private functions
55 static void deactivate(LV2_Handle instance);
56 static void cleanup(LV2_Handle instance);
57 static void run(LV2_Handle instance, uint32_t n_samples);
58 static void activate(LV2_Handle instance);
59 static void connect_port(LV2_Handle instance, uint32_t port, void* data);
60 static LV2_Handle instantiate(const LV2_Descriptor* descriptor,
61 double rate, const char* bundle_path,
62 const LV2_Feature* const* features);
63 Gxtuner();
64 ~Gxtuner();
65 };
66
67 // constructor
68 Gxtuner::Gxtuner() :
69 output(NULL),
70 input(NULL),
71 tuner_adapter(plugin())
72 {};
73
74 // destructor
75 Gxtuner::~Gxtuner()
76 {
77 // just to be sure the plug have given free the allocated mem
78 // it didn't hurd if the mem is already given free by clean_up()
79 if (tuner_adapter->activate_plugin !=0)
80 tuner_adapter->activate_plugin(false, tuner_adapter);
81 // delete DSP class
82 tuner_adapter->delete_instance(tuner_adapter);
83
84 };
85
86 ////////////////////////////// PRIVATE CLASS FUNCTIONS ////////////////
87
88 void Gxtuner::init_dsp_mono(uint32_t rate)
89 {
90 AVOIDDENORMALS(); // init the SSE denormal protection
91 tuner_adapter->set_samplerate(rate, tuner_adapter); // init the DSP class
92 }
93
94 // connect the Ports used by the plug-in class
95 void Gxtuner::connect_mono(uint32_t port,void* data)
96 {
97 switch ((PortIndex)port)
98 {
99 case FREQ:
100 freq = static_cast<float*>(data);
101 break;
102 case THRESHOLD:
103 threshold_ = static_cast<float*>(data) ;
104 break;
105 case EFFECTS_OUTPUT:
106 output = static_cast<float*>(data);
107 break;
108 case EFFECTS_INPUT:
109 input = static_cast<float*>(data);
110 break;
111 default:
112 break;
113 }
114 }
115
116 void Gxtuner::activate_f()
117 {
118 // allocate the internal DSP mem
119 if (tuner_adapter->activate_plugin !=0)
120 tuner_adapter->activate_plugin(true, tuner_adapter);
121 }
122
123 void Gxtuner::clean_up()
124 {
125 // delete the internal DSP mem
126 if (tuner_adapter->activate_plugin !=0)
127 tuner_adapter->activate_plugin(false, tuner_adapter);
128 }
129
130 void Gxtuner::deactivate_f()
131 {
132 // delete the internal DSP mem
133 if (tuner_adapter->activate_plugin !=0)
134 tuner_adapter->activate_plugin(false, tuner_adapter);
135 }
136
137 void Gxtuner::run_dsp_mono(uint32_t n_samples)
138 {
139 tuner& self = *static_cast<tuner*>(tuner_adapter);
140 if (threshold != *(threshold_))
141 {
142 threshold = *(threshold_);
143 self.set_threshold_level(threshold);
144 }
145
146 tuner_adapter->mono_audio(static_cast<int>(n_samples), input, output, tuner_adapter);
147 *(freq) = self.get_freq();
148 //printf("frequency value %f\n",*(freq));
149 memcpy(output, input, n_samples * sizeof(float));
150 }
151
152 void Gxtuner::connect_all_mono_ports(uint32_t port, void* data)
153 {
154 // connect the Ports used by the plug-in class
155 connect_mono(port,data);
156 // connect the Ports used by the DSP class
157 // tuner_adapter->connect_ports(port, data, tuner_adapter);
158 }
159
160 ///////////////////////// STATIC CLASS FUNCTIONS /////////////////////
161
162 LV2_Handle
163 Gxtuner::instantiate(const LV2_Descriptor* descriptor,
164 double rate,
165 const char* bundle_path,
166 const LV2_Feature* const* features)
167 {
168 // init the plug-in class
169 Gxtuner *self = new Gxtuner();
170 if (!self)
171 {
172 return NULL;
173 }
174
175 self->init_dsp_mono((uint32_t)rate);
176 return (LV2_Handle)self;
177 }
178
179 void Gxtuner::connect_port(LV2_Handle instance,
180 uint32_t port,
181 void* data)
182 {
183 // connect all ports
184 static_cast<Gxtuner*>(instance)->connect_all_mono_ports(port, data);
185 }
186
187 void Gxtuner::activate(LV2_Handle instance)
188 {
189 // allocate needed mem
190 static_cast<Gxtuner*>(instance)->activate_f();
191 }
192
193 void Gxtuner::run(LV2_Handle instance, uint32_t n_samples)
194 {
195 // run dsp
196 static_cast<Gxtuner*>(instance)->run_dsp_mono(n_samples);
197 }
198
199 void Gxtuner::deactivate(LV2_Handle instance)
200 {
201 // free allocated mem
202 static_cast<Gxtuner*>(instance)->deactivate_f();
203 }
204
205 void Gxtuner::cleanup(LV2_Handle instance)
206 {
207 // well, clean up after us
208 Gxtuner* self = static_cast<Gxtuner*>(instance);
209 self->clean_up();
210 delete self;
211 }
212
213 const LV2_Descriptor Gxtuner::descriptor =
214 {
215 GXPLUGIN_URI "#tuner",
216 instantiate,
217 connect_port,
218 activate,
219 run,
220 deactivate,
221 cleanup,
222 NULL
223 };
224
225 ///////////////////////////// LV2 DESCRIPTOR ///////////////////////////
226
227 extern "C"
228 LV2_SYMBOL_EXPORT
229 const LV2_Descriptor*
230 lv2_descriptor(uint32_t index)
231 {
232 switch (index)
233 {
234 case 0:
235 return &Gxtuner::descriptor;
236 default:
237 return NULL;
238 }
239 }
240
241 ///////////////////////////// FIN //////////////////////////////////////
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_GXEFFECTS_H_
22 #define SRC_HEADERS_GXEFFECTS_H_
23
24 #include <lv2.h>
25 #include "lv2/lv2plug.in/ns/ext/state/state.h"
26 #include "lv2/lv2plug.in/ns/ext/presets/presets.h"
27 #include <lv2/lv2plug.in/ns/ext/buf-size/buf-size.h>
28 #include <lv2/lv2plug.in/ns/ext/options/options.h>
29 #include <lv2/lv2plug.in/ns/ext/atom/atom.h>
30 #include <lv2/lv2plug.in/ns/ext/log/log.h>
31 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
32
33 #define GXPLUGIN_URI "http://guitarix.sourceforge.net/plugins/gxtuner"
34 #define GXPLUGIN_UI_URI "http://guitarix.sourceforge.net/plugins/gxtuner#gui"
35
36
37 typedef enum
38 {
39 FREQ,
40 REFFREQ,
41 TUNEMODE,
42 THRESHOLD,
43 EFFECTS_OUTPUT,
44 EFFECTS_INPUT,
45 } PortIndex;
46
47 #endif //SRC_HEADERS_GXEFFECTS_H_
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19
20 @prefix doap: <http://usefulinc.com/ns/doap#> .
21 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
22 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
23 @prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
24 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
25 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
26 @prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
27
28 <http://guitarix.sourceforge.net#me>
29 a foaf:Person ;
30 foaf:name "Guitarix team" ;
31 foaf:mbox <mailto:brummer@web.de> ;
32 rdfs:seeAlso <http://guitarix.sourceforge.net> .
33
34 <http://guitarix.sourceforge.net/plugins/gxtuner>
35 a doap:Project ;
36 doap:maintainer <http://guitarix.sourceforge.net#me> ;
37 doap:name "GxTuner" .
38
39 <http://guitarix.sourceforge.net/plugins/gxtuner#tuner>
40 a lv2:Plugin ,
41 lv2:AnalyserPlugin ;
42 doap:maintainer <http://guitarix.sourceforge.net#me> ;
43 doap:name "GxTuner";
44 doap:license <http://opensource.org/licenses/isc> ;
45 lv2:project <http://guitarix.sourceforge.net/plugins/gxtuner> ;
46 lv2:optionalFeature lv2:hardRTCapable ;
47
48 guiext:ui <http://guitarix.sourceforge.net/plugins/gxtuner#gui>;
49
50 lv2:port [
51 a lv2:ControlPort, lv2:OutputPort ;
52 lv2:index 0 ;
53 lv2:symbol "FREQ" ;
54 lv2:name "FREQ";
55 lv2:default 0.0 ;
56 lv2:minimum 0.0 ;
57 lv2:maximum 1000.0 ;
58 ] , [
59 a lv2:InputPort ,
60 lv2:ControlPort ;
61 lv2:index 1 ;
62 lv2:symbol "REFFREQ" ;
63 lv2:name "REFFREQ";
64 lv2:default 440.0 ;
65 lv2:minimum 427.0 ;
66 lv2:maximum 453.0 ;
67 ] ,[
68 a lv2:InputPort ,
69 lv2:ControlPort ;
70 lv2:index 2 ;
71 lv2:symbol "TUNER_MODE" ;
72 lv2:name "Tuner Mode";
73 lv2:portProperty lv2:integer;
74 lv2:portProperty lv2:enumeration ;
75 lv2:default 0 ;
76 lv2:minimum 0 ;
77 lv2:maximum 1 ;
78 lv2:scalePoint [rdfs:label "(Chromatic)"; rdf:value 0];
79 lv2:scalePoint [rdfs:label "Standard/E"; rdf:value 1];
80 lv2:scalePoint [rdfs:label "Standard/Es"; rdf:value 2];
81 lv2:scalePoint [rdfs:label "Open E"; rdf:value 3];
82 ] , [
83 a lv2:InputPort ,
84 lv2:ControlPort ;
85 lv2:index 3 ;
86 lv2:symbol "THRESHOLD" ;
87 lv2:name "THRESHOLD";
88 lv2:default 0.001 ;
89 lv2:minimum 0.001 ;
90 lv2:maximum 0.1 ;
91 ] , [
92 a lv2:AudioPort ,
93 lv2:OutputPort ;
94 lv2:index 4 ;
95 lv2:symbol "out" ;
96 lv2:name "Out" ;
97 ] , [
98 a lv2:AudioPort ,
99 lv2:InputPort ;
100 lv2:index 5 ;
101 lv2:symbol "in" ;
102 lv2:name "In" ;
103 ].
104
105 <http://guitarix.sourceforge.net/plugins/gxtuner#gui>
106 a guiext:GtkUI;
107 guiext:binary <gxtuner_gui.so>;
108 guiext:requiredFeature guiext:makeResident .
109
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include <string>
21 #include <iostream>
22
23 #include <gtkmm.h>
24 #include "gxtuner.h"
25 #include "widget.h"
26
27
28 #include <lv2.h>
29 #include <lv2/lv2plug.in/ns/extensions/ui/ui.h>
30
31 using namespace std;
32
33 class GxtunerGUI
34 {
35 private:
36
37 Glib::ustring plugskin;
38 Glib::ustring addKnob;
39 Glib::ustring plug_name;
40 void set_knob(Glib::ustring knob);
41 void set_skin();
42 void set_plug_name(const char * plugin_uri);
43 GtkWidget* make_gui();
44 Widget* widget;
45
46 public:
47
48 static LV2UI_Handle instantiate(const struct _LV2UI_Descriptor * descriptor,
49 const char * plugin_uri,
50 const char * bundle_path,
51 LV2UI_Write_Function write_function,
52 LV2UI_Controller controller,
53 LV2UI_Widget * widget,
54 const LV2_Feature * const * features);
55
56 static void port_event(LV2UI_Handle ui, uint32_t port_index,
57 uint32_t buffer_size, uint32_t format,
58 const void * buffer);
59
60 static LV2UI_Descriptor descriptors[];
61 static void cleanup(LV2UI_Handle ui);
62
63 GxtunerGUI () {};
64 ~GxtunerGUI () {};
65 } ;
66
67 void GxtunerGUI::set_knob(Glib::ustring knob)
68 {
69 addKnob = " style 'gx_";
70 addKnob += plug_name;
71 addKnob += "_dark_skin_icons'\n"
72 " { \n"
73 " stock['bigknob'] = {{'";
74 addKnob += knob;
75 addKnob += ".png'}}\n";
76 addKnob += " stock['smallknobr'] = {{'";
77 addKnob += knob;
78 addKnob += "-middle.png'}}\n";
79 addKnob += " stock['button_on'] = {{'"
80 "chump-switch_on.png'}}\n"
81 " stock['button_off'] = {{'"
82 "chump-switch_off.png'}}\n"
83 " }\n"
84 "widget '*.";
85 addKnob += plug_name;
86 addKnob += "' style 'gx_";
87 addKnob += plug_name;
88 addKnob += "_dark_skin_icons' \n"
89 "class '*GxToggleImage' style'gx_";
90 addKnob += plug_name;
91 addKnob += "_dark_skin_icons' \n";
92 }
93
94 void GxtunerGUI::set_skin()
95 {
96 Glib::ustring toparse = "pixmap_path ";
97 toparse += " '";
98 toparse += GX_LV2_STYLE_DIR;
99 toparse += "/'\n";
100 toparse += "style \"gx_";
101 toparse += plug_name;
102 toparse += "_dark-paintbox\"\n"
103 " { \n"
104 "GxPaintBox::skin-gradient = {\n"
105 "{ 65536, 0, 0, 13107, 52428 }, \n"
106 "{ 52428, 0, 0, 0, 52428 },\n"
107 "{ 13107, 0, 0, 13107, 13107 }}\n"
108 " GxPaintBox::box-gradient = {\n"
109 "{ 0, 61, 61, 61, 62428 }, \n"
110 "{ 22768, 80, 83, 80, 42428 }, \n"
111 "{ 52428, 8, 8, 80, 32428 }, \n"
112 "{ 65536, 4, 4, 4, 52428 }} \n"
113
114 " GxPaintBox::icon-set =11\n"
115 " stock['amp_skin'] = {{'";
116 toparse += plugskin;
117 toparse += "'}}\n"
118 " }\n";
119 toparse += "style 'gx_headtuner_box' \n"
120 " { \n"
121 " fg[NORMAL] = '#888888' \n"
122 "font_name = 'sans 7.5' \n"
123 " }\n";
124 toparse += addKnob;
125
126 toparse += " widget '*.amplabel' style:highest 'gx_headtuner_box'\n"
127 "widget '*.";
128 toparse += plug_name;
129 toparse += "' style 'gx_";
130 toparse += plug_name;
131 toparse += "_dark-paintbox' ";
132 toparse += "style 'gx_switch'\n"
133 "{\n"
134 "xthickness = 0\n"
135 "ythickness = 0\n"
136 "GtkButton::inner-border = {0, 0, 0, 0}\n"
137 "GtkButton::default-border = {0, 0, 0, 0}\n"
138 "GtkButton::focus-line-width = 0\n"
139 "GtkButton::focus-padding = 0\n"
140 "GtkButton::interior-focus = 0\n"
141 "GtkButton::child-displacement-x = 0\n"
142 "GtkButton::child-displacement-y = 0\n"
143 " }\n"
144 "widget '*.";
145 toparse += plug_name;
146 toparse += "' style:highest 'gx_switch'\n";
147 toparse += " style 'gx_selector_";
148 toparse += plug_name;
149 toparse += "'\n"
150 " {\n"
151 " fg[NORMAL] = '#888888'\n"
152 " GtkRange::trough-border = 2\n"
153 " GtkRange::stepper-size = 8\n"
154 " GtkRange::stepper-spacing = 2\n"
155 " GxRegler::value-border = { 2, 0, 0, 0 }\n"
156 " font_name = 'sans 7.5'\n"
157 " xthickness = 10\n"
158 " ythickness = 1\n"
159 " }\n"
160 "widget '*.";
161 toparse += plug_name;
162 toparse += "' style:highest 'gx_selector_";
163 toparse += plug_name;
164 toparse += "'\n";
165
166 gtk_rc_parse_string (toparse.c_str());
167 }
168
169 void GxtunerGUI::set_plug_name(const char * plugin_uri)
170 {
171 addKnob = "";
172
173 if (strcmp("http://guitarix.sourceforge.net/plugins/gxtuner#tuner", plugin_uri) == 0)
174 {
175 plugskin = "metalamp.png";
176 plug_name = "gxtuner";
177 set_knob("sn-knob");
178 }
179 else
180 {
181 plugskin = "preampmono.png";
182 plug_name = "gxtuner";
183 }
184 }
185
186 GtkWidget* GxtunerGUI::make_gui()
187 {
188 // init the gxwmm library
189 Gxw::init();
190 set_skin();
191 GtkWidget* container = gtk_vbox_new(FALSE, 0);
192 widget = new Widget(plug_name);
193 GtkWidget* cWidget = GTK_WIDGET(widget->gobj());
194 gtk_container_add(GTK_CONTAINER(container), cWidget );
195
196 return container;
197 }
198
199
200 LV2UI_Handle GxtunerGUI::instantiate(const struct _LV2UI_Descriptor * descriptor,
201 const char * plugin_uri,
202 const char * bundle_path,
203 LV2UI_Write_Function write_function,
204 LV2UI_Controller controller,
205 LV2UI_Widget * widget,
206 const LV2_Feature * const * features)
207 {
208 GxtunerGUI* self = new GxtunerGUI();
209 if (self == NULL) return NULL;
210 self->set_plug_name(plugin_uri);
211 *widget = (LV2UI_Widget)self->make_gui();
212 self->widget->controller = controller;
213 self->widget->write_function = write_function;
214 return (LV2UI_Handle)self;
215 }
216
217 void GxtunerGUI::cleanup(LV2UI_Handle ui)
218 {
219 GxtunerGUI *pluginGui = static_cast<GxtunerGUI*>(ui);
220 delete pluginGui->widget;
221 delete pluginGui;
222 }
223
224 void GxtunerGUI::port_event(LV2UI_Handle ui,
225 uint32_t port_index,
226 uint32_t buffer_size,
227 uint32_t format,
228 const void * buffer)
229 {
230 GxtunerGUI *self = static_cast<GxtunerGUI*>(ui);
231 self->widget->set_value_static( port_index, buffer_size, format, buffer, self->widget);
232 return;
233 }
234
235 LV2UI_Descriptor GxtunerGUI::descriptors[] =
236 {
237 {
238 GXPLUGIN_UI_URI,
239 GxtunerGUI::instantiate,
240 GxtunerGUI::cleanup,
241 GxtunerGUI::port_event,
242 NULL
243 }
244 };
245
246 const LV2UI_Descriptor * lv2ui_descriptor(uint32_t index)
247 {
248 //printf("lv2ui_descriptor(%u) called\n", (uint32_t)index);
249 if (index >= sizeof(GxtunerGUI::descriptors) /
250 sizeof(GxtunerGUI::descriptors[0]))
251 {
252 return NULL;
253 }
254 return GxtunerGUI::descriptors + index;
255 }
256
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtuner#tuner>
23 a lv2:Plugin ;
24 lv2:binary <gxtuner.so> ;
25 rdfs:seeAlso <gxtuner.ttl> .
0 #
1 # Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 # --------------------------------------------------------------------------
17 #
18
19 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
20 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
21
22 <http://guitarix.sourceforge.net/plugins/gxtuner#tuner>
23 a lv2:Plugin ;
24 lv2:binary <gxtuner@LIB_EXT@> ;
25 rdfs:seeAlso <gxtuner.ttl> .
0 /*
1 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
2 * Copyright (C) 2011 Pete Shorthose
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 * --------------------------------------------------------------------------
18 *
19 *
20 * This is part of the Guitarix Audio Engine
21 *
22 *
23 *
24 * --------------------------------------------------------------------------
25 */
26
27 #include "gx_pitch_tracker.h"
28
29 /****************************************************************
30 ** class tuner
31 */
32
33 class tuner: public PluginLV2, public sigc::trackable {
34 private:
35 static void feed_tuner(int count, float *input, float *output, PluginLV2*);
36 static int activate(bool start, PluginLV2 *plugin);
37 static void init(unsigned int samplingFreq, PluginLV2 *plugin);
38 void connect(uint32_t port,void* data);
39 PitchTracker pitch_tracker;
40 int state;
41 enum { tuner_use = 0x01, livetuner_use = 0x02, switcher_use = 0x04, midi_use = 0x08 };
42 void set_and_check(int use, bool on);
43 public:
44 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
45 tuner();
46 Glib::Dispatcher& signal_freq_changed() { return pitch_tracker.new_freq; }
47 float get_freq() { return pitch_tracker.get_estimated_freq(); }
48 float get_note() { return pitch_tracker.get_estimated_note(); }
49 void set_threshold_level(float v) {pitch_tracker.set_threshold(v);}
50 static void del_instance(PluginLV2 *p);
51 };
52
53 tuner::tuner()
54 : PluginLV2(),
55 trackable(),
56 pitch_tracker(),
57 state() {
58 version = PLUGINLV2_VERSION;
59 id = "tuner";
60 name = "Rack Tuner";
61 mono_audio = feed_tuner;
62 set_samplerate = init;
63 activate_plugin = activate;
64 connect_ports = connect_static;
65 delete_instance = del_instance;
66 }
67
68 void tuner::init(unsigned int samplingFreq, PluginLV2 *plugin) {
69 tuner& self = *static_cast<tuner*>(plugin);
70 int priority = 0, policy = 0;
71 #ifdef _POSIX_PRIORITY_SCHEDULING
72 int priomax = sched_get_priority_max(SCHED_FIFO);
73 if ((priomax/2.2) > 0) {
74 priority = priomax/2.2;
75 policy = SCHED_FIFO;
76 }
77 #endif
78 self.pitch_tracker.init(policy, priority, samplingFreq);
79 }
80
81 void tuner::set_and_check(int use, bool on) {
82 if (on) {
83 state |= use;
84 } else {
85 state &= ~use;
86 }
87 if (use == switcher_use) {
88 pitch_tracker.set_fast_note_detection(on);
89 }
90 }
91
92 int tuner::activate(bool start, PluginLV2 *plugin) {
93 if (!start) {
94 static_cast<tuner*>(plugin)->pitch_tracker.reset();
95 }
96 return 0;
97 }
98
99 void tuner::feed_tuner(int count, float* input, float*, PluginLV2* plugin) {
100 tuner& self = *static_cast<tuner*>(plugin);
101 self.pitch_tracker.add(count, input);
102 }
103
104
105 void tuner::connect(uint32_t port,void* data)
106 {
107
108 }
109
110 void tuner::connect_static(uint32_t port,void* data, PluginLV2 *p)
111 {
112 static_cast<tuner*>(p)->connect(port, data);
113 }
114
115
116 PluginLV2 *plugin() {
117 return new tuner();
118 }
119
120 void tuner::del_instance(PluginLV2 *p)
121 {
122 delete static_cast<tuner*>(p);
123 }
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19
20 #include "widget.h"
21
22 #include <iostream>
23
24 /* @get controller by port
25 * this function is used by make_selector() make_controller_box()
26 * set_value() and on_value_changed()
27 * so controller widgets needs only here asined to a port,
28 * and all functions which need acess to the controller widget pointer
29 * can receive them by port number
30 */
31 Gtk::Widget* Widget::get_controller_by_port(uint32_t port_index)
32 {
33 switch ((PortIndex)port_index )
34 {
35 case REFFREQ:
36 return &m_bigknob;
37 case TUNEMODE:
38 return &tuner_tuning;
39 case THRESHOLD:
40 return &m_bigknob1;
41 default:
42 return NULL;
43 }
44 }
45
46 void Widget::set_tuning() {
47 static struct TuningTab {
48 const char *name;
49 const char* key;
50 bool flat;
51 int notes[6];
52 } tuning_tab[] = {
53 { "Standard", "E", false, {40, 45, 50, 55, 59, 64}},
54 { "Standard/Es", "Es", true, {39, 44, 49, 54, 58, 63}},
55 { "Open E", "E", false, {40, 47, 52, 56, 59, 64}},
56 };
57 int mode = tuner_tuning.get_value();
58 m_tuner.clear_notes();
59 if (mode > 0) {
60 m_tuner.set_display_flat(tuning_tab[mode-1].flat);
61 for (int i = 0; i < 6; ++i) {
62 m_tuner.push_note(tuning_tab[mode-1].notes[i]);
63 }
64 } else {
65 m_tuner.set_display_flat(false);
66 }
67 }
68
69
70 Widget::Widget(Glib::ustring plugname):
71 plug_name(plugname)
72 {
73 // create controllers for port name
74
75 Glib::ustring modes[] = {"(Chromatic)","Standard/E","Standard/Es", "Open E"};
76 static const size_t _size = sizeof(modes) / sizeof(modes[0]);
77 make_selector("Tunning Modes", modes, _size, 0, 1.0, TUNEMODE);
78
79 make_controller_box(&m_vbox4, "Reference Pitch", 427.0, 453.0, 0.1, REFFREQ);
80 make_controller_box(&m_vbox5, "Threshold", 0.001, 0.1, 0.001, THRESHOLD);
81
82 // set propertys for the tuner widget
83 m_tuner.set_size_request( 440, 35 ) ;
84 m_tuner.set_streaming(true);
85 m_tuner.set_display_flat(false);
86 m_tuner.set_reference_pitch(440.0);
87
88 m_hbox1_.pack_start(m_tuner);
89 m_hbox1_.set_border_width(5);
90
91 m_hbox2_.pack_start(tuner_tuning);
92 m_hbox2_.pack_start(m_vbox5);
93 m_hbox2_.pack_start(m_vbox4);
94
95 m_vbox2.pack_start(m_hbox1_);
96 m_vbox2.pack_start(m_hbox2_,Gtk::PACK_SHRINK);
97 m_vbox2.set_border_width(5);
98 m_vbox2.set_homogeneous(false);
99
100 m_paintbox1.property_paint_func() = "RackBox_expose";
101 m_paintbox1.set_name(plug_name);
102 m_paintbox1.set_border_width(1);
103 m_paintbox1.pack_start(m_vbox2);
104
105 // set propertys for the main paintbox holding the skin
106 m_paintbox.set_border_width(20);
107 m_paintbox.set_spacing(0);
108 m_paintbox.set_homogeneous(false);
109 m_paintbox.set_name(plug_name);
110 m_paintbox.property_paint_func() = "gxhead_expose";
111 m_paintbox.pack_start(m_paintbox1);
112 //m_paintbox.set_size_request( 425, 160 ) ;
113
114
115 // connect expose handler as resize handler
116 m_paintbox.signal_expose_event().connect(
117 sigc::mem_fun(this, &Widget::_expose_event), true);
118
119 add(m_paintbox);
120 set_app_paintable(true);
121 show_all();
122 }
123
124 Widget::~Widget()
125 {
126
127 }
128
129 // set borderwith for paintbox when widget resize
130 // to hold controllers in place
131 bool Widget::_expose_event(GdkEventExpose *event)
132 {
133 int x, y, width, height, depth;
134 m_paintbox.get_window()->get_geometry(x, y, width, height, depth);
135 //double_t height = m_paintbox.get_window()->get_height();
136 m_paintbox.set_border_width(height/10);
137 return false;
138 }
139
140 // create selectors from gxwmm
141 void Widget::make_selector(Glib::ustring labela,
142 Glib::ustring tables[],
143 size_t _size,
144 float min, float digits,
145 PortIndex port_name)
146 {
147 Gxw::Selector *regler = static_cast<Gxw::Selector*>
148 (get_controller_by_port(port_name));
149 if (regler)
150 {
151 float max = static_cast<float>(_size+1);
152
153 Gtk::TreeModelColumn<Glib::ustring> label;
154 Gtk::TreeModelColumnRecord rec;
155 rec.add(label);
156 Glib::RefPtr<Gtk::ListStore> ls = Gtk::ListStore::create(rec);
157
158 for (uint32_t i = 0 ; i< _size; ++i) {
159 ls->append()->set_value(0, tables[i]);
160 }
161 regler->set_model(ls);
162 regler->set_has_tooltip();
163 regler->set_tooltip_text(labela);
164 regler->cp_configure("SELECTOR", labela, min, max, digits);
165 regler->set_show_value(false);
166 regler->set_name(plug_name);
167 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
168 *this, &Widget::on_value_changed), port_name));
169 }
170 }
171
172 // create stackboxes with controllers for port name
173 void Widget::make_controller_box(Gtk::Box *box,
174 Glib::ustring label,
175 float min, float max,
176 float digits,
177 PortIndex port_name)
178 {
179 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
180 get_controller_by_port(port_name));
181 if (regler)
182 {
183 Gtk::Label* pr = new Gtk::Label(label, 0);
184 pr->set_name("amplabel");
185 // use label images instead simple string labes
186 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
187 label_image += "/";
188 label_image += label;
189 label_image += "-label.png";
190 Gtk::Image *pr = new Gtk::Image(label_image);*/
191
192 Gtk::VBox* b1 = new Gtk::VBox();
193 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
194 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
195 regler->cp_configure("KNOB", label, min, max, digits);
196 //regler->set_show_value(true);
197 regler->set_name("amplabel");
198 box->pack_start(*regler,Gtk::PACK_SHRINK);
199 Gtk::VBox* b2 = new Gtk::VBox();
200 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
201 regler->signal_value_changed().connect(sigc::bind(sigc::mem_fun(
202 *this, &Widget::on_value_changed), port_name));
203 }
204 }
205
206 // create stackboxes with switch controller for port name
207 void Widget::make_switch_box(Gtk::Box *box,
208 Glib::ustring label,
209 Glib::ustring label2,
210 PortIndex port_name)
211 {
212 Gxw::Switch *regler = static_cast<Gxw::Switch*>(
213 get_controller_by_port(port_name));
214 if (regler)
215 {
216 Gtk::Label* pr = new Gtk::Label(label, 0);
217 pr->set_name("amplabel");
218 // use label images instead simple string labes
219 /*Glib::ustring label_image = GX_LV2_STYLE_DIR;
220 label_image += "/"+plug_name+"-";
221 label_image += label;
222 label_image += "-label.png";
223 Gtk::Image *pr = new Gtk::Image(label_image);*/
224
225 regler->cp_configure("switch", label, 0, 1, 1);
226 regler->set_can_focus( false ) ;
227
228 regler->set_name(plug_name);
229 regler->set_base_name( "button" );
230 Gtk::VBox* b1 = new Gtk::VBox();
231 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
232 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK);
233 box->pack_start(*regler,Gtk::PACK_SHRINK);
234
235 // 2nd Label
236 Gtk::Label* pr2 = new Gtk::Label(label2, 0);
237 pr2->set_name("amplabel");
238 box->pack_start( *Gtk::manage(pr2),Gtk::PACK_SHRINK);
239
240 Gtk::VBox* b2 = new Gtk::VBox();
241 box->pack_start( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
242 regler->signal_toggled().connect(sigc::bind(sigc::mem_fun(
243 *this, &Widget::on_value_changed), port_name));
244 }
245 }
246
247 // Create the Text Labels from images For Amp
248 void Widget::make_image(Gtk::Box *box,Glib::ustring label, bool start )
249 {
250 Glib::ustring label_image = GX_LV2_STYLE_DIR;
251 label_image += "/";
252 label_image += label;
253 label_image += ".png";
254 Gtk::Image *pr = new Gtk::Image(label_image);
255
256
257 Gtk::VBox* b1 = new Gtk::VBox();
258 box->pack_start( *Gtk::manage(b1), Gtk::PACK_EXPAND_PADDING);
259 if( start ){
260 // std::cout << "Pack Start "<<label<<std::endl;
261 box->pack_start( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
262 }else{
263 // std::cout << "Pack End " << label << std::endl;
264 box->pack_end( *Gtk::manage(pr),Gtk::PACK_SHRINK, 0);
265 }
266
267 Gtk::VBox* b2 = new Gtk::VBox();
268 box->pack_end( *Gtk::manage(b2), Gtk::PACK_EXPAND_PADDING);
269
270 }
271 // receive controller value changes from host and set them to controller
272 void Widget::set_value(uint32_t port_index,
273 uint32_t format,
274 const void * buffer)
275 {
276 if ( format == 0 )
277 {
278 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
279 get_controller_by_port(port_index));
280 if (regler)
281 {
282 float value = *static_cast<const float*>(buffer);
283 regler->cp_set_value(value);
284 //printf("port event %i, value %f\n",port_index,value);
285
286 }
287 if(port_index == FREQ) m_tuner.set_freq(*static_cast<const float*>(buffer));
288 if (port_index == TUNEMODE) set_tuning();
289
290 }
291 }
292
293 // write (UI) controller value changes to the host->engine
294 void Widget::on_value_changed(uint32_t port_index)
295 {
296 Gxw::Regler *regler = static_cast<Gxw::Regler*>(
297 get_controller_by_port(port_index));
298 if (regler)
299 {
300 float value = regler->cp_get_value();
301 write_function(controller, port_index, sizeof(float), 0,
302 static_cast<const void*>(&value));
303 }
304 if (port_index == TUNEMODE) set_tuning();
305 }
306
0 /*
1 * Copyright (C) 2012 Hermann Meyer, Andreas Degert, Pete Shorthose, Steve Poskitt
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 * --------------------------------------------------------------------------
17 */
18
19 #pragma once
20
21 #ifndef SRC_HEADERS_WIDGET_H_
22 #define SRC_HEADERS_WIDGET_H_
23
24 #include <gtkmm.h>
25 #include <gxwmm.h>
26 #include "gxtuner.h"
27 #include "../config.h" // for GX_STYLE_DIR
28 // LV2UI stuff
29 #include "lv2/lv2plug.in/ns/extensions/ui/ui.h"
30
31 class Widget : public Gtk::HBox
32 {
33 private:
34 Gtk::Widget* get_controller_by_port(uint32_t port_index);
35
36 void on_value_changed(uint32_t port_index);
37 void set_tuning();
38 void make_controller_box(Gtk::Box *box,
39 Glib::ustring label,
40 float min, float max,
41 float digits,
42 PortIndex port_name);
43
44 void make_selector(Glib::ustring label,
45 Glib::ustring tables[],
46 size_t _size,
47 float min, float digits,
48 PortIndex port_name);
49
50 void make_switch_box(Gtk::Box *box,
51 Glib::ustring label,
52 Glib::ustring label2,
53 PortIndex port_name);
54 void make_image(Gtk::Box *box,Glib::ustring label, bool start );
55 bool _expose_event(GdkEventExpose *event);
56
57 void set_value(uint32_t port_index,
58 uint32_t format,
59 const void * buffer);
60 public:
61
62 // public Lv2 communication stuff
63 LV2UI_Controller controller;
64 LV2UI_Write_Function write_function;
65 static void set_value_static(uint32_t port_index,
66 uint32_t buffer_size,
67 uint32_t format,
68 const void * buffer, Widget *self)
69 {
70 self->set_value(port_index,format,buffer);
71 }
72
73 Widget(Glib::ustring plugname);
74 ~Widget();
75
76 protected:
77 Glib::ustring plug_name;
78 Gtk::VBox m_vbox_;
79 Gtk::VBox m_vbox;
80 Gtk::VBox m_vbox1;
81 Gtk::VBox m_vbox2;
82 Gtk::VBox m_vbox3;
83 Gtk::VBox m_vbox4;
84 Gtk::VBox m_vbox5;
85 Gtk::VBox m_vbox6;
86 Gtk::VBox m_vbox7;
87 Gtk::HBox m_hbox_;
88 Gtk::HBox m_hbox1_;
89 Gtk::HBox m_hbox2_;
90 Gtk::HBox m_hbox3_;
91
92 Gxw::PaintBox m_paintbox;
93 Gxw::PaintBox m_paintbox1;
94 Gxw::HSlider m_bigknob;
95 Gxw::HSlider m_bigknob1;
96 Gxw::RackTuner m_tuner;
97 Gxw::Selector tuner_tuning;
98 };
99
100 #endif //SRC_HEADERS_WIDGET_H_
0 #!/usr/bin/env python
1 # encoding: utf-8
2
3 import sys, os, TaskGen, ctypes
4
5 def configure(conf):
6 pass
7
8 def build(bld):
9 bundle = 'gxtuner.lv2'
10
11 src = ['gxtuner.cpp',
12 '../DSP/gx_resampler.cc'
13 ]
14 incl = ['../faust','./', '../DSP']
15 lib = []
16 if sys.platform.startswith("linux"):
17 lib.append('dl')
18 uselib = ['LV2CORE','GLIBMM']
19 uselib.append('FFTW3')
20 if bld.env['ZITA_RESAMPLER']:
21 uselib.append('ZITA_RESAMPLER')
22 else:
23 src.append('../../zita-resampler-1.1.0/resampler.cc')
24 src.append('../../zita-resampler-1.1.0/resampler-table.cc')
25 incl.append('../../zita-resampler-1.1.0')
26 if sys.platform.startswith("linux"):
27 lib.append('dl')
28 cxxflag =[]
29 if not bld.env['OPT'] and bld.env['SSE2']:
30 cxxflag = [ "-msse2", "-mfpmath=sse"]
31 lv2_effects = bld(
32 features='cxx cshlib ',
33 includes = incl,
34 lib = lib,
35 uselib = uselib,
36 obj_ext = '_18.o',
37 cxxflags = cxxflag,
38 defines = ["LV2_SO"],
39 target = 'gxtuner',
40 source = src,
41 install_path = '${LV2DIR}/%s' % bundle,
42 chmod = 0o755,
43 )
44 lv2_effects.env['shlib_PATTERN'] = '%s.so'
45
46 uselib_local5 = []
47 libpath5 = []
48 lib5 = []
49 incl5 = ['../../../libgxwmm','../../../libgxw','../']
50 if sys.platform.startswith("linux"):
51 lib5.append('dl')
52 if bld.env["GX_LIB_SHARED"]:
53 lib5 += ['gxwmm','gxw']
54 libpath5 += [bld.path.find_dir("../../../libgxw/gxw").bldpath(bld.env),
55 bld.path.find_dir("../../../libgxwmm/gxwmm").bldpath(bld.env)]
56 else:
57 uselib_local5 += ['gxwmm','gxw']
58
59 lv2_effetcs_gui = bld(
60 features='cxx cshlib ',
61 includes = incl5,
62 lib = lib5,
63 uselib = 'LV2CORE GTKMM',
64 libpath = libpath5,
65 uselib_local = uselib_local5,
66 linkflags = '-Wl,-z,nodelete',
67 defines = ["LV2_GUI"],
68 target = 'gxtuner_gui',
69 source = 'widget.cpp gxtuner_gui.cpp',
70 install_path = '${LV2DIR}/%s' % bundle,
71 chmod = 0o755,
72 )
73 lv2_effetcs_gui.env['shlib_PATTERN'] = '%s.so'
74
75
76 install_path = '${LV2DIR}/%s' % bundle,
77 bld.install_files('${LV2DIR}/gxtuner.lv2', 'manifest.ttl')
78 bld.install_files('${LV2DIR}/gxtuner.lv2', 'gxtuner.ttl')
79
4141 else:
4242 return False
4343
44 def dirlist():
45 subdirs = [
46 'gx_amp.lv2',
47 'gx_amp_stereo.lv2',
48 'gxautowah.lv2',
49 'gxbooster.lv2',
50 'gx_chorus.lv2',
51 'gx_compressor.lv2',
52 'gx_delay.lv2',
53 'gxechocat.lv2',
54 'gx_echo.lv2',
55 'gx_expander.lv2',
56 'gx_flanger.lv2',
57 'gxmetal_amp.lv2',
58 'gxmetal_head.lv2',
59 'gx_phaser.lv2',
60 #'gxpreamp.lv2',
61 #'gxpreamp.lv2/StereoAmp',
62 'gx_redeye.lv2',
63 'gx_reverb.lv2',
64 'gx_studiopre.lv2',
65 'gx_studiopre_st.lv2',
66 'gxtilttone.lv2',
67 'gx_tremolo.lv2',
68 'gxts9.lv2',
69 'gxtubedelay.lv2',
70 'gxtubetremelo.lv2',
71 'gxtubevibrato.lv2',
72 'gxtuner.lv2',
73 'gx_zita_rev1.lv2'
74
75 ]
76
77 return subdirs
78
4479 def configure(conf):
45 conf.env['SSE2'] = append_sse_flags()
80 if not conf.env['NOSSE']:
81 conf.env['SSE2'] = append_sse_flags()
4682 pa = '.so'
47 sub_file('./src/LV2/gxamp.lv2/manifest.ttl.in', './src/LV2/gxamp.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), ))
48 conf.sub_config('gxamp.lv2/StereoAmp');
49 sub_file('./src/LV2/gxamp.lv2/StereoAmp/manifest_stereo.ttl.in', './src/LV2/gxamp.lv2/StereoAmp/manifest.ttl', (('@LIB_EXT@', '%s' % pa), ))
50 conf.sub_config('gxts9.lv2');
51 sub_file('./src/LV2/gxts9.lv2/manifest.ttl.in', './src/LV2/gxts9.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), ))
52 conf.sub_config('gxbooster.lv2');
53 sub_file('./src/LV2/gxbooster.lv2/manifest.ttl.in', './src/LV2/gxbooster.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), ))
54 conf.sub_config('gxautowah.lv2');
55 sub_file('./src/LV2/gxautowah.lv2/manifest.ttl.in', './src/LV2/gxautowah.lv2/manifest.ttl', (('@LIB_EXT@', '%s' % pa), ))
83
84 for x in dirlist():
85 conf.sub_config('%s' % x);
86 sub_file('./src/LV2/%s/manifest.ttl.in' % x, './src/LV2/%s/manifest.ttl' % x, (('@LIB_EXT@', '%s' % pa), ))
87
88 def build(bld):
89 # faust folder keep out of dirlist
90 bld.add_subdirs('faust')
91 bld.add_subdirs(dirlist())
5692
57 def build(bld):
58 bld.add_subdirs('gxamp.lv2')
59 bld.add_subdirs('gxamp.lv2/StereoAmp')
60 bld.add_subdirs('gxts9.lv2')
61 bld.add_subdirs('gxbooster.lv2')
62 bld.add_subdirs('gxautowah.lv2')
93 gx_ampstyledir = bld.path.find_dir( 'GUI' ) ;
94 bld.install_files(bld.env['GX_LV2_STYLE_DIR'], gx_ampstyledir.ant_glob('**/*.png'),cwd=gx_ampstyledir, chmod=0o644, relative_trick=True)
95 bld.install_files(bld.env['GX_LV2_STYLE_DIR'], gx_ampstyledir.ant_glob('**/*.rc'),cwd=gx_ampstyledir, chmod=0o644, relative_trick=True)
6396
64 gxlv2style_files = [
65 'gxamp.lv2/GUI/amp21.png',
66 'gxamp.lv2/GUI/amp22.png',
67 'gxamp.lv2/GUI/amp23.png',
68 'gxamp.lv2/GUI/amp24.png',
69 'gxamp.lv2/GUI/amp25.png',
70 'gxamp.lv2/GUI/mastergain-label.png',
71 'gxamp.lv2/GUI/pregain-label.png',
72 'gxamp.lv2/GUI/drive-label.png',
73 'gxamp.lv2/GUI/distortion-label.png',
74 'gxamp.lv2/GUI/cabinet-label.png',
75 'gxamp.lv2/GUI/presence-label.png',
76 'gxamp.lv2/GUI/presence-label.png',
77 'gxamp.lv2/GUI/bass-label.png',
78 'gxamp.lv2/GUI/treble-label.png',
79 'gxamp.lv2/GUI/mid-label.png',
80 'gxamp.lv2/GUI/knob.png',
81 'gxamp.lv2/GUI/knob-middle.png',
82 'gxamp.lv2/GUI/knob-small.png',
83 'gxamp.lv2/GUI/metalic1-knob.png',
84 'gxamp.lv2/GUI/metalic1-knob-middle.png',
85 'gxamp.lv2/GUI/metalic1-knob-small.png',
86 'gxamp.lv2/GUI/black-knob.png',
87 'gxamp.lv2/GUI/black-knob-middle.png',
88 'gxamp.lv2/GUI/black-knob-small.png',
89 'gxamp.lv2/GUI/booster.png',
90 'gxamp.lv2/GUI/booster-knob.png',
91 'gxamp.lv2/GUI/ts9.png',
92 'gxamp.lv2/GUI/ts9-knob.png',
93 'gxamp.lv2/GUI/autowah.png',
94 'gxamp.lv2/GUI/wah.png',
95 'gxamp.lv2/GUI/wah-pedal.png',
96 ]
97
98 bld.install_files(bld.env['GX_LV2_STYLE_DIR'], gxlv2style_files, chmod=0o644)
332332 crybaby_ctrl = environment {
333333 level = vslider(".crybaby.level[alias]", 0.1, 0, 1, 0.01);
334334 wah = vslider(".crybaby.wah[alias]", 0, 0, 1, 0.01);
335 wet_dry = vslider(".crybaby.wet_dry[name:wet/dry][alias]", 100, 0, 100, 1) : /(100);
335 wet_dry = vslider(".crybaby.wet_dry[name:dry/wet][alias]", 100, 0, 100, 1) : /(100);
336336 };
337337
338338 balance_ctrl = environment {
0 declare id "RedeyePreMono";
1 declare name "RedeyePreMono";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 // Using guitarix tubes to create a simple line stage emulation stereo
9 //
10
11 //stage1 has approx 3.2dB gain
12 //stage2 has -10.7dB gain
13 stage1adjust = *( -3.2:db2linear);
14 stage2adjust = *( 10.7:db2linear);
15 stage1 = tubestage(TB_12AX7_68k,40.0,1500.0,1.5025):stage1adjust;
16 stage2 = tubestage(TB_12AX7_68k,20.0,1500.0,1.4925):stage1adjust ;
17 // We now have untiy gain stages which makes feedback easier to apply consistently
18 // And measure freq response flat up tpo around 19K then slow rolloff
19 // Feedback :
20 // Fror some reason what works here causes trouble in LV2 plugin ?
21 // Basically we have a peak eq around 17-18k when feedback applied
22 // Could this be phase shifts caused by filters in feedback loop?
23 level = vslider("Feedback[alias][style:knob]",-12,-75,-3,0.1):db2linear:smoothi(0.999) ;
24
25 // This could be a selector :
26 // Peak_EQ at 2500Hz = guitar presence
27 // High shelf at 1500Hz = Alternative Guitar
28 // High shelf at 2500Hz = Studio presence/air
29
30 //guitar = peak_eq_cq( -presence, 2500, 6.0 );
31 //guitar2 = high_shelf( -presence, 1500 );
32 //studio = high_shelf( -presence, 2500 );
33
34 presence_filter = high_shelf( -presence, 1500 );
35
36 lineamp = stage1:stage2 ;
37
38 input = vslider("Input[alias][style:knob]",0,-20,20,0.1):db2linear:smoothi(0.999) ;
39 output = vslider("Output[alias][style:knob]",0,-20,20,0.1) :db2linear:smoothi(0.999);
40
41 // With the shelf filter no response after 18dB only gives 4dB boost
42 //presence = vslider("Presence[alias][style:knob]",0,0,10,0.1)/10: smoothi(0.999):*(24);
43 presence = vslider("Presence[alias][style:knob]",0,0,10,0.1)/10:smoothi(0.999):*(24);
44 // This needs to be sorted so that minimum is lowest but not off
45 // At present basically - 2.0 so we could make 1+1
46 // Drive in db -12db->+12dB
47 drive = vslider("Drive[alias][style:knob]",0.0,-15.0,15.0,0.1):db2linear:smoothi(0.999);
48 resonance = vslider("Resonance[alias][style:knob]",0,0,10,0.1)/10:smoothi(0.999):*(24);
49 // Does altering position of level affect strength of filters
50 //feedback = hgroup( "Processing", *(level):presence_filter:low_shelf( -resonance,750):*(-1));
51 feedback = hgroup( "Processing",low_shelf( -resonance,480):presence_filter:*(level):*(-1));
52 //channel =hgroup("Input", *(input)):hgroup("Tube",*(1.0+drive)):(+:lineamp)~ feedback:hgroup("Output",lowpass( 1, 15000 ) :*(output));
53
54 channel =hgroup("Input", *(input)):hgroup("Tube",*(drive)):
55 (+:lineamp)~feedback:hgroup("Output",lowpass( 1, 18000 ) :*(output));
56
57 process = channel ;
0 declare id "RedeyePreStereo";
1 declare name "RedeyePreStereo";
2
3 import("music.lib");
4 import("filter.lib");
5 import("effect.lib");
6 import("guitarix.lib");
7
8 // Using guitarix tubes to create a simple line stage emulation stereo
9 //
10
11 //stage1 has approx 3.2dB gain
12 //stage2 has -10.7dB gain
13 stage1adjust = *( -3.2:db2linear);
14 stage2adjust = *( 10.7:db2linear);
15 stage1 = tubestage(TB_12AX7_68k,40.0,1500.0,1.5025):stage1adjust;
16 stage2 = tubestage(TB_12AX7_68k,20.0,1500.0,1.4925):stage1adjust ;
17 // We now have untiy gain stages which makes feedback easier to apply consistently
18 // And measure freq response flat up tpo around 19K then slow rolloff
19 // Feedback :
20 // Fror some reason what works here causes trouble in LV2 plugin ?
21 // Basically we have a peak eq around 17-18k when feedback applied
22 // Could this be phase shifts caused by filters in feedback loop?
23 level = vslider("Feedback[alias][style:knob]",-12,-75,-3,0.1):db2linear:smoothi(0.999) ;
24
25 // This could be a selector :
26 // Peak_EQ at 2500Hz = guitar presence
27 // High shelf at 1500Hz = Alternative Guitar
28 // High shelf at 2500Hz = Studio presence/air
29
30 //guitar = peak_eq_cq( -presence, 2500, 6.0 );
31 //guitar2 = high_shelf( -presence, 1500 );
32 //studio = high_shelf( -presence, 2500 );
33
34 presence_filter = high_shelf( -presence, 1500 );
35
36 lineamp = stage1:stage2 ;
37
38 input = vslider("Input[alias][style:knob]",0,-20,20,0.1):db2linear:smoothi(0.999) ;
39 output = vslider("Output[alias][style:knob]",0,-20,20,0.1) :db2linear:smoothi(0.999);
40
41 // With the shelf filter no response after 18dB only gives 4dB boost
42 //presence = vslider("Presence[alias][style:knob]",0,0,10,0.1)/10: smoothi(0.999):*(24);
43 presence = vslider("Presence[alias][style:knob]",0,0,10,0.1)/10:smoothi(0.999):*(24);
44 // This needs to be sorted so that minimum is lowest but not off
45 // At poresent basically - 2.0 so we could make 1+1
46 // Drive in db -12db->+12dB
47 drive = vslider("Drive[alias][style:knob]",0.0,-15.0,15.0,0.1):db2linear:smoothi(0.999);
48 resonance = vslider("Resonance[alias][style:knob]",0,0,10,0.1)/10:smoothi(0.999):*(24);
49 // Does altering position of level affect strength of filters
50 //feedback = hgroup( "Processing", *(level):presence_filter:low_shelf( -resonance,750):*(-1));
51 feedback = hgroup( "Processing",low_shelf( -resonance,750):presence_filter:*(level):*(-1));
52 //channel =hgroup("Input", *(input)):hgroup("Tube",*(1.0+drive)):(+:lineamp)~ feedback:hgroup("Output",lowpass( 1, 15000 ) :*(output));
53
54 channel =hgroup("Input", *(input)):hgroup("Tube",*(drive)):
55 (+:lineamp)~feedback:hgroup("Output",lowpass( 1, 18000 ) :*(output));
56 process =channel,channel ;
1212 r_gain = vslider("r_gain", 0, -20, 20, 0.1) : db2linear : smoothi(0.999);
1313 d = vslider("l_delay", 0, 0, 5000, 10)*msec;
1414 r = vslider("r_delay", 0, 0, 5000, 10)*msec;
15 process = (_ <: _ + l_gain*(1+pingpong*lfol(freq)) * fdelay5s(d) :> _),
16 (_ <: _ + r_gain*(1-pingpong*lfol(freq)) * fdelay5s(r) :> _);
15 process = (_ <: _ + l_gain*(1-(pingpong*lfol(freq))) * sdelay(262144, 1024, d) :> _),
16 (_ <: _ + r_gain*(1-(pingpong*(-1*lfol(freq)))) * sdelay(262144, 1024, r) :> _);
1717
1515 tr = vslider("time_r", 1, 1, 2000, 1);
1616 releaser = vslider("percent_r", 0, 0, 100, 0.1);
1717
18 echo1 = +~(fdelay2(131072, int(tl*millisec)-1) * ((releasel/100.0)*(1+(lfol(freq)*pingpong))) );
19 echo2 = +~(fdelay2(131072, int(tr*millisec)-1) * ((releaser/100.0)*(1-(lfol(freq)*pingpong))) );
18 echo1 = +~(sdelay(131072, 1024, int(tl*millisec)-1) * ((releasel/100.0)*(1-(lfol(freq)*pingpong))) );
19 echo2 = +~(sdelay(131072, 1024, int(tr*millisec)-1) * ((releaser/100.0)*(1-((-1*lfol(freq))*pingpong))) );
2020 process = echo1,echo2;
6868
6969 fxctrl(g,w,Fx) = _ <: (*(g) <: _ + Fx ), *(1-w) +> _;
7070
71 freeverb_r = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1+(lfol(freq)*pingpong))):>_);
72 freeverb_l = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(lfol(freq)*pingpong))):>_);
71 freeverb_r = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(lfol(freq)*pingpong))):>_);
72 freeverb_l = (_<:*(dry),(*(wet_dry):fxctrl(0.015,wet_dry, monoReverb(combfeed, 0.5, dampslider, 23))* (1-(-1*lfol(freq)*pingpong))):>_);
7373 process = freeverb_r, freeverb_l;
296296 C3 = 20:nF;
297297 };
298298
299
299 engl = environment { /* engl */
300 R1 = 250:k;
301 R2 = 1:M;
302 R3 = 20:k;
303 R4 = 100:k;
304 C1 = 600:pF;
305 C2 = 47:nF;
306 C3 = 47:nF;
307 };
308
300309 };
301310
302311 t = vslider(".amp.tonestack.Treble[alias]", 0.5, 0, 1, 0.01);
0 declare id "Engl"; // in tonestack selector
1 declare name "Engl";
2
3 tstack = component("tonestack.dsp");
4 process = tstack[tse=tstack.ts.engl;];
111111 'tonestack_fender_default.dsp',
112112 'tonestack_fender_deville.dsp',
113113 'tonestack_gibsen.dsp',
114 'tonestack_engl.dsp',
114115
115116 # amps
116117 'gxamp.dsp',
3232 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3333 static int register_params_static(const ParamReg& reg);
3434 static void del_instance(PluginDef *p);
35
3635 public:
3736 Dsp();
3837 ~Dsp();
135134
136135 int Dsp::register_par(const ParamReg& reg)
137136 {
138 fslider2_ = reg.registerVar("crybaby.wet_dry",N_("wet/dry"),"SA","",&fslider2, 1e+02, 0.0, 1e+02, 1.0);
137 fslider2_ = reg.registerVar("crybaby.wet_dry",N_("dry/wet"),"SA","",&fslider2, 1e+02, 0.0, 1e+02, 1.0);
139138 fslider1_ = reg.registerVar("crybaby.level","","SA","",&fslider1, 0.1, 0.0, 1.0, 0.01);
140139 fslider0_ = reg.registerVar("crybaby.wah","","SA","",&fslider0, 0.0, 0.0, 1.0, 0.01);
141140 return 0;
1919 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
2020 static int register_params_static(const ParamReg& reg);
2121 static void del_instance(PluginDef *p);
22
2322 public:
2423 Dsp();
2524 ~Dsp();
2323 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2424 static int register_params_static(const ParamReg& reg);
2525 static void del_instance(PluginDef *p);
26
2726 public:
2827 Dsp();
2928 ~Dsp();
1919 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2020 static int register_params_static(const ParamReg& reg);
2121 static void del_instance(PluginDef *p);
22
2322 public:
2423 Dsp();
2524 ~Dsp();
5353 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
5454 static int register_params_static(const ParamReg& reg);
5555 static void del_instance(PluginDef *p);
56
5756 public:
5857 Dsp();
5958 ~Dsp();
4646 static void compute_static(int count, float *input0, float *output0, PluginDef*);
4747 static int register_params_static(const ParamReg& reg);
4848 static void del_instance(PluginDef *p);
49
5049 public:
5150 Dsp();
5251 ~Dsp();
2727 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2828 static int register_params_static(const ParamReg& reg);
2929 static void del_instance(PluginDef *p);
30
3130 public:
3231 Dsp();
3332 ~Dsp();
2929 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3030 static int register_params_static(const ParamReg& reg);
3131 static void del_instance(PluginDef *p);
32
3332 public:
3433 Dsp();
3534 ~Dsp();
126125
127126 int Dsp::register_par(const ParamReg& reg)
128127 {
129 fslider2_ = reg.registerVar("crybaby.wet_dry",N_("wet/dry"),"SA","",&fslider2, 1e+02, 0.0, 1e+02, 1.0);
128 fslider2_ = reg.registerVar("crybaby.wet_dry",N_("dry/wet"),"SA","",&fslider2, 1e+02, 0.0, 1e+02, 1.0);
130129 fslider1_ = reg.registerVar("crybaby.level","","SA","",&fslider1, 0.1, 0.0, 1.0, 0.01);
131130 fslider0_ = reg.registerVar("crybaby.wah","","SA","",&fslider0, 0.0, 0.0, 1.0, 0.01);
132131 return 0;
2727 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2828 static int register_params_static(const ParamReg& reg);
2929 static void del_instance(PluginDef *p);
30
3130 public:
3231 Dsp();
3332 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2727 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2828 static int register_params_static(const ParamReg& reg);
2929 static void del_instance(PluginDef *p);
30
3130 public:
3231 Dsp();
3332 ~Dsp();
3333 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
3434 static int register_params_static(const ParamReg& reg);
3535 static void del_instance(PluginDef *p);
36
3736 public:
3837 Dsp();
3938 ~Dsp();
2727 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2828 static int register_params_static(const ParamReg& reg);
2929 static void del_instance(PluginDef *p);
30
3130 public:
3231 Dsp();
3332 ~Dsp();
5252 static void compute_static(int count, float *input0, float *output0, PluginDef*);
5353 static int register_params_static(const ParamReg& reg);
5454 static void del_instance(PluginDef *p);
55
5655 public:
5756 Dsp();
5857 ~Dsp();
7474 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
7575 static int register_params_static(const ParamReg& reg);
7676 static void del_instance(PluginDef *p);
77
7877 public:
7978 Dsp();
8079 ~Dsp();
1818 static void compute_static(int count, float *input0, float *output0, PluginDef*);
1919 static int register_params_static(const ParamReg& reg);
2020 static void del_instance(PluginDef *p);
21
2221 public:
2322 Dsp();
2423 ~Dsp();
2020 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2121 static int register_params_static(const ParamReg& reg);
2222 static void del_instance(PluginDef *p);
23
2423 public:
2524 Dsp();
2625 ~Dsp();
8383 static void compute_static(int count, float *input0, float *output0, PluginDef*);
8484 static int register_params_static(const ParamReg& reg);
8585 static void del_instance(PluginDef *p);
86
8786 public:
8887 Dsp();
8988 ~Dsp();
1919 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2020 static int register_params_static(const ParamReg& reg);
2121 static void del_instance(PluginDef *p);
22
2322 public:
2423 Dsp();
2524 ~Dsp();
1818 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
1919 static int register_params_static(const ParamReg& reg);
2020 static void del_instance(PluginDef *p);
21
2221 public:
2322 Dsp();
2423 ~Dsp();
1919 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
2020 static int register_params_static(const ParamReg& reg);
2121 static void del_instance(PluginDef *p);
22
2322 public:
2423 Dsp();
2524 ~Dsp();
131131 static void compute_static(int count, float *input0, float *output0, PluginDef*);
132132 static int register_params_static(const ParamReg& reg);
133133 static void del_instance(PluginDef *p);
134
135134 public:
136135 Dsp();
137136 ~Dsp();
134134 static void compute_static(int count, float *input0, float *output0, PluginDef*);
135135 static int register_params_static(const ParamReg& reg);
136136 static void del_instance(PluginDef *p);
137
138137 public:
139138 Dsp();
140139 ~Dsp();
145145 static void compute_static(int count, float *input0, float *output0, PluginDef*);
146146 static int register_params_static(const ParamReg& reg);
147147 static void del_instance(PluginDef *p);
148
149148 public:
150149 Dsp();
151150 ~Dsp();
138138 static void compute_static(int count, float *input0, float *output0, PluginDef*);
139139 static int register_params_static(const ParamReg& reg);
140140 static void del_instance(PluginDef *p);
141
142141 public:
143142 Dsp();
144143 ~Dsp();
145145 static void compute_static(int count, float *input0, float *output0, PluginDef*);
146146 static int register_params_static(const ParamReg& reg);
147147 static void del_instance(PluginDef *p);
148
149148 public:
150149 Dsp();
151150 ~Dsp();
131131 static void compute_static(int count, float *input0, float *output0, PluginDef*);
132132 static int register_params_static(const ParamReg& reg);
133133 static void del_instance(PluginDef *p);
134
135134 public:
136135 Dsp();
137136 ~Dsp();
137137 static void compute_static(int count, float *input0, float *output0, PluginDef*);
138138 static int register_params_static(const ParamReg& reg);
139139 static void del_instance(PluginDef *p);
140
141140 public:
142141 Dsp();
143142 ~Dsp();
189189 static void compute_static(int count, float *input0, float *output0, PluginDef*);
190190 static int register_params_static(const ParamReg& reg);
191191 static void del_instance(PluginDef *p);
192
193192 public:
194193 Dsp();
195194 ~Dsp();
145145 static void compute_static(int count, float *input0, float *output0, PluginDef*);
146146 static int register_params_static(const ParamReg& reg);
147147 static void del_instance(PluginDef *p);
148
149148 public:
150149 Dsp();
151150 ~Dsp();
131131 static void compute_static(int count, float *input0, float *output0, PluginDef*);
132132 static int register_params_static(const ParamReg& reg);
133133 static void del_instance(PluginDef *p);
134
135134 public:
136135 Dsp();
137136 ~Dsp();
133133 static void compute_static(int count, float *input0, float *output0, PluginDef*);
134134 static int register_params_static(const ParamReg& reg);
135135 static void del_instance(PluginDef *p);
136
137136 public:
138137 Dsp();
139138 ~Dsp();
132132 static void compute_static(int count, float *input0, float *output0, PluginDef*);
133133 static int register_params_static(const ParamReg& reg);
134134 static void del_instance(PluginDef *p);
135
136135 public:
137136 Dsp();
138137 ~Dsp();
138138 static void compute_static(int count, float *input0, float *output0, PluginDef*);
139139 static int register_params_static(const ParamReg& reg);
140140 static void del_instance(PluginDef *p);
141
142141 public:
143142 Dsp();
144143 ~Dsp();
137137 static void compute_static(int count, float *input0, float *output0, PluginDef*);
138138 static int register_params_static(const ParamReg& reg);
139139 static void del_instance(PluginDef *p);
140
141140 public:
142141 Dsp();
143142 ~Dsp();
190190 static void compute_static(int count, float *input0, float *output0, PluginDef*);
191191 static int register_params_static(const ParamReg& reg);
192192 static void del_instance(PluginDef *p);
193
194193 public:
195194 Dsp();
196195 ~Dsp();
189189 static void compute_static(int count, float *input0, float *output0, PluginDef*);
190190 static int register_params_static(const ParamReg& reg);
191191 static void del_instance(PluginDef *p);
192
193192 public:
194193 Dsp();
195194 ~Dsp();
192192 static void compute_static(int count, float *input0, float *output0, PluginDef*);
193193 static int register_params_static(const ParamReg& reg);
194194 static void del_instance(PluginDef *p);
195
196195 public:
197196 Dsp();
198197 ~Dsp();
145145 static void compute_static(int count, float *input0, float *output0, PluginDef*);
146146 static int register_params_static(const ParamReg& reg);
147147 static void del_instance(PluginDef *p);
148
149148 public:
150149 Dsp();
151150 ~Dsp();
3333 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
3434 static int register_params_static(const ParamReg& reg);
3535 static void del_instance(PluginDef *p);
36
3736 public:
3837 Dsp();
3938 ~Dsp();
1919 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2020 static int register_params_static(const ParamReg& reg);
2121 static void del_instance(PluginDef *p);
22
2322 public:
2423 Dsp();
2524 ~Dsp();
2424 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2525 static int register_params_static(const ParamReg& reg);
2626 static void del_instance(PluginDef *p);
27
2827 public:
2928 Dsp();
3029 ~Dsp();
2525 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2626 static int register_params_static(const ParamReg& reg);
2727 static void del_instance(PluginDef *p);
28
2928 public:
3029 Dsp();
3130 ~Dsp();
3434 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3535 static int register_params_static(const ParamReg& reg);
3636 static void del_instance(PluginDef *p);
37
3837 public:
3938 Dsp();
4039 ~Dsp();
3232 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
3333 static int register_params_static(const ParamReg& reg);
3434 static void del_instance(PluginDef *p);
35
3635 public:
3736 Dsp();
3837 ~Dsp();
2121 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2222 static int register_params_static(const ParamReg& reg);
2323 static void del_instance(PluginDef *p);
24
2524 public:
2625 Dsp();
2726 ~Dsp();
1919 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2020 static int register_params_static(const ParamReg& reg);
2121 static void del_instance(PluginDef *p);
22
2322 public:
2423 Dsp();
2524 ~Dsp();
4242 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
4343 static int register_params_static(const ParamReg& reg);
4444 static void del_instance(PluginDef *p);
45
4645 public:
4746 Dsp();
4847 ~Dsp();
3636 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3737 static int register_params_static(const ParamReg& reg);
3838 static void del_instance(PluginDef *p);
39
4039 public:
4140 Dsp();
4241 ~Dsp();
5757 static void compute_static(int count, float *input0, float *output0, PluginDef*);
5858 static int register_params_static(const ParamReg& reg);
5959 static void del_instance(PluginDef *p);
60
6160 public:
6261 Dsp();
6362 ~Dsp();
1515 static void compute_static(int count, float *input0, float *output0, PluginDef*);
1616 static int register_params_static(const ParamReg& reg);
1717 static void del_instance(PluginDef *p);
18
1918 public:
2019 Dsp();
2120 ~Dsp();
88 int fSamplingFreq;
99 int IOTA;
1010 float *fVec0;
11 int iVec1[2];
1112 FAUSTFLOAT fslider0;
12 int iVec1[2];
1313 int iConst0;
1414 float fConst1;
15 float fRec0[2];
16 float fRec1[2];
17 float fRec2[2];
18 float fRec3[2];
1519 FAUSTFLOAT fslider1;
1620 float fConst2;
17 float fRec0[2];
18 float fRec1[2];
21 float fRec4[2];
22 float fRec5[2];
1923 FAUSTFLOAT fcheckbox0;
2024 FAUSTFLOAT fslider2;
21 float fRec2[2];
25 float fRec6[2];
2226 float *fVec2;
2327 FAUSTFLOAT fslider3;
28 float fRec7[2];
29 float fRec8[2];
30 float fRec9[2];
31 float fRec10[2];
2432 FAUSTFLOAT fslider4;
25 float fRec3[2];
33 float fRec11[2];
2634 bool mem_allocated;
2735 void mem_alloc();
2836 void mem_free();
3846 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
3947 static int register_params_static(const ParamReg& reg);
4048 static void del_instance(PluginDef *p);
41
4249 public:
4350 Dsp();
4451 ~Dsp();
7986 for (int i=0; i<2; i++) fRec0[i] = 0;
8087 for (int i=0; i<2; i++) fRec1[i] = 0;
8188 for (int i=0; i<2; i++) fRec2[i] = 0;
89 for (int i=0; i<2; i++) fRec3[i] = 0;
90 for (int i=0; i<2; i++) fRec4[i] = 0;
91 for (int i=0; i<2; i++) fRec5[i] = 0;
92 for (int i=0; i<2; i++) fRec6[i] = 0;
8293 for (int i=0; i<262144; i++) fVec2[i] = 0;
83 for (int i=0; i<2; i++) fRec3[i] = 0;
94 for (int i=0; i<2; i++) fRec7[i] = 0;
95 for (int i=0; i<2; i++) fRec8[i] = 0;
96 for (int i=0; i<2; i++) fRec9[i] = 0;
97 for (int i=0; i<2; i++) fRec10[i] = 0;
98 for (int i=0; i<2; i++) fRec11[i] = 0;
8499 }
85100
86101 void Dsp::clear_state_f_static(PluginDef *p)
137152 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
138153 {
139154 float fSlow0 = (fConst1 * fslider0);
140 int iSlow1 = int(fSlow0);
141 int iSlow2 = int((iSlow1 & 262143));
142 int iSlow3 = (1 + iSlow1);
143 float fSlow4 = (iSlow3 - fSlow0);
144 int iSlow5 = int((int(iSlow3) & 262143));
145 float fSlow6 = (fSlow0 - iSlow1);
146 float fSlow7 = (fConst2 * fslider1);
147 float fSlow8 = sinf(fSlow7);
148 float fSlow9 = cosf(fSlow7);
149 float fSlow10 = (0 - fSlow8);
150 float fSlow11 = fcheckbox0;
151 float fSlow12 = (0.0010000000000000009f * powf(10,(0.05f * fslider2)));
152 float fSlow13 = (fConst1 * fslider3);
153 int iSlow14 = int(fSlow13);
154 int iSlow15 = int((iSlow14 & 262143));
155 int iSlow16 = (1 + iSlow14);
156 float fSlow17 = (iSlow16 - fSlow13);
157 int iSlow18 = int((int(iSlow16) & 262143));
158 float fSlow19 = (fSlow13 - iSlow14);
159 float fSlow20 = (0.0010000000000000009f * powf(10,(0.05f * fslider4)));
155 float fSlow1 = (fConst2 * fslider1);
156 float fSlow2 = sinf(fSlow1);
157 float fSlow3 = cosf(fSlow1);
158 float fSlow4 = (0 - fSlow2);
159 float fSlow5 = fcheckbox0;
160 float fSlow6 = (0.0010000000000000009f * powf(10,(0.05f * fslider2)));
161 float fSlow7 = (fConst1 * fslider3);
162 float fSlow8 = (0.0010000000000000009f * powf(10,(0.05f * fslider4)));
160163 for (int i=0; i<count; i++) {
161164 float fTemp0 = (float)input0[i];
162165 fVec0[IOTA&262143] = fTemp0;
163166 iVec1[0] = 1;
164 fRec0[0] = ((fSlow9 * fRec0[1]) + (fSlow8 * fRec1[1]));
165 fRec1[0] = ((1 + ((fSlow10 * fRec0[1]) + (fSlow9 * fRec1[1]))) - iVec1[1]);
166 float fTemp1 = (fSlow11 * fRec0[0]);
167 fRec2[0] = (fSlow12 + (0.999f * fRec2[1]));
168 output0[i] = (FAUSTFLOAT)(fVec0[IOTA&262143] + ((fRec2[0] * (1 + fTemp1)) * ((fSlow6 * fVec0[(IOTA-iSlow5)&262143]) + (fSlow4 * fVec0[(IOTA-iSlow2)&262143]))));
167 float fTemp1 = ((int((fRec0[1] != 0.0f)))?((int(((fRec1[1] > 0.0f) & (fRec1[1] < 1.0f))))?fRec0[1]:0):((int(((fRec1[1] == 0.0f) & (fSlow0 != fRec2[1]))))?0.0009765625f:((int(((fRec1[1] == 1.0f) & (fSlow0 != fRec3[1]))))?-0.0009765625f:0)));
168 fRec0[0] = fTemp1;
169 fRec1[0] = max(0.0f, min(1.0f, (fRec1[1] + fTemp1)));
170 fRec2[0] = ((int(((fRec1[1] >= 1.0f) & (fRec3[1] != fSlow0))))?fSlow0:fRec2[1]);
171 fRec3[0] = ((int(((fRec1[1] <= 0.0f) & (fRec2[1] != fSlow0))))?fSlow0:fRec3[1]);
172 fRec4[0] = ((fSlow3 * fRec4[1]) + (fSlow2 * fRec5[1]));
173 fRec5[0] = ((1 + ((fSlow4 * fRec4[1]) + (fSlow3 * fRec5[1]))) - iVec1[1]);
174 fRec6[0] = (fSlow6 + (0.999f * fRec6[1]));
175 output0[i] = (FAUSTFLOAT)(fVec0[IOTA&262143] + ((fRec6[0] * (1 - (fSlow5 * fRec4[0]))) * ((fRec1[0] * fVec0[(IOTA-int((int(fRec3[0]) & 262143)))&262143]) + ((1.0f - fRec1[0]) * fVec0[(IOTA-int((int(fRec2[0]) & 262143)))&262143]))));
169176 float fTemp2 = (float)input1[i];
170177 fVec2[IOTA&262143] = fTemp2;
171 fRec3[0] = (fSlow20 + (0.999f * fRec3[1]));
172 output1[i] = (FAUSTFLOAT)(fVec2[IOTA&262143] + ((fRec3[0] * (1 - fTemp1)) * ((fSlow19 * fVec2[(IOTA-iSlow18)&262143]) + (fSlow17 * fVec2[(IOTA-iSlow15)&262143]))));
178 float fTemp3 = ((int((fRec7[1] != 0.0f)))?((int(((fRec8[1] > 0.0f) & (fRec8[1] < 1.0f))))?fRec7[1]:0):((int(((fRec8[1] == 0.0f) & (fSlow7 != fRec9[1]))))?0.0009765625f:((int(((fRec8[1] == 1.0f) & (fSlow7 != fRec10[1]))))?-0.0009765625f:0)));
179 fRec7[0] = fTemp3;
180 fRec8[0] = max(0.0f, min(1.0f, (fRec8[1] + fTemp3)));
181 fRec9[0] = ((int(((fRec8[1] >= 1.0f) & (fRec10[1] != fSlow7))))?fSlow7:fRec9[1]);
182 fRec10[0] = ((int(((fRec8[1] <= 0.0f) & (fRec9[1] != fSlow7))))?fSlow7:fRec10[1]);
183 fRec11[0] = (fSlow8 + (0.999f * fRec11[1]));
184 output1[i] = (FAUSTFLOAT)(fVec2[IOTA&262143] + ((fRec11[0] * ((fRec8[0] * fVec2[(IOTA-int((int(fRec10[0]) & 262143)))&262143]) + ((1.0f - fRec8[0]) * fVec2[(IOTA-int((int(fRec9[0]) & 262143)))&262143]))) * (1 - (fSlow5 * (0 - fRec4[0])))));
173185 // post processing
186 fRec11[1] = fRec11[0];
187 fRec10[1] = fRec10[0];
188 fRec9[1] = fRec9[0];
189 fRec8[1] = fRec8[0];
190 fRec7[1] = fRec7[0];
191 fRec6[1] = fRec6[0];
192 fRec5[1] = fRec5[0];
193 fRec4[1] = fRec4[0];
174194 fRec3[1] = fRec3[0];
175195 fRec2[1] = fRec2[0];
176196 fRec1[1] = fRec1[0];
66 class Dsp: public PluginDef {
77 private:
88 int fSamplingFreq;
9 int iVec0[2];
910 FAUSTFLOAT fslider0;
10 int iVec0[2];
1111 int iConst0;
1212 float fConst1;
13 float fRec1[2];
14 float fRec2[2];
15 int iRec3[2];
16 int iRec4[2];
1317 FAUSTFLOAT fslider1;
1418 float fConst2;
15 float fRec1[2];
16 float fRec2[2];
19 float fRec5[2];
20 float fRec6[2];
1721 FAUSTFLOAT fcheckbox0;
1822 FAUSTFLOAT fslider2;
1923 int IOTA;
2024 float *fRec0;
2125 FAUSTFLOAT fslider3;
26 float fRec8[2];
27 float fRec9[2];
28 int iRec10[2];
29 int iRec11[2];
2230 FAUSTFLOAT fslider4;
23 float *fRec3;
31 float *fRec7;
2432 bool mem_allocated;
2533 void mem_alloc();
2634 void mem_free();
3644 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
3745 static int register_params_static(const ParamReg& reg);
3846 static void del_instance(PluginDef *p);
39
4047 public:
4148 Dsp();
4249 ~Dsp();
4754 Dsp::Dsp()
4855 : PluginDef(),
4956 fRec0(0),
50 fRec3(0),
57 fRec7(0),
5158 mem_allocated(false) {
5259 version = PLUGINDEF_VERSION;
5360 flags = 0;
7582 for (int i=0; i<2; i++) iVec0[i] = 0;
7683 for (int i=0; i<2; i++) fRec1[i] = 0;
7784 for (int i=0; i<2; i++) fRec2[i] = 0;
85 for (int i=0; i<2; i++) iRec3[i] = 0;
86 for (int i=0; i<2; i++) iRec4[i] = 0;
87 for (int i=0; i<2; i++) fRec5[i] = 0;
88 for (int i=0; i<2; i++) fRec6[i] = 0;
7889 for (int i=0; i<262144; i++) fRec0[i] = 0;
79 for (int i=0; i<262144; i++) fRec3[i] = 0;
90 for (int i=0; i<2; i++) fRec8[i] = 0;
91 for (int i=0; i<2; i++) fRec9[i] = 0;
92 for (int i=0; i<2; i++) iRec10[i] = 0;
93 for (int i=0; i<2; i++) iRec11[i] = 0;
94 for (int i=0; i<262144; i++) fRec7[i] = 0;
8095 }
8196
8297 void Dsp::clear_state_f_static(PluginDef *p)
101116 void Dsp::mem_alloc()
102117 {
103118 if (!fRec0) fRec0 = new float[262144];
104 if (!fRec3) fRec3 = new float[262144];
119 if (!fRec7) fRec7 = new float[262144];
105120 mem_allocated = true;
106121 }
107122
109124 {
110125 mem_allocated = false;
111126 if (fRec0) { delete fRec0; fRec0 = 0; }
112 if (fRec3) { delete fRec3; fRec3 = 0; }
127 if (fRec7) { delete fRec7; fRec7 = 0; }
113128 }
114129
115130 int Dsp::activate(bool start)
132147
133148 inline void Dsp::compute(int count, float *input0, float *input1, float *output0, float *output1)
134149 {
135 int iSlow0 = int((fConst1 * fslider0));
136 int iSlow1 = int((iSlow0 - 1.49999f));
137 int iSlow2 = int((1 + int((iSlow1 & 131071))));
138 float fSlow3 = (2.0f + iSlow1);
139 float fSlow4 = (0.5f * (fSlow3 - iSlow0));
140 int iSlow5 = int((1 + int((int((1 + iSlow1)) & 131071))));
141 float fSlow6 = (iSlow0 - (1.0f + iSlow1));
142 float fSlow7 = ((iSlow1 + 3.0f) - iSlow0);
143 int iSlow8 = int((1 + int((int((2 + iSlow1)) & 131071))));
144 float fSlow9 = (0.5f * (fSlow6 * (iSlow0 - fSlow3)));
145 float fSlow10 = (fConst2 * fslider1);
146 float fSlow11 = sinf(fSlow10);
147 float fSlow12 = cosf(fSlow10);
148 float fSlow13 = (0 - fSlow11);
149 float fSlow14 = fcheckbox0;
150 float fSlow15 = (0.01f * fslider2);
151 int iSlow16 = int((fConst1 * fslider3));
152 int iSlow17 = int((iSlow16 - 1.49999f));
153 int iSlow18 = int((1 + int((iSlow17 & 131071))));
154 float fSlow19 = (2.0f + iSlow17);
155 float fSlow20 = (0.5f * (fSlow19 - iSlow16));
156 int iSlow21 = int((1 + int((int((1 + iSlow17)) & 131071))));
157 float fSlow22 = (iSlow16 - (1.0f + iSlow17));
158 float fSlow23 = ((iSlow17 + 3.0f) - iSlow16);
159 int iSlow24 = int((1 + int((int((2 + iSlow17)) & 131071))));
160 float fSlow25 = (0.5f * (fSlow22 * (iSlow16 - fSlow19)));
161 float fSlow26 = (0.01f * fslider4);
150 int iSlow0 = (int((fConst1 * fslider0)) - 1);
151 float fSlow1 = (fConst2 * fslider1);
152 float fSlow2 = sinf(fSlow1);
153 float fSlow3 = cosf(fSlow1);
154 float fSlow4 = (0 - fSlow2);
155 float fSlow5 = fcheckbox0;
156 float fSlow6 = (0.01f * fslider2);
157 int iSlow7 = (int((fConst1 * fslider3)) - 1);
158 float fSlow8 = (0.01f * fslider4);
162159 for (int i=0; i<count; i++) {
163160 iVec0[0] = 1;
164 fRec1[0] = ((fSlow12 * fRec1[1]) + (fSlow11 * fRec2[1]));
165 fRec2[0] = ((1 + ((fSlow13 * fRec1[1]) + (fSlow12 * fRec2[1]))) - iVec0[1]);
166 float fTemp0 = (fSlow14 * fRec1[0]);
167 fRec0[IOTA&262143] = ((float)input0[i] + (fSlow15 * ((1 + fTemp0) * ((fSlow9 * fRec0[(IOTA-iSlow8)&262143]) + (fSlow7 * ((fSlow6 * fRec0[(IOTA-iSlow5)&262143]) + (fSlow4 * fRec0[(IOTA-iSlow2)&262143])))))));
161 float fTemp0 = ((int((fRec1[1] != 0.0f)))?((int(((fRec2[1] > 0.0f) & (fRec2[1] < 1.0f))))?fRec1[1]:0):((int(((fRec2[1] == 0.0f) & (iSlow0 != iRec3[1]))))?0.0009765625f:((int(((fRec2[1] == 1.0f) & (iSlow0 != iRec4[1]))))?-0.0009765625f:0)));
162 fRec1[0] = fTemp0;
163 fRec2[0] = max(0.0f, min(1.0f, (fRec2[1] + fTemp0)));
164 iRec3[0] = ((int(((fRec2[1] >= 1.0f) & (iRec4[1] != iSlow0))))?iSlow0:iRec3[1]);
165 iRec4[0] = ((int(((fRec2[1] <= 0.0f) & (iRec3[1] != iSlow0))))?iSlow0:iRec4[1]);
166 fRec5[0] = ((fSlow3 * fRec5[1]) + (fSlow2 * fRec6[1]));
167 fRec6[0] = ((1 + ((fSlow4 * fRec5[1]) + (fSlow3 * fRec6[1]))) - iVec0[1]);
168 fRec0[IOTA&262143] = ((float)input0[i] + (fSlow6 * ((1 - (fSlow5 * fRec5[0])) * ((fRec2[0] * fRec0[(IOTA-int((1 + int((int(iRec4[0]) & 131071)))))&262143]) + ((1.0f - fRec2[0]) * fRec0[(IOTA-int((1 + int((int(iRec3[0]) & 131071)))))&262143])))));
168169 output0[i] = (FAUSTFLOAT)fRec0[(IOTA-0)&262143];
169 fRec3[IOTA&262143] = ((float)input1[i] + (fSlow26 * ((1 - fTemp0) * ((fSlow25 * fRec3[(IOTA-iSlow24)&262143]) + (fSlow23 * ((fSlow22 * fRec3[(IOTA-iSlow21)&262143]) + (fSlow20 * fRec3[(IOTA-iSlow18)&262143])))))));
170 output1[i] = (FAUSTFLOAT)fRec3[(IOTA-0)&262143];
170 float fTemp1 = ((int((fRec8[1] != 0.0f)))?((int(((fRec9[1] > 0.0f) & (fRec9[1] < 1.0f))))?fRec8[1]:0):((int(((fRec9[1] == 0.0f) & (iSlow7 != iRec10[1]))))?0.0009765625f:((int(((fRec9[1] == 1.0f) & (iSlow7 != iRec11[1]))))?-0.0009765625f:0)));
171 fRec8[0] = fTemp1;
172 fRec9[0] = max(0.0f, min(1.0f, (fRec9[1] + fTemp1)));
173 iRec10[0] = ((int(((fRec9[1] >= 1.0f) & (iRec11[1] != iSlow7))))?iSlow7:iRec10[1]);
174 iRec11[0] = ((int(((fRec9[1] <= 0.0f) & (iRec10[1] != iSlow7))))?iSlow7:iRec11[1]);
175 fRec7[IOTA&262143] = ((float)input1[i] + (fSlow8 * ((1 - (fSlow5 * (0 - fRec5[0]))) * ((fRec9[0] * fRec7[(IOTA-int((1 + int((int(iRec11[0]) & 131071)))))&262143]) + ((1.0f - fRec9[0]) * fRec7[(IOTA-int((1 + int((int(iRec10[0]) & 131071)))))&262143])))));
176 output1[i] = (FAUSTFLOAT)fRec7[(IOTA-0)&262143];
171177 // post processing
178 iRec11[1] = iRec11[0];
179 iRec10[1] = iRec10[0];
180 fRec9[1] = fRec9[0];
181 fRec8[1] = fRec8[0];
172182 IOTA = IOTA+1;
183 fRec6[1] = fRec6[0];
184 fRec5[1] = fRec5[0];
185 iRec4[1] = iRec4[0];
186 iRec3[1] = iRec3[0];
173187 fRec2[1] = fRec2[0];
174188 fRec1[1] = fRec1[0];
175189 iVec0[1] = iVec0[0];
9090 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
9191 static int register_params_static(const ParamReg& reg);
9292 static void del_instance(PluginDef *p);
93
9493 public:
9594 Dsp();
9695 ~Dsp();
267266 double fRec1 = (fRec0[1] - fRec3);
268267 fRec24[0] = ((fSlow9 * fRec24[1]) + (fSlow8 * fRec25[1]));
269268 fRec25[0] = ((1 + ((fSlow10 * fRec24[1]) + (fSlow9 * fRec25[1]))) - iVec0[1]);
270 double fTemp3 = (fSlow11 * fRec24[0]);
271 output0[i] = (FAUSTFLOAT)(((1 + fTemp3) * (fRec1 + (fSlow2 * fTemp0))) + (fSlow1 * fTemp0));
272 double fTemp4 = (double)input1[i];
269 output0[i] = (FAUSTFLOAT)(((1 - (fSlow11 * fRec24[0])) * (fRec1 + (fSlow2 * fTemp0))) + (fSlow1 * fTemp0));
270 double fTemp3 = (double)input1[i];
273271 fRec35[0] = ((fSlow4 * fRec34[1]) + (fSlow3 * fRec35[1]));
274 double fTemp5 = (fSlow6 * fTemp4);
275 fVec13[IOTA&2047] = (fTemp5 + (fSlow5 * fRec35[0]));
272 double fTemp4 = (fSlow6 * fTemp3);
273 fVec13[IOTA&2047] = (fTemp4 + (fSlow5 * fRec35[0]));
276274 fRec34[0] = fVec13[(IOTA-1640)&2047];
277275 fRec37[0] = ((fSlow4 * fRec36[1]) + (fSlow3 * fRec37[1]));
278 fVec14[IOTA&2047] = (fTemp5 + (fSlow5 * fRec37[0]));
276 fVec14[IOTA&2047] = (fTemp4 + (fSlow5 * fRec37[0]));
279277 fRec36[0] = fVec14[(IOTA-1580)&2047];
280278 fRec39[0] = ((fSlow4 * fRec38[1]) + (fSlow3 * fRec39[1]));
281 fVec15[IOTA&2047] = (fTemp5 + (fSlow5 * fRec39[0]));
279 fVec15[IOTA&2047] = (fTemp4 + (fSlow5 * fRec39[0]));
282280 fRec38[0] = fVec15[(IOTA-1514)&2047];
283281 fRec41[0] = ((fSlow4 * fRec40[1]) + (fSlow3 * fRec41[1]));
284 fVec16[IOTA&2047] = (fTemp5 + (fSlow5 * fRec41[0]));
282 fVec16[IOTA&2047] = (fTemp4 + (fSlow5 * fRec41[0]));
285283 fRec40[0] = fVec16[(IOTA-1445)&2047];
286284 fRec43[0] = ((fSlow4 * fRec42[1]) + (fSlow3 * fRec43[1]));
287 fVec17[IOTA&2047] = (fTemp5 + (fSlow5 * fRec43[0]));
285 fVec17[IOTA&2047] = (fTemp4 + (fSlow5 * fRec43[0]));
288286 fRec42[0] = fVec17[(IOTA-1379)&2047];
289287 fRec45[0] = ((fSlow4 * fRec44[1]) + (fSlow3 * fRec45[1]));
290 fVec18[IOTA&2047] = (fTemp5 + (fSlow5 * fRec45[0]));
288 fVec18[IOTA&2047] = (fTemp4 + (fSlow5 * fRec45[0]));
291289 fRec44[0] = fVec18[(IOTA-1300)&2047];
292290 fRec47[0] = ((fSlow4 * fRec46[1]) + (fSlow3 * fRec47[1]));
293 fVec19[IOTA&2047] = (fTemp5 + (fSlow5 * fRec47[0]));
291 fVec19[IOTA&2047] = (fTemp4 + (fSlow5 * fRec47[0]));
294292 fRec46[0] = fVec19[(IOTA-1211)&2047];
295293 fRec49[0] = ((fSlow4 * fRec48[1]) + (fSlow3 * fRec49[1]));
296 fVec20[IOTA&2047] = (fTemp5 + (fSlow5 * fRec49[0]));
294 fVec20[IOTA&2047] = (fTemp4 + (fSlow5 * fRec49[0]));
297295 fRec48[0] = fVec20[(IOTA-1139)&2047];
298 double fTemp6 = (((((((fRec48[0] + fRec46[0]) + fRec44[0]) + fRec42[0]) + fRec40[0]) + fRec38[0]) + fRec36[0]) + fRec34[0]);
299 fVec21[IOTA&1023] = (fTemp6 + (0.5 * fRec32[1]));
296 double fTemp5 = (((((((fRec48[0] + fRec46[0]) + fRec44[0]) + fRec42[0]) + fRec40[0]) + fRec38[0]) + fRec36[0]) + fRec34[0]);
297 fVec21[IOTA&1023] = (fTemp5 + (0.5 * fRec32[1]));
300298 fRec32[0] = fVec21[(IOTA-579)&1023];
301 double fRec33 = (0 - (fTemp6 - fRec32[1]));
299 double fRec33 = (0 - (fTemp5 - fRec32[1]));
302300 fVec22[IOTA&511] = (fRec33 + (0.5 * fRec30[1]));
303301 fRec30[0] = fVec22[(IOTA-464)&511];
304302 double fRec31 = (fRec30[1] - fRec33);
308306 fVec24[IOTA&255] = (fRec29 + (0.5 * fRec26[1]));
309307 fRec26[0] = fVec24[(IOTA-248)&255];
310308 double fRec27 = (fRec26[1] - fRec29);
311 output1[i] = (FAUSTFLOAT)(((1 - fTemp3) * (fRec27 + (fSlow2 * fTemp4))) + (fSlow1 * fTemp4));
309 output1[i] = (FAUSTFLOAT)(((1 - (fSlow11 * (0 - fRec24[0]))) * (fRec27 + (fSlow2 * fTemp3))) + (fSlow1 * fTemp3));
312310 // post processing
313311 fRec26[1] = fRec26[0];
314312 fRec28[1] = fRec28[0];
7676 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
7777 static int register_params_static(const ParamReg& reg);
7878 static void del_instance(PluginDef *p);
79
8079 public:
8180 Dsp();
8281 ~Dsp();
3030 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3131 static int register_params_static(const ParamReg& reg);
3232 static void del_instance(PluginDef *p);
33
3433 public:
3534 Dsp();
3635 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
3434 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3535 static int register_params_static(const ParamReg& reg);
3636 static void del_instance(PluginDef *p);
37
3837 public:
3938 Dsp();
4039 ~Dsp();
0 // generated from file '../src/faust/tonestack_engl.dsp' by dsp2cc:
1 // Code generated with Faust 0.9.46 (http://faust.grame.fr)
2
3
4 namespace tonestack_engl {
5
6 class Dsp: public PluginDef {
7 private:
8 int fSamplingFreq;
9 FAUSTFLOAT fslider0;
10 FAUSTFLOAT *fslider0_;
11 FAUSTFLOAT fslider1;
12 FAUSTFLOAT *fslider1_;
13 double fConst0;
14 double fConst1;
15 double fConst2;
16 double fRec0[4];
17 FAUSTFLOAT fslider2;
18 FAUSTFLOAT *fslider2_;
19 void clear_state_f();
20 void init(unsigned int samplingFreq);
21 void compute(int count, float *input0, float *output0);
22 int register_par(const ParamReg& reg);
23
24 static void clear_state_f_static(PluginDef*);
25 static void init_static(unsigned int samplingFreq, PluginDef*);
26 static void compute_static(int count, float *input0, float *output0, PluginDef*);
27 static int register_params_static(const ParamReg& reg);
28 static void del_instance(PluginDef *p);
29 public:
30 Dsp();
31 ~Dsp();
32 };
33
34
35
36 Dsp::Dsp()
37 : PluginDef() {
38 version = PLUGINDEF_VERSION;
39 flags = 0;
40 id = "Engl";
41 name = N_("Engl");
42 groups = 0;
43 description = ""; // description (tooltip)
44 category = ""; // category
45 shortname = ""; // shortname
46 mono_audio = compute_static;
47 stereo_audio = 0;
48 set_samplerate = init_static;
49 activate_plugin = 0;
50 register_params = register_params_static;
51 load_ui = 0;
52 clear_state = clear_state_f_static;
53 delete_instance = del_instance;
54 }
55
56 Dsp::~Dsp() {
57 }
58
59 inline void Dsp::clear_state_f()
60 {
61 for (int i=0; i<4; i++) fRec0[i] = 0;
62 }
63
64 void Dsp::clear_state_f_static(PluginDef *p)
65 {
66 static_cast<Dsp*>(p)->clear_state_f();
67 }
68
69 inline void Dsp::init(unsigned int samplingFreq)
70 {
71 fSamplingFreq = samplingFreq;
72 fConst0 = (2 * double(min(192000, max(1, fSamplingFreq))));
73 fConst1 = faustpower<2>(fConst0);
74 fConst2 = (3 * fConst0);
75 clear_state_f();
76 }
77
78 void Dsp::init_static(unsigned int samplingFreq, PluginDef *p)
79 {
80 static_cast<Dsp*>(p)->init(samplingFreq);
81 }
82
83 inline void Dsp::compute(int count, float *input0, float *output0)
84 {
85 #define fslider0 (*fslider0_)
86 #define fslider1 (*fslider1_)
87 #define fslider2 (*fslider2_)
88 double fSlow0 = fslider0;
89 double fSlow1 = (8.948800000000001e-07 * fSlow0);
90 double fSlow2 = exp((3.4 * (fslider1 - 1)));
91 double fSlow3 = (6.0818e-06 + ((0.00023359 * fSlow2) + (fSlow0 * (((4.4744000000000004e-05 * fSlow2) - 3.38212e-06) - fSlow1))));
92 double fSlow4 = ((9.277800000000001e-09 * fSlow2) - (1.8555600000000002e-10 * fSlow0));
93 double fSlow5 = (3.3135000000000005e-08 * fSlow2);
94 double fSlow6 = (6.627000000000001e-10 + (fSlow5 + (fSlow0 * (fSlow4 - 4.771440000000001e-10))));
95 double fSlow7 = (fConst0 * fSlow6);
96 double fSlow8 = (0.0009400000000000001 * fSlow0);
97 double fSlow9 = (0.04760000000000001 * fSlow2);
98 double fSlow10 = (fConst0 * (0.010502000000000001 + (fSlow9 + fSlow8)));
99 double fSlow11 = ((fSlow10 + (fConst1 * (fSlow7 - fSlow3))) - 1);
100 double fSlow12 = (fConst2 * fSlow6);
101 double fSlow13 = ((fConst1 * (fSlow3 + fSlow12)) - (3 + fSlow10));
102 double fSlow14 = ((fSlow10 + (fConst1 * (fSlow3 - fSlow12))) - 3);
103 double fSlow15 = (1.0 / (0 - (1 + (fSlow10 + (fConst1 * (fSlow3 + fSlow7))))));
104 double fSlow16 = fslider2;
105 double fSlow17 = ((fSlow0 * (1.8555600000000002e-10 + fSlow4)) + (fSlow16 * (fSlow5 + (6.627000000000001e-10 - (6.627000000000001e-10 * fSlow0)))));
106 double fSlow18 = (fConst2 * fSlow17);
107 double fSlow19 = (2.538e-07 + (((1.41e-06 * fSlow16) + (fSlow0 * (1.0358800000000002e-06 - fSlow1))) + (fSlow2 * (1.269e-05 + (4.4744000000000004e-05 * fSlow0)))));
108 double fSlow20 = (0.000952 + (fSlow9 + (fSlow8 + (0.00015 * fSlow16))));
109 double fSlow21 = (fConst0 * fSlow20);
110 double fSlow22 = (fSlow21 + (fConst1 * (fSlow19 - fSlow18)));
111 double fSlow23 = (fConst0 * fSlow17);
112 double fSlow24 = (fSlow21 + (fConst1 * (fSlow23 - fSlow19)));
113 double fSlow25 = (fConst0 * (0 - fSlow20));
114 double fSlow26 = (fSlow25 + (fConst1 * (fSlow19 + fSlow18)));
115 double fSlow27 = (fSlow25 - (fConst1 * (fSlow19 + fSlow23)));
116 for (int i=0; i<count; i++) {
117 fRec0[0] = ((double)input0[i] - (fSlow15 * (((fSlow14 * fRec0[2]) + (fSlow13 * fRec0[1])) + (fSlow11 * fRec0[3]))));
118 output0[i] = (FAUSTFLOAT)(fSlow15 * ((fSlow27 * fRec0[0]) + ((fSlow26 * fRec0[1]) + ((fSlow24 * fRec0[3]) + (fSlow22 * fRec0[2])))));
119 // post processing
120 for (int i=3; i>0; i--) fRec0[i] = fRec0[i-1];
121 }
122 #undef fslider0
123 #undef fslider1
124 #undef fslider2
125 }
126
127 void Dsp::compute_static(int count, float *input0, float *output0, PluginDef *p)
128 {
129 static_cast<Dsp*>(p)->compute(count, input0, output0);
130 }
131
132 int Dsp::register_par(const ParamReg& reg)
133 {
134 fslider2_ = reg.registerVar("amp.tonestack.Treble","","SA","",&fslider2, 0.5, 0.0, 1.0, 0.01);
135 fslider1_ = reg.registerVar("amp.tonestack.Bass","","SA","",&fslider1, 0.5, 0.0, 1.0, 0.01);
136 fslider0_ = reg.registerVar("amp.tonestack.Middle","","SA","",&fslider0, 0.5, 0.0, 1.0, 0.01);
137 return 0;
138 }
139
140 int Dsp::register_params_static(const ParamReg& reg)
141 {
142 return static_cast<Dsp*>(reg.plugin)->register_par(reg);
143 }
144
145 PluginDef *plugin() {
146 return new Dsp();
147 }
148
149 void Dsp::del_instance(PluginDef *p)
150 {
151 delete static_cast<Dsp*>(p);
152 }
153
154 } // end namespace tonestack_engl
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
2626 static void compute_static(int count, float *input0, float *output0, PluginDef*);
2727 static int register_params_static(const ParamReg& reg);
2828 static void del_instance(PluginDef *p);
29
3029 public:
3130 Dsp();
3231 ~Dsp();
3131 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3232 static int register_params_static(const ParamReg& reg);
3333 static void del_instance(PluginDef *p);
34
3534 public:
3635 Dsp();
3736 ~Dsp();
6868 gx_tonestacks::tonestack_fender_default::plugin,
6969 gx_tonestacks::tonestack_fender_deville::plugin,
7070 gx_tonestacks::tonestack_gibsen::plugin,
71 gx_tonestacks::tonestack_engl::plugin,
7172 0
7273 };
7374
7676 #include "faust/tonestack_fender_default.cc"
7777 #include "faust/tonestack_fender_deville.cc"
7878 #include "faust/tonestack_gibsen.cc"
79 #include "faust/tonestack_engl.cc"
7980 }
8081
8182 namespace gx_effects {
9393 delete[] m_buffer;
9494 }
9595
96 void PitchTracker::set_threshold(float v) {
97 signal_threshold_on = v;
98 signal_threshold_off = v*0.9;
99 }
100
96101 void PitchTracker::set_fast_note_detection(bool v) {
97102 if (v) {
98103 signal_threshold_on = SIGNAL_THRESHOLD_ON * 5;
290290 sys_IR_dir(GX_SOUND_DIR),
291291 IR_pathlist(),
292292 rcset(shellvar("GUITARIX_RC_STYLE")),
293 nogui(false),
293294 lterminal(false),
294295 a_save(false),
295296 #ifndef NDEBUG
336337 opt_rcset.set_long_name("rcset");
337338 opt_rcset.set_description(get_opskin());
338339 opt_rcset.set_arg_description("STYLE");
340 Glib::OptionEntry opt_nogui;
341 opt_nogui.set_short_name('N');
342 opt_nogui.set_long_name("nogui");
343 opt_nogui.set_description("start without GUI");
344 optgroup_style.add_entry(opt_nogui, nogui);
339345 optgroup_style.add_entry(opt_clear, clear);
340346 optgroup_style.add_entry(opt_rcset, rcset);
341347
368374 opt_jack_uuid.set_short_name('U');
369375 opt_jack_uuid.set_long_name("jack-uuid");
370376 opt_jack_uuid.set_description("JackSession ID");
377 opt_jack_uuid.set_arg_description("UUID");
371378 Glib::OptionEntry opt_jack_uuid2;
372379 opt_jack_uuid2.set_short_name('A');
373380 opt_jack_uuid2.set_long_name("jack-uuid2");
374381 opt_jack_uuid2.set_description("JackSession ID");
382 opt_jack_uuid2.set_arg_description("UUID2");
375383 Glib::OptionEntry opt_jack_servername;
376384 opt_jack_servername.set_short_name('s');
377385 opt_jack_servername.set_long_name("server-name");
354354
355355 gx_system::CmdlineOptions options;
356356 Gtk::Main main(argc, argv, options);
357
358 GxSplashBox * Splash = new GxSplashBox();
359
360 gx_system::GxExit::get_instance().signal_msg().connect(
361 sigc::ptr_fun(gx_gui::show_error_msg)); // show fatal errors in UI
362 ErrorPopup popup;
363 gx_system::Logger::get_logger().signal_message().connect(
364 sigc::mem_fun(popup, &ErrorPopup::on_message));
365
366 options.process(argc, argv);
367
357 options.process(argc, argv);
358 gx_system::CmdlineOptions& opt = gx_system::get_options();
359 GxSplashBox * Splash = NULL;
360 if (!opt.get_nogui()) {
361 Splash = new GxSplashBox();
362
363 gx_system::GxExit::get_instance().signal_msg().connect(
364 sigc::ptr_fun(gx_gui::show_error_msg)); // show fatal errors in UI
365 ErrorPopup popup;
366 gx_system::Logger::get_logger().signal_message().connect(
367 sigc::mem_fun(popup, &ErrorPopup::on_message));
368 }
368369 // ---------------- Check for working user directory -------------
369370 bool need_new_preset;
370371 if (gx_preset::GxSettings::check_settings_dir(options, &need_new_preset)) {
391392 gx_system::add_time_measurement();
392393
393394 if (argc > 1) {
394 delete Splash;
395 if (!opt.get_nogui()) {
396 delete Splash;
397 }
395398 return debug_display_glade(engine, options, gx_engine::parameter_map, argv[1]);
396399 }
397400 #endif
401404 gui.create_default_scratch_preset();
402405 }
403406 // ----------------------- run GTK main loop ----------------------
404 delete Splash;
405 gui.run();
407 if (!opt.get_nogui()) {
408 delete Splash;
409 gui.run();
410 } else {
411 char t;
412 cout << "Type quit (q) and Enter to exit: ";
413 cin >> t;
414 gx_system::GxExit::get_instance().exit_program("** guitarix exit **");
415 }
406416 gx_child_process::childprocs.killall();
407417 #ifndef NDEBUG
408418 if (options.dump_parameter) {
7676 declare(tonestack_fender_default)
7777 declare(tonestack_fender_deville)
7878 declare(tonestack_gibsen)
79 declare(tonestack_engl)
7980 }
8081
8182 namespace gx_effects {
3737 float get_estimated_note();
3838 void stop_thread();
3939 void reset();
40 void set_threshold(float v);
4041 void set_fast_note_detection(bool v);
4142 Glib::Dispatcher new_freq;
4243 private:
311311 string sys_IR_dir;
312312 PathList IR_pathlist;
313313 Glib::ustring rcset;
314 bool nogui;
314315 bool lterminal;
315316 bool a_save;
316317 static CmdlineOptions *instance;
344345 const string& get_factory_dir() const { return factory_dir; }
345346 const string& get_sys_IR_dir() const { return sys_IR_dir; }
346347 const Glib::ustring& get_rcset() const { return rcset; }
348 bool get_nogui() const { return nogui; }
347349 const string& get_loadfile() const { return load_file; }
348350 const Glib::ustring& get_jack_instancename() const { return jack_instance; }
349351 const Glib::ustring& get_jack_uuid() const { return jack_uuid; }
855855 gx_tonestacks::tonestack_fender_default::plugin,
856856 gx_tonestacks::tonestack_fender_deville::plugin,
857857 gx_tonestacks::tonestack_gibsen::plugin,
858 gx_tonestacks::tonestack_engl::plugin,
858859 0
859860 };
860861
19241925 static bool inited = 0;
19251926 if (!inited) {
19261927 inited = 1;
1928 #if ENABLE_NLS
19271929 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
19281930 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
1931 #endif
19291932 }
19301933 switch (Index) {
19311934 case 0:
3939 static void compute_static(int count, float *input0, float *output0, PluginDef*);
4040 static int register_params_static(const ParamReg& reg);
4141 static void del_instance(PluginDef *p);
42
4342 public:
4443 Dsp();
4544 ~Dsp();
3737 static void compute_static(int count, float *input0, float *output0, PluginDef*);
3838 static int register_params_static(const ParamReg& reg);
3939 static void del_instance(PluginDef *p);
40
4140 public:
4241 Dsp();
4342 ~Dsp();
135135 static void compute_static(int count, float *input0, float *input1, float *output0, float *output1, PluginDef*);
136136 static int register_params_static(const ParamReg& reg);
137137 static void del_instance(PluginDef *p);
138
139138 public:
140139 Dsp();
141140 ~Dsp();
55 cython --cplus "$2".pyx
66 opt="$(python-config --cflags --ldflags | sed s/-Wstrict-prototypes//)"
77 opt="$opt -shared -fPIC -lrt"
8 opt="$opt -I$instdir/src/gx_head -I$instdir/src/headers"
8 opt="$opt -I$instdir/src/gx_head/engine -I$instdir/src/headers"
99 opt="$opt -Wall -Wno-unused-function"
1010 #opt="$opt -Wno-unused-but-set-variable"
11 opt="$opt -O3 -march=i686 -mmmx -msse4.2 -mfpmath=sse -ftree-loop-linear -ffinite-math-only -fno-math-errno -fno-signed-zeros -fstrength-reduce"
11 opt="$opt -O2 -march=corei7 -pipe -mmmx -msse4.2 -mfpmath=sse -ftree-loop-linear -ffinite-math-only -fno-math-errno -fno-signed-zeros -fstrength-reduce"
1212 g++ "$2".cpp -o "$2".so $opt
1313 rm -f faustwrap.cpp $2.cpp
1414 echo "created $2.so"
3434 trap 'rm -f "$bname".pyx' EXIT
3535 ln -s "$tooldir"/faustmod.pyx "$bname".pyx
3636 fi
37 echo "$1"
38 echo "$basename"
3739 compile "$1" "$bname"
4343 else:
4444 fp.write('\t%(prefix)sregisterVar("%(id)s",%(N_name)s,"%(type)s",%(N_tooltip)s,&%(variable)s%(tail)s);\n' % d)
4545
46 def write_port(self, fp, v, prefix):
47 d = {}
48 d.update(self)
49 d["tail"] = "".join([", "+x for x in d["value"]])
50 d["prefix"] = prefix
51 d["N_name"] = wrap_N_("%(name)s" % self)
52 d["N_tooltip"] = wrap_N_("%(tooltip)s" % self)
53 ast = d["id"].split(".")
54 d["port"] = re.sub(r'\s+', '',ast[-1].upper())
55 if "log" in d:
56 d["type"] += "L"
57 if "enum" not in d:
58 if "alias" in d:
59 assert "enum" not in d
60 fp.write(' case %(port)s: \n %(variable)s_ = (float*)data; // %(tail)s \n break;\n' % d)
61 # fp.write('\t%(variable)s_ = %(prefix)sregisterVar("%(id)s",%(N_name)s,"%(type)sA",%(N_tooltip)s,&%(variable)s%(tail)s);\n' % d)
62 elif "enum" in d:
63 def value_pair(s):
64 m = re.match(r"(.*)\[(.*)\]$", s)
65 if m:
66 return '{"%s",%s}' % (m.group(1), wrap_N_(m.group(2)))
67 else:
68 return '{"%s"}' % s
69 enumvals = ",".join([value_pair(x) for x in d["enum"].split("|")]+["{0}"])
70 d["ename"] = ename = d["variable"] + "_values"
71 fp.write('\t// static const value_pair %s[] = {%s};\n' % (ename, enumvals))
72 fp.write(' case %(port)s: \n %(variable)s_ = (float*)data; // %(tail)s \n break;\n' % d)
73 #fp.write('\t%(prefix)sregisterEnumVar("%(id)s",%(N_name)s,"%(type)s",%(N_tooltip)s,%(ename)s,&%(variable)s%(tail)s);\n' % d)
74 else:
75 fp.write(' case %(port)s: \n %(variable)s_ = (float*)data; // %(tail)s \n break;\n' % d)
76 #fp.write('\t%(prefix)sregisterVar("%(id)s",%(N_name)s,"%(type)s",%(N_tooltip)s,&%(variable)s%(tail)s);\n' % d)
77
78 def write_port_head(self, fp, v, prefix):
79 d = {}
80 d.update(self)
81 ast = d["id"].split(".")
82 d["port"] = re.sub(r'\s+', '',ast[-1].upper())
83 fp.write(' %(port)s, \n' % d)
84
4685 def __getitem__(self, n):
4786 try:
4887 return dict.__getitem__(self, n)
80119 def write(self, fp, prefix=""):
81120 for v, r in self.ui.items():
82121 r.write(fp, v, prefix)
122
123 def write_port(self, fp, prefix=""):
124 for v, r in self.ui.items():
125 r.write_port(fp, v, prefix)
126
127 def write_port_head(self, fp, prefix=""):
128 for v, r in self.ui.items():
129 r.write_port_head(fp, v, prefix)
83130
84131 def check_parameter(self, fname, uiname, l, only_warn):
85132 s1 = set(l)
327374 cp.append(line)
328375 raise RuntimeError("EOF while looking for #include")
329376
330 def change_var_decl(self, lines):
377 def change_var_decl(self, lines, init_type):
331378 param_matcher = re.compile(r"FAUSTFLOAT\s+([a-zA-Z_0-9]+);\n$").match
332379 array_matcher = re.compile(r"(int|float|double)\s+([a-zA-Z_0-9]+)\s*\[\s*(\d+)\s*\]\s*;\n$").match
333380 static_matcher = re.compile(r"static (int|float|double)\s+([a-zA-Z_0-9]+)\s*\[\s*(\d+)\s*\]\s*;\n$").match
339386 if m:
340387 var = m.group(1)
341388 alias = self.ui.has(var,"alias")
389 if init_type in ("plugin-lv2"):
390 if not alias:
391 self.ui.add(var,"alias", "[alias]")
392 alias = self.ui.has(var,"alias")
342393 if alias:
343394 #l = ('FAUSTFLOAT&\t%s = get_alias("%s");\n'
344395 # % (var, self.ui.get(var, "id")))
375426 l.append("if (%s) { delete %s; %s = 0; }\n" % (v, v, v))
376427 return l
377428
378 def __init__(self, lines, modname, memory_threshold):
429 def __init__(self, lines, modname, memory_threshold, init_type):
379430 self.lines = lines
380431 self.modname = modname
381432 self.memory_threshold = memory_threshold;
385436 self.groups = {}
386437 self.memlist = []
387438 self.staticlist = []
439 self.init_type = init_type
388440 s = {}
389441 self.ui = UIDefs()
390442 #self.readMeta() # (needed only for faust 9.4
402454 s["var-init"] += self.copy(r"\s*}$")
403455 self.skip_until(r"\s*virtual void buildUserInterface")
404456 s["ui"] = self.readUI(r"\s*}$")
405 s["var-decl"], s["alias-defines"], s["alias-undefines"] = self.change_var_decl(var_decl)
457 s["var-decl"], s["alias-defines"], s["alias-undefines"] = self.change_var_decl(var_decl,init_type)
406458 s["var-init"] = s["var-init"]
407459 s["var-alloc"] = self.add_var_alloc()
408460 s["var-free"] = self.add_var_free()
713765 static void compute_static(int count%(compute_args)s, PluginDef*);
714766 static int register_params_static(const ParamReg& reg);
715767 static void del_instance(PluginDef *p);
716
717768 public:
718769 #endif
719770 Dsp();
905956 #if %(sharedlib)s
906957 extern "C" __attribute__ ((visibility ("default"))) int
907958 get_gx_plugin(unsigned int idx, PluginDef **pplugin)
959 {
960 if (!pplugin) {
961 return 1;
962 }
963 if (idx > 0) {
964 return -1;
965 }
966 *pplugin = new Dsp();
967 return 1;
968 }
969 #endif
970 } // end namespace %(namespace)s
971 %(end_extra_namespace)s\
972 """
973
974 template_plugin_lv2 = """\
975 // generated from file '%(filepath)s' by dsp2cc:
976 // %(headline)s
977
978 #if %(has_separate_header)s
979 #define FAUSTFLOAT float
980 #else
981 #if %(has_standalone_header)s
982 #include "gx_faust_support.h"
983 #include "gx_plugin.h"
984 #endif
985 %(includes)s\
986 #endif
987
988 %(start_extra_namespace)s\
989 namespace %(namespace)s {
990
991 #if %(has_plugindef)s
992 class Dsp: public PluginLV2 {
993 #else
994 class Dsp {
995 #endif
996 private:
997 uint32_t fSamplingFreq;
998 %(var_decl)s\
999 #if %(has_activate)s
1000 bool mem_allocated;
1001 void mem_alloc();
1002 void mem_free();
1003 #endif
1004 #if %(has_lv2)s
1005 void connect(uint32_t port,void* data);
1006 #endif
1007 #ifnot %(has_plugindef)s
1008
1009 public:
1010 #endif
1011 #if %(has_state)s
1012 void clear_state_f();
1013 #endif
1014 #if %(has_activate)s
1015 int activate(bool start);
1016 #endif
1017 #if %(has_cc_ui)s
1018 int load_ui_f(const UiBuilder& b);
1019 #endif
1020 #if %(has_glade_ui)s
1021 int load_ui_f(const UiBuilder& b);
1022 static const char *glade_def;
1023 #endif
1024 void init(uint32_t samplingFreq);
1025 void compute(int count%(compute_args)s);
1026 #if %(has_plugindef)s
1027
1028 #if %(has_state)s
1029 static void clear_state_f_static(PluginLV2*);
1030 #endif
1031 #if %(has_activate)s
1032 static int activate_static(bool start, PluginLV2*);
1033 #endif
1034 #if %(has_cc_ui)s
1035 static int load_ui_f_static(const UiBuilder& b);
1036 #endif
1037 #if %(has_glade_ui)s
1038 static int load_ui_f_static(const UiBuilder& b);
1039 #endif
1040 static void init_static(uint32_t samplingFreq, PluginLV2*);
1041 static void compute_static(int count%(compute_args)s, PluginLV2*);
1042 static void del_instance(PluginLV2 *p);
1043 #if %(has_lv2)s
1044 static void connect_static(uint32_t port,void* data, PluginLV2 *p);
1045 #endif
1046 public:
1047 #endif
1048 Dsp();
1049 ~Dsp();
1050 };
1051
1052 #if %(has_separate_header)s
1053 } // end namespace %(namespace)s
1054 %(end_extra_namespace)s\
1055 #impl
1056 // generated from file '%(filepath)s' by dsp2cc:
1057 // %(headline)s
1058
1059 #if %(has_standalone_header)s
1060 #include "gx_faust_support.h"
1061 #include "gx_plugin.h"
1062 #include "%(header_name)s"
1063 #endif
1064 %(includes)s\
1065
1066 %(start_extra_namespace)s\
1067 namespace %(namespace)s {
1068 #endif
1069
1070 %(static_decl)s\
1071 %(groups_define)s\
1072
1073 Dsp::Dsp()%(dsp_initlist)s {
1074 #if %(has_plugindef)s
1075 version = PLUGINLV2_VERSION;
1076 id = "%(plugin_id)s";
1077 name = %(plugin_name)s;
1078 mono_audio = %(mono_compute_p)s;
1079 stereo_audio = %(stereo_compute_p)s;
1080 set_samplerate = init_static;
1081 activate_plugin = %(activate_p)s;
1082 connect_ports = connect_static;
1083 clear_state = %(clear_state_p)s;
1084 delete_instance = del_instance;
1085 #endif
1086 }
1087
1088 Dsp::~Dsp() {
1089 }
1090
1091 #if %(has_state)s
1092 inline void Dsp::clear_state_f()
1093 {
1094 %(state_init)s\
1095 }
1096
1097 #if %(has_plugindef)s
1098 void Dsp::clear_state_f_static(PluginLV2 *p)
1099 {
1100 static_cast<Dsp*>(p)->clear_state_f();
1101 }
1102
1103 #endif
1104 #endif
1105 inline void Dsp::init(uint32_t samplingFreq)
1106 {
1107 %(init_body)s\
1108 #if %(has_state_no_activate)s
1109 clear_state_f();
1110 #endif
1111 }
1112
1113 #if %(has_plugindef)s
1114 void Dsp::init_static(uint32_t samplingFreq, PluginLV2 *p)
1115 {
1116 static_cast<Dsp*>(p)->init(samplingFreq);
1117 }
1118
1119 #endif
1120 #if %(has_activate)s
1121 void Dsp::mem_alloc()
1122 {
1123 %(var_alloc)s\
1124 mem_allocated = true;
1125 }
1126
1127 void Dsp::mem_free()
1128 {
1129 mem_allocated = false;
1130 %(var_free)s\
1131 }
1132
1133 int Dsp::activate(bool start)
1134 {
1135 if (start) {
1136 if (!mem_allocated) {
1137 mem_alloc();
1138 clear_state_f();
1139 }
1140 } else if (!mem_allocated) {
1141 mem_free();
1142 }
1143 return 0;
1144 }
1145
1146 #if %(has_plugindef)s
1147 int Dsp::activate_static(bool start, PluginLV2 *p)
1148 {
1149 return static_cast<Dsp*>(p)->activate(start);
1150 }
1151
1152 #endif
1153 #endif
1154 inline void Dsp::compute(int count%(compute_args)s)
1155 {
1156 %(defines)s\
1157 %(compute_body)s\
1158 }
1159 %(undefines)s\
1160 }
1161
1162 #if %(has_plugindef)s
1163 void Dsp::compute_static(int count%(compute_args)s, PluginLV2 *p)
1164 {
1165 static_cast<Dsp*>(p)->compute(count%(compute_call_args)s);
1166 }
1167
1168 #endif
1169
1170 #if %(has_lv2)s
1171 void Dsp::connect(uint32_t port,void* data)
1172 {
1173 switch ((PortIndex)port)
1174 {
1175 %(port_body)s\
1176 default:
1177 break;
1178 }
1179 }
1180
1181 void Dsp::connect_static(uint32_t port,void* data, PluginLV2 *p)
1182 {
1183 static_cast<Dsp*>(p)->connect(port, data);
1184 }
1185
1186 #endif
1187
1188 #if %(has_cc_ui)s
1189 inline int Dsp::load_ui_f(const UiBuilder& b)
1190 {
1191 #define PARAM(p) ("%(plugin_id)s" "." p)
1192 %(cc_ui)s
1193 #undef PARAM
1194 return 0;
1195 }
1196
1197 #if %(has_plugindef)s
1198 int Dsp::load_ui_f_static(const UiBuilder& b)
1199 {
1200 return static_cast<Dsp*>(b.plugin)->load_ui_f(b);
1201 }
1202
1203 #endif
1204 #endif
1205 #if %(has_glade_ui)s
1206 const char *Dsp::glade_def = "\\
1207 %(glade_ui)s";
1208
1209 int Dsp::load_ui_f(const UiBuilder& b)
1210 {
1211 b.load_glade(glade_def);
1212 return 0;
1213 }
1214
1215 #if %(has_plugindef)s
1216 int Dsp::load_ui_f_static(const UiBuilder& b)
1217 {
1218 return static_cast<Dsp*>(b.plugin)->load_ui_f(b);
1219 }
1220
1221 #endif
1222 #endif
1223 #if %(has_plugindef)s
1224 PluginLV2 *plugin() {
1225 return new Dsp();
1226 }
1227
1228 void Dsp::del_instance(PluginLV2 *p)
1229 {
1230 delete static_cast<Dsp*>(p);
1231 }
1232
1233 /*
1234 typedef enum
1235 {
1236 %(port_head)s\
1237 } PortIndex;
1238 */
1239
1240 #endif
1241 #if %(sharedlib)s
1242 extern "C" __attribute__ ((visibility ("default"))) int
1243 get_gx_plugin(unsigned int idx, PluginLV2 **pplugin)
9081244 {
9091245 if (!pplugin) {
9101246 return 1;
10051341 self.parser.write(s, sect, indent, filt)
10061342 return s.getvalue()
10071343
1008 def parser_ui(self, prefix=""):
1344 def parser_ui(self, has_lv2, prefix=""):
10091345 s = StringIO()
1010 self.parser.ui.write(s, prefix)
1346 if has_lv2:
1347 self.parser.ui.write_port(s, prefix)
1348 else:
1349 self.parser.ui.write(s, prefix)
10111350 return s.getvalue()
10121351
1352 def parser_h_lv2(self, prefix=""):
1353 s = StringIO()
1354 self.parser.ui.write_port_head(s, prefix)
1355 return s.getvalue()
1356 def parser_lv2(self, prefix=""):
1357 s = StringIO()
1358 self.parser.ui.write_port(s, prefix)
1359 return s.getvalue()
10131360 def gen_load_ui(self, plugin_id):
10141361 s = StringIO()
10151362 ret = self.write_load_ui(s, plugin_id, False)
10211368 return False, "", True, s.getvalue()
10221369 assert False, str(ret)
10231370
1024 def dsp_initlist(self, has_plugindef):
1025 if has_plugindef:
1371 def dsp_initlist(self, has_plugindef, has_lv2):
1372 if has_lv2:
1373 l = ["PluginLV2()"]
1374 elif has_plugindef:
10261375 l = ["PluginDef()"]
10271376 else:
10281377 l = []
10441393 ds = "_static"
10451394 indent = 1
10461395 plugin_standalone = self.options.template_type in ("staticlib", "sharedlib")
1047 has_plugindef = self.options.init_type in ("plugin", "plugin-instance")
1396 has_plugindef = self.options.init_type in ("plugin", "plugin-instance", "plugin-lv2")
1397 has_lv2 = self.options.init_type in ("plugin-lv2")
10481398 in_namespace = self.options.in_namespace
10491399 compute_args = ("".join([", float *input%d" % i for i in range(self.parser.getNumInputs())])
10501400 + "".join([", float *output%d" % i for i in range(self.parser.getNumOutputs())]))
10621412 plugin_name = '"?%s"' % self.parser.modname
10631413 static_decl = "".join(["%s Dsp::%s[%s];\n" % (tp, v, n) for v, tp, n in self.parser.staticlist])
10641414 template = template_plugin if self.options.init_type == "plugin" else template_plugin_instance
1415 if self.options.init_type == "plugin-lv2":
1416 template = template_plugin_lv2
10651417 s = StringIO()
10661418 s.write(template % dict(
10671419 filepath = self.fname,
10781430 has_state = self.state_init != "",
10791431 has_state_no_activate = self.state_init != "" and not self.has_activate,
10801432 init_body = self.parser_sect("var-init", 1, filt=self.parser.ui.var_filter(1)),
1081 dsp_initlist = self.dsp_initlist(has_plugindef),
1433 dsp_initlist = self.dsp_initlist(has_plugindef, has_lv2),
10821434 var_alloc = self.parser_sect("var-alloc", 1),
10831435 var_free = self.parser_sect("var-free", 1),
10841436 compute_args = compute_args,
10861438 defines = self.parser_sect("alias-defines", 0),
10871439 compute_body = self.parser_sect("compute", 1),
10881440 undefines = self.parser_sect("alias-undefines", 0),
1089 register_body = self.parser_ui("reg."),
1441 register_body = self.parser_ui(has_lv2, "reg."),
1442 port_body = self.parser_lv2(""),
1443 port_head = self.parser_h_lv2(""),
10901444 has_cc_ui = has_cc_ui,
10911445 has_glade_ui = has_glade_ui,
10921446 cc_ui = cc_ui,
11041458 load_ui_p = "load_ui_f"+ds if has_cc_ui or has_glade_ui else "0",
11051459 clear_state_p = "clear_state_f"+ds if self.state_init else "0",
11061460 has_plugindef = has_plugindef,
1461 has_lv2 = has_lv2,
11071462 has_separate_header = fp_head is not None,
11081463 header_name = h_name,
11091464 sharedlib = self.options.template_type == "sharedlib",
11521507 raise SystemExit("template EOF: unbalanced #if / #endif")
11531508
11541509 def write(self, fp, fp_head, h_name):
1155 if self.options.init_type in ("plugin", "plugin-instance", "no-init-instance"):
1510 if self.options.init_type in ("plugin", "plugin-instance", "no-init-instance", "plugin-lv2"):
11561511 self.write_plugin(fp, fp_head, h_name)
11571512 return
11581513 #FIXME: cleanup when write_plugin can generate code for all types of plugins
12301585 op.add_option("-s", "--memory-threshold", dest="memory_threshold",
12311586 default=0, type="int",
12321587 help="change static memory allocations above threshold to dynamic ones")
1233 init_opts = ["ctor", "no-init", "no-init-instance", "plugin", "plugin-instance", "plugin-standalone"]
1588 init_opts = ["ctor", "no-init", "no-init-instance", "plugin", "plugin-instance", "plugin-standalone", "plugin-lv2"]
12341589 op.add_option("-i", "--init-type", dest="init_type", action="store", default="ctor",
12351590 help="type of init code generation: %s" % ", ".join(init_opts))
12361591 template_opts = ["embed", "staticlib", "sharedlib"]
12621617 try:
12631618 parser = Parser(faust.stdout,
12641619 os.path.splitext(os.path.basename(fname))[0],
1265 options.memory_threshold)
1620 options.memory_threshold, options.init_type)
12661621 except ValueError, e:
12671622 if faust.wait() == 0:
12681623 print e
9696 # Parameters for circuit / approximation
9797 table_size = 2001
9898 Uin_range = (-5.0, 5.0)
99 Vp = 250
100 Rp = 100e3
99 # This could be user choice
100 # Vp = 250
101 Vp = 300 # Better for output section
102 # For power valves this Rp is too high???
103 # Rp = 100e3
104 # Rp = 7e3 # Transformer for Pentode around this
105 Rp = 3.5e3 # Transformer for triode wired
106 # These values are also not right for po
101107 Ri_values = (68e3, 250e3)
102108
103109 # class data
00 import("../src/faust/guitarix.lib");
11
22 tubestage_test(tb,fck,Rk,vplus,Vk0) = tube : hpf with {
3 lpfk = lowpass1(fck);
3 lpfk = lowpass(1,fck);
44 divider = 40;
55 Rp = 100.0e3;
66 VkC = Vk0 * (Rp/Rk);
5353
5454 if __name__ == "__main__":
5555 dsp = faustmod.dsp()
56 #display_param(dsp)
56 display_param(dsp)
5757 show_Vk0(dsp)
58 #dsp.init(44100)
59 #plot_dsp(dsp)
58 dsp.init(44100)
59 plot_dsp(dsp)
2323 use_2to3 = True
2424
2525 # used by waf dist and waf build
26 VERSION='0.25.2'
26 VERSION='0.27.1'
2727 APPNAME='guitarix'
2828
2929 good_faust_versions = ['0.9.43','0.9.46']
9090 const=True,
9191 help='automatically select additional C++ compiler optimization flags for the current platform')
9292
93 comp.add_option('--no-desktop-update',
94 action='store_const',
95 default=False, #'-fomit-frame-pointer -ffast-math -fstrength-reduce -pipe',
96 const=True,
97 help='dont automatically update desktop database')
98
99
93100 opt.recurse('libgxw/gxw')
94101 opt.recurse('libgxwmm/gxwmm')
95102
107114 const=True,
108115 help='build with included local zita-convolver libary (Default NO)')
109116
110
111 comp.add_option('--no-ladspa',
112 action='store_const',
113 default=False,
114 const=True,
115 help="don't build ladspa plugins (Default yes)")
116
117 comp.add_option('--no-new-ladspa',
118 action='store_const',
119 default=False,
120 const=True,
121 help=("don't build with new ladspa plugins"))
117 comp.add_option('--libdir',
118 type='string',
119 default='',
120 dest='libdir',
121 help=('library install path '),
122 )
122123
123124 faust = opt.add_option_group("Faust-Compiler")
124125
149150
150151 ladspa = opt.add_option_group("LADSPA Options (installing ladspa modules)")
151152
153 ladspa.add_option('--no-ladspa',
154 action='store_const',
155 default=False,
156 const=True,
157 help="don't build ladspa plugins (Default yes)")
158
159 ladspa.add_option('--no-new-ladspa',
160 action='store_const',
161 default=False,
162 const=True,
163 help=("don't build with new ladspa plugins (Default yes)"))
164
165
152166 ladspa.add_option('--ladspadir',
153167 type='string',
154168 help='LADSPA plugin directory [Default: <prefix>/lib/ladspa]')
163177 action='store_const',
164178 default=False,
165179 const=True,
166 help=("build with new lv2 plugins"))
180 help=("build with new lv2 plugins (Default no)"))
181
182 lv2.add_option('--lv2-only',
183 action='store_const',
184 default=False,
185 const=True,
186 help=("build only the lv2 plugins (Default no)"))
187
188 lv2.add_option('--dissable-sse',
189 action='store_const',
190 default=False,
191 const=True,
192 help=("dissable SSE for lv2 plugins (ARM)"))
167193
168194
169195 opt.recurse('pygxw')
472498
473499 def configure(conf):
474500 opt = Options.options
501 if opt.dissable_sse and opt.optimization:
502 display_msg("configuration error", " cant use --dissable-sse and --optimization together", 'RED')
503 sys.exit(1)
504
475505 if 'LINGUAS' in os.environ: conf.env['LINGUAS'] = os.environ['LINGUAS']
476506
477507 platform = Utils.detect_platform()
507537 else:
508538 nls = 'no '
509539 conf.define ('DISABLE_NLS', 1)
540 #sub_file('guitarix.desktop.in', 'build/default/guitarix.desktop', (('^_', '%s' % ""), ))
541 sub_file('guitarix.desktop.in', 'guitarix.desktop._in', (('^_', '%s' % ""), ))
510542 conf.define ('GETTEXT_PACKAGE', APPNAME)
511543
512544 conf.define ('ENABLE_NLS', [0,1][nls == 'yes'])
520552 # linker flags
521553 conf.env.append_value('LDFLAGS', opt.ldflags)
522554 conf.env['LINKFLAGS'] = conf.env['LDFLAGS']
523
555 if opt.lv2_only:
556 opt.build_lv2 = True
557 opt.no_ladspa = True
558 opt.no_new_ladspa = True
559 conf.env['NO_MAIN'] = True
560 opt.no_desktop_update = True
524561 # needed libaries
525562 try:
526563 conf.check_cfg(package='jack', atleast_version='0.116.2', max_version='1.8.0', args='--cflags --libs', uselib_store='JACK', mandatory=1)
541578 conf.check_cfg(package='lrdf', args='--cflags --libs', uselib_store='LRDF', mandatory=1)
542579 if opt.build_lv2:
543580 conf.check_cfg(package='lv2', atleast_version='1.2.0',args='--cflags --libs', uselib_store='LV2CORE', mandatory=1)
544 if not opt.no_ladspa:
545 conf.check(header_name='ladspa.h', mandatory=1)
581 conf.check(header_name='ladspa.h', mandatory=1)
546582
547583 check_boost(conf)
548584 check_zita_convolver(opt, conf)
571607 # writing config.h
572608 conf.write_config_header('config.h')
573609
574 conf.define('LIBDIR', os.path.normpath(os.path.join(conf.env['PREFIX'], 'lib')))
610 if not opt.libdir:
611 conf.define('LIBDIR', os.path.normpath(os.path.join(conf.env['PREFIX'], 'lib')))
612 else:
613 conf.define('LIBDIR', opt.libdir)
614
575615 conf.define('BINDIR', os.path.normpath(os.path.join(conf.env['PREFIX'], 'bin')))
576616 conf.define('DESKAPPS_DIR', os.path.normpath(os.path.join(conf.env['SHAREDIR'], 'applications')))
577617 conf.define('BIN_NAME', APPNAME)
578618
579619 conf.env['LV2'] = opt.build_lv2
620 conf.env['NOSSE'] = opt.dissable_sse
580621 if opt.build_lv2:
581622 if opt.lv2dir:
582623 conf.define('LV2DIR', opt.lv2dir)
604645 cpu_model = append_optimization_flags(cxxflags)
605646 conf.env['CXXFLAGS'] += cxxflags
606647
648 if opt.no_desktop_update:
649 conf.env["NO_UPDATE_DESKTOP_DATA_BASE"] = True
650
607651 # pygobject is used by both python and c++ wrapper
608652 if opt.python_wrapper or opt.generate_cpp_wrapper:
609653 conf.check_tool('python')
610654 conf.check_cfg(package='pygobject-2.0', args='--cflags --libs', uselib_store='PYGOBJECT', mandatory=True)
611655 conf.cfg_get_variable(package='pygobject-2.0', variable='codegendir')
612656
613 conf.sub_config('src/gx_head');
657 if not conf.env['NO_MAIN']:
658 conf.sub_config('src/gx_head');
614659 if conf.env['FAUST']:
615660 conf.sub_config('src/faust');
616661 conf.sub_config('src/plugins');
643688
644689 print_msg("")
645690 display_msg("OS ", conf.env['OS'], 'CYAN')
646
691 if conf.env['NO_MAIN']:
692 display_msg("Guitarix main build ", "dissabled", 'RED')
647693 if cpu_model:
648694 display_msg("CPU version" , "%s" % cpu_model, "CYAN")
649695 display_msg("C++ flags", " ".join(conf.env['CXXFLAGS']), 'CYAN')
662708 display_feature("build lv2 plugins", conf.env['LV2'])
663709 if opt.build_lv2:
664710 display_feature("SSE2 support found", conf.env['SSE2'])
711 display_feature("SSE2 support dissabled", conf.env['NOSSE'])
665712 display_feature("skip Python Library Wrapper", not conf.env['GX_PYTHON_WRAPPER'])
666713 display_feature("use prebuild C++ Library Wrapper", conf.env['USE_GENERATED_CPP'])
667714 display_feature("skip building shared lib", not conf.env['GX_LIB_SHARED'])
668715 display_feature("skip install lib-dev", not conf.env['GX_LIB_DEV'])
716 display_feature("run ldconfig tool", not conf.env['NO_LDCONFIG'])
717 display_feature("update desktop database", not conf.env['NO_UPDATE_DESKTOP_DATA_BASE'])
669718 display_feature("Localization (intltool)", conf.env['ENABLE_NLS'])
670719 display_feature("skip glade support", not conf.env['GX_GLADE_SUPPORT'])
671720 if conf.env['GX_GLADE_SUPPORT']:
672721 display_msg("glade catalog dir", conf.env['GLADE_CATALOG_DIR'], 'CYAN')
673722 display_msg("glade modules dir", conf.env['GLADE_MODULES_DIR'], 'CYAN')
674723 display_msg("Install prefix", conf.env['PREFIX'], 'CYAN')
675 display_msg("Install binary", conf.env['BINDIR'], 'CYAN')
676
724 if not conf.env['NO_MAIN']:
725 display_msg("Install binary", conf.env['BINDIR'], 'CYAN')
726 display_msg("Install library", conf.env['LIBDIR'], 'CYAN')
727
677728 if not opt.no_ladspa:
678729 display_msg("Install ladspa", conf.env['LADSPADIR'], 'CYAN')
679730 if opt.build_lv2:
680731 display_msg("Install lv2", conf.env['LV2DIR'], 'CYAN')
681 display_msg("Guitarix shared files directory", gxsharedir, 'CYAN')
682 display_msg("Guitarix pixmaps directory", conf.env['GX_PIXMAPS_DIR'], 'CYAN')
732 if not conf.env['NO_MAIN']:
733 display_msg("Guitarix shared files directory", gxsharedir, 'CYAN')
734 display_msg("Guitarix pixmaps directory", conf.env['GX_PIXMAPS_DIR'], 'CYAN')
683735 if conf.env['g++']:
684736 error_msg("ERROR !!! Compiler version is too old !!!")
685737
708760 bld.add_subdirs('libgxwmm')
709761 bld.add_subdirs('glade-gxw')
710762 bld.add_subdirs('pygxw')
711 bld.add_subdirs('src/faust')
712 bld.add_subdirs('src/plugins')
713 bld.add_subdirs('rcstyles')
714 bld.add_subdirs('pixmaps')
715 bld.add_subdirs('src/gx_head')
763 if not bld.env['NO_MAIN']:
764 bld.add_subdirs('src/faust')
765 bld.add_subdirs('src/plugins')
766 bld.add_subdirs('rcstyles')
767 bld.add_subdirs('pixmaps')
768 bld.add_subdirs('src/gx_head')
716769 if bld.env["NEW_LADSPA"]:
717770 bld.add_subdirs('src/ladspa')
718771 if bld.env["LV2"]:
719772 bld.add_subdirs('src/LV2')
720773
721 bld.install_files(bld.env['DESKAPPS_DIR'], 'guitarix.desktop', chmod=0o644)
722 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/dirlist.js', chmod=0o664)
723 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/funkmuscle.gx', chmod=0o664)
724 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/dlp_ae.gx', chmod=0o664)
725 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/zettberlin.gx', chmod=0o664)
726 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/autoandimat.gx', chmod=0o664)
727 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/jp_n_o_s.gx', chmod=0o664)
728 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/kokoko3k.gx', chmod=0o664)
729 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/univibe', chmod=0o664)
730 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/univibe_mono', chmod=0o664)
731 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/flanger_mono_gx', chmod=0o664)
732 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/jconv', chmod=0o664)
733 # "greathall.wav" is referenced in the source (keep in sync when changing)
734 bld.install_files(bld.env['GX_SOUND_DIR'], './IR/greathall.wav', chmod=0o664)
735
736 gen_desktop = bld(features = "intltool_in",
737 podir = "po",
738 flags = ["-d", "-q", "-u", "-c"],
739 source = 'guitarix.desktop.in',
740 target = 'guitarix.desktop',
741 install_path = "${DATADIR}/applications",
742 )
743 # hacked in scanner method so the desktop file gets rebuild
744 # when any po file changes; don't know if there is a better way
745 gen_desktop_create_task = gen_desktop.create_task
746 def gen_desktop_add_scanner(*args,**kw):
747 task = gen_desktop_create_task(*args,**kw)
748 def po_scanner():
749 gen = task.generator
750 podir = gen.bld.srcnode.find_dir(gen.podir)
751 return (podir.ant_glob("*.po", flat=False), [])
752 task.scan = po_scanner
753 return task
754 gen_desktop.create_task = gen_desktop_add_scanner
755 if Options.commands["install"]: ## newer waf version: bld.cmd == 'install'
756 try:
757 bld.exec_command(["update-desktop-database", Utils.subst_vars("${DATADIR}/applications", bld.env)])
758 except:
759 pass
774 if not bld.env['NO_MAIN']:
775 bld.install_files(bld.env['DESKAPPS_DIR'], 'guitarix.desktop', chmod=0o644)
776 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/dirlist.js', chmod=0o664)
777 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/funkmuscle.gx', chmod=0o664)
778 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/dlp_ae.gx', chmod=0o664)
779 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/zettberlin.gx', chmod=0o664)
780 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/autoandimat.gx', chmod=0o664)
781 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/jp_n_o_s.gx', chmod=0o664)
782 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/kokoko3k.gx', chmod=0o664)
783 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/univibe', chmod=0o664)
784 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/univibe_mono', chmod=0o664)
785 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/flanger_mono_gx', chmod=0o664)
786 bld.install_files(bld.env['GX_FACTORY_DIR'], 'factorysettings/jconv', chmod=0o664)
787 # "greathall.wav" is referenced in the source (keep in sync when changing)
788 bld.install_files(bld.env['GX_SOUND_DIR'], './IR/greathall.wav', chmod=0o664)
789
790 if not bld.env['DISABLE_NLS']:
791 gen_desktop = bld(features = "intltool_in",
792 podir = "po",
793 flags = ["-d", "-q", "-u", "-c"],
794 source = 'guitarix.desktop.in',
795 target = 'guitarix.desktop',
796 install_path = "${DATADIR}/applications",
797 )
798
799 # hacked in scanner method so the desktop file gets rebuild
800 # when any po file changes; don't know if there is a better way
801 gen_desktop_create_task = gen_desktop.create_task
802 def gen_desktop_add_scanner(*args,**kw):
803 task = gen_desktop_create_task(*args,**kw)
804 def po_scanner():
805 gen = task.generator
806 podir = gen.bld.srcnode.find_dir(gen.podir)
807 return (podir.ant_glob("*.po", flat=False), [])
808 task.scan = po_scanner
809 return task
810 gen_desktop.create_task = gen_desktop_add_scanner
811 else:
812 gen_desktop = bld(features = "subst",
813 source = 'guitarix.desktop._in',
814 target = 'guitarix.desktop',
815 install_path = "${DATADIR}/applications",
816 VAR = ""
817 )
818 gen_desktop.create_task
819 if Options.commands["install"]: ## newer waf version: bld.cmd == 'install'
820 if not bld.env["NO_UPDATE_DESKTOP_DATA_BASE"]:
821 try:
822 bld.exec_command(["update-desktop-database", Utils.subst_vars("${DATADIR}/applications", bld.env)])
823 except:
824 pass
760825
761826 if bld.env["GX_LIB_SHARED"]:
762 bld.add_post_fun(post)
827 if not bld.env["NO_LDCONFIG"]:
828 bld.add_post_fun(post)
763829 if bld.env["GX_LIB_DEV"]:
764830 bld.install_files('${PREFIX}/include/gxw','libgxw/gxw/*.h')
765831 bld.install_files('${PREFIX}/include','libgxw/gxw.h')
848914 t.close()
849915 build_path = path
850916 instdir = tempfile.mkdtemp('.inst', path)
851 cmdargs = [waf,'configure','build','install','uninstall','--destdir='+instdir]
917 cmdargs = [waf,'configure','build','install','uninstall', '--build-lv2', '--destdir='+instdir]
852918 print('starting "%s"' % (" ".join(cmdargs)))
853919 print("")
854920 ret = Utils.pproc.Popen(cmdargs, cwd=build_path).wait()