From 40fa6bfe45d14660672c8d1f3fb642c144def28a Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 19 Feb 2018 09:30:52 +0100 Subject: [PATCH] Remove unused code --- source/native-plugins/external/Makefile | 20 - source/native-plugins/external/_all.c | 12 - .../native-plugins/resources/at1/ctrlsect.png | Bin 7861 -> 0 bytes .../native-plugins/resources/at1/hmeter0.png | Bin 245 -> 0 bytes .../native-plugins/resources/at1/hmeter1.png | Bin 241 -> 0 bytes .../native-plugins/resources/at1/hscale.png | Bin 284 -> 0 bytes source/native-plugins/resources/at1/midi.png | Bin 1667 -> 0 bytes source/native-plugins/resources/at1/note.png | Bin 643 -> 0 bytes .../native-plugins/resources/at1/notesect.png | Bin 504 -> 0 bytes .../resources/bls1/inputsect.png | Bin 4122 -> 0 bytes .../resources/bls1/lfshfsect.png | Bin 3920 -> 0 bytes .../resources/bls1/shuffsect.png | Bin 4701 -> 0 bytes .../native-plugins/resources/rev1/ambsect.png | Bin 2416 -> 0 bytes .../native-plugins/resources/rev1/eq1sect.png | Bin 3523 -> 0 bytes .../native-plugins/resources/rev1/eq2sect.png | Bin 3670 -> 0 bytes .../native-plugins/resources/rev1/mixsect.png | Bin 2724 -> 0 bytes .../native-plugins/resources/rev1/revsect.png | Bin 8132 -> 0 bytes source/native-plugins/zita-at1-ui.cpp | 240 --------- source/native-plugins/zita-at1.cpp | 442 ---------------- source/native-plugins/zita-at1/button.cc | 139 ----- source/native-plugins/zita-at1/button.h | 97 ---- source/native-plugins/zita-at1/global.h | 32 -- source/native-plugins/zita-at1/guiclass.cc | 186 ------- source/native-plugins/zita-at1/guiclass.h | 145 ------ source/native-plugins/zita-at1/jclient.cc | 157 ------ source/native-plugins/zita-at1/jclient.h | 80 --- source/native-plugins/zita-at1/mainwin.cc | 368 -------------- source/native-plugins/zita-at1/mainwin.h | 105 ---- source/native-plugins/zita-at1/png2img.cc | 129 ----- source/native-plugins/zita-at1/png2img.h | 35 -- source/native-plugins/zita-at1/retuner.cc | 449 ----------------- source/native-plugins/zita-at1/retuner.h | 133 ----- source/native-plugins/zita-at1/rotary.cc | 211 -------- source/native-plugins/zita-at1/rotary.h | 119 ----- source/native-plugins/zita-at1/styles.cc | 186 ------- source/native-plugins/zita-at1/styles.h | 70 --- source/native-plugins/zita-at1/tmeter.cc | 86 ---- source/native-plugins/zita-at1/tmeter.h | 59 --- source/native-plugins/zita-bls1-ui.cpp | 195 ------- source/native-plugins/zita-bls1.cpp | 282 ----------- source/native-plugins/zita-bls1/global.h | 33 -- source/native-plugins/zita-bls1/guiclass.cc | 160 ------ source/native-plugins/zita-bls1/guiclass.h | 102 ---- source/native-plugins/zita-bls1/hp3filt.cc | 184 ------- source/native-plugins/zita-bls1/hp3filt.h | 76 --- source/native-plugins/zita-bls1/jclient.cc | 177 ------- source/native-plugins/zita-bls1/jclient.h | 99 ---- source/native-plugins/zita-bls1/lfshelf2.cc | 253 ---------- source/native-plugins/zita-bls1/lfshelf2.h | 93 ---- source/native-plugins/zita-bls1/mainwin.cc | 258 ---------- source/native-plugins/zita-bls1/mainwin.h | 90 ---- source/native-plugins/zita-bls1/png2img.cc | 136 ----- source/native-plugins/zita-bls1/png2img.h | 35 -- source/native-plugins/zita-bls1/rotary.cc | 207 -------- source/native-plugins/zita-bls1/rotary.h | 120 ----- source/native-plugins/zita-bls1/shuffler.cc | 188 ------- source/native-plugins/zita-bls1/shuffler.h | 72 --- source/native-plugins/zita-bls1/styles.cc | 153 ------ source/native-plugins/zita-bls1/styles.h | 67 --- source/native-plugins/zita-rev1-ui.cpp | 203 -------- source/native-plugins/zita-rev1.cpp | 474 ------------------ source/native-plugins/zita-rev1/global.h | 32 -- source/native-plugins/zita-rev1/guiclass.cc | 160 ------ source/native-plugins/zita-rev1/guiclass.h | 102 ---- source/native-plugins/zita-rev1/jclient.cc | 134 ----- source/native-plugins/zita-rev1/jclient.h | 70 --- source/native-plugins/zita-rev1/mainwin.cc | 231 --------- source/native-plugins/zita-rev1/mainwin.h | 87 ---- source/native-plugins/zita-rev1/pareq.cc | 200 -------- source/native-plugins/zita-rev1/pareq.h | 81 --- source/native-plugins/zita-rev1/png2img.cc | 136 ----- source/native-plugins/zita-rev1/png2img.h | 35 -- source/native-plugins/zita-rev1/reverb.cc | 380 -------------- source/native-plugins/zita-rev1/reverb.h | 228 --------- source/native-plugins/zita-rev1/rotary.cc | 207 -------- source/native-plugins/zita-rev1/rotary.h | 118 ----- source/native-plugins/zita-rev1/styles.cc | 197 -------- source/native-plugins/zita-rev1/styles.h | 73 --- 78 files changed, 9628 deletions(-) delete mode 100644 source/native-plugins/resources/at1/ctrlsect.png delete mode 100644 source/native-plugins/resources/at1/hmeter0.png delete mode 100644 source/native-plugins/resources/at1/hmeter1.png delete mode 100644 source/native-plugins/resources/at1/hscale.png delete mode 100644 source/native-plugins/resources/at1/midi.png delete mode 100644 source/native-plugins/resources/at1/note.png delete mode 100644 source/native-plugins/resources/at1/notesect.png delete mode 100644 source/native-plugins/resources/bls1/inputsect.png delete mode 100644 source/native-plugins/resources/bls1/lfshfsect.png delete mode 100644 source/native-plugins/resources/bls1/shuffsect.png delete mode 100644 source/native-plugins/resources/rev1/ambsect.png delete mode 100644 source/native-plugins/resources/rev1/eq1sect.png delete mode 100644 source/native-plugins/resources/rev1/eq2sect.png delete mode 100644 source/native-plugins/resources/rev1/mixsect.png delete mode 100644 source/native-plugins/resources/rev1/revsect.png delete mode 100644 source/native-plugins/zita-at1-ui.cpp delete mode 100644 source/native-plugins/zita-at1.cpp delete mode 100644 source/native-plugins/zita-at1/button.cc delete mode 100644 source/native-plugins/zita-at1/button.h delete mode 100644 source/native-plugins/zita-at1/global.h delete mode 100644 source/native-plugins/zita-at1/guiclass.cc delete mode 100644 source/native-plugins/zita-at1/guiclass.h delete mode 100644 source/native-plugins/zita-at1/jclient.cc delete mode 100644 source/native-plugins/zita-at1/jclient.h delete mode 100644 source/native-plugins/zita-at1/mainwin.cc delete mode 100644 source/native-plugins/zita-at1/mainwin.h delete mode 100644 source/native-plugins/zita-at1/png2img.cc delete mode 100644 source/native-plugins/zita-at1/png2img.h delete mode 100644 source/native-plugins/zita-at1/retuner.cc delete mode 100644 source/native-plugins/zita-at1/retuner.h delete mode 100644 source/native-plugins/zita-at1/rotary.cc delete mode 100644 source/native-plugins/zita-at1/rotary.h delete mode 100644 source/native-plugins/zita-at1/styles.cc delete mode 100644 source/native-plugins/zita-at1/styles.h delete mode 100644 source/native-plugins/zita-at1/tmeter.cc delete mode 100644 source/native-plugins/zita-at1/tmeter.h delete mode 100644 source/native-plugins/zita-bls1-ui.cpp delete mode 100644 source/native-plugins/zita-bls1.cpp delete mode 100644 source/native-plugins/zita-bls1/global.h delete mode 100644 source/native-plugins/zita-bls1/guiclass.cc delete mode 100644 source/native-plugins/zita-bls1/guiclass.h delete mode 100644 source/native-plugins/zita-bls1/hp3filt.cc delete mode 100644 source/native-plugins/zita-bls1/hp3filt.h delete mode 100644 source/native-plugins/zita-bls1/jclient.cc delete mode 100644 source/native-plugins/zita-bls1/jclient.h delete mode 100644 source/native-plugins/zita-bls1/lfshelf2.cc delete mode 100644 source/native-plugins/zita-bls1/lfshelf2.h delete mode 100644 source/native-plugins/zita-bls1/mainwin.cc delete mode 100644 source/native-plugins/zita-bls1/mainwin.h delete mode 100644 source/native-plugins/zita-bls1/png2img.cc delete mode 100644 source/native-plugins/zita-bls1/png2img.h delete mode 100644 source/native-plugins/zita-bls1/rotary.cc delete mode 100644 source/native-plugins/zita-bls1/rotary.h delete mode 100644 source/native-plugins/zita-bls1/shuffler.cc delete mode 100644 source/native-plugins/zita-bls1/shuffler.h delete mode 100644 source/native-plugins/zita-bls1/styles.cc delete mode 100644 source/native-plugins/zita-bls1/styles.h delete mode 100644 source/native-plugins/zita-rev1-ui.cpp delete mode 100644 source/native-plugins/zita-rev1.cpp delete mode 100644 source/native-plugins/zita-rev1/global.h delete mode 100644 source/native-plugins/zita-rev1/guiclass.cc delete mode 100644 source/native-plugins/zita-rev1/guiclass.h delete mode 100644 source/native-plugins/zita-rev1/jclient.cc delete mode 100644 source/native-plugins/zita-rev1/jclient.h delete mode 100644 source/native-plugins/zita-rev1/mainwin.cc delete mode 100644 source/native-plugins/zita-rev1/mainwin.h delete mode 100644 source/native-plugins/zita-rev1/pareq.cc delete mode 100644 source/native-plugins/zita-rev1/pareq.h delete mode 100644 source/native-plugins/zita-rev1/png2img.cc delete mode 100644 source/native-plugins/zita-rev1/png2img.h delete mode 100644 source/native-plugins/zita-rev1/reverb.cc delete mode 100644 source/native-plugins/zita-rev1/reverb.h delete mode 100644 source/native-plugins/zita-rev1/rotary.cc delete mode 100644 source/native-plugins/zita-rev1/rotary.h delete mode 100644 source/native-plugins/zita-rev1/styles.cc delete mode 100644 source/native-plugins/zita-rev1/styles.h diff --git a/source/native-plugins/external/Makefile b/source/native-plugins/external/Makefile index 6a31bf2c6..6138a587a 100644 --- a/source/native-plugins/external/Makefile +++ b/source/native-plugins/external/Makefile @@ -166,26 +166,6 @@ resources/zynaddsubfx-ui$(APP_EXT): $(OBJDIR)/zynaddsubfx-ui.cpp.o # --------------------------------------------------------------------------------------------------------------------- -$(OBJDIR)/zita-%-ui.cpp.o: zita-%-ui.cpp - -@mkdir -p $(OBJDIR) - @echo "Compiling $<" - @$(CXX) $< $(BUILD_CXX_FLAGS) $(ZITA_UI_FLAGS) -c -o $@ - -$(OBJDIR)/zita-%.cpp.o: zita-%.cpp - -@mkdir -p $(OBJDIR) - @echo "Compiling $<" - @$(CXX) $< $(BUILD_CXX_FLAGS) $(ZITA_DSP_FLAGS) -c -o $@ - -resources/zita-%-ui$(APP_EXT): $(OBJDIR)/zita-%-ui.cpp.o - -@mkdir -p ../resources - @echo "Linking $<" - @$(CXX) $^ $(LINK_FLAGS) $(ZITA_UI_LIBS) -o $@ - -# --------------------------------------------------------------------------------------------------------------------- - --include $(OBJDIR)/zita-at1-ui.cpp.d --include $(OBJDIR)/zita-bls1-ui.cpp.d --include $(OBJDIR)/zita-rev1-ui.cpp.d -include $(OBJDIR)/zynaddsubfx-ui.cpp.d # --------------------------------------------------------------------------------------------------------------------- diff --git a/source/native-plugins/external/_all.c b/source/native-plugins/external/_all.c index bd096fdd1..d8fcfef9f 100644 --- a/source/native-plugins/external/_all.c +++ b/source/native-plugins/external/_all.c @@ -36,11 +36,6 @@ extern void carla_register_native_plugin_distrho_wobblejuice(void); extern void carla_register_native_plugin_zynaddsubfx_fx(void); extern void carla_register_native_plugin_zynaddsubfx_synth(void); -// Experimental plugins -extern void carla_register_native_plugin_zita_at1(void); -extern void carla_register_native_plugin_zita_bls1(void); -extern void carla_register_native_plugin_zita_rev1(void); - // -------------------------------------------------------------------------------------------------------------------- void carla_register_all_native_external_plugins(void) @@ -66,13 +61,6 @@ void carla_register_all_native_external_plugins(void) carla_register_native_plugin_zynaddsubfx_synth(); # endif #endif - -#ifdef HAVE_EXPERIMENTAL_PLUGINS - // Experimental plugins - carla_register_native_plugin_zita_at1(); - carla_register_native_plugin_zita_bls1(); - carla_register_native_plugin_zita_rev1(); -#endif } // -------------------------------------------------------------------------------------------------------------------- diff --git a/source/native-plugins/resources/at1/ctrlsect.png b/source/native-plugins/resources/at1/ctrlsect.png deleted file mode 100644 index 6d6f905541440d2d9c69cab1da905a17785659e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7861 zcmZvhbyQSe`0fwVA%leU2#B;eG*Uw=Af?h>Lk~!UGy>8B5)KX0F?0;24Bd!y2?)}l z2uT0V_pbZLy?5Q2wdS0^=Inj;yPxNIKRZfG(H-zN zc(-W-ybxHbJyQg3|NG{)7bgP%)Imj2?zK}lt9kFDxa;_ zhJ#*?N|-<-{cR+jG3B#R2KDcDT9myu^7$IW|J;=*lXjEneqD4cCcoH>EGY5q@(Rl* zs>Q=G$UwMkSDBXW+-R#$h(50Mn1nUSKr~-@mX(b)X|^94EKBHwD=I7Bfk4K%a2lEb zC^Q@A%UeFkn4P@23r<1s@bHVtsi*FnvuaT^7D3;KkzVsK@#0)FX^?{KRB4r6|G)T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QpiaVwJpk=>Gup`!N>) diff --git a/source/native-plugins/resources/at1/hmeter0.png b/source/native-plugins/resources/at1/hmeter0.png deleted file mode 100644 index fec106aa9a70365c056002c55c72cd0ea150f70a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 245 zcmeAS@N?(olHy`uVBq!ia0vp^Yk`=Zg9%7}^@^GUq}Y|gW!U_%O?XxR(ZNO zhIn+oo#e=ONI}5$zQg(_``&#KsS-TvqQ7YQg}Lwc2EE*|B4SBr+50^LpX??$9GX6D zR@m3F02Y=5Y=RF|&3bRvA3wBu$E{aS*N9w?EG+ux?c>oX;^D+qV)RSHX?pGU3y+f4n t|2w`PV0_|gW!U_%O?XxmU+53 zhIn+oon**$$U(sMe$TX%qI;Uf1z1k&n8{ssYnrPNQN@>^aO%uDSDqXd?WVUj(;j~Q z`9|ckswuA}*Yau32?u{`8dqKW<66)8CMxgY|K7cq1m`a~)FZ1oKm1+vHPNtS(c0c# ztNFt9k_THfW+cqYJlL{grkwHQhJ;hk4yI21Y4zXJ&|sZjs#oLVnY9Xa^X?YzVdr~b mTfhdSD){FxzHemyz_g90eCY<2Z7YB-X7F_Nb6Mw<&;$T-Hecre diff --git a/source/native-plugins/resources/at1/hscale.png b/source/native-plugins/resources/at1/hscale.png deleted file mode 100644 index 2bf59a5374171fa0d7bc5258da086cd07b1e8790..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 284 zcmV+%0ptFOP)u00006VoOIv0RI60 z0RN!9r;`8x0MSWAK~z|U?U=y{#2^qwCu{C$KoYQ!sUQsmJPUSU33d>$0qe7Xz#al2 zxUPFjW_O);5YfxWH#lfF&oeO1^PmpEd<9$w5JI4iKu`a=bUqhj%#C4~`^YR8?gL{? zJNl<-I>x5REH~X35YagY0M0o?q>ghf_4Zfj3oRgoSeE5*FNDxqkK-6)+_sH28wov} zDy5NjFbspWRw+jX)%q78k(+Dvq^V1$!0Gz z^Yvk7cV}m3b|>!6>_gAPuyf}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h zd5J7w^CAhhI9LD$@yZLjSC4*TPfc3km9qe>_sZj7%e``W)CKX%SpWs`%B7AA;FYI! zY?W8e04Ru8uCv~n@0IKB)nn$vzgJG|cKfLP z$CT#G_sTW)YRkOxIM{NpoCQ!2uUrkb%qwRB6vQi!cWf?22V4-Z{6Ab-AUU7Lzcc^< N002ovPDHLkV1n>gDpUXf diff --git a/source/native-plugins/resources/at1/note.png b/source/native-plugins/resources/at1/note.png deleted file mode 100644 index 72edea9080316b43991034783518d4e859a98873..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 643 zcmV-}0(||6P)jz%+-upkz~QsM3GZJMT(5&%`LwU$!md7kH)BpOKiGEdWVI2>}$07L|UnTbeB z$(J3c(+NOMDdn7}Y4WG48e@zxh7hoaxcl@Dva0s2MMPE2%*;jsSA<%tSJFj0&7bTL zN-1U*W9)KEDI#)nhk2ewq!YZtO@De%7eY$OdqPrGZ{=PHBscjsV1q9ow3P!M6L^iK zq+6l8=@$(T3FE75X6N(yzLF7NpQV?V_nbqF0e~4rSPDzAQf#b+l#h?!0CLV@nqtlY zfCvFIgK9`Ah>X>T#SbxtoP!epsD>CBBW~E?8ydWBUx?6*W-!C8fy!RD>MB}PmPrA^UbJ6MSVe~8@%VrJ5Xhgvp@|Wo02kl_ zeD-kwP%BvR#s@v@eNm(({e=pS$9pHTN(7SP^sJ{NJo9hJG)rmL<*}2e5ViKz%%gu-?|S94{POwp=U;#Q_3hiX2%Wy;$+??%)ccG6xBUO_-@CHir=JFy z{8{~K)#beH-HR;d`jz%RoEWmS*lvFJq8BArAl{$4+SL(cJPvQfx~i3*A@1t#%936o5t znI^W1>T}h4-4-uXe**WbZ&h7g-5q(gAAGAl*M_}*{P=O%Zd2PQ$IWKG$6oi|A eFpE^y!u@NQ9KOB$ka!yyl?*M2i;Dvqbc6i5?_`)q7b) zSv?jJzLVcyzh}13MG?6EcYQ>crT_rVh^nHTo_`L`G*FAtp#AE%H@=O;9TNHKm1TUdf~z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8{`Ig! diff --git a/source/native-plugins/resources/bls1/shuffsect.png b/source/native-plugins/resources/bls1/shuffsect.png deleted file mode 100644 index bf09c513d4100fb9735c994f58685284060480e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4701 zcmV-j5~A&iP)j zRchPSYkND@<)~$~%(bgl#Ilz5TID*0h)6s=Z#1w~Q8B!Gm3 zkc5-7=Z~En4kTbma)Kzom6dg}PqOzf`?vSEzrFW4-$7YfSul+I71Ur87{*{i+}DZR z8BGi4-H4CvwAn?M>s6}?CWMmKFhT?Gy?;(_WB!VZ7K>!X+mHO^-zK)SN<&O*7@>jp z-oN14n*dO@JL$qDH2@TC`~&}NWMpJyWaJ&Qb~>GxFJBG@$$(H%QNbN&XJ>OMR;%^o z$&-8c?mctn%%G9ufzJ~Fva_=_8cjh#!MJhb&YnG6R8(X#nLJYhEY!RFF(YjNaPES- z;+skro7q|1**SCOELpO|m)zH_Tlf9<-v>xBK=38!r#$x9V}*r0mu6;WZr!?d*|KG?zWVB>O`AMZ0xZtE{CcA-F~J%iXUm?Q#kBwq`}XZSbm-6> zvwq`^Hp$Yd=J7%-F$p>uQxRGVq{QUgDSq2>%jb`oIwHV_aJ9Z2C;ayz`Er1@(nq9YZwE9C^j&xS=}$lXGyvSXb!!l5_zs~7 zhiJ`z^XAPChhyc+m7yuFFQliZFIlpL_|-!KLK6;={2`tNNTvR)Qv3I-A&t=O_;Is< zsHiAG3(CmIC@n1=s85rXl~r0=I%(1*VMyJj2X{;*zNWkH*UQ6;)_j9O~UO4UAb~4B_$;_H8mk2;mDCA7~{^) zPJ3sIoVwX`?dQYaY_C0CVYS>ccQA~T5{tzMp*3sPj2=Du#~*+ERf=WtCCQX_&dGh46v197bf1Z`u z@#IAN=yVrBnr_5%@Fj_i@9wFKD&eb?eq0KYo1I zu3bL~878?bC0RsRAj9u@T1&pE50H2mioAIB*qaHqb z^yq;9Oz^-kOb2cm`&4Ac{A5kE5(9R##TWx-F~%6PaJ#A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n+Z9vEi%U7YrT&AQW6$J|i65u_V(rD)G}V+B;sGFY zVVq1U`m!+4h;xF=PrCl0Lx)J$Cm;rZqNu#QJRu6z8)X1M9z)3`=FVu^yX)s|AD#q& z*chAVuTIox0U&CGT?k6P;DhXAYfAbBQl4 zx*DmquPT_ZspvF9Ubes)CZw@keSxzJ1AxA+BYvEE|C$TBs#aJ0L0w1EBjIEIDWGj) z5L*7lix-nS&2n;bynaC>5-nc5xVX4DxaICU5RVX^o7+epLwV+GH~@V4ZTzC=u5Bth z9o(`)fUh^`CO;Q9bH(WS>mCGv53-L{f7Tc?RyFspsR8CJ;D#?nQ41F?yyK0APN(y; z&ps0(c*6Yv;wbp-`U%+kS(XjTC33?M4#Ssw+}9Ys+~dB+u>AKmhULGnF)aUmjbZuk fYYfYOU*rD)#@4Ox8Z6xa00000NkvXXu0mjf3%eK| diff --git a/source/native-plugins/resources/rev1/ambsect.png b/source/native-plugins/resources/rev1/ambsect.png deleted file mode 100644 index 82596958f9232152abab81be2cee29ceadd4c122..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2416 zcmV-$36J)PP)J4+tRLuf`x$4RIN%(K@5_3K%*BXm?okz z24jj>h{hO@5P}iK1iU~&LPU%g8YBdTXoA5DZdxFS0Tq#ia1<1@$jKIZpi8%XFDCA{ z77slv^~3PLXl7?;=6Qad*=G*Boc;UvgMUlhzwH3~T0;tynwpxLnwos8i+WftH#avq zIk~E;>iP5M8jU6+BSWv(x3;zx6cqII^yKH~0|1JPi`8m%VPWCbt5@Bsr=+C#=ARGp z6sfYZGB!3gH8r)lxj8j8b!KL!va-@*v9z?bBqt}w#>N5w)M~X}ukY;aqydtXlXG)( zySlo(b<3Z>fa7_@Q>)cQMMd4+-SP49`T6?c7#<$ZbRCW{yWQT?(^Fqx-`Cd%b5c@L=;3Fv zSZZo&8XFt`=%*LYQcq9M;Nakn9XkdG2O$ptz+^JryLV5mR;$(Os;VlQCp0wl%9Sg2 zyS=cmkmdmZ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#A>~vu4Aark(bv~kP*8xqX?%Ez;gVObTv4oO z{b^T*6Ec+4?N=P-~Y!Se>_ao5Jj=OySuiw_M30Mp=sJ=GL@B;Wn^UFRj@>&vRlX|36#6QE3dqg zlaph&+qZAuju7hW>)X3`Z&6WEX=!OeK|w}FhE}Wf`~Abi!#zDc7cN|AZEbZrodiL2 zb#)ny#+;lSp69P$zb@&l<8$W63(Bb+uV?`PdU|?(|NVDKZV?25H9pN%QR5}_an4u`|(bmAltLMY{rFd}@kwY5n+N;+#&r!vt<$sGSDC|Z*c zDLjEkDq3HB@rB7`TDx}bV?C}VBtYeg6)WC)>n#94d3kyKZ%2_7tz*ZI@jUPKdfVIE zPnpFbw|{1YBXNgd*)GB-E(_19mQb`yO&3PNbjnl%7`XP=^rafK^N{B13gb;4qw(YC0zLH85za0fX7$d*aC_O#>(4j+Hwrq*Nk;#d;sC@b5 zml=kstE-brl)W7#D=Vv}rbZOSy?ggch1J#7w{PE;Kcdpm(6Dpo&eT0^oFc?Ez$+^& ztE#Hx@|S|QqmU$7Q&VF$n|JQqdG6dfsl2qbw5qBKFO$m4%Mn6LmMp2RuHLX=!=_CS z-u7U#*;2aZQw4ERnVFe+;J^WCx2dV=;K73>B_#>H9i^(Os-&c3_wL>G_4V@d`uh59 z+qSJ=zaFPeQPsf4#>U3R#(1nuAQBVVq~{dV)6-Y4UcGGDvQwu{)z#Gv4-dzAtc3FN za$K@(*|N_+|GcB4d8m6dJ4O3LAhAApl!xWXO;s2P2c<|NM=Z^pY002ovPDHLkV1g$B(BA+6 diff --git a/source/native-plugins/resources/rev1/eq2sect.png b/source/native-plugins/resources/rev1/eq2sect.png deleted file mode 100644 index fdab8d69cf88f1240876f93bcfa3f229c1172d25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3670 zcmV-c4yo~pP)F93jH4C-38*=zuSM4gqzix&d`+-^4j;NE-hjjziQm=jVe2e{F=5CCxV zW~Z_OLPTk44a=H3Iu2gH-l5J)UteEQ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VDZ?{b0D!Akum1k~?{c~&7!2|}?{GLoQA}(`YYw7b%0M8nbLY+}2XTrp z7z{d{PM6DtgG30S96!Q|#7Admr>vu#XN~JpW}BqU@qa)@YYvjc3z%s}3p2ZqtHi@p zDI-2V0wH|pp@*J%=9$vcQV3yrd3o%=jv{BYzWnk_K@b9g077Wpx^)CW7z~EW%F5*Z z#L6Gc)L^K*ygb|^%F4>#efM2a6rX?odHiio%r1A;KTyvu^HL^^c_|adyp#!JUdn_q oFJ;1*moj0@OPMg{rA!$A0wSsKe?|0+qW}N^07*qoM6N<$g27%!rvLx| diff --git a/source/native-plugins/resources/rev1/mixsect.png b/source/native-plugins/resources/rev1/mixsect.png deleted file mode 100644 index f7a34c01c0faab00491b56198ad6a16bcc1385df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2724 zcmV;V3S0GwP)R)7UCiDy9WRNd05d)Q*V-5wbN~H+2+7M%zps&AI_59xW7F?GHo>C2S;V zv6Eoq_?$Rr`+Rrr{&<~>i30=s5*C!NEc<@E?|aYZp7(v9_lMD{Rjc6M5_Pu?&|h;% zvq6jwMbM~WfpPs33jqA(U!$H&QCY#+7n`{~*%z_8*0f_?{vS_`0Km@g*=Q>CkM6OI zOY=0906@bpycw6EL&aNJZ3F=K1@Xj15dc!US6JYW}^N;VnC1|uQip}nBRXAc3%)x42lX5mT>F7l|$0( zKQ#gXKUkRy0FTxf2L$;yUBa~yB|TX}!KF6CPa3QwO9nzSIUvfuH@h9(gQ0dty)-kr z2fZ|hG#fOBl$|^tkH_Pg?x*OFMC`7qsR4im3l_`_MyjUEOV2&`oc67$p`oFnp<$Yy zsA;;8N=r*?YimnNZkQtwk8Rtw&ExSbTefWZ^5q_n$K`VA`)D1efK$rtcE9=Nn+FaY zsIIP_bgQMMrL3%M`}XYsaQ^)Hef#$5`{?QNlH2X(IL_^Mr{9ugxvj0uX0zFBwzjr5 zS(f#E^mHMGLZLNl)`UW#^jj>;x?HZIp`oFnA(zX=vT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dvx3@-*@crlV+K!T(;xQcFXBbCqY5^ZI&+AQA%}aCz2TR-onk>J zBJEajopd^~9kOX@&Who&CJ?J|k}rCCh#+|j8V@XS#!sF@-;nk2^KXyAN;hXKx6>8i zqo*fSe|Z1$Qr(PnthW%~E$D8)E2thg$cQ7q{&%{@ykhhc{qdRC=cXJEe@RKIv%1<3 zwT0arL5;G6{bK)qoK}j?=687qDg;gkii;6N0ZP;=*Dnk&Q_uq0i zu$05^V)<~?+Mv1zt}Bktg?UV^zI_#VWTgk9G5>Wu8$PF&cUNuALGo=_&4C43_iHi-o)^7Fh zwLX9so5Z6eQ#z98Ob7Mf;}EzQ6^6Sm#=EU5Vxy5EfyT%Ah62tye3m2dag(zD{CV5d z8xj;e!2JBb2L6du{ZV)Ot}Ot8v}PS{Z{U2Zj+O=A?rEMicoj ze7%+Mr*(23SM>_tHE_#gU>sOJom&7?3}~iZ1#wJIA~Aq8j846)#}|jpSr6+4)dS{; zd>fN}@p0d#l>Pm?htL&@X_WZcY*4sV1I6!VDXQ6pZ~989*M#hdQ<`OTaeO#Bh7ud3 zsi`f%@=XvQR924J(-S5m6?^a{-9xv>0g?3g8o$WP)*cMR?rdUw5V@;hG@GfnxNKSw zkX(3J8w4{3{bJ?K)Dt-QNkGQ+`=QK#u>j$A41P3edWp+R6Eg6~P`G8UaC%B!dpV+g zjV3nss)JMnIxey}+56G$&!w)E@p*cuwYO(BP9q&PT(0BxWtj8lADCqLMcc=Fs@-ts;>>d5!&E@U4CZPuBV9wC9io({|4TmH*>Q c-^;79ziOqJ^mT^7u{=mlN?Ec>-1yu70QoTfDF6Tf diff --git a/source/native-plugins/zita-at1-ui.cpp b/source/native-plugins/zita-at1-ui.cpp deleted file mode 100644 index b0b9ac916..000000000 --- a/source/native-plugins/zita-at1-ui.cpp +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Carla Native Plugins - * Copyright (C) 2012-2015 Filipe Coelho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the doc/GPL.txt file. - */ - -#include "CarlaPipeUtils.cpp" - -#include "zita-at1/png2img.cc" -#include "zita-at1/button.cc" -#include "zita-at1/guiclass.cc" -#include "zita-at1/mainwin.cc" -#include "zita-at1/rotary.cc" -#include "zita-at1/styles.cc" -#include "zita-at1/tmeter.cc" - -using namespace AT1; - -static Mainwin* mainwin = nullptr; - -// -------------------------------------------------------------------------------------------- - -class ZitaPipeClient : public CarlaPipeClient, - public Mainwin::ValueChangedCallback -{ -public: - ZitaPipeClient() noexcept - : CarlaPipeClient(), - fQuitReceived(false) {} - - ~ZitaPipeClient() noexcept override - { - if (fQuitReceived || ! isPipeRunning()) - return; - - const CarlaMutexLocker cml(getPipeLock()); - - writeMessage("exiting\n"); - flushMessages(); - } - - bool quitRequested() const noexcept - { - return fQuitReceived; - } - -protected: - bool msgReceived(const char* const msg) noexcept override - { - if (std::strcmp(msg, "zita-data") == 0) - { - float error; - int noteset, midiset; - CARLA_SAFE_ASSERT_RETURN(readNextLineAsFloat(error), true); - CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(noteset), true); - CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(midiset), true); - - mainwin->setdata_ui(error, noteset, midiset); - return true; - } - - if (std::strcmp(msg, "zita-mask") == 0) - { - uint mask; - CARLA_SAFE_ASSERT_RETURN(readNextLineAsUInt(mask), true); - - mainwin->setmask_ui(mask); - return true; - } - - if (std::strcmp(msg, "control") == 0) - { - uint index; - float value; - CARLA_SAFE_ASSERT_RETURN(readNextLineAsUInt(index), true); - CARLA_SAFE_ASSERT_RETURN(readNextLineAsFloat(value), true); - - if (index < Mainwin::NROTARY) - mainwin->_rotary[index]->set_value(value); - else if (index == Mainwin::NROTARY) // == kParameterM_CHANNEL - mainwin->setchan_ui(value); - - return true; - } - - if (std::strcmp(msg, "show") == 0) - { - mainwin->x_map(); - return true; - } - - if (std::strcmp(msg, "hide") == 0) - { - mainwin->x_unmap(); - return true; - } - - if (std::strcmp(msg, "focus") == 0) - { - mainwin->x_mapraised(); - return true; - } - - if (std::strcmp(msg, "uiTitle") == 0) - { - const char* uiTitle; - - CARLA_SAFE_ASSERT_RETURN(readNextLineAsString(uiTitle), true); - - mainwin->x_set_title(uiTitle); - return true; - } - - if (std::strcmp(msg, "quit") == 0) - { - fQuitReceived = true; - mainwin->stop(); - return true; - } - - carla_stderr("ZitaPipeClient::msgReceived : %s", msg); - return false; - } - - void noteMaskChangedCallback(int mask) - { - if (! isPipeRunning()) - return; - - char tmpBuf[0xff+1]; - tmpBuf[0xff] = '\0'; - std::snprintf(tmpBuf, 0xff, "%i\n", mask); - - const CarlaMutexLocker cml(getPipeLock()); - - writeMessage("zita-mask\n", 10); - writeMessage(tmpBuf); - flushMessages(); - } - - void valueChangedCallback(uint index, float value) override - { - if (! isPipeRunning()) - return; - - writeControlMessage(index, value); - } - -private: - bool fQuitReceived; -}; - -// -------------------------------------------------------------------------------------------- - -int main(int argc, const char* argv[]) -{ - X_resman xresman; - X_display *display; - X_handler *handler; - X_rootwin *rootwin; - int ev, xp, yp, xs, ys; - - int fake_argc = 1; - char* fake_argv[] = { (char*)"rev1" }; - xresman.init(&fake_argc, fake_argv, (char*)"rev1", nullptr, 0); - - display = new X_display(nullptr); - if (display->dpy () == 0) - { - carla_stderr("Can't open display."); - delete display; - return 1; - } - - ZitaPipeClient pipe; - const char* uiTitle = "Test UI"; - - if (argc > 1) - { - uiTitle = argv[2]; - - if (! pipe.initPipeClient(argv)) - return 1; - } - - xp = yp = 100; - xs = Mainwin::XSIZE + 4; - ys = Mainwin::YSIZE + 30; - xresman.geometry(".geometry", display->xsize(), display->ysize(), 1, xp, yp, xs, ys); - - styles_init(display, &xresman); - rootwin = new X_rootwin(display); - mainwin = new Mainwin(rootwin, &xresman, xp, yp, &pipe); - mainwin->x_set_title(uiTitle); - rootwin->handle_event(); - handler = new X_handler(display, mainwin, EV_X11); - handler->next_event(); - XFlush(display->dpy()); - - if (argc == 1) - mainwin->x_map(); - - do - { - ev = mainwin->process(); - if (ev == EV_X11) - { - rootwin->handle_event(); - handler->next_event(); - } - else if (ev == Esync::EV_TIME) - { - handler->next_event(); - - if (pipe.isPipeRunning()) - pipe.idlePipe(); - } - } - while (ev != EV_EXIT && ! pipe.quitRequested()); - - styles_fini(display); - delete handler; - delete rootwin; - delete display; - - return 0; -} - -// -------------------------------------------------------------------------------------------- diff --git a/source/native-plugins/zita-at1.cpp b/source/native-plugins/zita-at1.cpp deleted file mode 100644 index 429384f3a..000000000 --- a/source/native-plugins/zita-at1.cpp +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Carla Native Plugins - * Copyright (C) 2012-2017 Filipe Coelho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the doc/GPL.txt file. - */ - -#include "CarlaNativeExtUI.hpp" -#include "CarlaJuceUtils.hpp" - -#include "zita-at1/jclient.cc" -#include "zita-at1/retuner.cc" - -#include "water/maths/MathsFunctions.h" - -using water::roundToIntAccurate; - -using namespace AT1; - -// ----------------------------------------------------------------------- -// AT1 Plugin - -class AT1Plugin : public NativePluginAndUiClass -{ -public: - enum Parameters { - // rotary knobs - kParameterR_TUNE, - kParameterR_FILT, - kParameterR_BIAS, - kParameterR_CORR, - kParameterR_OFFS, - // knob count - kParameterNROTARY, - // midi channel - kParameterM_CHANNEL = kParameterNROTARY, - // final count - kNumParameters - }; - - AT1Plugin(const NativeHostDescriptor* const host) - : NativePluginAndUiClass(host, "zita-at1-ui"), - fJackClient(), - jclient(nullptr), - notemask(0xfff) - { - CARLA_SAFE_ASSERT(host != nullptr); - - carla_zeroStruct(fJackClient); - - fJackClient.bufferSize = getBufferSize(); - fJackClient.sampleRate = getSampleRate(); - - // set initial values - fParameters[kParameterR_TUNE] = 440.0f; - fParameters[kParameterR_FILT] = 0.1f; - fParameters[kParameterR_BIAS] = 0.5f; - fParameters[kParameterR_CORR] = 1.0f; - fParameters[kParameterR_OFFS] = 0.0f; - fParameters[kParameterM_CHANNEL] = 0.0f; - - _recreateZitaClient(); - } - - // ------------------------------------------------------------------- - // Plugin parameter calls - - uint32_t getParameterCount() const override - { - return kNumParameters; - } - - const NativeParameter* getParameterInfo(const uint32_t index) const override - { - CARLA_SAFE_ASSERT_RETURN(index < kNumParameters, nullptr); - - static NativeParameter param; - static NativeParameterScalePoint scalePoints[17]; - - int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE; - - // reset - param.name = nullptr; - param.unit = nullptr; - param.ranges.def = 0.0f; - param.ranges.min = 0.0f; - param.ranges.max = 1.0f; - param.ranges.step = 1.0f; - param.ranges.stepSmall = 1.0f; - param.ranges.stepLarge = 1.0f; - param.scalePointCount = 0; - param.scalePoints = nullptr; - - switch (index) - { - case kParameterR_TUNE: - param.name = "Tuning"; - param.ranges.def = 440.0f; - param.ranges.min = 400.0f; - param.ranges.max = 480.0f; - break; - case kParameterR_FILT: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "Filter"; - param.ranges.def = 0.1f; - param.ranges.min = 0.02f; - param.ranges.max = 0.5f; - break; - case kParameterR_BIAS: - param.name = "Bias"; - param.ranges.def = 0.5f; - param.ranges.min = 0.0f; - param.ranges.max = 1.0f; - break; - case kParameterR_CORR: - param.name = "Correction"; - param.ranges.def = 1.0f; - param.ranges.min = 0.0f; - param.ranges.max = 1.0f; - break; - case kParameterR_OFFS: - param.name = "Offset"; - param.ranges.def = 0.0f; - param.ranges.min = -2.0f; - param.ranges.max = 2.0f; - break; - case kParameterM_CHANNEL: - hints |= NATIVE_PARAMETER_USES_SCALEPOINTS; - param.name = "MIDI Channel"; - param.ranges.def = 0.0f; - param.ranges.min = 0.0f; - param.ranges.max = 16.0f; - param.scalePointCount = 17; - param.scalePoints = scalePoints; - scalePoints[ 0].value = 0.0f; - scalePoints[ 0].label = "Omni"; - scalePoints[ 1].value = 1.0f; - scalePoints[ 1].label = "1"; - scalePoints[ 2].value = 2.0f; - scalePoints[ 2].label = "2"; - scalePoints[ 3].value = 3.0f; - scalePoints[ 3].label = "3"; - scalePoints[ 4].value = 4.0f; - scalePoints[ 4].label = "4"; - scalePoints[ 5].value = 5.0f; - scalePoints[ 5].label = "5"; - scalePoints[ 6].value = 6.0f; - scalePoints[ 6].label = "6"; - scalePoints[ 7].value = 7.0f; - scalePoints[ 7].label = "7"; - scalePoints[ 8].value = 8.0f; - scalePoints[ 8].label = "8"; - scalePoints[ 9].value = 9.0f; - scalePoints[ 9].label = "9"; - scalePoints[10].value = 10.0f; - scalePoints[10].label = "10"; - scalePoints[11].value = 11.0f; - scalePoints[11].label = "11"; - scalePoints[12].value = 12.0f; - scalePoints[12].label = "12"; - scalePoints[13].value = 13.0f; - scalePoints[13].label = "13"; - scalePoints[14].value = 14.0f; - scalePoints[14].label = "14"; - scalePoints[15].value = 15.0f; - scalePoints[15].label = "15"; - scalePoints[16].value = 16.0f; - scalePoints[16].label = "16"; - break; - } - - param.hints = static_cast(hints); - - return ¶m; - } - - float getParameterValue(const uint32_t index) const override - { - CARLA_SAFE_ASSERT_RETURN(index < kNumParameters, 0.0f); - - return fParameters[index]; - } - - // ------------------------------------------------------------------- - // Plugin state calls - - void setParameterValue(const uint32_t index, const float value) override - { - CARLA_SAFE_ASSERT_RETURN(index < kNumParameters,); - - fParameters[index] = value; - - Retuner* const retuner(jclient->retuner()); - - switch (index) - { - case kParameterR_TUNE: - retuner->set_refpitch(value); - break; - case kParameterR_FILT: - retuner->set_corrfilt(value); - break; - case kParameterR_BIAS: - retuner->set_notebias(value); - break; - case kParameterR_CORR: - retuner->set_corrgain(value); - break; - case kParameterR_OFFS: - retuner->set_corroffs(value); - break; - case kParameterM_CHANNEL: - jclient->set_midichan(value-1.0f); - break; - } - } - - // ------------------------------------------------------------------- - // Plugin process calls - - void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, - const NativeMidiEvent* const midiEvents, const uint32_t midiEventCount) override - { - if (! fJackClient.active) - { - carla_zeroFloats(outBuffer[0], frames); - return; - } - - fJackClient.portsAudioIn [0].buffer.audio = inBuffer [0]; - fJackClient.portsAudioOut[0].buffer.audio = outBuffer[0]; - - fJackClient.portsMidiIn[0].buffer.midi.count = midiEventCount; - fJackClient.portsMidiIn[0].buffer.midi.events = const_cast(midiEvents); - - fJackClient.processCallback(frames, fJackClient.processPtr); - } - - // ------------------------------------------------------------------- - // Plugin UI calls - - void uiShow(const bool show) override - { - NativePluginAndUiClass::uiShow(show); - - if (show && isPipeRunning()) - { - char tmpBuf[0xff+1]; - tmpBuf[0xff] = '\0'; - - const CarlaMutexLocker cml(getPipeLock()); - - writeMessage("zita-mask\n", 10); - - std::snprintf(tmpBuf, 0xff, "%i\n", notemask); - writeMessage(tmpBuf); - - flushMessages(); - } - } - - void uiIdle() override - { - NativePluginAndUiClass::uiIdle(); - - if (! isPipeRunning()) - return; - - char tmpBuf[0xff+1]; - tmpBuf[0xff] = '\0'; - - const CarlaMutexLocker cmlc(fClientMutex); - const CarlaMutexLocker cmlp(getPipeLock()); - const ScopedLocale csl; - - Retuner* const retuner(jclient->retuner()); - - writeMessage("zita-data\n", 10); - - std::snprintf(tmpBuf, 0xff, "%f\n", retuner->get_error()); - writeMessage(tmpBuf); - - std::snprintf(tmpBuf, 0xff, "%i\n", retuner->get_noteset()); - writeMessage(tmpBuf); - - std::snprintf(tmpBuf, 0xff, "%i\n", jclient->get_midiset()); - writeMessage(tmpBuf); - - flushMessages(); - } - - // ------------------------------------------------------------------- - // Plugin state calls - - char* getState() const override - { - char tmpBuf[0xff+1]; - tmpBuf[0xff] = '\0'; - std::snprintf(tmpBuf, 0xff, "%i", notemask); - - return strdup(tmpBuf); - } - - void setState(const char* const data) override - { - CARLA_SAFE_ASSERT_RETURN(data != nullptr && data[0] != '\0',); - - notemask = std::atoi(data); - - const CarlaMutexLocker cml(fClientMutex); - jclient->set_notemask(notemask); - } - - // ------------------------------------------------------------------- - // Plugin dispatcher calls - - void bufferSizeChanged(const uint32_t bufferSize) override - { - fJackClient.bufferSize = bufferSize; - // _recreateZitaClient(); // FIXME - } - - void sampleRateChanged(const double sampleRate) override - { - fJackClient.sampleRate = sampleRate; - // _recreateZitaClient(); // FIXME - } - - // ------------------------------------------------------------------- - // Pipe Server calls - - bool msgReceived(const char* const msg) noexcept override - { - if (NativePluginAndUiClass::msgReceived(msg)) - return true; - - if (std::strcmp(msg, "zita-mask") == 0) - { - int mask; - - CARLA_SAFE_ASSERT_RETURN(readNextLineAsInt(mask), true); - - const CarlaMutexLocker cml(fClientMutex); - - try { - if (mask < 0) - { - jclient->clr_midimask(); - } - else - { - notemask = static_cast(mask); - jclient->set_notemask(mask); - } - } CARLA_SAFE_EXCEPTION("msgReceived, zita-mask"); - - return true; - } - - return false; - } - - // ------------------------------------------------------------------- - -private: - // Fake jack client - jack_client_t fJackClient; - - // Zita stuff (core) - ScopedPointer jclient; - uint notemask; - - // Parameters - float fParameters[kNumParameters]; - - // mutex to make sure jclient is always valid - CarlaMutex fClientMutex; - - void _recreateZitaClient() - { - const CarlaMutexLocker cml(fClientMutex); - - jclient = new Jclient(&fJackClient); - jclient->set_notemask(notemask); - jclient->set_midichan(roundToIntAccurate(fParameters[kParameterM_CHANNEL])-1); - - Retuner* const retuner(jclient->retuner()); - retuner->set_refpitch(fParameters[kParameterR_TUNE]); - retuner->set_corrfilt(fParameters[kParameterR_FILT]); - retuner->set_notebias(fParameters[kParameterR_BIAS]); - retuner->set_corrgain(fParameters[kParameterR_CORR]); - retuner->set_corroffs(fParameters[kParameterR_OFFS]); - } - - PluginClassEND(AT1Plugin) - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AT1Plugin) -}; - -// ----------------------------------------------------------------------- - -static const NativePluginDescriptor at1Desc = { - /* category */ NATIVE_PLUGIN_CATEGORY_MODULATOR, - /* hints */ static_cast(NATIVE_PLUGIN_IS_RTSAFE - |NATIVE_PLUGIN_HAS_UI - |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS - |NATIVE_PLUGIN_USES_STATE), - /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING, - /* audioIns */ 1, - /* audioOuts */ 1, - /* midiIns */ 1, - /* midiOuts */ 0, - /* paramIns */ AT1Plugin::kNumParameters, - /* paramOuts */ 0, - /* name */ "AT1", - /* label */ "at1", - /* maker */ "falkTX, Fons Adriaensen", - /* copyright */ "GPL v2+", - PluginDescriptorFILL(AT1Plugin) -}; - -// ----------------------------------------------------------------------- - -CARLA_EXPORT -void carla_register_native_plugin_zita_at1(); - -CARLA_EXPORT -void carla_register_native_plugin_zita_at1() -{ - carla_register_native_plugin(&at1Desc); -} - -// ----------------------------------------------------------------------- diff --git a/source/native-plugins/zita-at1/button.cc b/source/native-plugins/zita-at1/button.cc deleted file mode 100644 index 6a20ea29b..000000000 --- a/source/native-plugins/zita-at1/button.cc +++ /dev/null @@ -1,139 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include "button.h" - -namespace AT1 { - - -int PushButton::_keymod = 0; -int PushButton::_button = 0; - - -PushButton::PushButton (X_window *parent, - X_callback *cbobj, - ButtonImg *image, - int xp, - int yp, - int cbind) : - - X_window (parent, - image->_x0 + xp, image->_y0 + yp, - image->_dx, image->_dy, - image->_backg->pixel), - _cbobj (cbobj), - _cbind (cbind), - _image (image), - _state (0) -{ - x_add_events (ExposureMask | ButtonPressMask | ButtonReleaseMask); -} - - -PushButton::~PushButton (void) -{ -} - - -void PushButton::init (X_display *disp) -{ -} - - -void PushButton::fini (void) -{ -} - - -void PushButton::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - render (); - break; - - case ButtonPress: - bpress ((XButtonEvent *) E); - break; - - case ButtonRelease: - brelse ((XButtonEvent *) E); - break; - - default: - fprintf (stderr, "PushButton: event %d\n", E->type ); - } -} - - -void PushButton::bpress (XButtonEvent *E) -{ - int r = 0; - - if (E->button < 4) - { - _keymod = E->state; - _button = E->button; - r = handle_press (); - } - render (); - if (r) callback (r); -} - - -void PushButton::brelse (XButtonEvent *E) -{ - int r = 0; - - if (E->button < 4) - { - _keymod = E->state; - _button = E->button; - r = handle_relse (); - } - render (); - if (r) callback (r); -} - - -void PushButton::set_state (int s) -{ - if (_state != s) - { - _state = s; - render (); - } -} - - -void PushButton::render (void) -{ - XPutImage (dpy (), win (), dgc (), _image->_ximage, - _image->_x0, _image->_y0 + _state * _image->_dy, 0, 0, _image->_dx, _image->_dy); -} - - -} diff --git a/source/native-plugins/zita-at1/button.h b/source/native-plugins/zita-at1/button.h deleted file mode 100644 index 9c9a4bff8..000000000 --- a/source/native-plugins/zita-at1/button.h +++ /dev/null @@ -1,97 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __BUTTON_H -#define __BUTTON_H - - -#include -#include -#include - -namespace AT1 { - - -class ButtonImg -{ -public: - - XftColor *_backg; - XImage *_ximage; - int _x0; - int _y0; - int _dx; - int _dy; -}; - - - -class PushButton : public X_window -{ -public: - - PushButton (X_window *parent, - X_callback *cbobj, - ButtonImg *image, - int xp, - int yp, - int cbind = 0); - - virtual ~PushButton (void); - - enum { NOP = 100, PRESS, RELSE }; - - int cbind (void) { return _cbind; } - int state (void) { return _state; } - - virtual void set_state (int s); - - static void init (X_display *disp); - static void fini (void); - -protected: - - X_callback *_cbobj; - int _cbind; - ButtonImg *_image; - int _state; - - void render (void); - void callback (int k) { _cbobj->handle_callb (k, this, 0); } - -private: - - void handle_event (XEvent *E); - void bpress (XButtonEvent *E); - void brelse (XButtonEvent *E); - - virtual int handle_press (void) = 0; - virtual int handle_relse (void) = 0; - - static int _keymod; - static int _button; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-at1/global.h b/source/native-plugins/zita-at1/global.h deleted file mode 100644 index 42ea702f8..000000000 --- a/source/native-plugins/zita-at1/global.h +++ /dev/null @@ -1,32 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __GLOBAL_H -#define __GLOBAL_H - - -#define PROGNAME "zita-at1" -#define EV_X11 16 -#define EV_EXIT 31 - - -#endif diff --git a/source/native-plugins/zita-at1/guiclass.cc b/source/native-plugins/zita-at1/guiclass.cc deleted file mode 100644 index 9741a639b..000000000 --- a/source/native-plugins/zita-at1/guiclass.cc +++ /dev/null @@ -1,186 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2014 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include "guiclass.h" - -namespace AT1 { - - -int Pbutt0::handle_press (void) -{ - _state |= 2; - return PRESS; -} - -int Pbutt0::handle_relse (void) -{ - _state &= ~2; - return NOP; -} - - -int Pbutt1::handle_press (void) -{ - _state ^= 1; - return PRESS; -} - -int Pbutt1::handle_relse (void) -{ - return NOP; -} - - - -Rlinctl::Rlinctl (X_window *parent, - X_callback *cbobj, - int cbind, - RotaryGeom *rgeom, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini) : -RotaryCtl (parent, cbobj, cbind, rgeom, xp, yp), -_cm (cm), -_dd (dd), -_vmin (vmin), -_vmax (vmax), -_form (0) -{ - _count = -1; - set_value (vini); -} - -void Rlinctl::get_string (char *p, int n) -{ - if (_form) snprintf (p, n, _form, _value); - else *p = 0; -} - -void Rlinctl::set_value (double v) -{ - set_count ((int) floor (_cm * (v - _vmin) / (_vmax - _vmin) + 0.5)); - render (); -} - -int Rlinctl::handle_button (void) -{ - return PRESS; -} - -int Rlinctl::handle_motion (int dx, int dy) -{ - return set_count (_rcount + dx - dy); -} - -int Rlinctl::handle_mwheel (int dw) -{ - if (! (_keymod & ShiftMask)) dw *= _dd; - return set_count (_count + dw); -} - -int Rlinctl::set_count (int u) -{ - if (u < 0) u= 0; - if (u > _cm) u = _cm; - if (u != _count) - { - _count = u; - _value = _vmin + u * (_vmax - _vmin) / _cm; - _angle = 270.0 * ((double) u / _cm - 0.5); - return DELTA; - } - return 0; -} - - - -Rlogctl::Rlogctl (X_window *parent, - X_callback *cbobj, - int cbind, - RotaryGeom *rgeom, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini) : -RotaryCtl (parent, cbobj, cbind, rgeom, xp, yp), -_cm (cm), -_dd (dd), -_form (0) -{ - _count = -1; - _vmin = log (vmin); - _vmax = log (vmax); - set_value (vini); -} - -void Rlogctl::get_string (char *p, int n) -{ - if (_form) snprintf (p, n, _form, _value); - else *p = 0; -} - -void Rlogctl::set_value (double v) -{ - set_count ((int) floor (_cm * (log (v) - _vmin) / (_vmax - _vmin) + 0.5)); - render (); -} - -int Rlogctl::handle_button (void) -{ - return PRESS; -} - -int Rlogctl::handle_motion (int dx, int dy) -{ - return set_count (_rcount + dx - dy); -} - -int Rlogctl::handle_mwheel (int dw) -{ - if (! (_keymod & ShiftMask)) dw *= _dd; - return set_count (_count + dw); -} - -int Rlogctl::set_count (int u) -{ - if (u < 0) u= 0; - if (u > _cm) u = _cm; - if (u != _count) - { - _count = u; - _value = exp (_vmin + u * (_vmax - _vmin) / _cm); - _angle = 270.0 * ((double) u / _cm - 0.5); - return DELTA; - } - return 0; -} - - -} diff --git a/source/native-plugins/zita-at1/guiclass.h b/source/native-plugins/zita-at1/guiclass.h deleted file mode 100644 index 95bdbadde..000000000 --- a/source/native-plugins/zita-at1/guiclass.h +++ /dev/null @@ -1,145 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2014 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __GUICLASS_H -#define __GUICLASS_H - - -#include "button.h" -#include "rotary.h" - -namespace AT1 { - - -class Pbutt0 : public PushButton -{ -public: - - Pbutt0 (X_window *parent, - X_callback *cbobj, - ButtonImg *image, - int xp, - int yp, - int cbind = 0) : - PushButton (parent, cbobj, image, xp, yp, cbind) - { - } - -private: - - virtual int handle_press (void); - virtual int handle_relse (void); -}; - - -class Pbutt1 : public PushButton -{ -public: - - Pbutt1 (X_window *parent, - X_callback *cbobj, - ButtonImg *image, - int xp, - int yp, - int cbind = 0) : - PushButton (parent, cbobj, image, xp, yp, cbind) - { - } - -private: - - virtual int handle_press (void); - virtual int handle_relse (void); -}; - - -class Rlinctl : public RotaryCtl -{ -public: - - Rlinctl (X_window *parent, - X_callback *cbobj, - int cbind, - RotaryGeom *rgeom, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini); - - virtual void set_value (double v); - virtual void get_string (char *p, int n); - -private: - - virtual int handle_button (void); - virtual int handle_motion (int dx, int dy); - virtual int handle_mwheel (int dw); - int set_count (int u); - - int _cm; - int _dd; - double _vmin; - double _vmax; - const char *_form; -}; - - -class Rlogctl : public RotaryCtl -{ -public: - - Rlogctl (X_window *parent, - X_callback *cbobj, - int cbind, - RotaryGeom *rgeom, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini); - - virtual void set_value (double v); - virtual void get_string (char *p, int n); - -private: - - virtual int handle_button (void); - virtual int handle_motion (int dx, int dy); - virtual int handle_mwheel (int dw); - int set_count (int u); - - int _cm; - int _dd; - double _vmin; - double _vmax; - const char *_form; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-at1/jclient.cc b/source/native-plugins/zita-at1/jclient.cc deleted file mode 100644 index df2b2439e..000000000 --- a/source/native-plugins/zita-at1/jclient.cc +++ /dev/null @@ -1,157 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ----------------------------------------------------------------------- - - -#include -#include -#include -#include "jclient.h" -#include "global.h" - -namespace AT1 { - - -Jclient::Jclient (jack_client_t *jclient) : - A_thread ("jclient"), - _jack_client (jclient), - _active (false) -{ - init_jack (); -} - - -Jclient::~Jclient (void) -{ - if (_jack_client) close_jack (); -} - - -void Jclient::init_jack (void) -{ - jack_on_shutdown (_jack_client, jack_static_shutdown, (void *) this); - jack_set_process_callback (_jack_client, jack_static_process, (void *) this); - jack_activate (_jack_client); - - _fsamp = jack_get_sample_rate (_jack_client); - _fsize = jack_get_buffer_size (_jack_client); - - _ainp_port = jack_port_register (_jack_client, "in", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); - _aout_port = jack_port_register (_jack_client, "out", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - _midi_port = jack_port_register (_jack_client, "pitch", JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0); - - _retuner = new Retuner (_fsamp); - _notemask = 0xFFF; - _midichan = -1; - clr_midimask (); - - _active = true; -} - - -void Jclient::close_jack () -{ - jack_deactivate (_jack_client); - jack_client_close (_jack_client); - delete _retuner; -} - - -void Jclient::jack_static_shutdown (void *arg) -{ - ((Jclient *) arg)->jack_shutdown (); -} - - -int Jclient::jack_static_process (jack_nframes_t nframes, void *arg) -{ - return ((Jclient *) arg)->jack_process (nframes); -} - - -void Jclient::jack_shutdown (void) -{ - send_event (EV_EXIT, 1); -} - - -void Jclient::clr_midimask (void) -{ - int i; - - for (i = 0; i < 12; i++) _notes [i] = 0; - _midimask = 0; -} - - -void Jclient::midi_process (int nframes) -{ - int i, b, n, t, v; - void *p; - jack_midi_event_t E; - - p = jack_port_get_buffer (_midi_port, nframes); - i = 0; - while (jack_midi_event_get (&E, p, i) == 0 && E.size == 3) - { - t = E.buffer [0]; - n = E.buffer [1]; - v = E.buffer [2]; - if ((_midichan < 0) || ((t & 0x0F) == _midichan)) - { - const int n12 = n % 12; - switch (t & 0xF0) - { - case 0x80: - case 0x90: - if (v && (t & 0x10))_notes [n12] += 1; - else if (_notes [n12] > 0) _notes [n12] -= 1; - break; - } - } - i++; - } - - _midimask = 0; - for (i = 0, b = 1; i < 12; i++, b <<= 1) - { - if (_notes [i]) _midimask |= b; - } -} - - -int Jclient::jack_process (int nframes) -{ - float *inpp; - float *outp; - - if (!_active) return 0; - - inpp = (float *) jack_port_get_buffer (_ainp_port, nframes); - outp = (float *) jack_port_get_buffer (_aout_port, nframes); - midi_process (nframes); - _retuner->set_notemask (_midimask ? _midimask : _notemask); - _retuner->process (nframes, inpp, outp); - - return 0; -} - - -} diff --git a/source/native-plugins/zita-at1/jclient.h b/source/native-plugins/zita-at1/jclient.h deleted file mode 100644 index 0f75d0569..000000000 --- a/source/native-plugins/zita-at1/jclient.h +++ /dev/null @@ -1,80 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ----------------------------------------------------------------------- - - -#ifndef __JCLIENT_H -#define __JCLIENT_H - - -#include "CarlaNativeJack.h" -#include -#include "retuner.h" - -namespace AT1 { - - -class Jclient : public A_thread -{ -public: - - Jclient (jack_client_t *jclient); - ~Jclient (void); - - unsigned int fsize (void) const { return _fsize; } - unsigned int fsamp (void) const { return _fsamp; } - Retuner *retuner (void) { return _retuner; } - void set_notemask (int m) { _notemask = m; } - void set_midichan (int c) { _midichan = c; } - void clr_midimask (void); - int get_noteset (void) { return _retuner->get_noteset (); } - int get_midiset (void) { return _midimask; } - -private: - - virtual void thr_main (void) {} - - void init_jack (void); - void close_jack (void); - void jack_shutdown (void); - int jack_process (int nframes); - void midi_process (int nframes); - - jack_client_t *_jack_client; - jack_port_t *_ainp_port; - jack_port_t *_aout_port; - jack_port_t *_midi_port; - bool _active; - unsigned int _fsamp; - unsigned int _fsize; - Retuner *_retuner; - int _notes [12]; - int _notemask; - int _midimask; - int _midichan; - - static void jack_static_shutdown (void *arg); - static int jack_static_process (jack_nframes_t nframes, void *arg); -}; - - -} - -#endif diff --git a/source/native-plugins/zita-at1/mainwin.cc b/source/native-plugins/zita-at1/mainwin.cc deleted file mode 100644 index fcc4b1c37..000000000 --- a/source/native-plugins/zita-at1/mainwin.cc +++ /dev/null @@ -1,368 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2014 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include "styles.h" -#include "global.h" -#include "mainwin.h" - -namespace AT1 { - - -Mainwin::Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, ValueChangedCallback* valuecb) : - A_thread ("Main"), - X_window (parent, xp, yp, XSIZE, YSIZE, XftColors [C_MAIN_BG]->pixel), - _stop (false), - _xres (xres), - z_error (0.0f), - z_noteset (0), - z_midiset (0), - _valuecb (valuecb) -{ - X_hints H; - int i, j, x, y; - - _atom = XInternAtom (dpy (), "WM_DELETE_WINDOW", True); - XSetWMProtocols (dpy (), win (), &_atom, 1); - _atom = XInternAtom (dpy (), "WM_PROTOCOLS", True); - - H.position (xp, yp); - H.minsize (XSIZE, YSIZE); - H.maxsize (XSIZE, YSIZE); - H.rname (xres->rname ()); - H.rclas (xres->rclas ()); - x_apply (&H); - - x = 20; - _bmidi = new Pbutt0 (this, this, &b_midi_img, x, 12, B_MIDI); - _bmidi->x_map (); - - bstyle1.size.x = 50; - bstyle1.size.y = 20; - _bchan = new X_tbutton (this, this, &bstyle1, x - 5, 40, "Omni", 0, B_CHAN); - _bchan->x_map (); - _midich = 0; - - x = 100; - y = 23; - _tmeter = new Tmeter (this, x - 20, 53); - _tmeter->x_map (); - for (i = j = 0; i < 12; i++, j++) - { - _bnote [i] = new Pbutt1 (this, this, &b_note_img, x, y, i); - _bnote [i]->set_state (1); - _bnote [i]->x_map (); - if (j == 4) - { - x += 20; - j++; - } - else - { - x += 10; - if (j & 1) y += 18; - else y -= 18; - } - } - - - RotaryCtl::init (disp ()); - x = 270; - _rotary [R_TUNE] = new Rlinctl (this, this, R_TUNE, &r_tune_geom, x, 0, 400, 5, 400.0, 480.0, 440.0); - _rotary [R_BIAS] = new Rlinctl (this, this, R_BIAS, &r_bias_geom, x, 0, 270, 5, 0.0, 1.0, 0.5); - _rotary [R_FILT] = new Rlogctl (this, this, R_FILT, &r_filt_geom, x, 0, 200, 5, 0.50, 0.02, 0.1); - _rotary [R_CORR] = new Rlinctl (this, this, R_CORR, &r_corr_geom, x, 0, 270, 5, 0.0, 1.0, 1.0); - _rotary [R_OFFS] = new Rlinctl (this, this, R_OFFS, &r_offs_geom, x, 0, 400, 10, -2.0, 2.0, 0.0); - for (i = 0; i < NROTARY; i++) _rotary [i]->x_map (); - - _textln = new X_textip (this, 0, &tstyle1, 0, 0, 50, 15, 15); - _textln->set_align (0); - _ttimer = 0; - _notes = 0xFFF; - - x_add_events (ExposureMask); - set_time (0); - inc_time (500000); -} - - -Mainwin::~Mainwin (void) -{ - RotaryCtl::fini (); -} - - -int Mainwin::process (void) -{ - int e; - - if (_stop) handle_stop (); - - e = get_event_timed (); - switch (e) - { - case EV_TIME: - handle_time (); - break; - } - return e; -} - - -void Mainwin::setdata_ui (float error, int noteset, int midiset) -{ - z_error = error; - z_noteset = noteset; - z_midiset = midiset; -} - - -void Mainwin::setchan_ui (int chan) -{ - char s [16]; - - _midich = chan; - - if (_midich) - { - sprintf (s, "Ch %d\n", _midich); - _bchan->set_text (s, 0); - } - else _bchan->set_text ("Omni", 0); -} - - -void Mainwin::setmask_ui (int mask) -{ - _notes = mask; - - for (int i = 0; i < 12; i++) - _bnote [i]->set_state ( (_notes & (1 << i)) != 0 ? 1 : 0 ); -} - - -void Mainwin::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - expose ((XExposeEvent *) E); - break; - - case ClientMessage: - clmesg ((XClientMessageEvent *) E); - break; - } -} - - -void Mainwin::expose (XExposeEvent *E) -{ - if (E->count) return; - redraw (); -} - - -void Mainwin::clmesg (XClientMessageEvent *E) -{ - if (E->message_type == _atom) _stop = true; -} - - -void Mainwin::handle_time (void) -{ - int i, k, s; - float v; - - v = z_error; - _tmeter->update (v, v); - k = z_noteset; - for (i = 0; i < 12; i++) - { - s = _bnote [i]->state (); - if (k & 1) s |= 2; - else s &= ~2; - _bnote [i]->set_state (s); - k >>= 1; - } - k = z_midiset; - if (k) _bmidi->set_state (_bmidi->state () | 1); - else _bmidi->set_state (_bmidi->state () & ~1); - if (_ttimer) - { - if (--_ttimer == 0) _textln->x_unmap (); - } - inc_time (5000); - XFlush (dpy ()); -} - - -void Mainwin::handle_stop (void) -{ - put_event (EV_EXIT, 1); -} - - -void Mainwin::handle_callb (int type, X_window *W, XEvent *E) -{ - PushButton *B; - RotaryCtl *R; - int k; - float v; - - switch (type) - { - case X_callback::BUTTON | X_button::PRESS: - { - X_button *Z = (X_button *) W; - XButtonEvent *X = (XButtonEvent *) E; - switch (Z->cbid ()) - { - case B_CHAN: - switch (X->button) - { - case 1: - case 4: - setchan (1); - break; - case 3: - case 5: - setchan (-1); - break; - } - break; - } - break; - } - case PushButton::PRESS: - B = (PushButton *) W; - k = B->cbind (); - if (k < B_MIDI) - { - k = 1 << k; - if (B->state () & 1) _notes |= k; - else _notes &= ~k; - _valuecb->noteMaskChangedCallback (_notes); - } - else if (k == B_MIDI) - { - _valuecb->noteMaskChangedCallback (-1); - } - break; - - case RotaryCtl::PRESS: - R = (RotaryCtl *) W; - k = R->cbind (); - switch (k) - { - case R_TUNE: - case R_OFFS: - showval (k); - break; - } - break; - - case RotaryCtl::DELTA: - R = (RotaryCtl *) W; - k = R->cbind (); - switch (k) - { - case R_TUNE: - v = _rotary [R_TUNE]->value (); - _valuecb->valueChangedCallback (R_TUNE, v); - showval (k); - break; - case R_BIAS: - v = _rotary [R_BIAS]->value (); - _valuecb->valueChangedCallback (R_BIAS, v); - break; - case R_FILT: - v = _rotary [R_FILT]->value (); - _valuecb->valueChangedCallback (R_FILT, v); - break; - case R_CORR: - v = _rotary [R_CORR]->value (); - _valuecb->valueChangedCallback (R_CORR, v); - break; - case R_OFFS: - v = _rotary [R_OFFS]->value (); - _valuecb->valueChangedCallback (R_OFFS, v); - showval (k); - break; - } - break; - } -} - - -void Mainwin::setchan (int d) -{ - char s [16]; - - _midich += d; - if (_midich < 0) _midich = 0; - if (_midich > 16) _midich = 16; - if (_midich) - { - sprintf (s, "Ch %d\n", _midich); - _bchan->set_text (s, 0); - } - else _bchan->set_text ("Omni", 0); - _valuecb->valueChangedCallback (NROTARY, _midich); -} - - -void Mainwin::showval (int k) -{ - char s [16]; - - switch (k) - { - case R_TUNE: - sprintf (s, "%5.1lf", _rotary [R_TUNE]->value ()); - _textln->x_move (222, 58); - break; - case R_OFFS: - sprintf (s, "%5.2lf", _rotary [R_OFFS]->value ()); - _textln->x_move (463, 58); - break; - } - _textln->set_text (s); - _textln->x_map (); - _ttimer = 40; -} - - -void Mainwin::redraw (void) -{ - int x; - - x = 80; - XPutImage (dpy (), win (), dgc (), notesect_img, 0, 0, x, 0, 190, 75); - x += 190; - XPutImage (dpy (), win (), dgc (), ctrlsect_img, 0, 0, x, 0, 315, 75); -} - - -} diff --git a/source/native-plugins/zita-at1/mainwin.h b/source/native-plugins/zita-at1/mainwin.h deleted file mode 100644 index 60574665c..000000000 --- a/source/native-plugins/zita-at1/mainwin.h +++ /dev/null @@ -1,105 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2014 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __MAINWIN_H -#define __MAINWIN_H - - -#include -#include "guiclass.h" -#include "jclient.h" -#include "tmeter.h" -#include "global.h" - -class ZitaPipeClient; - -namespace AT1 { - - -class Mainwin : public A_thread, public X_window, public X_callback -{ -public: - - struct ValueChangedCallback { - virtual ~ValueChangedCallback() {} - virtual void noteMaskChangedCallback(int) = 0; - virtual void valueChangedCallback(uint, float) = 0; - }; - - - enum { XSIZE = 580, YSIZE = 75 }; - - Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, ValueChangedCallback* valuecb); - ~Mainwin (void); - Mainwin (const Mainwin&); - Mainwin& operator=(const Mainwin&); - - void stop (void) { _stop = true; } - int process (void); - - void setdata_ui (float error, int noteset, int midiset); - void setchan_ui (int chan); - void setmask_ui (int mask); - -private: - - enum { B_MIDI = 12, B_CHAN = 13 }; - enum { R_TUNE, R_FILT, R_BIAS, R_CORR, R_OFFS, NROTARY }; - - virtual void thr_main (void) {} - - void handle_time (void); - void handle_stop (void); - void handle_event (XEvent *); - void handle_callb (int type, X_window *W, XEvent *E); - void showval (int k); - void expose (XExposeEvent *E); - void clmesg (XClientMessageEvent *E); - void redraw (void); - void setchan (int d); - - Atom _atom; - bool _stop; - bool _ambis; - X_resman *_xres; - int _notes; - PushButton *_bmidi; - PushButton *_bnote [12]; - RotaryCtl *_rotary [NROTARY]; - Tmeter *_tmeter; - X_textip *_textln; - X_tbutton *_bchan; - int _midich; - int _ttimer; - - float z_error; - int z_noteset, z_midiset; - - ValueChangedCallback* _valuecb; - - friend class ::ZitaPipeClient; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-at1/png2img.cc b/source/native-plugins/zita-at1/png2img.cc deleted file mode 100644 index c69e21a60..000000000 --- a/source/native-plugins/zita-at1/png2img.cc +++ /dev/null @@ -1,129 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2007-2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include - -namespace AT1 { - - -XImage *png2img (const char *file, X_display *disp, XftColor *bgnd) -{ - FILE *F; - png_byte hdr [8]; - png_structp png_ptr; - png_infop png_info; - const unsigned char **data, *p; - int r, dx, dy, x, y, dp; - float vr, vg, vb, va, br, bg, bb; - unsigned long mr, mg, mb, pix; - XImage *image; - - F = fopen (file, "r"); - if (!F) - { - fprintf (stderr, "Can't open '%s'\n", file); - return 0; - } - r = fread (hdr, 8, 1, F ); - if ((r != 1) || png_sig_cmp (hdr, 0, 8)) - { - fprintf (stderr, "'%s' is not a PNG file\n", file); - return 0; - } - fseek (F, 0, SEEK_SET); - - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); - if (! png_ptr) - { - fclose (F); - return 0; - } - png_info = png_create_info_struct (png_ptr); - if (! png_info) - { - png_destroy_read_struct (&png_ptr, 0, 0); - fclose (F); - return 0; - } - if (setjmp (png_jmpbuf (png_ptr))) - { - png_destroy_read_struct (&png_ptr, &png_info, 0); - fclose (F); - fprintf (stderr, "png:longjmp()\n"); - return 0; - } - - png_init_io (png_ptr, F); - png_read_png (png_ptr, png_info, - PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, - 0); - - dx = png_get_image_width (png_ptr, png_info); - dy = png_get_image_height (png_ptr, png_info); - dp = (png_get_color_type (png_ptr, png_info) & PNG_COLOR_MASK_ALPHA) ? 4 : 3; - - data = (const unsigned char **)(png_get_rows (png_ptr, png_info)); - - image = XCreateImage (disp->dpy (), - disp->dvi (), - DefaultDepth (disp->dpy (), disp->dsn ()), - ZPixmap, 0, 0, dx, dy, 32, 0); - image->data = new char [image->height * image->bytes_per_line]; - - mr = image->red_mask; - mg = image->green_mask; - mb = image->blue_mask; - - vr = mr / 255.0f; - vg = mg / 255.0f; - vb = mb / 255.0f; - if (bgnd) - { - br = bgnd->color.red >> 8; - bg = bgnd->color.green >> 8; - bb = bgnd->color.blue >> 8; - } - else br = bg = bb = 0; - - for (y = 0; y < dy; y++) - { - p = data [y]; - for (x = 0; x < dx; x++) - { - va = (dp == 4) ? (p [3] / 255.0f) : 1; - pix = ((unsigned long)((p [0] * va + (1 - va) * br) * vr) & mr) - | ((unsigned long)((p [1] * va + (1 - va) * bg) * vg) & mg) - | ((unsigned long)((p [2] * va + (1 - va) * bb) * vb) & mb); - XPutPixel (image, x, y, pix); - p += dp; - } - } - - png_destroy_read_struct (&png_ptr, &png_info, 0); - fclose (F); - - return image; -} - - -} diff --git a/source/native-plugins/zita-at1/png2img.h b/source/native-plugins/zita-at1/png2img.h deleted file mode 100644 index 00305d687..000000000 --- a/source/native-plugins/zita-at1/png2img.h +++ /dev/null @@ -1,35 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2007-2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __PNG2IMG_H -#define __PNG2IMG_H - - -#include - -namespace AT1 { - -extern XImage *png2img (const char *file, X_display *disp, XftColor *bgnd); - -} - -#endif diff --git a/source/native-plugins/zita-at1/retuner.cc b/source/native-plugins/zita-at1/retuner.cc deleted file mode 100644 index afbb70ca7..000000000 --- a/source/native-plugins/zita-at1/retuner.cc +++ /dev/null @@ -1,449 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (C) 2009-2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ----------------------------------------------------------------------- - - -#include -#include -#include -#include -#include "retuner.h" - -namespace AT1 { - - -Retuner::Retuner (int fsamp) : - _fsamp (fsamp), - _refpitch (440.0f), - _notebias (0.0f), - _corrfilt (1.0f), - _corrgain (1.0f), - _corroffs (0.0f), - _notemask (0xFFF) -{ - int i, h; - float t, x, y; - - if (_fsamp < 64000) - { - // At 44.1 and 48 kHz resample to double rate. - _upsamp = true; - _ipsize = 4096; - _fftlen = 2048; - _frsize = 128; - _resampler.setup (1, 2, 1, 32); // 32 is medium quality. - // Prefeed some input samples to remove delay. - _resampler.inp_count = _resampler.filtlen () - 1; - _resampler.inp_data = 0; - _resampler.out_count = 0; - _resampler.out_data = 0; - _resampler.process (); - } - else if (_fsamp < 128000) - { - // 88.2 or 96 kHz. - _upsamp = false; - _ipsize = 4096; - _fftlen = 4096; - _frsize = 256; - } - else - { - // 192 kHz, double time domain buffers sizes. - _upsamp = false; - _ipsize = 8192; - _fftlen = 8192; - _frsize = 512; - } - - // Accepted correlation peak range, corresponding to 60..1200 Hz. - _ifmin = _fsamp / 1200; - _ifmax = _fsamp / 60; - - // Various buffers - _ipbuff = new float[_ipsize + 3]; // Resampled or filtered input - _xffunc = new float[_frsize]; // Crossfade function - _fftTwind = (float *) fftwf_malloc (_fftlen * sizeof (float)); // Window function - _fftWcorr = (float *) fftwf_malloc (_fftlen * sizeof (float)); // Autocorrelation of window - _fftTdata = (float *) fftwf_malloc (_fftlen * sizeof (float)); // Time domain data for FFT - _fftFdata = (fftwf_complex *) fftwf_malloc ((_fftlen / 2 + 1) * sizeof (fftwf_complex)); - - // FFTW3 plans - _fwdplan = fftwf_plan_dft_r2c_1d (_fftlen, _fftTdata, _fftFdata, FFTW_ESTIMATE); - _invplan = fftwf_plan_dft_c2r_1d (_fftlen, _fftFdata, _fftTdata, FFTW_ESTIMATE); - - // Clear input buffer. - memset (_ipbuff, 0, (_ipsize + 1) * sizeof (float)); - - // Create crossfade function, half of raised cosine. - for (i = 0; i < _frsize; i++) - { - _xffunc [i] = 0.5 * (1 - cosf (M_PI * i / _frsize)); - } - - // Create window, raised cosine. - for (i = 0; i < _fftlen; i++) - { - _fftTwind [i] = 0.5 * (1 - cosf (2 * M_PI * i / _fftlen)); - } - - // Compute window autocorrelation and normalise it. - fftwf_execute_dft_r2c (_fwdplan, _fftTwind, _fftFdata); - h = _fftlen / 2; - for (i = 0; i < h; i++) - { - x = _fftFdata [i][0]; - y = _fftFdata [i][1]; - _fftFdata [i][0] = x * x + y * y; - _fftFdata [i][1] = 0; - } - _fftFdata [h][0] = 0; - _fftFdata [h][1] = 0; - fftwf_execute_dft_c2r (_invplan, _fftFdata, _fftWcorr); - t = _fftWcorr [0]; - for (i = 0; i < _fftlen; i++) - { - _fftWcorr [i] /= t; - } - - // Initialise all counters and other state. - _notebits = 0; - _lastnote = -1; - _count = 0; - _cycle = _frsize; - _error = 0.0f; - _ratio = 1.0f; - _xfade = false; - _ipindex = 0; - _frindex = 0; - _frcount = 0; - _rindex1 = _ipsize / 2; - _rindex2 = 0; -} - - -Retuner::~Retuner (void) -{ - delete[] _ipbuff; - delete[] _xffunc; - fftwf_free (_fftTwind); - fftwf_free (_fftWcorr); - fftwf_free (_fftTdata); - fftwf_free (_fftFdata); - fftwf_destroy_plan (_fwdplan); - fftwf_destroy_plan (_invplan); -} - - -int Retuner::process (int nfram, float *inp, float *out) -{ - int i, k, fi; - float ph, dp, r1, r2, dr, u1, u2, v; - - // Pitch shifting is done by resampling the input at the - // required ratio, and eventually jumping forward or back - // by one or more pitch period(s). Processing is done in - // fragments of '_frsize' frames, and the decision to jump - // forward or back is taken at the start of each fragment. - // If a jump happens we crossfade over one fragment size. - // Every 4 fragments a new pitch estimate is made. Since - // _fftsize = 16 * _frsize, the estimation window moves - // by 1/4 of the FFT length. - - fi = _frindex; // Write index in current fragment. - r1 = _rindex1; // Read index for current input frame. - r2 = _rindex2; // Second read index while crossfading. - - // No assumptions are made about fragments being aligned - // with process() calls, so we may be in the middle of - // a fragment here. - - while (nfram) - { - // Don't go past the end of the current fragment. - k = _frsize - fi; - if (nfram < k) k = nfram; - nfram -= k; - - // At 44.1 and 48 kHz upsample by 2. - if (_upsamp) - { - _resampler.inp_count = k; - _resampler.inp_data = inp; - _resampler.out_count = 2 * k; - _resampler.out_data = _ipbuff + _ipindex; - _resampler.process (); - _ipindex += 2 * k; - } - // At higher sample rates apply lowpass filter. - else - { - // Not implemented yet, just copy. - memcpy (_ipbuff + _ipindex, inp, k * sizeof (float)); - _ipindex += k; - } - - // Extra samples for interpolation. - _ipbuff [_ipsize + 0] = _ipbuff [0]; - _ipbuff [_ipsize + 1] = _ipbuff [1]; - _ipbuff [_ipsize + 2] = _ipbuff [2]; - inp += k; - if (_ipindex == _ipsize) _ipindex = 0; - - // Process available samples. - dr = _ratio; - if (_upsamp) dr *= 2; - if (_xfade) - { - // Interpolate and crossfade. - while (k--) - { - i = (int) r1; - u1 = cubic (_ipbuff + i, r1 - i); - i = (int) r2; - u2 = cubic (_ipbuff + i, r2 - i); - v = _xffunc [fi++]; - *out++ = (1 - v) * u1 + v * u2; - r1 += dr; - if (r1 >= _ipsize) r1 -= _ipsize; - r2 += dr; - if (r2 >= _ipsize) r2 -= _ipsize; - } - } - else - { - // Interpolation only. - fi += k; - while (k--) - { - i = (int) r1; - *out++ = cubic (_ipbuff + i, r1 - i); - r1 += dr; - if (r1 >= _ipsize) r1 -= _ipsize; - } - } - - // If at end of fragment check for jump. - if (fi == _frsize) - { - fi = 0; - // Estimate the pitch every 4th fragment. - if (++_frcount == 4) - { - _frcount = 0; - findcycle (); - if (_cycle) - { - // If the pitch estimate succeeds, find the - // nearest note and required resampling ratio. - _count = 0; - finderror (); - } - else if (++_count > 5) - { - // If the pitch estimate fails, the current - // ratio is kept for 5 fragments. After that - // the signal is considered unvoiced and the - // pitch error is reset. - _count = 5; - _cycle = _frsize; - _error = 0; - } - else if (_count == 2) - { - // Bias is removed after two unvoiced fragments. - _lastnote = -1; - } - - _ratio = powf (2.0f, _corroffs / 12.0f - _error * _corrgain); - } - - // If the previous fragment was crossfading, - // the end of the new fragment that was faded - // in becomes the current read position. - if (_xfade) r1 = r2; - - // A jump must correspond to an integer number - // of pitch periods, and to avoid reading outside - // the circular input buffer limits it must be at - // least one fragment size. - dr = _cycle * (int)(ceilf (_frsize / _cycle)); - dp = dr / _frsize; - ph = r1 - _ipindex; - if (ph < 0) ph += _ipsize; - if (_upsamp) - { - ph /= 2; - dr *= 2; - } - ph = ph / _frsize + 2 * _ratio - 10; - if (ph > 0.5f) - { - // Jump back by 'dr' frames and crossfade. - _xfade = true; - r2 = r1 - dr; - if (r2 < 0) r2 += _ipsize; - } - else if (ph + dp < 0.5f) - { - // Jump forward by 'dr' frames and crossfade. - _xfade = true; - r2 = r1 + dr; - if (r2 >= _ipsize) r2 -= _ipsize; - } - else _xfade = false; - } - } - - // Save local state. - _frindex = fi; - _rindex1 = r1; - _rindex2 = r2; - - return 0; -} - - -void Retuner::findcycle (void) -{ - int d, h, i, j, k; - float f, m, t, x, y, z; - - d = _upsamp ? 2 : 1; - h = _fftlen / 2; - j = _ipindex; - k = _ipsize - 1; - for (i = 0; i < _fftlen; i++) - { - _fftTdata [i] = _fftTwind [i] * _ipbuff [j & k]; - j += d; - } - fftwf_execute_dft_r2c (_fwdplan, _fftTdata, _fftFdata); - f = _fsamp / (_fftlen * 3e3f); - for (i = 0; i < h; i++) - { - x = _fftFdata [i][0]; - y = _fftFdata [i][1]; - m = i * f; - _fftFdata [i][0] = (x * x + y * y) / (1 + m * m); - _fftFdata [i][1] = 0; - } - _fftFdata [h][0] = 0; - _fftFdata [h][1] = 0; - fftwf_execute_dft_c2r (_invplan, _fftFdata, _fftTdata); - t = _fftTdata [0] + 0.1f; - for (i = 0; i < h; i++) _fftTdata [i] /= (t * _fftWcorr [i]); - x = _fftTdata [0]; - for (i = 4; i < _ifmax; i += 4) - { - y = _fftTdata [i]; - if (y > x) break; - x = y; - } - i -= 4; - _cycle = 0; - if (i >= _ifmax) return; - if (i < _ifmin) i = _ifmin; - x = _fftTdata [--i]; - y = _fftTdata [++i]; - m = 0; - j = 0; - while (i <= _ifmax) - { - t = y * _fftWcorr [i]; - z = _fftTdata [++i]; - if ((t > m) && (y >= x) && (y >= z) && (y > 0.8f)) - { - j = i - 1; - m = t; - } - x = y; - y = z; - } - if (j) - { - x = _fftTdata [j - 1]; - y = _fftTdata [j]; - z = _fftTdata [j + 1]; - _cycle = j + 0.5f * (x - z) / (z - 2 * y + x - 1e-9f); - } -} - - -void Retuner::finderror (void) -{ - int i, m, im; - float a, am, d, dm, f; - - if (!_notemask) - { - _error = 0; - _lastnote = -1; - return; - } - - f = log2f (_fsamp / (_cycle * _refpitch)); - dm = 0; - am = 1; - im = -1; - for (i = 0, m = 1; i < 12; i++, m <<= 1) - { - if (_notemask & m) - { - d = f - (i - 9) / 12.0f; - d -= floorf (d + 0.5f); - a = fabsf (d); - if (i == _lastnote) a -= _notebias; - if (a < am) - { - am = a; - dm = d; - im = i; - } - } - } - - if (_lastnote == im) - { - _error += _corrfilt * (dm - _error); - } - else - { - _error = dm; - _lastnote = im; - } - - // For display only. - _notebits |= 1 << im; -} - - -float Retuner::cubic (float *v, float a) -{ - float b, c; - - b = 1 - a; - c = a * b; - return (1.0f + 1.5f * c) * (v[1] * b + v[2] * a) - - 0.5f * c * (v[0] * b + v[1] + v[2] + v[3] * a); -} - - -} diff --git a/source/native-plugins/zita-at1/retuner.h b/source/native-plugins/zita-at1/retuner.h deleted file mode 100644 index bb604e032..000000000 --- a/source/native-plugins/zita-at1/retuner.h +++ /dev/null @@ -1,133 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (C) 2009-2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ----------------------------------------------------------------------- - - -#ifndef __RETUNER_H -#define __RETUNER_H - - -#include -#include - -namespace AT1 { - - -class Retuner -{ -public: - - Retuner (int fsamp); - ~Retuner (void); - - int process (int nfram, float *inp, float *out); - - void set_refpitch (float v) - { - _refpitch = v; - } - - void set_notebias (float v) - { - _notebias = v / 13.0f; - } - - void set_corrfilt (float v) - { - _corrfilt = (4 * _frsize) / (v * _fsamp); - } - - void set_corrgain (float v) - { - _corrgain = v; - } - - void set_corroffs (float v) - { - _corroffs = v; - } - - void set_notemask (int k) - { - _notemask = k; - } - - int get_noteset (void) - { - int k; - - k = _notebits; - _notebits = 0; - return k; - } - - float get_error (void) - { - return 12.0f * _error; - } - - -private: - - void findcycle (void); - void finderror (void); - float cubic (float *v, float a); - - int _fsamp; - int _ifmin; - int _ifmax; - bool _upsamp; - int _fftlen; - int _ipsize; - int _frsize; - int _ipindex; - int _frindex; - int _frcount; - float _refpitch; - float _notebias; - float _corrfilt; - float _corrgain; - float _corroffs; - int _notemask; - int _notebits; - int _lastnote; - int _count; - float _cycle; - float _error; - float _ratio; - float _phase; - bool _xfade; - float _rindex1; - float _rindex2; - float *_ipbuff; - float *_xffunc; - float *_fftTwind; - float *_fftWcorr; - float *_fftTdata; - fftwf_complex *_fftFdata; - fftwf_plan _fwdplan; - fftwf_plan _invplan; - Resampler _resampler; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-at1/rotary.cc b/source/native-plugins/zita-at1/rotary.cc deleted file mode 100644 index 56185caca..000000000 --- a/source/native-plugins/zita-at1/rotary.cc +++ /dev/null @@ -1,211 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2012 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include "rotary.h" - -namespace AT1 { - - -cairo_t *RotaryCtl::_cairotype = 0; -cairo_surface_t *RotaryCtl::_cairosurf = 0; - - -int RotaryCtl::_wb_up = 4; -int RotaryCtl::_wb_dn = 5; -int RotaryCtl::_keymod = 0; -int RotaryCtl::_button = 0; -int RotaryCtl::_rcount = 0; -int RotaryCtl::_rx = 0; -int RotaryCtl::_ry = 0; - - -RotaryCtl::RotaryCtl (X_window *parent, - X_callback *cbobj, - int cbind, - RotaryGeom *rgeom, - int xp, - int yp) : - - X_window (parent, - rgeom->_x0 + xp, rgeom->_y0 + yp, - rgeom->_dx, rgeom->_dy, - rgeom->_backg->pixel), - _cbobj (cbobj), - _cbind (cbind), - _rgeom (rgeom), - _state (0), - _count (0), - _value (0), - _angle (0) -{ - x_add_events ( ExposureMask - | Button1MotionMask | ButtonPressMask | ButtonReleaseMask); -} - - -RotaryCtl::~RotaryCtl (void) -{ -} - - -void RotaryCtl::init (X_display *disp) -{ - _cairosurf = cairo_xlib_surface_create (disp->dpy (), 0, disp->dvi (), 50, 50); - _cairotype = cairo_create (_cairosurf); -} - - -void RotaryCtl::fini (void) -{ - cairo_destroy (_cairotype); - cairo_surface_destroy (_cairosurf); -} - - -void RotaryCtl::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - render (); - break; - - case ButtonPress: - bpress ((XButtonEvent *) E); - break; - - case ButtonRelease: - brelse ((XButtonEvent *) E); - break; - - case MotionNotify: - motion ((XMotionEvent *) E); - break; - - default: - fprintf (stderr, "RotaryCtl: event %d\n", E->type ); - } -} - - -void RotaryCtl::bpress (XButtonEvent *E) -{ - int r = 0; - double d; - - d = hypot (E->x - _rgeom->_xref, E->y - _rgeom->_yref); - if (d > _rgeom->_rad + 3) return; - _keymod = E->state; - if (E->button < 4) - { - _rx = E->x; - _ry = E->y; - _button = E->button; - r = handle_button (); - _rcount = _count; - } - else if (_button) return; - else if ((int)E->button == _wb_up) - { - r = handle_mwheel (1); - } - else if ((int)E->button == _wb_dn) - { - r = handle_mwheel (-1); - } - if (r) - { - callback (r); - render (); - } -} - - -void RotaryCtl::brelse (XButtonEvent *E) -{ - if (_button == (int)E->button) - { - _button = 0; - callback (RELSE); - } -} - - -void RotaryCtl::motion (XMotionEvent *E) -{ - int dx, dy, r; - - if (_button) - { - _keymod = E->state; - dx = E->x - _rx; - dy = E->y - _ry; - r = handle_motion (dx, dy); - if (r) - { - callback (r); - render (); - } - } -} - - -void RotaryCtl::set_state (int s) -{ - if (_state != s) - { - _state = s; - render (); - } -} - - -void RotaryCtl::render (void) -{ - XImage *I; - double a, c, r, x, y; - - I = _rgeom->_image [_state]; - XPutImage (dpy (), win (), dgc (), I, - _rgeom->_x0, _rgeom->_y0, 0, 0, _rgeom->_dx, _rgeom->_dy); - cairo_xlib_surface_set_drawable (_cairosurf, win(), - _rgeom->_dx, _rgeom->_dy); - c = _rgeom->_lncol [_state] ? 1.0 : 0.0; - a = _angle * M_PI / 180; - r = _rgeom->_rad; - x = _rgeom->_xref; - y = _rgeom->_yref; - cairo_new_path (_cairotype); - cairo_move_to (_cairotype, x, y); - x += r * sin (a); - y -= r * cos (a); - cairo_line_to (_cairotype, x, y); - cairo_set_source_rgb (_cairotype, c, c, c); - cairo_set_line_width (_cairotype, 2.2); - cairo_stroke (_cairotype); -} - - -} diff --git a/source/native-plugins/zita-at1/rotary.h b/source/native-plugins/zita-at1/rotary.h deleted file mode 100644 index 38cbd35f1..000000000 --- a/source/native-plugins/zita-at1/rotary.h +++ /dev/null @@ -1,119 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2012 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __ROTARY_H -#define __ROTARY_H - - -#include -#include -#include - -namespace AT1 { - - -class RotaryGeom -{ -public: - - XftColor *_backg; - XImage *_image [4]; - char _lncol [4]; - int _x0; - int _y0; - int _dx; - int _dy; - double _xref; - double _yref; - double _rad; -}; - - - -class RotaryCtl : public X_window -{ -public: - - RotaryCtl (X_window *parent, - X_callback *cbobj, - int cbind, - RotaryGeom *rgeom, - int xp, - int yp); - - virtual ~RotaryCtl (void); - - enum { NOP = 200, PRESS, RELSE, DELTA }; - - int cbind (void) { return _cbind; } - int state (void) { return _state; } - double value (void) { return _value; } - - virtual void set_state (int s); - virtual void set_value (double v) = 0; - virtual void get_string (char *p, int n) {} - - static void init (X_display *disp); - static void fini (void); - - static int _wb_up; - static int _wb_dn; - -protected: - - X_callback *_cbobj; - int _cbind; - RotaryGeom *_rgeom; - int _state; - int _count; - int _range; - double _value; - double _angle; - - void render (void); - void callback (int k) { _cbobj->handle_callb (k, this, 0); } - - static int _keymod; - static int _button; - static int _rcount; - static int _rx; - static int _ry; - -private: - - void handle_event (XEvent *E); - void bpress (XButtonEvent *E); - void brelse (XButtonEvent *E); - void motion (XMotionEvent *E); - - virtual int handle_button (void) = 0; - virtual int handle_motion (int dx, int dy) = 0; - virtual int handle_mwheel (int dw) = 0; - - static cairo_t *_cairotype; - static cairo_surface_t *_cairosurf; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-at1/styles.cc b/source/native-plugins/zita-at1/styles.cc deleted file mode 100644 index 191cf71c0..000000000 --- a/source/native-plugins/zita-at1/styles.cc +++ /dev/null @@ -1,186 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2014 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include "styles.h" -#include "tmeter.h" -#include "png2img.h" - -#include "CarlaString.hpp" -#include - -namespace AT1 { - - -XftColor *XftColors [NXFTCOLORS]; -XftFont *XftFonts [NXFTFONTS]; - -X_textln_style tstyle1; -X_button_style bstyle1; - -XImage *notesect_img; -XImage *ctrlsect_img; - -ButtonImg b_note_img; -ButtonImg b_midi_img; - -RotaryGeom r_tune_geom; -RotaryGeom r_filt_geom; -RotaryGeom r_bias_geom; -RotaryGeom r_corr_geom; -RotaryGeom r_offs_geom; - - -static CarlaString getResourceDir() -{ - Dl_info exeInfo; - dladdr((void*)getResourceDir, &exeInfo); - - CarlaString filename(exeInfo.dli_fname); - return filename.truncate(filename.rfind("-ui")); -} - - -void styles_init (X_display *disp, X_resman *xrm) -{ - CarlaString resourceDir(getResourceDir()); - - XftColors [C_MAIN_BG] = disp->alloc_xftcolor (0.25f, 0.25f, 0.25f, 1.0f); - XftColors [C_MAIN_FG] = disp->alloc_xftcolor (1.0f, 1.0f, 1.0f, 1.0f); - XftColors [C_TEXT_BG] = disp->alloc_xftcolor (1.0f, 1.0f, 1.0f, 1.0f); - XftColors [C_TEXT_FG] = disp->alloc_xftcolor (0.1f, 0.1f, 0.1f, 1.0f); - - XftFonts [F_TEXT] = disp->alloc_xftfont (xrm->get (".font.text", "luxi:bold::pixelsize=11")); - XftFonts [F_BUTT] = disp->alloc_xftfont (xrm->get (".font.butt", "luxi:bold::pixelsize=11")); - - tstyle1.font = XftFonts [F_TEXT]; - tstyle1.color.normal.bgnd = XftColors [C_TEXT_BG]->pixel; - tstyle1.color.normal.text = XftColors [C_TEXT_FG]; - - bstyle1.font = XftFonts [F_BUTT]; - bstyle1.color.bg[0] = XftColors [C_MAIN_BG]->pixel; - bstyle1.color.fg[0] = XftColors [C_MAIN_FG]; - bstyle1.type = X_button_style::PLAIN | X_button_style::ALEFT; - - notesect_img = png2img (resourceDir+"/notesect.png", disp, XftColors [C_MAIN_BG]); - ctrlsect_img = png2img (resourceDir+"/ctrlsect.png", disp, XftColors [C_MAIN_BG]); - Tmeter::_scale = png2img (resourceDir+"/hscale.png", disp, XftColors [C_MAIN_BG]); - Tmeter::_imag0 = png2img (resourceDir+"/hmeter0.png", disp, XftColors [C_MAIN_BG]); - Tmeter::_imag1 = png2img (resourceDir+"/hmeter1.png", disp, XftColors [C_MAIN_BG]); - - if ( !notesect_img || !ctrlsect_img - || !Tmeter::_scale || !Tmeter::_imag0 || !Tmeter::_imag1) - { - fprintf (stderr, "Can't load images from '%s'.\n", resourceDir.buffer()); - exit (1); - } - - b_midi_img._backg = XftColors [C_MAIN_BG]; - b_midi_img._ximage = png2img (resourceDir+"/midi.png", disp, XftColors [C_MAIN_BG]); - b_midi_img._x0 = 0; - b_midi_img._y0 = 0; - b_midi_img._dx = 40; - b_midi_img._dy = 24; - - b_note_img._backg = XftColors [C_MAIN_BG]; - b_note_img._ximage = png2img (resourceDir+"/note.png", disp, XftColors [C_MAIN_BG]); - b_note_img._x0 = 0; - b_note_img._y0 = 0; - b_note_img._dx = 16; - b_note_img._dy = 16; - - r_tune_geom._backg = XftColors [C_MAIN_BG]; - r_tune_geom._image [0] = ctrlsect_img; - r_tune_geom._lncol [0] = 1; - r_tune_geom._x0 = 26; - r_tune_geom._y0 = 17; - r_tune_geom._dx = 23; - r_tune_geom._dy = 23; - r_tune_geom._xref = 11.5; - r_tune_geom._yref = 11.5; - r_tune_geom._rad = 11; - - r_bias_geom._backg = XftColors [C_MAIN_BG]; - r_bias_geom._image [0] = ctrlsect_img; - r_bias_geom._lncol [0] = 0; - r_bias_geom._x0 = 86; - r_bias_geom._y0 = 17; - r_bias_geom._dx = 23; - r_bias_geom._dy = 23; - r_bias_geom._xref = 11.5; - r_bias_geom._yref = 11.5; - r_bias_geom._rad = 11; - - r_filt_geom._backg = XftColors [C_MAIN_BG]; - r_filt_geom._image [0] = ctrlsect_img; - r_filt_geom._lncol [0] = 0; - r_filt_geom._x0 = 146; - r_filt_geom._y0 = 17; - r_filt_geom._dx = 23; - r_filt_geom._dy = 23; - r_filt_geom._xref = 11.5; - r_filt_geom._yref = 11.5; - r_filt_geom._rad = 11; - - r_corr_geom._backg = XftColors [C_MAIN_BG]; - r_corr_geom._image [0] = ctrlsect_img; - r_corr_geom._lncol [0] = 0; - r_corr_geom._x0 = 206; - r_corr_geom._y0 = 17; - r_corr_geom._dx = 23; - r_corr_geom._dy = 23; - r_corr_geom._xref = 11.5; - r_corr_geom._yref = 11.5; - r_corr_geom._rad = 11; - - r_offs_geom._backg = XftColors [C_MAIN_BG]; - r_offs_geom._image [0] = ctrlsect_img; - r_offs_geom._lncol [0] = 0; - r_offs_geom._x0 = 266; - r_offs_geom._y0 = 17; - r_offs_geom._dx = 23; - r_offs_geom._dy = 23; - r_offs_geom._xref = 11.5; - r_offs_geom._yref = 11.5; - r_offs_geom._rad = 11; -} - - -void styles_fini (X_display *disp) -{ - notesect_img->data = 0; - ctrlsect_img->data = 0; - b_midi_img._ximage->data = 0; - b_note_img._ximage->data = 0; - Tmeter::_scale->data = 0; - Tmeter::_imag0->data = 0; - Tmeter::_imag1->data = 0; - XDestroyImage (notesect_img); - XDestroyImage (ctrlsect_img); - XDestroyImage (b_midi_img._ximage); - XDestroyImage (b_note_img._ximage); - XDestroyImage (Tmeter::_scale); - XDestroyImage (Tmeter::_imag0); - XDestroyImage (Tmeter::_imag1); -} - - -} diff --git a/source/native-plugins/zita-at1/styles.h b/source/native-plugins/zita-at1/styles.h deleted file mode 100644 index da010c642..000000000 --- a/source/native-plugins/zita-at1/styles.h +++ /dev/null @@ -1,70 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010-2014 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __STYLES_H -#define __STYLES_H - -#include -#include "button.h" -#include "rotary.h" - -namespace AT1 { - - -enum -{ - C_MAIN_BG, C_MAIN_FG, - C_TEXT_BG, C_TEXT_FG, - NXFTCOLORS -}; - -enum -{ - F_TEXT, - F_BUTT, - NXFTFONTS -}; - - -extern void styles_init (X_display *disp, X_resman *xrm); -extern void styles_fini (X_display *disp); - -extern XftColor *XftColors [NXFTCOLORS]; -extern XftFont *XftFonts [NXFTFONTS]; - -extern X_textln_style tstyle1; -extern X_button_style bstyle1; - -extern XImage *notesect_img; -extern XImage *ctrlsect_img; -extern ButtonImg b_midi_img; -extern ButtonImg b_note_img; -extern RotaryGeom r_tune_geom; -extern RotaryGeom r_filt_geom; -extern RotaryGeom r_bias_geom; -extern RotaryGeom r_corr_geom; -extern RotaryGeom r_offs_geom; - - -} - -#endif diff --git a/source/native-plugins/zita-at1/tmeter.cc b/source/native-plugins/zita-at1/tmeter.cc deleted file mode 100644 index 7827d70c4..000000000 --- a/source/native-plugins/zita-at1/tmeter.cc +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2009-2010 Fons Adriaensen - Modified by falkTX on Jan-Apr 2015 for inclusion in Carla - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - - -#include -#include "tmeter.h" - -namespace AT1 { - - -XImage *Tmeter::_scale = 0; -XImage *Tmeter::_imag0 = 0; -XImage *Tmeter::_imag1 = 0; - - -Tmeter::Tmeter (X_window *parent, int xpos, int ypos) : - X_window (parent, xpos, ypos, XS + 2 * XM, YS + 2 * YM, 0), - _k0 (86), - _k1 (86) -{ - if (!_imag0 || !_imag1 || !_scale) return; - x_add_events (ExposureMask); -} - - -Tmeter::~Tmeter (void) -{ -} - - -void Tmeter::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - expose ((XExposeEvent *) E); - break; - } -} - - -void Tmeter::expose (XExposeEvent *E) -{ - if (E->count) return; - XSetFunction (dpy (), dgc (), GXcopy); - XPutImage (dpy (), win (), dgc (), _imag0, 0, 0, XM, YM, XS, Y1); - XPutImage (dpy (), win (), dgc (), _imag1, _k0 - 2, 0, XM + _k0 - 2, YM, 5 + _k1 - _k0, Y1); - XPutImage (dpy (), win (), dgc (), _scale, 0, 0, XM, YM + Y1, XS, Y2); -} - - -void Tmeter::update (float v0, float v1) -{ - int k0, k1; - - k0 = (int)(floorf (86.0f + 80.0f * v0 + 0.5f)); - k1 = (int)(floorf (86.0f + 80.0f * v1 + 0.5f)); - if (k0 < 4) k0 = 4; - if (k0 > 168) k0 = 168; - if (k1 < 4) k1 = 4; - if (k1 > 168) k1 = 168; - XSetFunction (dpy (), dgc (), GXcopy); - XPutImage (dpy (), win (), dgc (), _imag0, _k0 - 2, 0, XM + _k0 - 2, YM, 5 + _k1 - _k0, Y1); - _k0 = k0; - _k1 = k1; - XPutImage (dpy (), win (), dgc (), _imag1, _k0 - 2, 0, XM + _k0 - 2, YM, 5 + _k1 - _k0, Y1); -} - - -} diff --git a/source/native-plugins/zita-at1/tmeter.h b/source/native-plugins/zita-at1/tmeter.h deleted file mode 100644 index a45c6d8f5..000000000 --- a/source/native-plugins/zita-at1/tmeter.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2009-2010 Fons Adriaensen - Modified by falkTX on Jan-Apr 2015 for inclusion in Carla - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - - -#ifndef __TMETER_H -#define __TMETER_H - - -#include - -namespace AT1 { - - -class Tmeter : public X_window -{ -public: - - Tmeter (X_window *parent, int xpos, int ypos); - ~Tmeter (void); - Tmeter (const Tmeter&); - Tmeter& operator=(const Tmeter&); - - void update (float v0, float v1); - - static XImage *_scale; - static XImage *_imag0; - static XImage *_imag1; - -private: - - enum { XS = 173, YS = 17, XM = 0, YM = 0, Y1 = 7, Y2 = 10 }; - - void handle_event (XEvent *E); - void expose (XExposeEvent *E); - - int _k0; - int _k1; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1-ui.cpp b/source/native-plugins/zita-bls1-ui.cpp deleted file mode 100644 index 18ffb0dc8..000000000 --- a/source/native-plugins/zita-bls1-ui.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Carla Native Plugins - * Copyright (C) 2012-2015 Filipe Coelho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the doc/GPL.txt file. - */ - -#include "CarlaPipeUtils.cpp" - -#include "zita-bls1/png2img.cc" -#include "zita-bls1/guiclass.cc" -#include "zita-bls1/mainwin.cc" -#include "zita-bls1/rotary.cc" -#include "zita-bls1/styles.cc" - -using namespace BLS1; - -static Mainwin* mainwin = nullptr; - -// -------------------------------------------------------------------------------------------- - -class ZitaPipeClient : public CarlaPipeClient, - public Mainwin::ValueChangedCallback -{ -public: - ZitaPipeClient() noexcept - : CarlaPipeClient(), - fQuitReceived(false) {} - - ~ZitaPipeClient() noexcept override - { - if (fQuitReceived || ! isPipeRunning()) - return; - - const CarlaMutexLocker cml(getPipeLock()); - - writeMessage("exiting\n"); - flushMessages(); - } - - bool quitRequested() const noexcept - { - return fQuitReceived; - } - -protected: - bool msgReceived(const char* const msg) noexcept override - { - if (std::strcmp(msg, "control") == 0) - { - uint index; - float value; - CARLA_SAFE_ASSERT_RETURN(readNextLineAsUInt(index), true); - CARLA_SAFE_ASSERT_RETURN(readNextLineAsFloat(value), true); - - mainwin->_rotary[index]->set_value(value); - return true; - } - - if (std::strcmp(msg, "show") == 0) - { - mainwin->x_map(); - return true; - } - - if (std::strcmp(msg, "hide") == 0) - { - mainwin->x_unmap(); - return true; - } - - if (std::strcmp(msg, "focus") == 0) - { - mainwin->x_mapraised(); - return true; - } - - if (std::strcmp(msg, "uiTitle") == 0) - { - const char* uiTitle; - - CARLA_SAFE_ASSERT_RETURN(readNextLineAsString(uiTitle), true); - - mainwin->x_set_title(uiTitle); - return true; - } - - if (std::strcmp(msg, "quit") == 0) - { - fQuitReceived = true; - mainwin->stop(); - return true; - } - - carla_stderr("ZitaPipeClient::msgReceived : %s", msg); - return false; - } - - void valueChangedCallback(uint index, double value) override - { - if (isPipeRunning()) - writeControlMessage(index, value); - } - -private: - bool fQuitReceived; -}; - -// -------------------------------------------------------------------------------------------- - -int main(int argc, const char* argv[]) -{ - X_resman xresman; - X_display *display; - X_handler *handler; - X_rootwin *rootwin; - int ev, xp, yp, xs, ys; - - int fake_argc = 1; - char* fake_argv[] = { (char*)"rev1" }; - xresman.init(&fake_argc, fake_argv, (char*)"rev1", nullptr, 0); - - display = new X_display(nullptr); - if (display->dpy () == 0) - { - carla_stderr("Can't open display."); - delete display; - return 1; - } - - ZitaPipeClient pipe; - const char* uiTitle = "Test UI"; - - if (argc > 1) - { - uiTitle = argv[2]; - - if (! pipe.initPipeClient(argv)) - return 1; - } - - xp = yp = 100; - xs = Mainwin::XSIZE + 4; - ys = Mainwin::YSIZE + 30; - xresman.geometry(".geometry", display->xsize(), display->ysize(), 1, xp, yp, xs, ys); - - styles_init(display, &xresman); - rootwin = new X_rootwin(display); - mainwin = new Mainwin(rootwin, &xresman, xp, yp, &pipe); - mainwin->x_set_title(uiTitle); - rootwin->handle_event(); - handler = new X_handler(display, mainwin, EV_X11); - handler->next_event(); - XFlush(display->dpy()); - - if (argc == 1) - mainwin->x_map(); - - do - { - ev = mainwin->process(); - if (ev == EV_X11) - { - rootwin->handle_event(); - handler->next_event(); - } - else if (ev == Esync::EV_TIME) - { - handler->next_event(); - - if (pipe.isPipeRunning()) - pipe.idlePipe(); - } - } - while (ev != EV_EXIT && ! pipe.quitRequested()); - - styles_fini(display); - delete handler; - delete rootwin; - delete display; - - return 0; -} - -// -------------------------------------------------------------------------------------------- diff --git a/source/native-plugins/zita-bls1.cpp b/source/native-plugins/zita-bls1.cpp deleted file mode 100644 index f36dfcf2c..000000000 --- a/source/native-plugins/zita-bls1.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Carla Native Plugins - * Copyright (C) 2012-2017 Filipe Coelho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the doc/GPL.txt file. - */ - -#include "CarlaNativeExtUI.hpp" -#include "CarlaJuceUtils.hpp" - -#include "zita-bls1/hp3filt.cc" -#include "zita-bls1/jclient.cc" -#include "zita-bls1/lfshelf2.cc" -#include "zita-bls1/shuffler.cc" - -using namespace BLS1; - -// ----------------------------------------------------------------------- -// BLS1 Plugin - -class BLS1Plugin : public NativePluginAndUiClass -{ -public: - static const uint32_t kNumInputs = 2; - static const uint32_t kNumOutputs = 2; - - enum Parameters { - kParameterINPBAL, - kParameterHPFILT, - kParameterSHGAIN, - kParameterSHFREQ, - kParameterLFFREQ, - kParameterLFGAIN, - kParameterNROTARY - }; - - BLS1Plugin(const NativeHostDescriptor* const host) - : NativePluginAndUiClass(host, "zita-bls1-ui"), - fJackClient(), - jclient(nullptr) - { - CARLA_SAFE_ASSERT(host != nullptr); - - carla_zeroStruct(fJackClient); - - fJackClient.bufferSize = getBufferSize(); - fJackClient.sampleRate = getSampleRate(); - - // set initial values - fParameters[kParameterINPBAL] = 0.0f; - fParameters[kParameterHPFILT] = 40.0f; - fParameters[kParameterSHGAIN] = 15.0f; - fParameters[kParameterSHFREQ] = 5e2f; - fParameters[kParameterLFFREQ] = 80.0f; - fParameters[kParameterLFGAIN] = 0.0f; - - _recreateZitaClient(); - } - - // ------------------------------------------------------------------- - // Plugin parameter calls - - uint32_t getParameterCount() const override - { - return kParameterNROTARY; - } - - const NativeParameter* getParameterInfo(const uint32_t index) const override - { - CARLA_SAFE_ASSERT_RETURN(index < kParameterNROTARY, nullptr); - - static NativeParameter param; - - int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE; - - // reset - param.name = nullptr; - param.unit = nullptr; - param.ranges.def = 0.0f; - param.ranges.min = 0.0f; - param.ranges.max = 1.0f; - param.ranges.step = 1.0f; - param.ranges.stepSmall = 1.0f; - param.ranges.stepLarge = 1.0f; - param.scalePointCount = 0; - param.scalePoints = nullptr; - - switch (index) - { - case kParameterINPBAL: - param.name = "Input balance"; - //param.unit = "dB"; - param.ranges.def = 0.0f; - param.ranges.min = -3.0f; - param.ranges.max = 3.0f; - break; - case kParameterHPFILT: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "Highpass filter"; - param.ranges.def = 40.0f; - param.ranges.min = 10.0f; - param.ranges.max = 320.0f; - break; - case kParameterSHGAIN: - param.name = "Shuffler gain"; - param.ranges.def = 15.0f; - param.ranges.min = 0.0f; - param.ranges.max = 24.0f; - break; - case kParameterSHFREQ: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "Shuffler frequency"; - param.ranges.def = 5e2f; - param.ranges.min = 125.0f; - param.ranges.max = 2e3f; - break; - case kParameterLFFREQ: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "LF shelf filter frequency"; - param.ranges.def = 80.0f; - param.ranges.min = 20.0f; - param.ranges.max = 320.0f; - break; - case kParameterLFGAIN: - param.name = "LF shelf filter gain"; - param.ranges.def = 0.0f; - param.ranges.min = -9.0f; - param.ranges.max = 9.0f; - break; - } - - param.hints = static_cast(hints); - - return ¶m; - } - - float getParameterValue(const uint32_t index) const override - { - CARLA_SAFE_ASSERT_RETURN(index < kParameterNROTARY, 0.0f); - - return fParameters[index]; - } - - // ------------------------------------------------------------------- - // Plugin state calls - - void setParameterValue(const uint32_t index, const float value) override - { - CARLA_SAFE_ASSERT_RETURN(index < kParameterNROTARY,); - - fParameters[index] = value; - - switch (index) - { - case kParameterINPBAL: - jclient->set_inpbal(value); - break; - case kParameterHPFILT: - jclient->set_hpfilt(value); - break; - case kParameterSHGAIN: - jclient->shuffler()->prepare(value, fParameters[kParameterSHFREQ]); - break; - case kParameterSHFREQ: - jclient->shuffler()->prepare(fParameters[kParameterSHGAIN], value); - break; - case kParameterLFFREQ: - jclient->set_loshelf(fParameters[kParameterLFGAIN], value); - break; - case kParameterLFGAIN: - jclient->set_loshelf(value, fParameters[kParameterLFFREQ]); - break; - } - } - - // ------------------------------------------------------------------- - // Plugin process calls - - void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override - { - if (! fJackClient.active) - { - const int iframes(frames); - - for (uint32_t i=0; i jclient; - - // Parameters - float fParameters[kParameterNROTARY]; - - void _recreateZitaClient() - { - jclient = new Jclient(&fJackClient); - jclient->set_inpbal(fParameters[kParameterINPBAL]); - jclient->set_hpfilt(fParameters[kParameterHPFILT]); - jclient->shuffler()->prepare(fParameters[kParameterSHGAIN], fParameters[kParameterSHFREQ]); - jclient->set_loshelf(fParameters[kParameterLFGAIN], fParameters[kParameterLFFREQ]); - } - - PluginClassEND(BLS1Plugin) - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(BLS1Plugin) -}; - -// ----------------------------------------------------------------------- - -static const NativePluginDescriptor bls1Desc = { - /* category */ NATIVE_PLUGIN_CATEGORY_FILTER, - /* hints */ static_cast(NATIVE_PLUGIN_IS_RTSAFE - |NATIVE_PLUGIN_HAS_UI - |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS), - /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING, - /* audioIns */ BLS1Plugin::kNumInputs, - /* audioOuts */ BLS1Plugin::kNumOutputs, - /* midiIns */ 0, - /* midiOuts */ 0, - /* paramIns */ BLS1Plugin::kParameterNROTARY, - /* paramOuts */ 0, - /* name */ "BLS1", - /* label */ "bls1", - /* maker */ "falkTX, Fons Adriaensen", - /* copyright */ "GPL v2+", - PluginDescriptorFILL(BLS1Plugin) -}; - -// ----------------------------------------------------------------------- - -CARLA_EXPORT -void carla_register_native_plugin_zita_bls1(); - -CARLA_EXPORT -void carla_register_native_plugin_zita_bls1() -{ - carla_register_native_plugin(&bls1Desc); -} - -// ----------------------------------------------------------------------- diff --git a/source/native-plugins/zita-bls1/global.h b/source/native-plugins/zita-bls1/global.h deleted file mode 100644 index 8774105bb..000000000 --- a/source/native-plugins/zita-bls1/global.h +++ /dev/null @@ -1,33 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __GLOBAL_H -#define __GLOBAL_H - - -#define PROGNAME "zita-bls1" -#define MAXCH 2 -#define EV_X11 16 -#define EV_EXIT 31 - - -#endif diff --git a/source/native-plugins/zita-bls1/guiclass.cc b/source/native-plugins/zita-bls1/guiclass.cc deleted file mode 100644 index fb68fdc1e..000000000 --- a/source/native-plugins/zita-bls1/guiclass.cc +++ /dev/null @@ -1,160 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include "guiclass.h" - -namespace BLS1 { - - -Rlinctl::Rlinctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind) : -RotaryCtl (parent, cbobj, image, xp, yp, cbind), -_cm (cm), -_dd (dd), -_vmin (vmin), -_vmax (vmax), -_form (0) -{ - _count = -1; - set_value (vini); -} - -void Rlinctl::get_string (char *p, int n) -{ - if (_form) snprintf (p, n, _form, _value); - else *p = 0; -} - -void Rlinctl::set_value (double v) -{ - set_count ((int) floor (_cm * (v - _vmin) / (_vmax - _vmin) + 0.5)); - render (); -} - -int Rlinctl::handle_button (void) -{ - return PRESS; -} - -int Rlinctl::handle_motion (int dx, int dy) -{ - return set_count (_rcount + dx - dy); -} - -int Rlinctl::handle_mwheel (int dw) -{ - if (! (_keymod & ShiftMask)) dw *= _dd; - return set_count (_count + dw); -} - -int Rlinctl::set_count (int u) -{ - if (u < 0) u= 0; - if (u > _cm) u = _cm; - if (u != _count) - { - _count = u; - _value = _vmin + u * (_vmax - _vmin) / _cm; - _angle = 270.0 * ((double) u / _cm - 0.5); - return DELTA; - } - return 0; -} - - - -Rlogctl::Rlogctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind) : -RotaryCtl (parent, cbobj, image, xp, yp, cbind), -_cm (cm), -_dd (dd), -_form (0) -{ - _count = -1; - _vmin = log (vmin); - _vmax = log (vmax); - set_value (vini); -} - -void Rlogctl::get_string (char *p, int n) -{ - if (_form) snprintf (p, n, _form, _value); - else *p = 0; -} - -void Rlogctl::set_value (double v) -{ - set_count ((int) floor (_cm * (log (v) - _vmin) / (_vmax - _vmin) + 0.5)); - render (); -} - -int Rlogctl::handle_button (void) -{ - return PRESS; -} - -int Rlogctl::handle_motion (int dx, int dy) -{ - return set_count (_rcount + dx - dy); -} - -int Rlogctl::handle_mwheel (int dw) -{ - if (! (_keymod & ShiftMask)) dw *= _dd; - return set_count (_count + dw); -} - -int Rlogctl::set_count (int u) -{ - if (u < 0) u= 0; - if (u > _cm) u = _cm; - if (u != _count) - { - _count = u; - _value = exp (_vmin + u * (_vmax - _vmin) / _cm); - _angle = 270.0 * ((double) u / _cm - 0.5); - return DELTA; - } - return 0; -} - - -} diff --git a/source/native-plugins/zita-bls1/guiclass.h b/source/native-plugins/zita-bls1/guiclass.h deleted file mode 100644 index 00dc37a5e..000000000 --- a/source/native-plugins/zita-bls1/guiclass.h +++ /dev/null @@ -1,102 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __GUICLASS_H -#define __GUICLASS_H - - -#include "rotary.h" - -namespace BLS1 { - - -class Rlinctl : public RotaryCtl -{ -public: - - Rlinctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind = 0); - - virtual void set_value (double v); - virtual void get_string (char *p, int n); - -private: - - virtual int handle_button (void); - virtual int handle_motion (int dx, int dy); - virtual int handle_mwheel (int dw); - int set_count (int u); - - int _cm; - int _dd; - double _vmin; - double _vmax; - const char *_form; -}; - - -class Rlogctl : public RotaryCtl -{ -public: - - Rlogctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind = 0); - - virtual void set_value (double v); - virtual void get_string (char *p, int n); - -private: - - virtual int handle_button (void); - virtual int handle_motion (int dx, int dy); - virtual int handle_mwheel (int dw); - int set_count (int u); - - int _cm; - int _dd; - double _vmin; - double _vmax; - const char *_form; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1/hp3filt.cc b/source/native-plugins/zita-bls1/hp3filt.cc deleted file mode 100644 index e36f973ad..000000000 --- a/source/native-plugins/zita-bls1/hp3filt.cc +++ /dev/null @@ -1,184 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include "hp3filt.h" - -namespace BLS1 { - - -HP3filt::HP3filt (void) : - _touch0 (0), - _touch1 (0), - _state (BYPASS), - _f0 (0), - _f1 (0), - _c1 (0), - _c2 (0), - _c3 (0), - _g (0), - _d (0) -{ - setfsamp (0.0f); -} - - -HP3filt::~HP3filt (void) -{ -} - - -void HP3filt::setfsamp (float fsamp) -{ - _fsamp = fsamp; - reset (); -} - - -void HP3filt::reset (void) -{ - memset (_z1, 0, sizeof (float) * MAXCH); - memset (_z2, 0, sizeof (float) * MAXCH); - memset (_z3, 0, sizeof (float) * MAXCH); -} - - -void HP3filt::prepare (int nsamp) -{ - float f; - - f = _f0; - if (_touch1 != _touch0) - { - if (_f1 == f) - { - _touch1 = _touch0; - if (_state == FADING) - { - _state = (_d > 0) ? STATIC : BYPASS; - } - } - else if (_f1 == 0) - { - _f1 = f; - _a = 0.0f; - _d = 1.0f / nsamp; - calcpar1 (0, _f1); - reset (); - _state = FADING; - } - else if (f == 0) - { - _f1 = f; - _a = 1.0f; - _d = -1.0f / nsamp; - _state = FADING; - } - else - { - if (f > 1.25f * _f1) _f1 *= 1.25f; - if (f < 0.80f * _f1) _f1 *= 0.80f; - else _f1 = f; - calcpar1 (0, _f1); - } - } -} - - -float HP3filt::response (float f) -{ - // Compute gain at frequency f from _c1 _c2, _c3, _g. - // This is left as an exercise for the reader. - return 0; -} - - -void HP3filt::calcpar1 (int nsamp, float f) -{ - float a, b, t; - - _g = 1; - a = (float)(M_PI) * f / _fsamp; - b = a * a; - t = 1 + a + b; - _g /= t; - _c1 = 2 * a + 4 * b; - _c2 = 4 * b / _c1; - _c1 /= t; - t = 1 + a; - _g /= t; - _c3 = 2 * a / t; -} - - -void HP3filt::process1 (int nsamp, int nchan, float *data[]) -{ - int i, j; - float a, d, x, y, z1, z2, z3; - float *p; - - a = _a; - d = _d; - for (i = 0; i < nchan; i++) - { - p = data [i]; - z1 = _z1 [i]; - z2 = _z2 [i]; - z3 = _z3 [i]; - if (_state == FADING) - { - a = _a; - for (j = 0; j < nsamp; j++) - { - x = *p; - y = x - z1 - z2 + 1e-20f; - z2 += _c2 * z1; - z1 += _c1 * y; - y -= z3 - 1e-20f; - z3 += _c3 * y; - a += d; - *p++ = a * (_g * y) + (1 - a) * x; - } - } - else - { - for (j = 0; j < nsamp; j++) - { - x = *p; - y = x - z1 - z2 + 1e-20f; - z2 += _c2 * z1; - z1 += _c1 * y; - y -= z3 - 1e-20f; - z3 += _c3 * y; - *p++ = _g * y; - } - } - _z1 [i] = z1; - _z2 [i] = z2; - _z3 [i] = z3; - } - if (_state == FADING) _a = a; -} - - -} diff --git a/source/native-plugins/zita-bls1/hp3filt.h b/source/native-plugins/zita-bls1/hp3filt.h deleted file mode 100644 index b84d2680b..000000000 --- a/source/native-plugins/zita-bls1/hp3filt.h +++ /dev/null @@ -1,76 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __HP3FILT_H -#define __HP3FILT_H - - -#include -#include "global.h" - -namespace BLS1 { - - -class HP3filt -{ -public: - - HP3filt (void); - ~HP3filt (void); - - void setfsamp (float fsamp); - void setparam (float f) - { - _f0 = f; - _touch0++; - } - void reset (void); - void prepare (int nsamp); - void process (int nsamp, int nchan, float *data[]) - { - if (_state != BYPASS) process1 (nsamp, nchan, data); - } - float response (float f); - -private: - - enum { BYPASS, STATIC, FADING }; - - void calcpar1 (int nsamp, float f); - void process1 (int nsamp, int nchan, float *data[]); - - volatile int16_t _touch0; - volatile int16_t _touch1; - int _state; - float _fsamp; - float _f0, _f1; - float _c1, _c2, _c3; - float _g, _a, _d; - float _z1 [2]; - float _z2 [2]; - float _z3 [2]; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1/jclient.cc b/source/native-plugins/zita-bls1/jclient.cc deleted file mode 100644 index 44de80be4..000000000 --- a/source/native-plugins/zita-bls1/jclient.cc +++ /dev/null @@ -1,177 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include "jclient.h" - -namespace BLS1 { - - -Jclient::Jclient (jack_client_t *jclient) : - A_thread ("Jclient"), - _jack_client (jclient), - _active (false), - _inpbal0 (0), - _inpbal1 (0), - _ga (1.0f), - _gb (1.0f), - _da (0.0f), - _db (0.0f) -{ - init_jack (); -} - - -Jclient::~Jclient (void) -{ - if (_jack_client) close_jack (); -} - - -void Jclient::init_jack (void) -{ - jack_set_process_callback (_jack_client, jack_static_process, (void *) this); - jack_on_shutdown (_jack_client, jack_static_shutdown, (void *) this); - jack_activate (_jack_client); - - _fsamp = jack_get_sample_rate (_jack_client); - _psize = jack_get_buffer_size (_jack_client); - if (_psize > 4096) - { - fprintf (stderr, "Period size can't be more than 4096.\n"); - return; - } - if (_psize & (_psize - 1)) - { - fprintf (stderr, "Period size must be a power of 2.\n"); - return; - } - - _inpports [0] = jack_port_register (_jack_client, "inp.L", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); - _inpports [1] = jack_port_register (_jack_client, "inp.R", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); - _outports [0] = jack_port_register (_jack_client, "out.L", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - _outports [1] = jack_port_register (_jack_client, "out.R", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - - _hpfilt.setfsamp (_fsamp); - _lshelf.setfsamp (_fsamp); - _lshelf.bypass (false); - _shuffl.init (_fsamp, _psize); - - - for (int k = _fsamp, _fragm = 1024; k > 56000; k >>= 1, _fragm <<= 1); - _nsamp = 0; - _active = true; -} - - -void Jclient::close_jack () -{ - jack_deactivate (_jack_client); - jack_client_close (_jack_client); -} - - -void Jclient::jack_static_shutdown (void *arg) -{ - ((Jclient *) arg)->jack_shutdown (); -} - - -int Jclient::jack_static_process (jack_nframes_t nframes, void *arg) -{ - return ((Jclient *) arg)->jack_process (nframes); -} - - -void Jclient::jack_shutdown (void) -{ - send_event (EV_EXIT, 1); -} - - -int Jclient::jack_process (int frames) -{ - int i, k, n; - float a, b, t; - float *inp [2]; - float *tmp [2]; - float *out [2]; - - if (!_active) return 0; - - inp [0] = (float *) jack_port_get_buffer (_inpports [0], frames); - inp [1] = (float *) jack_port_get_buffer (_inpports [1], frames); - out [0] = tmp [0] = (float *) jack_port_get_buffer (_outports [0], frames); - out [1] = tmp [1] = (float *) jack_port_get_buffer (_outports [1], frames); - - a = _ga; - b = _gb; - n = frames; - while (n) - { - if (!_nsamp) - { - if (fabsf (_inpbal0 -_inpbal1) > 0.01f) - { - _inpbal1 = _inpbal0; - t = powf (10.0f, 0.05f * _inpbal0); - _db = (t - b) / _fragm; - t = 1.0f / t; - _da = (t - a) / _fragm; - } - else - { - _da = 0.0f; - _db = 0.0f; - } - _hpfilt.prepare (_fragm); - _lshelf.prepare (_fragm); - _nsamp = _fragm; - } - - k = (n < _nsamp) ? n: _nsamp; - for (i = 0; i < k; i++) - { - a += _da; - b += _db; - tmp [0][i] = a * inp [0][i]; - tmp [1][i] = b * inp [1][i]; - } - _hpfilt.process (k, 2, tmp); - _lshelf.process (k, 2, tmp); - inp [0] += k; - inp [1] += k; - tmp [0] += k; - tmp [1] += k; - _nsamp -= k; - n -= k; - } - _ga = a; - _gb = b; - - _shuffl.process (frames, out, out); - - return 0; -} - - -} diff --git a/source/native-plugins/zita-bls1/jclient.h b/source/native-plugins/zita-bls1/jclient.h deleted file mode 100644 index ffe7f8c56..000000000 --- a/source/native-plugins/zita-bls1/jclient.h +++ /dev/null @@ -1,99 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __JCLIENT_H -#define __JCLIENT_H - - -#include -#include -#include -#include -#include "CarlaNativeJack.h" -#include "hp3filt.h" -#include "shuffler.h" -#include "lfshelf2.h" -#include "global.h" - -namespace BLS1 { - - -class Jclient : public A_thread -{ -public: - - Jclient (jack_client_t *jclient); - ~Jclient (void); - - void set_inpbal (float diff) - { - _inpbal0 = diff; - } - - void set_hpfilt (float freq) - { - _hpfilt.setparam (freq); - } - - void set_loshelf (float gain, float freq) - { - _lshelf.setparam (powf (10.0f, 0.05f * gain), freq, 0.4f); - } - - Shuffler *shuffler (void) - { - return (Shuffler *) &_shuffl; - } - -private: - - void init_jack (void); - void close_jack (void); - void jack_shutdown (void); - int jack_process (int nframes); - - virtual void thr_main (void) {} - - jack_client_t *_jack_client; - jack_port_t *_inpports [2]; - jack_port_t *_outports [2]; - bool _active; - unsigned int _fsamp; - int _psize; - int _fragm; - int _nsamp; - float _inpbal0; - float _inpbal1; - float _ga, _gb; - float _da, _db; - HP3filt _hpfilt; - LFshelf2 _lshelf; - Shuffler _shuffl; - - static void jack_static_shutdown (void *arg); - static int jack_static_process (jack_nframes_t nframes, void *arg); -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1/lfshelf2.cc b/source/native-plugins/zita-bls1/lfshelf2.cc deleted file mode 100644 index b12cedfc1..000000000 --- a/source/native-plugins/zita-bls1/lfshelf2.cc +++ /dev/null @@ -1,253 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include "lfshelf2.h" - -namespace BLS1 { - - -LFshelf2::LFshelf2 (void) : - _touch0 (0), - _touch1 (0), - _bypass (true), - _state (BYPASS), - _g0 (1), - _g1 (1), - _f0 (1e2f), - _f1 (1e2f), - _s0 (0), - _s1 (0) -{ - setfsamp (0.0f); -} - - -LFshelf2::~LFshelf2 (void) -{ -} - - -void LFshelf2::setfsamp (float fsamp) -{ - _fsamp = fsamp; - reset (); -} - - -void LFshelf2::reset (void) -{ - memset (_z1, 0, sizeof (float) * MAXCH); - memset (_z2, 0, sizeof (float) * MAXCH); -} - - -void LFshelf2::prepare (int nsamp) -{ - bool upd = false; - float g, f, s; - - if (_touch1 != _touch0) - { - g = _bypass ? 1 : _g0; - f = _f0; - s = _s0; - if (g != _g1) - { - upd = true; - if (g > 2 * _g1) _g1 *= 2; - else if (_g1 > 2 * g) _g1 /= 2; - else _g1 = g; - } - if (f != _f1) - { - upd = true; - if (f > 2 * _f1) _f1 *= 2; - else if (_f1 > 2 * f) _f1 /= 2; - else _f1 = f; - } - if (s != _s1) - { - upd = true; - if (s > _s1 + 0.3f) _s1 += 0.3f; - else if (s < _s1 - 0.3f) _s1 -= 0.3f; - else _s1 = s; - } - if (upd) - { - if ((_state == BYPASS) && (_g1 == 1)) - { - calcpar1 (0, _g1, _f1, _s1); - } - else - { - _state = SMOOTH; - calcpar1 (nsamp, _g1, _f1, _s1); - } - } - else - { - _touch1 = _touch0; - if (fabs (_g1 - 1) < 0.001f) - { - _state = BYPASS; - reset (); - } - else - { - _state = STATIC; - } - } - } -} - - -float LFshelf2::response (float f) -{ - // Compute gain at frequency f from _a0, _a1, _a2, _b1, _b2. - // This is left as an exercise for the reader. - return 0; -} - - -void LFshelf2::calcpar1 (int nsamp, float g, float f, float s) -{ - bool inv; - float a0, a1, a2, b1, b2; - float r, w1, w2, c1, c2, c3, c4, d1, d2; - - inv = (g < 1.0f); - if (inv) g = 1.0f / g; - w1 = 2 * M_PI * f / _fsamp; - w2 = w1 * sqrtf (g); - s *= (g - 1) / g; - d1 = 1.8f - 0.55f * s / (1 + 2 * w1); - d2 = 1.8f - 1.50f * s / (1 + 2 * w2); - if (inv) - { - c1 = w1 * w1; - c2 = d1 * w1; - c3 = w2 * w2; - c4 = d2 * w2; - } - else - { - c1 = w2 * w2; - c2 = d2 * w2; - c3 = w1 * w1; - c4 = d1 * w1; - } - r = c3 + 2 * c4 + 4; - b1 = 4 * (c4 - c3) / r; - b2 = 4 * c3 / r; - a0 = (c1 + 2 * c2 + 4) / r - 1; - a1 = 4 * (c2 - c1) / r - b1; - a2 = 4 * c1 / r - b2; - if (nsamp) - { - _da0 = (a0 - _a0) / nsamp + 1e-30f; - _da1 = (a1 - _a1) / nsamp + 1e-30f; - _da2 = (a2 - _a2) / nsamp + 1e-30f; - _db1 = (b1 - _b1) / nsamp + 1e-30f; - _db2 = (b2 - _b2) / nsamp + 1e-30f; - } - else - { - _a0 = a0; - _a1 = a1; - _a2 = a2; - _b1 = b1; - _b2 = b2; - } -} - - -void LFshelf2::process1 (int nsamp, int nchan, float *data[]) -{ - int i, j; - float a0, a1, a2, b1, b2; - float x, y, z1, z2; - float *p; - - a0 = _a0; - a1 = _a1; - a2 = _a2; - b1 = _b1; - b2 = _b2; - if (_state == SMOOTH) - { - for (i = 0; i < nchan; i++) - { - p = data [i]; - z1 = _z1 [i]; - z2 = _z2 [i]; - a0 = _a0; - a1 = _a1; - a2 = _a2; - b1 = _b1; - b2 = _b2; - for (j = 0; j < nsamp; j++) - { - a0 += _da0; - a1 += _da1; - a2 += _da2; - b1 += _db1; - b2 += _db2; - x = *p; - y = x - b1 * z1 - b2 * z2 + 1e-10f; - *p++ = x + a0 * y + a1 * z1 + a2 * z2; - z2 += z1; - z1 += y; - } - _z1 [i] = z1; - _z2 [i] = z2; - } - _a0 = a0; - _a1 = a1; - _a2 = a2; - _b1 = b1; - _b2 = b2; - } - else - { - for (i = 0; i < nchan; i++) - { - p = data [i]; - z1 = _z1 [i]; - z2 = _z2 [i]; - for (j = 0; j < nsamp; j++) - { - x = *p; - y = x - b1 * z1 - b2 * z2 + 1e-10f; - *p++ = x + a0 * y + a1 * z1 + a2 * z2; - z2 += z1; - z1 += y; - } - _z1 [i] = z1; - _z2 [i] = z2; - } - } -} - - -} diff --git a/source/native-plugins/zita-bls1/lfshelf2.h b/source/native-plugins/zita-bls1/lfshelf2.h deleted file mode 100644 index e159fdf08..000000000 --- a/source/native-plugins/zita-bls1/lfshelf2.h +++ /dev/null @@ -1,93 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __LFSHELF2_H -#define __LFSHELF2_H - - -#include -#include "global.h" - -namespace BLS1 { - - -class LFshelf2 -{ -public: - - LFshelf2 (void); - ~LFshelf2 (void); - - void setfsamp (float fsamp); - void setparam (float g, float f, float s) - { - _f0 = f; - _g0 = g; - _s0 = s; - _touch0++; - } - void reset (void); - void bypass (bool s) - { - if (s != _bypass) - { - _bypass = s; - _touch0++; - } - } - void prepare (int nsamp); - void process (int nsamp, int nchan, float *data[]) - { - if (_state != BYPASS) process1 (nsamp, nchan, data); - } - float response (float f); - -private: - - enum { BYPASS, STATIC, SMOOTH }; - - void calcpar1 (int nsamp, float g, float f, float s); - void process1 (int nsamp, int nchan, float *data[]); - - volatile int16_t _touch0; - volatile int16_t _touch1; - bool _bypass; - int _state; - float _fsamp; - - float _g0, _g1; - float _f0, _f1; - float _s0, _s1; - - float _a0, _a1, _a2; - float _b1, _b2; - float _da0, _da1, _da2; - float _db1, _db2; - - float _z1 [2]; - float _z2 [2]; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1/mainwin.cc b/source/native-plugins/zita-bls1/mainwin.cc deleted file mode 100644 index e617c067e..000000000 --- a/source/native-plugins/zita-bls1/mainwin.cc +++ /dev/null @@ -1,258 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include "styles.h" -#include "global.h" -#include "mainwin.h" - -namespace BLS1 { - - -Mainwin::Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, ValueChangedCallback* valuecb) : - A_thread ("Main"), - X_window (parent, xp, yp, XSIZE, YSIZE, XftColors [C_MAIN_BG]->pixel), - _stop (false), - _xres (xres), - _touch (false), - _valuecb (valuecb) -{ - X_hints H; - int i; - - _atom = XInternAtom (dpy (), "WM_DELETE_WINDOW", True); - XSetWMProtocols (dpy (), win (), &_atom, 1); - _atom = XInternAtom (dpy (), "WM_PROTOCOLS", True); - - H.position (xp, yp); - H.minsize (XSIZE, YSIZE); - H.maxsize (XSIZE, YSIZE); - H.rname (xres->rname ()); - H.rclas (xres->rclas ()); - x_apply (&H); - - RotaryCtl::init (disp ()); - _rotary [INPBAL] = new Rlinctl (this, this, &inpbal_img, 20, 0, 120, 4, -3.0f, 3.0f, 0.0f, INPBAL); - _rotary [HPFILT] = new Rlogctl (this, this, &hpfilt_img, 20, 0, 120, 4, 10.0f, 320.0f, 40.0f, HPFILT); - _rotary [SHGAIN] = new Rlinctl (this, this, &shgain_img, 190, 0, 120, 5, 0.0f, 24.0f, 15.0f, SHGAIN); - _rotary [SHFREQ] = new Rlogctl (this, this, &shfreq_img, 190, 0, 192, 8, 125.0f, 2e3f, 5e2f, SHFREQ); - _rotary [LFFREQ] = new Rlogctl (this, this, &lffreq_img, 410, 0, 192, 8, 20.0f, 320.0f, 80.0f, LFFREQ); - _rotary [LFGAIN] = new Rlinctl (this, this, &lfgain_img, 410, 0, 180, 5, -9.0f, 9.0f, 0.0f, LFGAIN); - for (i = 0; i < NROTARY; i++) _rotary [i]->x_map (); - - _numtext = new X_textip (this, 0, &tstyle1, 0, 0, 45, 15, 15); - _numtext->set_align (0); - _parmind = -1; - _timeout = 0; - - x_add_events (ExposureMask); - set_time (0); - inc_time (250000); -} - - -Mainwin::~Mainwin (void) -{ - RotaryCtl::fini (); -} - - -int Mainwin::process (void) -{ - int e; - - if (_stop) handle_stop (); - - e = get_event_timed (); - switch (e) - { - case EV_TIME: - handle_time (); - break; - } - return e; -} - - -void Mainwin::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - expose ((XExposeEvent *) E); - break; - - case ClientMessage: - clmesg ((XClientMessageEvent *) E); - break; - } -} - - -void Mainwin::expose (XExposeEvent *E) -{ - if (E->count) return; - redraw (); -} - - -void Mainwin::clmesg (XClientMessageEvent *E) -{ - if (E->message_type == _atom) _stop = true; -} - - -void Mainwin::handle_time (void) -{ - if (_timeout) - { - if (--_timeout == 0) numdisp (-1); - } - - if (_touch) - { - double v1 = _rotary [SHGAIN]->value (), v2 = _rotary [SHFREQ]->value (); - _valuecb->valueChangedCallback (SHGAIN, v1); - _valuecb->valueChangedCallback (SHFREQ, v2); - _touch = 0; - } - - inc_time (5000); - XFlush (dpy ()); -} - - -void Mainwin::handle_stop (void) -{ - put_event (EV_EXIT, 1); -} - - -void Mainwin::handle_callb (int type, X_window *W, XEvent *E) -{ - RotaryCtl *R; - int k; - double v, v2; - - switch (type) - { - case RotaryCtl::PRESS: - R = (RotaryCtl *) W; - k = R->cbind (); - switch (k) - { - default: - numdisp (-1); - } - break; - - case RotaryCtl::DELTA: - R = (RotaryCtl *) W; - k = R->cbind (); - switch (k) - { - case INPBAL: - v = _rotary [INPBAL]->value (); - _valuecb->valueChangedCallback (INPBAL, v); - break; - case HPFILT: - v = _rotary [HPFILT]->value (); - _valuecb->valueChangedCallback (HPFILT, v); - break; - case SHGAIN: - case SHFREQ: - _touch++; - break; - case LFFREQ: - case LFGAIN: - v = _rotary [LFGAIN]->value (); - v2 = _rotary [LFFREQ]->value (); - _valuecb->valueChangedCallback (LFGAIN, v); - _valuecb->valueChangedCallback (LFFREQ, v2); - break; - } - break; - } -} - - -void Mainwin::redraw (void) -{ - XPutImage (dpy (), win (), dgc (), inputsect, 0, 0, 20, 0, 130, 75); - XPutImage (dpy (), win (), dgc (), shuffsect, 0, 0, 190, 0, 170, 75); - XPutImage (dpy (), win (), dgc (), lfshfsect, 0, 0, 410, 0, 105, 75); -} - - -void Mainwin::numdisp (int k) -{ - int y = 0; - - _timeout = 10; - if (k >= 0) fmtfreq (k); - if (k == _parmind) return; - if (k < 0) - { - _numtext->x_unmap (); - _parmind = -1; - } - else - { - switch (k) - { - default: - ; - } - _numtext->x_move (1, y + 3); - _numtext->x_map (); - _parmind = k; - } -} - - -void Mainwin::fmtfreq (int k) -{ - double v; - char t [16]; - const char *f; - - v = _rotary [k]->value (); - if (v <= 3e1) f = "%1.1lf"; - else if (v <= 1e3) f = "%1.0lf"; - else if (v <= 3e3) - { - f = "%1.2lfk"; - v *= 1e-3; - } - else - { - f = "%1.1lfk"; - v *= 1e-3; - } - sprintf (t, f, v); - _numtext->set_text (t); -} - - -} diff --git a/source/native-plugins/zita-bls1/mainwin.h b/source/native-plugins/zita-bls1/mainwin.h deleted file mode 100644 index c4dcb4527..000000000 --- a/source/native-plugins/zita-bls1/mainwin.h +++ /dev/null @@ -1,90 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __MAINWIN_H -#define __MAINWIN_H - - -#include -#include "guiclass.h" -#include "jclient.h" -#include "global.h" - -class ZitaPipeClient; - -namespace BLS1 { - - -class Mainwin : public A_thread, public X_window, public X_callback -{ -public: - - struct ValueChangedCallback { - virtual ~ValueChangedCallback() {} - virtual void valueChangedCallback(uint, double) = 0; - }; - - - enum { XSIZE = 540, YSIZE = 75 }; - - Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, ValueChangedCallback* valuecb); - ~Mainwin (void); - Mainwin (const Mainwin&); - Mainwin& operator=(const Mainwin&); - - void stop (void) { _stop = true; } - int process (void); - -private: - - enum { INPBAL, HPFILT, SHGAIN, SHFREQ, LFFREQ, LFGAIN, NROTARY }; - - virtual void thr_main (void) {} - - void handle_time (void); - void handle_stop (void); - void handle_event (XEvent *); - void handle_callb (int type, X_window *W, XEvent *E); - void expose (XExposeEvent *E); - void clmesg (XClientMessageEvent *E); - void redraw (void); - void numdisp (int ind); - void fmtfreq (int ind); - - Atom _atom; - bool _stop; - X_resman *_xres; - RotaryCtl *_rotary [NROTARY]; - X_textip *_numtext; - int _parmind; - int _timeout; - int _touch; - - ValueChangedCallback* _valuecb; - - friend class ::ZitaPipeClient; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1/png2img.cc b/source/native-plugins/zita-bls1/png2img.cc deleted file mode 100644 index 72adccb4d..000000000 --- a/source/native-plugins/zita-bls1/png2img.cc +++ /dev/null @@ -1,136 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2007-2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include - -namespace BLS1 { - - -XImage *png2img (const char *file, X_display *disp, XftColor *bgnd) -{ - FILE *F; - png_byte hdr [8]; - png_structp png_ptr; - png_infop png_info; - const unsigned char **data, *p; - int dx, dy, x, y, dp; - float vr, vg, vb, va, br, bg, bb; - unsigned long mr, mg, mb, pix; - XImage *image; - - F = fopen (file, "r"); - if (!F) - { - fprintf (stderr, "Can't open '%s'\n", file); - return 0; - } - fread (hdr, 1, 8, F); - if (png_sig_cmp (hdr, 0, 8)) - { - fprintf (stderr, "'%s' is not a PNG file\n", file); - return 0; - } - fseek (F, 0, SEEK_SET); - - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); - if (! png_ptr) - { - fclose (F); - return 0; - } - png_info = png_create_info_struct (png_ptr); - if (! png_info) - { - png_destroy_read_struct (&png_ptr, 0, 0); - fclose (F); - return 0; - } - if (setjmp (png_jmpbuf (png_ptr))) - { - png_destroy_read_struct (&png_ptr, &png_info, 0); - fclose (F); - fprintf (stderr, "png:longjmp()\n"); - return 0; - } - - png_init_io (png_ptr, F); - png_read_png (png_ptr, png_info, - PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, - 0); - -// This requires libpng14 or later. If you still have an -// older version, use the three commented lines instead. - - dx = png_get_image_width (png_ptr, png_info); - dy = png_get_image_height (png_ptr, png_info); - dp = (png_get_color_type (png_ptr, png_info) & PNG_COLOR_MASK_ALPHA) ? 4 : 3; - -// dx = png_info->width; -// dy = png_info->height; -// dp = (png_info->color_type & PNG_COLOR_MASK_ALPHA) ? 4 : 3; - - data = (const unsigned char **)(png_get_rows (png_ptr, png_info)); - - image = XCreateImage (disp->dpy (), - disp->dvi (), - DefaultDepth (disp->dpy (), disp->dsn ()), - ZPixmap, 0, 0, dx, dy, 32, 0); - image->data = new char [image->height * image->bytes_per_line]; - - mr = image->red_mask; - mg = image->green_mask; - mb = image->blue_mask; - - vr = mr / 255.0f; - vg = mg / 255.0f; - vb = mb / 255.0f; - if (bgnd) - { - br = bgnd->color.red >> 8; - bg = bgnd->color.green >> 8; - bb = bgnd->color.blue >> 8; - } - else br = bg = bb = 0; - - for (y = 0; y < dy; y++) - { - p = data [y]; - for (x = 0; x < dx; x++) - { - va = (dp == 4) ? (p [3] / 255.0f) : 1; - pix = ((unsigned long)((p [0] * va + (1 - va) * br) * vr) & mr) - | ((unsigned long)((p [1] * va + (1 - va) * bg) * vg) & mg) - | ((unsigned long)((p [2] * va + (1 - va) * bb) * vb) & mb); - XPutPixel (image, x, y, pix); - p += dp; - } - } - - png_destroy_read_struct (&png_ptr, &png_info, 0); - fclose (F); - - return image; -} - - -} diff --git a/source/native-plugins/zita-bls1/png2img.h b/source/native-plugins/zita-bls1/png2img.h deleted file mode 100644 index 2c599c0bb..000000000 --- a/source/native-plugins/zita-bls1/png2img.h +++ /dev/null @@ -1,35 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2007-2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __PNG2IMG_H -#define __PNG2IMG_H - - -#include - -namespace BLS1 { - -extern XImage *png2img (const char *file, X_display *disp, XftColor *bgnd); - -} - -#endif diff --git a/source/native-plugins/zita-bls1/rotary.cc b/source/native-plugins/zita-bls1/rotary.cc deleted file mode 100644 index 0fc14f3ac..000000000 --- a/source/native-plugins/zita-bls1/rotary.cc +++ /dev/null @@ -1,207 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include "rotary.h" - -namespace BLS1 { - - -cairo_t *RotaryCtl::_cairotype = 0; -cairo_surface_t *RotaryCtl::_cairosurf = 0; - -int RotaryCtl::_wb_up = 4; -int RotaryCtl::_wb_dn = 5; -int RotaryCtl::_keymod = 0; -int RotaryCtl::_button = 0; -int RotaryCtl::_rcount = 0; -int RotaryCtl::_rx = 0; -int RotaryCtl::_ry = 0; - - -RotaryCtl::RotaryCtl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cbind) : - - X_window (parent, - image->_x0 + xp, image->_y0 + yp, - image->_dx, image->_dy, - image->_backg->pixel), - _cbobj (cbobj), - _cbind (cbind), - _image (image), - _state (0), - _count (0), - _value (0), - _angle (0) -{ - x_add_events ( ExposureMask - | Button1MotionMask | ButtonPressMask | ButtonReleaseMask); -} - - -RotaryCtl::~RotaryCtl (void) -{ -} - - -void RotaryCtl::init (X_display *disp) -{ - _cairosurf = cairo_xlib_surface_create (disp->dpy (), 0, disp->dvi (), 50, 50); - _cairotype = cairo_create (_cairosurf); -} - - -void RotaryCtl::fini (void) -{ - cairo_destroy (_cairotype); - cairo_surface_destroy (_cairosurf); -} - - -void RotaryCtl::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - render (); - break; - - case ButtonPress: - bpress ((XButtonEvent *) E); - break; - - case ButtonRelease: - brelse ((XButtonEvent *) E); - break; - - case MotionNotify: - motion ((XMotionEvent *) E); - break; - - default: - fprintf (stderr, "RotaryCtl: event %d\n", E->type ); - } -} - - -void RotaryCtl::bpress (XButtonEvent *E) -{ - int r = 0; - double d; - - d = hypot (E->x - _image->_xref, E->y - _image->_yref); - if (d > _image->_rad + 3) return; - _keymod = E->state; - if (E->button < 4) - { - _rx = E->x; - _ry = E->y; - _button = E->button; - r = handle_button (); - _rcount = _count; - } - else if (_button) return; - else if ((int)E->button == _wb_up) - { - r = handle_mwheel (1); - } - else if ((int)E->button == _wb_dn) - { - r = handle_mwheel (-1); - } - if (r) - { - callback (r); - render (); - } -} - - -void RotaryCtl::brelse (XButtonEvent *E) -{ - if (_button == (int)E->button) - { - _button = 0; - callback (RELSE); - } -} - - -void RotaryCtl::motion (XMotionEvent *E) -{ - int dx, dy, r; - - if (_button) - { - _keymod = E->state; - dx = E->x - _rx; - dy = E->y - _ry; - r = handle_motion (dx, dy); - if (r) - { - callback (r); - render (); - } - } -} - - -void RotaryCtl::set_state (int s) -{ - _state = s; - render (); -} - - -void RotaryCtl::render (void) -{ - XImage *I; - double a, c, r, x, y; - - I = _image->_image [_state]; - XPutImage (dpy (), win (), dgc (), I, - _image->_x0, _image->_y0, 0, 0, _image->_dx, _image->_dy); - cairo_xlib_surface_set_drawable (_cairosurf, win(), - _image->_dx, _image->_dy); - c = _image->_lncol [_state] ? 1.0 : 0.0; - a = _angle * M_PI / 180; - r = _image->_rad; - x = _image->_xref; - y = _image->_yref; - cairo_new_path (_cairotype); - cairo_move_to (_cairotype, x, y); - x += r * sin (a); - y -= r * cos (a); - cairo_line_to (_cairotype, x, y); - cairo_set_source_rgb (_cairotype, c, c, c); - cairo_set_line_width (_cairotype, 1.8); - cairo_stroke (_cairotype); -} - - -} diff --git a/source/native-plugins/zita-bls1/rotary.h b/source/native-plugins/zita-bls1/rotary.h deleted file mode 100644 index 39b7394d0..000000000 --- a/source/native-plugins/zita-bls1/rotary.h +++ /dev/null @@ -1,120 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __ROTARY_H -#define __ROTARY_H - - -#include -#include -#include - -namespace BLS1 { - - -class RotaryImg -{ -public: - - XftColor *_backg; - XImage *_image [4]; - char _lncol [4]; - int _x0; - int _y0; - int _dx; - int _dy; - double _xref; - double _yref; - double _rad; -}; - - - -class RotaryCtl : public X_window -{ -public: - - RotaryCtl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, int yp, - int cbind = 0); - - virtual ~RotaryCtl (void); - - enum { NOP = 200, PRESS, RELSE, DELTA }; - - int cbind (void) { return _cbind; } - int state (void) { return _state; } - double value (void) { return _value; } - int keymod (void) { return _keymod; } - int button (void) { return _button; } - - virtual void set_state (int s); - virtual void set_value (double v) = 0; - virtual void get_string (char *p, int n) {} - - static void init (X_display *disp); - static void fini (void); - - static int _wb_up; - static int _wb_dn; - -protected: - - X_callback *_cbobj; - int _cbind; - RotaryImg *_image; - int _state; - int _count; - int _range; - double _value; - double _angle; - - void render (void); - void callback (int k) { _cbobj->handle_callb (k, this, 0); } - - static int _keymod; - static int _button; - static int _rcount; - static int _rx; - static int _ry; - -private: - - void handle_event (XEvent *E); - void bpress (XButtonEvent *E); - void brelse (XButtonEvent *E); - void motion (XMotionEvent *E); - - virtual int handle_button (void) = 0; - virtual int handle_motion (int dx, int dy) = 0; - virtual int handle_mwheel (int dw) = 0; - - static cairo_t *_cairotype; - static cairo_surface_t *_cairosurf; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1/shuffler.cc b/source/native-plugins/zita-bls1/shuffler.cc deleted file mode 100644 index 3ee3a1812..000000000 --- a/source/native-plugins/zita-bls1/shuffler.cc +++ /dev/null @@ -1,188 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include -#include "shuffler.h" - -namespace BLS1 { - - -Shuffler::Shuffler (void) : - _fsamp (0), - _quant (0), - _minpt (0), - _iplen (0), - _delay (0), - _fft_time (0), - _fft_freq (0), - _fft_plan (0), - _del_size (0), - _del_wind (0), - _del_data (0), - _count (0), - _touch0 (0), - _touch1 (0) -{ -} - - -Shuffler::~Shuffler (void) -{ - fini (); -} - - -void Shuffler::init (int fsamp, int quant) -{ - int k; - - _fsamp = fsamp; - _quant = quant; - _minpt = 256; - for (k = _fsamp, _iplen = 1024; k > 56000; k >>= 1, _iplen <<= 1); - if (_quant > _iplen) _quant = _iplen; - _delay = _iplen / 2; - if (_quant < _minpt) _delay += 2 * _minpt - _quant; - else _minpt = _quant; - - _del_size = 3 * _iplen; - _del_wind = 0; - _del_data = new float [3 * _iplen]; - memset (_del_data, 0, 3 * _iplen * sizeof (float)); - - _fft_time = (float *) fftwf_malloc (_iplen * sizeof (float)); - _fft_freq = (fftwf_complex *) fftwf_malloc ((_iplen / 2 + 1) * sizeof (fftwf_complex)); - _fft_plan = fftwf_plan_dft_c2r_1d (_iplen, _fft_freq, _fft_time, FFTW_ESTIMATE); - memset (_fft_time, 0, _iplen * sizeof (float)); - _fft_time [_iplen / 2] = 1.0f; - - _convproc.configure (1, 1, _iplen, _quant, _minpt, _minpt); - _convproc.impdata_create (0, 0, 1, _fft_time, 0, _iplen); - _convproc.start_process (35, SCHED_FIFO); -} - - -void Shuffler::fini (void) -{ - fftwf_free (_fft_time); - fftwf_free (_fft_freq); - fftwf_destroy_plan (_fft_plan); - delete[] _del_data; - _convproc.stop_process (); - _convproc.cleanup (); -} - - -void Shuffler::reset (void) -{ -} - - -void Shuffler::prepare (float gain, float freq) -{ - int i, h; - float f, g, t; - - g = powf (10.0f, 0.05f * gain); - g = sqrtf (g * g - 1.0f); - freq /= g; - - h = _iplen / 2; - for (i = 0; i < h; i++) - { - f = i * _fsamp / _iplen; - t = 1.0f / hypotf (1.0f, f / freq); - _fft_freq [i][0] = 0; - _fft_freq [i][1] = (i & 1) ? t : -t; - } - _fft_freq [h][0] = 0; - _fft_freq [h][1] = 0; - fftwf_execute(_fft_plan); - - g /= _iplen; - for (i = 1; i < h; i++) - { - t = g * (0.6f + 0.4f * cosf (i * M_PI / h)); - _fft_time [h + i] *= t; - _fft_time [h - i] *= t; - } - _fft_time [0] = 0; - _fft_time [h] = 1; - _convproc.impdata_update (0, 0, 1, _fft_time, 0, _iplen); - - _touch0++; -} - - -void Shuffler::process (int nsamp, float *inp [], float *out []) -{ - int i, k, im, ri, wi; - float a, b, *p0, *p1, *q; - - im = _del_size; - wi = _del_wind; - ri = _del_wind - _delay; - if (ri < 0) ri += im; - - for (k = 0; k < nsamp; k += _quant) - { - if ((_count == 0) && (_touch0 != _touch1)) _count = 2 * _iplen; - - p0 = inp [0] + k; - p1 = inp [1] + k; - q = _convproc.inpdata (0); - for (i = 0; i < _quant; i++) - { - a = p0 [i] / 2; - b = p1 [i] / 2; - _del_data [wi++] = a + b; - if (wi == im) wi = 0; - *q++ = a - b; - } - _convproc.process (); - p0 = out [0] + k; - p1 = out [1] + k; - q = _convproc.outdata (0); - for (i = 0; i < _quant; i++) - { - a = _del_data [ri++]; - if (ri == im) ri = 0; - b = *q++; - p0 [i] = a + b; - p1 [i] = a - b; - } - - if (_count) - { - _count -= _quant; - if (_count == 0) _touch1 = _touch0; - } - } - - _del_wind = wi; -} - - -} diff --git a/source/native-plugins/zita-bls1/shuffler.h b/source/native-plugins/zita-bls1/shuffler.h deleted file mode 100644 index 88b5638fb..000000000 --- a/source/native-plugins/zita-bls1/shuffler.h +++ /dev/null @@ -1,72 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __SHUFFLER_H -#define __SHUFFLER_H - - -#include -#include "global.h" - -namespace BLS1 { - - -class Shuffler -{ -public: - - Shuffler (void); - ~Shuffler (void); - - void init (int fsamp, int quant); - void reset (void); - void prepare (float gain, float freq); - void process (int nsamp, float *inp [], float *out []); - - bool ready (void) { return _touch0 == _touch1; } - -private: - - void fini (void); - - float _fsamp; - int _quant; - int _minpt; - int _iplen; - int _delay; - float *_fft_time; - fftwf_complex *_fft_freq; - fftwf_plan _fft_plan; - int _del_size; - int _del_wind; - float *_del_data; - int _state; - int _count; - volatile int16_t _touch0; - volatile int16_t _touch1; - Convproc _convproc; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-bls1/styles.cc b/source/native-plugins/zita-bls1/styles.cc deleted file mode 100644 index bf511cedc..000000000 --- a/source/native-plugins/zita-bls1/styles.cc +++ /dev/null @@ -1,153 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include "styles.h" -#include "png2img.h" - -#include "CarlaString.hpp" -#include - -namespace BLS1 { - - -XftColor *XftColors [NXFTCOLORS]; -XftFont *XftFonts [NXFTFONTS]; - -X_textln_style tstyle1; - -XImage *inputsect; -XImage *shuffsect; -XImage *lfshfsect; -RotaryImg inpbal_img; -RotaryImg hpfilt_img; -RotaryImg shfreq_img; -RotaryImg shgain_img; -RotaryImg lffreq_img; -RotaryImg lfgain_img; - - -static CarlaString getResourceDir() -{ - Dl_info exeInfo; - dladdr((void*)getResourceDir, &exeInfo); - - CarlaString filename(exeInfo.dli_fname); - return filename.truncate(filename.rfind("-ui")); -} - - -int styles_init (X_display *disp, X_resman *xrm) -{ - CarlaString resourceDir(getResourceDir()); - - XftColors [C_MAIN_BG] = disp->alloc_xftcolor (0.25f, 0.25f, 0.25f, 1.0f); - XftColors [C_MAIN_FG] = disp->alloc_xftcolor (1.0f, 1.0f, 1.0f, 1.0f); - XftColors [C_TEXT_BG] = disp->alloc_xftcolor (1.0f, 1.0f, 0.0f, 1.0f); - XftColors [C_TEXT_FG] = disp->alloc_xftcolor (0.0f, 0.0f, 0.0f, 1.0f); - - XftFonts [F_TEXT] = disp->alloc_xftfont (xrm->get (".font.text", "luxi:bold::pixelsize=11")); - - tstyle1.font = XftFonts [F_TEXT]; - tstyle1.color.normal.bgnd = XftColors [C_TEXT_BG]->pixel; - tstyle1.color.normal.text = XftColors [C_TEXT_FG]; - - inputsect = png2img (resourceDir+"/inputsect.png", disp, XftColors [C_MAIN_BG]); - shuffsect = png2img (resourceDir+"/shuffsect.png", disp, XftColors [C_MAIN_BG]); - lfshfsect = png2img (resourceDir+"/lfshfsect.png", disp, XftColors [C_MAIN_BG]); - if (!inputsect || !shuffsect || !lfshfsect) return 1; - - inpbal_img._backg = XftColors [C_MAIN_BG]; - inpbal_img._image [0] = inputsect; - inpbal_img._lncol [0] = 1; - inpbal_img._x0 = 28; - inpbal_img._y0 = 17; - inpbal_img._dx = 25; - inpbal_img._dy = 25; - inpbal_img._xref = 12.5; - inpbal_img._yref = 12.5; - inpbal_img._rad = 12; - - hpfilt_img._backg = XftColors [C_MAIN_BG]; - hpfilt_img._image [0] = inputsect; - hpfilt_img._lncol [0] = 0; - hpfilt_img._x0 = 87; - hpfilt_img._y0 = 17; - hpfilt_img._dx = 25; - hpfilt_img._dy = 25; - hpfilt_img._xref = 12.5; - hpfilt_img._yref = 12.5; - hpfilt_img._rad = 12; - - shgain_img._backg = XftColors [C_MAIN_BG]; - shgain_img._image [0] = shuffsect; - shgain_img._lncol [0] = 0; - shgain_img._x0 = 68; - shgain_img._y0 = 17; - shgain_img._dx = 25; - shgain_img._dy = 25; - shgain_img._xref = 12.5; - shgain_img._yref = 12.5; - shgain_img._rad = 12; - - shfreq_img._backg = XftColors [C_MAIN_BG]; - shfreq_img._image [0] = shuffsect; - shfreq_img._lncol [0] = 0; - shfreq_img._x0 = 127; - shfreq_img._y0 = 17; - shfreq_img._dx = 25; - shfreq_img._dy = 25; - shfreq_img._xref = 12.5; - shfreq_img._yref = 12.5; - shfreq_img._rad = 12; - - lffreq_img._backg = XftColors [C_MAIN_BG]; - lffreq_img._image [0] = lfshfsect; - lffreq_img._lncol [0] = 0; - lffreq_img._x0 = 14; - lffreq_img._y0 = 31; - lffreq_img._dx = 25; - lffreq_img._dy = 25; - lffreq_img._xref = 12.5; - lffreq_img._yref = 12.5; - lffreq_img._rad = 12; - - lfgain_img._backg = XftColors [C_MAIN_BG]; - lfgain_img._image [0] = lfshfsect; - lfgain_img._lncol [0] = 1; - lfgain_img._x0 = 63; - lfgain_img._y0 = 17; - lfgain_img._dx = 25; - lfgain_img._dy = 25; - lfgain_img._xref = 12.5; - lfgain_img._yref = 12.5; - lfgain_img._rad = 12; - - return 0; -} - - -void styles_fini (X_display *disp) -{ -} - - -} diff --git a/source/native-plugins/zita-bls1/styles.h b/source/native-plugins/zita-bls1/styles.h deleted file mode 100644 index 6371305f9..000000000 --- a/source/native-plugins/zita-bls1/styles.h +++ /dev/null @@ -1,67 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __STYLES_H -#define __STYLES_H - -#include -#include "rotary.h" - -namespace BLS1 { - - -enum -{ - C_MAIN_BG, C_MAIN_FG, - C_TEXT_BG, C_TEXT_FG, - NXFTCOLORS -}; - -enum -{ - F_TEXT, - NXFTFONTS -}; - - -extern int styles_init (X_display *disp, X_resman *xrm); -extern void styles_fini (X_display *disp); - -extern XftColor *XftColors [NXFTCOLORS]; -extern XftFont *XftFonts [NXFTFONTS]; - -extern X_textln_style tstyle1; - -extern XImage *inputsect; -extern XImage *shuffsect; -extern XImage *lfshfsect; -extern RotaryImg inpbal_img; -extern RotaryImg hpfilt_img; -extern RotaryImg shfreq_img; -extern RotaryImg shgain_img; -extern RotaryImg lffreq_img; -extern RotaryImg lfgain_img; - - -} - -#endif diff --git a/source/native-plugins/zita-rev1-ui.cpp b/source/native-plugins/zita-rev1-ui.cpp deleted file mode 100644 index 6b42dd98a..000000000 --- a/source/native-plugins/zita-rev1-ui.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Carla Native Plugins - * Copyright (C) 2012-2015 Filipe Coelho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the doc/GPL.txt file. - */ - -#include "CarlaPipeUtils.cpp" - -#include "zita-rev1/png2img.cc" -#include "zita-rev1/guiclass.cc" -#include "zita-rev1/mainwin.cc" -#include "zita-rev1/rotary.cc" -#include "zita-rev1/styles.cc" - -using namespace REV1; - -static Mainwin* mainwin = nullptr; - -// -------------------------------------------------------------------------------------------- - -class ZitaPipeClient : public CarlaPipeClient, - public Mainwin::ValueChangedCallback -{ -public: - ZitaPipeClient() noexcept - : CarlaPipeClient(), - fQuitReceived(false) {} - - ~ZitaPipeClient() noexcept override - { - if (fQuitReceived || ! isPipeRunning()) - return; - - const CarlaMutexLocker cml(getPipeLock()); - - writeMessage("exiting\n"); - flushMessages(); - } - - bool quitRequested() const noexcept - { - return fQuitReceived; - } - -protected: - bool msgReceived(const char* const msg) noexcept override - { - if (std::strcmp(msg, "control") == 0) - { - uint index; - float value; - CARLA_SAFE_ASSERT_RETURN(readNextLineAsUInt(index), true); - CARLA_SAFE_ASSERT_RETURN(readNextLineAsFloat(value), true); - - if (index == Mainwin::R_OPMIX && mainwin->_ambis) - index = Mainwin::R_RGXYZ; - - mainwin->_rotary[index]->set_value(value); - return true; - } - - if (std::strcmp(msg, "show") == 0) - { - mainwin->x_map(); - return true; - } - - if (std::strcmp(msg, "hide") == 0) - { - mainwin->x_unmap(); - return true; - } - - if (std::strcmp(msg, "focus") == 0) - { - mainwin->x_mapraised(); - return true; - } - - if (std::strcmp(msg, "uiTitle") == 0) - { - const char* uiTitle; - - CARLA_SAFE_ASSERT_RETURN(readNextLineAsString(uiTitle), true); - - mainwin->x_set_title(uiTitle); - return true; - } - - if (std::strcmp(msg, "quit") == 0) - { - fQuitReceived = true; - mainwin->stop(); - return true; - } - - carla_stderr("ZitaPipeClient::msgReceived : %s", msg); - return false; - } - - void valueChangedCallback(uint index, double value) override - { - if (index == Mainwin::R_RGXYZ) - index = Mainwin::R_OPMIX; - - if (isPipeRunning()) - writeControlMessage(index, value); - } - -private: - bool fQuitReceived; -}; - -// -------------------------------------------------------------------------------------------- - -int main(int argc, const char* argv[]) -{ - X_resman xresman; - X_display *display; - X_handler *handler; - X_rootwin *rootwin; - int ev, xp, yp, xs, ys; - - int fake_argc = 1; - char* fake_argv[] = { (char*)"rev1" }; - xresman.init(&fake_argc, fake_argv, (char*)"rev1", nullptr, 0); - - display = new X_display(nullptr); - if (display->dpy () == 0) - { - carla_stderr("Can't open display."); - delete display; - return 1; - } - - ZitaPipeClient pipe; - bool ambisonic = false; - const char* uiTitle = "Test UI"; - - if (argc > 1) - { - ambisonic = std::strcmp(argv[1], "true") == 0; - uiTitle = argv[2]; - - if (! pipe.initPipeClient(argv)) - return 1; - } - - xp = yp = 100; - xs = Mainwin::XSIZE + 4; - ys = Mainwin::YSIZE + 30; - xresman.geometry(".geometry", display->xsize(), display->ysize(), 1, xp, yp, xs, ys); - - styles_init(display, &xresman); - rootwin = new X_rootwin(display); - mainwin = new Mainwin(rootwin, &xresman, xp, yp, ambisonic, &pipe); - mainwin->x_set_title(uiTitle); - rootwin->handle_event(); - handler = new X_handler(display, mainwin, EV_X11); - handler->next_event(); - XFlush(display->dpy()); - - if (argc == 1) - mainwin->x_map(); - - do - { - ev = mainwin->process(); - if (ev == EV_X11) - { - rootwin->handle_event(); - handler->next_event(); - } - else if (ev == Esync::EV_TIME) - { - handler->next_event(); - - if (pipe.isPipeRunning()) - pipe.idlePipe(); - } - } - while (ev != EV_EXIT && ! pipe.quitRequested()); - - styles_fini(display); - delete handler; - delete rootwin; - delete display; - - return 0; -} - -// -------------------------------------------------------------------------------------------- diff --git a/source/native-plugins/zita-rev1.cpp b/source/native-plugins/zita-rev1.cpp deleted file mode 100644 index 20e3ef8bf..000000000 --- a/source/native-plugins/zita-rev1.cpp +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Carla Native Plugins - * Copyright (C) 2012-2017 Filipe Coelho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * For a full copy of the GNU General Public License see the doc/GPL.txt file. - */ - -#include "CarlaNativeExtUI.hpp" -#include "CarlaJuceUtils.hpp" - -#include "zita-rev1/jclient.cc" -#include "zita-rev1/pareq.cc" -#include "zita-rev1/reverb.cc" - -using namespace REV1; - -// ----------------------------------------------------------------------- -// REV1 Plugin - -class REV1Plugin : public NativePluginAndUiClass -{ -public: - enum Parameters { - kParameterDELAY, - kParameterXOVER, - kParameterRTLOW, - kParameterRTMID, - kParameterFDAMP, - kParameterEQ1FR, - kParameterEQ1GN, - kParameterEQ2FR, - kParameterEQ2GN, - kParameterOPMIXorRGXYZ, - kParameterNROTARY - }; - - REV1Plugin(const NativeHostDescriptor* const host, const bool isAmbisonic) - : NativePluginAndUiClass(host, "zita-rev1-ui"), - kIsAmbisonic(isAmbisonic), - kNumInputs(2), - kNumOutputs(isAmbisonic ? 4 : 2), - fJackClient(), - jclient(nullptr) - { - CARLA_SAFE_ASSERT(host != nullptr); - - carla_zeroStruct(fJackClient); - - fJackClient.bufferSize = getBufferSize(); - fJackClient.sampleRate = getSampleRate(); - - // set initial values - fParameters[kParameterDELAY] = 0.04f; - fParameters[kParameterXOVER] = 200.0f; - fParameters[kParameterRTLOW] = 3.0f; - fParameters[kParameterRTMID] = 2.0f; - fParameters[kParameterFDAMP] = 6.0e3; - fParameters[kParameterEQ1FR] = 160.0f; - fParameters[kParameterEQ1GN] = 0.0f; - fParameters[kParameterEQ2FR] = 2.5e3; - fParameters[kParameterEQ2GN] = 0.0f; - - if (isAmbisonic) - fParameters[kParameterOPMIXorRGXYZ] = 0.0f; - else - fParameters[kParameterOPMIXorRGXYZ] = 0.5f; - - _recreateZitaClient(); - } - - // ------------------------------------------------------------------- - // Plugin parameter calls - - uint32_t getParameterCount() const override - { - return kParameterNROTARY; - } - - const NativeParameter* getParameterInfo(const uint32_t index) const override - { - CARLA_SAFE_ASSERT_RETURN(index < kParameterNROTARY, nullptr); - - static NativeParameter param; - - int hints = NATIVE_PARAMETER_IS_ENABLED|NATIVE_PARAMETER_IS_AUTOMABLE; - - // reset - param.name = nullptr; - param.unit = nullptr; - param.ranges.def = 0.0f; - param.ranges.min = 0.0f; - param.ranges.max = 1.0f; - param.ranges.step = 1.0f; - param.ranges.stepSmall = 1.0f; - param.ranges.stepLarge = 1.0f; - param.scalePointCount = 0; - param.scalePoints = nullptr; - - switch (index) - { - case kParameterDELAY: - param.name = "Delay"; - param.ranges.def = 0.04f; - param.ranges.min = 0.02f; - param.ranges.max = 0.100f; - break; - case kParameterXOVER: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "Crossover"; - param.ranges.def = 200.0f; - param.ranges.min = 50.0f; - param.ranges.max = 1000.0f; - break; - case kParameterRTLOW: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "RT60 Low"; - param.ranges.def = 3.0f; - param.ranges.min = 1.0f; - param.ranges.max = 8.0f; - break; - case kParameterRTMID: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "RT60 Mid"; - param.ranges.def = 2.0f; - param.ranges.min = 1.0f; - param.ranges.max = 8.0f; - break; - case kParameterFDAMP: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "HF Damping"; - param.ranges.def = 6.0e3; - param.ranges.min = 1.5e3; - param.ranges.max = 24.0e3; - break; - case kParameterEQ1FR: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "Eq1 Frequency"; - param.ranges.def = 160.0f; - param.ranges.min = 40.0f; - param.ranges.max = 2.5e3; - break; - case kParameterEQ1GN: - param.name = "Eq1 Gain"; - param.ranges.def = 0.0f; - param.ranges.min = -15.0; - param.ranges.max = 15.0f; - break; - case kParameterEQ2FR: - hints |= NATIVE_PARAMETER_IS_LOGARITHMIC; - param.name = "Eq2 Frequency"; - param.ranges.def = 2.5e3; - param.ranges.min = 160.0; - param.ranges.max = 10e3; - break; - case kParameterEQ2GN: - param.name = "Eq2 Gain"; - param.ranges.def = 0.0f; - param.ranges.min = -15.0; - param.ranges.max = 15.0f; - break; - case kParameterOPMIXorRGXYZ: - if (kIsAmbisonic) - { - param.name = "XYZ gain"; - param.ranges.def = 0.0f; - param.ranges.min = -9.0f; - param.ranges.max = 9.0f; - } - else - { - param.name = "Dry/wet mix"; - param.ranges.def = 0.5f; - param.ranges.min = 0.0f; - param.ranges.max = 1.0f; - } - break; - } - - param.hints = static_cast(hints); - - return ¶m; - } - - float getParameterValue(const uint32_t index) const override - { - CARLA_SAFE_ASSERT_RETURN(index < kParameterNROTARY, 0.0f); - - return fParameters[index]; - } - - // ------------------------------------------------------------------- - // Plugin state calls - - void setParameterValue(const uint32_t index, const float value) override - { - CARLA_SAFE_ASSERT_RETURN(index < kParameterNROTARY,); - - Reverb* const reverb(jclient->reverb()); - - fParameters[index] = value; - - switch (index) - { - case kParameterDELAY: - reverb->set_delay(value); - break; - case kParameterXOVER: - reverb->set_xover(value); - break; - case kParameterRTLOW: - reverb->set_rtlow(value); - break; - case kParameterRTMID: - reverb->set_rtmid(value); - break; - case kParameterFDAMP: - reverb->set_fdamp(value); - break; - case kParameterEQ1FR: - reverb->set_eq1(value, fParameters[kParameterEQ1GN]); - break; - case kParameterEQ1GN: - reverb->set_eq1(fParameters[kParameterEQ1FR], value); - break; - case kParameterEQ2FR: - reverb->set_eq2(value, fParameters[kParameterEQ2GN]); - break; - case kParameterEQ2GN: - reverb->set_eq2(fParameters[kParameterEQ2FR], value); - break; - case kParameterOPMIXorRGXYZ: - if (kIsAmbisonic) - reverb->set_rgxyz(value); - else - reverb->set_opmix(value); - break; - } - } - - // ------------------------------------------------------------------- - // Plugin process calls - - void process(float** const inBuffer, float** const outBuffer, const uint32_t frames, const NativeMidiEvent* const, const uint32_t) override - { - if (! fJackClient.active) - { - const int iframes(frames); - - for (uint32_t i=0; i jclient; - - // Parameters - float fParameters[kParameterNROTARY]; - - void _recreateZitaClient() - { - jclient = new Jclient(&fJackClient, kIsAmbisonic); - - Reverb* const reverb(jclient->reverb()); - - reverb->set_delay(fParameters[kParameterDELAY]); - reverb->set_xover(fParameters[kParameterXOVER]); - reverb->set_rtlow(fParameters[kParameterRTLOW]); - reverb->set_rtmid(fParameters[kParameterRTMID]); - reverb->set_fdamp(fParameters[kParameterFDAMP]); - - if (kIsAmbisonic) - { - reverb->set_opmix(0.5); - reverb->set_rgxyz(fParameters[kParameterOPMIXorRGXYZ]); - } - else - { - reverb->set_opmix(fParameters[kParameterOPMIXorRGXYZ]); - reverb->set_rgxyz(0.0); - } - - reverb->set_eq1(fParameters[kParameterEQ1FR], fParameters[kParameterEQ1GN]); - reverb->set_eq2(fParameters[kParameterEQ2FR], fParameters[kParameterEQ2GN]); - } - -public: - static NativePluginHandle _instantiateAmbisonic(const NativeHostDescriptor* host) - { - return (host != nullptr) ? new REV1Plugin(host, true) : nullptr; - } - - static NativePluginHandle _instantiateStereo(const NativeHostDescriptor* host) - { - return (host != nullptr) ? new REV1Plugin(host, false) : nullptr; - } - - static void _cleanup(NativePluginHandle handle) - { - delete (REV1Plugin*)handle; - } - - CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(REV1Plugin) -}; - -// ----------------------------------------------------------------------- - -static const NativePluginDescriptor rev1AmbisonicDesc = { - /* category */ NATIVE_PLUGIN_CATEGORY_DELAY, - /* hints */ static_cast(NATIVE_PLUGIN_IS_RTSAFE - |NATIVE_PLUGIN_HAS_UI - |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS), - /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING, - /* audioIns */ 2, - /* audioOuts */ 4, - /* midiIns */ 0, - /* midiOuts */ 0, - /* paramIns */ REV1Plugin::kParameterNROTARY, - /* paramOuts */ 0, - /* name */ "REV1 (Ambisonic)", - /* label */ "rev1-ambisonic", - /* maker */ "falkTX, Fons Adriaensen", - /* copyright */ "GPL v2+", - REV1Plugin::_instantiateAmbisonic, - REV1Plugin::_cleanup, - REV1Plugin::_get_parameter_count, - REV1Plugin::_get_parameter_info, - REV1Plugin::_get_parameter_value, - REV1Plugin::_get_midi_program_count, - REV1Plugin::_get_midi_program_info, - REV1Plugin::_set_parameter_value, - REV1Plugin::_set_midi_program, - REV1Plugin::_set_custom_data, - REV1Plugin::_ui_show, - REV1Plugin::_ui_idle, - REV1Plugin::_ui_set_parameter_value, - REV1Plugin::_ui_set_midi_program, - REV1Plugin::_ui_set_custom_data, - REV1Plugin::_activate, - REV1Plugin::_deactivate, - REV1Plugin::_process, - REV1Plugin::_get_state, - REV1Plugin::_set_state, - REV1Plugin::_dispatcher -}; - -static const NativePluginDescriptor rev1StereoDesc = { - /* category */ NATIVE_PLUGIN_CATEGORY_DELAY, - /* hints */ static_cast(NATIVE_PLUGIN_IS_RTSAFE - |NATIVE_PLUGIN_HAS_UI - |NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS), - /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING, - /* audioIns */ 2, - /* audioOuts */ 2, - /* midiIns */ 0, - /* midiOuts */ 0, - /* paramIns */ REV1Plugin::kParameterNROTARY, - /* paramOuts */ 0, - /* name */ "REV1 (Stereo)", - /* label */ "rev1-stereo", - /* maker */ "falkTX, Fons Adriaensen", - /* copyright */ "GPL v2+", - REV1Plugin::_instantiateStereo, - REV1Plugin::_cleanup, - REV1Plugin::_get_parameter_count, - REV1Plugin::_get_parameter_info, - REV1Plugin::_get_parameter_value, - REV1Plugin::_get_midi_program_count, - REV1Plugin::_get_midi_program_info, - REV1Plugin::_set_parameter_value, - REV1Plugin::_set_midi_program, - REV1Plugin::_set_custom_data, - REV1Plugin::_ui_show, - REV1Plugin::_ui_idle, - REV1Plugin::_ui_set_parameter_value, - REV1Plugin::_ui_set_midi_program, - REV1Plugin::_ui_set_custom_data, - REV1Plugin::_activate, - REV1Plugin::_deactivate, - REV1Plugin::_process, - REV1Plugin::_get_state, - REV1Plugin::_set_state, - REV1Plugin::_dispatcher -}; - -// ----------------------------------------------------------------------- - -CARLA_EXPORT -void carla_register_native_plugin_zita_rev1(); - -CARLA_EXPORT -void carla_register_native_plugin_zita_rev1() -{ - carla_register_native_plugin(&rev1AmbisonicDesc); - carla_register_native_plugin(&rev1StereoDesc); -} - -// ----------------------------------------------------------------------- diff --git a/source/native-plugins/zita-rev1/global.h b/source/native-plugins/zita-rev1/global.h deleted file mode 100644 index 1d0cf9b9b..000000000 --- a/source/native-plugins/zita-rev1/global.h +++ /dev/null @@ -1,32 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __GLOBAL_H -#define __GLOBAL_H - - -#define PROGNAME "zita-rev1" -#define EV_X11 16 -#define EV_EXIT 31 - - -#endif diff --git a/source/native-plugins/zita-rev1/guiclass.cc b/source/native-plugins/zita-rev1/guiclass.cc deleted file mode 100644 index 151133c54..000000000 --- a/source/native-plugins/zita-rev1/guiclass.cc +++ /dev/null @@ -1,160 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include "guiclass.h" - -namespace REV1 { - - -Rlinctl::Rlinctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind) : -RotaryCtl (parent, cbobj, image, xp, yp, cbind), -_cm (cm), -_dd (dd), -_vmin (vmin), -_vmax (vmax), -_form (0) -{ - _count = -1; - set_value (vini); -} - -void Rlinctl::get_string (char *p, int n) -{ - if (_form) snprintf (p, n, _form, _value); - else *p = 0; -} - -void Rlinctl::set_value (double v) -{ - set_count ((int) floor (_cm * (v - _vmin) / (_vmax - _vmin) + 0.5)); - render (); -} - -int Rlinctl::handle_button (void) -{ - return PRESS; -} - -int Rlinctl::handle_motion (int dx, int dy) -{ - return set_count (_rcount + dx - dy); -} - -int Rlinctl::handle_mwheel (int dw) -{ - if (! (_keymod & ShiftMask)) dw *= _dd; - return set_count (_count + dw); -} - -int Rlinctl::set_count (int u) -{ - if (u < 0) u= 0; - if (u > _cm) u = _cm; - if (u != _count) - { - _count = u; - _value = _vmin + u * (_vmax - _vmin) / _cm; - _angle = 270.0 * ((double) u / _cm - 0.5); - return DELTA; - } - return 0; -} - - - -Rlogctl::Rlogctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind) : -RotaryCtl (parent, cbobj, image, xp, yp, cbind), -_cm (cm), -_dd (dd), -_form (0) -{ - _count = -1; - _vmin = log (vmin); - _vmax = log (vmax); - set_value (vini); -} - -void Rlogctl::get_string (char *p, int n) -{ - if (_form) snprintf (p, n, _form, _value); - else *p = 0; -} - -void Rlogctl::set_value (double v) -{ - set_count ((int) floor (_cm * (log (v) - _vmin) / (_vmax - _vmin) + 0.5)); - render (); -} - -int Rlogctl::handle_button (void) -{ - return PRESS; -} - -int Rlogctl::handle_motion (int dx, int dy) -{ - return set_count (_rcount + dx - dy); -} - -int Rlogctl::handle_mwheel (int dw) -{ - if (! (_keymod & ShiftMask)) dw *= _dd; - return set_count (_count + dw); -} - -int Rlogctl::set_count (int u) -{ - if (u < 0) u= 0; - if (u > _cm) u = _cm; - if (u != _count) - { - _count = u; - _value = exp (_vmin + u * (_vmax - _vmin) / _cm); - _angle = 270.0 * ((double) u / _cm - 0.5); - return DELTA; - } - return 0; -} - - -} diff --git a/source/native-plugins/zita-rev1/guiclass.h b/source/native-plugins/zita-rev1/guiclass.h deleted file mode 100644 index 8fd7b30de..000000000 --- a/source/native-plugins/zita-rev1/guiclass.h +++ /dev/null @@ -1,102 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __GUICLASS_H -#define __GUICLASS_H - - -#include "rotary.h" - -namespace REV1 { - - -class Rlinctl : public RotaryCtl -{ -public: - - Rlinctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind = 0); - - virtual void set_value (double v); - virtual void get_string (char *p, int n); - -private: - - virtual int handle_button (void); - virtual int handle_motion (int dx, int dy); - virtual int handle_mwheel (int dw); - int set_count (int u); - - int _cm; - int _dd; - double _vmin; - double _vmax; - const char *_form; -}; - - -class Rlogctl : public RotaryCtl -{ -public: - - Rlogctl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cm, - int dd, - double vmin, - double vmax, - double vini, - int cbind = 0); - - virtual void set_value (double v); - virtual void get_string (char *p, int n); - -private: - - virtual int handle_button (void); - virtual int handle_motion (int dx, int dy); - virtual int handle_mwheel (int dw); - int set_count (int u); - - int _cm; - int _dd; - double _vmin; - double _vmax; - const char *_form; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-rev1/jclient.cc b/source/native-plugins/zita-rev1/jclient.cc deleted file mode 100644 index 795f2579f..000000000 --- a/source/native-plugins/zita-rev1/jclient.cc +++ /dev/null @@ -1,134 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include "jclient.h" - -namespace REV1 { - - -Jclient::Jclient (jack_client_t *jclient, bool ambis) : - A_thread ("Jclient"), - _jack_client (jclient), - _active (false), - _ambis (ambis) -{ - init_jack (); -} - - -Jclient::~Jclient (void) -{ - if (_jack_client) close_jack (); -} - - -void Jclient::init_jack (void) -{ - jack_set_process_callback (_jack_client, jack_static_process, (void *) this); - jack_on_shutdown (_jack_client, jack_static_shutdown, (void *) this); - jack_activate (_jack_client); - _fsamp = jack_get_sample_rate (_jack_client); - - _fragm = 1024; - _nsamp = 0; - - if (_ambis) - { - _inpports [0] = jack_port_register (_jack_client, "in.L", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); - _inpports [1] = jack_port_register (_jack_client, "in.R", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); - _outports [0] = jack_port_register (_jack_client, "out.W", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - _outports [1] = jack_port_register (_jack_client, "out.X", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - _outports [2] = jack_port_register (_jack_client, "out.Y", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - _outports [3] = jack_port_register (_jack_client, "out.Z", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - } - else - { - _inpports [0] = jack_port_register (_jack_client, "in.L", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); - _inpports [1] = jack_port_register (_jack_client, "in.R", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0); - _outports [0] = jack_port_register (_jack_client, "out.L", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - _outports [1] = jack_port_register (_jack_client, "out.R", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - } - - _reverb.init (_fsamp, _ambis); - _active = true; -} - - -void Jclient::close_jack () -{ - jack_deactivate (_jack_client); - jack_client_close (_jack_client); -} - - -void Jclient::jack_static_shutdown (void *arg) -{ - ((Jclient *) arg)->jack_shutdown (); -} - - -int Jclient::jack_static_process (jack_nframes_t nframes, void *arg) -{ - return ((Jclient *) arg)->jack_process (nframes); -} - - -void Jclient::jack_shutdown (void) -{ - send_event (EV_EXIT, 1); -} - - -int Jclient::jack_process (int frames) -{ - int i, k, n_inp, n_out; - float *inp [2]; - float *out [4]; - - if (!_active) return 0; - - n_inp = 2; - n_out = _ambis ? 4 : 2; - for (i = 0; i < n_inp; i++) inp [i] = (float *) jack_port_get_buffer (_inpports [i], frames); - for (i = 0; i < n_out; i++) out [i] = (float *) jack_port_get_buffer (_outports [i], frames); - - while (frames) - { - if (!_nsamp) - { - _reverb.prepare (_fragm); - _nsamp = _fragm; - } - k = (_nsamp < frames) ? _nsamp : frames; - _reverb.process (k, inp, out); - for (i = 0; i < n_inp; i++) inp [i] += k; - for (i = 0; i < n_out; i++) out [i] += k; - frames -= k; - _nsamp -= k; - } - - - return 0; -} - - -} diff --git a/source/native-plugins/zita-rev1/jclient.h b/source/native-plugins/zita-rev1/jclient.h deleted file mode 100644 index 8109ca10f..000000000 --- a/source/native-plugins/zita-rev1/jclient.h +++ /dev/null @@ -1,70 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __JCLIENT_H -#define __JCLIENT_H - - -#include -#include "CarlaNativeJack.h" -#include "global.h" -#include "reverb.h" - -namespace REV1 { - - -class Jclient : public A_thread -{ -public: - - Jclient (jack_client_t *jclient, bool ambis); - ~Jclient (void); - - Reverb *reverb (void) const { return (Reverb *) &_reverb; } - -private: - - void init_jack (void); - void close_jack (void); - void jack_shutdown (void); - int jack_process (int nframes); - - virtual void thr_main (void) {} - - jack_client_t *_jack_client; - jack_port_t *_inpports [2]; - jack_port_t *_outports [4]; - bool _active; - unsigned int _fsamp; - bool _ambis; - int _fragm; - int _nsamp; - Reverb _reverb; - - static void jack_static_shutdown (void *arg); - static int jack_static_process (jack_nframes_t nframes, void *arg); -}; - - -} - -#endif diff --git a/source/native-plugins/zita-rev1/mainwin.cc b/source/native-plugins/zita-rev1/mainwin.cc deleted file mode 100644 index 804b1e74b..000000000 --- a/source/native-plugins/zita-rev1/mainwin.cc +++ /dev/null @@ -1,231 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include "styles.h" -#include "global.h" -#include "mainwin.h" - -namespace REV1 { - - -Mainwin::Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, bool ambisonic, ValueChangedCallback* valuecb) : - A_thread ("Main"), - X_window (parent, xp, yp, XSIZE, YSIZE, XftColors [C_MAIN_BG]->pixel), - _stop (false), - _ambis (ambisonic), - _xres (xres), - _valuecb (valuecb) -{ - X_hints H; - int i, x; - - _atom = XInternAtom (dpy (), "WM_DELETE_WINDOW", True); - XSetWMProtocols (dpy (), win (), &_atom, 1); - _atom = XInternAtom (dpy (), "WM_PROTOCOLS", True); - - H.position (xp, yp); - H.minsize (XSIZE, YSIZE); - H.maxsize (XSIZE, YSIZE); - H.rname (xres->rname ()); - H.rclas (xres->rclas ()); - x_apply (&H); - - RotaryCtl::init (disp ()); - x = 0; - _rotary [R_DELAY] = new Rlinctl (this, this, &r_delay_img, x, 0, 160, 5, 0.02, 0.100, 0.04, R_DELAY); - _rotary [R_XOVER] = new Rlogctl (this, this, &r_xover_img, x, 0, 200, 5, 50.0, 1000.0, 200.0, R_XOVER); - _rotary [R_RTLOW] = new Rlogctl (this, this, &r_rtlow_img, x, 0, 200, 5, 1.0, 8.0, 3.0, R_RTLOW); - _rotary [R_RTMID] = new Rlogctl (this, this, &r_rtmid_img, x, 0, 200, 5, 1.0, 8.0, 2.0, R_RTMID); - _rotary [R_FDAMP] = new Rlogctl (this, this, &r_fdamp_img, x, 0, 200, 5, 1.5e3, 24.0e3, 6.0e3, R_FDAMP); - x += 315; - _rotary [R_EQ1FR] = new Rlogctl (this, this, &r_parfr_img, x, 0, 180, 5, 40.0, 2.5e3, 160.0, R_EQ1FR); - _rotary [R_EQ1GN] = new Rlinctl (this, this, &r_pargn_img, x, 0, 150, 5, -15.0, 15.0, 0.0, R_EQ1GN); - x += 110; - _rotary [R_EQ2FR] = new Rlogctl (this, this, &r_parfr_img, x, 0, 180, 5, 160.0, 10e3, 2.5e3, R_EQ2FR); - _rotary [R_EQ2GN] = new Rlinctl (this, this, &r_pargn_img, x, 0, 150, 5, -15.0, 15.0, 0.0, R_EQ2GN); - x += 110; - _rotary [R_OPMIX] = new Rlinctl (this, this, &r_opmix_img, x, 0, 180, 5, 0.0 , 1.0, 0.5, R_OPMIX); - _rotary [R_RGXYZ] = new Rlinctl (this, this, &r_rgxyz_img, x, 0, 180, 5, -9.0 , 9.0, 0.0, R_RGXYZ); - for (i = 0; i < R_OPMIX; i++) _rotary [i]->x_map (); - if (_ambis) _rotary [R_RGXYZ]->x_map (); - else _rotary [R_OPMIX]->x_map (); - - x_add_events (ExposureMask); - set_time (0); - inc_time (50000); -} - - -Mainwin::~Mainwin (void) -{ - RotaryCtl::fini (); -} - - -int Mainwin::process (void) -{ - int e; - - if (_stop) handle_stop (); - - e = get_event_timed (); - switch (e) - { - case EV_TIME: - handle_time (); - break; - } - return e; -} - - -void Mainwin::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - expose ((XExposeEvent *) E); - break; - - case ClientMessage: - clmesg ((XClientMessageEvent *) E); - break; - } -} - - -void Mainwin::expose (XExposeEvent *E) -{ - if (E->count) return; - redraw (); -} - - -void Mainwin::clmesg (XClientMessageEvent *E) -{ - if (E->message_type == _atom) _stop = true; -} - - -void Mainwin::handle_time (void) -{ - inc_time (5000); - XFlush (dpy ()); -} - - -void Mainwin::handle_stop (void) -{ - put_event (EV_EXIT, 1); -} - - -void Mainwin::handle_callb (int type, X_window *W, XEvent *E) -{ - RotaryCtl *R; - int k; - double v, v2; - - switch (type) - { - case RotaryCtl::PRESS: - R = (RotaryCtl *) W; - k = R->cbind (); - switch (k) - { - default: - ; - } - break; - - case RotaryCtl::DELTA: - R = (RotaryCtl *) W; - k = R->cbind (); - switch (k) - { - case R_DELAY: - v = _rotary [R_DELAY]->value (); - _valuecb->valueChangedCallback (R_DELAY, v); - break; - case R_XOVER: - v = _rotary [R_XOVER]->value (); - _valuecb->valueChangedCallback (R_XOVER, v); - break; - case R_RTLOW: - v = _rotary [R_RTLOW]->value (); - _valuecb->valueChangedCallback (R_RTLOW, v); - break; - case R_RTMID: - v = _rotary [R_RTMID]->value (); - _valuecb->valueChangedCallback (R_RTMID, v); - break; - case R_FDAMP: - v = _rotary [R_FDAMP]->value (); - _valuecb->valueChangedCallback (R_FDAMP, v); - break; - case R_OPMIX: - v = _rotary [R_OPMIX]->value (); - _valuecb->valueChangedCallback (R_OPMIX, v); - break; - case R_RGXYZ: - v = _rotary [R_RGXYZ]->value (); - _valuecb->valueChangedCallback (R_RGXYZ, v); - break; - case R_EQ1FR: - case R_EQ1GN: - v = _rotary [R_EQ1FR]->value (), v2 = _rotary [R_EQ1GN]->value (); - _valuecb->valueChangedCallback (R_EQ1FR, v); - _valuecb->valueChangedCallback (R_EQ1GN, v2); - break; - case R_EQ2FR: - case R_EQ2GN: - v = _rotary [R_EQ2FR]->value (), v2 = _rotary [R_EQ2GN]->value (); - _valuecb->valueChangedCallback (R_EQ2FR, v); - _valuecb->valueChangedCallback (R_EQ2GN, v2); - break; - } - break; - } -} - - -void Mainwin::redraw (void) -{ - int x; - - x = 0; - XPutImage (dpy (), win (), dgc (), revsect_img, 0, 0, x, 0, 310, 75); - x += 315; - XPutImage (dpy (), win (), dgc (), eq1sect_img, 0, 0, x, 0, 110, 75); - x += 110; - XPutImage (dpy (), win (), dgc (), eq2sect_img, 0, 0, x, 0, 110, 75); - x += 110; - if (_ambis) XPutImage (dpy (), win (), dgc (), ambsect_img, 0, 0, x, 0, 70, 75); - else XPutImage (dpy (), win (), dgc (), mixsect_img, 0, 0, x, 0, 70, 75); - x += 70; -} - - -} diff --git a/source/native-plugins/zita-rev1/mainwin.h b/source/native-plugins/zita-rev1/mainwin.h deleted file mode 100644 index 19470a9fa..000000000 --- a/source/native-plugins/zita-rev1/mainwin.h +++ /dev/null @@ -1,87 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __MAINWIN_H -#define __MAINWIN_H - - -#include -#include "guiclass.h" -#include "jclient.h" -#include "global.h" - -class ZitaPipeClient; - -namespace REV1 { - - -class Mainwin : public A_thread, public X_window, public X_callback -{ -public: - - struct ValueChangedCallback { - virtual ~ValueChangedCallback() {} - virtual void valueChangedCallback(uint, double) = 0; - }; - - - enum { XSIZE = 620, YSIZE = 75 }; - - Mainwin (X_rootwin *parent, X_resman *xres, int xp, int yp, bool ambisonic, ValueChangedCallback* valuecb); - ~Mainwin (void); - Mainwin (const Mainwin&); - Mainwin& operator=(const Mainwin&); - - void stop (void) { _stop = true; } - int process (void); - -private: - - enum { R_DELAY, R_XOVER, R_RTLOW, R_RTMID, R_FDAMP, - R_EQ1FR, R_EQ1GN, R_EQ2FR, R_EQ2GN, - R_OPMIX, R_RGXYZ, NROTARY }; - - virtual void thr_main (void) {} - - void handle_time (void); - void handle_stop (void); - void handle_event (XEvent *); - void handle_callb (int type, X_window *W, XEvent *E); - void expose (XExposeEvent *E); - void clmesg (XClientMessageEvent *E); - void redraw (void); - - Atom _atom; - bool _stop; - bool _ambis; - X_resman *_xres; - RotaryCtl *_rotary [NROTARY]; - - ValueChangedCallback* _valuecb; - - friend class ::ZitaPipeClient; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-rev1/pareq.cc b/source/native-plugins/zita-rev1/pareq.cc deleted file mode 100644 index ed5c6301a..000000000 --- a/source/native-plugins/zita-rev1/pareq.cc +++ /dev/null @@ -1,200 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include "pareq.h" - -namespace REV1 { - - -Pareq::Pareq (void) : - _touch0 (0), - _touch1 (0), - _state (BYPASS), - _g0 (1), - _g1 (1), - _f0 (1e3f), - _f1 (1e3f) -{ - setfsamp (0.0f); -} - - -Pareq::~Pareq (void) -{ -} - - -void Pareq::setfsamp (float fsamp) -{ - _fsamp = fsamp; - reset (); -} - - -void Pareq::reset (void) -{ - memset (_z1, 0, sizeof (float) * MAXCH); - memset (_z2, 0, sizeof (float) * MAXCH); -} - - -void Pareq::prepare (int nsamp) -{ - bool upd = false; - float g, f; - - if (_touch1 != _touch0) - { - g = _g0; - f = _f0; - if (g != _g1) - { - upd = true; - if (g > 2 * _g1) _g1 *= 2; - else if (_g1 > 2 * g) _g1 /= 2; - else _g1 = g; - } - if (f != _f1) - { - upd = true; - if (f > 2 * _f1) _f1 *= 2; - else if (_f1 > 2 * f) _f1 /= 2; - else _f1 = f; - } - if (upd) - { - if ((_state == BYPASS) && (_g1 == 1)) - { - calcpar1 (0, _g1, _f1); - } - else - { - _state = SMOOTH; - calcpar1 (nsamp, _g1, _f1); - } - } - else - { - _touch1 = _touch0; - if (fabs (_g1 - 1) < 0.001f) - { - _state = BYPASS; - reset (); - } - else - { - _state = STATIC; - } - } - } -} - - -void Pareq::calcpar1 (int nsamp, float g, float f) -{ - float b, c1, c2, gg; - - f *= float (M_PI) / _fsamp; - b = 2 * f / sqrtf (g); - gg = 0.5f * (g - 1); - c1 = -cosf (2 * f); - c2 = (1 - b) / (1 + b); - if (nsamp) - { - _dc1 = (c1 - _c1) / nsamp + 1e-30f; - _dc2 = (c2 - _c2) / nsamp + 1e-30f; - _dgg = (gg - _gg) / nsamp + 1e-30f; - } - else - { - _c1 = c1; - _c2 = c2; - _gg = gg; - } -} - - -void Pareq::process1 (int nsamp, int nchan, float *data[]) -{ - int i, j; - float c1, c2, gg; - float x, y, z1, z2; - float *p; - - c1 = _c1; - c2 = _c2; - gg = _gg; - if (_state == SMOOTH) - { - for (i = 0; i < nchan; i++) - { - p = data [i]; - z1 = _z1 [i]; - z2 = _z2 [i]; - c1 = _c1; - c2 = _c2; - gg = _gg; - for (j = 0; j < nsamp; j++) - { - c1 += _dc1; - c2 += _dc2; - gg += _dgg; - x = *p; - y = x - c2 * z2; - *p++ = x - gg * (z2 + c2 * y - x); - y -= c1 * z1; - z2 = z1 + c1 * y; - z1 = y + 1e-20f; - } - _z1 [i] = z1; - _z2 [i] = z2; - } - _c1 = c1; - _c2 = c2; - _gg = gg; - } - else - { - for (i = 0; i < nchan; i++) - { - p = data [i]; - z1 = _z1 [i]; - z2 = _z2 [i]; - for (j = 0; j < nsamp; j++) - { - x = *p; - y = x - c2 * z2; - *p++ = x - gg * (z2 + c2 * y - x); - y -= c1 * z1; - z2 = z1 + c1 * y; - z1 = y + 1e-20f; - } - _z1 [i] = z1; - _z2 [i] = z2; - } - } -} - - -} diff --git a/source/native-plugins/zita-rev1/pareq.h b/source/native-plugins/zita-rev1/pareq.h deleted file mode 100644 index 69705fba7..000000000 --- a/source/native-plugins/zita-rev1/pareq.h +++ /dev/null @@ -1,81 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __PAREQ_H -#define __PAREQ_H - - -#include -#include -#include "global.h" - -namespace REV1 { - - -class Pareq -{ -public: - - Pareq (void); - ~Pareq (void); - - void setfsamp (float fsamp); - void setparam (float f, float g) - { - _f0 = f; - _g0 = powf (10.0f, 0.05f * g); - _touch0++; - } - void reset (void); - void prepare (int nsamp); - void process (int nsamp, int nchan, float *data[]) - { - if (_state != BYPASS) process1 (nsamp, nchan, data); - } - -private: - - enum { BYPASS, STATIC, SMOOTH, MAXCH = 4 }; - - void calcpar1 (int nsamp, float g, float f); - void process1 (int nsamp, int nchan, float *data[]); - - volatile int16_t _touch0; - volatile int16_t _touch1; - bool _bypass; - int _state; - float _fsamp; - - float _g0, _g1; - float _f0, _f1; - float _c1, _dc1; - float _c2, _dc2; - float _gg, _dgg; - - float _z1 [MAXCH]; - float _z2 [MAXCH]; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-rev1/png2img.cc b/source/native-plugins/zita-rev1/png2img.cc deleted file mode 100644 index 3ab424c7f..000000000 --- a/source/native-plugins/zita-rev1/png2img.cc +++ /dev/null @@ -1,136 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2007-2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include - -namespace REV1 { - - -XImage *png2img (const char *file, X_display *disp, XftColor *bgnd) -{ - FILE *F; - png_byte hdr [8]; - png_structp png_ptr; - png_infop png_info; - const unsigned char **data, *p; - int dx, dy, x, y, dp; - float vr, vg, vb, va, br, bg, bb; - unsigned long mr, mg, mb, pix; - XImage *image; - - F = fopen (file, "r"); - if (!F) - { - fprintf (stderr, "Can't open '%s'\n", file); - return 0; - } - fread (hdr, 1, 8, F); - if (png_sig_cmp (hdr, 0, 8)) - { - fprintf (stderr, "'%s' is not a PNG file\n", file); - return 0; - } - fseek (F, 0, SEEK_SET); - - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); - if (! png_ptr) - { - fclose (F); - return 0; - } - png_info = png_create_info_struct (png_ptr); - if (! png_info) - { - png_destroy_read_struct (&png_ptr, 0, 0); - fclose (F); - return 0; - } - if (setjmp (png_jmpbuf (png_ptr))) - { - png_destroy_read_struct (&png_ptr, &png_info, 0); - fclose (F); - fprintf (stderr, "png:longjmp()\n"); - return 0; - } - - png_init_io (png_ptr, F); - png_read_png (png_ptr, png_info, - PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, - 0); - -// This requires libpng14 or later. If you still have an -// older version, use the three commented lines instead. - - dx = png_get_image_width (png_ptr, png_info); - dy = png_get_image_height (png_ptr, png_info); - dp = (png_get_color_type (png_ptr, png_info) & PNG_COLOR_MASK_ALPHA) ? 4 : 3; - -// dx = png_info->width; -// dy = png_info->height; -// dp = (png_info->color_type & PNG_COLOR_MASK_ALPHA) ? 4 : 3; - - data = (const unsigned char **)(png_get_rows (png_ptr, png_info)); - - image = XCreateImage (disp->dpy (), - disp->dvi (), - DefaultDepth (disp->dpy (), disp->dsn ()), - ZPixmap, 0, 0, dx, dy, 32, 0); - image->data = new char [image->height * image->bytes_per_line]; - - mr = image->red_mask; - mg = image->green_mask; - mb = image->blue_mask; - - vr = mr / 255.0f; - vg = mg / 255.0f; - vb = mb / 255.0f; - if (bgnd) - { - br = bgnd->color.red >> 8; - bg = bgnd->color.green >> 8; - bb = bgnd->color.blue >> 8; - } - else br = bg = bb = 0; - - for (y = 0; y < dy; y++) - { - p = data [y]; - for (x = 0; x < dx; x++) - { - va = (dp == 4) ? (p [3] / 255.0f) : 1; - pix = ((unsigned long)((p [0] * va + (1 - va) * br) * vr) & mr) - | ((unsigned long)((p [1] * va + (1 - va) * bg) * vg) & mg) - | ((unsigned long)((p [2] * va + (1 - va) * bb) * vb) & mb); - XPutPixel (image, x, y, pix); - p += dp; - } - } - - png_destroy_read_struct (&png_ptr, &png_info, 0); - fclose (F); - - return image; -} - - -} diff --git a/source/native-plugins/zita-rev1/png2img.h b/source/native-plugins/zita-rev1/png2img.h deleted file mode 100644 index 1ff3db513..000000000 --- a/source/native-plugins/zita-rev1/png2img.h +++ /dev/null @@ -1,35 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2007-2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __PNG2IMG_H -#define __PNG2IMG_H - - -#include - -namespace REV1 { - -extern XImage *png2img (const char *file, X_display *disp, XftColor *bgnd); - -} - -#endif diff --git a/source/native-plugins/zita-rev1/reverb.cc b/source/native-plugins/zita-rev1/reverb.cc deleted file mode 100644 index 9c651ba67..000000000 --- a/source/native-plugins/zita-rev1/reverb.cc +++ /dev/null @@ -1,380 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (C) 2003-2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ----------------------------------------------------------------------- - - -#include -#include -#include -#include "reverb.h" - -namespace REV1 { - - -// ----------------------------------------------------------------------- - - -Diff1::Diff1 (void) : - _size (0), - _line (0) -{ -} - - -Diff1::~Diff1 (void) -{ - fini (); -} - - -void Diff1::init (int size, float c) -{ - _size = size; - _line = new float [size]; - memset (_line, 0, size * sizeof (float)); - _i = 0; - _c = c; -} - - -void Diff1::fini (void) -{ - delete[] _line; - _size = 0; - _line = 0; -} - - -// ----------------------------------------------------------------------- - - -Delay::Delay (void) : - _size (0), - _line (0) -{ -} - - -Delay::~Delay (void) -{ - fini (); -} - - -void Delay::init (int size) -{ - _size = size; - _line = new float [size]; - memset (_line, 0, size * sizeof (float)); - _i = 0; -} - - -void Delay::fini (void) -{ - delete[] _line; - _size = 0; - _line = 0; -} - - -// ----------------------------------------------------------------------- - - -Vdelay::Vdelay (void) : - _size (0), - _line (0) -{ -} - - -Vdelay::~Vdelay (void) -{ - fini (); -} - - -void Vdelay::init (int size) -{ - _size = size; - _line = new float [size]; - memset (_line, 0, size * sizeof (float)); - _ir = 0; - _iw = 0; -} - - -void Vdelay::fini (void) -{ - delete[] _line; - _size = 0; - _line = 0; -} - - -void Vdelay::set_delay (int del) -{ - _ir = _iw - del; - if (_ir < 0) _ir += _size; -} - - -// ----------------------------------------------------------------------- - - -void Filt1::set_params (float del, float tmf, float tlo, float wlo, float thi, float chi) -{ - float g, t; - - _gmf = powf (0.001f, del / tmf); - _glo = powf (0.001f, del / tlo) / _gmf - 1.0f; - _wlo = wlo; - g = powf (0.001f, del / thi) / _gmf; - t = (1 - g * g) / (2 * g * g * chi); - _whi = (sqrtf (1 + 4 * t) - 1) / (2 * t); -} - - -// ----------------------------------------------------------------------- - - -float Reverb::_tdiff1 [8] = -{ - 20346e-6f, - 24421e-6f, - 31604e-6f, - 27333e-6f, - 22904e-6f, - 29291e-6f, - 13458e-6f, - 19123e-6f -}; - - -float Reverb::_tdelay [8] = -{ - 153129e-6f, - 210389e-6f, - 127837e-6f, - 256891e-6f, - 174713e-6f, - 192303e-6f, - 125000e-6f, - 219991e-6f -}; - - -Reverb::Reverb (void) -{ -} - - -Reverb::~Reverb (void) -{ - fini (); -} - - -void Reverb::init (float fsamp, bool ambis) -{ - int i, k1, k2; - - _fsamp = fsamp; - _ambis = ambis; - _cntA1 = 1; - _cntA2 = 0; - _cntB1 = 1; - _cntB2 = 0; - _cntC1 = 1; - _cntC2 = 0; - - _ipdel = 0.04f; - _xover = 200.0f; - _rtlow = 3.0f; - _rtmid = 2.0f; - _fdamp = 3e3f; - _opmix = 0.5f; - _rgxyz = 0.0f; - - _g0 = _d0 = 0; - _g1 = _d1 = 0; - - _vdelay0.init ((int)(0.1f * _fsamp)); - _vdelay1.init ((int)(0.1f * _fsamp)); - for (i = 0; i < 8; i++) - { - k1 = (int)(floorf (_tdiff1 [i] * _fsamp + 0.5f)); - k2 = (int)(floorf (_tdelay [i] * _fsamp + 0.5f)); - _diff1 [i].init (k1, (i & 1) ? -0.6f : 0.6f); - _delay [i].init (k2 - k1); - } - - _pareq1.setfsamp (fsamp); - _pareq2.setfsamp (fsamp); -} - - -void Reverb::fini (void) -{ - for (int i = 0; i < 8; i++) _delay [i].fini (); -} - - -void Reverb::prepare (int nfram) -{ - int a, b, c, i, k; - float t0, t1, wlo, chi; - - a = _cntA1; - b = _cntB1; - c = _cntC1; - _d0 = _d1 = 0; - - if (a != _cntA2) - { - k = (int)(floorf ((_ipdel - 0.020f) * _fsamp + 0.5f)); - _vdelay0.set_delay (k); - _vdelay1.set_delay (k); - _cntA2 = a; - } - - if (b != _cntB2) - { - wlo = 6.2832f * _xover / _fsamp; - if (_fdamp > 0.49f * _fsamp) chi = 2; - else chi = 1 - cosf (6.2832f * _fdamp / _fsamp); - for (i = 0; i < 8; i++) - { - _filt1 [i].set_params (_tdelay [i], _rtmid, _rtlow, wlo, 0.5f * _rtmid, chi); - } - _cntB2 = b; - } - - if (c != _cntC2) - { - if (_ambis) - { - t0 = 1.0f / sqrtf (_rtmid); - t1 = t0 * powf (10.0f, 0.05f * _rgxyz); - } - else - { - t0 = (1 - _opmix) * (1 + _opmix); - t1 = 0.7f * _opmix * (2 - _opmix) / sqrtf (_rtmid); - } - _d0 = (t0 - _g0) / nfram; - _d1 = (t1 - _g1) / nfram; - _cntC2 = c; - } - - _pareq1.prepare (nfram); - _pareq2.prepare (nfram); -} - - -void Reverb::process (int nfram, float *inp [], float *out []) -{ - int i, n; - float *p0, *p1; - float *q0, *q1, *q2, *q3; - float t, g, x0, x1, x2, x3, x4, x5, x6, x7; - - g = sqrtf (0.125f); - - p0 = inp [0]; - p1 = inp [1]; - q0 = out [0]; - q1 = out [1]; - q2 = out [2]; - q3 = out [3]; - - for (i = 0; i < nfram; i++) - { - _vdelay0.write (p0 [i]); - _vdelay1.write (p1 [i]); - - t = 0.3f * _vdelay0.read (); - x0 = _diff1 [0].process (_delay [0].read () + t); - x1 = _diff1 [1].process (_delay [1].read () + t); - x2 = _diff1 [2].process (_delay [2].read () - t); - x3 = _diff1 [3].process (_delay [3].read () - t); - t = 0.3f * _vdelay1.read (); - x4 = _diff1 [4].process (_delay [4].read () + t); - x5 = _diff1 [5].process (_delay [5].read () + t); - x6 = _diff1 [6].process (_delay [6].read () - t); - x7 = _diff1 [7].process (_delay [7].read () - t); - - t = x0 - x1; x0 += x1; x1 = t; - t = x2 - x3; x2 += x3; x3 = t; - t = x4 - x5; x4 += x5; x5 = t; - t = x6 - x7; x6 += x7; x7 = t; - t = x0 - x2; x0 += x2; x2 = t; - t = x1 - x3; x1 += x3; x3 = t; - t = x4 - x6; x4 += x6; x6 = t; - t = x5 - x7; x5 += x7; x7 = t; - t = x0 - x4; x0 += x4; x4 = t; - t = x1 - x5; x1 += x5; x5 = t; - t = x2 - x6; x2 += x6; x6 = t; - t = x3 - x7; x3 += x7; x7 = t; - - if (_ambis) - { - _g0 += _d0; - _g1 += _d1; - q0 [i] = _g0 * x0; - q1 [i] = _g1 * x1; - q2 [i] = _g1 * x4; - q3 [i] = _g1 * x2; - } - else - { - _g1 += _d1; - q0 [i] = _g1 * (x1 + x2); - q1 [i] = _g1 * (x1 - x2); - } - - _delay [0].write (_filt1 [0].process (g * x0)); - _delay [1].write (_filt1 [1].process (g * x1)); - _delay [2].write (_filt1 [2].process (g * x2)); - _delay [3].write (_filt1 [3].process (g * x3)); - _delay [4].write (_filt1 [4].process (g * x4)); - _delay [5].write (_filt1 [5].process (g * x5)); - _delay [6].write (_filt1 [6].process (g * x6)); - _delay [7].write (_filt1 [7].process (g * x7)); - } - - n = _ambis ? 4 : 2; - _pareq1.process (nfram, n, out); - _pareq2.process (nfram, n, out); - if (!_ambis) - { - for (i = 0; i < nfram; i++) - { - _g0 += _d0; - q0 [i] += _g0 * p0 [i]; - q1 [i] += _g0 * p1 [i]; - } - } -} - - -// ----------------------------------------------------------------------- - -} diff --git a/source/native-plugins/zita-rev1/reverb.h b/source/native-plugins/zita-rev1/reverb.h deleted file mode 100644 index 68d1584c5..000000000 --- a/source/native-plugins/zita-rev1/reverb.h +++ /dev/null @@ -1,228 +0,0 @@ -// ----------------------------------------------------------------------- -// -// Copyright (C) 2003-2011 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ----------------------------------------------------------------------- - - -#ifndef __REVERB_H -#define __REVERB_H - -#include "pareq.h" - -namespace REV1 { - - -// ----------------------------------------------------------------------- - - -class Diff1 -{ -private: - - friend class Reverb; - - Diff1 (void); - ~Diff1 (void); - - void init (int size, float c); - void fini (void); - - float process (float x) - { - float z = _line [_i]; - x -= _c * z; - _line [_i] = x; - if (++_i == _size) _i = 0; - return z + _c * x; - } - - int _i; - float _c; - int _size; - float *_line; -}; - - -// ----------------------------------------------------------------------- - - -class Filt1 -{ -private: - - friend class Reverb; - - Filt1 (void) : _slo (0), _shi (0) {} - ~Filt1 (void) {} - - void set_params (float del, float tmf, float tlo, float wlo, float thi, float chi); - - float process (float x) - { - _slo += _wlo * (x - _slo) + 1e-10f; - x += _glo * _slo; - _shi += _whi * (x - _shi); - return _gmf * _shi; - } - float _gmf; - float _glo; - float _wlo; - float _whi; - float _slo; - float _shi; -}; - - -// ----------------------------------------------------------------------- - - -class Delay -{ -private: - - friend class Reverb; - - Delay (void); - ~Delay (void); - - void init (int size); - void fini (void); - - float read (void) - { - return _line [_i]; - } - - void write (float x) - { - _line [_i++] = x; - if (_i == _size) _i = 0; - } - - int _i; - int _size; - float *_line; -}; - - -// ----------------------------------------------------------------------- - - -class Vdelay -{ -private: - - friend class Reverb; - - Vdelay (void); - ~Vdelay (void); - - void init (int size); - void fini (void); - void set_delay (int del); - - float read (void) - { - float x = _line [_ir++]; - if (_ir == _size) _ir = 0; - return x; - } - - void write (float x) - { - _line [_iw++] = x; - if (_iw == _size) _iw = 0; - } - - int _ir; - int _iw; - int _size; - float *_line; -}; - - -// ----------------------------------------------------------------------- - - -class Reverb -{ -public: - - Reverb (void); - ~Reverb (void); - - void init (float fsamp, bool ambis); - void fini (void); - - void prepare (int n); - void process (int n, float *inp [], float *out []); - - void set_delay (float v) { _ipdel = v; _cntA1++; } - void set_xover (float v) { _xover = v; _cntB1++; } - void set_rtlow (float v) { _rtlow = v; _cntB1++; } - void set_rtmid (float v) { _rtmid = v; _cntB1++; _cntC1++; } - void set_fdamp (float v) { _fdamp = v; _cntB1++; } - void set_opmix (float v) { _opmix = v; _cntC1++; } - void set_rgxyz (float v) { _rgxyz = v; _cntC1++; } - void set_eq1 (float f, float g) { _pareq1.setparam (f, g); } - void set_eq2 (float f, float g) { _pareq2.setparam (f, g); } - -private: - - - float _fsamp; - bool _ambis; - - Vdelay _vdelay0; - Vdelay _vdelay1; - Diff1 _diff1 [8]; - Filt1 _filt1 [8]; - Delay _delay [8]; - - volatile int _cntA1; - volatile int _cntB1; - volatile int _cntC1; - int _cntA2; - int _cntB2; - int _cntC2; - - float _ipdel; - float _xover; - float _rtlow; - float _rtmid; - float _fdamp; - float _opmix; - float _rgxyz; - - float _g0, _d0; - float _g1, _d1; - - Pareq _pareq1; - Pareq _pareq2; - - static float _tdiff1 [8]; - static float _tdelay [8]; -}; - - -// ----------------------------------------------------------------------- - -} - -#endif diff --git a/source/native-plugins/zita-rev1/rotary.cc b/source/native-plugins/zita-rev1/rotary.cc deleted file mode 100644 index c3c58c9f0..000000000 --- a/source/native-plugins/zita-rev1/rotary.cc +++ /dev/null @@ -1,207 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include -#include -#include -#include "rotary.h" - -namespace REV1 { - - -cairo_t *RotaryCtl::_cairotype = 0; -cairo_surface_t *RotaryCtl::_cairosurf = 0; - -int RotaryCtl::_wb_up = 4; -int RotaryCtl::_wb_dn = 5; -int RotaryCtl::_keymod = 0; -int RotaryCtl::_button = 0; -int RotaryCtl::_rcount = 0; -int RotaryCtl::_rx = 0; -int RotaryCtl::_ry = 0; - - -RotaryCtl::RotaryCtl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, - int yp, - int cbind) : - - X_window (parent, - image->_x0 + xp, image->_y0 + yp, - image->_dx, image->_dy, - image->_backg->pixel), - _cbobj (cbobj), - _cbind (cbind), - _image (image), - _state (0), - _count (0), - _value (0), - _angle (0) -{ - x_add_events ( ExposureMask - | Button1MotionMask | ButtonPressMask | ButtonReleaseMask); -} - - -RotaryCtl::~RotaryCtl (void) -{ -} - - -void RotaryCtl::init (X_display *disp) -{ - _cairosurf = cairo_xlib_surface_create (disp->dpy (), 0, disp->dvi (), 50, 50); - _cairotype = cairo_create (_cairosurf); -} - - -void RotaryCtl::fini (void) -{ - cairo_destroy (_cairotype); - cairo_surface_destroy (_cairosurf); -} - - -void RotaryCtl::handle_event (XEvent *E) -{ - switch (E->type) - { - case Expose: - render (); - break; - - case ButtonPress: - bpress ((XButtonEvent *) E); - break; - - case ButtonRelease: - brelse ((XButtonEvent *) E); - break; - - case MotionNotify: - motion ((XMotionEvent *) E); - break; - - default: - fprintf (stderr, "RotaryCtl: event %d\n", E->type ); - } -} - - -void RotaryCtl::bpress (XButtonEvent *E) -{ - int r = 0; - double d; - - d = hypot (E->x - _image->_xref, E->y - _image->_yref); - if (d > _image->_rad + 3) return; - _keymod = E->state; - if (E->button < 4) - { - _rx = E->x; - _ry = E->y; - _button = E->button; - r = handle_button (); - _rcount = _count; - } - else if (_button) return; - else if ((int)E->button == _wb_up) - { - r = handle_mwheel (1); - } - else if ((int)E->button == _wb_dn) - { - r = handle_mwheel (-1); - } - if (r) - { - callback (r); - render (); - } -} - - -void RotaryCtl::brelse (XButtonEvent *E) -{ - if (_button == (int)E->button) - { - _button = 0; - callback (RELSE); - } -} - - -void RotaryCtl::motion (XMotionEvent *E) -{ - int dx, dy, r; - - if (_button) - { - _keymod = E->state; - dx = E->x - _rx; - dy = E->y - _ry; - r = handle_motion (dx, dy); - if (r) - { - callback (r); - render (); - } - } -} - - -void RotaryCtl::set_state (int s) -{ - _state = s; - render (); -} - - -void RotaryCtl::render (void) -{ - XImage *I; - double a, c, r, x, y; - - I = _image->_image [_state]; - XPutImage (dpy (), win (), dgc (), I, - _image->_x0, _image->_y0, 0, 0, _image->_dx, _image->_dy); - cairo_xlib_surface_set_drawable (_cairosurf, win(), - _image->_dx, _image->_dy); - c = _image->_lncol [_state] ? 1.0 : 0.0; - a = _angle * M_PI / 180; - r = _image->_rad; - x = _image->_xref; - y = _image->_yref; - cairo_new_path (_cairotype); - cairo_move_to (_cairotype, x, y); - x += r * sin (a); - y -= r * cos (a); - cairo_line_to (_cairotype, x, y); - cairo_set_source_rgb (_cairotype, c, c, c); - cairo_set_line_width (_cairotype, 1.8); - cairo_stroke (_cairotype); -} - - -} diff --git a/source/native-plugins/zita-rev1/rotary.h b/source/native-plugins/zita-rev1/rotary.h deleted file mode 100644 index 8b8bb9258..000000000 --- a/source/native-plugins/zita-rev1/rotary.h +++ /dev/null @@ -1,118 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __ROTARY_H -#define __ROTARY_H - - -#include -#include -#include - -namespace REV1 { - - -class RotaryImg -{ -public: - - XftColor *_backg; - XImage *_image [4]; - char _lncol [4]; - int _x0; - int _y0; - int _dx; - int _dy; - double _xref; - double _yref; - double _rad; -}; - - - -class RotaryCtl : public X_window -{ -public: - - RotaryCtl (X_window *parent, - X_callback *cbobj, - RotaryImg *image, - int xp, int yp, - int cbind = 0); - - virtual ~RotaryCtl (void); - - enum { NOP = 200, PRESS, RELSE, DELTA }; - - int cbind (void) { return _cbind; } - int state (void) { return _state; } - double value (void) { return _value; } - - virtual void set_state (int s); - virtual void set_value (double v) = 0; - virtual void get_string (char *p, int n) {} - - static void init (X_display *disp); - static void fini (void); - - static int _wb_up; - static int _wb_dn; - -protected: - - X_callback *_cbobj; - int _cbind; - RotaryImg *_image; - int _state; - int _count; - int _range; - double _value; - double _angle; - - void render (void); - void callback (int k) { _cbobj->handle_callb (k, this, 0); } - - static int _keymod; - static int _button; - static int _rcount; - static int _rx; - static int _ry; - -private: - - void handle_event (XEvent *E); - void bpress (XButtonEvent *E); - void brelse (XButtonEvent *E); - void motion (XMotionEvent *E); - - virtual int handle_button (void) = 0; - virtual int handle_motion (int dx, int dy) = 0; - virtual int handle_mwheel (int dw) = 0; - - static cairo_t *_cairotype; - static cairo_surface_t *_cairosurf; -}; - - -} - -#endif diff --git a/source/native-plugins/zita-rev1/styles.cc b/source/native-plugins/zita-rev1/styles.cc deleted file mode 100644 index d19d09300..000000000 --- a/source/native-plugins/zita-rev1/styles.cc +++ /dev/null @@ -1,197 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#include "styles.h" -#include "png2img.h" - -#include "CarlaString.hpp" -#include - -namespace REV1 { - - -XftColor *XftColors [NXFTCOLORS]; - -XImage *revsect_img; -XImage *eq1sect_img; -XImage *eq2sect_img; -XImage *mixsect_img; -XImage *ambsect_img; - -RotaryImg r_delay_img; -RotaryImg r_xover_img; -RotaryImg r_rtlow_img; -RotaryImg r_rtmid_img; -RotaryImg r_fdamp_img; -RotaryImg r_parfr_img; -RotaryImg r_pargn_img; -RotaryImg r_opmix_img; -RotaryImg r_rgxyz_img; - - -static CarlaString getResourceDir() -{ - Dl_info exeInfo; - dladdr((void*)getResourceDir, &exeInfo); - - CarlaString filename(exeInfo.dli_fname); - return filename.truncate(filename.rfind("-ui")); -} - - -void styles_init (X_display *disp, X_resman *xrm) -{ - CarlaString resourceDir(getResourceDir()); - - XftColors [C_MAIN_BG] = disp->alloc_xftcolor (0.25f, 0.25f, 0.25f, 1.0f); - XftColors [C_MAIN_FG] = disp->alloc_xftcolor (1.0f, 1.0f, 1.0f, 1.0f); - - revsect_img = png2img (resourceDir+"/revsect.png", disp, XftColors [C_MAIN_BG]); - eq1sect_img = png2img (resourceDir+"/eq1sect.png", disp, XftColors [C_MAIN_BG]); - eq2sect_img = png2img (resourceDir+"/eq2sect.png", disp, XftColors [C_MAIN_BG]); - mixsect_img = png2img (resourceDir+"/mixsect.png", disp, XftColors [C_MAIN_BG]); - ambsect_img = png2img (resourceDir+"/ambsect.png", disp, XftColors [C_MAIN_BG]); - - if (!revsect_img || !mixsect_img || !ambsect_img - || !eq1sect_img || !eq2sect_img) - { - fprintf (stderr, "Can't load images from '%s'.\n", resourceDir.buffer()); - exit (1); - } - - r_delay_img._backg = XftColors [C_MAIN_BG]; - r_delay_img._image [0] = revsect_img; - r_delay_img._lncol [0] = 0; - r_delay_img._x0 = 30; - r_delay_img._y0 = 32; - r_delay_img._dx = 23; - r_delay_img._dy = 23; - r_delay_img._xref = 11.5; - r_delay_img._yref = 11.5; - r_delay_img._rad = 11; - - r_xover_img._backg = XftColors [C_MAIN_BG]; - r_xover_img._image [0] = revsect_img; - r_xover_img._lncol [0] = 0; - r_xover_img._x0 = 92; - r_xover_img._y0 = 17; - r_xover_img._dx = 23; - r_xover_img._dy = 23; - r_xover_img._xref = 11.5; - r_xover_img._yref = 11.5; - r_xover_img._rad = 11; - - r_rtlow_img._backg = XftColors [C_MAIN_BG]; - r_rtlow_img._image [0] = revsect_img; - r_rtlow_img._lncol [0] = 0; - r_rtlow_img._x0 = 147; - r_rtlow_img._y0 = 17; - r_rtlow_img._dx = 23; - r_rtlow_img._dy = 23; - r_rtlow_img._xref = 11.5; - r_rtlow_img._yref = 11.5; - r_rtlow_img._rad = 11; - - r_rtmid_img._backg = XftColors [C_MAIN_BG]; - r_rtmid_img._image [0] = revsect_img; - r_rtmid_img._lncol [0] = 0; - r_rtmid_img._x0 = 207; - r_rtmid_img._y0 = 17; - r_rtmid_img._dx = 23; - r_rtmid_img._dy = 23; - r_rtmid_img._xref = 11.5; - r_rtmid_img._yref = 11.5; - r_rtmid_img._rad = 11; - - r_fdamp_img._backg = XftColors [C_MAIN_BG]; - r_fdamp_img._image [0] = revsect_img; - r_fdamp_img._lncol [0] = 0; - r_fdamp_img._x0 = 267; - r_fdamp_img._y0 = 17; - r_fdamp_img._dx = 23; - r_fdamp_img._dy = 23; - r_fdamp_img._xref = 11.5; - r_fdamp_img._yref = 11.5; - r_fdamp_img._rad = 11; - - r_parfr_img._backg = XftColors [C_MAIN_BG]; - r_parfr_img._image [0] = eq1sect_img; - r_parfr_img._lncol [0] = 0; - r_parfr_img._x0 = 19; - r_parfr_img._y0 = 32; - r_parfr_img._dx = 23; - r_parfr_img._dy = 23; - r_parfr_img._xref = 11.5; - r_parfr_img._yref = 11.5; - r_parfr_img._rad = 11; - - r_pargn_img._backg = XftColors [C_MAIN_BG]; - r_pargn_img._image [0] = eq1sect_img; - r_pargn_img._lncol [0] = 1; - r_pargn_img._x0 = 68; - r_pargn_img._y0 = 17; - r_pargn_img._dx = 23; - r_pargn_img._dy = 23; - r_pargn_img._xref = 11.5; - r_pargn_img._yref = 11.5; - r_pargn_img._rad = 11; - - r_opmix_img._backg = XftColors [C_MAIN_BG]; - r_opmix_img._image [0] = mixsect_img; - r_opmix_img._lncol [0] = 0; - r_opmix_img._x0 = 23; - r_opmix_img._y0 = 32; - r_opmix_img._dx = 23; - r_opmix_img._dy = 23; - r_opmix_img._xref = 11.5; - r_opmix_img._yref = 11.5; - r_opmix_img._rad = 11; - - r_rgxyz_img._backg = XftColors [C_MAIN_BG]; - r_rgxyz_img._image [0] = ambsect_img; - r_rgxyz_img._lncol [0] = 0; - r_rgxyz_img._x0 = 23; - r_rgxyz_img._y0 = 32; - r_rgxyz_img._dx = 23; - r_rgxyz_img._dy = 23; - r_rgxyz_img._xref = 11.5; - r_rgxyz_img._yref = 11.5; - r_rgxyz_img._rad = 11; -} - - -void styles_fini (X_display *disp) -{ - revsect_img->data = 0; - mixsect_img->data = 0; - ambsect_img->data = 0; - eq1sect_img->data = 0; - eq2sect_img->data = 0; - XDestroyImage (revsect_img); - XDestroyImage (mixsect_img); - XDestroyImage (ambsect_img); - XDestroyImage (eq1sect_img); - XDestroyImage (eq2sect_img); -} - - -} diff --git a/source/native-plugins/zita-rev1/styles.h b/source/native-plugins/zita-rev1/styles.h deleted file mode 100644 index 3b3cfbab0..000000000 --- a/source/native-plugins/zita-rev1/styles.h +++ /dev/null @@ -1,73 +0,0 @@ -// ---------------------------------------------------------------------- -// -// Copyright (C) 2010 Fons Adriaensen -// Modified by falkTX on Jan-Apr 2015 for inclusion in Carla -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// ---------------------------------------------------------------------- - - -#ifndef __STYLES_H -#define __STYLES_H - -#include -#include "rotary.h" - -namespace REV1 { - - -enum -{ - C_MAIN_BG, C_MAIN_FG, -// C_TEXT_BG, C_TEXT_FG, - NXFTCOLORS -}; - -enum -{ -// F_TEXT, F_FILE, - NXFTFONTS -}; - - -extern void styles_init (X_display *disp, X_resman *xrm); -extern void styles_fini (X_display *disp); - -extern XftColor *XftColors [NXFTCOLORS]; -//extern XftFont *XftFonts [NXFTFONTS]; - -extern X_textln_style tstyle1; - -extern XImage *revsect_img; -extern XImage *eq1sect_img; -extern XImage *eq2sect_img; -extern XImage *mixsect_img; -extern XImage *ambsect_img; - -extern RotaryImg r_delay_img; -extern RotaryImg r_xover_img; -extern RotaryImg r_rtlow_img; -extern RotaryImg r_rtmid_img; -extern RotaryImg r_fdamp_img; -extern RotaryImg r_parfr_img; -extern RotaryImg r_pargn_img; -extern RotaryImg r_opmix_img; -extern RotaryImg r_rgxyz_img; - - -} - -#endif