PluginLayout.cpp 245 KB

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