PluginLayout.cpp 202 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567
  1. #include "core/PluginLayout.h"
  2. #include <algorithm>
  3. #include <array>
  4. #include <cmath>
  5. #include <cstdio>
  6. #include <cstring>
  7. #include <map>
  8. #include <mutex>
  9. #include <string>
  10. #include "core/EchoSuite.h"
  11. #include "core/Effects.h"
  12. #include "core/MaximusFx.h"
  13. #include "core/MultibandDelayFx.h"
  14. #include "core/StateParams.h"
  15. // (the i18n test scans the sources for TR_NOOP: captions below are translated by the editor)
  16. #ifndef TR_NOOP
  17. #define TR_NOOP(text) text
  18. #endif
  19. namespace lynx::plugui
  20. {
  21. namespace
  22. {
  23. // --- builders (positions in FL's window pixels, body origin) -----------------------------------------
  24. LayoutItem section (float x, float y, float w, float h, const char* title, std::uint16_t style = 0)
  25. {
  26. LayoutItem i;
  27. i.type = Item::section;
  28. i.x = x, i.y = y, i.w = w, i.h = h;
  29. i.label = title;
  30. i.style = style;
  31. return i;
  32. }
  33. // a knob centred at (cx, cy), `d` wide, its caption centred at `captionY`
  34. LayoutItem knob (float cx, float cy, float d, const char* param, const char* caption, float captionY, std::uint16_t style = 0, int steps = 0)
  35. {
  36. LayoutItem i;
  37. i.type = Item::knob;
  38. i.x = cx - d * 0.5f;
  39. i.y = cy - d * 0.5f - ((style & valueAbove) != 0 ? 16.0f : 0.0f);
  40. i.w = d;
  41. i.h = (captionY + 6.0f) - i.y;
  42. if ((style & noCaption) != 0)
  43. i.h = d + ((style & valueAbove) != 0 ? 16.0f : 0.0f);
  44. i.param = param;
  45. i.label = caption;
  46. i.style = style;
  47. i.steps = steps;
  48. return i;
  49. }
  50. LayoutItem label (float x, float y, float w, float h, const char* text, std::uint16_t style = 0)
  51. {
  52. LayoutItem i;
  53. i.type = Item::label;
  54. i.x = x, i.y = y, i.w = w, i.h = h;
  55. i.label = text;
  56. i.style = style;
  57. return i;
  58. }
  59. LayoutItem value (float x, float y, float w, float h, const char* param, std::uint16_t style = alignLeft)
  60. {
  61. LayoutItem i;
  62. i.type = Item::value;
  63. i.x = x, i.y = y, i.w = w, i.h = h;
  64. i.param = param;
  65. i.style = style;
  66. return i;
  67. }
  68. LayoutItem slider (Item type, float x, float y, float w, float h, const char* param, const char* caption = nullptr, std::uint16_t style = 0)
  69. {
  70. LayoutItem i;
  71. i.type = type;
  72. i.x = x, i.y = y, i.w = w, i.h = h;
  73. i.param = param;
  74. i.label = caption;
  75. i.style = style;
  76. return i;
  77. }
  78. LayoutItem radio (float x, float y, float w, float h, const char* param, const char* options, std::vector<float> values = {})
  79. {
  80. LayoutItem i;
  81. i.type = Item::radio;
  82. i.x = x, i.y = y, i.w = w, i.h = h;
  83. i.param = param;
  84. i.options = options;
  85. i.values = std::move (values);
  86. return i;
  87. }
  88. LayoutItem tabs (float x, float y, float w, float h, const char* param, const char* options, std::vector<float> values = {}, std::uint16_t style = 0)
  89. {
  90. LayoutItem i;
  91. i.type = Item::tabs;
  92. i.x = x, i.y = y, i.w = w, i.h = h;
  93. i.param = param;
  94. i.options = options;
  95. i.values = std::move (values);
  96. i.style = style;
  97. return i;
  98. }
  99. LayoutItem pageTabs (float x, float y, float w, float h, const char* options)
  100. {
  101. auto i = tabs (x, y, w, h, nullptr, options, {}, plugui::pageTabs);
  102. return i;
  103. }
  104. LayoutItem toggle (float x, float y, float w, float h, const char* param, const char* caption, std::uint16_t style = 0)
  105. {
  106. LayoutItem i;
  107. i.style = style;
  108. i.type = Item::toggle;
  109. i.x = x, i.y = y, i.w = w, i.h = h;
  110. i.param = param;
  111. i.label = caption;
  112. return i;
  113. }
  114. LayoutItem stepper (float x, float y, float w, float h, const char* param, const char* caption, int steps)
  115. {
  116. LayoutItem i;
  117. i.type = Item::stepper;
  118. i.x = x, i.y = y, i.w = w, i.h = h;
  119. i.param = param;
  120. i.label = caption;
  121. i.steps = steps;
  122. return i;
  123. }
  124. LayoutItem display (float x, float y, float w, float h, const char* id, const char* param = nullptr, const char* param2 = nullptr)
  125. {
  126. LayoutItem i;
  127. i.type = Item::display;
  128. i.x = x, i.y = y, i.w = w, i.h = h;
  129. i.display = id;
  130. i.param = param;
  131. i.param2 = param2;
  132. return i;
  133. }
  134. LayoutItem onPage (LayoutItem i, int page)
  135. {
  136. i.page = page;
  137. return i;
  138. }
  139. // shown only while `param` is within [lo, hi] (two conditions at most)
  140. LayoutItem when (LayoutItem i, const char* param, float lo, float hi)
  141. {
  142. if (i.whenParam == nullptr)
  143. {
  144. i.whenParam = param;
  145. i.whenMin = lo;
  146. i.whenMax = hi;
  147. }
  148. else
  149. {
  150. i.when2Param = param;
  151. i.when2Min = lo;
  152. i.when2Max = hi;
  153. }
  154. return i;
  155. }
  156. // --- FL's generic "Fruity" editor: cells of 160 × 45 in three columns, 50 px apart ---------------------
  157. // (knob at the left, the caption on a plate, the value or a slider under it)
  158. enum class Cell { value, slider, radio };
  159. void fruityCell (std::vector<LayoutItem>& items, int column, int row, const char* param, const char* caption, Cell kind = Cell::value,
  160. int steps = 0, const char* options = nullptr)
  161. {
  162. const auto x = 6.0f + 165.0f * (float) column, y = 5.0f + 50.0f * (float) row;
  163. items.push_back (section (x, y, 160.0f, 45.0f, nullptr, boxed));
  164. if (kind == Cell::radio) // half cell: plate + Off / On
  165. return;
  166. items.push_back (knob (x + 25.0f, y + 22.5f, 38.0f, param, caption, 0.0f, noCaption, steps));
  167. items.push_back (label (x + 54.0f, y + 3.0f, 102.0f, 15.0f, caption, boxed));
  168. if (kind == Cell::slider)
  169. items.push_back (slider (Item::hslider, x + 54.0f, y + 25.0f, 102.0f, 16.0f, param, nullptr, noCaption));
  170. else
  171. items.push_back (value (x + 57.0f, y + 23.0f, 99.0f, 18.0f, param));
  172. (void) options;
  173. }
  174. // a half-width cell with a plate and an Off / On switch (Fruity Filter's X2 / CENTER)
  175. void fruityHalfCell (std::vector<LayoutItem>& items, int column, int row, int half, const char* param, const char* caption)
  176. {
  177. const auto x = 6.0f + 165.0f * (float) column + 82.5f * (float) half, y = 5.0f + 50.0f * (float) row;
  178. items.push_back (section (x, y, 77.5f, 45.0f, nullptr, boxed));
  179. items.push_back (label (x + 18.0f, y + 3.0f, 56.0f, 15.0f, caption, boxed));
  180. items.push_back (radio (x + 4.0f, y + 19.0f, 44.0f, 24.0f, param, TR_NOOP ("Off|On")));
  181. }
  182. Layout fruityGrid (const char* fl, int rows, int columns = 3)
  183. {
  184. Layout l;
  185. l.fl = fl;
  186. l.width = 6 + 165 * columns;
  187. l.height = 50 * rows + 5;
  188. return l;
  189. }
  190. // --- the layouts ------------------------------------------------------------------------------------
  191. Layout fruityLimiter()
  192. {
  193. // REA/FL capture: display on top (with its view strip at the left), LOUDNESS / ENVELOPE / NOISE GATE headers,
  194. // the LIMIT | COMP page switch at the bottom of the middle panel
  195. Layout l;
  196. l.fl = "Fruity Limiter";
  197. l.width = 633;
  198. l.height = 306;
  199. l.pages = { TR_NOOP ("Limit"), TR_NOOP ("Comp") };
  200. auto& v = l.items;
  201. v.push_back (display (7, 2, 623, 158, "limiter"));
  202. v.push_back (section (2, 161, 629, 143, nullptr, boxed));
  203. v.push_back (section (32, 161, 255, 16, TR_NOOP ("Loudness")));
  204. v.push_back (section (288, 161, 176, 16, TR_NOOP ("Envelope")));
  205. v.push_back (section (465, 161, 166, 16, TR_NOOP ("Noise gate")));
  206. v.push_back (section (117, 180, 345, 120, nullptr, boxed | raised));
  207. v.push_back (knob (34, 205, 44, "Gain", TR_NOOP ("Gain"), 240));
  208. v.push_back (knob (88, 205, 44, "Saturation", TR_NOOP ("Sat"), 240));
  209. v.push_back (pageTabs (119, 277, 82, 20, TR_NOOP ("Limit|Comp")));
  210. v.push_back (knob (492, 205, 44, "Gate release", TR_NOOP ("Rel"), 240));
  211. v.push_back (knob (546, 205, 44, "Gate gain", TR_NOOP ("Gain"), 240));
  212. v.push_back (knob (600, 205, 44, "Gate threshold", TR_NOOP ("Thres"), 240));
  213. // LIMIT page
  214. v.push_back (onPage (knob (148, 205, 44, "Ceiling", TR_NOOP ("Ceil"), 240), 0));
  215. v.push_back (onPage (knob (316, 205, 44, "Attack", TR_NOOP ("Att"), 240), 0));
  216. v.push_back (onPage (knob (372, 205, 44, "Release", TR_NOOP ("Rel"), 240), 0));
  217. v.push_back (onPage (knob (432, 205, 44, "Sustain", TR_NOOP ("Sustain"), 240), 0));
  218. v.push_back (onPage (stepper (302, 259, 28, 30, "Attack curve", TR_NOOP ("Curve"), 7), 0));
  219. v.push_back (onPage (stepper (358, 259, 28, 30, "Release curve", TR_NOOP ("Curve"), 7), 0));
  220. l.menuSwitches = { "Exact ceiling" };
  221. // COMP page
  222. v.push_back (onPage (knob (148, 205, 44, "Comp. threshold", TR_NOOP ("Thres"), 240), 1));
  223. v.push_back (onPage (knob (202, 205, 44, "Knee", TR_NOOP ("Knee"), 240, bipolar), 1));
  224. v.push_back (onPage (knob (256, 205, 44, "Ratio", TR_NOOP ("Ratio"), 240, bipolar), 1));
  225. v.push_back (onPage (knob (316, 205, 44, "Comp. attack", TR_NOOP ("Att"), 240), 1));
  226. v.push_back (onPage (knob (372, 205, 44, "Comp. release", TR_NOOP ("Rel"), 240), 1));
  227. // FL captions the compressor's detector window SUSTAIN too (the limiter's is its peak window)
  228. v.push_back (onPage (knob (432, 205, 44, "RMS window", TR_NOOP ("Sustain"), 240), 1));
  229. v.push_back (onPage (stepper (302, 259, 28, 30, "Comp. curve", TR_NOOP ("Curve"), 7), 1));
  230. return l;
  231. }
  232. Layout fruityCompressor()
  233. {
  234. auto l = fruityGrid ("Fruity Compressor", 2);
  235. auto& v = l.items;
  236. fruityCell (v, 0, 0, "Threshold", TR_NOOP ("Threshold"));
  237. fruityCell (v, 1, 0, "Ratio", TR_NOOP ("Ratio"));
  238. fruityCell (v, 2, 0, "Gain", TR_NOOP ("Gain"));
  239. fruityCell (v, 0, 1, "Attack", TR_NOOP ("Attack"));
  240. fruityCell (v, 1, 1, "Release", TR_NOOP ("Release"));
  241. fruityCell (v, 2, 1, "Type", TR_NOOP ("Type"), Cell::value, 7);
  242. l.menuSwitches = { "Look-ahead" };
  243. return l;
  244. }
  245. Layout fruityFilter()
  246. {
  247. auto l = fruityGrid ("Fruity Filter", 2);
  248. auto& v = l.items;
  249. fruityCell (v, 0, 0, "Cutoff", TR_NOOP ("Cutoff freq"), Cell::slider);
  250. fruityCell (v, 1, 0, "Resonance", TR_NOOP ("Resonance"), Cell::slider);
  251. fruityCell (v, 2, 0, "Low pass", TR_NOOP ("Low pass"), Cell::slider);
  252. fruityCell (v, 0, 1, "Band pass", TR_NOOP ("Band pass"), Cell::slider);
  253. fruityCell (v, 1, 1, "High pass", TR_NOOP ("High pass"), Cell::slider);
  254. fruityHalfCell (v, 2, 1, 0, "x2", TR_NOOP ("X 2"));
  255. fruityHalfCell (v, 2, 1, 1, "Center", TR_NOOP ("Center"));
  256. return l;
  257. }
  258. Layout fruityChorus()
  259. {
  260. auto l = fruityGrid ("Fruity Chorus", 4);
  261. auto& v = l.items;
  262. fruityCell (v, 0, 0, "Delay", TR_NOOP ("Delay"));
  263. fruityCell (v, 1, 0, "Depth", TR_NOOP ("Depth"));
  264. fruityCell (v, 2, 0, "Stereo", TR_NOOP ("Stereo"));
  265. fruityCell (v, 0, 1, "LFO 1 freq", TR_NOOP ("LFO 1 freq"));
  266. fruityCell (v, 1, 1, "LFO 2 freq", TR_NOOP ("LFO 2 freq"));
  267. fruityCell (v, 2, 1, "LFO 3 freq", TR_NOOP ("LFO 3 freq"));
  268. fruityCell (v, 0, 2, "LFO 1 wave", TR_NOOP ("LFO 1 wave"));
  269. fruityCell (v, 1, 2, "LFO 2 wave", TR_NOOP ("LFO 2 wave"));
  270. fruityCell (v, 2, 2, "LFO 3 wave", TR_NOOP ("LFO 3 wave"));
  271. fruityCell (v, 0, 3, "Cross type", TR_NOOP ("Cross type"));
  272. fruityCell (v, 1, 3, "Cross cutoff", TR_NOOP ("Cross cutoff"));
  273. fruityCell (v, 2, 3, "Wet only", TR_NOOP ("Wet only"));
  274. return l;
  275. }
  276. Layout fruityFlanger()
  277. {
  278. auto l = fruityGrid ("Fruity Flanger", 4);
  279. auto& v = l.items;
  280. fruityCell (v, 0, 0, "Delay", TR_NOOP ("Delay"));
  281. fruityCell (v, 1, 0, "Depth", TR_NOOP ("Depth"));
  282. fruityCell (v, 2, 0, "Rate", TR_NOOP ("Rate"));
  283. fruityCell (v, 0, 1, "Phase", TR_NOOP ("Phase"));
  284. fruityCell (v, 1, 1, "Damp", TR_NOOP ("Damp"));
  285. fruityCell (v, 2, 1, "Shape", TR_NOOP ("Shape"));
  286. fruityCell (v, 0, 2, "Feed", TR_NOOP ("Feed"));
  287. fruityCell (v, 1, 2, "Invert feed", TR_NOOP ("Inv feedback"), Cell::value, 1);
  288. fruityCell (v, 2, 2, "Invert wet", TR_NOOP ("Inv wet"), Cell::value, 1);
  289. fruityCell (v, 0, 3, "Dry", TR_NOOP ("Dry"));
  290. fruityCell (v, 1, 3, "Wet", TR_NOOP ("Wet"));
  291. fruityCell (v, 2, 3, "Cross", TR_NOOP ("Cross"));
  292. return l;
  293. }
  294. Layout fruityPhaser()
  295. {
  296. // FL's generic panel, three rows of three (round 105: FL 2026 capture of the Default preset)
  297. auto l = fruityGrid ("Fruity Phaser", 3);
  298. auto& v = l.items;
  299. fruityCell (v, 0, 0, "Sweep freq.", TR_NOOP ("Sweep freq."));
  300. fruityCell (v, 1, 0, "Min depth", TR_NOOP ("Min depth"));
  301. fruityCell (v, 2, 0, "Max depth", TR_NOOP ("Max depth"));
  302. fruityCell (v, 0, 1, "Freq. range", TR_NOOP ("Freq. range"), Cell::value, 1);
  303. fruityCell (v, 1, 1, "Stereo", TR_NOOP ("Stereo"));
  304. fruityCell (v, 2, 1, "Stages", TR_NOOP ("Nr. stages"), Cell::value, 22);
  305. fruityCell (v, 0, 2, "Feedback", TR_NOOP ("Feedback"));
  306. fruityCell (v, 1, 2, "Dry-wet", TR_NOOP ("Dry-wet"));
  307. fruityCell (v, 2, 2, "Out gain", TR_NOOP ("Out gain"));
  308. return l;
  309. }
  310. Layout fruityFastDist()
  311. {
  312. // four knobs and the A/B switch on the left panel, the transfer curve on the right
  313. Layout l;
  314. l.fl = "Fruity Fast Dist";
  315. l.width = 386;
  316. l.height = 122;
  317. auto& v = l.items;
  318. v.push_back (section (0, 0, 262, 96, nullptr, boxed));
  319. v.push_back (knob (34, 42, 40, "Pre amp", TR_NOOP ("Pre"), 75));
  320. v.push_back (knob (88, 42, 40, "Threshold", TR_NOOP ("Thresh"), 75));
  321. v.push_back (radio (122, 30, 30, 26, "Type", "A|B"));
  322. v.push_back (knob (179, 42, 40, "Mix", TR_NOOP ("Mix"), 75));
  323. v.push_back (knob (233, 42, 40, "Post gain", TR_NOOP ("Post"), 75));
  324. v.push_back (label (0, 99, 258, 20, TR_NOOP ("Fast dist"), dim));
  325. v.push_back (display (264, 0, 122, 122, "clip", "Threshold"));
  326. return l;
  327. }
  328. Layout stereoEnhancer()
  329. {
  330. // STEREO SEP | phase offset (pre/post, knob, invert) | pan and volume
  331. Layout l;
  332. l.fl = "Fruity Stereo Enhancer";
  333. l.width = 405;
  334. l.height = 116;
  335. auto& v = l.items;
  336. v.push_back (section (0, 0, 82, 116, nullptr, boxed));
  337. v.push_back (label (2, 14, 78, 14, TR_NOOP ("Stereo sep")));
  338. v.push_back (knob (44, 62, 48, "Separation", nullptr, 0, noCaption | bipolar));
  339. v.push_back (label (14, 92, 54, 14, "+ -", dim));
  340. v.push_back (section (83, 0, 190, 116, nullptr, boxed));
  341. v.push_back (radio (93, 20, 50, 32, "Effects post", TR_NOOP ("Pre|Post")));
  342. v.push_back (knob (178, 57, 48, "Phase offset", nullptr, 0, noCaption | bipolar));
  343. v.push_back (label (152, 86, 52, 14, "L R", dim));
  344. v.push_back (radio (223, 20, 50, 48, "Invert", TR_NOOP ("None|Left|Right")));
  345. v.push_back (label (88, 96, 100, 18, TR_NOOP ("Phase offset"), dim | alignLeft));
  346. v.push_back (label (222, 96, 50, 18, TR_NOOP ("Invert"), dim | alignLeft));
  347. v.push_back (section (274, 0, 131, 116, nullptr, boxed));
  348. v.push_back (label (276, 4, 127, 16, TR_NOOP ("Stereo enhancer"), dim));
  349. v.push_back (knob (312, 77, 46, "Pan", TR_NOOP ("Pan"), 0, bipolar | noCaption));
  350. v.push_back (label (290, 38, 44, 14, TR_NOOP ("Pan")));
  351. v.push_back (knob (374, 77, 46, "Volume", nullptr, 0, noCaption));
  352. v.push_back (label (352, 38, 44, 14, TR_NOOP ("Vol")));
  353. return l;
  354. }
  355. Layout fruityDelay3()
  356. {
  357. Layout l;
  358. l.fl = "Fruity Delay 3";
  359. l.width = 752;
  360. l.height = 220;
  361. auto& v = l.items;
  362. v.push_back (section (2, 2, 58, 216, TR_NOOP ("Input")));
  363. v.push_back (slider (Item::vslider, 17, 26, 30, 160, "Send", TR_NOOP ("Wet")));
  364. v.push_back (section (62, 2, 193, 110, TR_NOOP ("Delay time")));
  365. v.push_back (knob (95, 58, 56, "Time", TR_NOOP ("Time"), 104, big));
  366. v.push_back (toggle (142, 37, 80, 14, "Tempo sync", TR_NOOP ("Tempo sync")));
  367. v.push_back (toggle (142, 55, 80, 14, "Keep pitch", TR_NOOP ("Keep pitch")));
  368. v.push_back (slider (Item::hslider, 145, 80, 60, 30, "Time smoothing", TR_NOOP ("Smoothing")));
  369. v.push_back (knob (233, 82, 34, "Time R / pan", TR_NOOP ("Offset"), 104, bipolar));
  370. v.push_back (section (257, 2, 121, 110, TR_NOOP ("Delay model")));
  371. v.push_back (radio (268, 36, 62, 52, "Delay type", TR_NOOP ("Mono|Stereo|Ping pong|Off"), { 0.0f, 1.0f / 3.0f, 2.0f / 3.0f, 1.0f }));
  372. v.push_back (knob (356, 80, 34, "Stereo spread", TR_NOOP ("Stereo"), 104));
  373. v.push_back (section (380, 2, 305, 110, TR_NOOP ("Feedback")));
  374. v.push_back (knob (418, 70, 56, "Feedback", TR_NOOP ("Level"), 104, big));
  375. v.push_back (knob (469, 80, 34, "Cutoff", TR_NOOP ("Cutoff"), 104));
  376. v.push_back (knob (516, 80, 34, "Resonance", TR_NOOP ("Res"), 104));
  377. v.push_back (radio (557, 36, 40, 52, "Filter mode", TR_NOOP ("LP|HP|BP|Off"), { 0.0f, 1.0f / 3.0f, 2.0f / 3.0f, 1.0f }));
  378. v.push_back (knob (620, 80, 34, "Rate reduce", TR_NOOP ("Smp rate"), 104));
  379. v.push_back (knob (666, 80, 34, "Bit reduce", TR_NOOP ("Bits"), 104));
  380. v.push_back (section (688, 2, 62, 216, TR_NOOP ("Output")));
  381. v.push_back (knob (719, 48, 34, "Wet", TR_NOOP ("Wet"), 80));
  382. v.push_back (knob (719, 110, 34, "Colour", TR_NOOP ("Tone"), 142, bipolar));
  383. v.push_back (knob (719, 172, 34, "Dry", TR_NOOP ("Dry"), 204));
  384. v.push_back (section (62, 114, 193, 104, TR_NOOP ("Modulation")));
  385. v.push_back (knob (94, 172, 44, "Mod rate", TR_NOOP ("Rate"), 206, big));
  386. v.push_back (knob (180, 172, 34, "Mod amount", TR_NOOP ("Time"), 206));
  387. v.push_back (knob (231, 172, 34, "Cutoff mod", TR_NOOP ("Cutoff"), 206));
  388. v.push_back (section (257, 114, 121, 104, TR_NOOP ("Diffusion")));
  389. v.push_back (knob (292, 172, 34, "Diffusion", TR_NOOP ("Level"), 206));
  390. v.push_back (knob (343, 172, 34, "Diffusion spread", TR_NOOP ("Spread"), 206));
  391. v.push_back (section (380, 114, 305, 104, TR_NOOP ("Feedback distortion")));
  392. v.push_back (radio (392, 160, 44, 28, "Saturation type", TR_NOOP ("Limit|Sat")));
  393. v.push_back (knob (476, 172, 34, "Distortion", TR_NOOP ("Level"), 206));
  394. v.push_back (knob (524, 172, 34, "Hardness", TR_NOOP ("Knee"), 206));
  395. v.push_back (knob (572, 172, 34, "Symmetry", TR_NOOP ("Symmetry"), 206, bipolar));
  396. v.push_back (display (614, 140, 68, 72, "shaper", "Distortion"));
  397. return l;
  398. }
  399. Layout fruityMultiband()
  400. {
  401. // input meter strip, IIR/FIR, limiter, output gain | band graph with the four crossover knobs | LOW, MID and
  402. // HIGH bands (A/M/B mode, threshold, ratio, knee, attack, release, gain), each followed by its meters
  403. Layout l;
  404. l.fl = "Fruity Multiband Compressor";
  405. l.width = 805;
  406. l.height = 160;
  407. auto& v = l.items;
  408. v.push_back (display (8, 7, 14, 128, "meter"));
  409. v.push_back (radio (34, 7, 40, 26, "Linear phase", "IIR|FIR"));
  410. v.push_back (label (26, 44, 48, 13, TR_NOOP ("Limiter")));
  411. v.push_back (toggle (40, 58, 20, 14, "Limiter", nullptr));
  412. v.push_back (knob (50, 118, 34, "Output gain", TR_NOOP ("Gain"), 144, bipolar));
  413. v.push_back (section (79, 7, 200, 142, nullptr, boxed));
  414. v.push_back (display (83, 11, 192, 78, "multiband"));
  415. v.push_back (label (86, 90, 186, 12, TR_NOOP ("Crossovers"), dim));
  416. v.push_back (knob (103, 121, 34, "Low crossover", nullptr, 0, noCaption));
  417. v.push_back (knob (153, 121, 34, "Mid lower crossover", nullptr, 0, noCaption));
  418. v.push_back (knob (203, 121, 34, "Mid upper crossover", nullptr, 0, noCaption));
  419. v.push_back (knob (254, 121, 34, "High crossover", nullptr, 0, noCaption));
  420. constexpr int bandColours[] = { 0, 2, 5 }; // low / mid / high: the editor's red, yellow and blue band colours
  421. v[8].colour = bandColours[0]; // crossover knobs: the band each one bounds from below
  422. v[9].colour = bandColours[1];
  423. v[10].colour = bandColours[1];
  424. v[11].colour = bandColours[2];
  425. struct Band { const char* title; const char *mode, *threshold, *ratio, *knee, *attack, *release, *gain; };
  426. const Band bands[] = { { TR_NOOP ("Low band"), "Low mode", "Low threshold", "Low ratio", "Low knee", "Low attack", "Low release", "Low gain" },
  427. { TR_NOOP ("Mid band"), "Mid mode", "Mid threshold", "Mid ratio", "Mid knee", "Mid attack", "Mid release", "Mid gain" },
  428. { TR_NOOP ("High band"), "High mode", "High threshold", "High ratio", "High knee", "High attack", "High release", "High gain" } };
  429. for (int b = 0; b < 3; ++b)
  430. {
  431. const auto x = 287.0f + 172.0f * (float) b;
  432. const auto& band = bands[b];
  433. v.push_back (section (x, 7, 130, 16, nullptr, boxed));
  434. v.push_back (tabs (x + 2, 8, 48, 14, band.mode, "A|M|B", { 0.0f, 0.5f, 1.0f }));
  435. v.push_back (label (x + 52, 8, 76, 14, band.title));
  436. const auto first = v.size();
  437. v.push_back (knob (x + 19, 58, 32, band.threshold, TR_NOOP ("Thres"), 84));
  438. v.push_back (knob (x + 65, 58, 32, band.ratio, TR_NOOP ("Ratio"), 84));
  439. v.push_back (knob (x + 111, 58, 32, band.knee, TR_NOOP ("Knee"), 84));
  440. v.push_back (knob (x + 19, 120, 32, band.attack, TR_NOOP ("Att"), 144));
  441. v.push_back (knob (x + 65, 120, 32, band.release, TR_NOOP ("Rel"), 144));
  442. v.push_back (knob (x + 111, 120, 32, band.gain, TR_NOOP ("Gain"), 144, bipolar));
  443. for (auto k = first; k < v.size(); ++k)
  444. v[k].colour = bandColours[b];
  445. v.push_back (display (x + 140, 7, 24, 128, "meter"));
  446. }
  447. return l;
  448. }
  449. Layout reeverb2()
  450. {
  451. Layout l;
  452. l.fl = "Fruity Reeverb 2";
  453. l.width = 538;
  454. l.height = 166;
  455. auto& v = l.items;
  456. v.push_back (display (2, 2, 160, 160, "room", "Room size"));
  457. v.push_back (section (164, 2, 58, 160, nullptr, boxed));
  458. v.push_back (radio (176, 20, 44, 28, "Mid/side input", TR_NOOP ("Mid|Side"), { 0.0f, 1.0f }));
  459. v.push_back (knob (193, 75, 30, "High cut", TR_NOOP ("H.cut"), 100));
  460. v.push_back (knob (193, 126, 30, "Low cut", TR_NOOP ("L.cut"), 151));
  461. v.push_back (section (224, 2, 102, 160, nullptr, boxed));
  462. v.push_back (knob (251, 23, 30, "Predelay", TR_NOOP ("Delay"), 48));
  463. v.push_back (toggle (290, 26, 20, 14, "Tempo predelay", nullptr));
  464. v.push_back (label (281, 42, 36, 12, TR_NOOP ("Tempo")));
  465. v.push_back (knob (251, 74, 30, "Room size", TR_NOOP ("Size"), 100));
  466. v.push_back (knob (297, 74, 30, "Mod depth", TR_NOOP ("Mod"), 100));
  467. v.push_back (knob (251, 125, 30, "Diffusion", TR_NOOP ("Diff"), 151));
  468. v.push_back (knob (297, 125, 30, "Mod speed", TR_NOOP ("Speed"), 151));
  469. v.push_back (section (328, 2, 100, 160, nullptr, boxed));
  470. v.push_back (knob (355, 23, 30, "Bass mult.", TR_NOOP ("Bass"), 48));
  471. v.push_back (knob (398, 23, 30, "Decay", TR_NOOP ("Dec"), 48));
  472. v.push_back (knob (355, 74, 30, "Crossover", TR_NOOP ("Cross"), 100));
  473. v.push_back (knob (398, 74, 30, "High damping", TR_NOOP ("Damp"), 100));
  474. v.push_back (label (334, 118, 90, 36, "Reeverb 2", dim));
  475. v.push_back (section (430, 2, 106, 160, nullptr, boxed));
  476. v.push_back (slider (Item::vslider, 440, 6, 20, 98, "Dry", TR_NOOP ("Dry")));
  477. v.push_back (slider (Item::vslider, 471, 6, 20, 98, "Early ref.", TR_NOOP ("ER")));
  478. v.push_back (slider (Item::vslider, 503, 6, 20, 98, "Wet", TR_NOOP ("Wet")));
  479. v.push_back (knob (481, 124, 30, "Stereo sep.", TR_NOOP ("Sep"), 151, bipolar));
  480. return l;
  481. }
  482. Layout luxeVerb()
  483. {
  484. // INPUT | REVERB | PITCH | OUTPUT on top, ENVELOPE and the analyser below; every knob has its value on a plate above
  485. Layout l;
  486. l.fl = "LuxeVerb";
  487. l.width = 947;
  488. l.height = 456;
  489. auto& v = l.items;
  490. const auto tile = [&v] (float cx, float cy, const char* param, const char* caption, float captionY, std::uint16_t style = 0) {
  491. v.push_back (knob (cx, cy, 34, param, caption, captionY, style | valueAbove));
  492. };
  493. const auto fader = [&v] (float cx, const char* param, const char* caption) {
  494. v.push_back (value (cx - 19, 46, 38, 13, param, 0));
  495. v.push_back (slider (Item::vslider, cx - 12, 62, 24, 145, param, caption));
  496. };
  497. v.push_back (section (8, 14, 116, 200, TR_NOOP ("Input")));
  498. fader (37, "Input wet gain", TR_NOOP ("Wet gain"));
  499. tile (93, 82, "Input high cut", TR_NOOP ("High cut"), 108);
  500. tile (93, 174, "Input low cut", TR_NOOP ("Low cut"), 200);
  501. v.push_back (section (130, 14, 326, 200, TR_NOOP ("Reverb")));
  502. v.push_back (toggle (430, 16, 22, 12, "Reverb", nullptr));
  503. v.push_back (value (140, 46, 70, 13, "Decay", 0));
  504. v.push_back (knob (174, 125, 62, "Decay", TR_NOOP ("Decay"), 200, big));
  505. tile (244, 82, "Brightness", TR_NOOP ("Brightness"), 108);
  506. tile (303, 82, "Size", TR_NOOP ("Size"), 108);
  507. tile (363, 82, "Diffusion", TR_NOOP ("Diffusion"), 108);
  508. tile (422, 82, "Character", TR_NOOP ("Character"), 108);
  509. v.push_back (when (knob (244, 174, 34, "Pre-delay", TR_NOOP ("P. delay"), 200, valueAbove), "Pre-delay sync", 0.0f, 0.5f));
  510. v.push_back (when (knob (244, 174, 34, "Pre-delay (sync)", TR_NOOP ("P. delay"), 200, valueAbove), "Pre-delay sync", 0.5f, 1.0f));
  511. v.push_back (toggle (262, 194, 11, 11, "Pre-delay sync", "T", boxed));
  512. tile (303, 174, "Mod amount", TR_NOOP ("Mod amp"), 200);
  513. tile (363, 174, "Mod frequency", TR_NOOP ("Mod freq"), 200);
  514. v.push_back (radio (397, 130, 56, 54, "Freeze mode", TR_NOOP ("Normal|Freeze|Sustain")));
  515. v.push_back (toggle (407, 194, 44, 12, "High quality", TR_NOOP ("HQ")));
  516. v.push_back (section (462, 14, 238, 200, TR_NOOP ("Pitch")));
  517. v.push_back (tabs (530, 16, 120, 14, "Pitch type", TR_NOOP ("Feedback|Feedforward")));
  518. v.push_back (toggle (672, 16, 22, 12, "Feedback", nullptr));
  519. // feed-forward shifters
  520. {
  521. const auto ff = [] (LayoutItem i) { return when (std::move (i), "Pitch type", 0.5f, 1.0f); };
  522. v.push_back (ff (value (476, 46, 38, 13, "Feed-forward unpitched", 0)));
  523. v.push_back (ff (slider (Item::vslider, 483, 62, 24, 145, "Feed-forward unpitched", TR_NOOP ("Direct amp"))));
  524. v.push_back (ff (knob (552, 82, 34, "Feed-forward pitch 1", TR_NOOP ("Pitch 1"), 108, valueAbove | bipolar)));
  525. v.push_back (ff (knob (607, 82, 34, "Feed-forward amount 1", TR_NOOP ("Amp 1"), 108, valueAbove)));
  526. v.push_back (ff (when (knob (664, 82, 34, "Feed-forward delay 1", TR_NOOP ("Delay 1"), 108, valueAbove), "Feed-forward delay 1 sync", 0.0f, 0.5f)));
  527. v.push_back (ff (knob (552, 174, 34, "Feed-forward pitch 2", TR_NOOP ("Pitch 2"), 200, valueAbove | bipolar)));
  528. v.push_back (ff (knob (607, 174, 34, "Feed-forward amount 2", TR_NOOP ("Amp 2"), 200, valueAbove)));
  529. v.push_back (ff (when (knob (664, 174, 34, "Feed-forward delay 2", TR_NOOP ("Delay 2"), 200, valueAbove), "Feed-forward delay 2 sync", 0.0f, 0.5f)));
  530. // (the synced delays replace the free ones while T is on)
  531. v.push_back (ff (when (knob (664, 82, 34, "Feed-forward delay 1 (sync)", TR_NOOP ("Delay 1"), 108, valueAbove), "Feed-forward delay 1 sync", 0.5f, 1.0f)));
  532. v.push_back (ff (when (knob (664, 174, 34, "Feed-forward delay 2 (sync)", TR_NOOP ("Delay 2"), 200, valueAbove), "Feed-forward delay 2 sync", 0.5f, 1.0f)));
  533. v.push_back (ff (toggle (683, 102, 11, 11, "Feed-forward delay 1 sync", "T", boxed)));
  534. v.push_back (ff (toggle (683, 194, 11, 11, "Feed-forward delay 2 sync", "T", boxed)));
  535. }
  536. // feedback shifter: cuts, pitch shift and gain faders, delay, reverb mix
  537. {
  538. const auto fb = [] (LayoutItem i) { return when (std::move (i), "Pitch type", 0.0f, 0.5f); };
  539. v.push_back (fb (knob (496, 82, 34, "Feedback high cut", TR_NOOP ("High cut"), 108, valueAbove)));
  540. v.push_back (fb (knob (496, 174, 34, "Feedback low cut", TR_NOOP ("Low cut"), 200, valueAbove)));
  541. v.push_back (fb (value (534, 46, 38, 13, "Feedback pitch", 0)));
  542. v.push_back (fb (slider (Item::vslider, 541, 62, 24, 145, "Feedback pitch", TR_NOOP ("Pitch shift"), bipolar)));
  543. v.push_back (fb (value (589, 46, 38, 13, "Feedback gain", 0)));
  544. v.push_back (fb (slider (Item::vslider, 596, 62, 24, 145, "Feedback gain", TR_NOOP ("Gain"))));
  545. v.push_back (fb (when (knob (665, 82, 34, "Feedback delay", TR_NOOP ("Delay"), 108, valueAbove), "Feedback delay sync", 0.0f, 0.5f)));
  546. v.push_back (fb (when (knob (665, 82, 34, "Feedback delay (sync)", TR_NOOP ("Delay"), 108, valueAbove), "Feedback delay sync", 0.5f, 1.0f)));
  547. v.push_back (fb (toggle (683, 102, 11, 11, "Feedback delay sync", "T", boxed)));
  548. v.push_back (fb (knob (665, 174, 34, "Feedback reverb mix", TR_NOOP ("Reverb mix"), 200, valueAbove)));
  549. }
  550. v.push_back (section (706, 14, 234, 200, TR_NOOP ("Output")));
  551. fader (736, "Dry level", TR_NOOP ("Dry"));
  552. fader (791, "Wet level", TR_NOOP ("Wet"));
  553. v.push_back (toggle (802, 194, 11, 11, "Limiter", "L", boxed));
  554. tile (847, 82, "Peak frequency", TR_NOOP ("Peak freq"), 108);
  555. tile (907, 82, "Peak gain", TR_NOOP ("Peak gain"), 108, bipolar);
  556. tile (847, 174, "Peak Q", TR_NOOP ("Peak Q"), 200);
  557. tile (907, 174, "Stereo width", TR_NOOP ("Width"), 200);
  558. v.push_back (section (8, 236, 932, 216, TR_NOOP ("Envelope")));
  559. v.push_back (radio (16, 278, 48, 54, "Envelope mode", TR_NOOP ("Off|Wet|Decay")));
  560. tile (93, 309, "Envelope threshold", TR_NOOP ("Threshold"), 335);
  561. tile (150, 309, "Envelope scale", TR_NOOP ("Scale"), 335, bipolar);
  562. tile (207, 309, "Envelope low cut", TR_NOOP ("Low cut"), 335);
  563. tile (264, 309, "Envelope offset", TR_NOOP ("Offset"), 335, bipolar);
  564. v.push_back (stepper (20, 380, 32, 34, "Envelope sidechain", TR_NOOP ("Sidechain"), 0));
  565. tile (93, 399, "Envelope attack", TR_NOOP ("Attack"), 425);
  566. tile (150, 399, "Envelope decay", TR_NOOP ("Decay"), 425);
  567. tile (207, 399, "Envelope smoothing", TR_NOOP ("Smooth"), 425);
  568. v.push_back (display (298, 262, 636, 184, "envelope", "Decay"));
  569. return l;
  570. }
  571. Layout parametricEq2()
  572. {
  573. // the response curve (octave and band-name rows above, frequencies below, dB scale at its right), the output
  574. // fader, then one column per band: type button, gain fader, FREQ and BW knobs
  575. Layout l;
  576. l.fl = "Fruity Parametric EQ 2";
  577. l.width = 707;
  578. l.height = 356;
  579. auto& v = l.items;
  580. v.push_back (display (8, 4, 524, 292, "eq"));
  581. v.push_back (slider (Item::vslider, 532, 22, 16, 270, "Output", nullptr, noCaption | bipolar));
  582. v.push_back (label (510, 310, 38, 12, TR_NOOP ("Freq"), dim));
  583. v.push_back (label (510, 334, 38, 12, TR_NOOP ("BW"), dim));
  584. static const char* const names[peq::bands][5] = {
  585. { "B1 type", "B1 freq.", "B1 gain", "B1 Q", "B1 slope" }, { "B2 type", "B2 freq.", "B2 gain", "B2 Q", "B2 slope" },
  586. { "B3 type", "B3 freq.", "B3 gain", "B3 Q", "B3 slope" }, { "B4 type", "B4 freq.", "B4 gain", "B4 Q", "B4 slope" },
  587. { "B5 type", "B5 freq.", "B5 gain", "B5 Q", "B5 slope" }, { "B6 type", "B6 freq.", "B6 gain", "B6 Q", "B6 slope" },
  588. { "B7 type", "B7 freq.", "B7 gain", "B7 Q", "B7 slope" } };
  589. std::vector<float> typeValues;
  590. for (int t = 0; t < peq::bandTypes; ++t)
  591. typeValues.push_back (peq::typeValue ((peq::BandType) t));
  592. for (int b = 0; b < peq::bands; ++b)
  593. {
  594. const auto x = 552.0f + 21.0f * (float) b;
  595. LayoutItem type;
  596. type.type = Item::menu;
  597. type.x = x, type.y = 4, type.w = 16, type.h = 24;
  598. type.param = names[b][0];
  599. type.options = TR_NOOP ("Off|Peak|Low shelf|High shelf|Low cut|High cut|Band-pass|Notch");
  600. type.values = typeValues;
  601. type.colour = b;
  602. v.push_back (type);
  603. auto gain = slider (Item::vslider, x, 30, 16, 262, names[b][2], nullptr, noCaption | bipolar);
  604. gain.colour = b;
  605. v.push_back (gain);
  606. auto freq = knob (x + 8, 316, 19, names[b][1], nullptr, 0, noCaption);
  607. freq.colour = b;
  608. v.push_back (freq);
  609. auto width = knob (x + 8, 340, 19, names[b][3], nullptr, 0, noCaption);
  610. width.colour = b;
  611. v.push_back (width);
  612. }
  613. v.push_back (display (8, 300, 492, 52, "eqinfo"));
  614. for (int b = 0; b < peq::bands; ++b)
  615. l.editedElsewhere.push_back (names[b][4]); // the band menu (right-click a handle or the type button)
  616. return l;
  617. }
  618. Layout grossBeat()
  619. {
  620. // left: the time panel (mix knob), HOLD, the time slots, the volume slots, ATT / REL / TNS, the volume panel; right:
  621. // the envelope of the selected slots and the slot's settings under it
  622. Layout l;
  623. l.fl = "Gross Beat";
  624. l.width = 840;
  625. l.height = 563;
  626. auto& v = l.items;
  627. static const std::string slots = [] {
  628. std::string out;
  629. for (int i = 1; i <= 36; ++i)
  630. out += (i > 1 ? "|" : "") + std::string ("Slot ") + std::to_string (i);
  631. return out;
  632. }();
  633. v.push_back (section (0, 0, 268, 563, nullptr, boxed));
  634. v.push_back (section (6, 7, 128, 46, nullptr, boxed | raised));
  635. v.push_back (knob (31, 30, 40, "Time mix", nullptr, 0, noCaption));
  636. v.push_back (label (56, 20, 70, 20, TR_NOOP ("Time"), alignLeft));
  637. v.push_back (display (189, 12, 72, 72, "gbjog"));
  638. v.push_back (toggle (113, 62, 62, 28, "Hold", TR_NOOP ("Hold"), boxed));
  639. auto timeSlots = radio (13, 103, 246, 162, "Time slot", slots.c_str());
  640. timeSlots.columns = 4;
  641. v.push_back (timeSlots);
  642. auto volumeSlots = radio (13, 276, 246, 162, "Volume slot", slots.c_str());
  643. volumeSlots.columns = 4;
  644. volumeSlots.colour = 1;
  645. v.push_back (volumeSlots);
  646. v.push_back (knob (80, 467, 38, "Attack", TR_NOOP ("Att"), 492));
  647. v.push_back (knob (130, 467, 38, "Release", TR_NOOP ("Rel"), 492));
  648. v.push_back (knob (186, 467, 38, "Tension", TR_NOOP ("Tns"), 492, bipolar));
  649. v.push_back (section (6, 509, 128, 46, nullptr, boxed | raised));
  650. v.push_back (knob (31, 531, 40, "Volume mix", nullptr, 0, noCaption));
  651. v.push_back (label (56, 521, 70, 20, TR_NOOP ("Volume"), alignLeft));
  652. v.push_back (display (272, 4, 556, 530, "grossbeat"));
  653. v.push_back (display (272, 537, 556, 22, "gbinfo"));
  654. return l;
  655. }
  656. Layout reeverb1()
  657. {
  658. auto l = fruityGrid ("Fruity Reeverb", 5, 2);
  659. auto& v = l.items;
  660. fruityCell (v, 0, 0, "Low cut", TR_NOOP ("Lowcut"));
  661. fruityCell (v, 1, 0, "High cut", TR_NOOP ("Highcut"));
  662. fruityCell (v, 0, 1, "Predelay", TR_NOOP ("Predelay"));
  663. fruityCell (v, 1, 1, "Room size", TR_NOOP ("Room size"));
  664. fruityCell (v, 0, 2, "Diffusion", TR_NOOP ("Diffusion"));
  665. fruityCell (v, 1, 2, "Color", TR_NOOP ("Color"));
  666. fruityCell (v, 0, 3, "Decay", TR_NOOP ("Decay"));
  667. fruityCell (v, 1, 3, "High damping", TR_NOOP ("High damping"));
  668. fruityCell (v, 0, 4, "Dry", TR_NOOP ("Dry"));
  669. fruityCell (v, 1, 4, "Wet", TR_NOOP ("Reverb"));
  670. return l;
  671. }
  672. Layout fruityFlangus()
  673. {
  674. // the order bar, then seven tall faders in their columns
  675. Layout l;
  676. l.fl = "Fruity Flangus";
  677. l.width = 366;
  678. l.height = 176;
  679. auto& v = l.items;
  680. auto order = slider (Item::vslider, 8, 75, 31, 76, "Order", nullptr, noCaption);
  681. order.steps = 8;
  682. v.push_back (order);
  683. v.push_back (label (2, 158, 44, 16, TR_NOOP ("Ord")));
  684. static const char* const params[] = { "Depth", "Speed", "Delay", "Spread", "Cross", "Dry", "Wet" };
  685. static const char* const captions[] = { TR_NOOP ("Depth"), TR_NOOP ("Spd"), TR_NOOP ("Del"), TR_NOOP ("Sprd"), TR_NOOP ("Cross"),
  686. TR_NOOP ("Dry"), TR_NOOP ("Wet") };
  687. for (int i = 0; i < 7; ++i)
  688. {
  689. const auto x = 43.0f + 46.0f * (float) i;
  690. v.push_back (section (x, 9, 40, 142, nullptr, boxed));
  691. v.push_back (slider (Item::vslider, x + 6, 14, 28, 132, params[i], nullptr, noCaption));
  692. v.push_back (label (x - 4, 158, 48, 16, captions[i]));
  693. }
  694. return l;
  695. }
  696. Layout fruitySoftClipper()
  697. {
  698. // THRES and POST, the plugin's name plate, the output meter strip and the transfer curve
  699. Layout l;
  700. l.fl = "Fruity Soft Clipper";
  701. l.width = 274;
  702. l.height = 133;
  703. auto& v = l.items;
  704. v.push_back (section (0, 0, 116, 133, nullptr, boxed));
  705. v.push_back (knob (37, 55, 36, "Threshold", TR_NOOP ("Thres"), 88));
  706. v.push_back (knob (89, 55, 36, "Post", TR_NOOP ("Post"), 88));
  707. v.push_back (label (6, 102, 104, 24, TR_NOOP ("Soft clipper"), boxed));
  708. v.push_back (display (118, 3, 24, 127, "meter"));
  709. v.push_back (display (144, 3, 130, 127, "softclip", "Threshold"));
  710. return l;
  711. }
  712. Layout fruityBloodOverdrive()
  713. {
  714. // PRE BAND and COLOR | the big PRE AMP with its x100 switch | POST FILTER and POST GAIN; captions on plates
  715. Layout l;
  716. l.fl = "Fruity Blood Overdrive";
  717. l.width = 428;
  718. l.height = 186;
  719. auto& v = l.items;
  720. v.push_back (section (0, 0, 133, 186, nullptr, boxed));
  721. v.push_back (section (135, 0, 158, 186, nullptr, boxed | raised));
  722. v.push_back (section (295, 0, 133, 186, nullptr, boxed));
  723. v.push_back (knob (69, 37, 52, "Pre band", nullptr, 0, noCaption));
  724. v.push_back (label (30, 69, 78, 15, TR_NOOP ("Pre band"), boxed));
  725. v.push_back (knob (69, 124, 52, "Color", nullptr, 0, noCaption | bipolar));
  726. v.push_back (label (30, 157, 78, 15, TR_NOOP ("Color"), boxed));
  727. v.push_back (knob (209, 86, 96, "Pre amp", nullptr, 0, noCaption | big));
  728. v.push_back (label (174, 157, 66, 15, TR_NOOP ("Pre amp"), boxed));
  729. v.push_back (toggle (244, 157, 44, 15, "x100", "x100"));
  730. v.push_back (knob (362, 36, 52, "Post filter", nullptr, 0, noCaption));
  731. v.push_back (label (323, 68, 78, 15, TR_NOOP ("Post filter"), boxed));
  732. v.push_back (knob (362, 124, 52, "Post gain", nullptr, 0, noCaption));
  733. v.push_back (label (323, 157, 78, 15, TR_NOOP ("Post gain"), boxed));
  734. return l;
  735. }
  736. Layout fruityPanOMatic()
  737. {
  738. // PAN and VOL; the LFO (shape buttons, amount, speed, off / pan / volume target); the pan / volume pad
  739. Layout l;
  740. l.fl = "Fruity PanOMatic";
  741. l.width = 307;
  742. l.height = 166;
  743. auto& v = l.items;
  744. v.push_back (section (0, 0, 144, 166, nullptr, boxed));
  745. v.push_back (knob (34, 32, 30, "Pan", TR_NOOP ("Pan"), 53, bipolar));
  746. v.push_back (knob (77, 32, 30, "Volume", TR_NOOP ("Vol"), 53));
  747. v.push_back (section (0, 66, 144, 100, nullptr, boxed | raised));
  748. v.push_back (label (4, 70, 40, 20, TR_NOOP ("LFO"), alignLeft));
  749. auto shapes = radio (60, 80, 78, 24, "LFO shape", TR_NOOP ("Sine|Triangle|Square"));
  750. shapes.columns = 3;
  751. v.push_back (shapes);
  752. v.push_back (knob (34, 124, 30, "LFO amount", TR_NOOP ("Amt"), 150, bipolar));
  753. v.push_back (knob (77, 124, 30, "LFO speed", TR_NOOP ("Spd"), 150));
  754. v.push_back (radio (101, 112, 40, 40, "LFO target", TR_NOOP ("Off|Pan|Vol")));
  755. v.push_back (display (146, 3, 158, 160, "panpad"));
  756. return l;
  757. }
  758. Layout stereoShaper()
  759. {
  760. // MIXER MATRIX: the four faders (R→L, left, right, L→R) with the LEFT / RIGHT sums under them; EFFECTS: pre / post,
  761. // DELAY and PHASE; the in / out difference switch
  762. Layout l;
  763. l.fl = "Fruity Stereo Shaper";
  764. l.width = 276;
  765. l.height = 316;
  766. auto& v = l.items;
  767. v.push_back (label (6, 0, 110, 24, TR_NOOP ("Mixer matrix"), alignLeft));
  768. v.push_back (label (190, 0, 80, 24, TR_NOOP ("Effects")));
  769. v.push_back (section (20, 30, 160, 270, nullptr, boxed));
  770. static const char* const faders[] = { "R > L", "Left", "Right", "L > R" };
  771. for (int i = 0; i < 4; ++i)
  772. v.push_back (slider (Item::vslider, 31.0f + 39.0f * (float) i, 64, 20, 216, faders[i], nullptr, noCaption | bipolar));
  773. v.push_back (label (30, 286, 60, 14, TR_NOOP ("Left")));
  774. v.push_back (label (108, 286, 60, 14, TR_NOOP ("Right")));
  775. v.push_back (radio (190, 44, 84, 26, "Effects post", TR_NOOP ("Pre|Post")));
  776. v.push_back (knob (233, 129, 50, "Delay", TR_NOOP ("Delay"), 164, bipolar));
  777. v.push_back (knob (233, 221, 50, "Phase", TR_NOOP ("Phase"), 257, bipolar));
  778. v.push_back (label (178, 280, 60, 26, TR_NOOP ("In/out difference"), alignLeft));
  779. v.push_back (toggle (238, 284, 34, 18, "Difference", TR_NOOP ("On"), boxed));
  780. return l;
  781. }
  782. Layout transientProcessor()
  783. {
  784. // IN meter | SPLIT FREQ; ATTACK panel (knob, shape); DRIVE, SPLIT BALANCE; RELEASE panel (knob, shape); GAIN | OUT
  785. // meter; on / off; the gain view under it
  786. Layout l;
  787. l.fl = "Transient Processor";
  788. l.width = 553;
  789. l.height = 325;
  790. auto& v = l.items;
  791. v.push_back (display (2, 3, 30, 172, "meter"));
  792. v.push_back (display (518, 3, 32, 172, "meter"));
  793. v.push_back (section (34, 3, 482, 172, nullptr, boxed));
  794. v.push_back (label (150, 6, 250, 20, "Transient Processor", dim));
  795. v.push_back (knob (80, 52, 40, "Split freq.", TR_NOOP ("Split freq."), 86));
  796. v.push_back (section (126, 27, 110, 148, nullptr, boxed | raised));
  797. v.push_back (knob (181, 72, 66, "Attack", TR_NOOP ("Attack"), 129, big | bipolar));
  798. v.push_back (slider (Item::hslider, 156, 143, 50, 22, "Attack shape", nullptr, noCaption | bipolar));
  799. v.push_back (knob (279, 52, 40, "Drive", TR_NOOP ("Drive"), 86));
  800. v.push_back (knob (279, 140, 40, "Split balance", TR_NOOP ("Split balance"), 168, bipolar));
  801. v.push_back (section (322, 27, 110, 148, nullptr, boxed | raised));
  802. v.push_back (knob (377, 72, 66, "Release", TR_NOOP ("Release"), 129, big | bipolar));
  803. v.push_back (slider (Item::hslider, 352, 143, 50, 22, "Release shape", nullptr, noCaption | bipolar));
  804. v.push_back (knob (469, 52, 40, "Gain", TR_NOOP ("Gain"), 86, bipolar));
  805. v.push_back (radio (40, 146, 44, 28, "On", TR_NOOP ("Off|On")));
  806. v.push_back (display (8, 180, 542, 142, "envelope", "Release"));
  807. return l;
  808. }
  809. Layout fruityFreeFilter()
  810. {
  811. auto l = fruityGrid ("Fruity Free Filter", 2, 3);
  812. l.width = 418;
  813. auto& v = l.items;
  814. fruityCell (v, 0, 0, "Type", TR_NOOP ("Type"));
  815. fruityCell (v, 1, 0, "Frequency", TR_NOOP ("Freq"));
  816. fruityHalfCell (v, 2, 0, 0, "Center", TR_NOOP ("Center"));
  817. fruityCell (v, 0, 1, "Q", TR_NOOP ("Q"), Cell::slider);
  818. fruityCell (v, 1, 1, "Gain", TR_NOOP ("Gain"));
  819. v.push_back (display (340, 60, 70, 40, "filter"));
  820. return l;
  821. }
  822. Layout fruityWaveShaper()
  823. {
  824. // the shaping curve; the plugin's name, unipolar / bipolar, PRE, MIX, POST; smooth, oversample, HQ, center
  825. Layout l;
  826. l.fl = "Fruity WaveShaper";
  827. l.width = 277;
  828. l.height = 358;
  829. auto& v = l.items;
  830. v.push_back (display (8, 3, 258, 234, "waveshaper"));
  831. v.push_back (section (0, 254, 277, 104, nullptr, boxed));
  832. v.push_back (label (4, 262, 62, 40, "WaveShaper", dim));
  833. v.push_back (radio (72, 266, 46, 34, "Unipolar", TR_NOOP ("Bipolar|Unipolar")));
  834. v.push_back (knob (165, 279, 30, "Pre amp", TR_NOOP ("Pre"), 302));
  835. v.push_back (knob (210, 279, 30, "Mix", TR_NOOP ("Mix"), 302));
  836. v.push_back (knob (253, 279, 30, "Post gain", TR_NOOP ("Post"), 302));
  837. // (round 165: the switches start further left, so "SMOOTH" fits beside its switch instead of "S...")
  838. v.push_back (toggle (112, 312, 72, 14, "Smooth", TR_NOOP ("Smooth")));
  839. v.push_back (toggle (112, 332, 72, 14, "HQ", TR_NOOP ("HQ")));
  840. v.push_back (toggle (190, 332, 60, 14, "Center", TR_NOOP ("Center")));
  841. v.push_back (label (188, 312, 60, 14, TR_NOOP ("Oversample"), alignLeft));
  842. v.push_back (stepper (250, 310, 24, 18, "Oversampling", nullptr, 4));
  843. return l;
  844. }
  845. Layout vintageChorus()
  846. {
  847. // MODE (I / II / edit) | DELAYS (time 1, time 2, feedback, high-pass faders) | MODULATION (start phase, wave,
  848. // L/R phase, tempo sync, speed fader) | LEVELS (mono input, invert wet, noise gate, noise, gain, mix fader)
  849. Layout l;
  850. l.fl = "Vintage Chorus";
  851. l.width = 754;
  852. l.height = 214;
  853. auto& v = l.items;
  854. v.push_back (label (420, 2, 326, 36, "Vintage Chorus", dim));
  855. v.push_back (section (14, 47, 173, 160, TR_NOOP ("Mode")));
  856. v.push_back (tabs (28, 90, 146, 64, "Mode", TR_NOOP ("I|II|Edit")));
  857. v.push_back (section (190, 47, 174, 160, TR_NOOP ("Delays")));
  858. static const char* const delays[] = { "Delay time 1", "Delay time 2", "Feedback", "Wet HP freq" };
  859. static const char* const delayCaptions[] = { "1", "2", TR_NOOP ("Feedback"), TR_NOOP ("H.pass") };
  860. for (int i = 0; i < 4; ++i)
  861. {
  862. const auto x = i < 2 ? 210.0f + 33.0f * (float) i : 282.0f + 39.0f * (float) (i - 2);
  863. v.push_back (slider (Item::vslider, x, 70, 20, 112, delays[i], nullptr, noCaption));
  864. v.push_back (label (x - 14, 183, 48, 12, delayCaptions[i]));
  865. }
  866. v.push_back (label (214, 195, 48, 10, TR_NOOP ("Time"), dim));
  867. v.push_back (section (367, 47, 195, 160, TR_NOOP ("Modulation")));
  868. v.push_back (knob (401, 96, 30, "LFO start phase", TR_NOOP ("Start phase"), 127));
  869. v.push_back (radio (444, 82, 40, 34, "LFO wave", TR_NOOP ("Triangle|Sine")));
  870. v.push_back (knob (401, 158, 30, "LFO L/R phase", TR_NOOP ("L/R phase"), 189));
  871. v.push_back (toggle (436, 160, 70, 14, "LFO sync", TR_NOOP ("Tempo sync")));
  872. v.push_back (slider (Item::vslider, 516, 70, 20, 124, "LFO speed", TR_NOOP ("Speed")));
  873. v.push_back (section (565, 47, 177, 160, TR_NOOP ("Levels")));
  874. v.push_back (toggle (574, 118, 76, 14, "Mono input", TR_NOOP ("Mono input")));
  875. v.push_back (toggle (574, 140, 76, 14, "Wet polarity", TR_NOOP ("Invert wet")));
  876. v.push_back (toggle (574, 162, 76, 14, "Noise gate", TR_NOOP ("Noise gate")));
  877. v.push_back (knob (663, 96, 30, "Hiss", TR_NOOP ("Noise"), 127));
  878. v.push_back (knob (663, 158, 30, "Gain", TR_NOOP ("Gain"), 189));
  879. v.push_back (slider (Item::vslider, 698, 70, 20, 124, "Wet/dry mix", TR_NOOP ("Mix")));
  880. l.menuSwitches = { "Link Chorus 1&2" };
  881. return l;
  882. }
  883. Layout hyperChorus()
  884. {
  885. // three movement pads and the voices' view on top, one row of knobs under them
  886. Layout l;
  887. l.fl = "Hyper Chorus";
  888. l.width = 754;
  889. l.height = 214;
  890. auto& v = l.items;
  891. v.push_back (label (500, 2, 246, 32, "Hyper Chorus", dim));
  892. v.push_back (display (27, 38, 100, 102, "xy", "Delay", "Feedback"));
  893. v.push_back (display (157, 38, 100, 102, "xy", "Mod amount", "Mod rate"));
  894. v.push_back (display (288, 38, 100, 102, "xy", "Movement", "Movement speed"));
  895. v.push_back (display (420, 38, 300, 102, "voices"));
  896. v.push_back (section (2, 146, 750, 66, nullptr, boxed | raised));
  897. struct K { float x; const char* param; const char* caption; };
  898. const K knobs[] = { { 44, "Delay", TR_NOOP ("Delay") }, { 108, "Feedback", TR_NOOP ("Feedback") }, { 175, "Mod amount", TR_NOOP ("Modulation") },
  899. { 239, "Mod rate", TR_NOOP ("Mod rate") }, { 304, "Movement", TR_NOOP ("Movement") },
  900. { 369, "Movement speed", TR_NOOP ("Move rate") }, { 514, "High pass", TR_NOOP ("High pass") },
  901. { 569, "Low pass", TR_NOOP ("Low pass") }, { 644, "LFO phase difference", TR_NOOP ("LFO phase dif") },
  902. { 710, "Dry/wet", TR_NOOP ("Mix") } };
  903. for (const auto& k : knobs)
  904. v.push_back (knob (k.x, 171, 32, k.param, k.caption, 202));
  905. v.push_back (toggle (436, 162, 30, 18, "ArachnaChor mode", nullptr));
  906. v.push_back (label (420, 196, 60, 12, TR_NOOP ("Delay lines")));
  907. return l;
  908. }
  909. Layout fruityBalance()
  910. {
  911. // Balance and Volume knobs (captions above, values under them) around the level meter
  912. Layout l;
  913. l.fl = "Fruity Balance";
  914. l.width = 232;
  915. l.height = 150;
  916. auto& v = l.items;
  917. v.push_back (section (0, 0, 232, 150, nullptr, boxed));
  918. v.push_back (label (8, 18, 80, 20, TR_NOOP ("Balance")));
  919. v.push_back (knob (48, 77, 46, "Balance", nullptr, 0, noCaption | bipolar));
  920. v.push_back (value (8, 112, 80, 20, "Balance", 0));
  921. v.push_back (display (90, 16, 40, 118, "meter"));
  922. v.push_back (label (130, 18, 80, 20, TR_NOOP ("Volume")));
  923. v.push_back (knob (170, 77, 46, "Volume", nullptr, 0, noCaption));
  924. v.push_back (value (130, 112, 80, 20, "Volume", 0));
  925. return l;
  926. }
  927. Layout fruityMute2Layout()
  928. {
  929. // round 165g, FL Studio 2026's window: two knobs side by side, each with its caption box (MUTE / CHANNEL) and its value
  930. // under it ("On" = the sound passes, "Off" = muted; L, L + R, R = the side(s) silenced)
  931. Layout l;
  932. l.fl = "Fruity Mute 2";
  933. l.width = 300;
  934. l.height = 64;
  935. auto& v = l.items;
  936. v.push_back (section (0, 0, 300, 64, nullptr, boxed));
  937. v.push_back (knob (28, 32, 36, "Mute", nullptr, 0, noCaption, 1));
  938. v.push_back (label (52, 8, 92, 16, TR_NOOP ("MUTE")));
  939. v.push_back (value (52, 30, 92, 18, "Mute"));
  940. v.push_back (knob (172, 32, 36, "Channel", nullptr, 0, noCaption, 3));
  941. v.push_back (label (196, 8, 96, 16, TR_NOOP ("CHANNEL")));
  942. v.push_back (value (196, 30, 96, 18, "Channel"));
  943. return l;
  944. }
  945. Layout fruitySend()
  946. {
  947. // one row: DRY, the SEND TO box (the destination insert, a menu of the mixer's inserts), PAN and VOLUME
  948. // (FL Studio 2026, 263 × 89; REA_rodada105_send §4)
  949. Layout l;
  950. l.fl = "Fruity Send";
  951. l.width = 263;
  952. l.height = 89;
  953. auto& v = l.items;
  954. v.push_back (section (0, 0, 263, 89, nullptr, boxed));
  955. v.push_back (knob (37, 30, 46, "Dry", TR_NOOP ("Dry"), 72));
  956. LayoutItem to;
  957. to.type = Item::menu;
  958. to.x = 78, to.y = 17, to.w = 48, to.h = 28;
  959. to.param = "Send to";
  960. to.label = TR_NOOP ("Send to");
  961. to.options = "None|Insert 1"; // (not shown: the editor lists the song's inserts by name)
  962. to.values = { 0.0f, 1.0f / (float) (maxMixerTracks - 1) };
  963. v.push_back (to);
  964. v.push_back (label (70, 52, 64, 14, TR_NOOP ("Send to")));
  965. v.push_back (knob (158, 30, 46, "Pan", TR_NOOP ("Pan"), 72, bipolar));
  966. v.push_back (knob (226, 30, 46, "Volume", TR_NOOP ("Volume"), 72));
  967. return l;
  968. }
  969. Layout lynxTune()
  970. {
  971. // LYNX Tune (own design, REA rounds 95 / 120 / 128). The workflow of the automatic pitch correctors' "auto" mode it
  972. // stands in for (Auto-Tune Pro, studied on the official trial — layout logic only, LYNX's own drawing): the input /
  973. // key / scale bar on top with AUTO KEY under the scale and the formant / transpose / A4 / mix group on the right;
  974. // the correction row in the middle — RETUNE SPEED big on the left, FLEX-TUNE beside it, the live correction meter
  975. // (note name, ±100 cent ring; click = HOLD) in the centre, NATURAL VIBRATO and HUMANIZE big on the right; the pitch
  976. // graph or the ADVANCED page (created vibrato, ignore vibrato) below; the keyboard at the bottom with its
  977. // BYPASS / REMOVE modes and LATCH (round 128).
  978. Layout l;
  979. l.width = 800;
  980. l.height = 622;
  981. l.pages = { TR_NOOP ("Pitch graph"), TR_NOOP ("Advanced"), TR_NOOP ("Real-time") }; // round 135w: + Real-time
  982. auto& v = l.items;
  983. auto menu = [&v] (float x, float y, float w, const char* param, const char* caption, const char* options, int steps = 0) {
  984. LayoutItem m;
  985. m.type = Item::menu;
  986. m.x = x, m.y = y, m.w = w, m.h = 22;
  987. m.param = param;
  988. m.label = caption;
  989. m.options = options;
  990. m.steps = steps;
  991. v.push_back (m);
  992. v.push_back (label (x, y - 16, w, 14, caption));
  993. };
  994. // --- top bar: input
  995. v.push_back (section (0, 0, 334, 92, TR_NOOP ("INPUT")));
  996. v.push_back (knob (34, 44, 30, "Tracking", TR_NOOP ("TRACKING"), 70, 0));
  997. menu (66, 40, 106, "Range", TR_NOOP ("Input type"), TR_NOOP ("Soprano|Alto / Tenor|Low male|Instrument"));
  998. menu (178, 40, 52, "Key", TR_NOOP ("Key"), "C|C#|D|D#|E|F|F#|G|G#|A|A#|B");
  999. menu (236, 40, 92, "Scale", TR_NOOP ("Scale"),
  1000. TR_NOOP ("Chromatic|Major|Minor|Harmonic minor|Melodic minor|Major pentatonic|Minor pentatonic|Blues|Dorian|Mixolydian|Phrygian|Lydian|Locrian|Custom"));
  1001. v.push_back (display (236, 66, 92, 20, "tuneautokey"));
  1002. // --- mode: latency and MIDI targets
  1003. v.push_back (section (338, 0, 140, 92, TR_NOOP ("MODE")));
  1004. v.push_back (toggle (346, 24, 124, 18, "Low latency", TR_NOOP ("Low latency")));
  1005. v.push_back (stepper (346, 54, 124, 24, "MIDI", TR_NOOP ("MIDI channel"), 129));
  1006. // --- output: formant, transpose, reference, mix
  1007. v.push_back (section (482, 0, 318, 92, TR_NOOP ("OUTPUT")));
  1008. v.push_back (toggle (490, 22, 82, 18, "Formant preserve", TR_NOOP ("Formant")));
  1009. v.push_back (knob (531, 58, 26, "Formant shift", TR_NOOP ("SHIFT"), 82, bipolar));
  1010. v.push_back (stepper (580, 40, 78, 22, "Transpose", TR_NOOP ("Transpose"), 25));
  1011. v.push_back (knob (700, 44, 30, "Reference", TR_NOOP ("A4"), 70, showValue));
  1012. v.push_back (knob (760, 44, 30, "Mix", TR_NOOP ("MIX"), 70, showValue));
  1013. // --- correction row
  1014. v.push_back (section (0, 96, 800, 236, TR_NOOP ("CORRECTION")));
  1015. v.push_back (knob (100, 200, 104, "Retune", TR_NOOP ("RETUNE SPEED"), 284, big | showValue));
  1016. v.push_back (knob (226, 224, 60, "Flex-Tune", TR_NOOP ("FLEX-TUNE"), 284, showValue));
  1017. v.push_back (display (300, 116, 200, 200, "pitchring"));
  1018. v.push_back (knob (574, 224, 60, "Natural vibrato", TR_NOOP ("NATURAL VIBRATO"), 284, bipolar | showValue));
  1019. v.push_back (knob (700, 200, 104, "Humanize", TR_NOOP ("HUMANIZE"), 284, big | showValue));
  1020. // round 135: CLASSIC (the older correctors' retune) and LEARN (the scale from the notes played on the MIDI channel)
  1021. v.push_back (toggle (12, 116, 90, 18, "Classic", TR_NOOP ("Classic")));
  1022. v.push_back (toggle (690, 116, 104, 18, "Learn MIDI", TR_NOOP ("Learn scale")));
  1023. // --- pitch graph / advanced (pages)
  1024. v.push_back (section (0, 336, 800, 142, nullptr, boxed));
  1025. v.push_back (pageTabs (8, 340, 330, 20, TR_NOOP ("Pitch graph|Advanced|Real-time")));
  1026. v.push_back (onPage (display (6, 366, 788, 106, "pitchtrace"), 0));
  1027. auto adv = [&v] (LayoutItem i) { v.push_back (onPage (std::move (i), 1)); };
  1028. adv (label (14, 368, 300, 16, TR_NOOP ("Create vibrato"), alignLeft));
  1029. {
  1030. LayoutItem m;
  1031. m.type = Item::menu;
  1032. m.x = 14, m.y = 408, m.w = 110, m.h = 22;
  1033. m.param = "Vibrato shape";
  1034. m.label = TR_NOOP ("Shape");
  1035. m.options = TR_NOOP ("No vibrato|Sine|Square|Sawtooth");
  1036. adv (m);
  1037. adv (label (14, 392, 110, 14, TR_NOOP ("Shape")));
  1038. }
  1039. adv (knob (176, 420, 34, "Vibrato rate", TR_NOOP ("RATE"), 452, showValue));
  1040. adv (knob (250, 420, 34, "Vibrato depth", TR_NOOP ("DEPTH"), 452, showValue));
  1041. adv (knob (324, 420, 34, "Onset delay", TR_NOOP ("ONSET DELAY"), 452, showValue));
  1042. adv (knob (398, 420, 34, "Onset rate", TR_NOOP ("ONSET RATE"), 452, showValue));
  1043. adv (label (470, 368, 300, 16, TR_NOOP ("Pitch tracking"), alignLeft));
  1044. adv (toggle (470, 400, 150, 20, "Ignore vibrato", TR_NOOP ("Ignore vibrato")));
  1045. adv (label (470, 430, 160, 14, TR_NOOP ("Notes are picked from the pitch"), alignLeft | dim));
  1046. adv (label (470, 444, 160, 14, TR_NOOP ("with its vibrato smoothed"), alignLeft | dim));
  1047. // round 136: the voice-shifter extras (the Drive stage it measured, a ±12 st formant range, an output trim)
  1048. adv (label (640, 368, 150, 16, TR_NOOP ("Voice shifter"), alignLeft));
  1049. adv (toggle (640, 386, 150, 18, "Drive stage", TR_NOOP ("Drive stage")));
  1050. adv (toggle (640, 408, 150, 18, "Wide formant", TR_NOOP ("Formant ±12 st")));
  1051. adv (knob (672, 446, 22, "Drive", TR_NOOP ("DRIVE"), 462, showValue));
  1052. adv (knob (748, 446, 22, "Output", TR_NOOP ("OUTPUT"), 462, showValue | bipolar));
  1053. // round 135w: the real-time corrector's controls (the Waves Tune Real-Time role): Speed with its link to the
  1054. // retune (Note Transition), the tolerances, vibrato on / amount, correction %, input / output meters
  1055. auto rt = [&v] (LayoutItem i) { v.push_back (onPage (std::move (i), 2)); };
  1056. rt (knob (50, 412, 34, "Speed", TR_NOOP ("SPEED"), 444, showValue));
  1057. rt (toggle (14, 450, 74, 18, "Speed link", TR_NOOP ("Link")));
  1058. rt (knob (140, 412, 34, "Tolerance cents", TR_NOOP ("TOL. CENTS"), 444, showValue));
  1059. rt (knob (224, 412, 34, "Tolerance time", TR_NOOP ("TOL. TIME"), 444, showValue));
  1060. rt (toggle (284, 372, 110, 18, "Keep vibrato", TR_NOOP ("Vibrato")));
  1061. rt (knob (330, 422, 30, "Vibrato amount", TR_NOOP ("VIB. DEPTH"), 452, showValue));
  1062. rt (knob (430, 412, 34, "Correction", TR_NOOP ("CORRECTION"), 444, showValue));
  1063. rt (label (494, 376, 214, 14, TR_NOOP ("Speed: in-note drift and vibrato"), alignLeft | dim));
  1064. rt (label (494, 394, 214, 14, TR_NOOP ("Link: the retune speed does it"), alignLeft | dim));
  1065. rt (label (494, 412, 214, 14, TR_NOOP ("Tolerance: how far / how long a note"), alignLeft | dim));
  1066. rt (label (494, 430, 214, 14, TR_NOOP ("may stray before the target changes"), alignLeft | dim));
  1067. // round 152: the MIDI reference tone (the notes held on the MIDI channel as sines) and its level
  1068. rt (toggle (494, 452, 104, 18, "Reference tone", TR_NOOP ("Ref. tone")));
  1069. rt (knob (618, 461, 13, "Tone level", nullptr, 461, noCaption | bipolar));
  1070. {
  1071. auto io = display (712, 366, 80, 106, "iometer");
  1072. io.steps = 3; // LYNX Tune's input / output peaks are its meter outputs 3 and 4
  1073. rt (io);
  1074. }
  1075. // --- the keyboard: BYPASS / REMOVE modes, LATCH, four octaves (a key edits its note name in every octave)
  1076. // round 147: + the range bar, the range presets, Reset scale and the view's navigation (the real-time corrector's)
  1077. v.push_back (section (0, 482, 800, 140, TR_NOOP ("TARGET NOTES")));
  1078. v.push_back (display (8, 502, 784, 114, "tunekeys"));
  1079. return l;
  1080. }
  1081. Layout emphasizer()
  1082. {
  1083. // round 154: INPUT GAIN and the big EMPHASIS knob over their captions, OUTPUT, the meter strip on the right; the
  1084. // bottom strip carries the name plate and the SOFT CLIPPING / LEVEL MATCHING / BYPASS switches
  1085. Layout l;
  1086. l.fl = "Emphasizer";
  1087. l.width = 512;
  1088. l.height = 98;
  1089. auto& v = l.items;
  1090. v.push_back (section (0, 0, 236, 74, nullptr, boxed));
  1091. v.push_back (knob (40, 30, 34, "Input gain", TR_NOOP ("INPUT GAIN"), 60, showValue));
  1092. v.push_back (knob (118, 30, 40, "Emphasis", TR_NOOP ("EMPHASIS"), 60, showValue));
  1093. v.push_back (knob (196, 30, 34, "Output", TR_NOOP ("OUTPUT"), 60, showValue));
  1094. v.push_back (display (240, 4, 268, 66, "meter"));
  1095. v.push_back (label (4, 78, 120, 16, "EMPHASIZER", alignLeft));
  1096. v.push_back (toggle (236, 78, 96, 16, "Soft clipping", TR_NOOP ("SOFT CLIPPING")));
  1097. v.push_back (toggle (336, 78, 104, 16, "Level matching", TR_NOOP ("LEVEL MATCHING")));
  1098. v.push_back (toggle (444, 78, 64, 16, "Bypass", TR_NOOP ("BYPASS")));
  1099. return l;
  1100. }
  1101. Layout fruitySqueeze()
  1102. {
  1103. // SQUARIZE (amount), PUNCHER (preserve, impact, relation, amount) on plates; FILTER (on, type, freq, res, pre / post);
  1104. // MIX and GAIN faders
  1105. Layout l;
  1106. l.fl = "Fruity Squeeze";
  1107. l.width = 282;
  1108. l.height = 223;
  1109. auto& v = l.items;
  1110. v.push_back (section (2, 2, 105, 52, nullptr, boxed));
  1111. v.push_back (label (10, 6, 90, 16, TR_NOOP ("Squarize"), alignLeft));
  1112. const auto row = [&v] (float y, const char* param, const char* caption) {
  1113. v.push_back (label (13, y - 9, 60, 17, caption, boxed));
  1114. v.push_back (knob (87, y, 24, param, nullptr, 0, noCaption));
  1115. };
  1116. row (39, "Steps", TR_NOOP ("Amount"));
  1117. v.push_back (section (2, 58, 105, 162, nullptr, boxed));
  1118. v.push_back (label (10, 62, 90, 16, TR_NOOP ("Puncher"), alignLeft));
  1119. row (100, "Preserve", TR_NOOP ("Preserve"));
  1120. row (133, "Impact", TR_NOOP ("Impact"));
  1121. row (165, "Relation", TR_NOOP ("Relation"));
  1122. row (198, "Amount", TR_NOOP ("Amount"));
  1123. v.push_back (section (110, 2, 100, 164, nullptr, boxed));
  1124. v.push_back (toggle (116, 6, 90, 16, "Filter", TR_NOOP ("Filter")));
  1125. v.push_back (section (116, 30, 88, 19, nullptr, boxed | raised));
  1126. v.push_back (value (116, 30, 88, 19, "Filter type", 0));
  1127. v.push_back (label (116, 66, 40, 14, TR_NOOP ("Freq.")));
  1128. v.push_back (knob (136, 102, 34, "Cutoff", nullptr, 0, noCaption));
  1129. v.push_back (label (162, 66, 40, 14, TR_NOOP ("Res.")));
  1130. v.push_back (knob (182, 102, 34, "Resonance", nullptr, 0, noCaption));
  1131. v.push_back (tabs (117, 137, 88, 18, "Filter post", TR_NOOP ("Pre|Pos")));
  1132. v.push_back (section (213, 2, 67, 164, nullptr, boxed));
  1133. v.push_back (slider (Item::vslider, 219, 12, 20, 148, "Mix", TR_NOOP ("Mix")));
  1134. v.push_back (slider (Item::vslider, 251, 12, 20, 148, "Volume", TR_NOOP ("Gain")));
  1135. v.push_back (label (112, 170, 168, 48, "Fruity Squeeze", dim));
  1136. return l;
  1137. }
  1138. Layout fruityDelay2()
  1139. {
  1140. // INPUT (pan, volume) | FEEDBACK (normal / invert / ping-pong, volume, cutoff) | TIME (time, offset) | DRY (volume)
  1141. Layout l;
  1142. l.fl = "Fruity Delay 2";
  1143. l.width = 404;
  1144. l.height = 102;
  1145. auto& v = l.items;
  1146. v.push_back (section (2, 2, 99, 74, TR_NOOP ("Input")));
  1147. v.push_back (knob (28, 45, 33, "Input pan", TR_NOOP ("Pan"), 68, bipolar));
  1148. v.push_back (knob (73, 45, 33, "Input volume", TR_NOOP ("Vol"), 68));
  1149. v.push_back (section (103, 2, 148, 74, TR_NOOP ("Feedback")));
  1150. v.push_back (radio (109, 24, 52, 46, "Mode", TR_NOOP ("Normal|Invert|P.pong")));
  1151. v.push_back (knob (183, 45, 33, "Feedback", TR_NOOP ("Vol"), 68));
  1152. v.push_back (knob (223, 45, 33, "Cutoff", TR_NOOP ("Cut"), 68));
  1153. v.push_back (section (253, 2, 97, 74, TR_NOOP ("Time")));
  1154. v.push_back (knob (279, 45, 33, "Time", TR_NOOP ("Time"), 68));
  1155. v.push_back (knob (325, 45, 33, "Stereo offset", TR_NOOP ("Ofs"), 68, bipolar));
  1156. v.push_back (section (352, 2, 50, 74, TR_NOOP ("Dry")));
  1157. v.push_back (knob (378, 45, 33, "Dry", TR_NOOP ("Vol"), 68));
  1158. v.push_back (label (104, 78, 296, 22, "Fruity Delay 2", dim));
  1159. return l;
  1160. }
  1161. // --- generators (the channel's plugin page): items name the knobs of ChannelSettings' model panel ------------
  1162. Layout threeOsc()
  1163. {
  1164. // three oscillator rows: shape buttons (sine, square, rounded, custom / triangle, saw, noise) and the invert switch,
  1165. // PHASE OFS and DETUNE faders, COARSE, FINE, pan and (oscillators 2 and 3) volume; AM OSC 3, HQ and PHASE RAND below
  1166. Layout l;
  1167. l.fl = "3x Osc";
  1168. l.width = 560;
  1169. l.height = 390;
  1170. auto& v = l.items;
  1171. v.push_back (section (0, 0, 560, 310, nullptr, boxed));
  1172. static const char* const names[3][7] = { { "Osc 1 shape", "Osc 1 phase", "Osc 1 detune", "Osc 1 coarse", "Osc 1 fine", "Osc 1 pan", nullptr },
  1173. { "Osc 2 shape", "Osc 2 phase", "Osc 2 detune", "Osc 2 coarse", "Osc 2 fine", "Osc 2 pan", "Osc 2 mix" },
  1174. { "Osc 3 shape", "Osc 3 phase", "Osc 3 detune", "Osc 3 coarse", "Osc 3 fine", "Osc 3 pan", "Osc 3 mix" } };
  1175. static const char* const inverts[3] = { "Invert 1", "Invert 2", "Invert 3" };
  1176. static const char* const numbers[3] = { "1", "2", "3" };
  1177. for (int o = 0; o < 3; ++o)
  1178. {
  1179. const auto dy = 107.5f * (float) o;
  1180. const auto captions = o < 2; // FL writes the captions between the rows
  1181. v.push_back (label (2, 20 + dy, 30, 36, numbers[o], dim));
  1182. // shape buttons in FL's order; the values are the engine's shapes 0…6 over 0..1
  1183. auto shape = radio (37, 9 + dy, 152, 76, names[o][0], "Sine|Square|Rounded|Custom|Triangle|Saw|Noise",
  1184. { 0.0f, 2.0f / 6.0f, 4.0f / 6.0f, 1.0f, 1.0f / 6.0f, 3.0f / 6.0f, 5.0f / 6.0f });
  1185. shape.columns = 4;
  1186. v.push_back (shape);
  1187. v.push_back (toggle (153, 52 + dy, 32, 28, inverts[o], "+/-", boxed));
  1188. v.push_back (slider (Item::vslider, 222, 6 + dy, 20, 82, names[o][1], nullptr, noCaption | bipolar));
  1189. v.push_back (slider (Item::vslider, 252, 6 + dy, 20, 82, names[o][2], nullptr, noCaption | bipolar));
  1190. if (captions)
  1191. {
  1192. v.push_back (label (190, 95 + dy, 58, 14, TR_NOOP ("Phase ofs"), dim));
  1193. v.push_back (label (250, 95 + dy, 40, 14, TR_NOOP ("Detune"), dim));
  1194. }
  1195. v.push_back (knob (338, 48 + dy, 46, names[o][3], captions ? TR_NOOP ("Coarse") : nullptr, 102 + dy, captions ? 0 : noCaption));
  1196. v.push_back (knob (401, 48 + dy, 34, names[o][4], captions ? TR_NOOP ("Fine") : nullptr, 102 + dy, captions ? 0 : noCaption));
  1197. v.push_back (knob (465, 48 + dy, 34, names[o][5], captions ? TR_NOOP ("Pan") : nullptr, 102 + dy, bipolar | (captions ? 0 : noCaption)));
  1198. if (names[o][6] != nullptr)
  1199. v.push_back (knob (523, 48 + dy, 46, names[o][6], o == 1 ? TR_NOOP ("Vol") : nullptr, 102 + dy, o == 1 ? 0 : noCaption));
  1200. }
  1201. v.push_back (section (0, 312, 560, 78, nullptr, boxed | raised));
  1202. v.push_back (toggle (14, 342, 72, 16, "Osc 3 AM", TR_NOOP ("AM osc 3")));
  1203. v.push_back (toggle (94, 342, 44, 16, "HQ", TR_NOOP ("HQ")));
  1204. v.push_back (knob (165, 350, 44, "Phase rand", nullptr, 0, noCaption));
  1205. v.push_back (label (192, 342, 80, 16, TR_NOOP ("Phase rand"), alignLeft));
  1206. v.push_back (label (380, 326, 170, 50, "3x Osc", dim));
  1207. return l;
  1208. }
  1209. Layout flKeys()
  1210. {
  1211. // ENVIRONMENT, MISC, VELOCITY and TUNING over two rows of knobs; the sample set's name at the top right
  1212. Layout l;
  1213. l.fl = "FL Keys";
  1214. l.width = 480;
  1215. l.height = 186;
  1216. auto& v = l.items;
  1217. v.push_back (label (8, 2, 200, 34, "FL Keys", dim | alignLeft));
  1218. v.push_back (display (333, 9, 141, 18, "flkeysname"));
  1219. v.push_back (section (12, 37, 110, 145, TR_NOOP ("Environment")));
  1220. v.push_back (section (132, 37, 111, 145, TR_NOOP ("Misc")));
  1221. v.push_back (section (253, 37, 159, 145, TR_NOOP ("Velocity")));
  1222. v.push_back (section (422, 37, 52, 145, TR_NOOP ("Tuning")));
  1223. v.push_back (knob (37, 87, 34, "Decay", TR_NOOP ("Decay"), 110, bipolar));
  1224. v.push_back (knob (95, 87, 34, "Release", TR_NOOP ("Release"), 110, bipolar));
  1225. v.push_back (knob (37, 149, 34, "Pan/Trem", TR_NOOP ("Pan"), 172, bipolar));
  1226. v.push_back (knob (95, 149, 34, "Stereo", TR_NOOP ("Stereo"), 172));
  1227. v.push_back (knob (158, 87, 34, "Overdrive", TR_NOOP ("Overdrive"), 110));
  1228. v.push_back (knob (216, 87, 34, "LFO rate", TR_NOOP ("LFO"), 110));
  1229. v.push_back (knob (158, 149, 34, "Treble", TR_NOOP ("Treble"), 172, bipolar));
  1230. v.push_back (knob (216, 149, 34, "Stretch", TR_NOOP ("Stretch"), 172, bipolar));
  1231. v.push_back (knob (278, 87, 34, "Vel > Muffle", TR_NOOP ("Vel"), 110));
  1232. v.push_back (knob (336, 87, 34, "Muffle", TR_NOOP ("Muffle"), 110));
  1233. v.push_back (knob (278, 149, 34, "Vel > Hard", TR_NOOP ("Vel"), 172, bipolar));
  1234. v.push_back (knob (336, 149, 34, "Hardness", TR_NOOP ("Hardness"), 172, bipolar));
  1235. v.push_back (knob (394, 149, 34, "Vel sens", TR_NOOP ("Sens"), 172, bipolar));
  1236. v.push_back (knob (447, 87, 34, "Tune", TR_NOOP ("Tune"), 110, bipolar));
  1237. v.push_back (knob (447, 149, 34, "Detune", TR_NOOP ("Detune"), 172));
  1238. return l;
  1239. }
  1240. Layout booBass()
  1241. {
  1242. // BASS, MID and TREBLE stepping down along the instrument's body
  1243. Layout l;
  1244. l.fl = "BooBass";
  1245. l.width = 343;
  1246. l.height = 154;
  1247. auto& v = l.items;
  1248. v.push_back (label (180, 0, 160, 34, "BooBass", dim));
  1249. v.push_back (section (40, 36, 300, 116, nullptr, boxed));
  1250. v.push_back (knob (79, 74, 40, "Bass", TR_NOOP ("Bass"), 107));
  1251. v.push_back (knob (151, 92, 40, "Mid", TR_NOOP ("Mid"), 128));
  1252. v.push_back (knob (222, 102, 40, "Treble", TR_NOOP ("Treble"), 138));
  1253. return l;
  1254. }
  1255. Layout sytrusMain()
  1256. {
  1257. // Sytrus' MAIN page: master faders, volume and filter envelopes, unison, the modulation X/Y pad, quality and porta.
  1258. // The operator, filter and effect pages and the FM / RM matrix keep the saved patch (not editable in LYNX).
  1259. Layout l;
  1260. l.fl = "Sytrus";
  1261. l.width = 850;
  1262. l.height = 346;
  1263. auto& v = l.items;
  1264. v.push_back (label (8, 4, 80, 22, TR_NOOP ("Main"), boxed));
  1265. const auto fader = [&v] (float cx, const char* param, const char* caption, bool bipolarFader) {
  1266. v.push_back (slider (Item::vslider, cx - 9, 54, 18, 70, param, nullptr, noCaption | (bipolarFader ? bipolar : 0)));
  1267. v.push_back (label (cx - 16, 38, 32, 13, caption));
  1268. };
  1269. v.push_back (section (12, 34, 136, 98, nullptr, boxed));
  1270. fader (38, "Master level", TR_NOOP ("Vol"), false);
  1271. fader (81, "Master LFO", TR_NOOP ("LFO"), true);
  1272. fader (124, "Master pitch", TR_NOOP ("Pitch"), true);
  1273. v.push_back (section (152, 34, 98, 98, nullptr, boxed));
  1274. fader (165, "Vol attack", "A", false);
  1275. fader (189, "Vol decay", "D", false);
  1276. fader (213, "Vol sustain", "S", true);
  1277. fader (237, "Vol release", "R", false);
  1278. v.push_back (label (156, 122, 80, 10, TR_NOOP ("Vol"), dim | alignLeft));
  1279. v.push_back (section (256, 34, 98, 98, nullptr, boxed));
  1280. fader (269, "Flt attack", "A", false);
  1281. fader (293, "Flt decay", "D", false);
  1282. fader (317, "Flt sustain", "S", true);
  1283. fader (341, "Flt release", "R", false);
  1284. v.push_back (label (260, 122, 80, 10, TR_NOOP ("Filter"), dim | alignLeft));
  1285. v.push_back (section (360, 34, 180, 98, nullptr, boxed));
  1286. v.push_back (stepper (366, 38, 30, 34, "Unison", TR_NOOP ("Ord"), 8));
  1287. fader (410, "Uni pan", TR_NOOP ("Pn"), false);
  1288. fader (434, "Uni volume", TR_NOOP ("Vl"), false);
  1289. fader (458, "Uni pitch", TR_NOOP ("Pt"), false);
  1290. fader (481, "Uni sub", TR_NOOP ("Sb"), false);
  1291. fader (504, "Uni phase", TR_NOOP ("Ph"), false);
  1292. fader (527, "Uni env var", TR_NOOP ("En"), false);
  1293. v.push_back (label (470, 122, 66, 10, TR_NOOP ("Unison"), dim));
  1294. v.push_back (section (12, 138, 168, 160, TR_NOOP ("Modulation")));
  1295. v.push_back (display (18, 160, 128, 130, "xy", "Mod X", "Mod Y"));
  1296. v.push_back (knob (164, 185, 24, "Mod X", "X", 205));
  1297. v.push_back (knob (164, 232, 24, "Mod Y", "Y", 252));
  1298. v.push_back (section (362, 138, 178, 86, TR_NOOP ("Quality")));
  1299. v.push_back (label (462, 156, 34, 12, TR_NOOP ("Draft")));
  1300. v.push_back (label (500, 156, 34, 12, TR_NOOP ("Render")));
  1301. v.push_back (label (368, 174, 92, 16, TR_NOOP ("HQ envelopes"), alignLeft));
  1302. v.push_back (toggle (470, 175, 16, 14, "Live env accuracy", nullptr));
  1303. v.push_back (toggle (508, 175, 16, 14, "Export env accuracy", nullptr));
  1304. v.push_back (label (368, 198, 92, 16, TR_NOOP ("Oversampling"), alignLeft));
  1305. v.push_back (stepper (462, 196, 32, 22, "Live oversampling", nullptr, 4));
  1306. v.push_back (stepper (500, 196, 32, 22, "Export oversampling", nullptr, 4));
  1307. v.push_back (toggle (450, 270, 70, 16, "Porta", TR_NOOP ("Porta")));
  1308. v.push_back (section (553, 34, 294, 260, nullptr, boxed));
  1309. v.push_back (label (560, 150, 280, 16, TR_NOOP ("Operators, filters, effects and the matrix"), dim));
  1310. v.push_back (label (560, 168, 280, 16, TR_NOOP ("keep the saved patch"), dim));
  1311. v.push_back (label (560, 300, 286, 40, "Sytrus", dim));
  1312. return l;
  1313. }
  1314. Layout harmorMain()
  1315. {
  1316. // Harmor's part page and global section, with the controls LYNX edits at FL's places (timbre mix, blur, tremolo,
  1317. // harmonizer, unison order and detune, vibrato, filter cutoff and resonance, pluck, phaser, part volume, A/B
  1318. // crossfade and the global volume); the rest of the panel keeps the saved patch
  1319. Layout l;
  1320. l.fl = "Harmor";
  1321. l.width = 1000;
  1322. l.height = 600;
  1323. auto& v = l.items;
  1324. v.push_back (section (12, 0, 976, 330, nullptr, boxed));
  1325. const auto title = [&v] (float x, float y, const char* text) { v.push_back (label (x, y, 110, 18, text, alignLeft)); };
  1326. title (100, 70, TR_NOOP ("Timbre"));
  1327. title (18, 104, TR_NOOP ("Blur"));
  1328. title (228, 104, TR_NOOP ("Trem"));
  1329. title (60, 180, TR_NOOP ("Prism"));
  1330. title (210, 180, TR_NOOP ("Harmonizer"));
  1331. title (380, 160, TR_NOOP ("Unison"));
  1332. title (40, 278, TR_NOOP ("Pitch"));
  1333. title (270, 270, TR_NOOP ("Vibrato"));
  1334. title (400, 270, TR_NOOP ("Legato"));
  1335. title (555, 238, TR_NOOP ("Pluck"));
  1336. title (655, 238, TR_NOOP ("Phaser"));
  1337. title (900, 238, TR_NOOP ("EQ"));
  1338. title (555, 20, TR_NOOP ("Filter 1"));
  1339. v.push_back (knob (177, 40, 30, "Timbre mix", TR_NOOP ("Mix"), 63));
  1340. v.push_back (knob (61, 135, 30, "Harm. blur", TR_NOOP ("Mix"), 160));
  1341. v.push_back (knob (277, 135, 30, "Tremolo", TR_NOOP ("Depth"), 160));
  1342. v.push_back (knob (181, 219, 34, "Harmonizer", TR_NOOP ("Amt"), 247));
  1343. v.push_back (stepper (414, 196, 30, 22, "Unison", TR_NOOP ("Order"), 8));
  1344. v.push_back (slider (Item::vslider, 476, 182, 18, 80, "Uni detune", TR_NOOP ("Pitch")));
  1345. v.push_back (knob (335, 291, 28, "Vibrato", TR_NOOP ("Depth"), 312));
  1346. v.push_back (slider (Item::vslider, 455, 40, 18, 100, "A volume", TR_NOOP ("Vol"), bipolar));
  1347. v.push_back (knob (725, 71, 44, "Cutoff", TR_NOOP ("Freq"), 106));
  1348. v.push_back (knob (828, 71, 34, "Resonance", TR_NOOP ("Res"), 106));
  1349. v.push_back (knob (587, 283, 40, "Pluck", TR_NOOP ("Time"), 313));
  1350. v.push_back (knob (686, 283, 34, "Phaser mix", TR_NOOP ("Mix"), 313));
  1351. v.push_back (section (12, 334, 380, 266, nullptr, boxed));
  1352. title (22, 342, TR_NOOP ("Global"));
  1353. v.push_back (slider (Item::vslider, 172, 410, 20, 110, "Master vol", TR_NOOP ("Vol")));
  1354. v.push_back (slider (Item::hslider, 280, 368, 90, 26, "A/B mix", TR_NOOP ("Part A / B")));
  1355. v.push_back (section (396, 334, 592, 266, nullptr, boxed));
  1356. v.push_back (label (420, 450, 540, 16, TR_NOOP ("The other Harmor controls keep the saved patch"), dim));
  1357. v.push_back (label (820, 556, 160, 40, "Harmor", dim));
  1358. return l;
  1359. }
  1360. Layout maximus()
  1361. {
  1362. // FL Studio 2026 Maximus (measured on its window, body origin under the wrapper title): the selected band's
  1363. // compression curve at the top-left and the bands view across the rest of the top; under them the band selector
  1364. // (LOW / MID / HIGH / MASTER), the band's mode switch, PRE / POST gain, stereo separation, THRES / CEIL saturation
  1365. // inset, the envelope (ATT, REL, SUSTAIN, the two CURVE steppers, PEAK / RMS, REL 2); LMH DEL / LMH MIX; the
  1366. // crossover (LOW / HIGH frequency, 12 / 24 dB slopes) and LOW CUT. The values live in the slot's Maximus state
  1367. // (core/MaximusFx.h stateParams: "Low mode", "Master pre gain", ...).
  1368. Layout l;
  1369. l.fl = "Maximus";
  1370. l.width = 633;
  1371. l.height = 391;
  1372. l.pages = { TR_NOOP ("Low"), TR_NOOP ("Mid"), TR_NOOP ("High"), TR_NOOP ("Master") };
  1373. auto& v = l.items;
  1374. v.push_back (display (8, 4, 181, 181, "maxcurve"));
  1375. v.push_back (display (192, 4, 433, 181, "maxbands"));
  1376. v.push_back (section (2, 205, 248, 183, nullptr, boxed));
  1377. v.push_back (section (252, 205, 176, 183, nullptr, boxed));
  1378. v.push_back (section (430, 205, 67, 183, nullptr, boxed));
  1379. v.push_back (section (499, 205, 132, 183, nullptr, boxed));
  1380. auto bandSelector = pageTabs (4, 209, 70, 99, TR_NOOP ("Low|Mid|High|Master"));
  1381. v.push_back (bandSelector);
  1382. v.push_back (section (142, 294, 106, 74, nullptr, boxed | raised));
  1383. static const char* bandNames[4] { "Low", "Mid", "High", "Master" };
  1384. static std::vector<std::string> names; // "<Band> <control>" (core/MaximusFx.h), kept for the items' pointers
  1385. if (names.empty())
  1386. {
  1387. static const char* controls[13] { "mode", "pre gain", "post gain", "stereo separation", "saturation threshold",
  1388. "saturation ceiling", "attack", "release 2", "attack curve", "release",
  1389. "release curve", "sustain", "envelope mode" };
  1390. names.reserve (52);
  1391. for (const auto* b : bandNames)
  1392. for (const auto* c : controls)
  1393. names.push_back (std::string (b) + " " + c);
  1394. }
  1395. for (int b = 0; b < 4; ++b)
  1396. {
  1397. auto n = [&] (int j) { return names[(std::size_t) (13 * b + j)].c_str(); };
  1398. auto add = [&] (LayoutItem i) { i.colour = b; v.push_back (onPage (std::move (i), b)); };
  1399. add (radio (81, 216, 64, 60, n (0), TR_NOOP ("On|Comp off|Muted|Off")));
  1400. add (knob (169.5f, 243, 42, n (1), TR_NOOP ("Pre"), 272));
  1401. add (knob (223, 243, 42, n (2), TR_NOOP ("Post"), 272));
  1402. add (label (185, 266, 24, 13, TR_NOOP ("Gain"), boxed));
  1403. add (knob (105.5f, 323, 38, n (3), TR_NOOP ("Sep"), 349, bipolar));
  1404. add (knob (168.5f, 322, 36, n (4), TR_NOOP ("Thres"), 349, bipolar));
  1405. add (knob (223, 322, 36, n (5), TR_NOOP ("Ceil"), 349));
  1406. add (label (186, 343, 22, 13, TR_NOOP ("Sat"), boxed));
  1407. add (knob (280.5f, 243, 42, n (6), TR_NOOP ("Att"), 272));
  1408. add (knob (343.5f, 243, 42, n (9), TR_NOOP ("Rel"), 272));
  1409. add (knob (395.5f, 243, 42, n (11), TR_NOOP ("Sustain"), 272));
  1410. add (label (300, 266, 24, 13, TR_NOOP ("Env"), boxed));
  1411. add (stepper (268, 292, 27, 22, n (8), nullptr, 7));
  1412. add (label (296, 297, 34, 13, TR_NOOP ("Curve")));
  1413. add (stepper (331, 292, 27, 22, n (10), nullptr, 7));
  1414. add (radio (368, 292, 46, 30, n (12), TR_NOOP ("Peak|RMS")));
  1415. add (knob (281, 353, 34, n (7), TR_NOOP ("Rel 2"), 377));
  1416. }
  1417. v.push_back (knob (463, 243, 42, "LMH lookahead delay", TR_NOOP ("LMH del"), 272));
  1418. v.push_back (knob (463, 323, 42, "LMH mix", TR_NOOP ("LMH mix"), 349));
  1419. v.push_back (knob (534, 243, 42, "Low band frequency", TR_NOOP ("Low"), 272));
  1420. v.push_back (knob (593, 243, 42, "High band frequency", TR_NOOP ("High"), 272));
  1421. v.push_back (label (551, 266, 25, 13, TR_NOOP ("Freq"), boxed));
  1422. v.push_back (radio (503, 292, 42, 28, "Low band slope", "12dB|24dB"));
  1423. v.push_back (radio (584, 292, 42, 28, "High band slope", "12dB|24dB"));
  1424. v.push_back (knob (538, 349, 34, "Low cut", TR_NOOP ("Low cut"), 377));
  1425. return l;
  1426. }
  1427. Layout vintagePhaser()
  1428. {
  1429. // PHASING (MIN, MAX faders, HQ, MANUAL, FEEDBACK fader) | MODULATION (START PHASE, TYPE switch, L/R PHASE,
  1430. // TENSION, SPEED fader with T) | DELAY (on LED; MIX, STEREO, big TIME with T; FEEDBACK, LP, HP, KEEP PITCH) |
  1431. // LEVELS (NOISE, NOISE GATE, MONO INPUT, MIX fader). The engine's remaining controls (FL keeps them out of the
  1432. // panel; where FL shows them is not confirmed) are on a second page.
  1433. Layout l;
  1434. l.fl = "Vintage Phaser";
  1435. l.width = 754;
  1436. l.height = 214;
  1437. l.pages = { TR_NOOP ("Main"), TR_NOOP ("Advanced") };
  1438. auto& v = l.items;
  1439. v.push_back (pageTabs (13, 14, 120, 20, TR_NOOP ("Main|Advanced")));
  1440. v.push_back (label (420, 6, 326, 34, "Vintage Phaser", dim));
  1441. auto main = [&] (LayoutItem i) { v.push_back (onPage (std::move (i), 0)); };
  1442. auto fader = [&] (float x, const char* param, const char* caption) {
  1443. main (slider (Item::vslider, x - 10, 72, 20, 104, param, nullptr, noCaption));
  1444. main (label (x - 24, 180, 48, 12, caption));
  1445. };
  1446. main (section (13, 45, 162, 165, TR_NOOP ("Phasing")));
  1447. fader (38, "Min freq.", TR_NOOP ("Min"));
  1448. fader (71, "Max freq.", TR_NOOP ("Max"));
  1449. main (toggle (95, 132, 20, 12, "HQ", nullptr));
  1450. main (label (88, 146, 34, 11, TR_NOOP ("HQ")));
  1451. main (toggle (95, 164, 20, 12, "Manual", nullptr));
  1452. main (label (82, 180, 46, 12, TR_NOOP ("Manual")));
  1453. fader (143, "Feedback", TR_NOOP ("Feedback"));
  1454. main (section (181, 45, 209, 165, TR_NOOP ("Modulation")));
  1455. main (knob (220, 92, 30, "Start phase", TR_NOOP ("Start phase"), 124));
  1456. main (radio (256, 76, 52, 30, "Sine", TR_NOOP ("Triangle|Sine")));
  1457. main (label (252, 112, 50, 12, TR_NOOP ("Type")));
  1458. main (knob (220, 157, 30, "L/R phase", TR_NOOP ("L/R phase"), 186));
  1459. main (knob (281, 157, 30, "Tension", TR_NOOP ("Tension"), 186));
  1460. fader (348, "LFO speed", TR_NOOP ("Speed"));
  1461. main (toggle (364, 180, 14, 12, "Tempo sync", "T", boxed));
  1462. main (section (396, 45, 217, 165, TR_NOOP ("Delay")));
  1463. main (toggle (582, 49, 20, 10, "Delay", nullptr));
  1464. main (knob (428, 92, 30, "Delay mix", TR_NOOP ("Mix"), 124));
  1465. main (knob (472, 92, 30, "Delay stereo", TR_NOOP ("Stereo"), 124, bipolar));
  1466. main (knob (548, 100, 44, "Delay time", TR_NOOP ("Time"), 136, big));
  1467. main (toggle (576, 130, 14, 12, "Delay sync", "T", boxed));
  1468. main (knob (428, 157, 30, "Delay fdbk", TR_NOOP ("Feedback"), 186));
  1469. main (knob (472, 157, 30, "Delay LP", TR_NOOP ("LP"), 186));
  1470. main (knob (527, 157, 30, "Delay HP", TR_NOOP ("HP"), 186));
  1471. main (toggle (562, 164, 20, 12, "Keep pitch", nullptr));
  1472. main (label (550, 180, 56, 12, TR_NOOP ("Keep pitch")));
  1473. main (section (619, 45, 119, 165, TR_NOOP ("Levels")));
  1474. main (knob (654, 90, 28, "Noise", TR_NOOP ("Noise"), 120));
  1475. main (toggle (644, 134, 20, 12, "Gate", nullptr));
  1476. main (label (626, 148, 56, 11, TR_NOOP ("Noise gate")));
  1477. main (toggle (644, 164, 20, 12, "Mono input", nullptr));
  1478. main (label (626, 180, 56, 12, TR_NOOP ("Mono input")));
  1479. fader (708, "Mix", TR_NOOP ("Mix"));
  1480. // second page: the engine's other controls
  1481. auto adv = [&] (int k, const char* param, const char* caption, std::uint16_t style = 0) {
  1482. const auto cx = 50.0f + 92.0f * (float) (k % 8), cy = 82.0f + 70.0f * (float) (k / 8);
  1483. v.push_back (onPage (knob (cx, cy, 34, param, caption, cy + 26, style | showValue), 1));
  1484. };
  1485. v.push_back (onPage (section (13, 45, 725, 165, nullptr, boxed), 1));
  1486. adv (0, "Manual freq.", TR_NOOP ("Manual freq."));
  1487. adv (1, "Rate 1", TR_NOOP ("Rate 1"));
  1488. adv (2, "Rate 2", TR_NOOP ("Rate 2"));
  1489. adv (3, "Depth scale", TR_NOOP ("Depth scale"));
  1490. adv (4, "Pull-down", TR_NOOP ("Pull-down"));
  1491. adv (5, "Drive", TR_NOOP ("Drive"), bipolar);
  1492. adv (6, "Colour gain", TR_NOOP ("Colour gain"));
  1493. adv (7, "Colour freq.", TR_NOOP ("Colour freq."));
  1494. adv (8, "Input HP", TR_NOOP ("Input HP"));
  1495. adv (9, "Fdbk HP", TR_NOOP ("Feedback HP"));
  1496. v.push_back (onPage (toggle (230, 140, 110, 14, "Engine V2", TR_NOOP ("Engine V2")), 1));
  1497. v.push_back (onPage (toggle (230, 166, 110, 14, "Invert fdbk", TR_NOOP ("Invert feedback")), 1));
  1498. return l;
  1499. }
  1500. Layout soundgoodizer()
  1501. {
  1502. // one big Amount knob and the four presets A–D (the slot's state, core/MaximusFx.h)
  1503. Layout l;
  1504. l.fl = "Soundgoodizer";
  1505. l.width = 215;
  1506. l.height = 300;
  1507. auto& v = l.items;
  1508. v.push_back (label (10, 6, 195, 36, "Soundgoodizer", dim));
  1509. v.push_back (display (28, 64, 152, 152, "sgamount"));
  1510. v.push_back (display (14, 228, 186, 50, "sgpresets"));
  1511. return l;
  1512. }
  1513. #include "core/PluginLayoutFx.inc"
  1514. // --- generated layouts ------------------------------------------------------------------------------
  1515. // --- LYNX originals: the mixing suite (REA round 96). Not FL arrangements: LYNX's own panels, laid out with the
  1516. // same conventions (titled sections, knobs with captions and read-outs, the graph on top, switches as tabs). -------
  1517. // a knob with its caption and its value under it (`d` wide, centred at cx, cy)
  1518. LayoutItem dial (float cx, float cy, float d, const char* param, const char* caption, std::uint16_t style = 0)
  1519. {
  1520. return knob (cx, cy, d, param, caption, cy + d * 0.5f + 20.0f, (std::uint16_t) (style | showValue));
  1521. }
  1522. // a live meter of the effect's control output `output` (0 = gain reduction, 1 = second gain reduction)
  1523. LayoutItem meter (float x, float y, float w, float h, int output, const char* caption)
  1524. {
  1525. auto i = display (x, y, w, h, "grmeter");
  1526. i.steps = output;
  1527. i.label = caption;
  1528. return i;
  1529. }
  1530. Layout ridgeStrip()
  1531. {
  1532. // round 114: the classic console channel strip's layout (the role: Waves SSL E-Channel, measured on the official
  1533. // trial): two columns read top to bottom. Left: FILTERS, then the four EQ bands HF, HMF, LMF, LF (gain on the
  1534. // left, frequency in the middle, Q / bell on the right), the EQ curve under them. Right: DYNAMICS (the
  1535. // compressor, then the expander / gate, their gain-reduction meters), the routing (EQ and dynamics in, order,
  1536. // filters to the side chain), and the GAIN block (input, phase, output) at the bottom.
  1537. Layout l;
  1538. l.width = 560;
  1539. l.height = 716;
  1540. auto& v = l.items;
  1541. // --- left column: filters and EQ
  1542. v.push_back (section (4, 4, 276, 104, TR_NOOP ("Filters")));
  1543. v.push_back (dial (54, 50, 36, "HPF", TR_NOOP ("High-pass")));
  1544. v.push_back (dial (140, 50, 36, "LPF", TR_NOOP ("Low-pass")));
  1545. // round 165: the old "filters to the side chain" switch only shows while it is on (older projects); the side chain
  1546. // now takes the filters and the EQ together ("EQ to SC", the Dynamics section), as on the reference
  1547. v.push_back (when (toggle (186, 40, 88, 20, "Filters to SC", TR_NOOP ("To sidechain")), "Filters to SC", 0.5f, 1.0f));
  1548. // round 123: the E voicing's filter split (filters before the dynamics); round 165: only where it acts
  1549. v.push_back (when (when (toggle (186, 66, 88, 20, "Filter split", TR_NOOP ("Split")), "4K voicing", 0.0f, 0.5f), "Voicing", 0.5f, 1.0f));
  1550. const char* names[] = { TR_NOOP ("HF"), TR_NOOP ("HMF"), TR_NOOP ("LMF"), TR_NOOP ("LF") };
  1551. const char* gains[] = { "HF gain", "HMF gain", "LMF gain", "LF gain" };
  1552. const char* freqs[] = { "HF freq.", "HMF freq.", "LMF freq.", "LF freq." };
  1553. const char* extra[] = { "HF bell", "HMF Q", "LMF Q", "LF bell" };
  1554. for (int b = 0; b < 4; ++b)
  1555. {
  1556. const auto y = 112.0f + 102.0f * (float) b;
  1557. v.push_back (section (4, y, 276, 98, names[b]));
  1558. v.push_back (dial (54, y + 44.0f, 36, gains[b], TR_NOOP ("Gain"), bipolar));
  1559. v.push_back (dial (140, y + 44.0f, 36, freqs[b], TR_NOOP ("Freq")));
  1560. if (b == 1 || b == 2)
  1561. v.push_back (dial (226, y + 44.0f, 30, extra[b], TR_NOOP ("Q")));
  1562. else
  1563. v.push_back (toggle (194, y + 34.0f, 72, 20, extra[b], TR_NOOP ("Bell")));
  1564. }
  1565. v.push_back (section (4, 520, 276, 192, TR_NOOP ("Equalizer")));
  1566. v.push_back (display (10, 540, 264, 118, "ridgeeq"));
  1567. // round 165: the Brown / Black curves are Ridge's own engine's (the E console voicing has the console's one curve)
  1568. v.push_back (when (when (tabs (10, 664, 150, 20, "EQ curve", TR_NOOP ("Brown|Black")), "4K voicing", 0.0f, 0.5f), "Voicing", 0.0f, 0.5f));
  1569. // round 148: the 4K voicing (the console measured on the SSL 4K E trial) — its three EQ colours, the mic pre and
  1570. // its gain, the make-up offset; the rest of the panel drives it with the console's own scales
  1571. v.push_back (when (tabs (10, 664, 150, 20, "EQ colour", TR_NOOP ("Brown|Black|Orange")), "4K voicing", 0.5f, 1.0f));
  1572. v.push_back (toggle (170, 688, 104, 20, "4K voicing", TR_NOOP ("4K console")));
  1573. v.push_back (when (dial (432, 52, 24, "Make-up offset", TR_NOOP ("Offset"), bipolar), "4K voicing", 0.5f, 1.0f));
  1574. v.push_back (when (toggle (384, 540, 70, 20, "Mic pre", TR_NOOP ("Mic pre")), "4K voicing", 0.5f, 1.0f));
  1575. v.push_back (when (dial (504, 548, 24, "Mic gain", TR_NOOP ("Mic")), "4K voicing", 0.5f, 1.0f));
  1576. v.push_back (toggle (170, 664, 104, 20, "EQ on", TR_NOOP ("EQ in")));
  1577. // round 123: the voicing — Ridge's own engine, or the measured E-type console (substitutes start there)
  1578. v.push_back (tabs (10, 688, 150, 20, "Voicing", TR_NOOP ("Classic|E console")));
  1579. // --- right column: dynamics, routing, gain
  1580. v.push_back (section (284, 4, 272, 236, TR_NOOP ("Compressor")));
  1581. v.push_back (display (290, 24, 120, 70, "ridgecomp"));
  1582. v.push_back (dial (480, 62, 46, "Comp. threshold", TR_NOOP ("Threshold"), big));
  1583. v.push_back (dial (330, 150, 32, "Ratio", TR_NOOP ("Ratio")));
  1584. v.push_back (dial (410, 150, 32, "Comp. release", TR_NOOP ("Release")));
  1585. v.push_back (dial (490, 150, 28, "Comp. mix", TR_NOOP ("Mix")));
  1586. v.push_back (toggle (296, 206, 110, 20, "Fast attack", TR_NOOP ("Fast attack")));
  1587. v.push_back (toggle (414, 206, 136, 20, "Auto make-up", TR_NOOP ("Auto make-up"))); // round 147b: the console's
  1588. v.push_back (section (284, 244, 272, 196, TR_NOOP ("Expander / gate")));
  1589. v.push_back (dial (480, 296, 46, "Gate threshold", TR_NOOP ("Threshold"), big));
  1590. v.push_back (dial (330, 290, 32, "Gate range", TR_NOOP ("Range")));
  1591. v.push_back (dial (330, 370, 32, "Gate release", TR_NOOP ("Release")));
  1592. v.push_back (toggle (396, 380, 70, 20, "Gate fast", TR_NOOP ("Fast")));
  1593. v.push_back (tabs (396, 408, 154, 20, "Expander", TR_NOOP ("Gate|Expand")));
  1594. // round 165: the reference's two LED ladders (compressor, expander / gate: 3 … 20 dB of reduction) on the left, the
  1595. // routing on the right — the dynamics in, where they sit (before / after the EQ), the EQ into their side chain
  1596. v.push_back (section (284, 444, 272, 132, TR_NOOP ("Dynamics")));
  1597. {
  1598. auto comp = display (292, 462, 30, 108, "grleds");
  1599. comp.steps = 0;
  1600. comp.label = TR_NOOP ("Comp");
  1601. v.push_back (comp);
  1602. auto gate = display (326, 462, 30, 108, "grleds");
  1603. gate.steps = 1;
  1604. gate.label = TR_NOOP ("Exp");
  1605. v.push_back (gate);
  1606. }
  1607. v.push_back (toggle (366, 464, 84, 20, "Dynamics on", TR_NOOP ("Dyn in")));
  1608. v.push_back (toggle (456, 464, 92, 20, "Analog", TR_NOOP ("Analog"))); // round 147b: the console emulation's colour
  1609. v.push_back (tabs (366, 494, 182, 20, "Order", TR_NOOP ("EQ>Dyn|Dyn>EQ")));
  1610. v.push_back (when (toggle (366, 524, 182, 20, "EQ to SC", TR_NOOP ("EQ to side chain")), "4K voicing", 0.0f, 0.5f));
  1611. // the GAIN block (round 129, the reference's): input trim and phase, the output fader beside the input / output
  1612. // level meter with its peak read-outs
  1613. v.push_back (section (284, 580, 272, 132, TR_NOOP ("Gain")));
  1614. v.push_back (dial (322, 628, 36, "Input", TR_NOOP ("Input"), bipolar));
  1615. v.push_back (toggle (294, 682, 56, 20, "Phase", TR_NOOP ("Phase")));
  1616. v.push_back (slider (Item::vslider, 370, 600, 34, 106, "Output", TR_NOOP ("Output")));
  1617. v.push_back (display (420, 598, 130, 110, "iometer"));
  1618. return l;
  1619. }
  1620. Layout compressorLayout()
  1621. {
  1622. // round 129: LYNX's basic compressor in the role of the Waves Renaissance Compressor (docs/PARITY.md; the official
  1623. // trial's panel): the threshold fader beside the input / output meters, the gain-reduction meter in the middle with
  1624. // the ratio under it, the make-up gain fader on the right, attack and release along the bottom
  1625. Layout l;
  1626. l.width = 420;
  1627. l.height = 300;
  1628. auto& v = l.items;
  1629. v.push_back (section (4, 4, 412, 292, TR_NOOP ("Compressor")));
  1630. v.push_back (slider (Item::vslider, 16, 30, 34, 172, "Threshold", TR_NOOP ("Threshold")));
  1631. v.push_back (display (58, 26, 112, 180, "iometer"));
  1632. // round 152: RComp's bipolar gain-change meter (reduction down, the expansion's boost up), the held change under it
  1633. v.push_back (display (184, 26, 66, 180, "gcmeter"));
  1634. // round 150: with the RComp ranges the RC controls take the places of LYNX's (gain −30 … +30, ratio 0.5 … 50 : 1,
  1635. // attack 0.5 … 500 ms, release 5 … 5000 ms)
  1636. v.push_back (when (slider (Item::vslider, 268, 30, 34, 172, "Makeup", TR_NOOP ("Gain")), "Ranges", 0.0f, 0.5f));
  1637. v.push_back (when (slider (Item::vslider, 268, 30, 34, 172, "RC gain", TR_NOOP ("Gain")), "Ranges", 0.5f, 1.0f));
  1638. v.push_back (toggle (314, 30, 94, 20, "Auto gain", TR_NOOP ("Auto gain")));
  1639. // round 123: the voicing — LYNX's classic compressor, or the measured program-dependent one (substitutes start there)
  1640. v.push_back (tabs (314, 60, 94, 40, "Voicing", TR_NOOP ("Classic|Vintage")));
  1641. // round 135w: the reference's ARC / Manual, Electro / Opto and Warm / Smooth switches (the vintage voicing's), and
  1642. // its output limiter with the activity pill
  1643. v.push_back (when (tabs (314, 108, 94, 20, "Release mode", TR_NOOP ("ARC|Manual")), "Voicing", 0.5f, 1.0f));
  1644. v.push_back (when (tabs (314, 132, 94, 20, "Release curve", TR_NOOP ("Electro|Opto")), "Voicing", 0.5f, 1.0f));
  1645. v.push_back (when (tabs (314, 156, 94, 20, "Character", TR_NOOP ("Warm|Smooth")), "Voicing", 0.5f, 1.0f));
  1646. v.push_back (toggle (314, 182, 94, 20, "Limiter", TR_NOOP ("Limiter")));
  1647. v.push_back (display (330, 206, 62, 12, "limitpill"));
  1648. v.push_back (when (dial (60, 252, 34, "Attack", TR_NOOP ("Attack")), "Ranges", 0.0f, 0.5f));
  1649. v.push_back (when (dial (140, 252, 34, "Release", TR_NOOP ("Release")), "Ranges", 0.0f, 0.5f));
  1650. v.push_back (when (dial (217, 252, 34, "Ratio", TR_NOOP ("Ratio")), "Ranges", 0.0f, 0.5f));
  1651. v.push_back (when (dial (60, 252, 34, "RC attack", TR_NOOP ("Attack")), "Ranges", 0.5f, 1.0f));
  1652. v.push_back (when (dial (140, 252, 34, "RC release", TR_NOOP ("Release")), "Ranges", 0.5f, 1.0f));
  1653. v.push_back (when (dial (217, 252, 34, "RC ratio", TR_NOOP ("Ratio")), "Ranges", 0.5f, 1.0f));
  1654. v.push_back (tabs (318, 7, 90, 16, "Ranges", TR_NOOP ("LYNX|RComp")));
  1655. // round 152: the vintage voicing's static curve — measured at every ratio (new instances) or round 150's (older projects)
  1656. v.push_back (when (tabs (12, 7, 104, 16, "Vintage curve", TR_NOOP ("Old|Measured")), "Voicing", 0.5f, 1.0f));
  1657. v.push_back (dial (300, 252, 30, "Mix", TR_NOOP ("Mix")));
  1658. v.push_back (dial (370, 252, 30, "Trim", TR_NOOP ("Trim"), bipolar));
  1659. return l;
  1660. }
  1661. Layout glowLeveler()
  1662. {
  1663. // round 114: the optical levelers' classic front panel (the role: Waves CLA-2A / LA-2A): GAIN on the left, PEAK
  1664. // REDUCTION on the right, the VU meter between them, the COMPRESS / LIMIT switch under the meter.
  1665. // Round 129 (docs/PARITY.md, the official trial's panel): the VU DISPLAY selector (input / GR / output) top right,
  1666. // AUTO MAKEUP under it, and the bottom strip of the reference — HF emphasis (its HI FREQ), MIX, TRIM
  1667. Layout l;
  1668. l.width = 540;
  1669. l.height = 300;
  1670. auto& v = l.items;
  1671. v.push_back (section (4, 4, 532, 292, TR_NOOP ("Optical leveler")));
  1672. v.push_back (dial (86, 124, 92, "Gain", TR_NOOP ("Gain"), big));
  1673. v.push_back (dial (454, 124, 92, "Peak reduction", TR_NOOP ("Peak reduction"), big));
  1674. auto vu = display (170, 40, 200, 136, "vumeter");
  1675. vu.steps = 0; // live output 0: gain reduction
  1676. v.push_back (vu);
  1677. v.push_back (display (392, 22, 136, 18, "vusel"));
  1678. v.push_back (tabs (200, 184, 140, 22, "Limit", TR_NOOP ("Compress|Limit")));
  1679. v.push_back (toggle (404, 206, 120, 20, "Auto makeup", TR_NOOP ("Auto makeup")));
  1680. // round 123: the voicing — Glow's own engine, or the measured classic opto leveler (substitutes start there)
  1681. v.push_back (tabs (12, 206, 160, 22, "Voicing", TR_NOOP ("Modern|Opto classic")));
  1682. // round 152: the reference's ANALOG buttons (hum and noise, measured) bottom left, and the opto law of the classic
  1683. // voicing (Old = a project saved before round 152: the round-123 Limit, no auto make-up there)
  1684. v.push_back (label (12, 236, 120, 12, TR_NOOP ("Analog")));
  1685. v.push_back (tabs (12, 250, 120, 20, "Analog", TR_NOOP ("Off|50 Hz|60 Hz"), { 0.0f, 0.5f, 1.0f }));
  1686. v.push_back (when (tabs (12, 26, 130, 18, "Opto law", TR_NOOP ("Old|Measured")), "Voicing", 0.5f, 1.0f));
  1687. // round 165w: the classic voicing's release (Measured = the trial's gain recovery; Old = round 123's slower tail, kept
  1688. // by a project saved before), right, under the VU selector
  1689. v.push_back (when (label (392, 46, 136, 10, TR_NOOP ("Release")), "Voicing", 0.5f, 1.0f));
  1690. v.push_back (when (tabs (392, 57, 136, 16, "Opto release", TR_NOOP ("Old|Measured")), "Voicing", 0.5f, 1.0f));
  1691. v.push_back (dial (170, 254, 28, "Emphasis", TR_NOOP ("HF emphasis")));
  1692. v.push_back (dial (270, 254, 28, "Mix", TR_NOOP ("Mix")));
  1693. v.push_back (dial (370, 254, 28, "Trim", TR_NOOP ("Trim"), bipolar));
  1694. return l;
  1695. }
  1696. Layout hushDeEsser()
  1697. {
  1698. Layout l;
  1699. l.width = 460;
  1700. l.height = 316;
  1701. auto& v = l.items;
  1702. v.push_back (section (4, 4, 452, 308, TR_NOOP ("De-esser")));
  1703. v.push_back (display (12, 26, 200, 78, "hushband"));
  1704. v.push_back (meter (12, 110, 200, 12, 0, TR_NOOP ("Reduction")));
  1705. v.push_back (tabs (12, 130, 98, 20, "Wideband", TR_NOOP ("Split|Wide")));
  1706. v.push_back (tabs (114, 130, 98, 20, "Band detector", TR_NOOP ("High|Band")));
  1707. v.push_back (toggle (12, 162, 84, 20, "Listen", TR_NOOP ("Listen")));
  1708. v.push_back (toggle (100, 162, 112, 20, "Lookahead", TR_NOOP ("Lookahead")));
  1709. // round 123: the voicing — Hush's own engine, or the measured classic split de-esser (substitutes start there)
  1710. v.push_back (tabs (12, 192, 200, 20, "Voicing", TR_NOOP ("Modern|Classic split")));
  1711. v.push_back (dial (262, 58, 46, "Frequency", TR_NOOP ("Frequency"), big));
  1712. v.push_back (dial (338, 58, 46, "Threshold", TR_NOOP ("Threshold"), big));
  1713. v.push_back (dial (412, 58, 40, "Range", TR_NOOP ("Range")));
  1714. v.push_back (dial (300, 142, 32, "Release", TR_NOOP ("Release")));
  1715. v.push_back (dial (376, 142, 32, "Output", TR_NOOP ("Output"), bipolar));
  1716. // round 165w: the reference's input / output pan (balance)
  1717. v.push_back (dial (240, 142, 28, "Input pan", TR_NOOP ("In pan"), bipolar));
  1718. v.push_back (dial (430, 142, 28, "Output pan", TR_NOOP ("Out pan"), bipolar));
  1719. // round 128: the reference de-esser's other controls
  1720. v.push_back (tabs (12, 222, 200, 20, "Allround", TR_NOOP ("Single vocal|Allround")));
  1721. v.push_back (toggle (12, 252, 64, 20, "Link mid", TR_NOOP ("Mid (M/S)")));
  1722. v.push_back (toggle (80, 252, 64, 20, "External SC", TR_NOOP ("Ext")));
  1723. v.push_back (toggle (148, 252, 64, 20, "Display", TR_NOOP ("Display")));
  1724. v.push_back (dial (250, 228, 30, "Low-pass freq.", TR_NOOP ("Low pass")));
  1725. v.push_back (dial (310, 228, 30, "Lookahead time", TR_NOOP ("Lookahead")));
  1726. v.push_back (dial (370, 228, 30, "Stereo link", TR_NOOP ("Stereo link")));
  1727. v.push_back (dial (430, 228, 30, "Input", TR_NOOP ("Input"), bipolar));
  1728. // round 135: oversampling (Hush's own voicing)
  1729. v.push_back (label (12, 286, 90, 20, TR_NOOP ("Oversampling")));
  1730. v.push_back (tabs (104, 286, 176, 20, "Oversampling", TR_NOOP ("Off|2x|4x|8x")));
  1731. // round 148: the measured single-vocal detector (the role: a vocal de-esser's Single Vocal mode)
  1732. v.push_back (toggle (290, 286, 158, 20, "Vocal voicing", TR_NOOP ("Vocal detector")));
  1733. return l;
  1734. }
  1735. Layout aetherLayout()
  1736. {
  1737. // round 114: the "air" processors' front panel (the role: Slate Digital Fresh Air), from the official product page:
  1738. // two big knobs side by side — the presence / exciter one (MID) on the left, the high shelf (HIGH) on the right —
  1739. // and the output trim between them; LYNX's extra settings (frequencies, character, mix) small under each
  1740. Layout l;
  1741. l.width = 530;
  1742. l.height = 270;
  1743. auto& v = l.items;
  1744. v.push_back (section (4, 4, 432, 262, TR_NOOP ("Air")));
  1745. // round 124: the dynamic air model (Dynamic on) has its own two amounts
  1746. v.push_back (section (440, 4, 86, 262, TR_NOOP ("Dynamic")));
  1747. v.push_back (toggle (446, 26, 74, 24, "Dynamic", TR_NOOP ("Dynamic")));
  1748. v.push_back (dial (483, 100, 30, "Mid air", TR_NOOP ("Mid air")));
  1749. v.push_back (dial (483, 186, 30, "High air", TR_NOOP ("High air")));
  1750. v.push_back (dial (104, 96, 104, "Harmonics", TR_NOOP ("Mid air"), big));
  1751. v.push_back (dial (336, 96, 104, "Air", TR_NOOP ("High air"), big));
  1752. v.push_back (dial (220, 120, 40, "Output", TR_NOOP ("Trim"), bipolar));
  1753. v.push_back (dial (66, 222, 26, "Exciter freq.", TR_NOOP ("Freq")));
  1754. v.push_back (dial (142, 222, 26, "Character", TR_NOOP ("Even / odd"), bipolar));
  1755. v.push_back (dial (220, 222, 26, "Mix", TR_NOOP ("Mix")));
  1756. v.push_back (dial (336, 222, 26, "Air freq.", TR_NOOP ("Freq")));
  1757. return l;
  1758. }
  1759. // round 136: Ember's Classic voicing (core/EmberClassic.h) — with Voicing on, Ember's own controls hide and the
  1760. // Classic ones (the reference's laws and texts) show; added around emberLayout() so that layout stays as it is.
  1761. // Round 165 (REA_rodada165ha §3): the reference's one-screen arrangement in LYNX's widgets — Punish top left, the VU
  1762. // (output level) top centre, Output with its Auto link top right, the big Drive left, Low cut (+ Thump), Tone,
  1763. // High cut (+ Steep) and Mix in a row, the five styles one click each along the bottom
  1764. Layout withEmberClassic (Layout l)
  1765. {
  1766. // every item of Ember's own page hides in Classic (round 165: also the band rows, which carry their own condition)
  1767. for (auto& it : l.items)
  1768. if (it.whenParam == nullptr || it.when2Param == nullptr)
  1769. it = when (it, "Voicing", 0.0f, 0.5f);
  1770. auto add = [&l] (LayoutItem it) { l.items.push_back (when (it, "Voicing", 0.5f, 1.0f)); };
  1771. add (section (4, 4, 512, 432, TR_NOOP ("Classic")));
  1772. add (toggle (24, 44, 104, 28, "Classic punish", TR_NOOP ("Punish")));
  1773. auto vu = display (152, 28, 216, 136, "vumeter");
  1774. vu.steps = 0;
  1775. add (vu);
  1776. add (dial (434, 84, 56, "Classic output", TR_NOOP ("Output")));
  1777. add (toggle (400, 156, 68, 20, "Classic auto", TR_NOOP ("Auto")));
  1778. add (dial (86, 222, 104, "Classic drive", TR_NOOP ("Drive"), big));
  1779. add (dial (204, 268, 50, "Classic low cut", TR_NOOP ("Low cut")));
  1780. add (dial (300, 268, 50, "Classic tone", TR_NOOP ("Tone"), bipolar));
  1781. add (dial (396, 268, 50, "Classic high cut", TR_NOOP ("High cut")));
  1782. add (dial (474, 222, 50, "Classic mix", TR_NOOP ("Mix")));
  1783. add (toggle (168, 336, 72, 20, "Classic thump", TR_NOOP ("Thump")));
  1784. add (toggle (360, 336, 72, 20, "Classic steep", TR_NOOP ("Steep")));
  1785. add (label (24, 368, 280, 14, TR_NOOP ("Style")));
  1786. add (tabs (24, 384, 300, 32, "Classic style", TR_NOOP ("A|E|N|T|P")));
  1787. // projects saved before round 165 keep round 136's Punish until switched to the measured law
  1788. add (when (tabs (344, 360, 152, 20, "Classic law", TR_NOOP ("Old|Measured")), "Classic law", 0.0f, 0.5f));
  1789. add (toggle (344, 392, 152, 24, "Voicing", TR_NOOP ("Classic")));
  1790. return l;
  1791. }
  1792. Layout emberLayout()
  1793. {
  1794. Layout l;
  1795. l.width = 520;
  1796. l.height = 230;
  1797. auto& v = l.items;
  1798. v.push_back (section (4, 4, 200, 222, TR_NOOP ("Style")));
  1799. v.push_back (display (12, 26, 184, 110, "embercurve"));
  1800. auto styles = radio (12, 144, 184, 76, "Style", TR_NOOP ("Tube|Tape|Transistor|Fuzz"));
  1801. styles.columns = 2;
  1802. v.push_back (styles);
  1803. v.push_back (section (208, 4, 308, 222, TR_NOOP ("Drive")));
  1804. v.push_back (dial (266, 86, 70, "Drive", TR_NOOP ("Drive"), big));
  1805. v.push_back (dial (380, 60, 36, "Tone", TR_NOOP ("Tone"), bipolar));
  1806. v.push_back (dial (460, 60, 36, "Mix", TR_NOOP ("Mix")));
  1807. v.push_back (dial (340, 148, 30, "Low cut", TR_NOOP ("Low cut")));
  1808. v.push_back (dial (410, 148, 30, "High cut", TR_NOOP ("High cut")));
  1809. v.push_back (dial (480, 148, 30, "Output", TR_NOOP ("Output"), bipolar));
  1810. v.push_back (toggle (216, 200, 104, 20, "Auto gain", TR_NOOP ("Auto gain")));
  1811. v.push_back (tabs (340, 200, 168, 20, "Oversampling", TR_NOOP ("2x|4x|8x"), { 0.0f, 0.5f, 1.0f }));
  1812. // multiband mode (round 108): crossovers and a style / drive / mix / level row per band (band 1 = the controls
  1813. // above); the band rows only show with more than one band
  1814. l.height = 440;
  1815. v.push_back (section (4, 234, 512, 202, TR_NOOP ("Bands")));
  1816. v.push_back (display (12, 254, 236, 64, "emberbands"));
  1817. v.push_back (tabs (12, 324, 236, 20, "Bands", TR_NOOP ("1 band|2|3|4")));
  1818. v.push_back (tabs (12, 350, 236, 20, "Crossover slope", TR_NOOP ("12 dB/oct|24 dB/oct|48 dB/oct"), { 0.0f, 0.5f, 1.0f }));
  1819. v.push_back (dial (50, 392, 22, "Crossover 1", TR_NOOP ("Low")));
  1820. v.push_back (dial (130, 392, 22, "Crossover 2", TR_NOOP ("Mid")));
  1821. v.push_back (dial (210, 392, 22, "Crossover 3", TR_NOOP ("High")));
  1822. static const char* heads[4] { TR_NOOP ("Style"), TR_NOOP ("Drive"), TR_NOOP ("Mix"), TR_NOOP ("Level") };
  1823. for (int c = 0; c < 4; ++c)
  1824. {
  1825. auto h = label (300.0f + 56.0f * (float) c - 26.0f, 254, 52, 14, heads[c]);
  1826. h.whenParam = "Bands";
  1827. h.whenMin = 0.17f;
  1828. v.push_back (h);
  1829. }
  1830. static const char* rows[4][4] { { nullptr, nullptr, "B1 mix", "B1 level" },
  1831. { "B2 style", "B2 drive", "B2 mix", "B2 level" },
  1832. { "B3 style", "B3 drive", "B3 mix", "B3 level" },
  1833. { "B4 style", "B4 drive", "B4 mix", "B4 level" } };
  1834. static const char* rowNames[4] { TR_NOOP ("B1"), TR_NOOP ("B2"), TR_NOOP ("B3"), TR_NOOP ("B4") };
  1835. for (int b = 0; b < 4; ++b)
  1836. {
  1837. const auto cy = 290.0f + 38.0f * (float) b;
  1838. auto name = label (256, cy - 8.0f, 24, 16, rowNames[b]);
  1839. name.whenParam = "Bands";
  1840. name.whenMin = b == 0 ? 0.17f : 0.17f + 0.333f * (float) (b - 1);
  1841. name.colour = b;
  1842. v.push_back (name);
  1843. for (int c = 0; c < 4; ++c)
  1844. {
  1845. if (rows[b][c] == nullptr)
  1846. continue;
  1847. auto k = knob (300.0f + 56.0f * (float) c, cy, 22, rows[b][c], nullptr, cy + 11.0f, noCaption | (c == 3 ? bipolar : 0), c == 0 ? 4 : 0);
  1848. k.whenParam = "Bands";
  1849. k.whenMin = name.whenMin;
  1850. v.push_back (k);
  1851. }
  1852. }
  1853. // round 128 (Saturn parity): the input gain and each band's power, solo / mute, tone, feedback and dynamics
  1854. v.push_back (dial (250, 162, 20, "Input", TR_NOOP ("Input"), bipolar));
  1855. l.height = 640;
  1856. v.push_back (section (4, 440, 512, 196, TR_NOOP ("Band character")));
  1857. static const char* extraHeads[] { TR_NOOP ("On"), TR_NOOP ("Solo / mute"), TR_NOOP ("Bass"), TR_NOOP ("Mid"), TR_NOOP ("Treble"),
  1858. TR_NOOP ("Presence"), TR_NOOP ("Feedback"), TR_NOOP ("Freq"), TR_NOOP ("Dynamics") };
  1859. static const float extraX[] { 54.0f, 84.0f, 186.0f, 230.0f, 274.0f, 318.0f, 372.0f, 420.0f, 472.0f };
  1860. for (int c = 0; c < 9; ++c)
  1861. v.push_back (label (extraX[c] - (c == 1 ? 0.0f : 24.0f), 458, c == 1 ? 72.0f : 48.0f, 14, extraHeads[c]));
  1862. static const char* extraFieldNames[] { "on", "state", "bass", "mid", "treble", "presence", "feedback", "fb freq.", "dynamics" };
  1863. static std::array<std::array<std::array<char, 24>, 9>, 4> extraNames {};
  1864. for (int b = 0; b < 4; ++b)
  1865. {
  1866. const auto cy = 492.0f + 36.0f * (float) b;
  1867. auto name = label (12, cy - 8.0f, 24, 16, rowNames[b]);
  1868. name.colour = b;
  1869. if (b > 0)
  1870. {
  1871. name.whenParam = "Bands";
  1872. name.whenMin = 0.17f + 0.333f * (float) (b - 1);
  1873. }
  1874. v.push_back (name);
  1875. for (int c = 0; c < 9; ++c)
  1876. {
  1877. auto& n = extraNames[(std::size_t) b][(std::size_t) c];
  1878. std::snprintf (n.data(), n.size(), "B%d %s", b + 1, extraFieldNames[c]);
  1879. LayoutItem item;
  1880. if (c == 0) item = toggle (extraX[0] - 14.0f, cy - 9.0f, 28, 18, n.data(), nullptr);
  1881. else if (c == 1) item = tabs (extraX[1], cy - 9.0f, 90, 18, n.data(), TR_NOOP ("-|S|M"), { 0.0f, 0.5f, 1.0f });
  1882. else item = knob (extraX[c], cy, 20, n.data(), nullptr, cy + 10.0f, noCaption | (c >= 2 && c <= 5 ? bipolar : 0) | (c == 8 ? bipolar : 0));
  1883. if (b > 0)
  1884. {
  1885. item.whenParam = "Bands";
  1886. item.whenMin = name.whenMin;
  1887. }
  1888. v.push_back (item);
  1889. }
  1890. }
  1891. // round 135: the Decapitator role's voicing row, switches and the wide filter ranges
  1892. l.height = 760;
  1893. v.push_back (section (4, 640, 512, 116, TR_NOOP ("Voicing")));
  1894. v.push_back (tabs (12, 664, 496, 20, "Voice", TR_NOOP ("Style menu|Tape pre|Console|Grit|Triode|Pentode"), { 0.0f, 0.2f, 0.4f, 0.6f, 0.8f, 1.0f }));
  1895. v.push_back (toggle (12, 696, 80, 20, "Punish", TR_NOOP ("Punish")));
  1896. v.push_back (toggle (96, 696, 76, 20, "Thump", TR_NOOP ("Thump")));
  1897. v.push_back (toggle (176, 696, 76, 20, "Steep", TR_NOOP ("Steep")));
  1898. v.push_back (toggle (12, 726, 110, 20, "Wide cuts", TR_NOOP ("Wide cuts")));
  1899. v.push_back (dial (340, 712, 22, "Low cut (wide)", TR_NOOP ("Low cut")));
  1900. v.push_back (dial (440, 712, 22, "High cut (wide)", TR_NOOP ("High cut")));
  1901. // round 147 (Saturn 2): the channel mode and each band's drive pan / pan
  1902. l.height = 870;
  1903. v.push_back (section (4, 760, 512, 106, TR_NOOP ("Stereo")));
  1904. v.push_back (tabs (12, 784, 140, 20, "Channel mode", TR_NOOP ("L/R|M/S"), { 0.0f, 1.0f }));
  1905. v.push_back (label (170, 778, 80, 14, TR_NOOP ("Drive pan")));
  1906. v.push_back (label (170, 818, 80, 14, TR_NOOP ("Pan")));
  1907. static const char* const drivePans[] { "B1 drive pan", "B2 drive pan", "B3 drive pan", "B4 drive pan" };
  1908. static const char* const pans[] { "B1 pan", "B2 pan", "B3 pan", "B4 pan" };
  1909. for (int b = 0; b < 4; ++b)
  1910. for (int r = 0; r < 2; ++r)
  1911. {
  1912. const auto cy = 792.0f + 40.0f * (float) r;
  1913. auto k = knob (280.0f + 60.0f * (float) b, cy, 16, r == 0 ? drivePans[b] : pans[b], nullptr, cy + 9.0f, noCaption | bipolar, 0);
  1914. k.colour = b;
  1915. if (b > 0)
  1916. {
  1917. k.whenParam = "Bands";
  1918. k.whenMin = 0.17f + 0.333f * (float) (b - 1);
  1919. }
  1920. v.push_back (k);
  1921. }
  1922. // round 150 (Saturn 2): bands 5 / 6, the global input / output pan, each band's measured character
  1923. l.height = 1040;
  1924. v.push_back (section (4, 870, 512, 236, TR_NOOP ("Bands 5 / 6, pans, characters")));
  1925. v.push_back (tabs (12, 894, 150, 20, "More bands", TR_NOOP ("Off|5|6"), { 0.0f, 0.5f, 1.0f }));
  1926. v.push_back (dial (200, 904, 18, "Crossover 4", TR_NOOP ("X-over 4")));
  1927. v.push_back (dial (250, 904, 18, "Crossover 5", TR_NOOP ("X-over 5")));
  1928. v.push_back (dial (330, 904, 18, "Input pan", TR_NOOP ("In pan"), bipolar));
  1929. v.push_back (dial (380, 904, 18, "Output pan", TR_NOOP ("Out pan"), bipolar));
  1930. static const char* const b56[2][6] { { "B5 style", "B5 drive", "B5 mix", "B5 level", "B5 drive pan", "B5 pan" },
  1931. { "B6 style", "B6 drive", "B6 mix", "B6 level", "B6 drive pan", "B6 pan" } };
  1932. for (int b = 0; b < 2; ++b)
  1933. {
  1934. const auto cy = 950.0f + 30.0f * (float) b;
  1935. auto name = label (12, cy - 8.0f, 24, 16, b == 0 ? TR_NOOP ("B5") : TR_NOOP ("B6"));
  1936. name.colour = 4 + b;
  1937. v.push_back (when (name, "More bands", b == 0 ? 0.25f : 0.75f, 1.01f));
  1938. for (int c = 0; c < 6; ++c)
  1939. {
  1940. auto k = knob (60.0f + 50.0f * (float) c, cy, 18, b56[b][c], nullptr, cy + 9.0f, noCaption | (c >= 3 ? bipolar : 0), c == 0 ? 4 : 0);
  1941. k.colour = 4 + b;
  1942. v.push_back (when (k, "More bands", b == 0 ? 0.25f : 0.75f, 1.01f));
  1943. }
  1944. }
  1945. // bands 5 / 6's power, solo / mute, tone, feedback and dynamics (the round-128 row's columns)
  1946. l.height = 1110;
  1947. static std::array<std::array<std::array<char, 24>, 9>, 2> extra56 {};
  1948. for (int b = 0; b < 2; ++b)
  1949. {
  1950. const auto cy = 1050.0f + 32.0f * (float) b;
  1951. auto name = label (12, cy - 8.0f, 24, 16, b == 0 ? TR_NOOP ("B5") : TR_NOOP ("B6"));
  1952. name.colour = 4 + b;
  1953. v.push_back (when (name, "More bands", b == 0 ? 0.25f : 0.75f, 1.01f));
  1954. for (int c = 0; c < 9; ++c)
  1955. {
  1956. auto& n = extra56[(std::size_t) b][(std::size_t) c];
  1957. std::snprintf (n.data(), n.size(), "B%d %s", b + 5, extraFieldNames[c]);
  1958. LayoutItem item;
  1959. if (c == 0) item = toggle (extraX[0] - 14.0f, cy - 9.0f, 28, 18, n.data(), nullptr);
  1960. else if (c == 1) item = tabs (extraX[1], cy - 9.0f, 90, 18, n.data(), TR_NOOP ("-|S|M"), { 0.0f, 0.5f, 1.0f });
  1961. else item = knob (extraX[c], cy, 20, n.data(), nullptr, cy + 10.0f, noCaption | (c >= 2 && c <= 5 ? bipolar : 0) | (c == 8 ? bipolar : 0));
  1962. v.push_back (when (item, "More bands", b == 0 ? 0.25f : 0.75f, 1.01f));
  1963. }
  1964. }
  1965. static const char* const chars[] { "B1 character", "B2 character", "B3 character", "B4 character", "B5 character", "B6 character" };
  1966. for (int b = 0; b < 6; ++b)
  1967. v.push_back (stepper (360.0f + 76.0f * (float) (b % 2), 940.0f + 30.0f * (float) (b / 2), 72, 22, chars[b], nullptr, 29));
  1968. // round 152 (Saturn 2): each crossover's own slope, the processing mode, the modulation
  1969. l.height = 1300;
  1970. v.push_back (section (4, 1110, 512, 186, TR_NOOP ("Slopes, processing, modulation")));
  1971. static const char* const slopes[] { "Slope 1", "Slope 2", "Slope 3", "Slope 4", "Slope 5" };
  1972. for (int k = 0; k < 5; ++k)
  1973. v.push_back (stepper (12.0f + 64.0f * (float) k, 1132, 60, 20, slopes[k], nullptr, 6));
  1974. v.push_back (tabs (340, 1132, 168, 20, "Processing", TR_NOOP ("Min. phase|Linear"), { 0.0f, 1.0f }));
  1975. v.push_back (dial (30, 1178, 16, "LFO 1 rate", TR_NOOP ("LFO 1")));
  1976. v.push_back (stepper (6, 1222, 50, 18, "LFO 1 shape", nullptr, 5));
  1977. v.push_back (dial (90, 1178, 16, "LFO 2 rate", TR_NOOP ("LFO 2")));
  1978. v.push_back (stepper (66, 1222, 50, 18, "LFO 2 shape", nullptr, 5));
  1979. v.push_back (dial (150, 1178, 16, "Env attack", TR_NOOP ("Attack")));
  1980. v.push_back (dial (200, 1178, 16, "Env release", TR_NOOP ("Release")));
  1981. static const char* const mods[4][3] { { "Mod 1 source", "Mod 1 target", "Mod 1 amount" }, { "Mod 2 source", "Mod 2 target", "Mod 2 amount" },
  1982. { "Mod 3 source", "Mod 3 target", "Mod 3 amount" }, { "Mod 4 source", "Mod 4 target", "Mod 4 amount" } };
  1983. for (int k = 0; k < 4; ++k)
  1984. {
  1985. const auto y = 1162.0f + 32.0f * (float) k;
  1986. v.push_back (stepper (232, y, 70, 22, mods[k][0], nullptr, 4));
  1987. v.push_back (stepper (306, y, 120, 22, mods[k][1], nullptr, 27));
  1988. v.push_back (knob (466, y + 11.0f, 14, mods[k][2], nullptr, y + 11.0f, noCaption | bipolar));
  1989. }
  1990. v.push_back (toggle (6, 1264, 200, 20, "Effect law", TR_NOOP ("Measured effect characters")));
  1991. return l;
  1992. }
  1993. // --- LYNX originals: the dynamics suite (REA round 108) --------------------------------------------------------
  1994. // The layout logic follows how the reference plugins are used (round 108 UI rule, screenshots in tmp/comp108/ref):
  1995. // the level / gain-reduction display is the window, the main knobs sit in one row under it with their small
  1996. // companions below, the style is one menu button between them, and the rarely touched parts (character, side chain)
  1997. // fold into a page at the bottom. Drawn entirely in LYNX's own style.
  1998. LayoutItem menuOf (float x, float y, float w, float h, const char* param, const char* caption, const char* options)
  1999. {
  2000. LayoutItem i;
  2001. i.type = Item::menu;
  2002. i.x = x, i.y = y, i.w = w, i.h = h;
  2003. i.param = param;
  2004. i.label = caption;
  2005. i.options = options;
  2006. return i;
  2007. }
  2008. Layout crestCompressor()
  2009. {
  2010. Layout l;
  2011. l.width = 840;
  2012. l.height = 604;
  2013. l.pages = { TR_NOOP ("Character"), TR_NOOP ("Side chain"), TR_NOOP ("Options") };
  2014. auto& v = l.items;
  2015. // the display: scrolling input / output level and gain reduction, with the threshold; meters on the right
  2016. v.push_back (display (8, 8, 704, 252, "grhistory"));
  2017. v.push_back (display (718, 8, 114, 252, "crestmeters"));
  2018. // the transfer curve at the left of the knob row
  2019. v.push_back (display (8, 268, 150, 150, "crestcurve"));
  2020. // main knobs, the style button between ratio and attack, small companions under them
  2021. v.push_back (dial (232, 310, 62, "Threshold", TR_NOOP ("Threshold"), big));
  2022. v.push_back (dial (330, 310, 62, "Ratio", TR_NOOP ("Ratio"), big));
  2023. v.push_back (menuOf (382, 296, 112, 26, "Style", TR_NOOP ("Style"),
  2024. TR_NOOP ("Clean|Allround|Punch|Upward|Two-way|Vari-mu|Classic|Opto|Vocal|Bus|Pumping")));
  2025. v.push_back (toggle (382, 330, 112, 20, "Auto release", TR_NOOP ("Auto release")));
  2026. v.push_back (dial (544, 310, 56, "Attack", TR_NOOP ("Attack"), big));
  2027. v.push_back (dial (636, 310, 56, "Release", TR_NOOP ("Release"), big));
  2028. v.push_back (dial (206, 408, 30, "Knee", TR_NOOP ("Knee")));
  2029. v.push_back (dial (266, 408, 30, "Range", TR_NOOP ("Range")));
  2030. v.push_back (dial (330, 408, 30, "Input", TR_NOOP ("Input"), bipolar));
  2031. v.push_back (dial (520, 408, 30, "Lookahead", TR_NOOP ("Lookahead")));
  2032. v.push_back (dial (580, 408, 30, "Hold", TR_NOOP ("Hold")));
  2033. v.push_back (dial (640, 408, 30, "SC level", TR_NOOP ("SC level"), bipolar));
  2034. // make-up and mix on the right, as one goes to them last
  2035. v.push_back (toggle (712, 268, 120, 20, "Auto gain", TR_NOOP ("Auto gain")));
  2036. v.push_back (dial (742, 318, 34, "Output", TR_NOOP ("Output"), bipolar));
  2037. v.push_back (dial (802, 318, 34, "Mix", TR_NOOP ("Mix")));
  2038. // the bottom bar: processing options and the meter
  2039. v.push_back (label (8, 462, 90, 22, TR_NOOP ("Oversampling")));
  2040. v.push_back (tabs (96, 462, 176, 22, "Oversampling", TR_NOOP ("Off|2x|4x|8x")));
  2041. v.push_back (label (284, 462, 76, 22, TR_NOOP ("Lookahead")));
  2042. v.push_back (tabs (358, 462, 270, 22, "Max lookahead", TR_NOOP ("Off|1 ms|2 ms|5 ms|10 ms|20 ms")));
  2043. v.push_back (meter (640, 462, 192, 22, 0, TR_NOOP ("Reduction")));
  2044. // folded parts
  2045. v.push_back (pageTabs (8, 492, 360, 22, TR_NOOP ("Character|Side chain|Options")));
  2046. v.push_back (section (8, 518, 824, 82, nullptr, boxed));
  2047. v.push_back (onPage (tabs (20, 530, 280, 22, "Character", TR_NOOP ("Off|Warm|Crisp|Bright")), 0));
  2048. v.push_back (onPage (tabs (310, 530, 140, 22, "Character pre", TR_NOOP ("Post|Pre")), 0));
  2049. v.push_back (onPage (dial (492, 546, 28, "Drive", TR_NOOP ("Drive"), bipolar), 0));
  2050. // round 128 (Pro-C 3 parity): dry level and auto threshold; link mode and the display options on their own page
  2051. v.push_back (onPage (dial (572, 546, 28, "Dry", TR_NOOP ("Dry")), 0));
  2052. v.push_back (onPage (toggle (630, 530, 160, 20, "Auto threshold", TR_NOOP ("Auto threshold")), 0));
  2053. // round 135: the wet and dry paths' balance
  2054. v.push_back (onPage (dial (680, 566, 20, "Wet pan", TR_NOOP ("Wet pan"), bipolar), 0));
  2055. v.push_back (onPage (dial (750, 566, 20, "Dry pan", TR_NOOP ("Dry pan"), bipolar), 0));
  2056. v.push_back (onPage (label (20, 530, 70, 22, TR_NOOP ("Link mode")), 2));
  2057. v.push_back (onPage (tabs (92, 530, 360, 22, "Link mode", TR_NOOP ("Stereo|Mid only|Side only|Mid > side|Side > mid")), 2));
  2058. v.push_back (onPage (label (470, 530, 50, 22, TR_NOOP ("Scale")), 2));
  2059. v.push_back (onPage (tabs (520, 530, 230, 22, "Meter scale", TR_NOOP ("9 dB|18 dB|36 dB|72 dB|90 dB")), 2));
  2060. v.push_back (onPage (toggle (20, 562, 160, 20, "Input meter", TR_NOOP ("Input meter")), 2));
  2061. // round 137 (Pro-C 3's side-chain Host Sync / MIDI inputs): the detector hears a pulse instead of the audio
  2062. v.push_back (onPage (label (192, 562, 52, 20, TR_NOOP ("Trigger")), 2));
  2063. v.push_back (onPage (tabs (246, 562, 196, 20, "Trigger", TR_NOOP ("Off|Host sync|MIDI")), 2));
  2064. v.push_back (onPage (when (menuOf (450, 562, 70, 20, "Trigger sync", TR_NOOP ("Note"), "1/1|1/2|1/4|1/8|1/16"), "Trigger", 0.25f, 0.75f), 2));
  2065. v.push_back (onPage (when (dial (546, 566, 20, "Trigger rate", TR_NOOP ("Rate")), "Trigger", 0.25f, 0.75f), 2));
  2066. v.push_back (onPage (when (dial (600, 566, 20, "Trigger length", TR_NOOP ("Length")), "Trigger", 0.25f, 0.75f), 2));
  2067. v.push_back (onPage (when (stepper (630, 562, 120, 20, "Trigger channel", TR_NOOP ("MIDI channel"), 129), "Trigger", 0.75f, 1.0f), 2));
  2068. v.push_back (onPage (dial (36, 548, 26, "Stereo link", TR_NOOP ("Stereo link")), 1));
  2069. v.push_back (onPage (toggle (72, 528, 120, 20, "External SC", TR_NOOP ("External input")), 1));
  2070. v.push_back (onPage (toggle (72, 554, 120, 20, "SC listen", TR_NOOP ("Listen")), 1));
  2071. v.push_back (onPage (display (200, 524, 236, 72, "crestsceq"), 1));
  2072. static const char* bandTitles[3] { TR_NOOP ("Band 1"), TR_NOOP ("Band 2"), TR_NOOP ("Band 3") };
  2073. static const char* fields[3][5] { { "SC1 shape", "SC1 freq.", "SC1 gain", "SC1 Q", "SC1 slope" },
  2074. { "SC2 shape", "SC2 freq.", "SC2 gain", "SC2 Q", "SC2 slope" },
  2075. { "SC3 shape", "SC3 freq.", "SC3 gain", "SC3 Q", "SC3 slope" } };
  2076. static const char* captions[5] { TR_NOOP ("Shape"), TR_NOOP ("Freq"), TR_NOOP ("Gain"), TR_NOOP ("Q"), TR_NOOP ("Slope") };
  2077. for (int b = 0; b < 3; ++b)
  2078. {
  2079. const auto x0 = 444.0f + 130.0f * (float) b;
  2080. v.push_back (onPage (label (x0, 522, 124, 14, bandTitles[b], boxed), 1));
  2081. for (int f = 0; f < 5; ++f)
  2082. v.push_back (onPage (knob (x0 + 13.0f + 24.5f * (float) f, 556, 20, fields[b][f], captions[f], 586, f == 2 ? bipolar : 0,
  2083. f == 0 || f == 4 ? 9 : 0), 1));
  2084. }
  2085. return l;
  2086. }
  2087. Layout prismMultiband()
  2088. {
  2089. Layout l;
  2090. l.width = 900;
  2091. l.height = 594; // round 144: + the processing / oversampling / pan-mode row (was 560)
  2092. l.pages = { TR_NOOP ("Band 1"), TR_NOOP ("Band 2"), TR_NOOP ("Band 3"), TR_NOOP ("Band 4"), TR_NOOP ("Band 5"), TR_NOOP ("Band 6") };
  2093. auto& v = l.items;
  2094. // the bands are the display: click one to edit it, drag a crossover line to move it
  2095. v.push_back (display (8, 8, 884, 330, "prismbands"));
  2096. // the selected band's panel
  2097. v.push_back (section (8, 344, 884, 126, nullptr, boxed));
  2098. v.push_back (pageTabs (16, 352, 348, 22, TR_NOOP ("Band 1|Band 2|Band 3|Band 4|Band 5|Band 6")));
  2099. static const char* names[6][10] {
  2100. { "B1 threshold", "B1 ratio", "B1 range", "B1 expand", "B1 knee", "B1 attack", "B1 release", "B1 level", "B1 on", "B1 solo" },
  2101. { "B2 threshold", "B2 ratio", "B2 range", "B2 expand", "B2 knee", "B2 attack", "B2 release", "B2 level", "B2 on", "B2 solo" },
  2102. { "B3 threshold", "B3 ratio", "B3 range", "B3 expand", "B3 knee", "B3 attack", "B3 release", "B3 level", "B3 on", "B3 solo" },
  2103. { "B4 threshold", "B4 ratio", "B4 range", "B4 expand", "B4 knee", "B4 attack", "B4 release", "B4 level", "B4 on", "B4 solo" },
  2104. { "B5 threshold", "B5 ratio", "B5 range", "B5 expand", "B5 knee", "B5 attack", "B5 release", "B5 level", "B5 on", "B5 solo" },
  2105. { "B6 threshold", "B6 ratio", "B6 range", "B6 expand", "B6 knee", "B6 attack", "B6 release", "B6 level", "B6 on", "B6 solo" } };
  2106. for (int b = 0; b < 6; ++b) // round 135: up to six bands
  2107. {
  2108. auto add = [&] (LayoutItem i) { i.colour = b; v.push_back (onPage (std::move (i), b)); };
  2109. add (toggle (16, 384, 56, 22, names[b][8], TR_NOOP ("On")));
  2110. add (toggle (78, 384, 60, 22, names[b][9], TR_NOOP ("Solo")));
  2111. add (tabs (16, 414, 160, 22, names[b][3], TR_NOOP ("Compress|Expand")));
  2112. add (dial (312, 398, 46, names[b][0], TR_NOOP ("Threshold"), big));
  2113. add (dial (402, 398, 46, names[b][2], TR_NOOP ("Range"), big | bipolar));
  2114. add (dial (484, 398, 36, names[b][1], TR_NOOP ("Ratio")));
  2115. add (dial (556, 398, 36, names[b][4], TR_NOOP ("Knee")));
  2116. add (dial (628, 398, 36, names[b][5], TR_NOOP ("Attack")));
  2117. add (dial (700, 398, 36, names[b][6], TR_NOOP ("Release")));
  2118. add (dial (788, 398, 40, names[b][7], TR_NOOP ("Level"), bipolar));
  2119. static const char* las[6] { "B1 lookahead", "B2 lookahead", "B3 lookahead", "B4 lookahead", "B5 lookahead", "B6 lookahead" };
  2120. add (dial (858, 398, 22, las[b], TR_NOOP ("Lookahead"))); // round 128: the band's own look-ahead
  2121. static const char* pans[6] { "B1 pan", "B2 pan", "B3 pan", "B4 pan", "B5 pan", "B6 pan" };
  2122. add (dial (200, 395, 22, pans[b], TR_NOOP ("Pan"), bipolar)); // round 135
  2123. }
  2124. // global bar
  2125. v.push_back (label (8, 482, 50, 22, TR_NOOP ("Slope")));
  2126. v.push_back (tabs (56, 482, 200, 22, "Slope", TR_NOOP ("12 dB/oct|24 dB/oct|48 dB/oct")));
  2127. // round 135: the band count, crossovers 4–5, the external side chain
  2128. v.push_back (label (8, 510, 50, 22, TR_NOOP ("Bands")));
  2129. v.push_back (tabs (56, 510, 200, 22, "Bands", "1|2|3|4|5|6"));
  2130. v.push_back (toggle (56, 538, 140, 18, "External SC", TR_NOOP ("External input")));
  2131. v.push_back (dial (290, 504, 24, "Crossover 1", TR_NOOP ("Crossover 1")));
  2132. v.push_back (dial (350, 504, 24, "Crossover 2", TR_NOOP ("Crossover 2")));
  2133. v.push_back (dial (410, 504, 24, "Crossover 3", TR_NOOP ("Crossover 3")));
  2134. v.push_back (dial (470, 504, 24, "Crossover 4", TR_NOOP ("Crossover 4")));
  2135. v.push_back (dial (530, 504, 24, "Crossover 5", TR_NOOP ("Crossover 5")));
  2136. v.push_back (dial (600, 504, 24, "Lookahead", TR_NOOP ("Lookahead")));
  2137. v.push_back (dial (660, 504, 24, "Mix", TR_NOOP ("Mix")));
  2138. v.push_back (dial (740, 504, 24, "Input", TR_NOOP ("Input"), bipolar));
  2139. v.push_back (dial (820, 504, 24, "Output", TR_NOOP ("Output"), bipolar));
  2140. // round 144 (Pro-MB's bottom bar): processing mode, oversampling, what the bands' pan balances
  2141. v.push_back (label (8, 566, 50, 20, TR_NOOP ("Phase")));
  2142. v.push_back (tabs (56, 566, 240, 20, "Processing", TR_NOOP ("Linear|Dynamic|Minimum"), { 0.0f, 0.5f, 1.0f }));
  2143. v.push_back (label (310, 566, 90, 20, TR_NOOP ("Oversampling")));
  2144. v.push_back (tabs (402, 566, 150, 20, "Oversampling", "Off|2x|4x", { 0.0f, 0.5f, 1.0f }));
  2145. v.push_back (label (570, 566, 40, 20, TR_NOOP ("Pan")));
  2146. v.push_back (tabs (612, 566, 110, 20, "Pan mode", "L/R|M/S"));
  2147. // round 147: Dynamic phase's engine (classic = projects saved before round 147) and each band's expert settings
  2148. v.push_back (tabs (736, 566, 156, 20, "Dynamic engine", TR_NOOP ("Classic|Measured")));
  2149. v.push_back (section (8, 596, 884, 64, TR_NOOP ("Expert (selected band)"), boxed));
  2150. static const char* links[6] { "B1 link", "B2 link", "B3 link", "B4 link", "B5 link", "B6 link" };
  2151. static const char* linkModes[6] { "B1 link mode", "B2 link mode", "B3 link mode", "B4 link mode", "B5 link mode", "B6 link mode" };
  2152. static const char* scFree[6] { "B1 SC filter", "B2 SC filter", "B3 SC filter", "B4 SC filter", "B5 SC filter", "B6 SC filter" };
  2153. static const char* scLow[6] { "B1 SC low", "B2 SC low", "B3 SC low", "B4 SC low", "B5 SC low", "B6 SC low" };
  2154. static const char* scHigh[6] { "B1 SC high", "B2 SC high", "B3 SC high", "B4 SC high", "B5 SC high", "B6 SC high" };
  2155. for (int b = 0; b < 6; ++b)
  2156. {
  2157. auto add = [&] (LayoutItem i) { i.colour = b; v.push_back (onPage (std::move (i), b)); };
  2158. add (tabs (16, 626, 150, 22, scFree[b], TR_NOOP ("Band|Free")));
  2159. add (dial (210, 630, 20, scLow[b], TR_NOOP ("SC low")));
  2160. add (dial (290, 630, 20, scHigh[b], TR_NOOP ("SC high")));
  2161. add (dial (420, 630, 20, links[b], TR_NOOP ("Stereo link")));
  2162. add (tabs (480, 626, 130, 22, linkModes[b], TR_NOOP ("Mid|Side")));
  2163. }
  2164. // round 147: each crossover's own slope (0 = the global one)
  2165. static const char* xs[5] { "Crossover 1 slope", "Crossover 2 slope", "Crossover 3 slope", "Crossover 4 slope", "Crossover 5 slope" };
  2166. static const char* xsCaption[5] { TR_NOOP ("Slope 1"), TR_NOOP ("Slope 2"), TR_NOOP ("Slope 3"), TR_NOOP ("Slope 4"), TR_NOOP ("Slope 5") };
  2167. for (int k = 0; k < 5; ++k)
  2168. v.push_back (dial (660.0f + 52.0f * (float) k, 630, 16, xs[k], xsCaption[k]));
  2169. // round 150: the free layout (each band's own edges and slopes), the band's side-chain input, the detector
  2170. v.push_back (section (8, 666, 884, 64, TR_NOOP ("Free layout (selected band)"), boxed));
  2171. static const char* lo[6] { "B1 low", "B2 low", "B3 low", "B4 low", "B5 low", "B6 low" };
  2172. static const char* hi[6] { "B1 high", "B2 high", "B3 high", "B4 high", "B5 high", "B6 high" };
  2173. static const char* ls[6] { "B1 low slope", "B2 low slope", "B3 low slope", "B4 low slope", "B5 low slope", "B6 low slope" };
  2174. static const char* hs[6] { "B1 high slope", "B2 high slope", "B3 high slope", "B4 high slope", "B5 high slope", "B6 high slope" };
  2175. static const char* sci[6] { "B1 SC input", "B2 SC input", "B3 SC input", "B4 SC input", "B5 SC input", "B6 SC input" };
  2176. for (int b = 0; b < 6; ++b)
  2177. {
  2178. auto add = [&] (LayoutItem i) { i.colour = b; v.push_back (onPage (std::move (i), b)); };
  2179. add (dial (180, 700, 20, lo[b], TR_NOOP ("Low edge")));
  2180. add (dial (250, 700, 20, ls[b], TR_NOOP ("Low slope")));
  2181. add (dial (320, 700, 20, hi[b], TR_NOOP ("High edge")));
  2182. add (dial (390, 700, 20, hs[b], TR_NOOP ("High slope")));
  2183. add (tabs (450, 696, 220, 22, sci[b], TR_NOOP ("Global|Plug-in|External"), { 0.0f, 0.5f, 1.0f }));
  2184. }
  2185. v.push_back (tabs (16, 696, 140, 22, "Band layout", TR_NOOP ("Split|Free")));
  2186. v.push_back (tabs (700, 696, 180, 22, "Detector", TR_NOOP ("Classic|Measured")));
  2187. // round 152: the measured model's revision (gain-stage attack, narrow Dynamic-phase bands, 0.8-octave minimum)
  2188. v.push_back (label (620, 736, 76, 22, TR_NOOP ("Model")));
  2189. v.push_back (tabs (700, 736, 180, 22, "Revision", TR_NOOP ("Round 150|Round 152")));
  2190. l.height = 766;
  2191. return l;
  2192. }
  2193. Layout sentryGate()
  2194. {
  2195. Layout l;
  2196. l.width = 680;
  2197. l.height = 510;
  2198. auto& v = l.items;
  2199. // left: threshold (big) with ratio and range under it
  2200. v.push_back (dial (86, 84, 92, "Threshold", TR_NOOP ("Threshold"), big));
  2201. v.push_back (dial (44, 214, 50, "Ratio", TR_NOOP ("Ratio")));
  2202. v.push_back (dial (128, 214, 50, "Range", TR_NOOP ("Range")));
  2203. // centre: the style button over the curve and the level / reduction history
  2204. v.push_back (menuOf (180, 8, 330, 24, "Style", TR_NOOP ("Style"), TR_NOOP ("Classic|Clean|Vocal|Guitar|Upward")));
  2205. v.push_back (display (180, 38, 150, 150, "sentrycurve"));
  2206. v.push_back (display (336, 38, 174, 150, "grhistory"));
  2207. v.push_back (meter (180, 194, 330, 16, 0, TR_NOOP ("Reduction")));
  2208. v.push_back (display (180, 216, 330, 26, "levels"));
  2209. // right: attack and release (big), hold / knee / look-ahead (small) beside them
  2210. v.push_back (dial (562, 66, 58, "Attack", TR_NOOP ("Attack"), big));
  2211. v.push_back (dial (562, 186, 58, "Release", TR_NOOP ("Release"), big));
  2212. v.push_back (dial (642, 46, 32, "Hold", TR_NOOP ("Hold")));
  2213. v.push_back (dial (642, 124, 32, "Knee", TR_NOOP ("Knee")));
  2214. v.push_back (dial (642, 202, 32, "Lookahead", TR_NOOP ("Lookahead")));
  2215. v.push_back (toggle (588, 252, 88, 20, "Lookahead on", TR_NOOP ("Lookahead on")));
  2216. // the "expert" strip: side chain, upward expansion, wet / dry
  2217. v.push_back (section (4, 282, 672, 106, TR_NOOP ("Side chain and output")));
  2218. v.push_back (toggle (14, 304, 120, 22, "External SC", TR_NOOP ("External input")));
  2219. v.push_back (toggle (14, 332, 120, 22, "SC listen", TR_NOOP ("Listen")));
  2220. static const std::pair<const char*, const char*> knobs[6] { { "High pass", TR_NOOP ("High pass") }, { "Low pass", TR_NOOP ("Low pass") },
  2221. { "Up threshold", TR_NOOP ("Up thres") }, { "Up ratio", TR_NOOP ("Up ratio") },
  2222. { "Dry", TR_NOOP ("Dry") }, { "Output", TR_NOOP ("Output") } };
  2223. for (int k = 0; k < 6; ++k)
  2224. v.push_back (dial (186.0f + 84.0f * (float) k, 326, 28, knobs[k].first, knobs[k].second, k == 5 ? bipolar : 0));
  2225. // round 128 (Pro-G parity): channel mode, ducking, the side-chain gain / mix per channel, wet / dry pan, input
  2226. v.push_back (section (4, 392, 672, 84, TR_NOOP ("Expert")));
  2227. v.push_back (tabs (14, 414, 160, 22, "Channel mode", TR_NOOP ("Left/Right|Mid/Side")));
  2228. v.push_back (toggle (14, 444, 120, 22, "Ducking", TR_NOOP ("Ducking")));
  2229. static const std::pair<const char*, const char*> expert[7] { { "SC gain L", TR_NOOP ("Gain L") }, { "SC mix L", TR_NOOP ("Mix L") },
  2230. { "SC gain R", TR_NOOP ("Gain R") }, { "SC mix R", TR_NOOP ("Mix R") },
  2231. { "Wet pan", TR_NOOP ("Wet pan") }, { "Dry pan", TR_NOOP ("Dry pan") },
  2232. { "Input", TR_NOOP ("Input") } };
  2233. for (int k = 0; k < 7; ++k)
  2234. v.push_back (dial (220.0f + 68.0f * (float) k, 438, 22, expert[k].first, expert[k].second, bipolar));
  2235. // round 135: oversampling (the reference's bottom bar)
  2236. v.push_back (label (8, 482, 90, 22, TR_NOOP ("Oversampling")));
  2237. v.push_back (tabs (96, 482, 176, 22, "Oversampling", TR_NOOP ("Off|2x|4x|8x")));
  2238. return l;
  2239. }
  2240. Layout quellDenoiser()
  2241. {
  2242. // round 119: the one-knob noise suppressors' front panel (the role: Waves NS1, screenshot of the official trial):
  2243. // the reduction meter on the left, one tall Amount fader on the right with its read-out under it; LYNX's extras
  2244. // (listen to what is removed, output trim) small along the bottom
  2245. Layout l;
  2246. l.width = 300;
  2247. l.height = 420;
  2248. auto& v = l.items;
  2249. v.push_back (section (4, 4, 292, 412, TR_NOOP ("Noise suppressor")));
  2250. v.push_back (meter (30, 34, 70, 300, 0, TR_NOOP ("Reduction")));
  2251. v.push_back (slider (Item::vslider, 170, 30, 70, 316, "Amount", TR_NOOP ("Amount")));
  2252. v.push_back (display (128, 30, 42, 316, "faderscale")); // round 137: the fader's 0 … 100 scale
  2253. v.push_back (value (170, 372, 70, 20, "Amount", 0));
  2254. v.push_back (toggle (22, 372, 96, 22, "Listen", TR_NOOP ("Listen")));
  2255. v.push_back (toggle (22, 342, 96, 22, "Matched", TR_NOOP ("Matched"))); // round 124: the engine fitted to NS1
  2256. v.push_back (dial (256, 378, 28, "Output", TR_NOOP ("Output"), bipolar));
  2257. return l;
  2258. }
  2259. Layout geminiDoubler()
  2260. {
  2261. // round 119: the two-voice doublers' layout (the role: Waves Doubler, screenshot of the official trial): three
  2262. // pictures along the top (where the voices sit in the stereo field, delay against detune, the voices' EQ), the
  2263. // direct signal / feedback / range / EQ row in the middle, then one row per voice (on, gain, pan, delay,
  2264. // feedback, octave, detune, depth, rate, source) and the output fader on the right
  2265. Layout l;
  2266. l.width = 800;
  2267. l.height = 460;
  2268. auto& v = l.items;
  2269. v.push_back (display (12, 8, 236, 150, "geminipan"));
  2270. v.push_back (display (264, 8, 260, 150, "geminimap"));
  2271. v.push_back (display (540, 8, 248, 150, "geminieq"));
  2272. // direct, feedback cut, range, shelves
  2273. v.push_back (section (4, 166, 792, 92, TR_NOOP ("Direct")));
  2274. v.push_back (toggle (14, 208, 64, 22, "Direct", TR_NOOP ("Direct")));
  2275. v.push_back (dial (112, 206, 30, "Direct gain", TR_NOOP ("Gain")));
  2276. v.push_back (dial (170, 206, 30, "Direct pan", TR_NOOP ("Pan"), bipolar));
  2277. v.push_back (toggle (206, 208, 64, 22, "Align", TR_NOOP ("Align")));
  2278. v.push_back (dial (310, 206, 30, "Feedback cut", TR_NOOP ("FB low cut")));
  2279. v.push_back (tabs (350, 208, 100, 22, "Range", TR_NOOP ("80 Hz|20 Hz")));
  2280. v.push_back (toggle (478, 208, 40, 22, "Low shelf", TR_NOOP ("L")));
  2281. v.push_back (dial (546, 206, 30, "Low gain", TR_NOOP ("Gain"), bipolar));
  2282. v.push_back (dial (600, 206, 30, "Low freq", TR_NOOP ("Freq")));
  2283. v.push_back (toggle (632, 208, 40, 22, "High shelf", TR_NOOP ("H")));
  2284. v.push_back (dial (700, 206, 30, "High gain", TR_NOOP ("Gain"), bipolar));
  2285. v.push_back (dial (754, 206, 30, "High freq", TR_NOOP ("Freq")));
  2286. // round 165w: the shelves' law (Measured: −88 … +12 dB, the reference's; Old: round 124's, kept by older projects)
  2287. v.push_back (tabs (656, 168, 132, 18, "EQ law", TR_NOOP ("Old|Measured")));
  2288. // one row per voice; round 135w: voices 3 and 4 (the four-voice doubler's) on a second page of the same rows
  2289. v.push_back (section (4, 264, 680, 192, TR_NOOP ("Voices")));
  2290. l.pages = { TR_NOOP ("Voices 1-2"), TR_NOOP ("Voices 3-4") };
  2291. v.push_back (pageTabs (500, 266, 180, 20, TR_NOOP ("Voices 1-2|Voices 3-4")));
  2292. static const char* const names[4][10] {
  2293. { "V1 on", "V1 gain", "V1 pan", "V1 delay", "V1 feedback", "V1 octave", "V1 detune", "V1 depth", "V1 rate", "V1 source" },
  2294. { "V2 on", "V2 gain", "V2 pan", "V2 delay", "V2 feedback", "V2 octave", "V2 detune", "V2 depth", "V2 rate", "V2 source" },
  2295. { "V3 on", "V3 gain", "V3 pan", "V3 delay", "V3 feedback", "V3 octave", "V3 detune", "V3 depth", "V3 rate", "V3 source" },
  2296. { "V4 on", "V4 gain", "V4 pan", "V4 delay", "V4 feedback", "V4 octave", "V4 detune", "V4 depth", "V4 rate", "V4 source" } };
  2297. static const char* const numbers[4] { TR_NOOP ("1"), TR_NOOP ("2"), TR_NOOP ("3"), TR_NOOP ("4") };
  2298. for (int k = 0; k < 4; ++k)
  2299. {
  2300. const auto cy = 316.0f + 76.0f * (float) (k % 2);
  2301. const auto rowStart = v.size();
  2302. v.push_back (toggle (14, cy - 11, 40, 22, names[k][0], numbers[k]));
  2303. v.push_back (dial (90, cy, 30, names[k][1], TR_NOOP ("Gain")));
  2304. v.push_back (dial (148, cy, 30, names[k][2], TR_NOOP ("Pan"), bipolar));
  2305. v.push_back (dial (206, cy, 30, names[k][3], TR_NOOP ("Delay")));
  2306. v.push_back (dial (264, cy, 30, names[k][4], TR_NOOP ("Feedback")));
  2307. v.push_back (toggle (298, cy - 11, 50, 22, names[k][5], TR_NOOP ("Oct")));
  2308. v.push_back (dial (384, cy, 30, names[k][6], TR_NOOP ("Detune"), bipolar));
  2309. v.push_back (dial (442, cy, 30, names[k][7], TR_NOOP ("Depth"), bipolar));
  2310. v.push_back (dial (500, cy, 30, names[k][8], TR_NOOP ("Rate")));
  2311. v.push_back (tabs (540, cy - 11, 136, 22, names[k][9], k % 2 == 0 ? TR_NOOP ("L|L+R|L-R") : TR_NOOP ("R|R+L|R-L"), { 1.0f / 6.0f, 0.5f, 5.0f / 6.0f }));
  2312. for (auto i = rowStart; i < v.size(); ++i)
  2313. v[i].page = k / 2;
  2314. }
  2315. // round 135w: the modulation RESET (every voice's LFO restarts in sync; momentary)
  2316. v.push_back (toggle (420, 266, 70, 20, "Mod reset", TR_NOOP ("Reset"), momentary));
  2317. v.push_back (section (690, 264, 106, 192, TR_NOOP ("Output")));
  2318. v.push_back (slider (Item::vslider, 698, 290, 30, 150, "Output", nullptr));
  2319. v.push_back (display (730, 276, 62, 172, "iometer")); // round 129: the reference's output meters
  2320. return l;
  2321. }
  2322. Layout autoPanLayout()
  2323. {
  2324. // round 135: the rhythmic panners' panel (the role: PanMan, screenshot of the official trial): OFFSET, WIDTH and
  2325. // SMOOTHING over the pan-position strip (L … C … R) on the left; the source, its rate or rhythm steps and the
  2326. // direction (one way or back and forth) in the middle; input / output and the analog stage on the right. FL's
  2327. // own LFO (the Love Philter pan LFO the effect was made for) stays the first source with its period, phase and
  2328. // tension.
  2329. Layout l;
  2330. l.width = 760;
  2331. l.height = 250;
  2332. auto& v = l.items;
  2333. v.push_back (section (4, 4, 330, 242, TR_NOOP ("Pan")));
  2334. v.push_back (dial (60, 76, 44, "Pan", TR_NOOP ("Offset"), bipolar));
  2335. v.push_back (dial (166, 76, 44, "Depth", TR_NOOP ("Width"), bipolar));
  2336. v.push_back (when (dial (272, 76, 44, "Smoothing", TR_NOOP ("Smoothing")), "Source", 0.25f, 1.0f));
  2337. v.push_back (when (dial (272, 76, 44, "Tension", TR_NOOP ("Tension"), bipolar), "Source", 0.0f, 0.25f));
  2338. v.push_back (display (20, 160, 298, 26, "panpos"));
  2339. v.push_back (label (20, 190, 30, 16, TR_NOOP ("L"), alignLeft));
  2340. v.push_back (label (154, 190, 30, 16, TR_NOOP ("C")));
  2341. v.push_back (label (288, 190, 30, 16, TR_NOOP ("R")));
  2342. v.push_back (when (toggle (20, 216, 120, 20, "FL pan law", TR_NOOP ("FL pan law")), "Source", 0.0f, 0.25f));
  2343. v.push_back (toggle (190, 216, 128, 20, "Control only", TR_NOOP ("Control only")));
  2344. v.push_back (section (340, 4, 250, 242, TR_NOOP ("Rate")));
  2345. v.push_back (tabs (350, 28, 230, 22, "Source", TR_NOOP ("FL LFO|LFO|Rhythm steps")));
  2346. v.push_back (when (dial (465, 104, 52, "Rate", TR_NOOP ("Rate"), big), "Source", 0.25f, 0.75f));
  2347. v.push_back (when (dial (410, 104, 40, "Period", TR_NOOP ("Period")), "Source", 0.0f, 0.25f));
  2348. v.push_back (when (dial (520, 104, 40, "Phase", TR_NOOP ("Phase")), "Source", 0.0f, 0.25f));
  2349. v.push_back (when (stepper (366, 84, 90, 22, "Steps", TR_NOOP ("Steps"), 6), "Source", 0.75f, 1.0f));
  2350. v.push_back (when (tabs (466, 84, 110, 22, "Step note", TR_NOOP ("1/1|1/2|1/4|1/8|1/16|1/32")), "Source", 0.75f, 1.0f));
  2351. v.push_back (when (tabs (380, 190, 170, 26, "Direction", TR_NOOP ("<|< >|>"), { 1.0f, 0.0f, 0.5f }), "Source", 0.25f, 1.0f));
  2352. v.push_back (section (596, 4, 160, 242, TR_NOOP ("Level")));
  2353. v.push_back (dial (636, 62, 32, "Input", TR_NOOP ("Input"), bipolar));
  2354. v.push_back (dial (716, 62, 32, "Output", TR_NOOP ("Output"), bipolar));
  2355. v.push_back (display (616, 116, 120, 92, "iometer"));
  2356. v.push_back (tabs (610, 216, 132, 22, "Analog", TR_NOOP ("Digital|Analog")));
  2357. return l;
  2358. }
  2359. // round 136 (merged by round 138): Auto-pan's Rhythm voicing — the PanMan model measured on the official trial
  2360. // (core/RhythmPan.h, REA_rodada136 §2) — gets its own controls; the panner above shows while it is off. The VOICING
  2361. // switch at the bottom flips between them; her saved PanMan states open on the Rhythm voicing.
  2362. Layout withRhythmVoicing (Layout l)
  2363. {
  2364. for (auto& it : l.items)
  2365. {
  2366. if (it.whenParam != nullptr) // keep the item's own condition as the second one
  2367. {
  2368. it.when2Param = it.whenParam;
  2369. it.when2Min = it.whenMin;
  2370. it.when2Max = it.whenMax;
  2371. it.whenParam = nullptr;
  2372. }
  2373. it = when (it, "Voicing", 0.0f, 0.5f);
  2374. }
  2375. l.height = 280;
  2376. auto add = [&l] (LayoutItem it) { l.items.push_back (when (it, "Voicing", 0.5f, 1.0f)); };
  2377. add (section (4, 4, 330, 242, TR_NOOP ("Pan")));
  2378. add (dial (60, 76, 44, "Offset", TR_NOOP ("Offset"), bipolar));
  2379. add (dial (166, 76, 44, "Width", TR_NOOP ("Width")));
  2380. add (dial (272, 76, 44, "Rhythm smoothing", TR_NOOP ("Smoothing")));
  2381. add (display (20, 160, 298, 26, "panpos"));
  2382. add (label (20, 190, 30, 16, TR_NOOP ("L"), alignLeft));
  2383. add (label (154, 190, 30, 16, TR_NOOP ("C")));
  2384. add (label (288, 190, 30, 16, TR_NOOP ("R")));
  2385. add (tabs (20, 216, 298, 20, "Pattern", TR_NOOP ("Left / right|8 steps")));
  2386. add (section (340, 4, 250, 242, TR_NOOP ("Rate")));
  2387. add (tabs (350, 28, 230, 22, "Sync", TR_NOOP ("Hz|Beats")));
  2388. add (when (dial (465, 104, 52, "Rhythm rate", TR_NOOP ("Rate"), big), "Sync", 0.0f, 0.5f));
  2389. add (when (dial (465, 104, 52, "Beats", TR_NOOP ("Beats"), big), "Sync", 0.5f, 1.0f));
  2390. add (dial (370, 190, 24, "Start phase", TR_NOOP ("Phase")));
  2391. add (dial (560, 190, 24, "Amount", TR_NOOP ("Amount")));
  2392. add (section (596, 4, 160, 242, TR_NOOP ("Level")));
  2393. add (dial (676, 80, 36, "Rhythm output", TR_NOOP ("Output"), bipolar));
  2394. add (tabs (610, 216, 132, 22, "Rhythm analog", TR_NOOP ("Digital|Analog|Hot"), { 0.0f, 0.5f, 1.0f }));
  2395. l.items.push_back (toggle (8, 254, 300, 20, "Voicing", TR_NOOP ("Measured rhythm voicing")));
  2396. // round 150: PanMan's Tweak page role — the input's envelope moves the rate, the offset and the width (its threshold
  2397. // and range), Feel / Groove of the steps, and the angle past the speakers
  2398. l.height = 360;
  2399. add (section (4, 280, 752, 76, TR_NOOP ("Tweak")));
  2400. add (dial (60, 318, 30, "Rate mod", TR_NOOP ("Rate"), bipolar));
  2401. add (dial (150, 318, 30, "Offset mod", TR_NOOP ("Offset"), bipolar));
  2402. add (dial (240, 318, 30, "Width mod", TR_NOOP ("Width"), bipolar));
  2403. add (dial (340, 318, 30, "Env threshold", TR_NOOP ("Thresh.")));
  2404. add (dial (430, 318, 30, "Env range", TR_NOOP ("Range")));
  2405. add (dial (530, 318, 30, "Feel", TR_NOOP ("Feel"), bipolar));
  2406. add (dial (610, 318, 30, "Groove", TR_NOOP ("Groove"), bipolar));
  2407. add (toggle (664, 308, 86, 20, "Beyond speakers", TR_NOOP ("Beyond")));
  2408. // round 152: PanMan's trigger sources (the input past a threshold, or the manual trigger, moves the pan every
  2409. // `divider` triggers: to the other side, or to a random place), the detector's filter, and the Random source
  2410. l.height = 444;
  2411. add (section (4, 360, 752, 80, TR_NOOP ("Trigger")));
  2412. add (tabs (14, 390, 230, 22, "Trigger", TR_NOOP ("Clock|Ping-pong|Random step"), { 0.0f, 0.5f, 1.0f }));
  2413. add (dial (284, 398, 30, "Trig threshold", TR_NOOP ("Thresh.")));
  2414. add (stepper (318, 390, 84, 22, "Divider", TR_NOOP ("Divider"), 11));
  2415. add (tabs (412, 390, 132, 22, "Trig filter", TR_NOOP ("Off|HP|LP"), { 0.0f, 0.5f, 1.0f }));
  2416. add (dial (578, 398, 30, "Trig freq", TR_NOOP ("Freq")));
  2417. add (toggle (618, 380, 132, 20, "Manual trigger", TR_NOOP ("Trigger now"), plugui::momentary));
  2418. add (toggle (618, 410, 132, 20, "Random steps", TR_NOOP ("Random steps")));
  2419. return l;
  2420. }
  2421. // round 145: Ridge Strip's Vocal strip voicing (core/VoxStrip.h; the role: a vocal channel strip with de-esser,
  2422. // de-ploser, three-band EQ and compander, measured on the official trial) gets its own panel in the reference's
  2423. // reading order: the level block on top, the COMPANDER, then DE-ESSER and DE-PLOSER side by side, the EQUALISER, the
  2424. // process order. Ridge's panel shows while it is off; the switch at the bottom flips between them.
  2425. LayoutItem choiceMenu (float x, float y, float w, float h, const char* param, const char* caption, const char* options);
  2426. Layout withVocalVoicing (Layout l)
  2427. {
  2428. for (auto& it : l.items)
  2429. {
  2430. if (it.whenParam != nullptr)
  2431. {
  2432. it.when2Param = it.whenParam;
  2433. it.when2Min = it.whenMin;
  2434. it.when2Max = it.whenMax;
  2435. it.whenParam = nullptr;
  2436. }
  2437. it = when (it, "Vocal strip", 0.0f, 0.5f);
  2438. }
  2439. l.height = std::max (l.height, 744);
  2440. auto add = [&l] (LayoutItem it) { l.items.push_back (when (it, "Vocal strip", 0.5f, 1.0f)); };
  2441. add (section (4, 4, 552, 128, TR_NOOP ("Level")));
  2442. add (dial (50, 64, 40, "Vocal input", TR_NOOP ("Input"), bipolar));
  2443. add (display (100, 26, 250, 96, "iometer"));
  2444. add (dial (396, 64, 40, "Vocal output", TR_NOOP ("Output"), bipolar));
  2445. add (choiceMenu (440, 40, 108, 24, "Process order", TR_NOOP ("Order"), "DS>DP>EQ>COMP|DS>DP>COMP>EQ|DS>EQ>DP>COMP|DS>EQ>COMP>DP|DS>COMP>DP>EQ|DS>COMP>EQ>DP|DP>DS>EQ>COMP|DP>DS>COMP>EQ|DP>EQ>DS>COMP|DP>EQ>COMP>DS|DP>COMP>DS>EQ|DP>COMP>EQ>DS|EQ>DS>DP>COMP|EQ>DS>COMP>DP|EQ>DP>DS>COMP|EQ>DP>COMP>DS|EQ>COMP>DS>DP|EQ>COMP>DP>DS|COMP>DS>DP>EQ|COMP>DS>EQ>DP|COMP>DP>DS>EQ|COMP>DP>EQ>DS|COMP>EQ>DS>DP|COMP>EQ>DP>DS"));
  2446. add (section (4, 136, 552, 232, TR_NOOP ("Compander")));
  2447. add (toggle (14, 158, 64, 20, "Compander", TR_NOOP ("On")));
  2448. add (dial (60, 220, 34, "Compander attack", TR_NOOP ("Attack")));
  2449. add (dial (60, 310, 34, "Compander release", TR_NOOP ("Release")));
  2450. add (dial (160, 240, 36, "Compander ratio", TR_NOOP ("Ratio")));
  2451. add (dial (264, 230, 48, "Compander threshold", TR_NOOP ("Threshold"), big));
  2452. add (dial (370, 220, 34, "Expander threshold", TR_NOOP ("Expander")));
  2453. add (dial (370, 310, 34, "Make-up", TR_NOOP ("Make-up")));
  2454. add (toggle (128, 330, 72, 22, "Soft knee", TR_NOOP ("Soft knee")));
  2455. add (toggle (226, 330, 72, 22, "Drive", TR_NOOP ("Drive")));
  2456. add (meter (426, 170, 120, 12, 0, TR_NOOP ("GR")));
  2457. add (section (4, 372, 274, 170, TR_NOOP ("De-esser")));
  2458. add (toggle (14, 394, 64, 20, "De-esser", TR_NOOP ("On")));
  2459. add (dial (70, 456, 34, "De-ess threshold", TR_NOOP ("Threshold")));
  2460. add (dial (170, 456, 34, "De-ess freq.", TR_NOOP ("Frequency")));
  2461. add (tabs (90, 394, 180, 20, "De-ess split", TR_NOOP ("Broadband|Split")));
  2462. add (toggle (226, 440, 46, 20, "De-ess lookahead", TR_NOOP ("Look")));
  2463. add (toggle (226, 470, 46, 20, "De-ess listen", TR_NOOP ("Listen")));
  2464. add (meter (14, 520, 254, 12, 1, TR_NOOP ("GR")));
  2465. add (section (282, 372, 274, 170, TR_NOOP ("De-ploser")));
  2466. add (toggle (292, 394, 64, 20, "De-ploser", TR_NOOP ("On")));
  2467. add (dial (348, 456, 34, "De-plos threshold", TR_NOOP ("Threshold")));
  2468. add (dial (448, 456, 34, "De-plos freq.", TR_NOOP ("Frequency")));
  2469. add (tabs (368, 394, 180, 20, "De-plos split", TR_NOOP ("Broadband|Split")));
  2470. add (toggle (504, 440, 46, 20, "De-plos lookahead", TR_NOOP ("Look")));
  2471. add (toggle (504, 470, 46, 20, "De-plos listen", TR_NOOP ("Listen")));
  2472. add (section (4, 546, 552, 168, TR_NOOP ("Equaliser")));
  2473. add (toggle (14, 568, 64, 20, "Vocal EQ", TR_NOOP ("On")));
  2474. add (toggle (60, 600, 90, 20, "Vocal HPF", TR_NOOP ("High-pass")));
  2475. add (dial (104, 660, 34, "Vocal HPF freq.", TR_NOOP ("Freq")));
  2476. add (toggle (210, 600, 90, 20, "Notch", TR_NOOP ("Notch")));
  2477. add (dial (220, 660, 34, "Notch gain", TR_NOOP ("Gain"), bipolar));
  2478. add (dial (300, 660, 34, "Notch freq.", TR_NOOP ("Freq")));
  2479. add (toggle (390, 600, 90, 20, "High band", TR_NOOP ("High band")));
  2480. add (dial (400, 660, 34, "High gain", TR_NOOP ("Gain"), bipolar));
  2481. add (dial (480, 660, 34, "High freq.", TR_NOOP ("Freq")));
  2482. l.items.push_back (toggle (8, 720, 300, 20, "Vocal strip", TR_NOOP ("Vocal strip voicing")));
  2483. return l;
  2484. }
  2485. Layout voiceShiftLayout()
  2486. {
  2487. // round 135: the voice manipulators' one-screen panel (the role: a small Soundtoys voice shifter, screenshot of the
  2488. // official trial): PITCH and FORMANT side by side with LINK between them and a read-out under each, the three
  2489. // MODE buttons in the middle, DRIVE and MIX on the right
  2490. Layout l;
  2491. l.width = 640;
  2492. l.height = 230;
  2493. auto& v = l.items;
  2494. v.push_back (section (4, 4, 300, 222, TR_NOOP ("Pitch / formant")));
  2495. v.push_back (knob (80, 100, 78, "Pitch", TR_NOOP ("Pitch"), 0, (std::uint16_t) (big | bipolar | noCaption)));
  2496. v.push_back (label (40, 28, 80, 16, TR_NOOP ("Pitch")));
  2497. v.push_back (value (44, 176, 72, 24, "Pitch", boxed));
  2498. v.push_back (toggle (124, 84, 56, 22, "Link", TR_NOOP ("Link")));
  2499. v.push_back (knob (228, 100, 78, "Formant", TR_NOOP ("Formant"), 0, (std::uint16_t) (big | bipolar | noCaption)));
  2500. v.push_back (label (188, 28, 80, 16, TR_NOOP ("Formant")));
  2501. v.push_back (value (192, 176, 72, 24, "Formant", boxed));
  2502. v.push_back (section (310, 4, 130, 222, TR_NOOP ("Mode")));
  2503. v.push_back (radio (322, 50, 110, 120, "Mode", TR_NOOP ("Transpose|Quantize|Robot")));
  2504. // round 137: MIDI control (the notes held on a Channel Rack channel set the pitch / the robot's note)
  2505. v.push_back (stepper (318, 178, 118, 34, "MIDI", TR_NOOP ("MIDI channel"), 129));
  2506. v.push_back (section (446, 4, 190, 222, nullptr, boxed));
  2507. v.push_back (dial (494, 100, 60, "Drive", TR_NOOP ("Drive"), big));
  2508. v.push_back (dial (588, 100, 60, "Mix", TR_NOOP ("Mix"), big));
  2509. return l;
  2510. }
  2511. // round 164d: the hardware insert's panel (LYNX's own; the roles: Pro Tools' H/W Insert and Nuendo's External FX): left
  2512. // to right the way the signal goes — SEND (where it leaves, how loud), RETURN (where it comes back, how loud, phase),
  2513. // their levels, the ROUND TRIP (the ping and its read-out) and the MIX.
  2514. Layout hardwareInsertLayout()
  2515. {
  2516. Layout l;
  2517. l.width = 784;
  2518. l.height = 236;
  2519. auto& v = l.items;
  2520. v.push_back (section (4, 4, 186, 228, TR_NOOP ("Send")));
  2521. v.push_back (label (16, 28, 162, 14, TR_NOOP ("Output"), alignLeft));
  2522. v.push_back (choiceMenu (16, 44, 162, 26, "Output", TR_NOOP ("Output"), "None|Out 1"));
  2523. v.push_back (toggle (16, 80, 162, 18, "Output mono", TR_NOOP ("Mono (L+R to one output)")));
  2524. v.push_back (dial (97, 148, 62, "Send", TR_NOOP ("Send"), big));
  2525. v.push_back (section (194, 4, 186, 228, TR_NOOP ("Return")));
  2526. v.push_back (label (206, 28, 162, 14, TR_NOOP ("Input"), alignLeft));
  2527. v.push_back (choiceMenu (206, 44, 162, 26, "Input", TR_NOOP ("Input"), "None|In 1"));
  2528. v.push_back (toggle (206, 80, 162, 18, "Input stereo", TR_NOOP ("Stereo pair")));
  2529. v.push_back (dial (256, 148, 62, "Return", TR_NOOP ("Return"), big));
  2530. v.push_back (toggle (304, 138, 66, 22, "Invert", TR_NOOP ("Invert")));
  2531. v.push_back (section (384, 4, 114, 228, TR_NOOP ("Levels")));
  2532. auto io = display (392, 26, 98, 198, "iometer");
  2533. io.steps = 2; // send / return peaks
  2534. v.push_back (io);
  2535. v.push_back (section (502, 4, 180, 228, TR_NOOP ("Round trip")));
  2536. v.push_back (display (510, 26, 164, 96, "hwping"));
  2537. v.push_back (toggle (510, 130, 164, 26, "Ping", TR_NOOP ("Ping"), momentary));
  2538. v.push_back (stepper (510, 184, 164, 34, "Round trip", TR_NOOP ("Delay (samples)"), 65536));
  2539. v.push_back (section (686, 4, 94, 228, TR_NOOP ("Mix")));
  2540. v.push_back (dial (733, 100, 62, "Dry/wet", TR_NOOP ("Dry/wet"), big));
  2541. return l;
  2542. }
  2543. // --- LYNX's reverbs (REA round 100): own panels, the same conventions as the mixing suite. The algorithm / type
  2544. // menu sits top-left with the Mix, the time controls (pre-delay, decay, size) in the middle, colour and
  2545. // modulation to the right. -------------------------------------------------------------------------------------
  2546. LayoutItem choiceMenu (float x, float y, float w, float h, const char* param, const char* caption, const char* options)
  2547. {
  2548. LayoutItem i;
  2549. i.type = Item::menu;
  2550. i.x = x, i.y = y, i.w = w, i.h = h;
  2551. i.param = param;
  2552. i.label = caption;
  2553. i.options = options;
  2554. return i;
  2555. }
  2556. // The reverbs keep the reference plugins' layout logic (REA round 100, screenshots of the official demos in
  2557. // tmp/valh100/ref): the same control groups in the same order — mix and pre-delay first, the decay as the largest
  2558. // control, then grouped boxes, the algorithm / mode menu along the bottom — drawn in LYNX's own style.
  2559. // round 114: the reference reverbs / delays write each knob's name above it and its value under it
  2560. Layout captionsAbove (Layout l)
  2561. {
  2562. for (auto& i : l.items)
  2563. if (i.type == Item::knob && (i.style & showValue) != 0 && (i.style & noCaption) == 0)
  2564. {
  2565. i.style = (std::uint16_t) (i.style | captionAbove);
  2566. i.y -= 14.0f;
  2567. }
  2568. return l;
  2569. }
  2570. Layout epochVerbLayout()
  2571. {
  2572. // Mix / Predelay · big Decay · Damping (2 × 2) · Shape · Diffusion · Modulation · EQ; Mode and Color menus below
  2573. Layout l;
  2574. l.width = 796;
  2575. l.height = 300;
  2576. auto& v = l.items;
  2577. v.push_back (section (8, 8, 92, 244, nullptr, boxed));
  2578. v.push_back (dial (54, 50, 40, "Mix", TR_NOOP ("Mix")));
  2579. v.push_back (dial (54, 164, 40, "Predelay", TR_NOOP ("Predelay")));
  2580. v.push_back (section (104, 8, 132, 244, nullptr, boxed));
  2581. v.push_back (dial (170, 104, 92, "Decay", TR_NOOP ("Decay"), big));
  2582. v.push_back (section (240, 8, 176, 244, TR_NOOP ("Damping")));
  2583. v.push_back (dial (284, 64, 36, "High freq", TR_NOOP ("High freq")));
  2584. v.push_back (dial (372, 64, 36, "High shelf", TR_NOOP ("High shelf"), bipolar));
  2585. v.push_back (dial (284, 168, 36, "Bass xover", TR_NOOP ("Bass freq")));
  2586. v.push_back (dial (372, 168, 36, "Bass mult", TR_NOOP ("Bass mult")));
  2587. v.push_back (section (420, 8, 88, 244, TR_NOOP ("Shape")));
  2588. v.push_back (dial (464, 64, 36, "Size", TR_NOOP ("Size")));
  2589. v.push_back (dial (464, 168, 36, "Attack", TR_NOOP ("Attack")));
  2590. v.push_back (section (512, 8, 88, 244, TR_NOOP ("Diffusion")));
  2591. v.push_back (dial (556, 64, 36, "Early diffusion", TR_NOOP ("Early")));
  2592. v.push_back (dial (556, 168, 36, "Late diffusion", TR_NOOP ("Late")));
  2593. v.push_back (section (604, 8, 88, 244, TR_NOOP ("Mod")));
  2594. v.push_back (dial (648, 64, 36, "Mod rate", TR_NOOP ("Rate")));
  2595. v.push_back (dial (648, 168, 36, "Mod depth", TR_NOOP ("Depth")));
  2596. v.push_back (section (696, 8, 92, 244, TR_NOOP ("EQ")));
  2597. v.push_back (dial (742, 64, 36, "High cut", TR_NOOP ("High cut")));
  2598. v.push_back (dial (742, 168, 36, "Low cut", TR_NOOP ("Low cut")));
  2599. v.push_back (label (8, 264, 52, 24, TR_NOOP ("Mode"), alignLeft));
  2600. v.push_back (choiceMenu (60, 264, 200, 24, "Mode", TR_NOOP ("Mode"),
  2601. TR_NOOP ("Concert Hall|Plate|Room|Chamber|Random Space|Chorus Space|Ambience|Bright Hall|Nave|Grit Hall|Grit Plate|Smooth Plate|Smooth Room|Smooth Space|Gated|Drift Chamber|Drift Hall|Drift Space|Cathedral|Grand Hall|Vintage Chamber|Vintage Hall")));
  2602. v.push_back (label (290, 264, 52, 24, TR_NOOP ("Color"), alignLeft));
  2603. v.push_back (choiceMenu (342, 264, 120, 24, "Color", TR_NOOP ("Color"), TR_NOOP ("1970s|1980s|Now")));
  2604. return l;
  2605. }
  2606. Layout atriumLayout()
  2607. {
  2608. // six vertical faders on the left (mix, pre-delay, decay, low cut, high cut, depth = early / late balance); on the
  2609. // right the EARLY or the LATE controls, switched by two tabs as on the reference (round 129; the two sections were
  2610. // side by side before); the reverb mode menu below
  2611. Layout l;
  2612. l.width = 640;
  2613. l.height = 300;
  2614. l.pages = { TR_NOOP ("Early"), TR_NOOP ("Late") };
  2615. auto& v = l.items;
  2616. v.push_back (section (8, 8, 330, 244, nullptr, boxed));
  2617. const char* faders[] = { "Mix", "Predelay", "Decay", "Low cut", "High cut", "Early/late" };
  2618. const char* captions[] = { TR_NOOP ("Mix"), TR_NOOP ("Predelay"), TR_NOOP ("Decay"), TR_NOOP ("Low cut"), TR_NOOP ("High cut"), TR_NOOP ("Depth") };
  2619. for (int i = 0; i < 6; ++i)
  2620. {
  2621. const auto x = 16.0f + 53.0f * (float) i;
  2622. v.push_back (slider (Item::vslider, x + 8.0f, 18, 32, 196, faders[i], captions[i]));
  2623. v.push_back (value (x, 222, 48, 16, faders[i], 0));
  2624. }
  2625. v.push_back (section (342, 8, 290, 244, nullptr, boxed));
  2626. v.push_back (pageTabs (352, 16, 270, 22, TR_NOOP ("Early|Late")));
  2627. v.push_back (onPage (dial (392, 84, 34, "Early size", TR_NOOP ("Size")), 0));
  2628. v.push_back (onPage (dial (456, 84, 34, "Early cross", TR_NOOP ("Cross")), 0));
  2629. v.push_back (onPage (dial (520, 84, 34, "Early mod rate", TR_NOOP ("Mod rate")), 0));
  2630. v.push_back (onPage (dial (584, 84, 34, "Early mod depth", TR_NOOP ("Mod depth")), 0));
  2631. v.push_back (onPage (dial (392, 184, 34, "Early send", TR_NOOP ("Send")), 0));
  2632. v.push_back (onPage (dial (456, 184, 34, "Diffusion", TR_NOOP ("Diffusion")), 0));
  2633. v.push_back (onPage (dial (520, 184, 34, "Space", TR_NOOP ("Space")), 0));
  2634. v.push_back (onPage (dial (392, 84, 34, "Late size", TR_NOOP ("Size")), 1));
  2635. v.push_back (onPage (dial (456, 84, 34, "Late cross", TR_NOOP ("Cross")), 1));
  2636. v.push_back (onPage (dial (520, 84, 34, "Late mod rate", TR_NOOP ("Mod rate")), 1));
  2637. v.push_back (onPage (dial (584, 84, 34, "Late mod depth", TR_NOOP ("Mod depth")), 1));
  2638. v.push_back (onPage (dial (392, 184, 34, "Bass mult", TR_NOOP ("Bass mult")), 1));
  2639. v.push_back (onPage (dial (456, 184, 34, "Bass xover", TR_NOOP ("Bass xover")), 1));
  2640. v.push_back (onPage (dial (520, 184, 34, "High mult", TR_NOOP ("High mult")), 1));
  2641. v.push_back (onPage (dial (584, 184, 34, "High xover", TR_NOOP ("High xover")), 1));
  2642. v.push_back (label (8, 264, 92, 24, TR_NOOP ("Reverb mode"), alignLeft));
  2643. v.push_back (choiceMenu (102, 264, 200, 24, "Type", TR_NOOP ("Type"),
  2644. TR_NOOP ("Large Room|Medium Room|Bright Room|Large Chamber|Dark Room|Dark Chamber|Dark Space|Deep Space|Mirror Space|Vast Space|Distant Space|Dense Room")));
  2645. return l;
  2646. }
  2647. Layout foilPlateLayout()
  2648. {
  2649. // Mix / Predelay · big Decay · Size / Width · EQ (2 × 2) · Mod; the plate type below. Round 152: a second view,
  2650. // "Plate" — the one-knob panel of the Little Plate role (the reference's Decay in the middle, Low Cut and Mod beside
  2651. // it, Mix), chosen by the View switch (the Little Plate substitute opens in it)
  2652. Layout l;
  2653. l.width = 720;
  2654. l.height = 316;
  2655. auto& v = l.items;
  2656. const auto full = [&] (LayoutItem it) { it.whenParam = "View"; it.whenMin = 0.0f; it.whenMax = 0.5f; v.push_back (it); };
  2657. const auto plate = [&] (LayoutItem it) { it.whenParam = "View"; it.whenMin = 0.5f; it.whenMax = 1.0f; v.push_back (it); };
  2658. full (section (8, 8, 92, 244, nullptr, boxed));
  2659. full (dial (54, 50, 40, "Mix", TR_NOOP ("Mix")));
  2660. full (dial (54, 164, 40, "Predelay", TR_NOOP ("Predelay")));
  2661. full (section (104, 8, 200, 244, nullptr, boxed));
  2662. full (dial (204, 100, 120, "Decay", TR_NOOP ("Decay"), big));
  2663. full (section (308, 8, 92, 244, nullptr, boxed));
  2664. full (dial (354, 50, 40, "Size", TR_NOOP ("Size")));
  2665. full (dial (354, 164, 40, "Width", TR_NOOP ("Width")));
  2666. full (section (404, 8, 200, 244, TR_NOOP ("EQ")));
  2667. full (dial (454, 64, 36, "Low EQ freq", TR_NOOP ("Low freq")));
  2668. full (dial (554, 64, 36, "High EQ freq", TR_NOOP ("High freq")));
  2669. full (dial (454, 168, 36, "Low EQ gain", TR_NOOP ("Low gain"), bipolar));
  2670. full (dial (554, 168, 36, "High EQ gain", TR_NOOP ("High gain"), bipolar));
  2671. full (section (608, 8, 104, 244, TR_NOOP ("Mod")));
  2672. full (dial (660, 64, 36, "Mod rate", TR_NOOP ("Rate")));
  2673. full (dial (660, 168, 36, "Mod depth", TR_NOOP ("Depth")));
  2674. // round 135 (the Little Plate role): the decay's ∞ and a low cut
  2675. full (toggle (330, 266, 90, 22, "Infinite", TR_NOOP ("Infinite")));
  2676. full (dial (470, 274, 22, "Low cut", TR_NOOP ("Low cut")));
  2677. // round 150: the measured plate voicing (the Little Plate role: no plate delay, its decay per band)
  2678. full (toggle (560, 266, 150, 22, "Voicing", TR_NOOP ("Measured plate")));
  2679. full (label (8, 264, 52, 24, TR_NOOP ("Mode"), alignLeft));
  2680. full (choiceMenu (60, 264, 180, 24, "Type", TR_NOOP ("Type"), TR_NOOP ("Silver|Pewter|Nickel|Bronze|Bismuth|Tin|Zinc|Platinum|Tungsten|Iron|Gold|Lead")));
  2681. // round 152: the Plate view — Low Cut on the left, the big Decay (its ∞ under it), Mod and Mix on the right
  2682. plate (section (8, 8, 704, 244, nullptr, boxed));
  2683. plate (dial (140, 120, 52, "Low cut", TR_NOOP ("Low cut")));
  2684. plate (dial (360, 112, 132, "Decay", TR_NOOP ("Decay"), big));
  2685. plate (toggle (315, 228, 90, 20, "Infinite", TR_NOOP ("Infinite")));
  2686. plate (dial (556, 70, 36, "Mod depth", TR_NOOP ("Mod")));
  2687. plate (dial (556, 176, 44, "Mix", TR_NOOP ("Mix")));
  2688. plate (toggle (24, 222, 150, 22, "Voicing", TR_NOOP ("Measured plate")));
  2689. v.push_back (tabs (560, 292, 150, 20, "View", TR_NOOP ("Full|Plate")));
  2690. return l;
  2691. }
  2692. Layout nebulaLayout()
  2693. {
  2694. // Mix / Width · big Delay and Warp with the sync menu under them · Feedback / Density · Mod · EQ; mode below
  2695. Layout l;
  2696. l.width = 704;
  2697. l.height = 300;
  2698. auto& v = l.items;
  2699. v.push_back (section (8, 8, 92, 244, nullptr, boxed));
  2700. v.push_back (dial (54, 50, 40, "Mix", TR_NOOP ("Mix")));
  2701. v.push_back (dial (54, 164, 40, "Width", TR_NOOP ("Width"), bipolar));
  2702. v.push_back (section (104, 8, 284, 244, nullptr, boxed));
  2703. v.push_back (dial (176, 84, 84, "Delay", TR_NOOP ("Delay"), big));
  2704. v.push_back (dial (316, 84, 84, "Warp", TR_NOOP ("Warp"), big));
  2705. v.push_back (tabs (114, 216, 168, 24, "Sync", TR_NOOP ("ms|Note|Dotted|Triplet")));
  2706. v.push_back (toggle (290, 186, 88, 22, "Clear", TR_NOOP ("Clear"), plugui::momentary));
  2707. v.push_back (choiceMenu (290, 216, 88, 24, "Note", TR_NOOP ("Note"), "1/64|1/32|1/16|1/8|1/4|1/2|1/1"));
  2708. v.push_back (section (392, 8, 100, 244, nullptr, boxed));
  2709. v.push_back (dial (442, 50, 40, "Feedback", TR_NOOP ("Feedback")));
  2710. v.push_back (dial (442, 164, 40, "Density", TR_NOOP ("Density")));
  2711. v.push_back (section (496, 8, 100, 244, TR_NOOP ("Mod")));
  2712. v.push_back (dial (546, 64, 36, "Mod rate", TR_NOOP ("Rate")));
  2713. v.push_back (dial (546, 168, 36, "Mod depth", TR_NOOP ("Depth")));
  2714. v.push_back (section (600, 8, 96, 244, TR_NOOP ("EQ")));
  2715. v.push_back (dial (648, 64, 36, "High cut", TR_NOOP ("High")));
  2716. v.push_back (dial (648, 168, 36, "Low cut", TR_NOOP ("Low")));
  2717. v.push_back (label (8, 264, 52, 24, TR_NOOP ("Mode"), alignLeft));
  2718. v.push_back (choiceMenu (60, 264, 180, 24, "Mode", TR_NOOP ("Mode"),
  2719. TR_NOOP ("Ripple|Swell|Fold|Drift|Abyss|Vortex|Glint|Pulse|Expanse|Haze|Veil|Mist|Monolith|Eternity|Tide|Shoal|Spark|Plateau|Dusk|Mirage|Cluster|Beacon")));
  2720. return l;
  2721. }
  2722. Layout haloLayout()
  2723. {
  2724. // one row of nine knobs in signal order (mix, shift, feedback, diffusion, size, low cut, high cut, mod rate, mod
  2725. // depth), the three mode menus below
  2726. Layout l;
  2727. l.width = 680;
  2728. l.height = 200;
  2729. auto& v = l.items;
  2730. v.push_back (section (8, 8, 664, 140, nullptr, boxed));
  2731. const char* knobs[] = { "Mix", "Shift", "Feedback", "Diffusion", "Size", "Low cut", "High cut", "Mod rate", "Mod depth" };
  2732. const char* captions[] = { TR_NOOP ("Mix"), TR_NOOP ("Shift"), TR_NOOP ("Feedback"), TR_NOOP ("Diffusion"), TR_NOOP ("Size"),
  2733. TR_NOOP ("Low cut"), TR_NOOP ("High cut"), TR_NOOP ("Mod rate"), TR_NOOP ("Mod depth") };
  2734. for (int i = 0; i < 9; ++i)
  2735. v.push_back (dial (46.0f + 73.0f * (float) i, 56, 44, knobs[i], captions[i], i == 1 ? bipolar : 0));
  2736. v.push_back (label (8, 160, 86, 24, TR_NOOP ("Reverb mode"), alignLeft));
  2737. // round 135: the reference's four modes (mono in, three stereo sizes) first, LYNX's own three after them; ◀ ▶
  2738. auto mode = choiceMenu (94, 160, 136, 24, "Reverb mode", TR_NOOP ("Reverb mode"),
  2739. TR_NOOP ("Mono|Small stereo|Medium stereo|Big stereo|Wide|Dense|Bright"));
  2740. mode.values = { 0.125f, 0.25f, 0.375f, 0.625f, 0.0f, 0.5f, 1.0f }; // verbs::haloModeIndex (Wide / Dense / Bright keep 0 / ½ / 1)
  2741. v.push_back (mode);
  2742. v.push_back (label (240, 160, 82, 24, TR_NOOP ("Pitch mode"), alignLeft));
  2743. v.push_back (choiceMenu (322, 160, 160, 24, "Shift mode", TR_NOOP ("Pitch mode"), TR_NOOP ("Single|Dual|Single, bright|Dual, bright|No shift")));
  2744. v.push_back (label (500, 160, 60, 24, TR_NOOP ("Color"), alignLeft));
  2745. v.push_back (choiceMenu (560, 160, 112, 24, "Color", TR_NOOP ("Color"), TR_NOOP ("Bright|Dark")));
  2746. return l;
  2747. }
  2748. Layout horizonLayout()
  2749. {
  2750. // Mix / Width · Echo box (big Delay with its sync menu, Feedback / Level, Drive / Spread) · Reverb box (big Decay
  2751. // with the routing switch, Size / Level, Early-late / Density) · Mod · EQ; echo mode, reverb mode, color below
  2752. Layout l;
  2753. l.width = 980;
  2754. l.height = 300;
  2755. auto& v = l.items;
  2756. v.push_back (section (8, 8, 92, 244, nullptr, boxed));
  2757. v.push_back (dial (54, 50, 40, "Mix", TR_NOOP ("Mix")));
  2758. v.push_back (dial (54, 164, 40, "Width", TR_NOOP ("Width"), bipolar));
  2759. v.push_back (section (104, 8, 320, 244, TR_NOOP ("Echo")));
  2760. v.push_back (dial (172, 84, 76, "Echo time", TR_NOOP ("Delay"), big));
  2761. v.push_back (tabs (112, 192, 120, 22, "Echo sync", TR_NOOP ("ms|Note|Dotted|Triplet")));
  2762. v.push_back (choiceMenu (112, 220, 120, 22, "Echo note", TR_NOOP ("Note"), "1/64|1/32|1/16|1/8|1/4|1/2"));
  2763. v.push_back (dial (290, 64, 34, "Echo feedback", TR_NOOP ("Feedback")));
  2764. v.push_back (dial (370, 64, 34, "Echo level", TR_NOOP ("Level")));
  2765. // round 135: only the controls the echo / reverb mode uses are shown, in the same place (the reference: Drive in
  2766. // Clean / Tape / Digital / Analog / Lo-fi, Detune in the pitch modes; Attack instead of Early / late in Space and
  2767. // Freeze) [EXEC: the trial's editor in every mode]
  2768. constexpr float pitchLo = 3.5f / 11.0f, pitchHi = 10.5f / 11.0f; // echo modes 4 … 10 (choice (v, 12))
  2769. v.push_back (when (dial (290, 168, 34, "Echo drive", TR_NOOP ("Drive")), "Echo mode", 0.0f, pitchLo));
  2770. v.push_back (when (dial (290, 168, 34, "Echo drive", TR_NOOP ("Drive")), "Echo mode", pitchHi, 1.0f));
  2771. v.push_back (when (dial (290, 168, 34, "Echo detune", TR_NOOP ("Detune"), bipolar), "Echo mode", pitchLo, pitchHi));
  2772. v.push_back (dial (370, 168, 34, "Echo spread", TR_NOOP ("Spread")));
  2773. v.push_back (section (428, 8, 320, 244, TR_NOOP ("Reverb")));
  2774. v.push_back (dial (496, 84, 76, "Decay", TR_NOOP ("Decay"), big));
  2775. v.push_back (tabs (436, 206, 120, 34, "Routing", TR_NOOP ("Echo > Rev|Rev > Echo")));
  2776. v.push_back (dial (614, 64, 34, "Size", TR_NOOP ("Size")));
  2777. v.push_back (dial (694, 64, 34, "Reverb level", TR_NOOP ("Level")));
  2778. constexpr float attackLo = 4.5f / 7.0f, attackHi = 6.5f / 7.0f; // reverb modes 5 … 6 (choice (v, 8))
  2779. v.push_back (when (dial (614, 168, 34, "Early/late", TR_NOOP ("Early / late"), bipolar), "Reverb mode", 0.0f, attackLo));
  2780. v.push_back (when (dial (614, 168, 34, "Early/late", TR_NOOP ("Early / late"), bipolar), "Reverb mode", attackHi, 1.0f));
  2781. v.push_back (when (dial (614, 168, 34, "Attack", TR_NOOP ("Attack")), "Reverb mode", attackLo, attackHi));
  2782. v.push_back (dial (694, 168, 34, "Density", TR_NOOP ("Density")));
  2783. v.push_back (section (752, 8, 104, 244, TR_NOOP ("Mod")));
  2784. v.push_back (dial (804, 64, 36, "Mod rate", TR_NOOP ("Rate")));
  2785. v.push_back (dial (804, 168, 36, "Mod depth", TR_NOOP ("Depth")));
  2786. v.push_back (section (860, 8, 112, 244, TR_NOOP ("EQ")));
  2787. v.push_back (dial (916, 64, 36, "High EQ freq", TR_NOOP ("High cut")));
  2788. v.push_back (dial (916, 168, 36, "Low EQ freq", TR_NOOP ("Low cut")));
  2789. v.push_back (label (8, 264, 82, 24, TR_NOOP ("Echo mode"), alignLeft));
  2790. v.push_back (choiceMenu (92, 264, 170, 24, "Echo mode", TR_NOOP ("Echo mode"),
  2791. TR_NOOP ("Clean|Tape|Digital|Analog|Detune|Reverse|Reverse Up|Reverse Down|Reverse Up/Down|Sparkle|Swarm|Lo-fi")));
  2792. v.push_back (label (428, 264, 92, 24, TR_NOOP ("Reverb mode"), alignLeft));
  2793. v.push_back (choiceMenu (522, 264, 150, 24, "Reverb mode", TR_NOOP ("Reverb mode"), TR_NOOP ("Room|Chamber|Plate|Hall|Cathedral|Space|Freeze|Gated")));
  2794. v.push_back (label (752, 264, 52, 24, TR_NOOP ("Color"), alignLeft));
  2795. v.push_back (choiceMenu (806, 264, 166, 24, "Color", TR_NOOP ("Color"), TR_NOOP ("Bright|Neutral|Dark|Vintage")));
  2796. return l;
  2797. }
  2798. // --- LYNX originals: the delay / modulation suite (REA round 101) --------------------------------------------------
  2799. // option values of a parameter read as floor (v · n): the middle of each step
  2800. std::vector<float> stepCentres (int n, int first = 0, int count = -1)
  2801. {
  2802. std::vector<float> v;
  2803. for (int k = first; k < (count < 0 ? n : first + count); ++k)
  2804. v.push_back (((float) k + 0.5f) / (float) n);
  2805. return v;
  2806. }
  2807. LayoutItem stepped (LayoutItem i, int steps)
  2808. {
  2809. i.steps = steps;
  2810. return i;
  2811. }
  2812. LayoutItem menuOf (float x, float y, float w, float h, const char* param, const char* caption, const char* options, std::vector<float> values)
  2813. {
  2814. LayoutItem i;
  2815. i.type = Item::menu;
  2816. i.x = x, i.y = y, i.w = w, i.h = h;
  2817. i.param = param;
  2818. i.label = caption;
  2819. i.options = options;
  2820. i.values = std::move (values);
  2821. return i;
  2822. }
  2823. // The suite's panels follow the ergonomics of the plugins they are inspired by (round 101 UI rule: the same grouping
  2824. // and the same place for each control, drawn in LYNX's own style): a row of small sections left to right, the
  2825. // sections whose meaning depends on the style / mode swap their knobs in place.
  2826. Layout echoformLayout()
  2827. {
  2828. Layout l;
  2829. l.width = 950; // round 135w: + the TWEAK section and the output meter (was 780)
  2830. l.height = 446; // round 135w: + a second row of switches (was 300); round 137: + the Rhythm row (was 330);
  2831. // round 144: + the rhythm editor (was 352)
  2832. auto& v = l.items;
  2833. const auto top = 4.0f, h = 232.0f, k1 = 66.0f, k2 = 160.0f, d = 34.0f;
  2834. // mix + style
  2835. v.push_back (section (4, top, 80, h, TR_NOOP ("Mix")));
  2836. v.push_back (dial (44, k1, d, "Mix", TR_NOOP ("Mix")));
  2837. v.push_back (stepped (dial (44, k2, d, "Style", TR_NOOP ("Style")), 4));
  2838. // delay: the left time (ms or note) and the second knob of the style: spread, ratio, spacing or the right time
  2839. v.push_back (section (88, top, 188, h, TR_NOOP ("Delay")));
  2840. // round 129: "Delay L" when the style has a right time (dual, ping-pong), as on the reference
  2841. v.push_back (when (when (dial (138, 76, 54, "Time L", TR_NOOP ("Delay"), big), "Sync L", 0.0f, 0.5f), "Style", 0.0f, 0.6f));
  2842. v.push_back (when (when (stepped (dial (138, 76, 54, "Note L", TR_NOOP ("Delay"), big), 9), "Sync L", 0.5f, 1.0f), "Style", 0.0f, 0.6f));
  2843. v.push_back (when (when (dial (138, 76, 54, "Time L", TR_NOOP ("Delay L"), big), "Sync L", 0.0f, 0.5f), "Style", 0.6f, 1.0f));
  2844. v.push_back (when (when (stepped (dial (138, 76, 54, "Note L", TR_NOOP ("Delay L"), big), 9), "Sync L", 0.5f, 1.0f), "Style", 0.6f, 1.0f));
  2845. v.push_back (when (dial (228, 76, 54, "Spread", TR_NOOP ("Spread"), (std::uint16_t) (big | bipolar)), "Style", 0.0f, 0.2f));
  2846. v.push_back (when (dial (228, 76, 54, "Ratio", TR_NOOP ("Ratio"), big), "Style", 0.2f, 0.4f));
  2847. v.push_back (when (dial (228, 76, 54, "Spacing", TR_NOOP ("Spacing"), (std::uint16_t) (big | bipolar)), "Style", 0.4f, 0.6f));
  2848. v.push_back (when (when (dial (228, 76, 54, "Time R", TR_NOOP ("Delay R"), big), "Style", 0.6f, 1.0f), "Sync R", 0.0f, 0.5f));
  2849. v.push_back (when (when (stepped (dial (228, 76, 54, "Note R", TR_NOOP ("Delay R"), big), 9), "Style", 0.6f, 1.0f), "Sync R", 0.5f, 1.0f));
  2850. const std::vector<float> syncValues { 0.25f, 0.5f, 0.75f, 1.0f };
  2851. v.push_back (menuOf (100, 150, 76, 20, "Sync L", TR_NOOP ("Sync"), TR_NOOP ("ms|Note|Dotted|Triplet"), syncValues));
  2852. v.push_back (when (menuOf (190, 150, 76, 20, "Sync R", TR_NOOP ("Sync"), TR_NOOP ("ms|Note|Dotted|Triplet"), syncValues), "Style", 0.6f, 1.0f));
  2853. // the echo train (round 137: in Rhythm mode, three passes of the pattern; round 144: edited in the rhythm editor below)
  2854. v.push_back (display (96, 180, 172, 50, "echotrain"));
  2855. // feedback + width
  2856. v.push_back (section (280, top, 80, h, TR_NOOP ("Feedback")));
  2857. v.push_back (dial (320, k1, d, "Feedback", TR_NOOP ("Feedback")));
  2858. v.push_back (dial (320, k2, d, "Width", TR_NOOP ("Width"), bipolar));
  2859. // colour
  2860. v.push_back (section (364, top, 80, h, TR_NOOP ("Colour")));
  2861. v.push_back (dial (404, k1, d, "Drive", TR_NOOP ("Drive")));
  2862. v.push_back (dial (404, k2, d, "Age", TR_NOOP ("Age")));
  2863. // diffusion
  2864. v.push_back (section (448, top, 80, h, TR_NOOP ("Diffusion")));
  2865. v.push_back (dial (488, k1, d, "Diffusion", TR_NOOP ("Amount")));
  2866. v.push_back (dial (488, k2, d, "Diffusion size", TR_NOOP ("Size")));
  2867. // modulation: wow / flutter (tape), rate / depth, shift / detune (shifter), pitch / detune (pitch, reverse, detune)
  2868. const auto tape = 1.0f / 12.0f, shifter = 8.0f / 12.0f, pitch = 9.0f / 12.0f, detune = 11.0f / 12.0f;
  2869. // round 129: the section is named after what it holds in the mode (the reference renames it FREQ / PITCH)
  2870. v.push_back (when (section (532, top, 80, h, TR_NOOP ("Mod")), "Mode", 0.0f, shifter));
  2871. v.push_back (when (section (532, top, 80, h, TR_NOOP ("Freq")), "Mode", shifter, pitch));
  2872. v.push_back (when (section (532, top, 80, h, TR_NOOP ("Pitch")), "Mode", pitch, 1.0f));
  2873. v.push_back (when (dial (572, k1, d, "Wow", TR_NOOP ("Wow")), "Mode", 0.0f, tape));
  2874. v.push_back (when (dial (572, k2, d, "Flutter", TR_NOOP ("Flutter")), "Mode", 0.0f, tape));
  2875. v.push_back (when (dial (572, k1, d, "Mod rate", TR_NOOP ("Rate")), "Mode", tape, shifter));
  2876. v.push_back (when (dial (572, k2, d, "Mod depth", TR_NOOP ("Depth")), "Mode", tape, shifter));
  2877. v.push_back (when (dial (572, k1, d, "Shift", TR_NOOP ("Shift"), bipolar), "Mode", shifter, pitch));
  2878. v.push_back (when (dial (572, k2, d, "Shift detune", TR_NOOP ("Detune"), bipolar), "Mode", shifter, pitch));
  2879. v.push_back (when (dial (572, k1, d, "Pitch", TR_NOOP ("Pitch"), bipolar), "Mode", pitch, detune));
  2880. v.push_back (when (dial (572, k2, d, "Pitch detune", TR_NOOP ("Detune"), bipolar), "Mode", pitch, 1.0f));
  2881. // EQ (high cut above the low cut, as on the hardware-style panels)
  2882. v.push_back (section (616, top, 80, h, TR_NOOP ("EQ")));
  2883. v.push_back (dial (656, k1, d, "High cut", TR_NOOP ("High")));
  2884. v.push_back (dial (656, k2, d, "Low cut", TR_NOOP ("Low")));
  2885. // ducking
  2886. v.push_back (section (700, top, 76, h, TR_NOOP ("Output")));
  2887. v.push_back (dial (738, k1, d, "Ducking", TR_NOOP ("Ducking")));
  2888. v.push_back (dial (738, k2, d, "Output", TR_NOOP ("Level"), bipolar)); // round 119
  2889. // round 119: ping-pong in pairs (shown with the ping-pong style)
  2890. v.push_back (when (toggle (280, 252, 90, 24, "Pairs", TR_NOOP ("Pairs")), "Style", 0.8f, 1.0f));
  2891. // round 129: the echoes' polarity per side (H-Delay's phase L / R) and a tap-tempo pad (sets the left time)
  2892. v.push_back (toggle (376, 254, 70, 20, "Phase L", TR_NOOP ("Phase L")));
  2893. v.push_back (toggle (452, 254, 70, 20, "Phase R", TR_NOOP ("Phase R")));
  2894. v.push_back (display (532, 252, 80, 24, "taptempo", "Time L", "Sync L"));
  2895. // round 124: the hybrid engine (H-Delay's measured loop)
  2896. v.push_back (label (620, 254, 48, 20, TR_NOOP ("Hybrid")));
  2897. v.push_back (menuOf (670, 252, 104, 24, "Hybrid", TR_NOOP ("Hybrid"), TR_NOOP ("Off|Clean|Analog"), { 0.0f, 0.5f, 1.0f }));
  2898. // round 136: the measured tape-echo loops (EchoBoy's role)
  2899. v.push_back (label (782, 254, 40, 20, TR_NOOP ("Tape")));
  2900. v.push_back (menuOf (824, 252, 122, 24, "Tape voicing", TR_NOOP ("Tape voicing"), TR_NOOP ("Off|Ping-pong tape|Studio tape|Studio tape hot"),
  2901. { 0.0f, 1.0f / 3.0f, 2.0f / 3.0f, 1.0f }));
  2902. // the mode selector along the bottom
  2903. v.push_back (label (8, 254, 52, 20, TR_NOOP ("Mode")));
  2904. v.push_back (menuOf (64, 252, 200, 24, "Mode", TR_NOOP ("Mode"),
  2905. TR_NOOP ("Tape|Lo-Fi|Hi-Fi tape|Bucket brigade|Analog|Digital|Clean|Phaser|Shifter|Pitch|Reverse|Detune"), stepCentres (12)));
  2906. // ---- round 135w (docs/PARITY.md: H-Delay, ValhallaDelay, EchoBoy / PrimalTap)
  2907. // TWEAK: EchoBoy's groove / feel / accent, its dual-mode cross feedback, the echoes' balance
  2908. v.push_back (section (780, top, 124, h, TR_NOOP ("Tweak")));
  2909. v.push_back (dial (812, 52, 26, "Groove", TR_NOOP ("Groove"), bipolar));
  2910. v.push_back (dial (812, 124, 26, "Feel", TR_NOOP ("Feel"), bipolar));
  2911. v.push_back (dial (812, 196, 26, "Accent", TR_NOOP ("Accent"), bipolar));
  2912. v.push_back (dial (872, 52, 26, "Cross feedback", TR_NOOP ("X-feed")));
  2913. v.push_back (dial (872, 124, 26, "Balance", TR_NOOP ("Balance"), bipolar));
  2914. v.push_back (toggle (848, 186, 52, 20, "Prime numbers", TR_NOOP ("Primes")));
  2915. // the echoes' output level with a clip lamp (H-Delay's meter)
  2916. v.push_back (section (908, top, 38, h, TR_NOOP ("Out")));
  2917. v.push_back (display (910, 24, 34, 208, "outmeter"));
  2918. // quad: Repeat / Swell where the right sync menu sits in the two-time styles, the four taps on the second row
  2919. v.push_back (when (tabs (190, 150, 76, 20, "Swell", TR_NOOP ("Repeat|Swell")), "Style", 0.4f, 0.6f));
  2920. v.push_back (when (label (8, 290, 40, 20, TR_NOOP ("Taps")), "Style", 0.4f, 0.6f));
  2921. v.push_back (when (toggle (48, 290, 34, 20, "Tap A", TR_NOOP ("A")), "Style", 0.4f, 0.6f));
  2922. v.push_back (when (toggle (86, 290, 34, 20, "Tap B", TR_NOOP ("B")), "Style", 0.4f, 0.6f));
  2923. v.push_back (when (toggle (124, 290, 34, 20, "Tap C", TR_NOOP ("C")), "Style", 0.4f, 0.6f));
  2924. v.push_back (when (toggle (162, 290, 34, 20, "Tap D", TR_NOOP ("D")), "Style", 0.4f, 0.6f));
  2925. // ping-pong: which side the first echo comes from
  2926. v.push_back (when (tabs (8, 290, 190, 20, "Start side", TR_NOOP ("Start left|Start right")), "Style", 0.8f, 1.0f));
  2927. // the tempo the note values follow: the project's or the echo's own BPM (H-Delay's BPM sync)
  2928. v.push_back (tabs (210, 290, 130, 20, "Tempo source", TR_NOOP ("Project|Own BPM")));
  2929. v.push_back (when (stepper (346, 290, 96, 20, "BPM", TR_NOOP ("BPM"), 270), "Tempo source", 0.5f, 1.0f));
  2930. v.push_back (toggle (452, 290, 110, 20, "Filter link", TR_NOOP ("Link EQ")));
  2931. v.push_back (toggle (570, 290, 100, 20, "Freeze", TR_NOOP ("Freeze")));
  2932. v.push_back (toggle (676, 290, 90, 20, "LoFi", TR_NOOP ("LoFi"))); // round 137: H-Delay's LoFi switch
  2933. // ---- round 137: EchoBoy's Rhythm echo mode (a pattern of evenly spaced taps the feedback replays every Length)
  2934. v.push_back (toggle (8, 320, 74, 20, "Rhythm", TR_NOOP ("Rhythm")));
  2935. v.push_back (when (menuOf (88, 320, 76, 20, "Rhythm sync", TR_NOOP ("Spacing"), TR_NOOP ("ms|Note|Dotted|Triplet"), syncValues), "Rhythm", 0.5f, 1.0f));
  2936. v.push_back (when (when (stepper (170, 320, 90, 20, "Rhythm note", TR_NOOP ("Note"), 9), "Rhythm sync", 0.5f, 1.0f), "Rhythm", 0.5f, 1.0f));
  2937. v.push_back (when (when (slider (Item::hslider, 170, 322, 90, 16, "Rhythm time", nullptr, noCaption), "Rhythm sync", 0.0f, 0.49f), "Rhythm", 0.5f, 1.0f));
  2938. v.push_back (when (stepper (324, 320, 70, 20, "Repeats", TR_NOOP ("Repeats"), 15), "Rhythm", 0.5f, 1.0f));
  2939. v.push_back (when (label (402, 320, 44, 20, TR_NOOP ("Decay")), "Rhythm", 0.5f, 1.0f));
  2940. v.push_back (when (slider (Item::hslider, 448, 322, 100, 16, "Decay", nullptr, noCaption), "Rhythm", 0.5f, 1.0f));
  2941. v.push_back (when (value (552, 320, 56, 20, "Decay"), "Rhythm", 0.5f, 1.0f));
  2942. v.push_back (when (stepper (666, 320, 96, 20, "Length", TR_NOOP ("Length"), 7), "Rhythm", 0.5f, 1.0f));
  2943. // round 137: ValhallaDelay's Era (the loop's bandwidth per mode), bottom right
  2944. v.push_back (tabs (770, 320, 176, 20, "Era", TR_NOOP ("Past|Present|Future"), { 0.0f, 0.5f, 1.0f }));
  2945. // ---- round 144: the rhythm editor (EchoBoy's role: pattern presets, taps at their own times or on a grid): the
  2946. // taps on the pattern's time axis — drag a tap up / down for its level, sideways for its time (Free / Grid)
  2947. v.push_back (when (section (4, 346, 942, 96, TR_NOOP ("Rhythm editor")), "Rhythm", 0.5f, 1.0f));
  2948. v.push_back (when (tabs (10, 366, 156, 20, "Rhythm edit", TR_NOOP ("Even|Free|Grid"), { 0.0f, 0.5f, 1.0f }), "Rhythm", 0.5f, 1.0f));
  2949. v.push_back (when (when (stepper (10, 390, 156, 20, "Rhythm grid", TR_NOOP ("Grid"), 5), "Rhythm edit", 0.67f, 1.0f), "Rhythm", 0.5f, 1.0f));
  2950. v.push_back (when (menuOf (10, 414, 76, 20, "Rhythm shape", TR_NOOP ("Shape"), TR_NOOP ("Decay|Reverse|Swell|Fade|Nonlin"), stepCentres (5)), "Rhythm", 0.5f, 1.0f));
  2951. v.push_back (when (display (90, 414, 76, 20, "rhythmpatterns"), "Rhythm", 0.5f, 1.0f));
  2952. v.push_back (when (display (172, 364, 768, 72, "rhythmedit"), "Rhythm", 0.5f, 1.0f));
  2953. // ---- round 144: with Rhythm off the same row holds the Style Edit role (EchoBoy's): the echo path's input level, the
  2954. // EQ inside the loop, the feedback balance, the diffusion's place and the LFO's wave / sync
  2955. const auto off = [] (LayoutItem i) { return when (std::move (i), "Rhythm", 0.0f, 0.49f); };
  2956. v.push_back (off (section (4, 346, 942, 96, TR_NOOP ("Style edit"))));
  2957. v.push_back (off (dial (52, 396, 24, "Input level", TR_NOOP ("Input"), bipolar)));
  2958. v.push_back (off (dial (132, 396, 24, "Loop bass", TR_NOOP ("Bass"), bipolar)));
  2959. v.push_back (off (dial (202, 396, 24, "Loop mid", TR_NOOP ("Mid"), bipolar)));
  2960. v.push_back (off (dial (272, 396, 24, "Loop treble", TR_NOOP ("Treble"), bipolar)));
  2961. v.push_back (off (dial (352, 396, 24, "FB balance", TR_NOOP ("FB bal."), bipolar)));
  2962. v.push_back (off (label (420, 372, 70, 20, TR_NOOP ("Diffusion"))));
  2963. v.push_back (off (tabs (492, 372, 130, 20, "Diffusion post", TR_NOOP ("Loop|Post"), { 0.0f, 1.0f })));
  2964. v.push_back (off (label (420, 404, 70, 20, TR_NOOP ("Wobble"))));
  2965. v.push_back (off (menuOf (492, 402, 130, 20, "Mod shape", TR_NOOP ("Shape"), TR_NOOP ("Sine|Triangle|Square|Saw|Random"), stepCentres (5))));
  2966. v.push_back (off (label (640, 404, 40, 20, TR_NOOP ("Sync"))));
  2967. v.push_back (off (menuOf (682, 402, 110, 20, "Mod sync", TR_NOOP ("Sync"), TR_NOOP ("Free|1/16|1/8|1/4|1/2|1 bar|2 bars"), stepCentres (7))));
  2968. // ---- round 147: the measured echo voicings (EchoBoy's style role), the saturation curve and PrimalTap's Multiply
  2969. {
  2970. std::vector<float> voicings;
  2971. for (int k = 0; k <= echosuite::echoform::voicingCount; ++k)
  2972. voicings.push_back (echosuite::echoform::voicingValue (k));
  2973. v.push_back (off (label (640, 372, 52, 20, TR_NOOP ("Voicing"))));
  2974. v.push_back (off (menuOf (694, 372, 100, 20, "Echo voicing", TR_NOOP ("Echo voicing"),
  2975. TR_NOOP ("Off|Mastering reel|Studio reel|Cartridge echo|Multi-head tape|Valve tape|Worn cassette|Pedal BBD|"
  2976. "Compact BBD|Oil drum|Magnetic drum|Phone line|Medium wave|Broadcast FM|Distant station|"
  2977. "Walkie-talkie|Pristine digital|Warm analog|Digital ensemble|Analog ensemble|Pedal ensemble|"
  2978. "Seasick|Hot glow|Thick|Battered|Squashed|Fuzzed|Honky|Haze|Smeared|Scattered|Roomy"),
  2979. voicings)));
  2980. std::vector<float> types;
  2981. for (int k = 0; k <= echosuite::echoform::satTypeCount; ++k)
  2982. types.push_back (echosuite::echoform::satTypeValue (k));
  2983. v.push_back (off (label (800, 372, 38, 20, TR_NOOP ("Sat."))));
  2984. v.push_back (off (menuOf (840, 372, 100, 20, "Saturation type", TR_NOOP ("Saturation type"),
  2985. TR_NOOP ("Auto|Clean|Tape|Tube|Squash|Grit|Ceiling"), types)));
  2986. v.push_back (off (label (800, 402, 38, 20, TR_NOOP ("Mult."))));
  2987. v.push_back (off (tabs (840, 402, 100, 20, "Multiply", TR_NOOP ("1x|2x|4x|8x"), { 0.0f, 1.0f / 3.0f, 2.0f / 3.0f, 1.0f })));
  2988. // round 150: the voicing's measured stereo behaviour (L/R offset in Single / Dual, the ping-pong law) and the
  2989. // offset itself (EchoBoy's Tweak L/R Offset), on the Rhythm row while Rhythm is off and a voicing is chosen
  2990. const auto withVoicing = [&off] (LayoutItem i) { return off (when (std::move (i), "Echo voicing", 0.5f / 31.0f, 1.0f)); };
  2991. v.push_back (withVoicing (label (380, 320, 50, 20, TR_NOOP ("Stereo"))));
  2992. v.push_back (withVoicing (tabs (432, 320, 130, 20, "Voicing stereo", TR_NOOP ("Classic|Measured"), { 0.0f, 1.0f })));
  2993. v.push_back (withVoicing (label (572, 320, 68, 20, TR_NOOP ("L/R offset"))));
  2994. v.push_back (withVoicing (slider (Item::hslider, 642, 322, 70, 16, "L/R offset", nullptr, noCaption)));
  2995. v.push_back (withVoicing (value (714, 320, 52, 20, "L/R offset")));
  2996. }
  2997. return l;
  2998. }
  2999. Layout spiralLayout()
  3000. {
  3001. Layout l;
  3002. l.width = 530;
  3003. l.height = 210;
  3004. auto& v = l.items;
  3005. v.push_back (section (4, 4, 522, 202, nullptr, boxed));
  3006. v.push_back (dial (54, 74, 46, "Mix", TR_NOOP ("Mix")));
  3007. v.push_back (dial (134, 74, 46, "Delay", TR_NOOP ("Delay")));
  3008. v.push_back (dial (232, 82, 82, "Shift", TR_NOOP ("Shift"), (std::uint16_t) (big | bipolar)));
  3009. v.push_back (dial (330, 74, 46, "Feedback", TR_NOOP ("Feedback")));
  3010. v.push_back (dial (402, 74, 46, "Low cut", TR_NOOP ("Low cut")));
  3011. v.push_back (dial (474, 74, 46, "High cut", TR_NOOP ("High cut")));
  3012. std::vector<float> syncValues;
  3013. for (int k = 0; k < 24; ++k)
  3014. syncValues.push_back (((float) k + 0.5f) / 23.0f);
  3015. syncValues.back() = 1.0f;
  3016. v.push_back (label (14, 170, 74, 18, TR_NOOP ("Delay sync")));
  3017. v.push_back (menuOf (90, 168, 100, 22, "Sync", TR_NOOP ("Delay sync"),
  3018. TR_NOOP ("Free|1/64|1/32|1/16|1/8|1/4|1/2|1/1|2/1|1/64.|1/32.|1/16.|1/8.|1/4.|1/2.|1/1.|1/64T|1/32T|1/16T|1/8T|1/4T|1/2T|1/1T|2/1T"),
  3019. syncValues));
  3020. v.push_back (label (300, 170, 76, 18, TR_NOOP ("Output")));
  3021. v.push_back (menuOf (380, 168, 100, 22, "Stereo", TR_NOOP ("Output"), TR_NOOP ("Mono|Stereo"), { 0.0f, 1.0f }));
  3022. return l;
  3023. }
  3024. Layout orbitLayout()
  3025. {
  3026. Layout l;
  3027. l.width = 470;
  3028. l.height = 200;
  3029. auto& v = l.items;
  3030. v.push_back (section (4, 4, 462, 192, nullptr, boxed));
  3031. const char* params[5] = { "Mix", "Rate", "Depth", "Feedback", "Manual" };
  3032. const char* captions[5] = { TR_NOOP ("Mix"), TR_NOOP ("Rate"), TR_NOOP ("Depth"), TR_NOOP ("Feedback"), TR_NOOP ("Manual") };
  3033. for (int k = 0; k < 5; ++k)
  3034. {
  3035. auto knobItem = dial (52.0f + 91.5f * (float) k, 70, 52, params[k], captions[k], k == 1 || k >= 3 ? bipolar : 0);
  3036. knobItem.colour = k; // each knob in its own colour, as one row of five distinct controls
  3037. v.push_back (knobItem);
  3038. }
  3039. std::vector<float> modeValues;
  3040. for (int k = 1; k <= 11; ++k)
  3041. modeValues.push_back ((float) k / 11.0f);
  3042. v.push_back (label (20, 152, 46, 20, TR_NOOP ("Mode")));
  3043. v.push_back (menuOf (70, 150, 170, 24, "Mode", TR_NOOP ("Mode"),
  3044. TR_NOOP ("Rise|Rise / fall|Through-zero +|Through-zero −|Tri chorus|Octo chorus|Doubler|Drift rise|Drift rise / fall|Ensemble|Symphonic"),
  3045. modeValues));
  3046. return l;
  3047. }
  3048. Layout latticeLayout()
  3049. {
  3050. Layout l;
  3051. l.width = 670;
  3052. l.height = 300;
  3053. auto& v = l.items;
  3054. // the five main controls as faders, then the mode (taps) and sync menus under them
  3055. v.push_back (section (4, 4, 300, 292, nullptr, boxed));
  3056. const char* faders[5] = { "Mix", "Depth", "Width", "Delay", "Feedback" };
  3057. const char* captions[5] = { TR_NOOP ("Mix"), TR_NOOP ("Depth"), TR_NOOP ("Width"), TR_NOOP ("Delay"), TR_NOOP ("Feedback") };
  3058. for (int k = 0; k < 5; ++k)
  3059. {
  3060. v.push_back (slider (Item::vslider, 16.0f + 58.0f * (float) k, 14, 40, 196, faders[k], captions[k]));
  3061. v.push_back (value (10.0f + 58.0f * (float) k, 238, 52, 16, faders[k], 0));
  3062. }
  3063. // round 135: the reference's MODE menu — its nine algorithms by their tap layout (LYNX's own names, the reference's
  3064. // type index: lattice::tapCount); the engine plays the three 6-tap ones and the two 16-tap ones alike for now
  3065. v.push_back (label (8, 268, 40, 18, TR_NOOP ("Mode")));
  3066. v.push_back (menuOf (46, 266, 128, 22, "Taps", TR_NOOP ("Mode"),
  3067. TR_NOOP ("2-tap chorus|4-tap ensemble|6-tap chorus|6-tap random|Dual ensemble|8-tap|16-tap phase|16-tap|32-tap"),
  3068. { 1.5f / 24.0f, 2.5f / 24.0f, 3.5f / 24.0f, 4.5f / 24.0f, 5.5f / 24.0f, 6.5f / 24.0f, 7.5f / 24.0f, 8.5f / 24.0f, 9.5f / 24.0f }));
  3069. std::vector<float> syncValues;
  3070. for (int k = 0; k <= 17; ++k)
  3071. syncValues.push_back ((float) k / 17.0f);
  3072. v.push_back (label (178, 268, 36, 18, TR_NOOP ("Sync")));
  3073. // round 144: the reference's DelaySync list (straight, dotted, triplet groups — measured); the older by-length list
  3074. // stays in its place for projects that use it, until it is set back to Free
  3075. std::vector<float> refSync { 0.0f };
  3076. for (int k = 2; k <= 17; ++k)
  3077. refSync.push_back (((float) k + 0.5f) / 17.0f);
  3078. v.push_back (when (menuOf (214, 266, 88, 22, "Delay sync", TR_NOOP ("Sync"),
  3079. "Free|1/16|1/8|1/4|1/2|1/1|2/1|1/16.|1/8.|1/4.|1/2.|1/1.|1/16T|1/8T|1/4T|1/2T|1/1T", refSync),
  3080. "Sync", 0.0f, 0.5f / 17.0f));
  3081. v.push_back (when (menuOf (214, 266, 88, 22, "Sync", TR_NOOP ("Sync"),
  3082. "Free|1/64|1/32T|1/64.|1/32|1/16T|1/32.|1/16|1/8T|1/16.|1/8|1/4T|1/8.|1/4|1/2T|1/4.|1/2|1/1", syncValues),
  3083. "Sync", 0.5f / 17.0f, 1.0f));
  3084. // the pages: modulation, taps, diffusion, EQ, drive, warp
  3085. l.pages = { TR_NOOP ("Mod"), TR_NOOP ("Taps"), TR_NOOP ("Diff"), TR_NOOP ("EQ"), TR_NOOP ("Drive"), TR_NOOP ("Warp") };
  3086. v.push_back (pageTabs (312, 8, 354, 22, TR_NOOP ("Mod|Taps|Diff|EQ|Drive|Warp")));
  3087. v.push_back (section (312, 36, 354, 186, nullptr, boxed));
  3088. const auto row = [&v] (int page, std::vector<std::pair<const char*, const char*>> knobs, std::vector<LayoutItem> extra = {}) {
  3089. const auto first = 346.0f + 68.0f * (float) extra.size();
  3090. for (auto e : extra)
  3091. {
  3092. e.page = page;
  3093. v.push_back (e);
  3094. }
  3095. for (std::size_t k = 0; k < knobs.size(); ++k)
  3096. {
  3097. auto i = dial (first + 68.0f * (float) k, 112, 38, knobs[k].first, knobs[k].second);
  3098. i.page = page;
  3099. v.push_back (i);
  3100. }
  3101. };
  3102. row (0, { { "Detune rate", TR_NOOP ("Slow rate") }, { "Detune depth", TR_NOOP ("Slow depth") }, { "Vibrato rate", TR_NOOP ("Vib rate") },
  3103. { "Vibrato depth", TR_NOOP ("Vib depth") }, { "Over-mod", TR_NOOP ("Over-mod") } });
  3104. row (1, { { "Spread", TR_NOOP ("Spread") }, { "Slope", TR_NOOP ("Slope") }, { "Skew", TR_NOOP ("Skew") }, { "Random", TR_NOOP ("Random") },
  3105. { "Tap gain", TR_NOOP ("Tap gain") } });
  3106. row (2, { { "Diffusion", TR_NOOP ("Diffusion") }, { "Diffusion size", TR_NOOP ("Size") }, { "Diffusion rate", TR_NOOP ("Mod rate") },
  3107. { "Diffusion depth", TR_NOOP ("Mod depth") } },
  3108. { toggle (322, 104, 56, 20, "Diffusion on", TR_NOOP ("On")) });
  3109. row (3, { { "Low cut", TR_NOOP ("Low cut") }, { "High cut", TR_NOOP ("High cut") }, { "Crossover", TR_NOOP ("Spatial EQ") } },
  3110. { tabs (322, 104, 56, 40, "Colour", TR_NOOP ("Bright|Dark")) });
  3111. row (4, { { "Drive in", TR_NOOP ("In gain") }, { "Drive out", TR_NOOP ("Out gain") }, { "Noise", TR_NOOP ("Noise gain") } },
  3112. { toggle (322, 104, 56, 20, "Drive on", TR_NOOP ("On")) });
  3113. {
  3114. auto prePost = tabs (596, 104, 60, 40, "Drive post", TR_NOOP ("Pre|Post"));
  3115. prePost.page = 4;
  3116. v.push_back (prePost);
  3117. }
  3118. row (5, { { "Rotate", TR_NOOP ("Feedback mix") }, { "Smoothing", TR_NOOP ("Smoothing") } },
  3119. { tabs (322, 104, 56, 40, "Half speed", TR_NOOP ("1x|1/2x")) });
  3120. {
  3121. // round 137: the WARP page's input pan (what enters the taps), measured on the reference
  3122. auto caption = label (552, 82, 104, 16, TR_NOOP ("Input pan"));
  3123. caption.page = 5;
  3124. v.push_back (caption);
  3125. std::vector<float> panValues;
  3126. for (int k = 1; k <= 5; ++k)
  3127. panValues.push_back ((float) k / 8.0f);
  3128. auto pan = menuOf (552, 102, 104, 22, "Input pan", TR_NOOP ("Input pan"), TR_NOOP ("Stereo|Swapped|Mono|Mono left|Mono right"), panValues);
  3129. pan.page = 5;
  3130. v.push_back (pan);
  3131. }
  3132. v.push_back (display (312, 230, 354, 62, "lattice"));
  3133. return l;
  3134. }
  3135. Layout generated (EffectKind kind)
  3136. {
  3137. // knobs in rows of up to 6 (FL's wrapper shows unknown plugins as a list of knobs too)
  3138. const auto& info = effectInfo (kind);
  3139. Layout l;
  3140. const auto count = (int) info.params.size();
  3141. const auto columns = count <= 4 ? std::max (1, count) : count <= 12 ? 6 : 8;
  3142. const auto rows = (count + columns - 1) / columns;
  3143. constexpr float cellW = 74.0f, cellH = 84.0f;
  3144. l.width = (int) (columns * cellW + 12.0f);
  3145. l.height = (int) std::max (60.0f, (float) rows * cellH + 12.0f);
  3146. if (count > 0)
  3147. l.items.push_back (section (4, 4, (float) l.width - 8.0f, (float) l.height - 8.0f, nullptr, boxed));
  3148. for (int i = 0; i < count; ++i)
  3149. {
  3150. const auto cx = 6.0f + cellW * ((float) (i % columns) + 0.5f);
  3151. const auto cy = 6.0f + cellH * (float) (i / columns) + 26.0f;
  3152. l.items.push_back (knob (cx, cy, 36, info.params[(std::size_t) i].name, info.params[(std::size_t) i].name, cy + 30.0f, showValue));
  3153. }
  3154. if (count == 0)
  3155. l.items.push_back (display (6, 6, (float) l.width - 12.0f, (float) l.height - 12.0f, "name"));
  3156. return l;
  3157. }
  3158. } // namespace
  3159. const std::vector<EffectKind>& flLayoutKinds()
  3160. {
  3161. static const std::vector<EffectKind> kinds { EffectKind::fruityLimiter, EffectKind::fruityDelay3, EffectKind::fruityMultiband,
  3162. EffectKind::reeverb2, EffectKind::luxeVerb, EffectKind::fruityCompressor,
  3163. EffectKind::fruityFilter, EffectKind::fruityFastDist, EffectKind::fruityChorus,
  3164. EffectKind::fruityFlanger, EffectKind::stereoEnhancer, EffectKind::parametricEq,
  3165. EffectKind::grossBeat, EffectKind::fruityDelay2, EffectKind::reeverb1,
  3166. EffectKind::fruityFlangus, EffectKind::fruitySoftClipper,
  3167. EffectKind::fruityBloodOverdrive, EffectKind::fruityPanOMatic, EffectKind::stereoShaper,
  3168. EffectKind::transientProcessor, EffectKind::fruityFreeFilter, EffectKind::fruityWaveShaper,
  3169. EffectKind::vintageChorus, EffectKind::hyperChorus, EffectKind::fruityBalance,
  3170. EffectKind::squeeze, EffectKind::maximus,
  3171. EffectKind::vintagePhaser, EffectKind::fruityPhaser,
  3172. // round 105
  3173. EffectKind::vocoder, EffectKind::frequencySplitter, EffectKind::fruityDelayBank,
  3174. EffectKind::equo, EffectKind::multibandDelay, EffectKind::convolver,
  3175. EffectKind::flPitchShifter, EffectKind::effector, EffectKind::hardcore, EffectKind::vocodex,
  3176. EffectKind::fruitySend,
  3177. // round 154
  3178. EffectKind::emphasizer,
  3179. // round 165g
  3180. EffectKind::fruityMute2 };
  3181. return kinds;
  3182. }
  3183. const std::vector<EffectKind>& ownLayoutKinds()
  3184. {
  3185. static const std::vector<EffectKind> kinds { EffectKind::ridgeStrip, EffectKind::glowLeveler, EffectKind::hushDeEsser,
  3186. EffectKind::aether, EffectKind::ember, EffectKind::epochVerb, EffectKind::atrium,
  3187. EffectKind::foilPlate, EffectKind::nebula, EffectKind::halo, EffectKind::horizon,
  3188. EffectKind::echoform, EffectKind::spiralEcho, EffectKind::orbit, EffectKind::latticeMod,
  3189. EffectKind::crestCompressor, EffectKind::prismMultiband, EffectKind::sentryGate,
  3190. EffectKind::quellDenoiser, EffectKind::geminiDoubler, EffectKind::compressor,
  3191. EffectKind::voiceShift, EffectKind::autoPan, EffectKind::hardwareInsert };
  3192. return kinds;
  3193. }
  3194. const Layout& layoutFor (EffectKind kind)
  3195. {
  3196. static std::mutex lock;
  3197. static std::map<EffectKind, Layout> cache;
  3198. const std::lock_guard<std::mutex> guard (lock);
  3199. if (auto it = cache.find (kind); it != cache.end())
  3200. return it->second;
  3201. Layout l;
  3202. switch (kind)
  3203. {
  3204. case EffectKind::fruityLimiter: l = fruityLimiter(); break;
  3205. case EffectKind::fruityCompressor: l = fruityCompressor(); break;
  3206. case EffectKind::fruityFilter: l = fruityFilter(); break;
  3207. case EffectKind::fruityChorus: l = fruityChorus(); break;
  3208. case EffectKind::fruityFlanger: l = fruityFlanger(); break;
  3209. case EffectKind::fruityFastDist: l = fruityFastDist(); break;
  3210. case EffectKind::stereoEnhancer: l = stereoEnhancer(); break;
  3211. case EffectKind::fruityDelay3: l = fruityDelay3(); break;
  3212. case EffectKind::fruityMultiband: l = fruityMultiband(); break;
  3213. case EffectKind::reeverb2: l = reeverb2(); break;
  3214. case EffectKind::luxeVerb: l = luxeVerb(); break;
  3215. case EffectKind::parametricEq: l = parametricEq2(); break;
  3216. case EffectKind::grossBeat: l = grossBeat(); break;
  3217. case EffectKind::fruityDelay2: l = fruityDelay2(); break;
  3218. case EffectKind::reeverb1: l = reeverb1(); break;
  3219. case EffectKind::fruityFlangus: l = fruityFlangus(); break;
  3220. case EffectKind::fruitySoftClipper: l = fruitySoftClipper(); break;
  3221. case EffectKind::fruityBloodOverdrive: l = fruityBloodOverdrive(); break;
  3222. case EffectKind::fruityPanOMatic: l = fruityPanOMatic(); break;
  3223. case EffectKind::stereoShaper: l = stereoShaper(); break;
  3224. case EffectKind::transientProcessor: l = transientProcessor(); break;
  3225. case EffectKind::fruityFreeFilter: l = fruityFreeFilter(); break;
  3226. case EffectKind::fruityWaveShaper: l = fruityWaveShaper(); break;
  3227. case EffectKind::vintageChorus: l = vintageChorus(); break;
  3228. case EffectKind::hyperChorus: l = hyperChorus(); break;
  3229. case EffectKind::fruityBalance: l = fruityBalance(); break;
  3230. case EffectKind::squeeze: l = fruitySqueeze(); break;
  3231. case EffectKind::emphasizer: l = emphasizer(); break;
  3232. case EffectKind::maximus: l = maximus(); break;
  3233. case EffectKind::vintagePhaser: l = vintagePhaser(); break;
  3234. case EffectKind::fruityPhaser: l = fruityPhaser(); break;
  3235. case EffectKind::vocoder: l = fruityVocoder(); break;
  3236. case EffectKind::frequencySplitter: l = frequencySplitterLayout(); break;
  3237. case EffectKind::fruityDelayBank: l = fruityDelayBankLayout(); break;
  3238. case EffectKind::equo: l = equoLayout(); break;
  3239. case EffectKind::multibandDelay: l = multibandDelayLayout(); break;
  3240. case EffectKind::convolver: l = convolverLayout(); break;
  3241. case EffectKind::flPitchShifter: l = pitchShifterLayout(); break;
  3242. case EffectKind::effector: l = effectorLayout(); break;
  3243. case EffectKind::hardcore: l = hardcoreLayout(); break;
  3244. case EffectKind::vocodex: l = vocodexLayout(); break;
  3245. case EffectKind::ridgeStrip: l = withVocalVoicing (ridgeStrip()); break;
  3246. case EffectKind::glowLeveler: l = glowLeveler(); break;
  3247. case EffectKind::compressor: l = compressorLayout(); break;
  3248. case EffectKind::hushDeEsser: l = hushDeEsser(); break;
  3249. case EffectKind::aether: l = aetherLayout(); break;
  3250. case EffectKind::ember: l = withEmberClassic (emberLayout()); break;
  3251. case EffectKind::epochVerb: l = captionsAbove (epochVerbLayout()); break;
  3252. case EffectKind::atrium: l = captionsAbove (atriumLayout()); break;
  3253. case EffectKind::foilPlate: l = captionsAbove (foilPlateLayout()); break;
  3254. case EffectKind::nebula: l = captionsAbove (nebulaLayout()); break;
  3255. case EffectKind::halo: l = captionsAbove (haloLayout()); break;
  3256. case EffectKind::horizon: l = captionsAbove (horizonLayout()); break;
  3257. case EffectKind::lynxTune: l = lynxTune(); break;
  3258. case EffectKind::echoform: l = captionsAbove (echoformLayout()); break;
  3259. case EffectKind::spiralEcho: l = captionsAbove (spiralLayout()); break;
  3260. case EffectKind::orbit: l = captionsAbove (orbitLayout()); break;
  3261. case EffectKind::latticeMod: l = captionsAbove (latticeLayout()); break;
  3262. case EffectKind::fruitySend: l = fruitySend(); break;
  3263. case EffectKind::fruityMute2: l = fruityMute2Layout(); break;
  3264. case EffectKind::crestCompressor: l = crestCompressor(); break;
  3265. case EffectKind::prismMultiband: l = prismMultiband(); break;
  3266. case EffectKind::sentryGate: l = sentryGate(); break;
  3267. case EffectKind::quellDenoiser: l = quellDenoiser(); break;
  3268. case EffectKind::geminiDoubler: l = geminiDoubler(); break;
  3269. case EffectKind::voiceShift: l = voiceShiftLayout(); break;
  3270. case EffectKind::hardwareInsert: l = hardwareInsertLayout(); break;
  3271. case EffectKind::autoPan: l = withRhythmVoicing (autoPanLayout()); break;
  3272. default: l = generated (kind); break;
  3273. }
  3274. return cache.emplace (kind, std::move (l)).first->second;
  3275. }
  3276. const Layout* instrumentLayout (InstrumentKind kind)
  3277. {
  3278. static const Layout osc = threeOsc(), keys = flKeys(), boo = booBass(), sytrus = sytrusMain(), harmor = harmorMain();
  3279. switch (kind)
  3280. {
  3281. case InstrumentKind::threeosc: return &osc;
  3282. case InstrumentKind::flkeys: return &keys;
  3283. case InstrumentKind::boobass: return &boo;
  3284. case InstrumentKind::sytrus: return &sytrus;
  3285. case InstrumentKind::harmor: return &harmor;
  3286. default: return nullptr;
  3287. }
  3288. }
  3289. const std::vector<InstrumentKind>& instrumentLayoutKinds()
  3290. {
  3291. static const std::vector<InstrumentKind> kinds { InstrumentKind::threeosc, InstrumentKind::flkeys, InstrumentKind::boobass, InstrumentKind::sytrus, InstrumentKind::harmor };
  3292. return kinds;
  3293. }
  3294. const Layout& soundgoodizerLayout()
  3295. {
  3296. static const Layout l = soundgoodizer();
  3297. return l;
  3298. }
  3299. bool hasFlLayout (EffectKind kind)
  3300. {
  3301. return *layoutFor (kind).fl != 0;
  3302. }
  3303. bool usesStateParams (EffectKind kind) noexcept
  3304. {
  3305. return stateparams::tableFor (kind) != nullptr;
  3306. }
  3307. int paramCount (EffectKind kind)
  3308. {
  3309. const auto* table = stateparams::tableFor (kind);
  3310. return (int) effectInfo (kind).params.size() + (table != nullptr ? (int) table->params.size() : 0);
  3311. }
  3312. int stateIndex (EffectKind kind, int param)
  3313. {
  3314. const auto plain = (int) effectInfo (kind).params.size();
  3315. const auto* table = stateparams::tableFor (kind);
  3316. return table != nullptr && param >= plain && param < plain + (int) table->params.size() ? param - plain : -1;
  3317. }
  3318. const char* paramName (EffectKind kind, int index)
  3319. {
  3320. if (index < 0 || index >= paramCount (kind))
  3321. return "";
  3322. if (const auto s = stateIndex (kind, index); s >= 0)
  3323. return stateparams::tableFor (kind)->name (s);
  3324. return effectInfo (kind).params[(std::size_t) index].name;
  3325. }
  3326. int paramIndex (EffectKind kind, const char* name)
  3327. {
  3328. if (name == nullptr)
  3329. return -1;
  3330. const auto& params = effectInfo (kind).params;
  3331. for (int i = 0; i < (int) params.size(); ++i)
  3332. if (std::strcmp (params[(std::size_t) i].name, name) == 0)
  3333. return i;
  3334. if (const auto* table = stateparams::tableFor (kind))
  3335. if (const auto s = table->index (name); s >= 0)
  3336. return (int) params.size() + s;
  3337. return -1;
  3338. }
  3339. float stateValue01 (EffectKind kind, int param, const std::vector<std::uint8_t>& state)
  3340. {
  3341. const auto s = stateIndex (kind, param);
  3342. if (s < 0)
  3343. return 0.0f;
  3344. const auto* table = stateparams::tableFor (kind);
  3345. const auto& p = table->params[(std::size_t) s];
  3346. const auto raw = table->get (state, s).value_or (p.defaultValue);
  3347. return p.maximum > p.minimum ? (float) ((double) (std::clamp (raw, p.minimum, p.maximum) - p.minimum) / (double) (p.maximum - p.minimum)) : 0.0f;
  3348. }
  3349. int stateRaw (EffectKind kind, int param, float value01)
  3350. {
  3351. const auto s = stateIndex (kind, param);
  3352. if (s < 0)
  3353. return 0;
  3354. const auto& p = stateparams::tableFor (kind)->params[(std::size_t) s];
  3355. return p.minimum + (int) std::lround ((double) std::clamp (value01, 0.0f, 1.0f) * (double) (p.maximum - p.minimum));
  3356. }
  3357. std::vector<std::string> optionLabels (const LayoutItem& item)
  3358. {
  3359. std::vector<std::string> out;
  3360. if (item.options == nullptr)
  3361. return out;
  3362. std::string current;
  3363. for (const char* p = item.options; *p != 0; ++p)
  3364. {
  3365. if (*p == '|')
  3366. {
  3367. out.push_back (current);
  3368. current.clear();
  3369. }
  3370. else
  3371. current += *p;
  3372. }
  3373. out.push_back (current);
  3374. return out;
  3375. }
  3376. float optionValue (const LayoutItem& item, int option)
  3377. {
  3378. if (option >= 0 && option < (int) item.values.size())
  3379. return item.values[(std::size_t) option];
  3380. const auto n = (int) optionLabels (item).size();
  3381. return n > 1 ? (float) option / (float) (n - 1) : 0.0f;
  3382. }
  3383. int optionAt (const LayoutItem& item, float value)
  3384. {
  3385. const auto n = (int) optionLabels (item).size();
  3386. auto best = 0;
  3387. auto distance = 2.0f;
  3388. for (int o = 0; o < n; ++o)
  3389. if (const auto d = std::abs (optionValue (item, o) - value); d < distance)
  3390. {
  3391. distance = d;
  3392. best = o;
  3393. }
  3394. return best;
  3395. }
  3396. bool isShown (EffectKind kind, const LayoutItem& item, int page, const EffectParams& params, const std::vector<std::uint8_t>* state)
  3397. {
  3398. if (item.page >= 0 && item.page != page)
  3399. return false;
  3400. const auto inRange = [&] (const char* param, float lo, float hi) {
  3401. if (param == nullptr)
  3402. return true;
  3403. const auto i = paramIndex (kind, param);
  3404. const auto v = stateIndex (kind, i) >= 0 ? (state != nullptr ? stateValue01 (kind, i, *state) : 0.0f)
  3405. : i >= 0 && i < (int) params.size() ? params[(std::size_t) i] : 0.0f;
  3406. return v >= lo && (v < hi || hi >= 1.0f); // [lo, hi), the top end included at 1
  3407. };
  3408. return inRange (item.whenParam, item.whenMin, item.whenMax) && inRange (item.when2Param, item.when2Min, item.when2Max);
  3409. }
  3410. bool isValueControl (Item type) noexcept
  3411. {
  3412. return type != Item::section && type != Item::label && type != Item::display;
  3413. }
  3414. } // namespace lynx::plugui