PluginLayout.cpp 219 KB

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