PluginLayout.cpp 190 KB

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