diff --git a/plugins/community/repos/Hora-Examples/Makefile b/plugins/community/repos/Hora-Examples/Makefile new file mode 100644 index 00000000..d72c4700 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/Makefile @@ -0,0 +1,10 @@ +RACK_DIR ?= ../.. + +SLUG = Hora-Examples +VERSION = 0.6 +SOURCES = $(wildcard src/*.cpp) $(wildcard src/*.c) + + +DISTRIBUTABLES += $(wildcard LICENSE*) res +include $(RACK_DIR)/plugin.mk +include $(RACK_DIR)/arch.mk diff --git a/plugins/community/repos/Hora-Examples/make.objects b/plugins/community/repos/Hora-Examples/make.objects new file mode 100644 index 00000000..bb9f750e --- /dev/null +++ b/plugins/community/repos/Hora-Examples/make.objects @@ -0,0 +1,15 @@ +ALL_OBJ= \ + src/ControlledBuffer.o \ + src/CvToFreq.o \ + src/Examples.o \ + src/FreqToRate.o \ + src/LowPassVCF.o \ + src/MMFilter.o \ + src/WaveTableOsc.o \ + src/buf.o \ + src/clockedCounter.o \ + src/floatToString.o \ + src/intToString.o \ + src/miniSeq.o \ + src/stringMux.o \ + src/waveTable.o diff --git a/plugins/community/repos/Hora-Examples/makefile.linux b/plugins/community/repos/Hora-Examples/makefile.linux new file mode 100644 index 00000000..faf35670 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/makefile.linux @@ -0,0 +1,12 @@ +SLUG=Hora-Examples + +include ../../../build_shared_plugin_pre_linux.mk + +include make.objects + +define BIN_POST_FXN + cp -f $(SLUG).so ../../../../vst2_bin/plugins/$(SLUG)/plugin.so.fx + cp -f $(SLUG).so ../../../../vst2_bin/plugins/$(SLUG)/plugin.so.instr +endef + +include ../../../build_shared_plugin_post_linux.mk diff --git a/plugins/community/repos/Hora-Examples/makefile.msvc b/plugins/community/repos/Hora-Examples/makefile.msvc new file mode 100644 index 00000000..9414c783 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/makefile.msvc @@ -0,0 +1,12 @@ +SLUG=Hora-Examples + +include ../../../build_shared_plugin_pre_msvc.mk + +include make.objects + +define BIN_POST_FXN + cp -f $(SLUG).dll ../../../../vst2_bin/plugins/$(SLUG)/plugin.dll.fx + cp -f $(SLUG).dll ../../../../vst2_bin/plugins/$(SLUG)/plugin.dll.instr +endef + +include ../../../build_shared_plugin_post_msvc.mk diff --git a/plugins/community/repos/Hora-Examples/readme.txt b/plugins/community/repos/Hora-Examples/readme.txt new file mode 100644 index 00000000..32f0bea5 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/readme.txt @@ -0,0 +1,7 @@ + +see http://www.hora-music.be/free-modules.php + +"Here is a first plugin made with geco (V0.6.2) All the files and code are as they were exported. No files has been manually transfered and no code has been been manually modified. + +This is open source and host on the Hora Music Github repository. The plugin offers a wave table VCO a signal recorder, a 4 steps sequencer and a low pass filter." + diff --git a/plugins/community/repos/Hora-Examples/res/LEDCounter7.ttf b/plugins/community/repos/Hora-Examples/res/LEDCounter7.ttf new file mode 100644 index 00000000..9113acd1 Binary files /dev/null and b/plugins/community/repos/Hora-Examples/res/LEDCounter7.ttf differ diff --git a/plugins/community/repos/Hora-Examples/res/LPVCF.svg b/plugins/community/repos/Hora-Examples/res/LPVCF.svg new file mode 100644 index 00000000..5423b559 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/LPVCF.svg @@ -0,0 +1,1625 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/button.svg b/plugins/community/repos/Hora-Examples/res/button.svg new file mode 100644 index 00000000..b7d14f6a --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/button.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/buttonPushed.svg b/plugins/community/repos/Hora-Examples/res/buttonPushed.svg new file mode 100644 index 00000000..b7d14f6a --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/buttonPushed.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/jack.svg b/plugins/community/repos/Hora-Examples/res/jack.svg new file mode 100644 index 00000000..b1e569b2 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/jack.svg @@ -0,0 +1,1156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/mediumKnob.svg b/plugins/community/repos/Hora-Examples/res/mediumKnob.svg new file mode 100644 index 00000000..d64af4e4 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/mediumKnob.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/mediumRotary.svg b/plugins/community/repos/Hora-Examples/res/mediumRotary.svg new file mode 100644 index 00000000..ff0056d0 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/mediumRotary.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/mediumRotaryShadow.svg b/plugins/community/repos/Hora-Examples/res/mediumRotaryShadow.svg new file mode 100644 index 00000000..474fba9a --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/mediumRotaryShadow.svg @@ -0,0 +1,518 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/mediumknobShadow.svg b/plugins/community/repos/Hora-Examples/res/mediumknobShadow.svg new file mode 100644 index 00000000..474fba9a --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/mediumknobShadow.svg @@ -0,0 +1,518 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/recorder.svg b/plugins/community/repos/Hora-Examples/res/recorder.svg new file mode 100644 index 00000000..5edbfd9a --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/recorder.svg @@ -0,0 +1,1625 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/saw1024.gwt b/plugins/community/repos/Hora-Examples/res/saw1024.gwt new file mode 100644 index 00000000..5c0db690 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/saw1024.gwt @@ -0,0 +1,52 @@ +0,255,510,764,1016,1268,1518,1768,2016,2264,2511,2756,3001,3245,3488,3730,3971,4211,4450,4688, +4925,5161,5397,5631,5865,6097,6329,6560,6790,7019,7247,7474,7701,7926,8151,8374,8597,8819,9040,9261, +9480,9698,9916,10133,10349,10564,10778,10992,11205,11416,11627,11838,12047,12255,12463,12670,12876,13081,13286,13490, +13693,13895,14096,14297,14496,14695,14893,15091,15288,15483,15679,15873,16067,16259,16452,16643,16834,17023,17213,17401, +17589,17775,17962,18147,18332,18516,18699,18882,19064,19245,19425,19605,19784,19963,20140,20317,20493,20669,20844,21018, +21192,21365,21537,21708,21879,22049,22219,22388,22556,22724,22891,23057,23222,23387,23552,23715,23878,24041,24203,24364, +24524,24684,24843,25002,25160,25317,25474,25630,25786,25941,26095,26249,26402,26555,26707,26858,27009,27159,27309,27458, +27606,27754,27901,28048,28194,28340,28485,28629,28773,28917,29059,29201,29343,29484,29625,29765,29904,30043,30182,30319, +30457,30593,30730,30865,31000,31135,31269,31403,31536,31668,31800,31932,32063,32193,32323,32453,32582,32710,32838,32966, +33093,33219,33345,33471,33596,33720,33844,33968,34091,34214,34336,34457,34578,34699,34819,34939,35058,35177,35296,35413, +35531,35648,35764,35880,35996,36111,36226,36340,36454,36567,36680,36793,36905,37016,37128,37238,37349,37459,37568,37677, +37786,37894,38002,38109,38216,38322,38429,38534,38639,38744,38849,38953,39056,39160,39263,39365,39467,39569,39670,39771, +39871,39971,40071,40170,40269,40368,40466,40563,40661,40758,40854,40951,41046,41142,41237,41332,41426,41520,41614,41707, +41800,41892,41985,42076,42168,42259,42350,42440,42530,42620,42709,42798,42887,42975,43063,43151,43238,43325,43411,43498, +43584,43669,43754,43839,43924,44008,44092,44176,44259,44342,44424,44507,44589,44670,44752,44833,44913,44994,45074,45154, +45233,45312,45391,45470,45548,45626,45703,45781,45858,45935,46011,46087,46163,46238,46314,46389,46463,46538,46612,46685, +46759,46832,46905,46978,47050,47122,47194,47265,47337,47408,47478,47549,47619,47689,47758,47827,47896,47965,48034,48102, +48170,48238,48305,48372,48439,48506,48572,48638,48704,48770,48835,48900,48965,49030,49094,49158,49222,49286,49349,49412, +49475,49538,49600,49662,49724,49786,49847,49908,49969,50030,50090,50150,50210,50270,50330,50389,50448,50507,50565,50624, +50682,50740,50797,50855,50912,50969,51026,51083,51139,51195,51251,51307,51362,51417,51472,51527,51582,51636,51690,51744, +51798,51852,51905,51958,52011,52064,52116,52169,52221,52273,52324,52376,52427,52478,52529,52580,52630,52681,52731,52781, +52830,52880,52929,52978,53027,53076,53125,53173,53221,53269,53317,53365,53412,53460,53507,53553,53600,53647,53693,53739, +53785,53831,53877,53922,53967,54012,54057,54102,54147,54191,54235,54279,54323,54367,54411,54454,54497,54540,54583,54626, +54668,54711,54753,54795,54837,54878,54920,54961,55003,55044,55085,55125,55166,55206,55247,55287,55327,55366,55406,55446, +55485,55524,55563,55602,55641,55679,55718,55756,55794,55832,55870,55908,55945,55982,56020,56057,56094,56131,56167,56204, +56240,56276,56312,56348,56384,56420,56455,56491,56526,56561,56596,56631,56666,56700,56735,56769,56803,56837,56871,56905, +56939,56972,57006,57039,57072,57105,57138,57171,57203,57236,57268,57300,57332,57364,57396,57428,57460,57491,57522,57554, +57585,57616,57647,57677,57708,57738,57769,57799,57829,57859,57889,57919,57949,57978,58008,58037,58066,58096,58125,58153, +58182,58211,58239,58268,58296,58324,58353,58381,58408,58436,58464,58491,58519,58546,58573,58601,58628,58655,58681,58708, +58735,58761,58788,58814,58840,58866,58892,58918,58944,58970,58995,59021,59046,59071,59097,59122,59147,59172,59196,59221, +59246,59270,59295,59319,59343,59367,59391,59415,59439,59463,59487,59510,59534,59557,59581,59604,59627,59650,59673,59696, +59718,59741,59764,59786,59809,59831,59853,59875,59897,59919,59941,59963,59985,60006,60028,60049,60071,60092,60113,60135, +60156,60177,60197,60218,60239,60260,60280,60301,60321,60341,60362,60382,60402,60422,60442,60462,60481,60501,60521,60540, +60560,60579,60599,60618,60637,60656,60675,60694,60713,60732,60750,60769,60788,60806,60825,60843,60861,60879,60898,60916, +60934,60952,60970,60987,61005,61023,61040,61058,61075,61093,61110,61127,61144,61162,61179,61196,61212,61229,61246,61263, +61280,61296,61313,61329,61345,61362,61378,61394,61410,61427,61443,61458,61474,61490,61506,61522,61537,61553,61568,61584, +61599,61615,61630,61645,61660,61675,61690,61705,61720,61735,61750,61765,61780,61794,61809,61823,61838,61852,61867,61881, +61895,61909,61923,61937,61952,61965,61979,61993,62007,62021,62035,62048,62062,62075,62089,62102,62116,62129,62142,62155, +62169,62182,62195,62208,62221,62234,62247,62259,62272,62285,62298,62310,62323,62335,62348,62360,62373,62385,62397,62409, +62422,62434,62446,62458,62470,62482,62494,62506,62517,62529,62541,62553,62564,62576,62587,62599,62610,62622,62633,62644, +62656,62667,62678,62689,62700,62711,62722,62733,62744,62755,62766,62777,62787,62798,62809,62819,62830,62841,62851,62862, +62872,62882,62893,62903,62913,62923,62934,62944,62954,62964,62974,62984,62994,63004,63014,63024,63033,63043,63053,63062, +63072,63082,63091,63101,63110,63120,63129,63139,63148,63157,63166,63176,63185,63194,63203,63212,63221,63230,63239,63248, +63257,63266,63275,63284,63293,63301,63310,63319,63327,63336,63344,63353,63362,63370,63378,63387,63395,63404,63412,63420, +63428,63437,63445,63453,63461,63469,63477,63485,63493,63501,63509,63517,63525,63533,63540,63548,63556,63564,63571,63579, +63587,63594,63602,63609,63617,63624,63632,63639,63647,63654,63661,63669,63676,63683,63690,63698,63705,63712,63719,63726, +63733,63740,63747,63754,63761,63768,63775,63782,63789,63795,63802,63809,63816,63822,63829,63836,63842,63849,63855,63862, +63869,63875,63881,63888,63894,63901,63907,63913,63920,63926,63932,63939,63945,63951,63957,63963,63969,63976,63982,63988, +63994,64000,64006,64012,64018,64024,64029,64035,64041,64047,64053,64059,64064,64070,64076,64081,64087,64093,64098,64104, +64110,64115,64121,64126,64132,64137,64143,64148,64153,64159,64164,64170,64175,64180,64185,64191,64196,64201,64206,64212, +64217,64222,64227,64232,64237,64242,64247,64252,64257,64262,64267,64272,64277,64282,64287,64292,64297,64301,64306,64311, +64316,64321,64325,64330,64335, \ No newline at end of file diff --git a/plugins/community/repos/Hora-Examples/res/saw128.gwt b/plugins/community/repos/Hora-Examples/res/saw128.gwt new file mode 100644 index 00000000..556d4652 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/saw128.gwt @@ -0,0 +1,16 @@ +0,2016,3971,5865,7701,9480,11205,12876, +14496,16067,17589,19064,20493,21879,23222,24524, +25786,27009,28194,29343,30457,31536,32582,33596, +34578,35531,36454,37349,38216,39056,39871,40661, +41426,42168,42887,43584,44259,44913,45548,46163, +46759,47337,47896,48439,48965,49475,49969,50448, +50912,51362,51798,52221,52630,53027,53412,53785, +54147,54497,54837,55166,55485,55794,56094,56384, +56666,56939,57203,57460,57708,57949,58182,58408, +58628,58840,59046,59246,59439,59627,59809,59985, +60156,60321,60481,60637,60788,60934,61075,61212, +61345,61474,61599,61720,61838,61952,62062,62169, +62272,62373,62470,62564,62656,62744,62830,62913, +62994,63072,63148,63221,63293,63362,63428,63493, +63556,63617,63676,63733,63789,63842,63894,63945, +63994,64041,64087,64132,64175,64217,64257,64297, \ No newline at end of file diff --git a/plugins/community/repos/Hora-Examples/res/saw512.gwt b/plugins/community/repos/Hora-Examples/res/saw512.gwt new file mode 100644 index 00000000..c50f8901 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/saw512.gwt @@ -0,0 +1,26 @@ +0,511,1018,1521,2020,2515,3007,3494,3978,4458,4934,5407,5876,6341,6802,7260,7715,8166,8613,9057, +9497,9934,10368,10798,11225,11648,12068,12485,12899,13309,13716,14120,14521,14919,15314,15705,16094,16479,16862,17241, +17618,17992,18362,18730,19095,19457,19816,20173,20527,20877,21226,21571,21914,22254,22592,22926,23259,23588,23915,24240, +24562,24881,25198,25513,25825,26135,26442,26747,27049,27349,27647,27942,28235,28526,28815,29101,29385,29667,29947,30224, +30500,30773,31044,31313,31580,31844,32107,32368,32626,32883,33137,33390,33641,33889,34136,34381,34624,34865,35104,35341, +35577,35810,36042,36272,36500,36727,36951,37174,37395,37615,37832,38048,38263,38475,38686,38896,39103,39309,39514,39717, +39918,40118,40316,40513,40708,40901,41093,41284,41473,41661,41847,42032,42215,42397,42577,42756,42934,43110,43285,43458, +43630,43801,43971,44139,44306,44471,44635,44798,44960,45121,45280,45438,45594,45750,45904,46057,46209,46360,46509,46658, +46805,46951,47096,47240,47382,47524,47664,47803,47942,48079,48215,48350,48484,48617,48749,48880,49010,49139,49266,49393, +49519,49644,49768,49891,50013,50134,50254,50373,50491,50609,50725,50840,50955,51069,51182,51293,51404,51515,51624,51732, +51840,51947,52053,52158,52262,52366,52468,52570,52671,52772,52871,52970,53068,53165,53262,53357,53452,53546,53640,53733, +53825,53916,54007,54096,54186,54274,54362,54449,54536,54621,54706,54791,54875,54958,55040,55122,55203,55284,55364,55443, +55522,55600,55677,55754,55830,55906,55981,56056,56130,56203,56276,56348,56419,56491,56561,56631,56700,56769,56838,56905, +56973,57040,57106,57172,57237,57301,57366,57429,57493,57555,57617,57679,57740,57801,57862,57921,57981,58040,58098,58156, +58214,58271,58327,58384,58439,58495,58549,58604,58658,58712,58765,58818,58870,58922,58974,59025,59075,59126,59176,59225, +59275,59323,59372,59420,59468,59515,59562,59608,59655,59700,59746,59791,59836,59880,59924,59968,60012,60055,60097,60140, +60182,60224,60265,60306,60347,60387,60427,60467,60507,60546,60585,60623,60662,60700,60737,60775,60812,60849,60885,60922, +60958,60993,61029,61064,61099,61133,61168,61202,61235,61269,61302,61335,61368,61400,61433,61465,61496,61528,61559,61590, +61621,61651,61682,61712,61742,61771,61801,61830,61859,61887,61916,61944,61972,62000,62027,62055,62082,62109,62135,62162, +62188,62214,62240,62266,62291,62317,62342,62367,62391,62416,62440,62464,62488,62512,62536,62559,62582,62605,62628,62651, +62673,62695,62718,62740,62761,62783,62804,62826,62847,62868,62889,62909,62930,62950,62970,62990,63010,63030,63049,63069, +63088,63107,63126,63145,63163,63182,63200,63218,63236,63254,63272,63290,63307,63325,63342,63359,63376,63393,63409,63426, +63443,63459,63475,63491,63507,63523,63539,63554,63570,63585,63600,63615,63630,63645,63660,63674,63689,63703,63718,63732, +63746,63760,63774,63787,63801,63814,63828,63841,63854,63867,63880,63893,63906,63919,63931,63944,63956,63969,63981,63993, +64005,64017,64029,64041,64052,64064,64075,64087,64098,64109,64120,64131,64142,64153,64164,64175,64185,64196,64206,64216, +64227,64237,64247,64257,64267,64277,64287,64297,64306,64316,64325,64335, \ No newline at end of file diff --git a/plugins/community/repos/Hora-Examples/res/screen.svg b/plugins/community/repos/Hora-Examples/res/screen.svg new file mode 100644 index 00000000..82889d5b --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/screen.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/sequencer.svg b/plugins/community/repos/Hora-Examples/res/sequencer.svg new file mode 100644 index 00000000..09669c91 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/sequencer.svg @@ -0,0 +1,1567 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/sin128.gwt b/plugins/community/repos/Hora-Examples/res/sin128.gwt new file mode 100644 index 00000000..e1a16f1e --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/sin128.gwt @@ -0,0 +1 @@ +32768,34375,35979,37575,39160,40729,42279,43807,45307,46777,48214,49613,50972,52287,53555,54773,55938,57047,58097,59087,60013,60873,61666,62389,63041,63620,64124,64553,64905,65180,65377,65496,65535,65496,65377,65180,64905,64553,64124,63620,63041,62389,61666,60873,60013,59087,58097,57047,55938,54773,53555,52287,50972,49613,48214,46777,45307,43807,42279,40729,39160,37575,35979,34375,32768,31160,29556,27960,26375,24806,23256,21728,20228,18758,17321,15922,14563,13248,11980,10762,9597,8488,7438,6448,5522,4662,3869,3146,2494,1915,1411,982,630,355,158,39,0,39,158,355,630,982,1411,1915,2494,3146,3869,4662,5522,6448,7438,8488,9597,10762,11980,13248,14563,15922,17321,18758,20228,21728,23256,24806,26375,27960,29556,31160, \ No newline at end of file diff --git a/plugins/community/repos/Hora-Examples/res/sin512.gwt b/plugins/community/repos/Hora-Examples/res/sin512.gwt new file mode 100644 index 00000000..4b3073e9 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/sin512.gwt @@ -0,0 +1,26 @@ +32768,33170,33573,33976,34378,34781,35183,35584,35986,36386,36786,37186,37585,37983,38380,38777,39172,39567,39961,40353, +40745,41135,41524,41911,42297,42682,43065,43447,43827,44206,44582,44957,45330,45701,46071,46438,46803,47166,47527,47885, +48242,48596,48947,49296,49643,49987,50329,50667,51004,51337,51667,51995,52320,52642,52961,53276,53589,53899,54205,54508, +54808,55104,55397,55687,55973,56256,56535,56811,57083,57351,57615,57876,58133,58386,58635,58881,59122,59360,59593,59822, +60048,60269,60486,60698,60907,61111,61311,61507,61698,61885,62068,62246,62420,62589,62754,62914,63070,63221,63367,63509, +63646,63778,63906,64029,64148,64261,64370,64474,64574,64668,64758,64842,64922,64998,65068,65133,65194,65249,65300,65346, +65386,65422,65453,65479,65500,65516,65527,65534,65535,65531,65522,65509,65490,65467,65438,65405,65367,65323,65275,65222, +65164,65101,65033,64961,64883,64801,64713,64621,64524,64423,64316,64205,64089,63968,63843,63713,63578,63438,63294,63146, +62992,62834,62672,62505,62334,62158,61977,61792,61603,61410,61212,61010,60803,60593,60378,60159,59935,59708,59477,59241, +59002,58759,58511,58260,58005,57746,57483,57217,56947,56673,56396,56115,55831,55543,55251,54956,54658,54357,54052,53744, +53433,53119,52802,52481,52158,51832,51503,51171,50836,50498,50158,49815,49470,49122,48772,48419,48064,47706,47347,46985, +46621,46255,45886,45516,45144,44770,44394,44017,43637,43257,42874,42490,42105,41718,41329,40940,40549,40157,39764,39370, +38975,38579,38182,37784,37385,36986,36586,36186,35785,35384,34982,34580,34177,33775,33372,32969,32566,32163,31760,31358, +30955,30553,30151,29750,29349,28949,28549,28150,27751,27353,26956,26560,26165,25771,25378,24986,24595,24206,23817,23430, +23045,22661,22278,21898,21518,21141,20765,20391,20019,19649,19280,18914,18550,18188,17829,17471,17116,16763,16413,16065, +15720,15377,15037,14699,14364,14032,13703,13377,13054,12733,12416,12102,11791,11483,11178,10877,10579,10284,9992,9704, +9420,9139,8862,8588,8318,8052,7789,7530,7275,7024,6776,6533,6294,6058,5827,5600,5376,5157,4942,4732, +4525,4323,4125,3932,3743,3558,3377,3201,3030,2863,2701,2543,2389,2241,2097,1957,1822,1692,1567,1446, +1330,1219,1112,1011,914,822,734,652,574,502,434,371,313,260,212,168,130,97,68,45, +26,13,4,0,1,8,19,35,56,82,113,149,189,235,286,341,402,467,537,613, +693,777,867,961,1061,1165,1274,1387,1506,1629,1757,1889,2026,2168,2314,2465,2621,2781,2946,3115, +3289,3467,3650,3837,4028,4224,4424,4628,4837,5049,5266,5487,5713,5942,6175,6413,6654,6900,7149,7402, +7659,7920,8184,8452,8724,9000,9279,9562,9848,10138,10431,10727,11027,11330,11636,11946,12259,12574,12893,13215, +13540,13868,14198,14531,14868,15206,15548,15892,16239,16588,16939,17293,17650,18008,18369,18732,19097,19464,19834,20205, +20578,20953,21329,21708,22088,22470,22853,23238,23624,24011,24400,24790,25182,25574,25968,26363,26758,27155,27552,27950, +28349,28749,29149,29549,29951,30352,30754,31157,31559,31962,32365,32768, \ No newline at end of file diff --git a/plugins/community/repos/Hora-Examples/res/smallLedGreen.svg b/plugins/community/repos/Hora-Examples/res/smallLedGreen.svg new file mode 100644 index 00000000..06bfd4ba --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/smallLedGreen.svg @@ -0,0 +1,63 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/smallLedRed.svg b/plugins/community/repos/Hora-Examples/res/smallLedRed.svg new file mode 100644 index 00000000..744f34a6 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/smallLedRed.svg @@ -0,0 +1,63 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/switch_0.svg b/plugins/community/repos/Hora-Examples/res/switch_0.svg new file mode 100644 index 00000000..a6a78e9b --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/switch_0.svg @@ -0,0 +1,94 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/switch_1.svg b/plugins/community/repos/Hora-Examples/res/switch_1.svg new file mode 100644 index 00000000..77f3c2e7 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/switch_1.svg @@ -0,0 +1,94 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/res/wave.svg b/plugins/community/repos/Hora-Examples/res/wave.svg new file mode 100644 index 00000000..a87d51ca --- /dev/null +++ b/plugins/community/repos/Hora-Examples/res/wave.svg @@ -0,0 +1,1560 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/community/repos/Hora-Examples/src/ControlledBuffer.cpp b/plugins/community/repos/Hora-Examples/src/ControlledBuffer.cpp new file mode 100644 index 00000000..e26ac4cb --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/ControlledBuffer.cpp @@ -0,0 +1,116 @@ +#include "ControlledBuffer.h" + +void ControlledBuffer::setinput(float _input) +{ + input = _input; +} +void ControlledBuffer::setrec(float _rec) +{ + rec = _rec; +} +void ControlledBuffer::setindex(float _index) +{ + + if (_index < buf.size()) + { + rawIndex = _index; + index = int(_index); + if (index > rawIndex && index > 0) + { + index = index-1; + } + + } + else + { + /*int j = buf.size(); + index = _index%j;*/ + index = 0; + rawIndex = 0; + } + if (index > buf.size()) + { + index = 0; + rawIndex = 0; + } +} +void ControlledBuffer::setreset(float _reset) +{ + if (_reset != 0) + { + index = 0; + rawIndex = 0; + } +} +void ControlledBuffer::setread(float _read) +{ + read = _read; +} +float ControlledBuffer::getoutput() +{ + if (rec != 0 && wasOnRec == false) + { + buf.clear(); + index = 0; + wasOnRec = true; + buf.push_back(input); + output = 0; + } + else if (rec != 0) + { + buf.push_back(input); + output = 0; + } + else if (read != 0) + { + + if (buf.size()>0 && index < buf.size()) + { + float delta = 0; + float deltaValue = 0; + float lValue = 0; + float cValue = 0; + + lValue = buf.at(index); + + + if (index < buf.size() - 1) + { + cValue = buf.at(index + 1); + } + else + { + cValue = buf.at(0); + } + + delta = rawIndex - index; + if (cValue > lValue) + { + deltaValue = cValue - lValue; + output = lValue + (delta * deltaValue) ; + } + else + { + deltaValue = lValue - cValue; + output = lValue - (delta * deltaValue) ; + } + } + else + { + output = 0; + } + } + if (rec == 0) + { + wasOnRec = false; + } + if (read == 0) + { + output = 0; + } + return output; +} +int ControlledBuffer::getbufSize() +{ + return buf.size(); +} diff --git a/plugins/community/repos/Hora-Examples/src/ControlledBuffer.h b/plugins/community/repos/Hora-Examples/src/ControlledBuffer.h new file mode 100644 index 00000000..4426e129 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/ControlledBuffer.h @@ -0,0 +1,43 @@ + +#include +#include +#include +#include +#include +#include +#include + +class ControlledBuffer { +private: + float input; + float rec; + bool wasOnRec; + float read; + int index; + float rawIndex; + float reset; + float output; + std::vector buf; +public: + ControlledBuffer() : + input(0), + rec(0), + wasOnRec(false), + read(0), + index(0), + rawIndex(0), + reset(0), + output(0), + buf() + { + + }; + void setinput(float _input); + void setrec(float _rec); + void setread(float _read); + void setreset(float _reset); + void setindex(float _index); + float getoutput(); + int getbufSize(); +}; + diff --git a/plugins/community/repos/Hora-Examples/src/CvToFreq.cpp b/plugins/community/repos/Hora-Examples/src/CvToFreq.cpp new file mode 100644 index 00000000..d09a033a --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/CvToFreq.cpp @@ -0,0 +1,15 @@ +#include "CvToFreq.h" + +void CvToFreq::setinput(float _input) +{ + input = _input; +} +void CvToFreq::setbase(float _base) +{ + base = _base; +} +float CvToFreq::getoutput() +{ + float output = powf(2.0, input) * base; + return output; +} diff --git a/plugins/community/repos/Hora-Examples/src/CvToFreq.h b/plugins/community/repos/Hora-Examples/src/CvToFreq.h new file mode 100644 index 00000000..41dbb2b6 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/CvToFreq.h @@ -0,0 +1,21 @@ + +#include + +class CvToFreq { +private: + float input; + float base; + float output; +public: + CvToFreq() : + input(0), + base(0), + output(0) + { + + }; + void setinput(float _input); + void setbase(float _base); + float getoutput(); +}; + diff --git a/plugins/community/repos/Hora-Examples/src/Examples.cpp b/plugins/community/repos/Hora-Examples/src/Examples.cpp new file mode 100644 index 00000000..f63ab2f8 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/Examples.cpp @@ -0,0 +1,24 @@ +#include "Examples.hpp" +#include + float getSampleRate() + { + return engineGetSampleRate(); + } + +RACK_PLUGIN_MODEL_DECLARE(Hora_Examples, miniSeq); +RACK_PLUGIN_MODEL_DECLARE(Hora_Examples, WaveTableOsc); +RACK_PLUGIN_MODEL_DECLARE(Hora_Examples, LowPassVCF); +RACK_PLUGIN_MODEL_DECLARE(Hora_Examples, buf); + +RACK_PLUGIN_INIT(Hora_Examples) { + RACK_PLUGIN_INIT_ID(); + RACK_PLUGIN_INIT_VERSION("0.6.2"); + + RACK_PLUGIN_INIT_WEBSITE("http://www.hora-music.be/free-modules.php"); + RACK_PLUGIN_INIT_MANUAL("http://www.hora-music.be/free-modules.php"); + + RACK_PLUGIN_MODEL_ADD(Hora_Examples, miniSeq); + RACK_PLUGIN_MODEL_ADD(Hora_Examples, WaveTableOsc); + RACK_PLUGIN_MODEL_ADD(Hora_Examples, LowPassVCF); + RACK_PLUGIN_MODEL_ADD(Hora_Examples, buf); +} diff --git a/plugins/community/repos/Hora-Examples/src/Examples.hpp b/plugins/community/repos/Hora-Examples/src/Examples.hpp new file mode 100644 index 00000000..0f51f08b --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/Examples.hpp @@ -0,0 +1,60 @@ +#include "rack.hpp" + +using namespace rack; + +RACK_PLUGIN_DECLARE(Hora_Examples); + +#if defined(USE_VST2) && !defined(RACK_PLUGIN_SHARED) +#define plugin "Hora-Examples" +#endif // USE_VST2 + +struct switch_0 : SVGSwitch, ToggleSwitch { +switch_0() { + addFrame(SVG::load(assetPlugin(plugin,"res/switch_0.svg"))); + addFrame(SVG::load(assetPlugin(plugin,"res/switch_1.svg"))); + sw->wrap(); + box.size = sw->box.size; + } +}; +struct jack : SVGPort{ +jack() { + background->svg = SVG::load(assetPlugin(plugin,"res/jack.svg")); + background->wrap(); + box.size = background->box.size; + } +}; +struct mediumKnob : SVGKnob{ +mediumKnob() { + box.size = Vec(25, 25); + minAngle = -0.75*M_PI; + maxAngle = 0.75*M_PI; + setSVG(SVG::load(assetPlugin(plugin,"res/mediumKnob.svg"))); + SVGWidget *shadow = new SVGWidget(); + shadow->setSVG(SVG::load(assetPlugin(plugin, "res/mediumknobShadow.svg"))); + addChild(shadow); + } +}; +struct mediumRotarysnap : SVGKnob{ +mediumRotarysnap() { + box.size = Vec(25, 25); + minAngle = -0.75*M_PI; + maxAngle = 0.75*M_PI; + setSVG(SVG::load(assetPlugin(plugin,"res/mediumRotary.svg"))); + SVGWidget *shadow = new SVGWidget(); + shadow->setSVG(SVG::load(assetPlugin(plugin, "res/mediumRotaryShadow.svg"))); + addChild(shadow); + } +}; +struct mediumRotarysnap_snap : mediumRotarysnap{ + mediumRotarysnap_snap() { + snap = true; + } +}; +struct button : SVGSwitch, MomentarySwitch { + button(){ + addFrame(SVG::load(assetPlugin(plugin,"res/button.svg"))); + addFrame(SVG::load(assetPlugin(plugin,"res/buttonPushed.svg"))); + sw->wrap(); + box.size = sw->box.size; + } +}; diff --git a/plugins/community/repos/Hora-Examples/src/FreqToRate.cpp b/plugins/community/repos/Hora-Examples/src/FreqToRate.cpp new file mode 100644 index 00000000..bf6cf585 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/FreqToRate.cpp @@ -0,0 +1,19 @@ +#include "FreqToRate.h" + +void FreqToRate::setinput(float _input) +{ + input = _input; +} +void FreqToRate::setsampleRate(float _base) +{ + base = _base; +} +void FreqToRate::settableLength(float _length) +{ + tableLength = _length; +} +float FreqToRate::getoutput() +{ + float output = input / base * tableLength; + return output; +} diff --git a/plugins/community/repos/Hora-Examples/src/FreqToRate.h b/plugins/community/repos/Hora-Examples/src/FreqToRate.h new file mode 100644 index 00000000..3b1fcd18 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/FreqToRate.h @@ -0,0 +1,24 @@ + +#include + +class FreqToRate { +private: + float input; + float base; + float tableLength; + float output; +public: + FreqToRate() : + input(0), + base(0), + tableLength(0), + output(0) + { + + }; + void setinput(float _input); + void setsampleRate(float _base); + void settableLength(float _length); + float getoutput(); +}; + diff --git a/plugins/community/repos/Hora-Examples/src/LowPassVCF.cpp b/plugins/community/repos/Hora-Examples/src/LowPassVCF.cpp new file mode 100644 index 00000000..e616c6cd --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/LowPassVCF.cpp @@ -0,0 +1,85 @@ +#include "Examples.hpp" +#include "MMFilter.h" + +struct LowPassVCF : Module { + MMFilter MMFilter_mul23; + + enum ParamIds { + FREQ_PARAM, + RESO_PARAM, + AUDIO_LEVEL_PARAM, + NUM_PARAMS + }; + enum InputIds { + FREQ_INPUT, + RESO_INPUT, + AUDIO_INPUT, + NUM_INPUTS + }; + enum OutputIds { + AUDIO_OUTPUT, + NUM_OUTPUTS + }; + enum LightIds { + NUM_LIGHTS + }; + LowPassVCF(); + void step()override; +}; + +LowPassVCF::LowPassVCF() { + params.resize(NUM_PARAMS); + inputs.resize(NUM_INPUTS); + outputs.resize(NUM_OUTPUTS); +} +void LowPassVCF::step() { + int int24_out = 0; + float FREQ_PARAM_output = params[FREQ_PARAM].value; + float RESO_PARAM_output = params[RESO_PARAM].value; + float FREQ_INPUT_signal = inputs[FREQ_INPUT].value; + float RESO_INPUT_signal = inputs[RESO_INPUT].value; + float AUDIO_INPUT_signal = inputs[AUDIO_INPUT].value; + float AUDIO_LEVEL_PARAM_output = params[AUDIO_LEVEL_PARAM].value; + float dou12_out = 10; + float dou14_out = 5; + float dou19_out = 10; + float x__Op20_result = RESO_INPUT_signal/dou19_out; + float dou22_out = 10; + float x__Op8_result = AUDIO_LEVEL_PARAM_output*AUDIO_INPUT_signal; + float x__Op11_result = x__Op8_result/dou12_out; + float x__Op21_result = FREQ_INPUT_signal/dou22_out; + MMFilter_mul23.setinput(x__Op11_result); + MMFilter_mul23.setfreq(x__Op21_result + FREQ_PARAM_output); + MMFilter_mul23.setreso(RESO_PARAM_output + x__Op20_result); + MMFilter_mul23.setmode(int24_out); + float mul23_output = MMFilter_mul23.getoutput(); + + float x__Op13_result = mul23_output*dou14_out; + outputs[AUDIO_OUTPUT].value = x__Op13_result; + +} +struct LowPassVCFWidget : ModuleWidget { + LowPassVCFWidget(LowPassVCF *module); +}; + +LowPassVCFWidget::LowPassVCFWidget(LowPassVCF *module) : ModuleWidget(module) { + box.size = Vec(120, 380); + { + SVGPanel *panel = new SVGPanel(); + panel->box.size = box.size; + panel->setBackground(SVG::load(assetPlugin(plugin, "res/LPVCF.svg"))); + addChild(panel); + } + addParam(ParamWidget::create(Vec(69.6985,188.29), module, LowPassVCF::FREQ_PARAM, 0, 1, 0)); + addParam(ParamWidget::create(Vec(9.46014,188.131), module, LowPassVCF::RESO_PARAM, 0, 1, 0)); + addInput(Port::create(Vec(71.9289,135.616), Port::INPUT, module, LowPassVCF::FREQ_INPUT)); + addInput(Port::create(Vec(12.6396,135.853), Port::INPUT, module, LowPassVCF::RESO_INPUT)); + addInput(Port::create(Vec(14.7729,310.231), Port::INPUT, module, LowPassVCF::AUDIO_INPUT)); + addParam(ParamWidget::create(Vec(40.9485,42.9485), module, LowPassVCF::AUDIO_LEVEL_PARAM, 0, 1, 0.99)); + addOutput(Port::create(Vec(72.1264,309.651), Port::OUTPUT, module, LowPassVCF::AUDIO_OUTPUT)); +} + +RACK_PLUGIN_MODEL_INIT(Hora_Examples, LowPassVCF) { + Model *modelLowPassVCF = Model::create("Hora", "Hora-ExamplesVCF", "LPfilter", FILTER_TAG); + return modelLowPassVCF; +} diff --git a/plugins/community/repos/Hora-Examples/src/MMFilter.cpp b/plugins/community/repos/Hora-Examples/src/MMFilter.cpp new file mode 100644 index 00000000..ec8922d0 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/MMFilter.cpp @@ -0,0 +1,64 @@ +#include "MMFilter.h" + +void MMFilter::setfreq(float freq) +{ + cutoff = freq; + calculateFeedbackAmount(); +} +void MMFilter::setreso(float reso) +{ + resonance = reso; + if (resonance > 0.99) + { + resonance = 0.99; + } + else if (resonance < 0.0) + { + resonance = 0.0; + } + calculateFeedbackAmount(); +} +void MMFilter::setinput(float input) +{ + inputValue = input; +} +void MMFilter::setmode(int fMode) +{ + if (fMode == 0) + { + mode = FILTER_MODE_LOWPASS; + } + if (fMode == 1) + { + mode = FILTER_MODE_BANDPASS; + } + if (fMode == 2) + { + mode = FILTER_MODE_HIGHPASS; + } + if (fMode == 3) + { + mode = FILTER_MODE_NOTCH; + } +} +float MMFilter::getoutput() { + + if (inputValue == 0.0) return inputValue; + float calculatedCutoff = getCalculatedCutoff();; + buf0 += calculatedCutoff * (inputValue - buf0 + feedbackAmount * (buf0 - buf1)); + buf1 += calculatedCutoff * (buf0 - buf1); + buf2 += calculatedCutoff * (buf1 - buf2); + buf3 += calculatedCutoff * (buf2 - buf3); + switch (mode) { + case FILTER_MODE_LOWPASS: + return buf3; + case FILTER_MODE_HIGHPASS: + return inputValue - buf3; + case FILTER_MODE_BANDPASS: + return buf0 - buf3; + case FILTER_MODE_NOTCH: + return inputValue - (buf0 - buf3); + default: + return buf3; + } +} diff --git a/plugins/community/repos/Hora-Examples/src/MMFilter.h b/plugins/community/repos/Hora-Examples/src/MMFilter.h new file mode 100644 index 00000000..c097943c --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/MMFilter.h @@ -0,0 +1,52 @@ + +#include + +class MMFilter { + public: + enum FilterMode { + FILTER_MODE_LOWPASS = 0, + FILTER_MODE_HIGHPASS, + FILTER_MODE_BANDPASS, + FILTER_MODE_NOTCH, + kNumFilterModes + }; + MMFilter() : + + mode(FILTER_MODE_LOWPASS), + inputValue(0.0), + cutoff(0.99), + resonance(0.0), + buf0(), + buf1(), + buf2(), + buf3(), + output(), + feedbackAmount() + { + //calculateFeedbackAmount(); + }; + void setmode(int fMode); + void setfreq(float freq); + void setinput(float input); + void setreso(float reso); + float getoutput(); + private: + + FilterMode mode; + float inputValue; + float cutoff; + float resonance; + float buf0; + float buf1; + float buf2; + float buf3; + float output; + float feedbackAmount; + inline void calculateFeedbackAmount() { + feedbackAmount = resonance + resonance / (1.0 - getCalculatedCutoff()); + } + inline double getCalculatedCutoff() const { + return fmax(fmin(cutoff, 0.99), 0.01); + }; + +}; diff --git a/plugins/community/repos/Hora-Examples/src/WaveTableOsc.cpp b/plugins/community/repos/Hora-Examples/src/WaveTableOsc.cpp new file mode 100644 index 00000000..68c73ff8 --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/WaveTableOsc.cpp @@ -0,0 +1,156 @@ +#include "Examples.hpp" +#include "CvToFreq.h" +#include "FreqToRate.h" +#include "stringMux.h" +#include "floatToString.h" +#include "clockedCounter.h" +#include "waveTable.h" + +struct WaveTableOsc : Module { + CvToFreq CvToFreq_CV_74; + + FreqToRate FreqToRate_toR82; + + stringMux stringMux_stM86; + + floatToString floatToString_flt81; + + clockedCounter clockedCounter_cCo62; + + waveTable waveTable_wav72; + + float pre57_out = 0; + + char screen_WaveTableOsc_lineMessage1[100] = ""; + char screen_WaveTableOsc_lineMessage2[100] = ""; + enum ParamIds { + rot_91_PARAM, + NUM_PARAMS + }; + enum InputIds { + mod_73_INPUT, + mod_96_INPUT, + NUM_INPUTS + }; + enum OutputIds { + mod_8_OUTPUT, + NUM_OUTPUTS + }; + enum LightIds { + NUM_LIGHTS + }; + WaveTableOsc() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} + void step()override; +}; + +void WaveTableOsc::step() { + float dou98_out = 6553; + float dou75_out = 20; + float mod_73_INPUT_signal = inputs[mod_73_INPUT].value; + float dou64_out = 1; + char str67_out[100] = "saw128.gwt"; + char str84_out[100] = "saw512.gwt"; + char str85_out[100] = "saw1024.gwt"; + char str89_out[100] = "sin512.gwt"; + char str90_out[100] = "sin128.gwt"; + float rot_91_PARAM_output = params[rot_91_PARAM].value; + int toI92_out = int(rot_91_PARAM_output); + float sam93_signal = engineGetSampleRate(); + float dou95_out = 5; + float mod_96_INPUT_signal = inputs[mod_96_INPUT].value; + CvToFreq_CV_74.setinput(mod_73_INPUT_signal); + CvToFreq_CV_74.setbase(dou75_out); + float CV_74_output = CvToFreq_CV_74.getoutput(); + + float x__Op63_result = pre57_out-dou64_out; + FreqToRate_toR82.setinput(CV_74_output); + FreqToRate_toR82.setsampleRate(sam93_signal); + FreqToRate_toR82.settableLength(pre57_out); + float toR82_output = FreqToRate_toR82.getoutput(); + + stringMux_stM86.setstr1(str67_out); + stringMux_stM86.setstr2(str84_out); + stringMux_stM86.setstr3(str85_out); + stringMux_stM86.setstr4(str90_out); + stringMux_stM86.setstr5(str89_out); + stringMux_stM86.setindex(toI92_out); + char *stM86_output = stringMux_stM86.getoutput(); + + floatToString_flt81.setinput(CV_74_output); + char *flt81_output = floatToString_flt81.getoutput(); + + strcpy(screen_WaveTableOsc_lineMessage1, stM86_output); + strcpy(screen_WaveTableOsc_lineMessage2, flt81_output); + + clockedCounter_cCo62.setlength(x__Op63_result); + clockedCounter_cCo62.setrate(toR82_output); + clockedCounter_cCo62.setreset(0); + float cCo62_output = clockedCounter_cCo62.getoutput(); + + waveTable_wav72.setindex(cCo62_output); + waveTable_wav72.setreset(mod_96_INPUT_signal); + waveTable_wav72.settableName(stM86_output); + float wav72_output = waveTable_wav72.getoutput(); + float wav72_bufSize = waveTable_wav72.getbufSize(); + + float x__Op68_result = wav72_output/dou98_out; + float x__Op94_result = x__Op68_result-dou95_out; + outputs[mod_8_OUTPUT].value = x__Op94_result; + pre57_out = wav72_bufSize; + + +} +struct screen_WaveTableOsc : TransparentWidget { + WaveTableOsc *module; + std::shared_ptr font; + screen_WaveTableOsc () { + font = Font::load(assetPlugin(plugin, "res/LEDCounter7.ttf")); + } + void updateLine1(NVGcontext *vg, Vec pos, NVGcolor DMDtextColor, char* lineMessage1) { + nvgFontSize(vg, 20); + nvgFontFaceId(vg, font->handle); + nvgTextLetterSpacing(vg, -2); + nvgFillColor(vg, nvgTransRGBA(nvgRGB( 0, 150, 144), 0xff)); + nvgText(vg, pos.x, pos.y, lineMessage1, NULL); + } + void updateLine2(NVGcontext *vg, Vec pos, NVGcolor DMDtextColor, int xOffsetValue, char* lineMessage2) { + nvgFontSize(vg, 20); + nvgFontFaceId(vg, font->handle); + nvgTextLetterSpacing(vg, -2); + nvgFillColor(vg, nvgTransRGBA(nvgRGB( 0, 150, 144), 0xff)); + nvgText(vg, pos.x, pos.y, lineMessage2, NULL); + } + void draw(NVGcontext *vg) override { + updateLine1(vg, Vec( 5, 5), nvgRGB(0x08, 0x08, 0x08), module->screen_WaveTableOsc_lineMessage1); + updateLine2(vg, Vec( 5, (20+20/2)), nvgRGB(0x08, 0x08, 0x08), 20, module->screen_WaveTableOsc_lineMessage2); + } +}; +struct WaveTableOscWidget : ModuleWidget { + WaveTableOscWidget(WaveTableOsc *module); +}; + +WaveTableOscWidget::WaveTableOscWidget(WaveTableOsc *module) : ModuleWidget(module) { + box.size = Vec(120, 380); + { + SVGPanel *panel = new SVGPanel(); + panel->box.size = box.size; + panel->setBackground(SVG::load(assetPlugin(plugin, "res/wave.svg"))); + addChild(panel); + } + { + screen_WaveTableOsc *display_screen= new screen_WaveTableOsc(); + display_screen->module = module; + display_screen->box.pos = Vec(12.3675, 118.624); + display_screen->box.size = Vec(234, 234); + addChild(display_screen); + } + addInput(Port::create(Vec(12.4868,242), Port::INPUT, module, WaveTableOsc::mod_73_INPUT)); + addOutput(Port::create(Vec(41.9474,289.908), Port::OUTPUT, module, WaveTableOsc::mod_8_OUTPUT)); + addParam(ParamWidget::create(Vec(41,43.1518), module, WaveTableOsc::rot_91_PARAM, 0, 4, 0)); + addInput(Port::create(Vec(71.9312,242.122), Port::INPUT, module, WaveTableOsc::mod_96_INPUT)); +} + +RACK_PLUGIN_MODEL_INIT(Hora_Examples, WaveTableOsc) { + Model *modelWaveTableOsc = Model::create("Hora", "hora-examplesWaveTable", "wavetableOSC", OSCILLATOR_TAG); + return modelWaveTableOsc; +} diff --git a/plugins/community/repos/Hora-Examples/src/buf.cpp b/plugins/community/repos/Hora-Examples/src/buf.cpp new file mode 100644 index 00000000..0c0c604a --- /dev/null +++ b/plugins/community/repos/Hora-Examples/src/buf.cpp @@ -0,0 +1,187 @@ +#include "Examples.hpp" +#include "clockedCounter.h" +#include "ControlledBuffer.h" +#include "dsp/digital.hpp" + +struct buf : Module { + bool gat76_wasTrigged = false; + + int cou75_currentCount = 0; + + SchmittTrigger clockTriggercou75; + + float arr80_inputs[3] = {0}; + + float arr80[3] = {0}; + + bool gat66_wasTrigged = false; + + clockedCounter clockedCounter_cCo62; + + ControlledBuffer ControlledBuffer_cBu14; + + float pre57_out = 0; + + enum ParamIds { + swi_81_PARAM, + swi_33_PARAM, + kno_25_PARAM, + but_16_PARAM, + but_5_PARAM, + NUM_PARAMS + }; + enum InputIds { + mod_74_INPUT, + mod_69_INPUT, + mod_68_INPUT, + mod_67_INPUT, + mod_3_INPUT, + NUM_INPUTS + }; + enum OutputIds { + mod_8_OUTPUT, + NUM_OUTPUTS + }; + enum LightIds { + led_73_LIGHT, + led_72_LIGHT, + NUM_LIGHTS + }; + buf(); + void step()override; +}; + +buf::buf() { + params.resize(NUM_PARAMS); + lights.resize(NUM_LIGHTS); + inputs.resize(NUM_INPUTS); + outputs.resize(NUM_OUTPUTS); +} +void buf::step() { + float swi_81_PARAM_output = params[swi_81_PARAM].value; + float mod_74_INPUT_signal = inputs[mod_74_INPUT].value; + float dou71_out = 5; + float mod_69_INPUT_signal = inputs[mod_69_INPUT].value; + float mod_68_INPUT_signal = inputs[mod_68_INPUT].value; + float mod_67_INPUT_signal = inputs[mod_67_INPUT].value; + float swi_33_PARAM_output = params[swi_33_PARAM].value; + float kno_25_PARAM_output = params[kno_25_PARAM].value; + float but_16_PARAM_output = params[but_16_PARAM].value; + float mod_3_INPUT_signal = inputs[mod_3_INPUT].value; + float but_5_PARAM_output = params[but_5_PARAM].value; + float dou64_out = 1; + float dou85_out = 0; + int toI82_out = int(swi_81_PARAM_output); + bool gat76_pulse = false; + if(mod_74_INPUT_signal != 0 && gat76_wasTrigged == false) + { + gat76_wasTrigged = true; + gat76_pulse = true; + } else if( mod_74_INPUT_signal == 0) + { + gat76_wasTrigged = false; + } + float gat76_out = gat76_pulse ? 10.0 : 0.0; + + if(clockTriggercou75.process(gat76_out)) + { + cou75_currentCount++; + } + if(cou75_currentCount>1) + { + cou75_currentCount= 0; + } + if (0 > 0.2 ) + { + cou75_currentCount = 0; + } + int cou75_count = cou75_currentCount; + +lights[led_72_LIGHT].value = but_5_PARAM_output + mod_67_INPUT_signal; + float x__Op70_result = mod_69_INPUT_signal/dou71_out; + float x__Op63_result = pre57_out-dou64_out; + float x__Op84_result = 0; + if (mod_68_INPUT_signal > dou85_out) + { + x__Op84_result = 1; + } + arr80_inputs[0] = cou75_count; + arr80_inputs[1] = swi_33_PARAM_output; + arr80_inputs[2] = 0; + arr80_inputs[3] = 0; + for(int arr80_realsize = 0; arr80_realsize < 3;arr80_realsize ++) + { + if(arr80_realsize!=toI82_out) + { + arr80[arr80_realsize ] = arr80_inputs[arr80_realsize]; + } + else + { + arr80[arr80_realsize ] = arr80_inputs[toI82_out]; + } + } + float arr80_out = arr80[toI82_out]; + +lights[led_73_LIGHT].value = arr80_out; + bool gat66_pulse = false; + if(x__Op84_result + but_16_PARAM_output != 0 && gat66_wasTrigged == false) + { + gat66_wasTrigged = true; + gat66_pulse = true; + } else if( x__Op84_result + but_16_PARAM_output == 0) + { + gat66_wasTrigged = false; + } + float gat66_out = gat66_pulse ? 10.0 : 0.0; + + float x__Op24_result = kno_25_PARAM_output + x__Op70_result*arr80_out; + clockedCounter_cCo62.setlength(x__Op63_result); + clockedCounter_cCo62.setrate(x__Op24_result); + clockedCounter_cCo62.setreset(gat66_out); + float cCo62_output = clockedCounter_cCo62.getoutput(); + + int toI54_out = int(cCo62_output); + ControlledBuffer_cBu14.setinput(mod_3_INPUT_signal); + ControlledBuffer_cBu14.setrec(but_5_PARAM_output + mod_67_INPUT_signal); + ControlledBuffer_cBu14.setread(arr80_out); + ControlledBuffer_cBu14.setindex(toI54_out); + ControlledBuffer_cBu14.setreset(gat66_out); + float cBu14_output = ControlledBuffer_cBu14.getoutput(); + float cBu14_bufSize = ControlledBuffer_cBu14.getbufSize(); + + outputs[mod_8_OUTPUT].value = cBu14_output; + pre57_out = cBu14_bufSize; + + +} +struct bufWidget : ModuleWidget { + bufWidget(buf *module); +}; + +bufWidget::bufWidget(buf *module) : ModuleWidget(module) { + box.size = Vec(120, 380); + { + SVGPanel *panel = new SVGPanel(); + panel->box.size = box.size; + panel->setBackground(SVG::load(assetPlugin(plugin, "res/recorder.svg"))); + addChild(panel); + } + addParam(ParamWidget::create(Vec(22.0143,103.699), module, buf::swi_81_PARAM, 0, 1, 0)); + addInput(Port::create(Vec(46.6637,115.553), Port::INPUT, module, buf::mod_74_INPUT)); + addChild(ModuleLightWidget::create>(Vec(33.9625,146.15), module, buf::led_73_LIGHT)); + addChild(ModuleLightWidget::create>(Vec(31.2876,63.1705), module, buf::led_72_LIGHT)); + addInput(Port::create(Vec(71.823,177.781), Port::INPUT, module, buf::mod_69_INPUT)); + addInput(Port::create(Vec(72.1072,244.442), Port::INPUT, module, buf::mod_68_INPUT)); + addInput(Port::create(Vec(71.7332,27.7387), Port::INPUT, module, buf::mod_67_INPUT)); + addParam(ParamWidget::create(Vec(53.9451,87.6101), module, buf::swi_33_PARAM, 0, 1, 0)); + addParam(ParamWidget::create(Vec(16.53,173.204), module, buf::kno_25_PARAM, 0.01, 2, 1)); + addParam(ParamWidget::create