├── .gitignore ├── CHANGELOG ├── CMakeLists.txt ├── COPYING ├── README ├── cmake_uninstall.cmake.in ├── src ├── bentdelay │ ├── CMakeLists.txt │ ├── bentdelay.ttl │ ├── falter.c │ ├── falter.h │ └── manifest.ttl ├── casynth │ ├── CMakeLists.txt │ ├── casynth.c │ ├── casynth.h │ ├── casynth.ttl │ ├── casynth_presets.ttl │ ├── casynth_ui.fl │ ├── casynth_ui_main.cxx │ ├── cellgrid.h │ ├── constants.h │ ├── manifest.ttl │ ├── note.c │ ├── note.h │ ├── waves.c │ └── waves.h ├── cheapdist │ ├── CMakeLists.txt │ ├── cheapdist.c │ ├── cheapdist.h │ ├── cheapdist.ttl │ ├── cheapdist_ui.fl │ ├── cheapdist_ui_main.cxx │ └── manifest.ttl ├── cheapoct │ ├── CMakeLists.txt │ ├── cheapoct.c │ ├── cheapoct.h │ ├── cheapoct.ttl │ └── manifest.ttl ├── draw │ ├── blur.h │ ├── draw_16seg.h │ ├── draw_LED.h │ ├── draw_blackLEDbutton.h │ ├── draw_casFrames.h │ ├── draw_casLabels.h │ ├── draw_casbg.h │ ├── draw_cheapDial.h │ ├── draw_cheapLabels.h │ ├── draw_envLabels.h │ ├── draw_envScopes.h │ ├── draw_envfollowerbg.h │ ├── draw_flatDial.h │ ├── draw_hal.h │ ├── draw_hip2bg.h │ ├── draw_infamousLogo.h │ ├── draw_infamousLogoBW.h │ ├── draw_infamousLogoTiny.h │ ├── draw_infamousLogoTrans.h │ ├── draw_ivoryDial.h │ ├── draw_ivorySlider.h │ ├── draw_lushGraphPoint.h │ ├── draw_lushGraphXBound.h │ ├── draw_lushGraphYBound.h │ ├── draw_lushLabels.h │ ├── draw_lushbg.h │ ├── draw_powerButton.h │ ├── draw_powerbg.h │ ├── draw_pwrLabels.h │ ├── draw_redDial.h │ ├── draw_reel.h │ ├── draw_rgb5x7.h │ ├── draw_rgbLED.h │ ├── draw_silverDial.h │ ├── draw_squareDial.h │ ├── draw_squareDialBlur.h │ ├── draw_stuckbg.h │ ├── draw_tabDial.h │ ├── draw_tinyButton.h │ ├── draw_toggleSwitch.h │ ├── draw_white.h │ └── draw_whiteTinyButton.h ├── duffer │ ├── CMakeLists.txt │ ├── c_resampler.cpp │ ├── c_resampler.h │ ├── c_vresampler.h │ ├── duffer.ttl │ ├── duffing.c │ ├── manifest.ttl │ ├── rk4.c │ └── rk4.h ├── envfollower │ ├── CMakeLists.txt │ ├── constants.h │ ├── envbounds.h │ ├── envdisplay.h │ ├── envfollower.c │ ├── envfollower.h │ ├── envfollower.ttl │ ├── envfollowerCV_ui.fl │ ├── envfollower_ui.fl │ ├── envfollower_ui_main.cxx │ ├── manifest.ttl │ ├── rms_calc.c │ └── rms_calc.h ├── ewham │ ├── CMakeLists.txt │ ├── ewham.c │ ├── ewham.h │ ├── ewham.ttl │ ├── manifest.ttl │ ├── modgui │ │ ├── icon-the-infamous-ewham.html │ │ ├── knobs │ │ │ └── boxy │ │ │ │ └── steel.png │ │ ├── pedals │ │ │ ├── boxy │ │ │ │ └── dots.png │ │ │ └── footswitch.png │ │ ├── screenshot-the-infamous-ewham.png │ │ ├── stylesheet-the-infamous-ewham.css │ │ ├── thumbnail-the-infamous-ewham.png │ │ └── utils │ │ │ ├── dropdown-arrow-black.png │ │ │ └── dropdown-arrow-white.png │ ├── retuner.c │ └── retuner.h ├── ffffltk │ ├── README │ ├── ffffltk.h │ ├── ffffltk_aspect_group.h │ ├── ffffltk_background.h │ ├── ffffltk_button.h │ ├── ffffltk_dial.h │ ├── ffffltk_display.h │ ├── ffffltk_input.h │ ├── ffffltk_scope.h │ ├── ffffltk_xy.h │ └── svg2cairo.sh ├── hip2b │ ├── CMakeLists.txt │ ├── hip2b.h │ ├── hip2b.ttl │ ├── hip2b_presets.ttl │ ├── hip2b_ui.fl │ ├── hip2b_ui_main.cxx │ ├── manifest.ttl │ ├── modgui │ │ ├── footswitch.png │ │ ├── hip2b.css │ │ ├── hip2b.html │ │ ├── hip2bg.svg │ │ ├── led-bypassed.png │ │ ├── led-enabled.png │ │ ├── screenshot-hip2b.png │ │ ├── squareDial64.png │ │ ├── squareDialb64.png │ │ └── thumbnail-hip2b.png │ └── square.c ├── lushlife │ ├── CMakeLists.txt │ ├── graph.h │ ├── lfo.cc │ ├── lfo.h │ ├── lushlife.cc │ ├── lushlife.h │ ├── lushlife.ttl │ ├── lushlife_presets.ttl │ ├── lushlife_ui.fl │ ├── lushlife_ui_main.cxx │ ├── manifest.ttl │ ├── retuner.cc │ ├── retuner.h │ └── xybounds.h ├── make_bg.c ├── make_button.c ├── make_knob_image.c ├── mindi │ ├── CMakeLists.txt │ ├── manifest.ttl │ ├── mindi.c │ ├── mindi.h │ ├── mindi.ttl │ └── modgui │ │ ├── dropdown-arrow-black.png │ │ ├── footswitch.png │ │ ├── infamousLogo.svg │ │ ├── midi128.png │ │ ├── mindi.css │ │ ├── mindi.html │ │ ├── screenshot-mindi.png │ │ ├── smallpox.png │ │ └── thumbnail-mindi.png ├── octolo │ ├── CMakeLists.txt │ ├── manifest.ttl │ ├── octolo.c │ ├── octolo.h │ ├── octolo.ttl │ └── octolo_presets.ttl ├── pms │ ├── CMakeLists.txt │ ├── manifest.ttl │ ├── pms.c │ ├── pms.h │ └── pms.ttl ├── powercut │ ├── CMakeLists.txt │ ├── manifest.ttl │ ├── modgui │ │ ├── powerbutton.svg │ │ ├── powercut.css │ │ ├── powercut.html │ │ ├── powercutbg.svg │ │ ├── screenshot-powercut.png │ │ ├── silverDial64.png │ │ └── thumbnail-powercut.png │ ├── powercut.c │ ├── powercut.h │ ├── powercut.ttl │ ├── powercut_ui.fl │ ├── powercut_ui_main.cxx │ └── reel.h ├── powerup │ ├── CMakeLists.txt │ ├── manifest.ttl │ ├── powerup.c │ ├── powerup.h │ ├── powerup.ttl │ ├── powerup_ui.fl │ ├── powerup_ui_main.cxx │ └── reel.h ├── qsvgui │ ├── LCD.cpp │ ├── LCD.h │ ├── form.cpp │ ├── form.h │ ├── globals.h │ ├── main.cpp │ ├── pedal.cpp │ ├── pedal.h │ ├── preview.cpp │ ├── preview.h │ ├── qsvgbutton.cpp │ ├── qsvgbutton.h │ ├── qsvgdial.cpp │ ├── qsvgdial.h │ ├── qsvgled.cpp │ ├── qsvgled.h │ ├── qsvgmeter.cpp │ ├── qsvgmeter.h │ ├── qsvgslider.cpp │ ├── qsvgslider.h │ ├── qsvgui.cpp │ ├── qsvgui.h │ ├── qsvgui.pro │ ├── qsvgwidgets.h │ ├── skin.cpp │ └── skin.h ├── reindex_ttl.py ├── rule.c ├── spring │ ├── blockdiagram │ ├── filters.h │ ├── filtertools.c │ └── filtertools.h └── stuck │ ├── CMakeLists.txt │ ├── manifest.ttl │ ├── modgui │ ├── led-bypassed.png │ ├── led-enabled.png │ ├── screenshot-stuck.png │ ├── stacker.svg │ ├── stuck.css │ ├── stuck.html │ ├── stuckbg.svg │ ├── stuckstacker.html │ ├── switch-key.png │ ├── tabDial.svg │ ├── tabDial64.svg │ └── thumbnail-stuck.png │ ├── rms_calc.c │ ├── rms_calc.h │ ├── stuck.c │ ├── stuck.h │ ├── stuck.ttl │ ├── stuck_ui.fl │ └── stuck_ui_main.cxx └── test ├── casynth.svg ├── constants.h ├── ffmpeg-2.4.2-jack.patch ├── ffthing.m ├── fltr.m ├── plotIREQ.m ├── schrodercascade.m ├── sine_seeker.c ├── spring.m ├── test.cxx ├── test.fl ├── test.h ├── test_main.cxx ├── testmin.c ├── wave_test.c ├── waves.h └── zpmapping.m /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | *avtk_* 4 | *.user 5 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | 0.0.00 initial release 2 | 0.0.01 bugfix in hip2b (it stopped woring) and fixed note offs in casynth 3 | 0.0.02 changed install paths, added arch install script 4 | 0.0.03 fixed clicking in hip2b whenever not 100%wet 5 | 0.0.10 added harmonic width to casynth, cv port in envfollower, octave in hip2b, changed all urids to actual webpages 6 | 0.0.15 removed all cv ports, added stuck, removed memset from casynth 7 | 0.0.20 added powercut, fixed rms in envfollower and a few more tweaks 8 | 0.0.26 fixed sustain=0 bug, updated readme 9 | 0.1.0 Cmake and GUIs 7 Sept 15 10 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | project(infamous-plugins) 4 | 5 | option(MOD "Install MOD gui resources" OFF) 6 | 7 | set(LIBDIR lib CACHE STRING "Specifies the name of the library path") 8 | 9 | set( PLUGINS "casynth;envfollower;hip2b;powerup;powercut;cheapdist;stuck;ewham;lushlife;bentdelay;mindi;octolo" CACHE STRING "List of plugins to build") 10 | 11 | foreach( plug ${PLUGINS} ) 12 | add_subdirectory(src/${plug}) 13 | endforeach(plug) 14 | 15 | add_executable(infamous-rule 16 | src/rule.c 17 | ) 18 | install(TARGETS infamous-rule 19 | DESTINATION ${CMAKE_INSTALL_PREFIX}/bin 20 | ) 21 | 22 | # uninstall target 23 | configure_file( 24 | "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" 25 | "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" 26 | IMMEDIATE @ONLY) 27 | 28 | add_custom_target(uninstall 29 | COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) 30 | 31 | -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 3 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | 5 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 9 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program( 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 12 | OUTPUT_VARIABLE rm_out 13 | RETURN_VALUE rm_retval 14 | ) 15 | if(NOT "${rm_retval}" STREQUAL 0) 16 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 17 | endif(NOT "${rm_retval}" STREQUAL 0) 18 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 19 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 20 | endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 21 | endforeach(file) 22 | -------------------------------------------------------------------------------- /src/bentdelay/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "bentdelay") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | falter.c 35 | falter.h 36 | ) 37 | 38 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 39 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 40 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 41 | 42 | # config install 43 | install(TARGETS ${PLUGIN} 44 | LIBRARY 45 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 46 | ) 47 | install (FILES manifest.ttl ${PLUGIN}.ttl 48 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 49 | ) 50 | 51 | #if(CAIRO_FOUND AND NTK_FOUND) 52 | # find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 53 | # fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 54 | # 55 | # add_library(${PLUGIN}_ui SHARED 56 | # stuck.h 57 | # stuck_ui_main.cxx 58 | # ${${PLUGIN}_ui_FLTK_UI_SRCS} 59 | # ) 60 | # set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 61 | # set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 62 | # target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 63 | # 64 | # install(TARGETS ${PLUGIN}_ui 65 | # LIBRARY 66 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 67 | # ) 68 | # 69 | #else() 70 | # message(WARNING "UI Libraries Missing, no GUI will be installed") 71 | #endif() 72 | 73 | -------------------------------------------------------------------------------- /src/bentdelay/bentdelay.ttl: -------------------------------------------------------------------------------- 1 | @prefix doap: . 2 | @prefix foaf: . 3 | @prefix rdf: . 4 | @prefix rdfs: . 5 | @prefix units: . 6 | 7 | @prefix lv2: . 8 | @prefix ui: . 9 | @prefix mod: . 10 | @prefix modgui: . 11 | 12 | 13 | a lv2:Plugin, lv2:DelayPlugin ; 14 | doap:name "the infamous bent delay" ; 15 | doap:license ; 16 | doap:description "a circuit-bent delay"; 17 | doap:maintainer [ 18 | foaf:name "Spencer Jackson" ; 19 | foaf:homepage ; 20 | foaf:mbox ; 21 | ] ; 22 | mod:brand "infamous"; 23 | mod:label "bent delay"; 24 | lv2:minorVersion 0 ; 25 | lv2:microVersion 1 ; 26 | rdfs:comment "This lo-fi delay subtracts a downsampled (aliased) delayed signal from the original. Makes gritty slapback sounds or surprisingly warm textures." ; 27 | lv2:optionalFeature lv2:hardRTCapable ; 28 | 29 | lv2:port [ 30 | a lv2:InputPort, lv2:AudioPort ; 31 | lv2:index 0 ; 32 | lv2:symbol "INPUT" ; 33 | lv2:name "Audio In" ; 34 | ] ; 35 | lv2:port [ 36 | a lv2:OutputPort, lv2:AudioPort ; 37 | lv2:index 1 ; 38 | lv2:symbol "OUTPUT" ; 39 | lv2:name "Audio Out" ; 40 | ] ; 41 | lv2:port [ 42 | a lv2:InputPort, lv2:ControlPort ; 43 | lv2:index 2 ; 44 | lv2:symbol "DECIMATE" ; 45 | lv2:name "Bend" ; 46 | lv2:portProperty lv2:enumeration ; 47 | lv2:scalePoint [ rdfs:label "1x"; rdf:value 0 ] ; 48 | lv2:scalePoint [ rdfs:label "2x"; rdf:value 1 ] ; 49 | lv2:scalePoint [ rdfs:label "4x"; rdf:value 2 ] ; 50 | lv2:scalePoint [ rdfs:label "8x"; rdf:value 3 ] ; 51 | lv2:scalePoint [ rdfs:label "16x"; rdf:value 4 ] ; 52 | lv2:scalePoint [ rdfs:label "32x"; rdf:value 5 ] ; 53 | lv2:default 3.0 ; 54 | lv2:minimum 0.0 ; 55 | lv2:maximum 5.0 ; 56 | ], [ 57 | a lv2:InputPort, lv2:ControlPort ; 58 | lv2:index 3 ; 59 | lv2:symbol "DELAY" ; 60 | lv2:name "Delay" ; 61 | lv2:default 300.0 ; 62 | lv2:minimum 0.0 ; 63 | lv2:maximum 1400.0 ; 64 | units:unit units:ms ; 65 | ], [ 66 | a lv2:InputPort, lv2:ControlPort ; 67 | lv2:index 4 ; 68 | lv2:symbol "FEEDBACK" ; 69 | lv2:name "Feedback" ; 70 | lv2:default 50.0 ; 71 | lv2:minimum 0.0 ; 72 | lv2:maximum 100.0 ; 73 | units:unit units:pc ; 74 | ] . 75 | -------------------------------------------------------------------------------- /src/bentdelay/falter.c: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //falter.c 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include"falter.h" 9 | 10 | 11 | typedef struct _FALTER 12 | { 13 | uint16_t w; 14 | float *buf; 15 | uint16_t mask; 16 | float sample_rate; 17 | 18 | float *input_p; 19 | float *output_p; 20 | float *decimate_p; 21 | float *delay_p; 22 | float *feedback_p; 23 | } FALTER; 24 | 25 | 26 | void run_falter(LV2_Handle handle, uint32_t nframes) 27 | { 28 | FALTER* plug = (FALTER*)handle; 29 | float* in, *out, *buf, fb; 30 | uint16_t i,w, delay, mask, downmask; 31 | 32 | in = plug->input_p; 33 | out = plug->output_p; 34 | buf = plug->buf; 35 | w = plug->w; 36 | mask = plug->mask; 37 | downmask = (mask<<(uint8_t)*plug->decimate_p)&mask; 38 | fb = *plug->feedback_p/100; 39 | 40 | delay = *plug->delay_p*plug->sample_rate/1000.0; 41 | 42 | for (i=0;iw = w; 52 | 53 | return; 54 | } 55 | 56 | LV2_Handle init_falter(const LV2_Descriptor *descriptor,double sample_rate, const char *bundle_path,const LV2_Feature * const* host_features) 57 | { 58 | uint32_t tmp; 59 | 60 | FALTER* plug = malloc(sizeof(FALTER)); 61 | 62 | tmp = 0x10000;//for 196k 63 | //if(sample_rate<100000)//88.2 or 96kHz //I'm commenting this out so that we have longer delay times available 64 | // tmp = tmp>>1; //if using higher sampling rates then it will wrap around once you've 65 | //if(sample_rate<50000)//44.1 or 48kHz //exceeded the 16 bits, but who seriously uses 196k?exceeded the 16 bits, but who seriously uses 196k? 66 | // tmp = tmp>>1; 67 | plug->buf = (float*)malloc(tmp*sizeof(float)); 68 | plug->w = 0; 69 | plug->mask = tmp-1; 70 | 71 | plug->sample_rate = sample_rate; 72 | 73 | return plug; 74 | } 75 | 76 | void connect_falter_ports(LV2_Handle handle, uint32_t port, void *data) 77 | { 78 | FALTER* plug = (FALTER*)handle; 79 | switch(port) 80 | { 81 | case IN: 82 | plug->input_p = (float*)data; 83 | break; 84 | case OUT: 85 | plug->output_p = (float*)data; 86 | break; 87 | case DECIMATE: 88 | plug->decimate_p = (float*)data; 89 | break; 90 | case DELAY: 91 | plug->delay_p = (float*)data; 92 | break; 93 | case FEEDBACK: 94 | plug->feedback_p = (float*)data; 95 | break; 96 | default: 97 | puts("UNKNOWN PORT YO!!"); 98 | } 99 | } 100 | 101 | void cleanup_falter(LV2_Handle handle) 102 | { 103 | FALTER* plug = (FALTER*)handle; 104 | free(plug->buf); 105 | free(plug); 106 | } 107 | 108 | static const LV2_Descriptor falter_descriptor= 109 | { 110 | FALTER_URI, 111 | init_falter, 112 | connect_falter_ports, 113 | 0,//activate 114 | run_falter, 115 | 0,//deactivate 116 | cleanup_falter, 117 | 0//extension 118 | }; 119 | 120 | LV2_SYMBOL_EXPORT 121 | const LV2_Descriptor* lv2_descriptor(uint32_t index) 122 | { 123 | switch (index) 124 | { 125 | case 0: 126 | return &falter_descriptor; 127 | default: 128 | return 0; 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /src/bentdelay/falter.h: -------------------------------------------------------------------------------- 1 | #ifndef FALTER_H 2 | #define FALTER_H 3 | 4 | #define FALTER_URI "http://ssj71.github.io/infamousPlugins/plugs.html#bentdelay" 5 | 6 | enum falter_ports 7 | { 8 | IN =0, 9 | OUT, 10 | DECIMATE, 11 | DELAY, 12 | FEEDBACK 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/bentdelay/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:PitchPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | -------------------------------------------------------------------------------- /src/casynth/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous casynth 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "casynth") 5 | include(CheckCCompilerFlag) 6 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -std=c99 -Og") 7 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 8 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 9 | if(SUPPORTS_SSE) 10 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 11 | endif(SUPPORTS_SSE) 12 | if(SUPPORTS_FAST_MATH) 13 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 14 | endif(SUPPORTS_FAST_MATH) 15 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 16 | 17 | if(NOT LIBDIR) 18 | set(LIBDIR "lib") 19 | endif(NOT LIBDIR) 20 | 21 | # check for our various libraries 22 | find_package(PkgConfig) 23 | pkg_check_modules(CAIRO cairo) 24 | pkg_check_modules(NTK ntk) 25 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 26 | 27 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 28 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 29 | 30 | # config libraries 31 | 32 | #PLUGIN FILES HERE 33 | add_library(${PLUGIN} SHARED 34 | casynth.c 35 | waves.c 36 | note.c 37 | ) 38 | 39 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 40 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 41 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 42 | 43 | # config install 44 | install(TARGETS ${PLUGIN} 45 | LIBRARY 46 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 47 | ) 48 | install (FILES manifest.ttl ${PLUGIN}.ttl ${PLUGIN}_presets.ttl 49 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 50 | ) 51 | 52 | if(CAIRO_FOUND AND NTK_FOUND) 53 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 54 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 55 | 56 | #PLUGIN UI FILES HERE 57 | add_library(${PLUGIN}_ui SHARED 58 | casynth_ui_main.cxx 59 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 60 | ) 61 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 62 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 63 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 64 | 65 | install(TARGETS ${PLUGIN}_ui 66 | LIBRARY 67 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 68 | ) 69 | 70 | else() 71 | message(WARNING "UI Libraries Missing, no GUI will be installed") 72 | endif() 73 | -------------------------------------------------------------------------------- /src/casynth/casynth.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //casynth.h 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #define CASYNTH_URI "http://ssj71.github.io/infamousPlugins/plugs.html#casynth" 12 | 13 | 14 | typedef struct _CASYNTH 15 | { 16 | double sample_rate; 17 | WAVESOURCE waves; 18 | NOTE note[127]; 19 | uint8_t active[127]; 20 | uint8_t nactive; 21 | bool sus; 22 | uint8_t sustained[127]; 23 | uint8_t nsustained; 24 | float ibpm; 25 | 26 | double pitchbend; 27 | 28 | uint8_t harmonic_mode; 29 | uint8_t ncells; 30 | float cell_lifetime; 31 | float harm_gain_sinc[MAX_N_HARMONICS+1]; 32 | float harm_gain_saw[MAX_N_HARMONICS+1]; 33 | float harm_gain_sqr[MAX_N_HARMONICS+1]; 34 | float harm_gain_tri[MAX_N_HARMONICS+1]; 35 | float* harm_gains;//points to appropriate array 36 | 37 | float envelope[6]; 38 | 39 | float amod_g; 40 | float fmod_g; 41 | 42 | //lv2 stuff 43 | LV2_URID midi_event_type; 44 | LV2_URID other_type; 45 | //LV2_URID atom_Sequence; 46 | LV2_URID float_type; 47 | LV2_URID long_type; 48 | LV2_URID time_info_type; 49 | LV2_URID beatsperbar_type; 50 | LV2_URID bpm_type; 51 | LV2_URID speed_type; 52 | LV2_URID frame_type; 53 | LV2_URID framespersec_type; 54 | 55 | //ports 56 | LV2_Atom_Sequence* midi_in_p; 57 | float* output_p; 58 | 59 | float* channel_p; 60 | 61 | float* master_gain_p; 62 | float* cell_life_p; 63 | float* rule_p; 64 | float* init_cells_p; 65 | float* nharmonics_p; 66 | float* harmonic_mode_p; 67 | float* harmonic_width_p; 68 | float* wave_p; 69 | 70 | float* env_a_p; 71 | float* env_d_p; 72 | float* env_b_p; 73 | float* env_swl_p; 74 | float* env_sus_p; 75 | float* env_r_p; 76 | 77 | float* amod_wave_p; 78 | float* amod_freq_p; 79 | float* amod_gain_p; 80 | float* fmod_wave_p; 81 | float* fmod_freq_p; 82 | float* fmod_gain_p; 83 | 84 | 85 | } CASYNTH; 86 | 87 | enum casynth_ports 88 | { 89 | MIDI_IN =0, 90 | OUTPUT, 91 | CHANNEL, 92 | MASTER_GAIN, 93 | RULE, 94 | CELL_LIFE,//5 95 | INIT_CELLS, 96 | NHARMONICS, 97 | HARM_MODE, 98 | HARM_WIDTH, 99 | WAVE, 100 | ENV_A,//11 101 | ENV_D, 102 | ENV_B, 103 | ENV_SWL, 104 | ENV_SUS, 105 | ENV_R,//16 106 | AMOD_WAV, 107 | AMOD_FREQ, 108 | AMOD_GAIN, 109 | FMOD_WAV, 110 | FMOD_FREQ,//21 111 | FMOD_GAIN 112 | }; 113 | -------------------------------------------------------------------------------- /src/casynth/constants.h: -------------------------------------------------------------------------------- 1 | //constants.h 2 | 3 | #include 4 | #include 5 | 6 | //harmonic stuff 7 | #define MAX_N_HARMONICS 16 8 | #define HARMONIC_MODE_SINC 0 9 | #define HARMONIC_MODE_SAW 1 10 | #define HARMONIC_MODE_SQR 2 11 | #define HARMONIC_MODE_TRI 3 12 | 13 | #define FUNC_SIN 0 14 | #define FUNC_SAW 1 15 | #define FUNC_SQR 2 16 | #define FUNC_TRI 3 17 | #define FUNC_WHITE 4 18 | #define FUNC_RAND 5 19 | 20 | //midi stuff 21 | #define MIDI_NOTE_OFF 0x80 22 | #define MIDI_NOTE_ON 0x90 23 | #define MIDI_KEYPRESSURE 0xA0 24 | #define MIDI_CONTROL_CHANGE 0xB0 25 | #define MIDI_PROGRAMCHANGE 0xC0 26 | #define MIDI_CHANNELPRESSURE 0xD0 27 | #define MIDI_PITCHBEND 0xE0 28 | 29 | #define MIDI_TYPE_MASK 0xF0 30 | #define MIDI_CHANNEL_MASK 0x0F 31 | #define MIDI_DATA_MASK 0x7F 32 | #define MIDI_PITCH_CENTER 0x2000 33 | #define MIDI_SUSTAIN_PEDAL 0x40 34 | #define MIDI_ALL_NOTES_OFF 123 35 | #define MIDI_ALL_SOUND_OFF 120 36 | 37 | 38 | 39 | //angles 40 | #define PI 3.1415926535897932384626433832795 41 | #define INV_A .00227272727272727272727272727272727272727 42 | 43 | //envelope states 44 | #define ENV_ATTACK 0 45 | #define ENV_DECAY 1 46 | #define ENV_BREAK 2 47 | #define ENV_SWELL 3 48 | #define ENV_SUSTAIN 4 49 | #define ENV_RELEASE 5 50 | -------------------------------------------------------------------------------- /src/casynth/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:InstrumentPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | -------------------------------------------------------------------------------- /src/casynth/note.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //note.h 3 | #include 4 | #include 5 | 6 | 7 | typedef struct _NOTE 8 | { 9 | //midi stuff 10 | uint8_t value; 11 | float velocity; 12 | double pitchbend; 13 | uint32_t start_frame; 14 | uint32_t release_frame; 15 | bool sus; 16 | float gain;//master gain 17 | 18 | //harmonics stuff 19 | uint8_t* nharmonics; 20 | float* harm_length; 21 | uint16_t cells; //list of currently alive harmonics 22 | bool harmonic[MAX_N_HARMONICS]; 23 | uint32_t nframes_since_harm_change; 24 | float harm_gain[MAX_N_HARMONICS+1]; 25 | float fwidth[MAX_N_HARMONICS]; //frequency error/width of harmonics 26 | 27 | double step[MAX_N_HARMONICS+1];//step size between frames 28 | double phase[MAX_N_HARMONICS+1];//phase of all waves + fundamental 29 | 30 | double (*base_func)(WAVESOURCE*, HYSTERESIS*, double); //sin, tri, sqr, white, rand, other? 31 | uint8_t base_wave; 32 | //double base_func_min;//domain of function i.e. [-pi,pi] 33 | //double base_func_max; 34 | HYSTERESIS hyst[MAX_N_HARMONICS + 1]; 35 | 36 | //the envelope transitions are handled through recursing, midi events through multiple calls of play 37 | float env_gain; 38 | uint8_t env_state;//0a, 1d, 2b, 3s, 4s, 5r 39 | float envelope[6];//slope/slope/val/slope/val/slope of envelope ADBSSR 40 | bool note_dead; 41 | 42 | uint8_t amod_wave; 43 | float* amod_gain; 44 | double amod_step; 45 | double amod_phase; 46 | HYSTERESIS ahyst; 47 | 48 | uint8_t fmod_wave; 49 | float* fmod_gain;//gain 1 mods \pm 1 semitone 50 | double fmod_step; 51 | double fmod_phase; 52 | HYSTERESIS fhyst; 53 | } NOTE; 54 | 55 | void init_note(NOTE *self, WAVESOURCE* waves, double sample_rate, uint8_t value, uint8_t* nharmonics, float* harmonic_length, float* amod_gain, float* fmod_gain); 56 | void start_note(NOTE *self, WAVESOURCE* waves, uint8_t velocity, uint32_t start_frame, float harmonic_gain[], uint16_t harmonics, float width, float envelope[]); 57 | void play_note(NOTE *self, WAVESOURCE* waves, uint32_t nframes, float buffer[], double pitchbend, float gain, uint16_t rule, uint8_t base_wave, uint8_t fmod_wave, double fmod_step, uint8_t amod_wave, double amod_step); 58 | void end_note(NOTE *self, uint32_t release_frame); 59 | void release(NOTE *self, uint16_t harmonics); 60 | -------------------------------------------------------------------------------- /src/casynth/waves.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //waves.h 3 | #include 4 | 5 | #define TABLE_LENGTH 2520 6 | //1920 = (2^7)(3)5 7 | //2520 = (2^3)(3^2)(5)(7) 8 | #define SAW_MIN 0; 9 | #define SAW_MAX TABLE_LENGTH; 10 | 11 | 12 | //make it OO 13 | typedef struct _HYSTERESIS 14 | { 15 | double prev_phase; 16 | double prev_val; 17 | 18 | } HYSTERESIS; 19 | 20 | struct _WAVESOURCE; 21 | typedef struct _WAVESOURCE WAVESOURCE; 22 | 23 | struct _WAVESOURCE 24 | { 25 | double saw_table[TABLE_LENGTH]; 26 | double tri_table[TABLE_LENGTH]; 27 | double saw_step; 28 | double half_phase; 29 | double phase_coeff; 30 | double phase_offset; 31 | 32 | double (*wave_func[6])(WAVESOURCE* , HYSTERESIS* , double); 33 | double (*sin_func)(WAVESOURCE* , HYSTERESIS* , double); 34 | double (*saw_func)(WAVESOURCE* , HYSTERESIS* , double); 35 | double (*sqr_func)(WAVESOURCE* , HYSTERESIS* , double); 36 | double (*tri_func)(WAVESOURCE* , HYSTERESIS* , double); 37 | double (*white_func)(WAVESOURCE* , HYSTERESIS* , double); 38 | double (*rand_func)(WAVESOURCE* , HYSTERESIS* , double); 39 | 40 | double func_min; 41 | double func_max; 42 | double func_domain; 43 | 44 | double V; 45 | double V2; 46 | }; 47 | 48 | double myPow2(double x); 49 | 50 | void init_waves(WAVESOURCE* self); 51 | void init_hysteresis(HYSTERESIS *self); 52 | double mySin(WAVESOURCE* self, HYSTERESIS* mem, double x); 53 | double saw(WAVESOURCE* self, HYSTERESIS* mem, double phase); 54 | double square(WAVESOURCE* self, HYSTERESIS *mem, double phase); 55 | double triangle(WAVESOURCE* self, HYSTERESIS *mem, double phase); 56 | double white(WAVESOURCE* self, HYSTERESIS *mem, double phase); 57 | double randomsnh(WAVESOURCE* self, HYSTERESIS *mem, double phase); 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/cheapdist/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous stuck 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "cheapdist") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | cheapdist.c 35 | ) 36 | 37 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 38 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 39 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 40 | 41 | # config install 42 | install(TARGETS ${PLUGIN} 43 | LIBRARY 44 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 45 | ) 46 | install (FILES manifest.ttl ${PLUGIN}.ttl 47 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 48 | ) 49 | 50 | if(CAIRO_FOUND AND NTK_FOUND) 51 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 52 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 53 | 54 | add_library(${PLUGIN}_ui SHARED 55 | cheapdist_ui_main.cxx 56 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 57 | ) 58 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 59 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 60 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 61 | 62 | install(TARGETS ${PLUGIN}_ui 63 | LIBRARY 64 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 65 | ) 66 | 67 | else() 68 | message(WARNING "UI Libraries Missing, no GUI will be installed") 69 | endif() 70 | 71 | -------------------------------------------------------------------------------- /src/cheapdist/cheapdist.c: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //cheapdist.c 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | //this bitfield punning buisness is bad form and you're a bad developer for 11 | //even looking at code like this. But it works with gcc on x86 so I did it. 12 | typedef union 13 | { 14 | float f; 15 | struct 16 | { 17 | union val 18 | { 19 | uint32_t num : 31; 20 | struct ieee 21 | { 22 | uint32_t significand : 23; 23 | uint32_t exponent : 8; 24 | } ieee754; 25 | } value; 26 | uint32_t sign : 1; 27 | } parts; 28 | } float_dissector; 29 | 30 | 31 | typedef struct _CHEAPDIST 32 | { 33 | uint8_t scale[4]; 34 | 35 | float *input_p; 36 | float *output_p; 37 | float *aggression_p; 38 | } CHEAPDIST; 39 | 40 | void run_cheapdist(LV2_Handle handle, uint32_t nframes) 41 | { 42 | CHEAPDIST* plug = (CHEAPDIST*)handle; 43 | 44 | float_dissector f; 45 | uint32_t i; 46 | uint8_t index = *plug->aggression_p; 47 | 48 | for(i=0; iinput_p[i]; 51 | f.parts.value.num = (f.parts.value.num)>>index; 52 | f.parts.value.ieee754.exponent += plug->scale[index]; 53 | plug->output_p[i] = f.f; 54 | } 55 | } 56 | 57 | LV2_Handle init_cheapdist(const LV2_Descriptor *descriptor,double sample_rate, const char *bundle_path,const LV2_Feature * const* host_features) 58 | { 59 | CHEAPDIST* plug = malloc(sizeof(CHEAPDIST)); 60 | 61 | plug->scale[0] = 0; 62 | plug->scale[1] = 63; 63 | plug->scale[2] = 95; 64 | plug->scale[3] = 111; 65 | 66 | return plug; 67 | } 68 | 69 | void connect_cheapdist_ports(LV2_Handle handle, uint32_t port, void *data) 70 | { 71 | CHEAPDIST* plug = (CHEAPDIST*)handle; 72 | switch(port) 73 | { 74 | case IN: 75 | plug->input_p = (float*)data; 76 | break; 77 | case OUT: 78 | plug->output_p = (float*)data; 79 | break; 80 | case AGGRESSION: 81 | plug->aggression_p = (float*)data; 82 | break; 83 | default: 84 | puts("UNKNOWN PORT YO!!"); 85 | } 86 | } 87 | 88 | void cleanup_cheapdist(LV2_Handle handle) 89 | { 90 | CHEAPDIST* plug = (CHEAPDIST*)handle; 91 | free(plug); 92 | } 93 | 94 | static const LV2_Descriptor cheapdist_descriptor= 95 | { 96 | CHEAPDIST_URI, 97 | init_cheapdist, 98 | connect_cheapdist_ports, 99 | 0,//activate 100 | run_cheapdist, 101 | 0,//deactivate 102 | cleanup_cheapdist, 103 | 0//extension 104 | }; 105 | 106 | LV2_SYMBOL_EXPORT 107 | const LV2_Descriptor* lv2_descriptor(uint32_t index) 108 | { 109 | switch (index) 110 | { 111 | case 0: 112 | return &cheapdist_descriptor; 113 | default: 114 | return 0; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/cheapdist/cheapdist.h: -------------------------------------------------------------------------------- 1 | #ifndef CHEAPDIST_H 2 | #define CHEAPDIST_H 3 | 4 | #define CHEAPDIST_URI "http://ssj71.github.io/infamousPlugins/plugs.html#cheapdist" 5 | 6 | enum cheapdist_ports 7 | { 8 | IN =0, 9 | OUT, 10 | AGGRESSION, 11 | }; 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/cheapdist/cheapdist.ttl: -------------------------------------------------------------------------------- 1 | @prefix doap: . 2 | @prefix foaf: . 3 | @prefix rdf: . 4 | @prefix rdfs: . 5 | @prefix ui: . 6 | @prefix pprops: . 7 | 8 | @prefix lv2: . 9 | 10 | 11 | a lv2:Plugin, lv2:DistortionPlugin ; 12 | doap:name "the infamous cheap distortion" ; 13 | doap:license ; 14 | doap:description "a simple waveshaping distortion"; 15 | doap:maintainer [ 16 | foaf:name "Spencer Jackson" ; 17 | foaf:homepage ; 18 | foaf:mbox ; 19 | ] ; 20 | lv2:minorVersion 0 ; 21 | lv2:microVersion 1 ; 22 | rdfs:comment "This experimental distortion is a simple waveshaper approximating a reflected square, fourth, or eighth root. It does this through bit twiddling, and therefore uses no floating point operations. Its useful to have a simple amplifier to adjust input and output levels."; 23 | lv2:optionalFeature lv2:hardRTCapable ; 24 | ui:ui ; 25 | 26 | lv2:port [ 27 | a lv2:InputPort, lv2:AudioPort ; 28 | lv2:index 0 ; 29 | lv2:symbol "INPUT" ; 30 | lv2:name "Audio In" ; 31 | ] ; 32 | lv2:port [ 33 | a lv2:OutputPort, lv2:AudioPort ; 34 | lv2:index 1 ; 35 | lv2:symbol "OUTPUT" ; 36 | lv2:name "Audio Out" ; 37 | ] ; 38 | lv2:port [ 39 | a lv2:InputPort, lv2:ControlPort ; 40 | lv2:index 2 ; 41 | lv2:symbol "AGGRESSION" ; 42 | lv2:name "aggression" ; 43 | lv2:default 1 ; 44 | lv2:minimum 1 ; 45 | lv2:maximum 3 ; 46 | lv2:portProperty lv2:integer ; 47 | ] . 48 | -------------------------------------------------------------------------------- /src/cheapdist/cheapdist_ui.fl: -------------------------------------------------------------------------------- 1 | # data file for the Fltk User Interface Designer (fluid) 2 | version 1.0300 3 | header_name {.h} 4 | code_name {.cxx} 5 | class CheapDistUI {open 6 | } { 7 | Function {show()} {open 8 | } { 9 | Fl_Window ui { 10 | label {the infamous envelope follower} open 11 | xywh {662 403 252 193} type Double box UP_BOX resizable 12 | code0 {\#include"ffffltk.h"} 13 | code1 {\#include"lv2/lv2plug.in/ns/extensions/ui/ui.h"} 14 | code2 {using namespace ffffltk;} 15 | code3 {o->show();} visible 16 | } { 17 | Fl_Group {} {open selected 18 | xywh {0 0 252 193} resizable 19 | } { 20 | Fl_Box bg { 21 | xywh {0 0 252 193} 22 | code0 {\#include"cheapdist.h"} 23 | code1 {\#include"draw_white.h"} 24 | code3 {o->drawing_h = cairo_code_draw_white_get_height(); o->drawing_w = cairo_code_draw_white_get_width(); o->drawing_f = &cairo_code_draw_white_render;} 25 | class Background 26 | } 27 | Fl_Box title { 28 | xywh {0 0 252 54} 29 | code0 {\#include"draw_cheapLabels.h"} 30 | code1 {o->drawing_h = cairo_code_draw_cheapTitle_get_height(); o->drawing_w = cairo_code_draw_cheapTitle_get_width(); o->drawing_f = &cairo_code_draw_cheapTitle_render;} 31 | code2 {o->stretch = false;} 32 | class Background 33 | } 34 | Fl_Box aglab { 35 | xywh {95 175 98 18} 36 | code0 {\#include"draw_envLabels.h"} 37 | code1 {o->drawing_h = cairo_code_draw_cheapAggression_get_height(); o->drawing_w = cairo_code_draw_cheapAggression_get_width(); o->drawing_f = &cairo_code_draw_cheapAggression_render;} 38 | code2 {o->stretch = false;} 39 | class Background 40 | } 41 | Fl_Box logo { 42 | xywh {5 55 67 133} 43 | code0 {\#include"draw_infamousLogoBW.h"} 44 | code1 {o->drawing_h = cairo_code_draw_infamousLogoBW_get_height(); o->drawing_w = cairo_code_draw_infamousLogoBW_get_width(); o->drawing_f = &cairo_code_draw_infamousLogoBW_render;} 45 | code2 {o->stretch = false;} 46 | class Background 47 | } 48 | Fl_Dial aggression { 49 | callback {write_function(controller,AGGRESSION,sizeof(float),0,&aggression->floatvalue);} 50 | tooltip gain xywh {95 55 99 119} minimum 1 maximum 3 step 0.01 value 1 51 | code1 {\#include"draw_cheapDial.h"} 52 | code2 {o->drawing_h = cairo_code_draw_cheapDial_get_height(); o->drawing_w = cairo_code_draw_cheapDial_get_width(); o->drawing_f = &cairo_code_draw_cheapDial_render;} 53 | code3 {o->lock2int = true;} 54 | class Dial 55 | } 56 | } 57 | } 58 | } 59 | decl {LV2UI_Write_Function write_function;} {public local 60 | } 61 | decl {LV2UI_Controller controller;} {public local 62 | } 63 | Function {idle()} {open return_type void 64 | } { 65 | code {Fl::check(); 66 | Fl::flush();} {} 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/cheapdist/cheapdist_ui_main.cxx: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "cheapdist_ui.h" 6 | #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" 7 | 8 | #define CHEAPDISTUI_URI "http://ssj71.github.io/infamousPlugins/plugs.html#cheapdist_ui" 9 | 10 | static LV2UI_Handle init_cheapdistUI(const struct LV2UI_Descriptor * descriptor, 11 | const char * plugin_uri, 12 | const char * bundle_path, 13 | LV2UI_Write_Function write_function, 14 | LV2UI_Controller controller, 15 | LV2UI_Widget * widget, 16 | const LV2_Feature * const * features) 17 | { 18 | if(strcmp(plugin_uri, CHEAPDIST_URI) != 0) 19 | { 20 | return 0; 21 | } 22 | 23 | CheapDistUI* self = new CheapDistUI(); 24 | if(!self) return 0; 25 | LV2UI_Resize* resize = NULL; 26 | 27 | self->controller = controller; 28 | self->write_function = write_function; 29 | 30 | void* parentXwindow = 0; 31 | for (int i = 0; features[i]; ++i) 32 | { 33 | if (!strcmp(features[i]->URI, LV2_UI__parent)) 34 | { 35 | parentXwindow = features[i]->data; 36 | } 37 | else if (!strcmp(features[i]->URI, LV2_UI__resize)) 38 | { 39 | resize = (LV2UI_Resize*)features[i]->data; 40 | } 41 | 42 | } 43 | 44 | self->ui = self->show(); 45 | fl_open_display(); 46 | // set host to change size of the window 47 | if (resize) 48 | { 49 | resize->ui_resize(resize->handle, self->ui->w(), self->ui->h()); 50 | } 51 | fl_embed( self->ui,(Window)parentXwindow); 52 | *widget = (LV2UI_Widget)fl_xid(self->ui); 53 | 54 | return (LV2UI_Handle)self; 55 | } 56 | 57 | void cleanup_cheapdistUI(LV2UI_Handle ui) 58 | { 59 | CheapDistUI *self = (CheapDistUI*)ui; 60 | 61 | delete self->ui; 62 | delete self; 63 | } 64 | 65 | void cheapdistUI_port_event(LV2UI_Handle ui, uint32_t port_index, uint32_t buffer_size, uint32_t format, const void * buffer) 66 | { 67 | CheapDistUI *self = (CheapDistUI*)ui; 68 | if(!format) 69 | { 70 | float val = *(float*)buffer; 71 | switch(port_index) 72 | { 73 | case AGGRESSION: 74 | self->aggression->value(val); 75 | break; 76 | } 77 | } 78 | } 79 | 80 | static int 81 | idle(LV2UI_Handle handle) 82 | { 83 | CheapDistUI* self = (CheapDistUI*)handle; 84 | self->idle(); 85 | 86 | return 0; 87 | } 88 | 89 | static int 90 | resize_func(LV2UI_Feature_Handle handle, int w, int h) 91 | { 92 | CheapDistUI* self = (CheapDistUI*)handle; 93 | if(self && w>0 && h>0) 94 | self->ui->size(w,h); 95 | 96 | return 0; 97 | } 98 | 99 | static const LV2UI_Idle_Interface idle_iface = { idle }; 100 | static const LV2UI_Resize resize_ui = { 0, resize_func }; 101 | 102 | static const void* 103 | extension_data(const char* uri) 104 | { 105 | if (!strcmp(uri, LV2_UI__idleInterface)) 106 | { 107 | return &idle_iface; 108 | } 109 | if (!strcmp(uri, LV2_UI__resize)) 110 | { 111 | return &resize_ui; 112 | } 113 | return NULL; 114 | } 115 | 116 | static const LV2UI_Descriptor cheapdistUI_descriptor = { 117 | CHEAPDISTUI_URI, 118 | init_cheapdistUI, 119 | cleanup_cheapdistUI, 120 | cheapdistUI_port_event, 121 | extension_data 122 | }; 123 | 124 | LV2_SYMBOL_EXPORT 125 | const LV2UI_Descriptor* lv2ui_descriptor(uint32_t index) 126 | { 127 | switch (index) { 128 | case 0: 129 | return &cheapdistUI_descriptor; 130 | default: 131 | return NULL; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /src/cheapdist/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:DistortionPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | -------------------------------------------------------------------------------- /src/cheapoct/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "cheapoct") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 18 | 19 | if(NOT LIBDIR) 20 | set(LIBDIR "lib") 21 | endif(NOT LIBDIR) 22 | 23 | # check for our various libraries 24 | find_package(PkgConfig) 25 | pkg_check_modules(CAIRO cairo) 26 | pkg_check_modules(NTK ntk) 27 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 28 | 29 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 30 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 31 | 32 | #find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 33 | #fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 34 | 35 | # config libraries 36 | 37 | add_library(${PLUGIN} SHARED 38 | cheapoct.c 39 | ) 40 | 41 | #add_library(${PLUGIN}_ui SHARED 42 | # stuck.h 43 | # stuck_ui_main.cxx 44 | # ${${PLUGIN}_ui_FLTK_UI_SRCS} 45 | #) 46 | 47 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 48 | #set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 49 | 50 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 51 | #set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 52 | 53 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 54 | #target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 55 | 56 | # config install 57 | install(TARGETS ${PLUGIN} 58 | LIBRARY 59 | COMPONENT no-GUI 60 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 61 | ) 62 | 63 | #install(TARGETS ${PLUGIN}_ui 64 | # LIBRARY 65 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 66 | #) 67 | 68 | install (FILES manifest.ttl ${PLUGIN}.ttl 69 | COMPONENT no-GUI 70 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 71 | ) 72 | -------------------------------------------------------------------------------- /src/cheapoct/cheapoct.h: -------------------------------------------------------------------------------- 1 | #ifndef CHEAPOCT_H 2 | #define CHEAPOCT_H 3 | 4 | #define CHEAPOCT_URI "http://ssj71.github.io/infamousPlugins/plugs.html#cheapoct" 5 | 6 | enum cheapoct_ports 7 | { 8 | IN =0, 9 | OUT, 10 | TOL, 11 | WEIGHT, 12 | DBG 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/cheapoct/cheapoct.ttl: -------------------------------------------------------------------------------- 1 | @prefix doap: . 2 | @prefix foaf: . 3 | @prefix rdf: . 4 | @prefix rdfs: . 5 | @prefix units: . 6 | 7 | @prefix lv2: . 8 | @prefix ui: . 9 | 10 | 11 | a lv2:Plugin, lv2:PitchPlugin ; 12 | doap:name "the infamous cheap octave" ; 13 | doap:license ; 14 | doap:description "a simple minimal-latency octave down shifter"; 15 | doap:maintainer [ 16 | foaf:name "Spencer Jackson" ; 17 | foaf:homepage ; 18 | foaf:mbox ; 19 | ] ; 20 | lv2:minorVersion 0 ; 21 | lv2:microVersion 1 ; 22 | rdfs:comment "This experimental octave shifter uses no fft, no spectral techniques but instead just uses a zero order hold to downsample until it finds a place it can smoothly jump to. In ideal circumstances it has a maximum of 1 wavecycle latency but the quality isn't great." ; 23 | lv2:optionalFeature lv2:hardRTCapable ; 24 | 25 | lv2:port [ 26 | a lv2:InputPort, lv2:AudioPort ; 27 | lv2:index 0 ; 28 | lv2:symbol "INPUT" ; 29 | lv2:name "Audio In" ; 30 | ] ; 31 | lv2:port [ 32 | a lv2:OutputPort, lv2:AudioPort ; 33 | lv2:index 1 ; 34 | lv2:symbol "OUTPUT" ; 35 | lv2:name "Audio Out" ; 36 | ] ; 37 | lv2:port [ 38 | a lv2:InputPort, lv2:ControlPort ; 39 | lv2:index 2 ; 40 | lv2:symbol "TOLERANCE" ; 41 | lv2:name "Tolerance" ; 42 | lv2:default 0 ; 43 | lv2:minimum 0 ; 44 | lv2:maximum .01 ; 45 | ], [ 46 | a lv2:InputPort, lv2:ControlPort ; 47 | lv2:index 3 ; 48 | lv2:symbol "WEIGHT" ; 49 | lv2:name "Value/Derivative Weighting" ; 50 | lv2:default 0.50 ; 51 | lv2:minimum 0.0 ; 52 | lv2:maximum 1.0 ; 53 | units:unit units:coef ; 54 | ], [ 55 | a lv2:OutputPort, lv2:ControlPort ; 56 | lv2:index 4 ; 57 | lv2:symbol "DBG" ; 58 | lv2:name "Overflow!" ; 59 | lv2:default 0.0 ; 60 | lv2:minimum 0.0 ; 61 | lv2:maximum 1.0 ; 62 | ] . 63 | -------------------------------------------------------------------------------- /src/cheapoct/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:PitchPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | -------------------------------------------------------------------------------- /src/draw/draw_casFrames.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_CASCELLFRAME_H 2 | #define DRAW_CASCELLFRAME_H 3 | inline int cairo_code_draw_casCellFrame_get_width() 4 | { 5 | return 252; 6 | } 7 | inline int cairo_code_draw_casCellFrame_get_height() 8 | { 9 | return 482; 10 | } 11 | inline void cairo_code_draw_casCellFrame_render(cairo_t *cr) 12 | { 13 | cairo_pattern_t *pattern; 14 | 15 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 16 | cairo_set_line_width(cr, 1.238209); 17 | cairo_set_miter_limit(cr, 4); 18 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT); 19 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 20 | pattern = cairo_pattern_create_rgba(0,0,0,1); 21 | cairo_set_source(cr, pattern); 22 | cairo_pattern_destroy(pattern); 23 | cairo_new_path(cr); 24 | cairo_move_to(cr, 0.0078125, 0.617188); 25 | cairo_line_to(cr, 91.773438, 0.617188); 26 | cairo_line_to(cr, 91.773438, 110.347656); 27 | cairo_line_to(cr, 251.582031, 110.347656); 28 | cairo_line_to(cr, 251.582031, 481.925781); 29 | cairo_set_tolerance(cr, 0.1); 30 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 31 | cairo_stroke_preserve(cr); 32 | /********************/ 33 | } 34 | #endif 35 | #ifndef DRAW_CASFRAME_H 36 | #define DRAW_CASFRAME_H 37 | inline int cairo_code_draw_casFrame_get_width() 38 | { 39 | return 164; 40 | } 41 | inline int cairo_code_draw_casFrame_get_height() 42 | { 43 | return 70; 44 | } 45 | inline void cairo_code_draw_casFrame_render(cairo_t *cr) 46 | { 47 | cairo_pattern_t *pattern; 48 | 49 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 50 | cairo_set_line_width(cr, 1.238209); 51 | cairo_set_miter_limit(cr, 4); 52 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT); 53 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 54 | pattern = cairo_pattern_create_rgba(0,0,0,1); 55 | cairo_set_source(cr, pattern); 56 | cairo_pattern_destroy(pattern); 57 | cairo_new_path(cr); 58 | cairo_move_to(cr, 0.0117188, 0.621094); 59 | cairo_line_to(cr, 163.785156, 0.621094); 60 | cairo_line_to(cr, 163.785156, 69.609375); 61 | cairo_set_tolerance(cr, 0.1); 62 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 63 | cairo_stroke_preserve(cr); 64 | /********************/ 65 | } 66 | #endif 67 | -------------------------------------------------------------------------------- /src/draw/draw_casbg.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_CASBG_H 2 | #define DRAW_CASBG_H 3 | inline int cairo_code_draw_casbg_get_width() 4 | { 5 | return 460; 6 | } 7 | inline int cairo_code_draw_casbg_get_height() 8 | { 9 | return 600; 10 | } 11 | inline void cairo_code_draw_casbg_render(cairo_t *cr) 12 | { 13 | cairo_pattern_t *pattern; 14 | cairo_matrix_t matrix; 15 | 16 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 17 | pattern = cairo_pattern_create_linear(184.28572, 485.93359, 701.42859, 678.79071); 18 | cairo_pattern_add_color_stop_rgba(pattern, 0,0.501961,0.501961,0.501961,1); 19 | cairo_pattern_add_color_stop_rgba(pattern, 0.5,0.666667,0.666667,0.666667,1); 20 | cairo_pattern_add_color_stop_rgba(pattern, 1,0.592157,0.592157,0.592157,1); 21 | cairo_matrix_init(&matrix, 1.514798,0,0,1.421429,25.714295,162.362159); 22 | cairo_pattern_set_matrix(pattern, &matrix); 23 | cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD); 24 | cairo_pattern_set_filter(pattern, CAIRO_FILTER_GOOD); 25 | cairo_set_source(cr, pattern); 26 | cairo_pattern_destroy(pattern); 27 | cairo_paint(cr); 28 | /********************/ 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /src/draw/draw_envScopes.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_ENVSCOPES_H 2 | #define DRAW_ENVSCOPES_H 3 | #include"blur.h" 4 | inline int cairo_code_draw_envScope_get_width() 5 | { 6 | return 600; 7 | } 8 | inline int cairo_code_draw_envScope_get_height() 9 | { 10 | return 200; 11 | } 12 | inline void cairo_code_draw_blue_envScope_render(cairo_t *cr, float *data, uint16_t start) 13 | { 14 | cairo_surface_t *temp_surface; 15 | cairo_t *old_cr = cr; 16 | cairo_pattern_t *pattern; 17 | 18 | temp_surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32,600,200); 19 | cr = cairo_create(temp_surface); 20 | 21 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 22 | cairo_set_line_width(cr, 1); 23 | cairo_set_miter_limit(cr, 4); 24 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE); 25 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 26 | pattern = cairo_pattern_create_rgba(.3,.6,1,1); 27 | cairo_set_source(cr, pattern); 28 | cairo_pattern_destroy(pattern); 29 | cairo_new_path(cr); 30 | 31 | start = (start-1)&0x7FF; 32 | cairo_move_to(cr,598,-183.33*data[start]+183.33); 33 | for(uint16_t i=1; i<596; i++) 34 | { 35 | cairo_line_to(cr,598-i,183.33-183.33*data[(start - i)&0x7FF]); 36 | } 37 | 38 | cairo_set_tolerance(cr, 0.1); 39 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 40 | cairo_stroke_preserve(cr); 41 | /********************/ 42 | 43 | cairo_set_source_surface(old_cr,temp_surface,0,0); 44 | cairo_paint(old_cr); 45 | cairo_surface_destroy(temp_surface); 46 | cairo_destroy(cr); 47 | 48 | } 49 | 50 | inline void cairo_code_draw_green_envScope_render(cairo_t *cr, float *data, uint16_t start) 51 | { 52 | cairo_surface_t *temp_surface; 53 | cairo_t *old_cr = cr; 54 | cairo_pattern_t *pattern; 55 | 56 | temp_surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32,600,200); 57 | cr = cairo_create(temp_surface); 58 | 59 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 60 | cairo_set_line_width(cr, 1); 61 | cairo_set_miter_limit(cr, 4); 62 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE); 63 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 64 | pattern = cairo_pattern_create_rgba(0,1,0,1); 65 | cairo_set_source(cr, pattern); 66 | cairo_pattern_destroy(pattern); 67 | cairo_new_path(cr); 68 | 69 | start = (start-1)&0x7FF; 70 | cairo_move_to(cr,598,-183.33*data[start]+183.33); 71 | for(uint16_t i=1; i<596; i++) 72 | { 73 | cairo_line_to(cr,598-i,183.33-183.33*data[(start - i)&0x7FF]); 74 | } 75 | 76 | cairo_set_tolerance(cr, 0.1); 77 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 78 | cairo_stroke_preserve(cr); 79 | /********************/ 80 | 81 | //blur_image_surface(temp_surface,3); 82 | cairo_set_source_surface(old_cr,temp_surface,0,0); 83 | cairo_paint(old_cr); 84 | cairo_surface_destroy(temp_surface); 85 | cairo_destroy(cr); 86 | 87 | } 88 | #endif 89 | -------------------------------------------------------------------------------- /src/draw/draw_ivorySlider.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_IVORYSLIDER_H 2 | #define DRAW_IVORYSLIDER_H 3 | inline int cairo_code_draw_ivorySlider_get_width() 4 | { 5 | return 38; 6 | } 7 | inline int cairo_code_draw_ivorySlider_get_height() 8 | { 9 | return 157; 10 | } 11 | inline void cairo_code_draw_ivorySlider_render(cairo_t *cr, float val) 12 | { 13 | cairo_pattern_t *pattern; 14 | cairo_matrix_t matrix; 15 | 16 | //slot 17 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 18 | cairo_set_line_width(cr, 3.688728); 19 | cairo_set_miter_limit(cr, 4); 20 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); 21 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 22 | pattern = cairo_pattern_create_rgba(0.101961,0.101961,0.101961,1); 23 | cairo_set_source(cr, pattern); 24 | cairo_pattern_destroy(pattern); 25 | cairo_new_path(cr); 26 | cairo_move_to(cr, 14.625, 3.242188); 27 | cairo_line_to(cr, 14.625, 154.613281); 28 | cairo_set_tolerance(cr, 0.1); 29 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 30 | cairo_stroke_preserve(cr); 31 | /********************/ 32 | 33 | float os = -val*144;//y offset 34 | 35 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 36 | pattern = cairo_pattern_create_linear(33.59362, 795.22748, 22.300592, 772.03607); 37 | cairo_pattern_add_color_stop_rgba(pattern, 0,1,0.964706,0.682353,1); 38 | cairo_pattern_add_color_stop_rgba(pattern, 1,1,1,1,1); 39 | cairo_matrix_init(&matrix, 1.018716,-1.085302,4.234344,3.974557,-625.375116,199.462944); 40 | cairo_pattern_set_matrix(pattern, &matrix); 41 | cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD); 42 | cairo_pattern_set_filter(pattern, CAIRO_FILTER_GOOD); 43 | cairo_set_source(cr, pattern); 44 | cairo_pattern_destroy(pattern); 45 | cairo_new_path(cr); 46 | cairo_move_to(cr, 2.523438, 154.683594 + os); 47 | cairo_curve_to(cr, -0.25, 154.277344 + os, -0.324219, 144.851562 + os, 2.441406, 144.441406 + os); 48 | cairo_curve_to(cr, 5.207031, 144.03125 + os, 37.085938, 153.609375 + os, 37.09375, 154.425781 + os); 49 | cairo_curve_to(cr, 37.097656, 155.246094 + os, 5.292969, 155.09375 + os, 2.523438, 154.683594 + os); 50 | cairo_close_path(cr); 51 | cairo_set_tolerance(cr, 0.1); 52 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 53 | cairo_set_fill_rule(cr, CAIRO_FILL_RULE_WINDING); 54 | cairo_fill_preserve(cr); 55 | /********************/ 56 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 57 | cairo_set_line_width(cr, 0.825892); 58 | cairo_set_miter_limit(cr, 4); 59 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); 60 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 61 | pattern = cairo_pattern_create_rgba(0.301961,0.301961,0.301961,1); 62 | cairo_set_source(cr, pattern); 63 | cairo_pattern_destroy(pattern); 64 | cairo_new_path(cr); 65 | cairo_move_to(cr, 2.523438, 154.683594 + os); 66 | cairo_curve_to(cr, -0.25, 154.277344 + os, -0.324219, 144.851562 + os, 2.441406, 144.441406 + os); 67 | cairo_curve_to(cr, 5.207031, 144.03125 + os, 37.085938, 153.609375 + os, 37.09375, 154.425781 + os); 68 | cairo_curve_to(cr, 37.097656, 155.246094 + os, 5.292969, 155.09375 + os, 2.523438, 154.683594 + os); 69 | cairo_close_path(cr); 70 | cairo_set_tolerance(cr, 0.1); 71 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 72 | cairo_stroke_preserve(cr); 73 | /********************/ 74 | } 75 | #endif 76 | -------------------------------------------------------------------------------- /src/draw/draw_lushGraphPoint.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_LUSHGRAPHPOINT_H 2 | #define DRAW_LUSHGRAPHPOINT_H 3 | inline int cairo_code_draw_lushGraphPoint_get_width() { return 21; } 4 | inline int cairo_code_draw_lushGraphPoint_get_height() { return 21; } 5 | inline void cairo_code_draw_lushGraphPoint_render(cairo_t *cr, float r, float g, float b) { 6 | cairo_pattern_t *pattern; 7 | cairo_matrix_t matrix; 8 | 9 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 10 | cairo_set_line_width(cr, 4); 11 | cairo_set_miter_limit(cr, 4); 12 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); 13 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 14 | pattern = cairo_pattern_create_rgba(r,g,b,1); 15 | cairo_set_source(cr, pattern); 16 | cairo_pattern_destroy(pattern); 17 | cairo_new_path(cr); 18 | cairo_move_to(cr, 19.582031, 10.753906); 19 | cairo_curve_to(cr, 19.582031, 15.636719, 15.621094, 19.597656, 10.734375, 19.597656); 20 | cairo_curve_to(cr, 5.851562, 19.597656, 1.890625, 15.636719, 1.890625, 10.753906); 21 | cairo_curve_to(cr, 1.890625, 5.867188, 5.851562, 1.910156, 10.734375, 1.910156); 22 | cairo_curve_to(cr, 15.621094, 1.910156, 19.582031, 5.867188, 19.582031, 10.753906); 23 | cairo_close_path(cr); 24 | cairo_move_to(cr, 19.582031, 10.753906); 25 | cairo_set_tolerance(cr, 0.1); 26 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 27 | cairo_matrix_init(&matrix, 0.952449,0,0,0.952449,318.921679,-179.030695); 28 | cairo_pattern_set_matrix(pattern, &matrix); 29 | cairo_stroke_preserve(cr); 30 | /********************/ 31 | } 32 | 33 | inline void cairo_code_draw_lushGraphPointr_render(cairo_t *cr) 34 | { 35 | cairo_code_draw_lushGraphPoint_render(cr, 1, 0, 0); 36 | } 37 | 38 | inline void cairo_code_draw_lushGraphPointb_render(cairo_t *cr) 39 | { 40 | cairo_code_draw_lushGraphPoint_render(cr, .2, .1, 1); 41 | } 42 | 43 | inline void cairo_code_draw_lushGraphPointg_render(cairo_t *cr) 44 | { 45 | cairo_code_draw_lushGraphPoint_render(cr, 0, 0.88235, 0); 46 | } 47 | 48 | inline void cairo_code_draw_lushGraphPointo_render(cairo_t *cr) 49 | { 50 | cairo_code_draw_lushGraphPoint_render(cr, 1, .33333, 0); 51 | } 52 | 53 | inline void cairo_code_draw_lushGraphPointy_render(cairo_t *cr) 54 | { 55 | cairo_code_draw_lushGraphPoint_render(cr, 0.92157, 0.92157, 0); 56 | } 57 | 58 | inline void cairo_code_draw_lushGraphPointp_render(cairo_t *cr) 59 | { 60 | cairo_code_draw_lushGraphPoint_render(cr, 0.78431, 0, 1); 61 | } 62 | 63 | inline void cairo_code_draw_lushGraphPointw_render(cairo_t *cr) 64 | { 65 | cairo_code_draw_lushGraphPoint_render(cr, 0.9, 0.9, 0.9); 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /src/draw/draw_lushGraphXBound.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_LUSHGRAPHXBOUND_H 2 | #define DRAW_LUSHGRAPHXBOUND_H 3 | inline int cairo_code_draw_lushGraphXBound_get_width() { return 8; } 4 | inline int cairo_code_draw_lushGraphXBound_get_height() { return 21; } 5 | inline void cairo_code_draw_lushGraphXBound_render(cairo_t *cr, float r, float g, float b) { 6 | cairo_pattern_t *pattern; 7 | //cairo_matrix_t matrix; 8 | 9 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 10 | cairo_set_line_width(cr, 7.318619); 11 | cairo_set_miter_limit(cr, 8); 12 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT); 13 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 14 | pattern = cairo_pattern_create_rgba(r,g,b,1); 15 | cairo_set_source(cr, pattern); 16 | cairo_pattern_destroy(pattern); 17 | cairo_new_path(cr); 18 | cairo_move_to(cr, 3.671875, 0.00390625); 19 | cairo_line_to(cr, 3.671875, 20.652344); 20 | cairo_set_tolerance(cr, 0.1); 21 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 22 | //cairo_matrix_init(&matrix, 1,0,0,1,7.3125,-18.09375); 23 | //cairo_pattern_set_matrix(pattern, &matrix); 24 | cairo_stroke_preserve(cr); 25 | /********************/ 26 | } 27 | 28 | inline void cairo_code_draw_lushGraphXBoundr_render(cairo_t *cr) 29 | { 30 | cairo_code_draw_lushGraphXBound_render(cr, 1, 0, 0); 31 | } 32 | 33 | inline void cairo_code_draw_lushGraphXBoundb_render(cairo_t *cr) 34 | { 35 | cairo_code_draw_lushGraphXBound_render(cr, 0.2, 0.1, 1); 36 | } 37 | 38 | inline void cairo_code_draw_lushGraphXBoundg_render(cairo_t *cr) 39 | { 40 | cairo_code_draw_lushGraphXBound_render(cr, 0, 0.88235, 0); 41 | } 42 | 43 | inline void cairo_code_draw_lushGraphXBoundo_render(cairo_t *cr) 44 | { 45 | cairo_code_draw_lushGraphXBound_render(cr, 1, .33333, 0); 46 | } 47 | 48 | inline void cairo_code_draw_lushGraphXBoundy_render(cairo_t *cr) 49 | { 50 | cairo_code_draw_lushGraphXBound_render(cr, 0.92157, 0.92157, 0); 51 | } 52 | 53 | inline void cairo_code_draw_lushGraphXBoundp_render(cairo_t *cr) 54 | { 55 | cairo_code_draw_lushGraphXBound_render(cr, 0.78431, 0, 1); 56 | } 57 | #endif 58 | -------------------------------------------------------------------------------- /src/draw/draw_lushGraphYBound.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_LUSHGRAPHYBOUND_H 2 | #define DRAW_LUSHGRAPHYBOUND_H 3 | inline int cairo_code_draw_lushGraphYBound_get_width() { return 21; } 4 | inline int cairo_code_draw_lushGraphYBound_get_height() { return 8; } 5 | inline void cairo_code_draw_lushGraphYBound_render(cairo_t *cr, float r, float g, float b) { 6 | cairo_pattern_t *pattern; 7 | cairo_matrix_t matrix; 8 | 9 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 10 | cairo_set_line_width(cr, 7.318619); 11 | cairo_set_miter_limit(cr, 8); 12 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT); 13 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 14 | pattern = cairo_pattern_create_rgba(r,g,b,1); 15 | cairo_set_source(cr, pattern); 16 | cairo_pattern_destroy(pattern); 17 | cairo_new_path(cr); 18 | cairo_move_to(cr, 0, 3.671875); 19 | cairo_line_to(cr, 20.648438, 3.671875); 20 | cairo_set_tolerance(cr, 0.1); 21 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 22 | cairo_matrix_init(&matrix, 1,0,0,1,-52.0625,-16.875); 23 | cairo_pattern_set_matrix(pattern, &matrix); 24 | cairo_stroke_preserve(cr); 25 | /********************/ 26 | } 27 | 28 | inline void cairo_code_draw_lushGraphYBoundr_render(cairo_t *cr) 29 | { 30 | cairo_code_draw_lushGraphYBound_render(cr, 1, 0, 0); 31 | } 32 | 33 | inline void cairo_code_draw_lushGraphYBoundb_render(cairo_t *cr) 34 | { 35 | cairo_code_draw_lushGraphYBound_render(cr, 0.2, 0.1, 1); 36 | } 37 | 38 | inline void cairo_code_draw_lushGraphYBoundg_render(cairo_t *cr) 39 | { 40 | cairo_code_draw_lushGraphYBound_render(cr, 0, 0.88235, 0); 41 | } 42 | 43 | inline void cairo_code_draw_lushGraphYBoundo_render(cairo_t *cr) 44 | { 45 | cairo_code_draw_lushGraphYBound_render(cr, 1, .33333, 0); 46 | } 47 | 48 | inline void cairo_code_draw_lushGraphYBoundy_render(cairo_t *cr) 49 | { 50 | cairo_code_draw_lushGraphYBound_render(cr, 0.92157, 0.92157, 0); 51 | } 52 | 53 | inline void cairo_code_draw_lushGraphYBoundp_render(cairo_t *cr) 54 | { 55 | cairo_code_draw_lushGraphYBound_render(cr, 0.78431, 0, 1); 56 | } 57 | #endif 58 | -------------------------------------------------------------------------------- /src/draw/draw_powerbg.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_POWERBG_H 2 | #define DRAW_POWERBG_H 3 | inline int cairo_code_draw_powerbg_get_width() 4 | { 5 | return 487; 6 | } 7 | inline int cairo_code_draw_powerbg_get_height() 8 | { 9 | return 317; 10 | } 11 | inline void cairo_code_draw_powerbg_render(cairo_t *cr) 12 | { 13 | cairo_pattern_t *pattern; 14 | cairo_matrix_t matrix; 15 | 16 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 17 | pattern = cairo_pattern_create_linear(381.83768, 660.42303, 381.83768, 235.14418); 18 | cairo_pattern_add_color_stop_rgba(pattern, 0,0.3,0.3,0.3,1); 19 | cairo_pattern_add_color_stop_rgba(pattern, 0.7,0.6,0.6,0.6,1); 20 | cairo_pattern_add_color_stop_rgba(pattern, 1,0.3,0.3,0.3,1); 21 | cairo_matrix_init(&matrix, 1.173365,0,0,1.142857,68.571426,221.637735); 22 | cairo_pattern_set_matrix(pattern, &matrix); 23 | cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD); 24 | cairo_pattern_set_filter(pattern, CAIRO_FILTER_GOOD); 25 | cairo_set_source(cr, pattern); 26 | cairo_pattern_destroy(pattern); 27 | cairo_new_path(cr); 28 | cairo_move_to(cr, 24.351562, 0); 29 | cairo_curve_to(cr, 79.949219, 0.300781, 487, 0, 487, 0); 30 | cairo_line_to(cr, 487, 317.394531); 31 | cairo_curve_to(cr, 315.113281, 317.394531, 151.8125, 317.394531, 0, 317.394531); 32 | cairo_line_to(cr, 0, 24.382812); 33 | cairo_curve_to(cr, 0, 10.535156, 10.859375, 0, 24.351562, 0); 34 | cairo_close_path(cr); 35 | cairo_set_tolerance(cr, 0.1); 36 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 37 | cairo_set_fill_rule(cr, CAIRO_FILL_RULE_WINDING); 38 | cairo_fill_preserve(cr); 39 | /********************/ 40 | } 41 | #endif 42 | -------------------------------------------------------------------------------- /src/draw/draw_squareDial.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_SQUAREDIAL_H 2 | #define DRAW_SQUAREDIAL_H 3 | inline int cairo_code_draw_squareDial_get_width() 4 | { 5 | return 88; 6 | } 7 | inline int cairo_code_draw_squareDial_get_height() 8 | { 9 | return 88; 10 | } 11 | inline void cairo_code_draw_squareDial_render(cairo_t *cr, int ccw, float r, float g, float b, float val) 12 | { 13 | cairo_pattern_t *pattern; 14 | 15 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 16 | cairo_set_line_width(cr, 6); 17 | cairo_set_miter_limit(cr, 4); 18 | cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE); 19 | cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); 20 | pattern = cairo_pattern_create_rgba(r,g,b,1); 21 | cairo_set_source(cr, pattern); 22 | cairo_pattern_destroy(pattern); 23 | cairo_new_path(cr); 24 | 25 | if(!ccw) 26 | { 27 | cairo_move_to(cr, 84.9, 84.9); 28 | cairo_line_to(cr, 3.1, 84.9); 29 | if(val<.4) 30 | { 31 | cairo_line_to(cr, 3.1, (val/.4)*9.1 + (1-val/.4)*84.9 - 6); 32 | } 33 | else if(val<.6) 34 | { 35 | cairo_line_to(cr, 3.1, 3.1); 36 | cairo_line_to(cr, ((val-.4)/.2)*84.9 + (1-(val-.4)/.2)*3.1, 3.1); 37 | } 38 | else 39 | { 40 | cairo_line_to(cr, 3.1, 3.1); 41 | cairo_line_to(cr, 84.9, 3.1); 42 | cairo_line_to(cr, 84.9, ((val-.6)/.4)*75.9 + (1-(val-.6)/.4)*3.1); 43 | } 44 | } 45 | else 46 | { 47 | cairo_move_to(cr, 3.1, 84.9); 48 | cairo_line_to(cr, 84.9, 84.9); 49 | val = 1-val; 50 | if(val<.4) 51 | { 52 | cairo_line_to(cr, 84.9, (val/.4)*9.1 + (1-val/.4)*84.9 - 6); 53 | } 54 | else if(val<.6) 55 | { 56 | cairo_line_to(cr, 84.9, 3.1); 57 | cairo_line_to(cr, ((val-.4)/.2)*3.1 + (1-(val-.4)/.2)*84.9, 3.1); 58 | } 59 | else 60 | { 61 | cairo_line_to(cr, 84.9, 3.1); 62 | cairo_line_to(cr, 3.1, 3.1); 63 | cairo_line_to(cr, 3.1, ((val-.6)/.4)*75.9 + (1-(val-.6)/.4)*3.1); 64 | } 65 | } 66 | 67 | cairo_set_tolerance(cr, 0.1); 68 | cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT); 69 | cairo_stroke_preserve(cr); 70 | /********************/ 71 | } 72 | inline void cairo_code_draw_squareDialr_render(cairo_t *cr, float val) 73 | { 74 | cairo_code_draw_squareDial_render(cr, 0, 1, 0, 0, val); 75 | } 76 | 77 | inline void cairo_code_draw_squareDialbccw_render(cairo_t *cr, float val) 78 | { 79 | cairo_code_draw_squareDial_render(cr, 1, 0, 0, 1, val); 80 | } 81 | 82 | inline void cairo_code_draw_squareDialgccw_render(cairo_t *cr, float val) 83 | { 84 | cairo_code_draw_squareDial_render(cr, 1, 0, 0.88235, 0, val); 85 | } 86 | 87 | inline void cairo_code_draw_squareDialo_render(cairo_t *cr, float val) 88 | { 89 | cairo_code_draw_squareDial_render(cr, 0, 1, .33333, 0, val); 90 | } 91 | 92 | inline void cairo_code_draw_squareDialy_render(cairo_t *cr, float val) 93 | { 94 | cairo_code_draw_squareDial_render(cr, 0, 0.92157, 0.92157, 0, val); 95 | } 96 | 97 | inline void cairo_code_draw_squareDialpccw_render(cairo_t *cr, float val) 98 | { 99 | cairo_code_draw_squareDial_render(cr, 1, 0.78431, 0, 1, val); 100 | } 101 | #endif 102 | -------------------------------------------------------------------------------- /src/draw/draw_white.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_WHITE_H 2 | #define DRAW_WHITE_H 3 | inline int cairo_code_draw_white_get_width() 4 | { 5 | return 99; 6 | } 7 | inline int cairo_code_draw_white_get_height() 8 | { 9 | return 119; 10 | } 11 | inline void cairo_code_draw_white_render(cairo_t *cr) 12 | { 13 | cairo_pattern_t *pattern; 14 | 15 | cairo_set_operator(cr, CAIRO_OPERATOR_OVER); 16 | pattern = cairo_pattern_create_rgba(1,1,1,1); 17 | cairo_set_source(cr, pattern); 18 | cairo_pattern_destroy(pattern); 19 | cairo_paint(cr); 20 | /********************/ 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /src/duffer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "duffer") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -std=c99 -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw .) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | c_resampler.cpp 35 | duffing.c 36 | rk4.c 37 | ) 38 | 39 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 40 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 41 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m zita-resampler) 42 | 43 | # config install 44 | install(TARGETS ${PLUGIN} 45 | LIBRARY 46 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 47 | ) 48 | install (FILES manifest.ttl ${PLUGIN}.ttl 49 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 50 | ) 51 | 52 | #if(CAIRO_FOUND AND NTK_FOUND) 53 | # find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 54 | # fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 55 | # 56 | # add_library(${PLUGIN}_ui SHARED 57 | # stuck.h 58 | # stuck_ui_main.cxx 59 | # ${${PLUGIN}_ui_FLTK_UI_SRCS} 60 | # ) 61 | # set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 62 | # set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 63 | # target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 64 | # 65 | # install(TARGETS ${PLUGIN}_ui 66 | # LIBRARY 67 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 68 | # ) 69 | # 70 | #else() 71 | # message(WARNING "UI Libraries Missing, no GUI will be installed") 72 | #endif() 73 | -------------------------------------------------------------------------------- /src/duffer/c_resampler.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //c_resampler.h 3 | 4 | // c wrapper for the excellent zita-resampler library 5 | // to learn more about this library and its useage you can read the documentation 6 | // at http://kokkinizita.linuxaudio.org/linuxaudio/zita-resampler/resampler.html 7 | #ifndef __C_RESAMPLER_H 8 | #define __C_RESAMPLER_H 9 | 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef void* RESAMPLER_HANDLE; 16 | 17 | RESAMPLER_HANDLE ResamplerAlloc(); 18 | void ResamplerFree( RESAMPLER_HANDLE ); 19 | int ResamplerSetup( RESAMPLER_HANDLE , unsigned int fs_inp, unsigned int fs_out, unsigned int nchan, unsigned int hlen ); 20 | void ResamplerClear( RESAMPLER_HANDLE ); 21 | int ResamplerReset( RESAMPLER_HANDLE ); 22 | int ResamplerProcess( RESAMPLER_HANDLE ); 23 | int ResamplerNChan( RESAMPLER_HANDLE ); 24 | int ResamplerInpSize( RESAMPLER_HANDLE ); 25 | double ResamplerInpDist( RESAMPLER_HANDLE ); 26 | 27 | //access to public members 28 | unsigned int ResamplerGetInpCount( RESAMPLER_HANDLE ); 29 | void ResamplerSetInpCount( RESAMPLER_HANDLE , unsigned int count); 30 | unsigned int ResamplerGetOutCount( RESAMPLER_HANDLE ); 31 | void ResamplerSetOutCount( RESAMPLER_HANDLE , unsigned int count); 32 | float* ResamplerGetInpData ( RESAMPLER_HANDLE ); 33 | void ResamplerSetInpData ( RESAMPLER_HANDLE , float * data); 34 | float* ResamplerGetOutData ( RESAMPLER_HANDLE ); 35 | void ResamplerSetOutData ( RESAMPLER_HANDLE , float * data); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /src/duffer/c_vresampler.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //c_vresampler.h 3 | 4 | // c wrapper for the excellent zita-resampler library 5 | // to learn more about this library and its useage you can read the documentation 6 | // at http://kokkinizita.linuxaudio.org/linuxaudio/zita-resampler/resampler.html 7 | 8 | #ifndef __C_VRESAMPLER_H 9 | #define __C_VRESAMPLER_H 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | //VVResampler Functions 16 | typedef void* VRESAMPLER_HANDLE; 17 | VRESAMPLER_HANDLE VResamplerAlloc(); 18 | void VResamplerFree( VRESAMPLER_HANDLE ); 19 | int VResamplerSetup( VRESAMPLER_HANDLE , double ratio, unsigned int nchan, unsigned int hlen); 20 | void VResamplerClear( VRESAMPLER_HANDLE ); 21 | int VResamplerReset( VRESAMPLER_HANDLE ); 22 | int VResamplerProcess( VRESAMPLER_HANDLE ); 23 | int VResamplerNChan( VRESAMPLER_HANDLE ); 24 | int VResamplerInpSize( VRESAMPLER_HANDLE ); 25 | double VResamplerInpDist( VRESAMPLER_HANDLE ); 26 | 27 | //access to public members 28 | unsigned int VResamplerGetInpCount( VRESAMPLER_HANDLE ); 29 | void VResamplerSetInpCount( VRESAMPLER_HANDLE , unsigned int count); 30 | unsigned int VResamplerGetOutCount( VRESAMPLER_HANDLE ); 31 | void VResamplerSetOutCount( VRESAMPLER_HANDLE , unsigned int count); 32 | float* VResamplerGetInpData ( VRESAMPLER_HANDLE ); 33 | void VResamplerSetInpData ( VRESAMPLER_HANDLE , float * data); 34 | float* VResamplerGetOutData ( VRESAMPLER_HANDLE ); 35 | void VResamplerSetOutData ( VRESAMPLER_HANDLE , float * data); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /src/duffer/duffer.ttl: -------------------------------------------------------------------------------- 1 | @prefix doap: . 2 | @prefix foaf: . 3 | @prefix rdf: . 4 | @prefix rdfs: . 5 | 6 | @prefix lv2: . 7 | 8 | 9 | a lv2:Plugin, lv2:ModulatorPlugin ; 10 | doap:name "the infamous duffer" ; 11 | doap:license ; 12 | doap:description "a duffing oscillator"; 13 | doap:maintainer [ 14 | foaf:name "Spencer Jackson" ; 15 | foaf:homepage ; 16 | foaf:mbox ; 17 | ] ; 18 | lv2:minorVersion 0 ; 19 | lv2:microVersion 1 ; 20 | rdfs:comment "This is a duffing oscillator which exhibits chaos, even when driven with a stable signal. Its not extremely musical, but can be fun to make some noise. It is analogous to a spring with magnets pulling it in opposite directions. Input your guitar or synth and see what comes out. It has a check to prevent instability." ; 21 | lv2:optionalFeature lv2:hardRTCapable, 22 | ; 23 | 24 | 25 | lv2:port [ 26 | a lv2:InputPort, lv2:AudioPort ; 27 | lv2:index 0 ; 28 | lv2:symbol "INPUT" ; 29 | lv2:name "Audio In" ; 30 | ] ; 31 | lv2:port [ 32 | a lv2:OutputPort, lv2:AudioPort ; 33 | lv2:index 1 ; 34 | lv2:symbol "OUTPUT" ; 35 | lv2:name "Audio Out" ; 36 | ] ; 37 | lv2:port [ 38 | a lv2:InputPort, lv2:ControlPort ; 39 | lv2:index 2 ; 40 | lv2:symbol "DELTA" ; 41 | lv2:name "Damping" ; 42 | lv2:default 0.5 ; 43 | lv2:minimum 0.0 ; 44 | lv2:maximum 1.0 ; 45 | ], [ 46 | a lv2:InputPort, lv2:ControlPort ; 47 | lv2:index 3 ; 48 | lv2:symbol "ALPHA" ; 49 | lv2:name "Spring Nonlinearity" ; 50 | lv2:default 0.50 ; 51 | lv2:minimum -1.0 ; 52 | lv2:maximum 1.0 ; 53 | ], [ 54 | a lv2:InputPort, lv2:ControlPort ; 55 | lv2:index 4 ; 56 | lv2:symbol "BETA" ; 57 | lv2:name "Spring Stiffness" ; 58 | lv2:default 0.5 ; 59 | lv2:minimum -1.0 ; 60 | lv2:maximum 1.0 ; 61 | ], [ 62 | a lv2:InputPort, lv2:ControlPort ; 63 | lv2:index 5 ; 64 | lv2:symbol "GAMMA" ; 65 | lv2:name "Input Gain" ; 66 | lv2:default 1.0 ; 67 | lv2:minimum 0.00 ; 68 | lv2:maximum 2.0 ; 69 | ], [ 70 | a lv2:OutputPort, lv2:ControlPort ; 71 | lv2:index 6 ; 72 | lv2:symbol "UNSTABLE" ; 73 | lv2:name "Unstable!" ; 74 | lv2:default 0.0 ; 75 | lv2:minimum 0.00 ; 76 | lv2:maximum 1.0 ; 77 | ] . 78 | -------------------------------------------------------------------------------- /src/duffer/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | 4 | 5 | a lv2:Plugin, lv2:ModulatorPlugin ; 6 | lv2:binary ; 7 | rdfs:seeAlso . 8 | -------------------------------------------------------------------------------- /src/duffer/rk4.h: -------------------------------------------------------------------------------- 1 | #ifndef RK4_H 2 | #define RK4_H 3 | 4 | double rk4 ( double t0, double u0, double dt, double f ( double t, double u ) ); 5 | double *rk4vec ( double t0, int n, double u0[], double dt, 6 | double *f ( double t, int n, double u[] ) ); 7 | double *rk4vecRT ( double t0, int n, double u0[], double dt, 8 | double *f ( double t, int n, double u[], void* data, double buf[] ) , void* data, double buf[]); 9 | void timestamp ( void ); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/envfollower/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "envfollower") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -std=c99 -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | envfollower.c 35 | envfollower.h 36 | rms_calc.c 37 | rms_calc.h 38 | constants.h 39 | ) 40 | 41 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 42 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 43 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 44 | 45 | # config install 46 | install(TARGETS ${PLUGIN} 47 | LIBRARY 48 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 49 | ) 50 | install (FILES manifest.ttl ${PLUGIN}.ttl 51 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 52 | ) 53 | 54 | if(CAIRO_FOUND AND NTK_FOUND) 55 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 56 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 57 | fltk_wrap_ui(${PLUGIN}CV_ui ${PLUGIN}CV_ui.fl) 58 | 59 | add_library(${PLUGIN}_ui SHARED 60 | envfollower.h 61 | envfollower_ui_main.cxx 62 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 63 | ) 64 | 65 | add_library(${PLUGIN}CV_ui SHARED 66 | envfollower.h 67 | envfollower_ui_main.cxx 68 | ${${PLUGIN}CV_ui_FLTK_UI_SRCS} 69 | ) 70 | 71 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 72 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 73 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 74 | 75 | set_target_properties (${PLUGIN}CV_ui PROPERTIES COMPILE_DEFINITIONS "CV_PORT") 76 | set_target_properties(${PLUGIN}CV_ui PROPERTIES PREFIX "") 77 | set_target_properties(${PLUGIN}CV_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 78 | target_link_libraries(${PLUGIN}CV_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 79 | 80 | install(TARGETS ${PLUGIN}_ui 81 | LIBRARY 82 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 83 | ) 84 | 85 | install(TARGETS ${PLUGIN}CV_ui 86 | LIBRARY 87 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 88 | ) 89 | 90 | else() 91 | message(WARNING "UI Libraries Missing, no GUI will be installed") 92 | endif() 93 | 94 | -------------------------------------------------------------------------------- /src/envfollower/constants.h: -------------------------------------------------------------------------------- 1 | //constants.h 2 | 3 | #include 4 | #include 5 | 6 | //midi stuff 7 | #define MIDI_NOTE_OFF 0x80 8 | #define MIDI_NOTE_ON 0x90 9 | #define MIDI_KEYPRESSURE 0xA0 10 | #define MIDI_CONTROL_CHANGE 0xB0 11 | #define MIDI_PROGRAMCHANGE 0xC0 12 | #define MIDI_CHANNELPRESSURE 0xD0 13 | #define MIDI_PITCHBEND 0xE0 14 | 15 | #define MIDI_TYPE_MASK 0xF0 16 | #define MIDI_CHANNEL_MASK 0x0F 17 | #define MIDI_DATA_MASK 0x7F 18 | #define MIDI_PITCH_CENTER 0x2000 19 | #define MIDI_SUSTAIN_PEDAL 0x40 20 | #define MIDI_ALL_NOTES_OFF 123 21 | #define MIDI_STOP 252 22 | -------------------------------------------------------------------------------- /src/envfollower/envfollower.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //envfollower.h 3 | #ifndef ENVFOLLOWER_H 4 | #define ENVFOLLOWER_H 5 | 6 | #define ENVFOLLOWER_URI "http://ssj71.github.io/infamousPlugins/plugs.html#envfollower" 7 | #define ENVFOLLOWERCV_URI "http://ssj71.github.io/infamousPlugins/plugs.html#envfollowerCV" 8 | 9 | enum envfollower_ports 10 | { 11 | INPUT = 0, 12 | OUTPUT, 13 | MIDI_OUT, 14 | CTL_IN, 15 | CTL_OUT, 16 | PEAKRMS, 17 | THRESHOLD,//6 18 | SATURATION, 19 | ATIME, 20 | DTIME, 21 | CHANNEL, 22 | CONTROL_NO,//11 23 | MINV, 24 | MAXV, 25 | REVERSE, 26 | CMINV = 10, 27 | CMAXV,//16 28 | CREVERSE, 29 | CV_OUT = 2 30 | }; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/envfollower/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:EnvelopePlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | 15 | 16 | a lv2:Plugin, lv2:EnvelopePlugin ; 17 | lv2:binary ; 18 | rdfs:seeAlso . 19 | 20 | 21 | a ui:X11UI ; 22 | ui:binary ; 23 | lv2:extensionData ui:idleInterface, ui:resize . 24 | -------------------------------------------------------------------------------- /src/envfollower/rms_calc.c: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | //rms_calc.c - an rms calculation library thing. 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include"rms_calc.h" 8 | 9 | void rms_init(RMS_CALC* calc, uint16_t size) 10 | { 11 | uint16_t i; 12 | calc->buf = (float*)malloc(sizeof(float)*size); 13 | calc->size = size; 14 | calc->indx = 0; 15 | calc->sum = 0; 16 | calc->rms = 0; 17 | for(i=0; ibuf[i] = 0; 19 | } 20 | 21 | void rms_deinit(RMS_CALC* calc) 22 | { 23 | free(calc->buf); 24 | } 25 | 26 | float rms_shift(RMS_CALC* calc, float x) 27 | { 28 | calc->sum -= calc->buf[calc->indx]; 29 | calc->buf[calc->indx] = x*x; 30 | calc->sum += calc->buf[calc->indx++]; 31 | calc->indx = calc->indxsize?calc->indx:0; 32 | calc->sum = calc->sum>=0?calc->sum:0; 33 | return calc->rms = sqrt(calc->sum/(float)calc->size); 34 | } 35 | 36 | void rms_shift_no_out(RMS_CALC* calc, float x) 37 | { 38 | calc->sum -= calc->buf[calc->indx]; 39 | calc->buf[calc->indx] = x*x; 40 | calc->sum += calc->buf[calc->indx++]; 41 | calc->indx = calc->indxsize?calc->indx:0; 42 | calc->sum = calc->sum>=0?calc->sum:0; 43 | } 44 | 45 | float rms_calculate(RMS_CALC* calc) 46 | { 47 | return calc->rms = sqrt(calc->sum/(float)calc->size); 48 | } 49 | 50 | float rms_block_fill(RMS_CALC* calc, float x[], uint32_t nframes) 51 | { 52 | uint32_t i; 53 | for(i=0; i 4 | 5 | typedef struct _RMS_CALC 6 | { 7 | uint16_t size; 8 | uint16_t indx; 9 | float* buf; 10 | float sum; 11 | float rms; 12 | } RMS_CALC; 13 | 14 | void rms_init(RMS_CALC* calc, uint16_t size); 15 | void rms_deinit(RMS_CALC* calc); 16 | float rms_shift(RMS_CALC* calc, float x); 17 | void rms_shift_no_out(RMS_CALC* calc, float x); 18 | float rms_calculate(RMS_CALC* calc); 19 | float rms_block_fill(RMS_CALC* calc, float x[], uint32_t nframes); 20 | -------------------------------------------------------------------------------- /src/ewham/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous ewham 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "ewham") 5 | 6 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/") 7 | 8 | include(CheckCCompilerFlag) 9 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 10 | #CHECK_CXX_COMPILER_FLAG("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 11 | #CHECK_CXX_COMPILER_FLAG("-ffast-math" SUPPORTS_FAST_MATH ) 12 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 13 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 14 | if(SUPPORTS_SSE) 15 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 16 | endif(SUPPORTS_SSE) 17 | if(SUPPORTS_FAST_MATH) 18 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 19 | endif(SUPPORTS_FAST_MATH) 20 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 21 | 22 | if(NOT LIBDIR) 23 | set(LIBDIR "lib") 24 | endif(NOT LIBDIR) 25 | 26 | # check for our various libraries 27 | find_package(PkgConfig) 28 | pkg_check_modules(CAIRO cairo) 29 | pkg_check_modules(NTK ntk) 30 | pkg_check_modules(FFTW fftw3f) 31 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 32 | 33 | include_directories (${LV2_INCLUDE_DIRS} ${FFTW_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 34 | link_directories (${LV2_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 35 | 36 | # config libraries 37 | 38 | add_library(${PLUGIN} SHARED 39 | ewham.c 40 | retuner.c 41 | ) 42 | 43 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 44 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 45 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} ${FFTW_LIBRARIES} m zita-resampler) 46 | 47 | # config install 48 | install(TARGETS ${PLUGIN} 49 | LIBRARY 50 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 51 | ) 52 | install (FILES manifest.ttl ${PLUGIN}.ttl 53 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 54 | ) 55 | if(MOD) 56 | install (DIRECTORY modgui/ 57 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2/modgui 58 | ) 59 | endif() 60 | 61 | if(NOT CAIRO_FOUND OR NOT NTK_FOUND) 62 | message(WARNING "UI Libraries Missing, no GUI will be installed") 63 | endif() 64 | # find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 65 | # fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 66 | # 67 | # add_library(${PLUGIN}_ui SHARED 68 | # stuck.h 69 | # stuck_ui_main.cxx 70 | # ${${PLUGIN}_ui_FLTK_UI_SRCS} 71 | # ) 72 | # set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 73 | # set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 74 | # target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 75 | # 76 | # install(TARGETS ${PLUGIN}_ui 77 | # LIBRARY 78 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 79 | # ) 80 | # 81 | #else() 82 | # message(WARNING "UI Libraries Missing, no GUI will be installed") 83 | #endif() 84 | -------------------------------------------------------------------------------- /src/ewham/ewham.h: -------------------------------------------------------------------------------- 1 | #ifndef EWHAM_H 2 | #define EWHAM_H 3 | enum stuck_ports 4 | { 5 | IN =0, 6 | OUT, 7 | EXPRESSION, 8 | START, 9 | FINISH, 10 | MODE, 11 | LOCK, 12 | LATENCY 13 | }; 14 | #endif 15 | -------------------------------------------------------------------------------- /src/ewham/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | 4 | 5 | a lv2:Plugin, lv2:PitchPlugin; 6 | lv2:binary ; 7 | rdfs:seeAlso . 8 | -------------------------------------------------------------------------------- /src/ewham/modgui/icon-the-infamous-ewham.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{brand}}

4 |

{{label}}

5 |
6 |
7 | {{#controls.0}} 8 |
9 |
10 |
11 | {{#scalePoints}} 12 |
{{label}}
13 | {{/scalePoints}} 14 |
15 |
16 | {{/controls.0}} 17 |
18 |
19 | {{#controls.1}} 20 |
21 |
22 | {{name}} 23 |
24 | {{/controls.1}} 25 | {{#controls.2}} 26 |
27 |
28 | {{name}} 29 |
30 | {{/controls.2}} 31 |
32 |
33 |
34 | {{#effect.ports.audio.input}} 35 |
36 |
37 |
38 | {{/effect.ports.audio.input}} 39 | {{#effect.ports.midi.input}} 40 |
41 |
42 |
43 | {{/effect.ports.midi.input}} 44 | {{#effect.ports.cv.input}} 45 |
46 |
47 |
48 | {{/effect.ports.cv.input}} 49 |
50 |
51 | {{#effect.ports.audio.output}} 52 |
53 |
54 |
55 | {{/effect.ports.audio.output}} 56 | {{#effect.ports.midi.output}} 57 |
58 |
59 |
60 | {{/effect.ports.midi.output}} 61 | {{#effect.ports.cv.output}} 62 |
63 |
64 |
65 | {{/effect.ports.cv.output}} 66 |
67 |
-------------------------------------------------------------------------------- /src/ewham/modgui/knobs/boxy/steel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/ewham/modgui/knobs/boxy/steel.png -------------------------------------------------------------------------------- /src/ewham/modgui/pedals/boxy/dots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/ewham/modgui/pedals/boxy/dots.png -------------------------------------------------------------------------------- /src/ewham/modgui/pedals/footswitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/ewham/modgui/pedals/footswitch.png -------------------------------------------------------------------------------- /src/ewham/modgui/screenshot-the-infamous-ewham.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/ewham/modgui/screenshot-the-infamous-ewham.png -------------------------------------------------------------------------------- /src/ewham/modgui/thumbnail-the-infamous-ewham.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/ewham/modgui/thumbnail-the-infamous-ewham.png -------------------------------------------------------------------------------- /src/ewham/modgui/utils/dropdown-arrow-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/ewham/modgui/utils/dropdown-arrow-black.png -------------------------------------------------------------------------------- /src/ewham/modgui/utils/dropdown-arrow-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/ewham/modgui/utils/dropdown-arrow-white.png -------------------------------------------------------------------------------- /src/ewham/retuner.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------------- 2 | // 3 | // Copyright (C) 2014-2111 Spencer Jackson > 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; either version 2 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program; if not, write to the Free Software 17 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | // 19 | // ----------------------------------------------------------------------- 20 | 21 | //this code is mostly written by Jeff Glatt based on code from Fons Adriaensen. 22 | 23 | #ifndef __RETUNER_H 24 | #define __RETUNER_H 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | typedef int REV_ERROR; 35 | 36 | typedef void * TUNERHANDLE; 37 | 38 | TUNERHANDLE RetunerAlloc(int); 39 | void RetunerFree(TUNERHANDLE); 40 | void RetunerProcess(TUNERHANDLE, float *, float *, unsigned int); 41 | void RetunerSetPitch(TUNERHANDLE, float); 42 | void RetunerSetNoteBias(TUNERHANDLE, float); 43 | void RetunerSetFilter(TUNERHANDLE, float); 44 | void RetunerSetGain(TUNERHANDLE, float); 45 | void RetunerSetOffset(TUNERHANDLE, float); 46 | void RetunerSetNoteMask(TUNERHANDLE, unsigned int); 47 | unsigned int RetunerGetNoteset(TUNERHANDLE); 48 | float RetunerGetError(TUNERHANDLE); 49 | void RetunerSetLatency(TUNERHANDLE, unsigned int); 50 | unsigned int RetunerGetLatency(TUNERHANDLE); 51 | void RetunerSetDryGain(TUNERHANDLE, float); 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/ffffltk/ffffltk.h: -------------------------------------------------------------------------------- 1 | #ifndef FFFLTK_H 2 | #define FFFLTK_H 3 | 4 | #include "ffffltk_aspect_group.h" 5 | #include "ffffltk_background.h" 6 | #include "ffffltk_button.h" 7 | #include "ffffltk_dial.h" 8 | #include "ffffltk_display.h" 9 | #include "ffffltk_input.h" 10 | #include "ffffltk_scope.h" 11 | #include "ffffltk_xy.h" 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /src/ffffltk/svg2cairo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## 4 | ## This script is included because its so stinking useful for ffffltk 5 | ## to really use it compile svg2cairo and copy this script into the folder 6 | ## with the binaries. Put all your .svg drawings into a subdirectory called 7 | ## svgfiles and this will generate a C header for each file. 8 | ## 9 | 10 | export LD_LIBRARY_PATH=/usr/local/lib 11 | 12 | if [[ -z $1 ]] 13 | then 14 | 15 | cd svgfiles 16 | mkdir formats 17 | cp ../formats/* formats/ 18 | for file in *.svg; 19 | do 20 | echo "converting $file" 21 | ./../svg2cairoxml $file ${file}.xml 22 | lua ../cairoxml2cairo.lua -f c ${file}.xml draw_${file/.svg/}.h 23 | file=draw_${file/.svg/}.h 24 | size=$(file $file | grep "empty") 25 | if [[ -z "$size" ]]; 26 | then 27 | echo success 28 | sed -i s/CAIRO_DEFAULT/CAIRO_ANTIALIAS_DEFAULT/ $file 29 | sed -i "1s,^,inline ," $file 30 | sed -i "2s,^,inline ," $file 31 | sed -i "3s,^,inline ," $file 32 | caps=`echo ${file^^}` 33 | caps=`echo $caps | sed s/[.]/_/` 34 | sed -i "1s,^,#ifndef $caps\n#define $caps\n," $file 35 | sed -i -e "\$a#endif" $file 36 | else 37 | rm draw_${file/.svg/}.c 38 | fi 39 | done 40 | 41 | rm -rf formats/ 42 | rm *.xml 43 | cd .. 44 | 45 | else 46 | 47 | echo "converting $file" 48 | ./svg2cairoxml $1 ${1}.xml 49 | lua cairoxml2cairo.lua -f c ${1}.xml draw.c 50 | sed -i s/CAIRO_DEFAULT/CAIRO_ANTIALIAS_DEFAULT/ draw.c 51 | fi 52 | 53 | export LD_LIBRARY_PATH=/usr/lib 54 | -------------------------------------------------------------------------------- /src/hip2b/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "hip2b") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | square.c 35 | hip2b.h 36 | ) 37 | 38 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 39 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 40 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 41 | 42 | # config install 43 | install(TARGETS ${PLUGIN} 44 | LIBRARY 45 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 46 | ) 47 | install (FILES manifest.ttl ${PLUGIN}.ttl ${PLUGIN}_presets.ttl 48 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 49 | ) 50 | 51 | if(MOD) 52 | install (DIRECTORY modgui/ 53 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2/modgui 54 | ) 55 | endif() 56 | 57 | if(CAIRO_FOUND AND NTK_FOUND) 58 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 59 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 60 | 61 | add_library(${PLUGIN}_ui SHARED 62 | hip2b.h 63 | hip2b_ui_main.cxx 64 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 65 | ) 66 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 67 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 68 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 69 | 70 | install(TARGETS ${PLUGIN}_ui 71 | LIBRARY 72 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 73 | ) 74 | 75 | else() 76 | message(WARNING "UI Libraries Missing, no GUI will be installed") 77 | endif() 78 | -------------------------------------------------------------------------------- /src/hip2b/hip2b.h: -------------------------------------------------------------------------------- 1 | #ifndef HIP2B_H 2 | #define HIP2B_H 3 | 4 | #define HIP2B_URI "http://ssj71.github.io/infamousPlugins/plugs.html#hip2b" 5 | 6 | enum square_ports 7 | { 8 | IN =0, 9 | OUT, 10 | LATENCY, 11 | UPP, 12 | DOWNN, 13 | OCTAVE, 14 | INGAIN, 15 | WETDRY, 16 | OUTGAIN 17 | }; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/hip2b/hip2b_presets.ttl: -------------------------------------------------------------------------------- 1 | @prefix atom: . 2 | @prefix lv2: . 3 | @prefix pset: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | @prefix state: . 7 | @prefix xsd: . 8 | 9 | 10 | a pset:Preset ; 11 | lv2:appliesTo ; 12 | lv2:port [ 13 | lv2:symbol "DOWN" ; 14 | pset:value 0.002 15 | ] , [ 16 | lv2:symbol "IN_GAIN" ; 17 | pset:value 1.17089927 18 | ] , [ 19 | lv2:symbol "OCTAVE" ; 20 | pset:value 0.0 21 | ] , [ 22 | lv2:symbol "OUT_GAIN" ; 23 | pset:value 1.25059986 24 | ] , [ 25 | lv2:symbol "UP" ; 26 | pset:value 0.0023 27 | ] , [ 28 | lv2:symbol "WETDRY" ; 29 | pset:value 0.23030002 30 | ] . 31 | 32 | 33 | lv2:port [ 34 | lv2:symbol "DOWN" ; 35 | pset:value 0.04599999 36 | ] , [ 37 | lv2:symbol "IN_GAIN" ; 38 | pset:value 1.00239992 39 | ] , [ 40 | lv2:symbol "OCTAVE" ; 41 | pset:value 0.0 42 | ] , [ 43 | lv2:symbol "OUT_GAIN" ; 44 | pset:value 0.63380009 45 | ] , [ 46 | lv2:symbol "UP" ; 47 | pset:value 0.04570001 48 | ] , [ 49 | lv2:symbol "WETDRY" ; 50 | pset:value 0.84280002 51 | ] . 52 | 53 | 54 | lv2:port [ 55 | lv2:symbol "DOWN" ; 56 | pset:value 0.02539999 57 | ] , [ 58 | lv2:symbol "IN_GAIN" ; 59 | pset:value 1.08200037 60 | ] , [ 61 | lv2:symbol "OCTAVE" ; 62 | pset:value -1.0 63 | ] , [ 64 | lv2:symbol "OUT_GAIN" ; 65 | pset:value 1.25059986 66 | ] , [ 67 | lv2:symbol "UP" ; 68 | pset:value 0.01540001 69 | ] , [ 70 | lv2:symbol "WETDRY" ; 71 | pset:value 0.23030002 72 | ] . 73 | 74 | 75 | lv2:port [ 76 | lv2:symbol "DOWN" ; 77 | pset:value 0.0 78 | ] , [ 79 | lv2:symbol "IN_GAIN" ; 80 | pset:value 1.97960007 81 | ] , [ 82 | lv2:symbol "OCTAVE" ; 83 | pset:value 0.0 84 | ] , [ 85 | lv2:symbol "OUT_GAIN" ; 86 | pset:value 0.42120031 87 | ] , [ 88 | lv2:symbol "UP" ; 89 | pset:value 0.0 90 | ] , [ 91 | lv2:symbol "WETDRY" ; 92 | pset:value 0.72090012 93 | ] . 94 | 95 | 96 | lv2:port [ 97 | lv2:symbol "DOWN" ; 98 | pset:value -0.00440001 99 | ] , [ 100 | lv2:symbol "IN_GAIN" ; 101 | pset:value 2.0 102 | ] , [ 103 | lv2:symbol "OCTAVE" ; 104 | pset:value -2.0 105 | ] , [ 106 | lv2:symbol "OUT_GAIN" ; 107 | pset:value 0.32809997 108 | ] , [ 109 | lv2:symbol "UP" ; 110 | pset:value 0.01540001 111 | ] , [ 112 | lv2:symbol "WETDRY" ; 113 | pset:value 1.0 114 | ] . 115 | -------------------------------------------------------------------------------- /src/hip2b/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:DistortionPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | -------------------------------------------------------------------------------- /src/hip2b/modgui/footswitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/hip2b/modgui/footswitch.png -------------------------------------------------------------------------------- /src/hip2b/modgui/hip2b.css: -------------------------------------------------------------------------------- 1 | /* = CONTAINER 2 | ================================================ */ 3 | .hip2b { 4 | background-image:url(/resources/hip2bg.svg{{{ns}}}); 5 | background-position:center center; 6 | background-repeat:no-repeat; 7 | background-size:400px 400px; 8 | /*border-radius: 21px;*/ 9 | height:400px; 10 | position:absolute; 11 | width:400px; 12 | padding: 10px 10px 10px 5px; 13 | text-align: center; 14 | } 15 | 16 | /* = FOOTSWITCH 17 | ================================================ */ 18 | .hip2b .mod-footswitch { 19 | background-image:url(/resources/footswitch.png{{{ns}}}); 20 | background-position:bottom center; 21 | background-repeat:no-repeat; 22 | background-size:auto 132px; 23 | cursor:pointer; 24 | height:70px; 25 | width: 70px; 26 | margin: 4px auto 0 auto; 27 | position: absolute; 28 | left: 44px; 29 | top: 36px; 30 | z-index: 20; 31 | } 32 | 33 | /* = LIGHT ON/OFF 34 | ================================================ */ 35 | .hip2b .mod-light { 36 | background-position:center center; 37 | background-repeat:no-repeat; 38 | background-size:contain; 39 | top:53px; 40 | height:32px; 41 | width:46px; 42 | left:183px; /* 35+44=79 162+44=206 */ 43 | position:absolute; 44 | } 45 | .hip2b .mod-light.on{ 46 | background-image:url(/resources/led-enabled.png{{{ns}}}); 47 | } 48 | .hip2b .mod-light.off{ 49 | background-image:url(/resources/led-bypassed.png{{{ns}}}); 50 | } 51 | 52 | /* = KNOBS 53 | ================================================ */ 54 | .hip2b .mod-knob { 55 | display:inline-block; 56 | overflow:hidden; 57 | position:relative; 58 | } 59 | 60 | .hip2b .mod-knob#hip2bout .mod-knob-image { 61 | background-image:url(/resources/squareDialb64.png{{{ns}}}); 62 | background-repeat:no-repeat; 63 | background-size:auto 89px; 64 | background-position:left center; 65 | overflow:hidden; 66 | position:relative; 67 | cursor:pointer; 68 | height:89px; 69 | width:89px; 70 | margin:0 auto; 71 | z-index: 50; 72 | } 73 | .hip2b .mod-knob#hip2bmix .mod-knob-image { 74 | background-image:url(/resources/squareDialb64.png{{{ns}}}); 75 | background-repeat:no-repeat; 76 | background-size:auto 89px; 77 | background-position:left center; 78 | overflow:hidden; 79 | position:relative; 80 | cursor:pointer; 81 | height:89px; 82 | width:89px; 83 | margin:0 auto; 84 | z-index: 50; 85 | } 86 | .hip2b .mod-knob .mod-knob-image { 87 | background-image:url(/resources/squareDial64.png{{{ns}}}); 88 | background-repeat:no-repeat; 89 | background-size:auto 89px; 90 | background-position:left center; 91 | overflow:hidden; 92 | position:relative; 93 | cursor:pointer; 94 | height:89px; 95 | width:89px; 96 | margin:0 auto; 97 | z-index: 50; 98 | } 99 | 100 | .hip2b .mod-knob#hip2bin { 101 | left:35px; 102 | top:146px; 103 | position:absolute; 104 | } 105 | 106 | .hip2b .mod-knob#hip2bout { 107 | left:162px; 108 | top:146px; 109 | position:absolute; 110 | } 111 | 112 | .hip2b .mod-knob#hip2boct { 113 | left:35px; 114 | top:258px; 115 | position:absolute; 116 | } 117 | 118 | .hip2b .mod-knob#hip2bmix { 119 | left:162px; 120 | top:258px; 121 | position:absolute; 122 | } 123 | -------------------------------------------------------------------------------- /src/hip2b/modgui/hip2b.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 | {{#effect.ports.audio.input}} 23 |
26 |
27 |
28 | {{/effect.ports.audio.input}} 29 |
30 |
31 | {{#effect.ports.audio.output}} 32 |
35 |
36 |
37 | {{/effect.ports.audio.output}} 38 |
39 |
40 | -------------------------------------------------------------------------------- /src/hip2b/modgui/led-bypassed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/hip2b/modgui/led-bypassed.png -------------------------------------------------------------------------------- /src/hip2b/modgui/led-enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/hip2b/modgui/led-enabled.png -------------------------------------------------------------------------------- /src/hip2b/modgui/screenshot-hip2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/hip2b/modgui/screenshot-hip2b.png -------------------------------------------------------------------------------- /src/hip2b/modgui/squareDial64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/hip2b/modgui/squareDial64.png -------------------------------------------------------------------------------- /src/hip2b/modgui/squareDialb64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/hip2b/modgui/squareDialb64.png -------------------------------------------------------------------------------- /src/hip2b/modgui/thumbnail-hip2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/hip2b/modgui/thumbnail-hip2b.png -------------------------------------------------------------------------------- /src/lushlife/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "lushlife") 5 | 6 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/") 7 | 8 | include(CheckCXXCompilerFlag) 9 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -Og") 10 | check_cxx_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 11 | check_cxx_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 12 | if(SUPPORTS_SSE) 13 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse") 14 | endif(SUPPORTS_SSE) 15 | if(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math") 17 | endif(SUPPORTS_FAST_MATH) 18 | 19 | if(NOT LIBDIR) 20 | set(LIBDIR "lib") 21 | endif(NOT LIBDIR) 22 | 23 | # check for our various libraries 24 | find_package(PkgConfig) 25 | pkg_check_modules(CAIRO cairo) 26 | pkg_check_modules(NTK ntk) 27 | pkg_check_modules(FFTW fftw3f) 28 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 29 | 30 | include_directories (${LV2_INCLUDE_DIRS} ${FFTW_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 31 | link_directories (${LV2_LIBRARY_DIRS} ${FFTW_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 32 | 33 | # config libraries 34 | 35 | add_library(${PLUGIN} SHARED 36 | lushlife.cc 37 | lushlife.h 38 | retuner.cc 39 | retuner.h 40 | lfo.cc 41 | lfo.h 42 | ) 43 | 44 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 45 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 46 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} ${FFTW_LIBRARIES} m zita-resampler) 47 | 48 | # config install 49 | install(TARGETS ${PLUGIN} 50 | LIBRARY 51 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 52 | ) 53 | install (FILES manifest.ttl ${PLUGIN}.ttl ${PLUGIN}_presets.ttl 54 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 55 | ) 56 | 57 | if(CAIRO_FOUND AND NTK_FOUND) 58 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 59 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 60 | 61 | add_library(${PLUGIN}_ui SHARED 62 | lushlife.h 63 | lushlife_ui_main.cxx 64 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 65 | ) 66 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 67 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 68 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 69 | 70 | install(TARGETS ${PLUGIN}_ui 71 | LIBRARY 72 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 73 | ) 74 | 75 | else() 76 | message(WARNING "UI Libraries Missing, no GUI will be installed") 77 | endif() 78 | -------------------------------------------------------------------------------- /src/lushlife/lfo.cc: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | 3 | //gpl v2 and all that 4 | 5 | //a simple and kinda boring lfo implementation 6 | #include 7 | #include 8 | #include"lfo.h" 9 | 10 | #define PI 3.1415926535897932384626433832795 11 | 12 | Lfo::Lfo(double sample_rate, uint32_t fragsize) 13 | { 14 | //init public vars that callers will set 15 | shape = 0; 16 | gain = 0; 17 | freq = 0; 18 | 19 | //init states 20 | srand ((unsigned int) time (NULL)); 21 | phase = 2*PI*rand() / (float)RAND_MAX - PI; 22 | y0 = y1 = x1 = 0; 23 | 24 | //const vars 25 | phastep = 2*PI*fragsize/sample_rate;//w = 2*pi*f; sin(wt) = sin(2*pi*f*t) = sin(2*pi*f*n/fs) 26 | ro = 2*sample_rate/fragsize; 27 | } 28 | 29 | Lfo::~Lfo() 30 | { 31 | } 32 | 33 | float 34 | Lfo::out(float _shape) 35 | { 36 | shape = _shape; 37 | return out(); 38 | } 39 | 40 | float 41 | Lfo::out() 42 | { 43 | //step 44 | phase += phastep*freq; 45 | if(phase > PI) 46 | { 47 | phase -= 2*PI; 48 | } 49 | 50 | // sin approx based on an algorithm by Nicolas Capens 51 | // domain [-pi,pi] 52 | double y = 1.27323954474*phase - 0.40528473456*phase*(phase>0?phase:-phase); 53 | float s = 0.225*(y*(y>0?y:-y) - y) + y; 54 | 55 | //pink noise method by paul kellet 56 | /* 57 | float r = 2.0*rand() / (float)RAND_MAX -1.0; 58 | y0 = 0.99765 * y0 + r * 0.0990460; 59 | y1 = 0.96300 * y1 + r * 0.2965164; 60 | y2 = 0.57000 * y2 + r * 1.0526913; 61 | r = y0 + y1 + y2 + r * 0.1848; 62 | */ 63 | //this is a LPF with cutoff at freq 64 | float r = 3*2.0*rand() / (float)RAND_MAX -1.0;//extra 3 factor because lpf seems to need a bit more gain 65 | float a = 2*PI*freq; 66 | float b = 1/(ro+a); 67 | y0 = a*b*(x1 + r - y1) + ro*b*y1; 68 | y1 = y0; 69 | x1 = r; 70 | //blend shapes 71 | return gain*((s-y0)*shape + y0); 72 | 73 | } 74 | 75 | void 76 | Lfo::reset() 77 | { 78 | phase = 0; 79 | y0 = y1 = x1 = 0; 80 | } 81 | -------------------------------------------------------------------------------- /src/lushlife/lfo.h: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | 3 | //gpl v2 and all that 4 | 5 | //a simple and kinda boring lfo implementation 6 | #include 7 | 8 | class Lfo 9 | { 10 | public: 11 | Lfo(double sample_rate, uint32_t fragsize); 12 | ~Lfo(); 13 | float out(float _shape); 14 | float out(); 15 | void reset(); 16 | float shape; 17 | float gain; 18 | float freq; 19 | private: 20 | float phase; 21 | float y0,y1,x1,ro; 22 | float phastep; 23 | }; 24 | -------------------------------------------------------------------------------- /src/lushlife/lushlife.h: -------------------------------------------------------------------------------- 1 | #ifndef LUSHLIFE_H 2 | #define LUSHLIFE_H 3 | 4 | #define LUSHLIFE_URI "http://ssj71.github.io/infamousPlugins/plugs.html#lushlife" 5 | 6 | enum stuck_ports 7 | { 8 | IN =0, 9 | OUTL, 10 | OUTR, 11 | LATENCY, 12 | 13 | GAIN, 14 | DRY_GAIN, 15 | DRY_PAN, 16 | LFOSHAPE, 17 | SYNCLFO, 18 | 19 | ACTIVE0, 20 | SHIFT0, 21 | SLFOA0, 22 | SLFOF0, 23 | DELAY0, 24 | DLFOA0, 25 | DLFOF0, 26 | GAIN0, 27 | PAN0, 28 | 29 | ACTIVE1, 30 | SHIFT1, 31 | SLFOA1, 32 | SLFOF1, 33 | DELAY1, 34 | DLFOA1, 35 | DLFOF1, 36 | GAIN1, 37 | PAN1, 38 | 39 | ACTIVE2, 40 | SHIFT2, 41 | SLFOA2, 42 | SLFOF2, 43 | DELAY2, 44 | DLFOA2, 45 | DLFOF2, 46 | GAIN2, 47 | PAN2, 48 | 49 | ACTIVE3, 50 | SHIFT3, 51 | SLFOA3, 52 | SLFOF3, 53 | DELAY3, 54 | DLFOA3, 55 | DLFOF3, 56 | GAIN3, 57 | PAN3, 58 | 59 | ACTIVE4, 60 | SHIFT4, 61 | SLFOA4, 62 | SLFOF4, 63 | DELAY4, 64 | DLFOA4, 65 | DLFOF4, 66 | GAIN4, 67 | PAN4, 68 | 69 | ACTIVE5, 70 | SHIFT5, 71 | SLFOA5, 72 | SLFOF5, 73 | DELAY5, 74 | DLFOA5, 75 | DLFOF5, 76 | GAIN5, 77 | PAN5 78 | }; 79 | #endif 80 | -------------------------------------------------------------------------------- /src/lushlife/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:ModulatorPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | -------------------------------------------------------------------------------- /src/make_bg.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "draw/draw_reel.h" 8 | #include "draw/draw_powerbg.h" 9 | #include "draw/draw_pwrLabels.h" 10 | #include "draw/draw_hip2bg.h" 11 | 12 | //to use this you must remove 'inline' from the function 13 | // gcc -Wall -g make_bg.c -lm `pkg-config --cflags --libs cairo` -o bgmake 14 | 15 | #ifndef min 16 | #define min(x, y) ((x) < (y) ? (x) : (y)) 17 | #endif 18 | #ifndef max 19 | #define max(x, y) ((x) < (y) ? (y) : (x)) 20 | #endif 21 | 22 | const double scale_zero = 20 * (M_PI/180); // defines "dead zone" for knobs 23 | 24 | 25 | int main(int argc, char* argv[]) 26 | { 27 | 28 | int knob_offset = 0; 29 | int imgw = 400; 30 | int imgh = 400; 31 | 32 | char png_file[80]; 33 | char svg_file[80]; 34 | sprintf(png_file, "bg.png"); 35 | sprintf(svg_file, "bg.svg"); 36 | 37 | /** use this instead the svg surface when you don't need the svg format **/ 38 | //cairo_surface_t *frame = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, knob_size, knob_size); 39 | cairo_surface_t *frame = cairo_svg_surface_create(NULL, imgw, imgh); 40 | cairo_t *crf = cairo_create(frame); 41 | /** use this instead the svg surface when you don't need the svg format **/ 42 | //cairo_surface_t *knob_img = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, knob_image_widht, knob_size); 43 | cairo_surface_t *knob_img = cairo_svg_surface_create(svg_file, imgw, imgh); 44 | cairo_t *cr = cairo_create(knob_img); 45 | 46 | /** draw the widgets to image **/ 47 | cairo_code_draw_hip2bg_render(cr); 48 | #if(0) 49 | cairo_save(cr); 50 | cairo_translate(cr,0,0); 51 | cairo_code_draw_powerbg_render(cr); 52 | cairo_restore(cr); 53 | 54 | cairo_save(cr); 55 | cairo_translate(cr,19,25); 56 | cairo_code_draw_pwrcutLabel_render(cr); 57 | cairo_restore(cr); 58 | 59 | cairo_save(cr); 60 | cairo_translate(cr,32,175); 61 | cairo_code_draw_pwrdecaytLabel_render(cr); 62 | cairo_restore(cr); 63 | 64 | cairo_save(cr); 65 | cairo_translate(cr,163,175); 66 | cairo_code_draw_pwrdecaycLabel_render(cr); 67 | cairo_restore(cr); 68 | 69 | cairo_save(cr); 70 | cairo_translate(cr,286,8); 71 | cairo_code_draw_reel_logo_render(cr); 72 | cairo_translate(cr,190.5,190.5); 73 | cairo_rotate(cr,.7);//radians I presume 74 | cairo_translate(cr,-190.5,-190.5); 75 | cairo_code_draw_reel_render(cr); 76 | cairo_restore(cr); 77 | #endif 78 | 79 | /** save to png file **/ 80 | cairo_surface_flush(knob_img); 81 | cairo_surface_write_to_png(knob_img, png_file); 82 | 83 | /** clean up **/ 84 | cairo_destroy(crf); 85 | cairo_destroy(cr); 86 | cairo_surface_destroy(knob_img); 87 | cairo_surface_destroy(frame); 88 | return 0; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /src/make_button.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "draw/draw_powerButton.h" 8 | 9 | //to use this you must remove 'inline' from the function 10 | // gcc -Wall -g make_button.c -lm `pkg-config --cflags --libs cairo` -o buttonmake 11 | 12 | #ifndef min 13 | #define min(x, y) ((x) < (y) ? (x) : (y)) 14 | #endif 15 | #ifndef max 16 | #define max(x, y) ((x) < (y) ? (y) : (x)) 17 | #endif 18 | 19 | const double scale_zero = 20 * (M_PI/180); // defines "dead zone" for knobs 20 | 21 | 22 | int main(int argc, char* argv[]) 23 | { 24 | 25 | int knob_offset = 0; 26 | int imgw = 160; 27 | int imgh = 64; 28 | 29 | char png_file[80]; 30 | char svg_file[80]; 31 | sprintf(png_file, "button.png"); 32 | sprintf(svg_file, "button.svg"); 33 | 34 | /** use this instead the svg surface when you don't need the svg format **/ 35 | //cairo_surface_t *frame = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, knob_size, knob_size); 36 | cairo_surface_t *frame = cairo_svg_surface_create(NULL, imgw, imgh); 37 | cairo_t *crf = cairo_create(frame); 38 | /** use this instead the svg surface when you don't need the svg format **/ 39 | //cairo_surface_t *knob_img = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, knob_image_widht, knob_size); 40 | cairo_surface_t *knob_img = cairo_svg_surface_create(svg_file, imgw, imgh*2); 41 | cairo_t *cr = cairo_create(knob_img); 42 | 43 | /** draw the widgets to image **/ 44 | cairo_code_draw_powerButton_render(cr,0); 45 | 46 | cairo_translate(cr,0,imgh); 47 | cairo_code_draw_powerButton_render(cr,1); 48 | 49 | /** save to png file **/ 50 | cairo_surface_flush(knob_img); 51 | cairo_surface_write_to_png(knob_img, png_file); 52 | 53 | /** clean up **/ 54 | cairo_destroy(crf); 55 | cairo_destroy(cr); 56 | cairo_surface_destroy(knob_img); 57 | cairo_surface_destroy(frame); 58 | return 0; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/make_knob_image.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "draw/draw_silverDial.h" 8 | #include "draw/draw_squareDial.h" 9 | 10 | //to use this you must remove 'inline' from the function 11 | // gcc -Wall -g make_knob_image.c -lm `pkg-config --cflags --libs cairo` -o knobmake 12 | 13 | #ifndef min 14 | #define min(x, y) ((x) < (y) ? (x) : (y)) 15 | #endif 16 | #ifndef max 17 | #define max(x, y) ((x) < (y) ? (y) : (x)) 18 | #endif 19 | #ifndef M_PI 20 | #define M_PI 3.14159265358979323846 21 | #endif 22 | 23 | const double scale_zero = 20 * (M_PI/180); // defines "dead zone" for knobs 24 | 25 | 26 | int main(int argc, char* argv[]) 27 | { 28 | if (argc < 3) { 29 | fprintf(stdout, "usage: %s knob_size frame_count [offset] \n", basename(argv[0])); 30 | return 1; 31 | } 32 | 33 | int knob_size = atoi(argv[1]); 34 | int knob_frames = atoi(argv[2]); 35 | int knob_image_width = knob_size * knob_frames; 36 | int knob_offset = 0; 37 | if (argc >= 4) { 38 | knob_offset = atoi(argv[3]); 39 | } 40 | 41 | char* sz = argv[1]; 42 | char* fr = argv[2]; 43 | char png_file[80]; 44 | char svg_file[80]; 45 | sprintf(png_file, "knob_%sx%s.png", sz,fr); 46 | sprintf(svg_file, "knob_%sx%s.svg", sz,fr); 47 | 48 | /** use this instead the svg surface when you don't need the svg format **/ 49 | //cairo_surface_t *frame = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, knob_size, knob_size); 50 | cairo_surface_t *frame = cairo_svg_surface_create(NULL, knob_size, knob_size); 51 | cairo_t *crf = cairo_create(frame); 52 | /** use this instead the svg surface when you don't need the svg format **/ 53 | //cairo_surface_t *knob_img = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, knob_image_widht, knob_size); 54 | cairo_surface_t *knob_img = cairo_svg_surface_create(svg_file, knob_image_width, knob_size); 55 | cairo_t *cr = cairo_create(knob_img); 56 | 57 | /** draw the knob per frame to image **/ 58 | for (int i = 0; i < knob_frames; i++) { 59 | //paint_knob_state(crf, knob_size, knob_offset, (double)((double)i/ knob_frames)); 60 | cairo_save(cr); 61 | cairo_translate(cr,i*(knob_size+knob_offset),0); 62 | //cairo_code_draw_silverDial_render(cr,(float)i/(knob_frames-1)); 63 | cairo_code_draw_squareDialbccw_render(cr,(float)i/(knob_frames-1)); 64 | //cairo_code_draw_squareDialbccw_render(cr,(float)i/(knob_frames-1)); 65 | //cairo_code_draw_squareDialgccw_render(cr,(float)i/(knob_frames-1)); 66 | //cairo_code_draw_squareDialo_render(cr,(float)i/(knob_frames-1)); 67 | //cairo_code_draw_squareDialy_render(cr,(float)i/(knob_frames-1)); 68 | //cairo_code_draw_squareDialpccw_render(cr,(float)i/(knob_frames-1)); 69 | cairo_restore(cr); 70 | /* 71 | cairo_set_source_surface(cr, frame, knob_size*i, 0); 72 | cairo_paint(cr); 73 | cairo_set_operator(crf,CAIRO_OPERATOR_CLEAR); 74 | cairo_paint(crf); 75 | cairo_set_operator(crf,CAIRO_OPERATOR_OVER); 76 | */ 77 | } 78 | 79 | /** save to png file **/ 80 | cairo_surface_flush(knob_img); 81 | cairo_surface_write_to_png(knob_img, png_file); 82 | 83 | /** clean up **/ 84 | cairo_destroy(crf); 85 | cairo_destroy(cr); 86 | cairo_surface_destroy(knob_img); 87 | cairo_surface_destroy(frame); 88 | return 0; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /src/mindi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "mindi") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -std=c99") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | mindi.c 35 | ) 36 | 37 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 38 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 39 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 40 | 41 | # config install 42 | install(TARGETS ${PLUGIN} 43 | LIBRARY 44 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 45 | ) 46 | install (FILES manifest.ttl ${PLUGIN}.ttl 47 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 48 | ) 49 | 50 | if(MOD) 51 | message(STATUS "MOD resources are installed") 52 | install (DIRECTORY modgui/ 53 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2/modgui 54 | ) 55 | endif() 56 | 57 | if(NOT CAIRO_FOUND OR NOT NTK_FOUND) 58 | message(WARNING "UI Libraries Missing, no GUI will be installed") 59 | endif() 60 | #else() 61 | # find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 62 | # fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 63 | # fltk_wrap_ui(${PLUGIN}CV_ui ${PLUGIN}CV_ui.fl) 64 | # 65 | # add_library(${PLUGIN}_ui SHARED 66 | # envfollower.h 67 | # envfollower_ui_main.cxx 68 | # ${${PLUGIN}_ui_FLTK_UI_SRCS} 69 | # ) 70 | # 71 | # add_library(${PLUGIN}CV_ui SHARED 72 | # envfollower.h 73 | # envfollower_ui_main.cxx 74 | # ${${PLUGIN}CV_ui_FLTK_UI_SRCS} 75 | # ) 76 | # 77 | # set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 78 | # set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 79 | # target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) # 80 | # 81 | # install(TARGETS ${PLUGIN}_ui 82 | # LIBRARY 83 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 84 | # ) 85 | # 86 | #else() 87 | # message(WARNING "UI Libraries Missing, no GUI will be installed") 88 | #endif() 89 | 90 | -------------------------------------------------------------------------------- /src/mindi/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:MIDIPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | -------------------------------------------------------------------------------- /src/mindi/mindi.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //envfollower.h 3 | #ifndef MINDI_H 4 | #define MINDI_H 5 | 6 | #define MINDI_URI "http://ssj71.github.io/infamousPlugins/plugs.html#mindi" 7 | 8 | enum mindi_ports 9 | { 10 | MIDI_OUT = 0, 11 | ENABLE, 12 | MSGTYPE, 13 | CHAN, 14 | NOTECCPG, 15 | VALUE, 16 | DELAY, 17 | AUTOFF, 18 | MOMENT, 19 | MOMENTARYVALUE 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/mindi/modgui/dropdown-arrow-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/mindi/modgui/dropdown-arrow-black.png -------------------------------------------------------------------------------- /src/mindi/modgui/footswitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/mindi/modgui/footswitch.png -------------------------------------------------------------------------------- /src/mindi/modgui/midi128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/mindi/modgui/midi128.png -------------------------------------------------------------------------------- /src/mindi/modgui/screenshot-mindi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/mindi/modgui/screenshot-mindi.png -------------------------------------------------------------------------------- /src/mindi/modgui/smallpox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/mindi/modgui/smallpox.png -------------------------------------------------------------------------------- /src/mindi/modgui/thumbnail-mindi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/mindi/modgui/thumbnail-mindi.png -------------------------------------------------------------------------------- /src/octolo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "octolo") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -std=c99") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | octolo.c 35 | ) 36 | 37 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 38 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 39 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 40 | 41 | # config install 42 | install(TARGETS ${PLUGIN} 43 | LIBRARY 44 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 45 | ) 46 | install (FILES manifest.ttl ${PLUGIN}.ttl ${PLUGIN}_presets.ttl 47 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 48 | ) 49 | 50 | #if(CAIRO_FOUND AND NTK_FOUND) 51 | # find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 52 | # fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 53 | # 54 | # add_library(${PLUGIN}_ui SHARED 55 | # stuck.h 56 | # stuck_ui_main.cxx 57 | # ${${PLUGIN}_ui_FLTK_UI_SRCS} 58 | # ) 59 | # set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 60 | # set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 61 | # target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 62 | # 63 | # install(TARGETS ${PLUGIN}_ui 64 | # LIBRARY 65 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 66 | # ) 67 | # 68 | #else() 69 | # message(WARNING "UI Libraries Missing, no GUI will be installed") 70 | #endif() 71 | 72 | -------------------------------------------------------------------------------- /src/octolo/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:ModulatorPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | -------------------------------------------------------------------------------- /src/octolo/octolo.h: -------------------------------------------------------------------------------- 1 | #ifndef OCTOLO_H 2 | #define OCTOLO_H 3 | 4 | #define OCTOLO_URI "http://ssj71.github.io/infamousPlugins/plugs.html#octolo" 5 | #define STEREOCTOLO_URI "http://ssj71.github.io/infamousPlugins/plugs.html#stereoctolo" 6 | 7 | enum octolo_ports 8 | { 9 | ATOM_IN =0, 10 | IN, 11 | OUT, 12 | ENABLE, 13 | LENGTH, 14 | DRYG, 15 | WET, 16 | OCTDOWN, 17 | OCTUP, 18 | SLOPE, 19 | SEQUENCE, 20 | OVERLAP 21 | }; 22 | enum stereoctolo_ports 23 | { 24 | SATOM_IN =0, 25 | SIN, 26 | SOUTL, 27 | SOUTR, 28 | SENABLE, 29 | SLENGTH, 30 | SDRYG, 31 | SWET, 32 | SOCTDOWN, 33 | SOCTUP, 34 | SSLOPE, 35 | SSEQUENCE, 36 | SOVERLAP, 37 | SPSEQ, 38 | SWIDTH, 39 | SPOFFS, 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/pms/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "pms") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | pms.c 35 | pms.h 36 | ) 37 | 38 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 39 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 40 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 41 | 42 | # config install 43 | install(TARGETS ${PLUGIN} 44 | LIBRARY 45 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 46 | ) 47 | install (FILES manifest.ttl ${PLUGIN}.ttl 48 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 49 | ) 50 | 51 | #if(CAIRO_FOUND AND NTK_FOUND) 52 | # find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 53 | # fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 54 | # 55 | # add_library(${PLUGIN}_ui SHARED 56 | # stuck.h 57 | # stuck_ui_main.cxx 58 | # ${${PLUGIN}_ui_FLTK_UI_SRCS} 59 | # ) 60 | # set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 61 | # set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 62 | # target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 63 | # 64 | # install(TARGETS ${PLUGIN}_ui 65 | # LIBRARY 66 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 67 | # ) 68 | # 69 | #else() 70 | # message(WARNING "UI Libraries Missing, no GUI will be installed") 71 | #endif() 72 | 73 | -------------------------------------------------------------------------------- /src/pms/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:PitchPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | -------------------------------------------------------------------------------- /src/pms/pms.h: -------------------------------------------------------------------------------- 1 | #ifndef PMS_H 2 | #define PMS_H 3 | 4 | #define PMS_URI "http://ssj71.github.io/infamousPlugins/plugs.html#pms" 5 | 6 | enum cheapoct_ports 7 | { 8 | IN =0, 9 | OUT, 10 | SHIFT, 11 | PERIOD, 12 | DUTY, 13 | DBG 14 | }; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/pms/pms.ttl: -------------------------------------------------------------------------------- 1 | @prefix doap: . 2 | @prefix foaf: . 3 | @prefix rdf: . 4 | @prefix rdfs: . 5 | @prefix units: . 6 | 7 | @prefix lv2: . 8 | @prefix ui: . 9 | 10 | 11 | a lv2:Plugin, lv2:PitchPlugin ; 12 | doap:name "the infamous playback modulation shifter" ; 13 | doap:license ; 14 | doap:description "a playback rate modulating shifter"; 15 | doap:maintainer [ 16 | foaf:name "Spencer Jackson" ; 17 | foaf:homepage ; 18 | foaf:mbox ; 19 | ] ; 20 | lv2:minorVersion 0 ; 21 | lv2:microVersion 1 ; 22 | rdfs:comment "This experimental octave shifter uses no fft, no spectral techniques but instead just modulates the playback speed with a pulse wave of adjustable duty and period." ; 23 | lv2:optionalFeature lv2:hardRTCapable ; 24 | 25 | lv2:port [ 26 | a lv2:InputPort, lv2:AudioPort ; 27 | lv2:index 0 ; 28 | lv2:symbol "INPUT" ; 29 | lv2:name "Audio In" ; 30 | ] ; 31 | lv2:port [ 32 | a lv2:OutputPort, lv2:AudioPort ; 33 | lv2:index 1 ; 34 | lv2:symbol "OUTPUT" ; 35 | lv2:name "Audio Out" ; 36 | ] ; 37 | lv2:port [ 38 | a lv2:InputPort, lv2:ControlPort ; 39 | lv2:index 2 ; 40 | lv2:symbol "SHIFT" ; 41 | lv2:name "Shift" ; 42 | lv2:default -12.0 ; 43 | lv2:minimum -12.0 ; 44 | lv2:maximum 0.0 ; 45 | ], [ 46 | a lv2:InputPort, lv2:ControlPort ; 47 | lv2:index 3 ; 48 | lv2:symbol "PERIOD" ; 49 | lv2:name "Period" ; 50 | lv2:default 25.0 ; 51 | lv2:minimum 0.046 ; 52 | lv2:maximum 1000.0 ; 53 | units:unit units:ms ; 54 | ], [ 55 | a lv2:InputPort, lv2:ControlPort ; 56 | lv2:index 4 ; 57 | lv2:symbol "DUTY" ; 58 | lv2:name "Pulse Width" ; 59 | lv2:default 95.0 ; 60 | lv2:minimum 0.0 ; 61 | lv2:maximum 100.0 ; 62 | units:unit units:pc ; 63 | ], [ 64 | a lv2:OutputPort, lv2:ControlPort ; 65 | lv2:index 5 ; 66 | lv2:symbol "DBG" ; 67 | lv2:name "Debug!" ; 68 | lv2:default 0.0 ; 69 | lv2:minimum 0.0 ; 70 | lv2:maximum 1.0 ; 71 | ] . 72 | -------------------------------------------------------------------------------- /src/powercut/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "powercut") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | powercut.c 35 | powercut.h 36 | ) 37 | 38 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 39 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 40 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 41 | 42 | # config install 43 | install(TARGETS ${PLUGIN} 44 | LIBRARY 45 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 46 | ) 47 | install (FILES manifest.ttl ${PLUGIN}.ttl 48 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 49 | ) 50 | 51 | if(MOD) 52 | install (DIRECTORY modgui/ 53 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2/modgui 54 | ) 55 | endif() 56 | 57 | if(CAIRO_FOUND AND NTK_FOUND) 58 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 59 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 60 | 61 | add_library(${PLUGIN}_ui SHARED 62 | powercut.h 63 | powercut_ui_main.cxx 64 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 65 | ) 66 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 67 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 68 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 69 | 70 | install(TARGETS ${PLUGIN}_ui 71 | LIBRARY 72 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 73 | ) 74 | 75 | else() 76 | message(WARNING "UI Libraries Missing, no GUI will be installed") 77 | endif() 78 | -------------------------------------------------------------------------------- /src/powercut/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:ModulatorPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | -------------------------------------------------------------------------------- /src/powercut/modgui/powercut.css: -------------------------------------------------------------------------------- 1 | /* = CONTAINER 2 | ================================================ */ 3 | .powercut { 4 | background-image:url(/resources/powercutbg.svg{{{ns}}}); 5 | background-position:center center; 6 | background-repeat:no-repeat; 7 | background-size:487px 318px; 8 | /*border-radius: 21px;*/ 9 | height:318px; 10 | position:absolute; 11 | width:487px; 12 | padding: 10px 10px 10px 5px; 13 | text-align: center; 14 | } 15 | 16 | 17 | /* = Toggle 18 | ================================================ */ 19 | .powercut .mod-footswitch { 20 | background-image:url(/resources/powerbutton.svg{{{ns}}}); 21 | background-position:bottom center; 22 | background-repeat:no-repeat; 23 | background-size:auto 120px; 24 | position:absolute; 25 | cursor:pointer; 26 | left:42px; 27 | top:80px; 28 | width:160px; 29 | height:60px; 30 | margin: 4px auto 0 auto; 31 | } 32 | .powercut .mod-footswitch.on { 33 | background-position: bottom center !important; 34 | } 35 | .powercut .mod-footswitch.off { 36 | background-position: top center !important; 37 | } 38 | 39 | /* = KNOBS 40 | ================================================ */ 41 | .powercut .mod-knob { 42 | display:inline-block; 43 | overflow:hidden; 44 | position:relative; 45 | } 46 | 47 | .powercut .mod-knob .mod-knob-image { 48 | background-image:url(/resources/silverDial64.png{{{ns}}}); 49 | background-repeat:no-repeat; 50 | background-size:auto 77px; 51 | background-position:left center; 52 | overflow:hidden; 53 | position:relative; 54 | cursor:pointer; 55 | height:77px; 56 | width:77px; 57 | margin:0 auto; 58 | z-index: 30; 59 | } 60 | 61 | .powercut .mod-knob#powercuttime { 62 | left:48px; 63 | top:218px; 64 | position:absolute; 65 | } 66 | 67 | .powercut .mod-knob#powercutcurve { 68 | left:182px; 69 | top:218px; 70 | position:absolute; 71 | } 72 | -------------------------------------------------------------------------------- /src/powercut/modgui/powercut.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 | {{#effect.ports.audio.input}} 15 |
18 |
19 |
20 | {{/effect.ports.audio.input}} 21 |
22 |
23 | {{#effect.ports.audio.output}} 24 |
27 |
28 |
29 | {{/effect.ports.audio.output}} 30 |
31 |
32 | -------------------------------------------------------------------------------- /src/powercut/modgui/screenshot-powercut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/powercut/modgui/screenshot-powercut.png -------------------------------------------------------------------------------- /src/powercut/modgui/silverDial64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/powercut/modgui/silverDial64.png -------------------------------------------------------------------------------- /src/powercut/modgui/thumbnail-powercut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/powercut/modgui/thumbnail-powercut.png -------------------------------------------------------------------------------- /src/powercut/powercut.h: -------------------------------------------------------------------------------- 1 | #ifndef POWERCUT_H 2 | #define POWERCUT_H 3 | 4 | #define POWERCUT_URI "http://ssj71.github.io/infamousPlugins/plugs.html#powercut" 5 | 6 | enum _POWERCUT_PORTS 7 | { 8 | IN =0, 9 | OUT, 10 | PULL_THE_PLUG, 11 | DECAY_TIME, 12 | DECAY_CURVE, 13 | TRIGGER, 14 | DBG 15 | }; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/powerup/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "powerup") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | powerup.c 35 | powerup.h 36 | ) 37 | 38 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 39 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 40 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 41 | 42 | # config install 43 | install(TARGETS ${PLUGIN} 44 | LIBRARY 45 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 46 | ) 47 | install (FILES manifest.ttl ${PLUGIN}.ttl 48 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 49 | ) 50 | 51 | if(CAIRO_FOUND AND NTK_FOUND) 52 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 53 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 54 | 55 | add_library(${PLUGIN}_ui SHARED 56 | powerup.h 57 | powerup_ui_main.cxx 58 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 59 | ) 60 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 61 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 62 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 63 | 64 | install(TARGETS ${PLUGIN}_ui 65 | LIBRARY 66 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 67 | ) 68 | 69 | else() 70 | message(WARNING "UI Libraries Missing, no GUI will be installed") 71 | endif() 72 | -------------------------------------------------------------------------------- /src/powerup/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:ModulatorPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | -------------------------------------------------------------------------------- /src/powerup/powerup.h: -------------------------------------------------------------------------------- 1 | #ifndef POWERUP_H 2 | #define POWERUP_h 3 | 4 | #define POWERUP_URI "http://ssj71.github.io/infamousPlugins/plugs.html#powerup" 5 | 6 | enum _POWERUP_PORTS 7 | { 8 | IN =0, 9 | OUT, 10 | FIRE_IT_UP, 11 | STARTUP_TIME, 12 | STARTUP_CURVE, 13 | LATENCY, 14 | TRIGGER, 15 | DBG 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/qsvgui/form.cpp: -------------------------------------------------------------------------------- 1 | #include "form.h" 2 | #include "ui_form.h" 3 | 4 | Form::Form(QWidget *parent) : 5 | QWidget(parent), 6 | ui(new Ui::Form) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | Form::~Form() 12 | { 13 | delete ui; 14 | } 15 | -------------------------------------------------------------------------------- /src/qsvgui/form.h: -------------------------------------------------------------------------------- 1 | #ifndef FORM_H 2 | #define FORM_H 3 | 4 | #include 5 | 6 | namespace Ui 7 | { 8 | class Form; 9 | } 10 | 11 | class Form : public QWidget 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit Form(QWidget *parent = 0); 17 | ~Form(); 18 | 19 | private: 20 | Ui::Form *ui; 21 | }; 22 | 23 | #endif // FORM_H 24 | -------------------------------------------------------------------------------- /src/qsvgui/globals.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOBALS_H 2 | #define GLOBALS_H 3 | 4 | #define NUM_EFFECTS 60 5 | #define NUM_PEDALS 20 6 | #define NUM_CONTROLS 20 7 | #define NUM_SVG_FILES 4 8 | 9 | #endif // GLOBALS_H 10 | -------------------------------------------------------------------------------- /src/qsvgui/pedal.h: -------------------------------------------------------------------------------- 1 | #ifndef PEDAL_H 2 | #define PEDAL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | class Pedal : public QWidget 20 | { 21 | Q_OBJECT 22 | 23 | public: 24 | explicit Pedal(QWidget *parent = 0); 25 | //explicit Pedal(int effect, QWidget *parent = 0); 26 | explicit Pedal(skin *skinfile, int effect, QWidget *parent); 27 | explicit Pedal(QString boxFile, QWidget *parent = 0); 28 | ~Pedal(); 29 | QWidget* AddControl(QString type, QString param, int x, int y, int w, int h, QString file1, QString file2, QString file3, QString file4); 30 | 31 | private: 32 | void resizeEvent(QResizeEvent *re); 33 | int LoadSkin(skin *currentskin, int effect); 34 | QRect PedalPosition(); 35 | float myheight; 36 | float mywidth; 37 | float scale; 38 | int effectNumber; 39 | QGraphicsView view; 40 | QGraphicsScene scene; 41 | QGraphicsSvgItem *box; 42 | QSize p; 43 | QWidget* controls[20]; 44 | QRect ctrlPos[20]; 45 | int numControls; 46 | }; 47 | 48 | #endif // PEDAL_H 49 | -------------------------------------------------------------------------------- /src/qsvgui/preview.cpp: -------------------------------------------------------------------------------- 1 | #include "preview.h" 2 | 3 | preview::preview(skin *currentskin, int effect, QWidget *parent) : 4 | QWidget(parent) 5 | { 6 | int n; 7 | QGraphicsSvgItem *item, *item2; 8 | QSize p, p2; 9 | controlskin *ctl; 10 | effectskin fx = currentskin->effects[effect]; 11 | box = new QGraphicsSvgItem(fx.file); 12 | p = box->renderer()->defaultSize(); 13 | scene.addItem(box); 14 | view.centerOn(box); 15 | 16 | myheight = p.height(); 17 | mywidth = p.width(); 18 | 19 | for (int i = 0;itype.toLower(); 23 | if (str == "dial" ) 24 | { 25 | item = new QGraphicsSvgItem(ctl->filename[0],box); 26 | p = item->renderer()->defaultSize(); 27 | 28 | item2 = new QGraphicsSvgItem(ctl->filename[1],box); 29 | p2 = item2->renderer()->defaultSize(); 30 | 31 | if (p.height()setScale(ctl->h/p.height()); 34 | item->setPos(ctl->x,myheight-p.height()-ctl->y); 35 | scene.addItem(item); 36 | item2->setScale(ctl->h/p.height()); 37 | item2->setPos(ctl->x,myheight-p.height()-ctl->y); 38 | scene.addItem(item); 39 | } 40 | else if (str == "slider") 41 | { 42 | item = new QGraphicsSvgItem(ctl->filename[0],box); 43 | p = item->renderer()->defaultSize(); 44 | if (ctl->h > ctl->w) 45 | item->setScale(ctl->h/p.height()); 46 | else 47 | item->setScale(ctl->w/p.width()); 48 | item->setPos(ctl->x,myheight-p.height()-ctl->y); 49 | scene.addItem(item); 50 | 51 | item = new QGraphicsSvgItem(ctl->filename[1],box); 52 | p = item->renderer()->defaultSize(); 53 | if (ctl->h < ctl->w) 54 | item->setScale(ctl->h/p.height()); 55 | else 56 | item->setScale(ctl->w/p.width()); 57 | item->setPos(ctl->x,myheight-ctl->y); 58 | scene.addItem(item); 59 | } 60 | else 61 | { 62 | item = new QGraphicsSvgItem(ctl->filename[0],box); 63 | p = item->renderer()->defaultSize(); 64 | item->setScale(ctl->w/p.width()); 65 | item->setPos(ctl->x,myheight-p.height()-ctl->y); 66 | scene.addItem(item); 67 | } 68 | } 69 | 70 | view.setDisabled(true); 71 | view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 72 | view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 73 | view.setStyleSheet("background: transparent; border: none"); 74 | view.setScene(&scene); 75 | view.setParent(this,Qt::FramelessWindowHint); 76 | } 77 | 78 | void preview::resizeEvent(QResizeEvent *re) 79 | { 80 | //view.scale(this->width()/mywidth,this->height()/myheight); 81 | view.setFixedSize(this->width(),this->height()); 82 | //view.move((this->width()-this->height())/2,(this->width()-this->height())/2); 83 | if (this->width()/mywidth>this->height()/myheight) 84 | { 85 | scale = this->height()/myheight; 86 | } 87 | else 88 | { 89 | scale = this->width()/mywidth; 90 | } 91 | box->setScale(scale); 92 | view.centerOn(box); 93 | QWidget::resizeEvent(re); 94 | } 95 | -------------------------------------------------------------------------------- /src/qsvgui/preview.h: -------------------------------------------------------------------------------- 1 | #ifndef PREVIEW_H 2 | #define PREVIEW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | class preview : public QWidget 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit preview(skin *currentskin, int effect, QWidget *parent = 0); 17 | 18 | signals: 19 | 20 | public slots: 21 | 22 | private: 23 | void resizeEvent(QResizeEvent *re); 24 | float myheight; 25 | float mywidth; 26 | float scale; 27 | int effectNumber 28 | ; 29 | QGraphicsSvgItem *box; 30 | QGraphicsView view; 31 | QGraphicsScene scene; 32 | int numItems; 33 | 34 | }; 35 | 36 | #endif // PREVIEW_H 37 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef QSVGBUTTON_H 2 | #define QSVGBUTTON_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class qSVGButton : public QAbstractButton 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit qSVGButton(QWidget *parent = 0); 17 | explicit qSVGButton(QString buttonFile = "defaultButton.svg", QWidget *parent = 0); 18 | explicit qSVGButton(QString buttonFile = "defaultButton.svg", QString buttonDownFile = "defaultButtonDown.svg", QWidget *parent = 0); 19 | ~qSVGButton(); 20 | 21 | private: 22 | void paintEvent(QPaintEvent *pe); 23 | void resizeEvent(QResizeEvent *re); 24 | void init(); 25 | float myheight, mywidth; 26 | QGraphicsView view; 27 | QGraphicsScene scene; 28 | QGraphicsSvgItem *button, *buttonDown; 29 | QSize b,bd; 30 | bool hasDown; 31 | }; 32 | 33 | #endif // QSVGBUTTON_H 34 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgdial.cpp: -------------------------------------------------------------------------------- 1 | #include "qsvgdial.h" 2 | #include "math.h" 3 | #include "stdio.h" 4 | 5 | qSVGDial::qSVGDial(QWidget *parent) : 6 | QDial(parent) 7 | { 8 | knob = new QGraphicsSvgItem("defaultKnob.svg"); 9 | needle = new QGraphicsSvgItem("defaultNeedle.svg"); 10 | view.setStyleSheet("background: transparent; border: none"); 11 | 12 | k = knob->renderer()->defaultSize(); 13 | n = needle->renderer()->defaultSize(); 14 | needle->setTransformOriginPoint(n.width()/2,n.height()/2); 15 | knob->setTransformOriginPoint(k.width()/2,k.height()/2); 16 | degPerPos = 340/(this->maximum() - this->minimum()); 17 | middle = (this->maximum() - this->minimum())/2; 18 | mysize = k.width(); 19 | if (mysizerenderer()->defaultSize(); 40 | n = needle->renderer()->defaultSize(); 41 | needle->setTransformOriginPoint(n.width()/2,n.height()/2); 42 | knob->setTransformOriginPoint(k.width()/2,k.height()/2); 43 | if (k!=n) 44 | needle->setPos((k.width()-n.width())/2,(k.height()-n.height())/2); 45 | 46 | degPerPos = 340/(this->maximum() - this->minimum()); 47 | middle = (this->maximum() - this->minimum())/2; 48 | mysize = k.width(); 49 | if (mysizesetRotation((p - middle)*degPerPos); 72 | view.centerOn(knob); 73 | } 74 | 75 | void qSVGDial::resizeEvent(QResizeEvent *re) 76 | { 77 | if (this->width()>this->height()) 78 | { 79 | view.setFixedSize(this->height(),this->height()); 80 | view.move((this->width()-this->height())/2,0); 81 | knob->setScale(this->height()/mysize); 82 | needle->setScale(this->height()/mysize); 83 | view.centerOn(knob); 84 | } 85 | else 86 | { 87 | view.setFixedSize(this->width(),this->width()); 88 | view.move(0,(this->height()-this->width())/2); 89 | knob->setScale(this->width()/mysize); 90 | needle->setScale(this->width()/mysize); 91 | view.centerOn(knob); 92 | } 93 | QDial::resizeEvent(re); 94 | } 95 | void qSVGDial::paintEvent(QPaintEvent *pe) 96 | { 97 | } 98 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgdial.h: -------------------------------------------------------------------------------- 1 | #ifndef QSVGDIAL_H 2 | #define QSVGDIAL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class qSVGDial : public QDial 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit qSVGDial(QWidget *parent = 0); 17 | explicit qSVGDial(QString knobFile = "defaultKnob.svg", QString needleFile = "defaultNeedle.svg", QWidget *parent = 0); 18 | ~qSVGDial(); 19 | 20 | private slots: 21 | void rotateNeedle(int p); 22 | 23 | private: 24 | void resizeEvent(QResizeEvent *re); 25 | void paintEvent(QPaintEvent *pe); 26 | float degPerPos; 27 | float middle; 28 | float mysize; 29 | QGraphicsView view; 30 | QGraphicsScene scene; 31 | QGraphicsSvgItem *knob; 32 | QGraphicsSvgItem *needle; 33 | QSize k,n; 34 | 35 | }; 36 | 37 | #endif // QSVGDIAL_H 38 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgled.cpp: -------------------------------------------------------------------------------- 1 | #include "qsvgled.h" 2 | 3 | qSVGLED::qSVGLED(QWidget *parent) : 4 | QWidget(parent) 5 | { 6 | LEDoff = new QGraphicsSvgItem("defaultLEDOff.svg"); 7 | LEDon = new QGraphicsSvgItem("defaultLEDOn.svg"); 8 | lf = LEDoff->renderer()->defaultSize(); 9 | ln = LEDon->renderer()->defaultSize(); 10 | LEDon->setTransformOriginPoint(ln.width()/2,ln.height()/2); 11 | LEDoff->setTransformOriginPoint(lf.width()/2,lf.height()/2); 12 | view.setStyleSheet("background: transparent; border: none"); 13 | 14 | myheight = ln.height(); 15 | mywidth = ln.width(); 16 | if (myheightsetParent(parent,Qt::FramelessWindowHint); 27 | 28 | state = false; 29 | LEDon->setVisible(state); 30 | } 31 | 32 | qSVGLED::qSVGLED(QString offFile, QString onFile, QWidget *parent) : 33 | QWidget(parent) 34 | { 35 | LEDoff = new QGraphicsSvgItem(offFile); 36 | LEDon = new QGraphicsSvgItem(onFile); 37 | lf = LEDoff->renderer()->defaultSize(); 38 | ln = LEDon->renderer()->defaultSize(); 39 | LEDon->setTransformOriginPoint(ln.width()/2,ln.height()/2); 40 | LEDoff->setTransformOriginPoint(lf.width()/2,lf.height()/2); 41 | view.setStyleSheet("background: transparent; border: none"); 42 | 43 | myheight = ln.height(); 44 | mywidth = ln.width(); 45 | if (myheightsetParent(parent,Qt::FramelessWindowHint); 56 | 57 | state = false; 58 | LEDon->setVisible(state); 59 | } 60 | 61 | void qSVGLED::resizeEvent(QResizeEvent *re) 62 | { 63 | if (this->width()>this->height()) 64 | { 65 | view.setFixedSize(this->width(),this->height()); 66 | LEDon->setScale(this->height()/myheight); 67 | LEDoff->setScale(this->height()/myheight); 68 | view.centerOn(LEDon); 69 | } 70 | else 71 | { 72 | view.setFixedSize(this->width(),this->height()); 73 | LEDon->setScale(this->width()/mywidth); 74 | LEDoff->setScale(this->width()/mywidth); 75 | view.centerOn(LEDon); 76 | } 77 | QWidget::resizeEvent(re); 78 | } 79 | 80 | void qSVGLED::toggle() 81 | { 82 | state = !state; 83 | LEDon->setVisible(state); 84 | LEDon->setOpacity(1); 85 | } 86 | 87 | 88 | void qSVGLED::setState(bool newstate) 89 | { 90 | state = newstate; 91 | LEDon->setVisible(state); 92 | LEDon->setOpacity(1); 93 | } 94 | 95 | void qSVGLED::setBrightness(qreal value) 96 | { 97 | state = value; 98 | LEDon->setOpacity(value); 99 | LEDon->setVisible(true); 100 | } 101 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgled.h: -------------------------------------------------------------------------------- 1 | #ifndef QSVGLED_H 2 | #define QSVGLED_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | class qSVGLED : public QWidget 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit qSVGLED(QWidget *parent = 0); 15 | explicit qSVGLED(QString offFile = "defaultLEDOff.svg", QString onFile = "defaultLEDOn.svg", QWidget *parent = 0); 16 | 17 | signals: 18 | 19 | public slots: 20 | void toggle(); 21 | void setState(bool); 22 | void setBrightness(qreal); 23 | 24 | private: 25 | void resizeEvent(QResizeEvent *re); 26 | float myheight, mywidth; 27 | QGraphicsView view; 28 | QGraphicsScene scene; 29 | QGraphicsSvgItem *LEDon, *LEDoff; 30 | QSize ln,lf; 31 | bool state; 32 | 33 | }; 34 | 35 | #endif // QSVGLED_H 36 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgmeter.cpp: -------------------------------------------------------------------------------- 1 | #include "qsvgmeter.h" 2 | 3 | qSVGMeter::qSVGMeter(QString greenOffFile, QString greenOnFile, QString yellowOffFile, QString yellowOnFile, QString redOffFile, QString redOnFile, QWidget *parent) : 4 | QWidget(parent) 5 | { 6 | vertical = true; 7 | int h = this->height()/10; 8 | int y = this->height()-h; 9 | int w = this->width(); 10 | for(int i=0;i<5;i++) 11 | { 12 | led[i] = new qSVGLED(greenOffFile,greenOnFile,this); 13 | led[i]->setGeometry(0,y-h*i,w,h); 14 | } 15 | for(int i=5;i<8;i++) 16 | { 17 | led[i] = new qSVGLED(yellowOffFile,yellowOnFile,this); 18 | led[i]->setGeometry(0,y-h*i,w,h); 19 | } 20 | for(int i=8;i<10;i++) 21 | { 22 | led[i] = new qSVGLED(redOffFile,redOnFile,this); 23 | led[i]->setGeometry(0,y-h*i,w,h); 24 | } 25 | } 26 | 27 | 28 | void qSVGMeter::setOrientation(Qt::Orientation o) 29 | { 30 | if (o == Qt::Horizontal) 31 | vertical = false; 32 | else 33 | vertical = true; 34 | } 35 | 36 | void qSVGMeter::setMeter(int value) 37 | { 38 | int i; 39 | for(i=0;i<(int)(value/10);i++) 40 | led[i]->setState(true); 41 | led[i++]->setBrightness((double)value/10 - i); 42 | for(;i<10;i++) 43 | led[i]->setState(false); 44 | } 45 | 46 | void qSVGMeter::setMeter(double value) 47 | { 48 | int i; 49 | for(i=0;i<(int)value/10;i++) 50 | led[i]->setState(true); 51 | led[i++]->setBrightness(value/10 - i); 52 | for(;i<10;i++) 53 | led[i]->setState(false); 54 | } 55 | 56 | void qSVGMeter::resizeEvent(QResizeEvent *re) 57 | { 58 | if (vertical == false) 59 | { 60 | int h = this->height(); 61 | int w = this->width()/10; 62 | for(int i=0;i<10;i++) 63 | { 64 | led[i]->setGeometry(w*i,0,w,h); 65 | } 66 | } 67 | else 68 | { 69 | int h = this->height()/10; 70 | int y = this->height()-h; 71 | int w = this->width(); 72 | for(int i=0;i<10;i++) 73 | { 74 | led[i]->setGeometry(0,y-h*i,w,h); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgmeter.h: -------------------------------------------------------------------------------- 1 | #ifndef QSVGMETER_H 2 | #define QSVGMETER_H 3 | 4 | #include 5 | #include 6 | #include "qsvgled.h" 7 | 8 | class qSVGMeter : public QWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit qSVGMeter(QString greenOffFile, QString greenOnFile, QString yellowOffFile, QString yellowOnFile, QString redOffFile, QString redOnFile, QWidget *parent = 0); 13 | void setOrientation(Qt::Orientation); 14 | 15 | signals: 16 | 17 | public slots: 18 | void setMeter(int value); 19 | void setMeter(double value); 20 | 21 | private: 22 | qSVGLED *led[10]; 23 | bool vertical; 24 | void resizeEvent(QResizeEvent *re); 25 | 26 | 27 | }; 28 | 29 | #endif // QSVGMETER_H 30 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgslider.h: -------------------------------------------------------------------------------- 1 | #ifndef QSVGSLIDER_H 2 | #define QSVGSLIDER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class qSVGSlider : public QSlider 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit qSVGSlider(QWidget *parent = 0); 17 | explicit qSVGSlider(QString slideFile = "defaultSlide.svg", QWidget *parent = 0); 18 | explicit qSVGSlider(QString slideFile = "defaultSlide.svg", QString slotFile = "defaultslot.svg", QWidget *parent = 0); 19 | void setOrientation(Qt::Orientation); 20 | ~qSVGSlider(); 21 | 22 | private: 23 | void paintEvent(QPaintEvent *pe); 24 | void resizeEvent(QResizeEvent *re); 25 | float myheight, mywidth; 26 | QGraphicsView view; 27 | QGraphicsScene scene; 28 | QGraphicsSvgItem *slide, *slot; 29 | QSize s,b; 30 | bool horizontal; 31 | }; 32 | 33 | #endif // QSVGSLIDER_H 34 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgui.h: -------------------------------------------------------------------------------- 1 | #ifndef QSVGUI_H 2 | #define QSVGUI_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | 20 | //lets make some comments 21 | /* 22 | 23 | the cow is in the barn 24 | this object will be implemented in the lv2 plugin's init function 25 | the constructor will pass a skin file path and the plugin name 26 | and load the file and add the controls 27 | the lv2 ui will access the controls to get the signals and slots? 28 | 29 | 30 | 31 | */ 32 | class qsvgui : public QWidget 33 | { 34 | Q_OBJECT 35 | 36 | public: 37 | explicit qsvgui(QWidget *parent = 0); 38 | //explicit Pedal(int effect, QWidget *parent = 0); 39 | explicit qsvgui(skin *skinfile, QWidget *parent); 40 | explicit qsvgui(QString boxFile, QWidget *parent = 0); 41 | ~qsvgui(); 42 | int AddControl(QString type, QString param, int x, int y, int w, int h, int theta, QString file1, QString file2, QString file3, QString file4); 43 | uint16 GetNumControls(); 44 | 45 | private: 46 | void resizeEvent(QResizeEvent *re); 47 | skin sk; 48 | int LoadSkin(skin *currentskin, int effect); 49 | int LoadSkin(QString skinfile, QString name); 50 | QWidget* AddControl(QString type, QString param, int x, int y, int w, int h, int theta, QString file1, QString file2, QString file3, QString file4); 51 | QRect PedalPosition(); 52 | float myheight; 53 | float mywidth; 54 | float scale; 55 | QGraphicsView view; 56 | QGraphicsScene scene; 57 | QGraphicsSvgItem *bg; 58 | QSize p; 59 | std::vector controls; 60 | std::vector ctrlPos; 61 | }; 62 | 63 | #endif // QSVGUI_H 64 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgui.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2011-07-04T23:16:02 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | QT += svg 9 | 10 | TARGET = qsvgui 11 | TEMPLATE = lib 12 | CONFIG += shared plugin 13 | 14 | 15 | SOURCES += main.cpp\ 16 | pedal.cpp \ 17 | skin.cpp \ 18 | qsvgslider.cpp \ 19 | qsvgled.cpp \ 20 | qsvgdial.cpp \ 21 | qsvgbutton.cpp \ 22 | qsvgmeter.cpp \ 23 | LCD.cpp \ 24 | preview.cpp \ 25 | qsvgui.cpp 26 | 27 | HEADERS += pedal.h \ 28 | skin.h \ 29 | qsvgslider.h \ 30 | qsvgled.h \ 31 | qsvgdial.h \ 32 | qsvgbutton.h \ 33 | qsvgmeter.h \ 34 | LCD.h \ 35 | preview.h \ 36 | globals.h \ 37 | qsvgui.h 38 | 39 | FORMS += 40 | -------------------------------------------------------------------------------- /src/qsvgui/qsvgwidgets.h: -------------------------------------------------------------------------------- 1 | #ifndef QSVGWIDGETS_H 2 | #define QSVGWIDGETS_H 3 | 4 | #endif // QSVGWIDGETS_H 5 | -------------------------------------------------------------------------------- /src/qsvgui/skin.h: -------------------------------------------------------------------------------- 1 | #ifndef SKIN_H 2 | #define SKIN_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "globals.h" 11 | 12 | //class dialskin 13 | //{ 14 | //public: 15 | // QString name; 16 | // int x,y,w,h; 17 | // QString knob, needle, overlay; 18 | // //dialskin(); 19 | // //~dialskin(); 20 | //}; 21 | 22 | //class buttonskin 23 | //{ 24 | //public: 25 | // QString name; 26 | // int x,y,w,h; 27 | // QString button, pressed, overlay; 28 | // //buttonskin(); 29 | // //~buttonskin(); 30 | //}; 31 | 32 | //class sliderskin 33 | //{ 34 | //public: 35 | // QString name; 36 | // int x,y,w,h; 37 | // QString slot, slide, overlay; 38 | // //sliderskin(); 39 | // //~sliderskin(); 40 | //}; 41 | 42 | //class ledskin 43 | //{ 44 | //public: 45 | // QString name; 46 | // int x,y,w,h; 47 | // QString on, off, overlay; 48 | // //ledskin(); 49 | // //~ledskin(); 50 | //}; 51 | 52 | class controlskin 53 | { 54 | public: 55 | controlskin(); 56 | QString type; 57 | QString parameter; 58 | int x,y,w,h,theta; 59 | QString filename[NUM_SVG_FILES];//this allows widgets of up to 4 files 60 | }; 61 | 62 | class uiskin 63 | { 64 | public: 65 | QString name; 66 | QString file; 67 | bool blank, blankcontrols; 68 | int controls; 69 | std::vector control;//this allows up to 50 widgets in each pedal which seems really arbitrary. Lets fix it with an Malloc 70 | controlskin* addControl(); 71 | void loadSkin(QString skinFile, QString name); 72 | uiskin(); 73 | uiskin(QString skinFile, QString name); 74 | ~uiskin(); 75 | }; 76 | 77 | class skin 78 | { 79 | public: 80 | skin(); 81 | skin(QString file); 82 | QString folder; 83 | uiskin effects[NUM_EFFECTS]; 84 | uiskin main[5]; 85 | void loadSkin(QString skinFile); 86 | 87 | }; 88 | 89 | #endif // SKIN_H 90 | -------------------------------------------------------------------------------- /src/reindex_ttl.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # this takes a ttl file that is complete but port indexes are not correct 3 | # it will change the index so the ports appear in order 4 | # its useful if you add a port in the middle of an existing file 5 | 6 | import fileinput 7 | 8 | i = 0 9 | for line in fileinput.input(inplace=True): 10 | if line.find("lv2:index") > 0: 11 | print(" lv2:index "+str(i)+" ;"), 12 | i+=1 13 | else: 14 | print(line,end=""), 15 | -------------------------------------------------------------------------------- /src/rule.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | void ruleprint(uint8_t x) 7 | { 8 | uint8_t i; 9 | printf("\n111 110 101 100 011 010 001 000\n"); 10 | for(i=128; i>0; i=i>>1) 11 | { 12 | printf(" %c ",(x&i)?'1':'0'); 13 | } 14 | printf("\n"); 15 | } 16 | 17 | void binprint(uint32_t x, uint8_t n) 18 | { 19 | uint32_t i; 20 | for(i=1<0; i=i>>1) 21 | { 22 | printf("%c",(x&i)?'0':' '); 23 | } 24 | printf("\n"); 25 | } 26 | 27 | void useage() 28 | { 29 | printf("\nrule, a constrained cellular automaton visualizer\n"); 30 | printf("\n"); 31 | printf("USEAGE:\n"); 32 | printf(" rule []\n"); 33 | printf("\n"); 34 | printf("EXAMPLES:\n"); 35 | printf(" rule 30\n"); 36 | printf(" rule 110 0xFAFF\n"); 37 | printf("\n"); 38 | printf("NOTES:\n"); 39 | printf(" There are 16 cells on a torus. Arguments can be hex or decimal.\n"); 40 | printf(" If no initial condition is supplied, default is 1. For more\n"); 41 | printf(" information read 'elementary cellular automaton' on wikipedia\n"); 42 | printf("\n"); 43 | return; 44 | } 45 | 46 | int main(int argc, char **argv) 47 | { 48 | uint8_t rule=0xD0;//0x7c; 49 | uint8_t t; 50 | uint32_t cells = 1; 51 | uint32_t temp; 52 | uint8_t index; 53 | uint8_t ncells = 16; 54 | 55 | if (argc > 1) 56 | { 57 | if(argv[1][0] == '0' && argv[1][1] == 'x') 58 | { 59 | unsigned int a; 60 | sscanf(argv[1],"%x",&a); 61 | rule = (uint8_t)a; 62 | } 63 | else 64 | { 65 | rule = atoi(argv[1]); 66 | } 67 | if (argc > 2) 68 | { 69 | if(argv[2][0] == '0' && argv[2][1] == 'x') 70 | { 71 | unsigned int a; 72 | sscanf(argv[2],"%x",&a); 73 | cells = (uint16_t)a; 74 | } 75 | else 76 | { 77 | cells = atoi(argv[2]); 78 | } 79 | } 80 | } 81 | else 82 | { 83 | printf("No argument! \n"); 84 | useage(); 85 | return 0; 86 | } 87 | 88 | ruleprint(rule); 89 | printf("use ctl+C to stop \n"); 90 | ncells--; 91 | for(;; cells=temp<<1|temp>>ncells) 92 | { 93 | 94 | binprint(cells,ncells); 95 | temp=0; 96 | for(index=0; index<=ncells; index++) 97 | { 98 | 99 | //the idea is to shift the rule mask (w/rollover) according to the 3 100 | //bits in the neighborhood at $index, mask that bit in the rule to 101 | //then determine the next cell state and OR it into a temp value 102 | // |cell state-----------------------------------------------| 103 | // | rule mask ---------------------------------| 104 | // |neighborhood ---------------------------| 105 | temp |= ((rule & 1<<((cells>>index|cells<<(ncells-index+1) )&7) )>0)<-----------------------------+----> output 6 | | ^ 7 | | /\ Wet/Dry 8 | V Dwell -- 9 | | _____ High Freq.___ | 10 | +---+---| APF |-------->| EQ |-+--------------->+ 11 | | ^ ----- ---- | ^ 12 | | | ______ | | 13 | | +---| z^-D |<--------------+ ___|____ 14 | | ------ | AI LFP | 15 | ___|____ -------- 16 | | AA LPF | | 17 | -------- /\ 18 | _|__ Spring 1 -- 1/nsprings 19 | | D4 | _____ ____ | 20 | ---- +-->| APF |---------+-->+--| EQ |-->+ 21 | | | ----- | ^ ---- ^ 22 | | ____ | | | | 23 | +>+--| XO |->+ ______ | | | 24 | | ^ | |--------->| z^-D |----)---+ | 25 | | | ---- ------ | | ...from other springs 26 | | | | | 27 | | | _____ Decay _____ | | return through spring 28 | | +-| z^-T|<--<|-+<-| APF |<-----+ | 29 | | ----- ^ ----- | 30 | | | ______ | 31 | | +--| z^-D |<--------+ 32 | | ------ 33 | ... to other springs 34 | 35 | 36 | APF - all pass, high side M=200 still need to figure out stretch and K 37 | low side M=40 a=-.7 k=3 38 | 39 | AA LPF - 10 pole cheby 1 5k cutoff 40 | D4 - downsample 4x 41 | XO - 8th order Linkwitz-Riley cross over tuned for each spring at the point of minimum group delay 42 | Z^-T - actually a multi-tap delay, T will also be different for each spring but will be approximately the time of the sound to travel through the spring back and forth. 43 | Z^-D - chirp straightening (Fractional) delay 44 | AI LPF - probably another cheby 1 45 | how many HF parts? 46 | 47 | what is tune-able? (why use parametric when you can't adjust parameters?) 48 | maybe just do 3 springs but with adjustable params 49 | 50 | 51 | spring reverb: 52 | http://recherche.ircam.fr/pub/dafx11/Papers/39_e.pdf 53 | http://asp.eurasipjournals.com/content/pdf/1687-6180-2011-646134.pdf 54 | 55 | guitamp1 [700 3700] -50db [6100] -60db fc = 4100 56 | guitamp2 [3400] -20db [6000] -40db fc = 4400 57 | reverbbox [100 4900] -50db fc = 6145 58 | tape delay [684 1200] -70db fc = 5100 59 | great [400 4500] -40db [6650 11700] -30db fc = 5800 60 | old synth [200 4100] -25db [5300] [6300] -10 or 60 smooth Fc =4400 2600 61 | amp spiral [230] -50db fc = 4500 62 | 63 | 64 | PARAMS 65 | smear [0 10] 66 | spring length [50 150]% delay in fb 67 | decay length [50 150]% gain in fb 68 | dwell [0 2] gain to effect 69 | wet/dry [0 1] 70 | tone [0 1] 71 | kick [0 1] 72 | preecho amplitude 73 | preecho time 74 | springs 1-5 toggle 75 | 76 | -------------------------------------------------------------------------------- /src/spring/filters.h: -------------------------------------------------------------------------------- 1 | #ifndef FILTERS_FOR_INFAMY 2 | #define FILTERS_FOR_INFAMY 3 | 4 | typedef void* FILTER; 5 | 6 | typedef enum sakfabdkja 7 | { 8 | BUTTERWORTH, 9 | CHEBYCHEV1, 10 | CHEBYCHEV2, 11 | ELLIPTIC, 12 | ALLPASS, 13 | DELAY 14 | } FILTERTYPE; 15 | 16 | //TODO: move to .c 17 | typedef struct flielter 18 | { 19 | float* num; 20 | uint8_t numsize; 21 | float* den; 22 | uint8_t densize; 23 | uint16_t in;//array index 24 | uint16_t out;//array index 25 | uint8_t stages; 26 | float* buf; 27 | } _FILTER; 28 | //for a delay just set the in index delay samples behind the previous out index 29 | 30 | //initialize a filter 31 | //TODO: Add q? 32 | FILTER initFilter(uint8_t order, BANDTYPE band, FILTERTYPE type, float cutoff, float samplerate); 33 | FILTER reinitFilter(uint8_t order, float cutoff); 34 | 35 | typedef void* FILTERBANK; 36 | 37 | //TODO: move to .c 38 | typedef struct feilleter 39 | { 40 | float buf[0xFFFF]; 41 | FILTER* filters; 42 | uint8_t nfilters; 43 | } _FILTERBANK 44 | 45 | void addFilter(FILTERBANK bank, FILTER filter); 46 | void changeFilter(FILTERBANK bank, uint8_t index, FILTER newfilter); 47 | void changeDelay(FILTERBANK bank, uint8_t index, uint16_t delay); 48 | void processBank(FILTERBANK bank,float* input, float* output, uint16_t nsamples); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/stuck/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #CMake file for infamous stuck 2 | cmake_minimum_required(VERSION 2.8) 3 | 4 | set(PLUGIN "stuck") 5 | 6 | include(CheckCCompilerFlag) 7 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -Og") 8 | check_c_compiler_flag("-msse2 -mfpmath=sse" SUPPORTS_SSE ) 9 | check_c_compiler_flag("-ffast-math" SUPPORTS_FAST_MATH ) 10 | if(SUPPORTS_SSE) 11 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse") 12 | endif(SUPPORTS_SSE) 13 | if(SUPPORTS_FAST_MATH) 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffast-math") 15 | endif(SUPPORTS_FAST_MATH) 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g") 17 | 18 | if(NOT LIBDIR) 19 | set(LIBDIR "lib") 20 | endif(NOT LIBDIR) 21 | 22 | # check for our various libraries 23 | find_package(PkgConfig) 24 | pkg_check_modules(CAIRO cairo) 25 | pkg_check_modules(NTK ntk) 26 | pkg_check_modules(LV2 REQUIRED lv2>=.0.1.0) 27 | 28 | include_directories (${LV2_INCLUDE_DIRS} ${NTK_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ../ffffltk ../draw . ) 29 | link_directories (${LV2_LIBRARY_DIRS} ${NTK_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS}) 30 | 31 | # config libraries 32 | 33 | add_library(${PLUGIN} SHARED 34 | stuck.c 35 | stuck.h 36 | rms_calc.c 37 | rms_calc.h 38 | ) 39 | 40 | set_target_properties(${PLUGIN} PROPERTIES PREFIX "") 41 | set_target_properties(${PLUGIN} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 42 | target_link_libraries(${PLUGIN} ${LV2_LIBRARIES} m) 43 | 44 | # config install 45 | install(TARGETS ${PLUGIN} 46 | LIBRARY 47 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 48 | ) 49 | install (FILES manifest.ttl ${PLUGIN}.ttl 50 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 51 | ) 52 | 53 | if( MOD ) 54 | install (FILES 55 | modgui/${PLUGIN}.html 56 | modgui/stuckstacker.html 57 | modgui/${PLUGIN}.css 58 | modgui/stuckbg.svg 59 | modgui/stacker.svg 60 | modgui/led-bypassed.png 61 | modgui/led-enabled.png 62 | modgui/switch-key.png 63 | modgui/tabDial64.svg 64 | modgui/screenshot-stuck.png 65 | modgui/thumbnail-stuck.png 66 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2/modgui 67 | ) 68 | endif() 69 | 70 | if(CAIRO_FOUND AND NTK_FOUND) 71 | find_program(FLTK_FLUID_EXECUTABLE ntk-fluid) 72 | fltk_wrap_ui(${PLUGIN}_ui ${PLUGIN}_ui.fl) 73 | 74 | add_library(${PLUGIN}_ui SHARED 75 | stuck.h 76 | stuck_ui_main.cxx 77 | ${${PLUGIN}_ui_FLTK_UI_SRCS} 78 | ) 79 | set_target_properties(${PLUGIN}_ui PROPERTIES PREFIX "") 80 | set_target_properties(${PLUGIN}_ui PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 81 | target_link_libraries(${PLUGIN}_ui ${LV2_LIBRARIES} ${NTK_LIBRARIES} ${CAIRO_LIBRARIES} m) 82 | 83 | install(TARGETS ${PLUGIN}_ui 84 | LIBRARY 85 | DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBDIR}/lv2/${PLUGIN}.lv2 86 | ) 87 | 88 | else() 89 | message(WARNING "UI Libraries Missing, no GUI will be installed") 90 | endif() 91 | 92 | -------------------------------------------------------------------------------- /src/stuck/manifest.ttl: -------------------------------------------------------------------------------- 1 | @prefix lv2: . 2 | @prefix rdfs: . 3 | @prefix ui: . 4 | 5 | 6 | a lv2:Plugin, lv2:DelayPlugin ; 7 | lv2:binary ; 8 | rdfs:seeAlso . 9 | 10 | 11 | a ui:X11UI ; 12 | ui:binary ; 13 | lv2:extensionData ui:idleInterface, ui:resize . 14 | 15 | 16 | a lv2:Plugin, lv2:DelayPlugin ; 17 | lv2:binary ; 18 | rdfs:seeAlso . 19 | 20 | 21 | a ui:X11UI ; 22 | ui:binary ; 23 | lv2:extensionData ui:idleInterface, ui:resize . 24 | -------------------------------------------------------------------------------- /src/stuck/modgui/led-bypassed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/stuck/modgui/led-bypassed.png -------------------------------------------------------------------------------- /src/stuck/modgui/led-enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/stuck/modgui/led-enabled.png -------------------------------------------------------------------------------- /src/stuck/modgui/screenshot-stuck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/stuck/modgui/screenshot-stuck.png -------------------------------------------------------------------------------- /src/stuck/modgui/stuck.css: -------------------------------------------------------------------------------- 1 | /* = CONTAINER 2 | ================================================ */ 3 | .stuck { 4 | background-image:url(/resources/stuckbg.svg{{{ns}}}); 5 | background-position:center center; 6 | background-repeat:no-repeat; 7 | background-size:256px 400px; 8 | /*border-radius: 21px;*/ 9 | height:400px; 10 | position:absolute; 11 | width:256px; 12 | padding: 10px 10px 10px 5px; 13 | text-align: center; 14 | } 15 | 16 | /* = LIGHT ON/OFF 17 | ================================================ */ 18 | .stuck .mod-light { 19 | background-image:url(/resources/led-bypassed.png{{{ns}}}); 20 | background-position:center center; 21 | background-repeat:no-repeat; 22 | left:82px; 23 | bottom:168px; 24 | height:22px; 25 | width:20px; 26 | position:absolute; 27 | } 28 | .stuck .mod-light.on{ 29 | background-image:url(/resources/led-enabled.png{{{ns}}}); 30 | } 31 | .stuck .mod-light.off{ 32 | background-image:url(/resources/led-bypassed.png{{{ns}}}); 33 | } 34 | .stuck .mod-lightbackward { 35 | background-image:url(/resources/led-bypassed.png{{{ns}}}); 36 | background-position:center center; 37 | background-repeat:no-repeat; 38 | left:82px; 39 | bottom:168px; 40 | height:22px; 41 | width:20px; 42 | position:absolute; 43 | } 44 | .stuck .mod-lightbackward.on{ 45 | background-image:url(/resources/led-bypassed.png{{{ns}}}); 46 | } 47 | .stuck .mod-lightbackward.off{ 48 | background-image:url(/resources/led-enabled.png{{{ns}}}); 49 | } 50 | 51 | /* = Toggle 52 | ================================================ */ 53 | .stuck .mod-footswitch { 54 | background-image:url(/resources/switch-key.png{{{ns}}}); 55 | background-position:bottom center; 56 | background-repeat:no-repeat; 57 | background-size:auto 120px; 58 | position:absolute; 59 | cursor:pointer; 60 | left:43px; 61 | bottom:148px; 62 | width:40px; 63 | height:60px; 64 | margin: 4px auto 0 auto; 65 | } 66 | .stuck .mod-footswitch.on { 67 | background-position: bottom center !important; 68 | } 69 | .stuck .mod-footswitch.off { 70 | background-position: top center !important; 71 | } 72 | .stuck .mod-footswitch#stuckbackwardswitch.on { 73 | background-position: top center !important; 74 | } 75 | .stuck .mod-footswitch#stuckbackwardswitch.off { 76 | background-position: bottom center !important; 77 | } 78 | 79 | /* = KNOBS 80 | ================================================ */ 81 | .stuck .mod-knob { 82 | display:inline-block; 83 | overflow:hidden; 84 | position:relative; 85 | } 86 | 87 | .stuck .mod-knob .mod-knob-image { 88 | background-image:url(/resources/tabDial64.svg{{{ns}}}); 89 | background-repeat:no-repeat; 90 | background-size:auto 71px; 91 | background-position:left center; 92 | overflow:hidden; 93 | position:relative; 94 | cursor:pointer; 95 | height:71px; 96 | width:71px; 97 | margin:0 auto; 98 | z-index: 30; 99 | } 100 | 101 | .stuck .mod-knob#stuckgain { 102 | left:47px; 103 | top:280px; 104 | position:absolute; 105 | } 106 | 107 | .stuck .mod-knob#stuckrelease { 108 | left:144px; 109 | top:280px; 110 | position:absolute; 111 | } 112 | 113 | .stuck .mod-pedal-input, .stuck .mod-pedal-output { 114 | top:160px; 115 | } 116 | -------------------------------------------------------------------------------- /src/stuck/modgui/stuck.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
16 |
17 |
18 | {{#effect.ports.audio.input}} 19 |
22 |
23 |
24 | {{/effect.ports.audio.input}} 25 |
26 |
27 | {{#effect.ports.audio.output}} 28 |
31 |
32 |
33 | {{/effect.ports.audio.output}} 34 |
35 |
36 | -------------------------------------------------------------------------------- /src/stuck/modgui/stuckstacker.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
19 |
20 |
21 | 22 |
23 |
24 | {{#effect.ports.audio.input}} 25 |
28 |
29 |
30 | {{/effect.ports.audio.input}} 31 |
32 |
33 | {{#effect.ports.audio.output}} 34 |
37 |
38 |
39 | {{/effect.ports.audio.output}} 40 |
41 |
42 | -------------------------------------------------------------------------------- /src/stuck/modgui/switch-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/stuck/modgui/switch-key.png -------------------------------------------------------------------------------- /src/stuck/modgui/thumbnail-stuck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ssj71/infamousPlugins/8c0e11ecac624e014caba00e5cf4fb0ca2faa806/src/stuck/modgui/thumbnail-stuck.png -------------------------------------------------------------------------------- /src/stuck/rms_calc.c: -------------------------------------------------------------------------------- 1 | //spencer jackson 2 | //rms_calc.c - an rms calculation library thing. 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include"rms_calc.h" 8 | 9 | void rms_init(RMS_CALC* calc, uint16_t size) 10 | { 11 | uint16_t i; 12 | calc->buf = (float*)malloc(sizeof(float)*size); 13 | calc->size = size; 14 | calc->indx = 0; 15 | calc->sum = 0; 16 | calc->rms = 0; 17 | for(i=0; ibuf[i] = 0; 19 | } 20 | 21 | void rms_deinit(RMS_CALC* calc) 22 | { 23 | free(calc->buf); 24 | } 25 | 26 | float rms_shift(RMS_CALC* calc, float x) 27 | { 28 | calc->sum -= calc->buf[calc->indx]; 29 | calc->buf[calc->indx] = x*x; 30 | calc->sum += calc->buf[calc->indx++]; 31 | calc->indx = calc->indxsize?calc->indx:0; 32 | calc->sum = calc->sum>=0?calc->sum:0; 33 | return calc->rms = sqrt(calc->sum/(float)calc->size); 34 | } 35 | 36 | void rms_shift_no_out(RMS_CALC* calc, float x) 37 | { 38 | calc->sum -= calc->buf[calc->indx]; 39 | calc->buf[calc->indx] = x*x; 40 | calc->sum += calc->buf[calc->indx++]; 41 | calc->indx = calc->indxsize?calc->indx:0; 42 | calc->sum = calc->sum>=0?calc->sum:0; 43 | } 44 | 45 | float rms_calculate(RMS_CALC* calc) 46 | { 47 | return calc->rms = sqrt(calc->sum/(float)calc->size); 48 | } 49 | 50 | float rms_block_fill(RMS_CALC* calc, float x[], uint32_t nframes) 51 | { 52 | uint32_t i; 53 | for(i=0; i 4 | 5 | typedef struct _RMS_CALC 6 | { 7 | uint16_t size; 8 | uint16_t indx; 9 | float* buf; 10 | float sum; 11 | float rms; 12 | } RMS_CALC; 13 | 14 | void rms_init(RMS_CALC* calc, uint16_t size); 15 | void rms_deinit(RMS_CALC* calc); 16 | float rms_shift(RMS_CALC* calc, float x); 17 | void rms_shift_no_out(RMS_CALC* calc, float x); 18 | float rms_calculate(RMS_CALC* calc); 19 | float rms_block_fill(RMS_CALC* calc, float x[], uint32_t nframes); 20 | -------------------------------------------------------------------------------- /src/stuck/stuck.h: -------------------------------------------------------------------------------- 1 | #ifndef STUCK_H 2 | #define STUCK_H 3 | 4 | #define STUCK_URI "http://ssj71.github.io/infamousPlugins/plugs.html#stuck" 5 | #define STUCKSTACKER_URI "http://ssj71.github.io/infamousPlugins/plugs.html#stuckstacker" 6 | 7 | enum stuck_ports 8 | { 9 | IN =0, 10 | OUT, 11 | STICKIT, 12 | DRONEGAIN, 13 | RELEASE, 14 | OUT2, 15 | DBG, 16 | TRIGGER 17 | }; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/stuck/stuck_ui.fl: -------------------------------------------------------------------------------- 1 | # data file for the Fltk User Interface Designer (fluid) 2 | version 1.0300 3 | header_name {.h} 4 | code_name {.cxx} 5 | class StuckUI {open 6 | } { 7 | Function {show()} {open 8 | } { 9 | Fl_Window ui { 10 | label {the infamous stuck} open 11 | xywh {1442 28 1436 1740} type Double box UP_BOX resizable 12 | code0 {\#include"ffffltk.h"} 13 | code1 {\#include"lv2/lv2plug.in/ns/extensions/ui/ui.h"} 14 | code2 {using namespace ffffltk;} 15 | code3 {o->show();} visible 16 | } { 17 | Fl_Group bg {open 18 | xywh {0 0 256 400} resizable 19 | code0 {\#include"stuck.h"} 20 | code1 {\#include"draw_stuckbg.h"} 21 | code2 {o->drawing_h = cairo_code_draw_stuckbg_get_height(); o->drawing_w = cairo_code_draw_stuckbg_get_width(); o->drawing_f = &cairo_code_draw_stuckbg_render;} 22 | class Aspect_Group 23 | } { 24 | Fl_Button stickit { 25 | callback {led->value(stickit->value()); 26 | write_function(controller,STICKIT,sizeof(float),0,&stickit->floatvalue);} 27 | tooltip {Stick It!} xywh {43 191 22 72} 28 | code1 {\#include"draw_toggleSwitch.h"} 29 | code2 {o->type(FL_TOGGLE_BUTTON);} 30 | code3 {o->drawing_h = cairo_code_draw_toggleSwitch_get_height(); o->drawing_w = cairo_code_draw_toggleSwitch_get_width(); o->drawing_f = &cairo_code_draw_toggleSwitch_render;} 31 | class Button 32 | } 33 | Fl_Button led { 34 | xywh {77 217 18 18} deactivate 35 | code1 {\#include"draw_LED.h"} 36 | code2 {o->type(FL_TOGGLE_BUTTON);} 37 | code3 {o->drawing_h = cairo_code_draw_LED_get_height(); o->drawing_w = cairo_code_draw_LED_get_width(); o->drawing_f = &cairo_code_draw_blueLED_render;} 38 | class Button 39 | } 40 | Fl_Dial volume { 41 | callback {write_function(controller,DRONEGAIN,sizeof(float),0,&volume->floatvalue);} 42 | tooltip {Drone Gain} xywh {50 280 71 71} maximum 2 step 0.01 value 0.5 43 | code1 {\#include"draw_tabDial.h"} 44 | code2 {o->drawing_h = cairo_code_draw_tabDial_get_height(); o->drawing_w = cairo_code_draw_tabDial_get_width(); o->drawing_f = &cairo_code_draw_tabDial_render;} 45 | class Dial 46 | } 47 | Fl_Dial time { 48 | callback {write_function(controller,RELEASE,sizeof(float),0,&time->floatvalue);} selected 49 | tooltip Release xywh {147 280 71 71} minimum 0.01 maximum 3 step 0.01 value 0.5 50 | code1 {\#include"draw_tabDial.h"} 51 | code2 {o->drawing_h = cairo_code_draw_tabDial_get_height(); o->drawing_w = cairo_code_draw_tabDial_get_width(); o->drawing_f = &cairo_code_draw_tabDial_render;} 52 | code3 {sprintf(o->units,"s");} 53 | class Dial 54 | } 55 | } 56 | } 57 | } 58 | decl {LV2UI_Write_Function write_function;} {public local 59 | } 60 | decl {LV2UI_Controller controller;} {public local 61 | } 62 | Function {idle()} {open return_type void 63 | } { 64 | code {Fl::check(); 65 | Fl::flush();} {} 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /test/constants.h: -------------------------------------------------------------------------------- 1 | //constants.h 2 | 3 | #include 4 | #include 5 | 6 | //harmonic stuff 7 | #define MAX_N_HARMONICS 16 8 | #define HARMONIC_MODE_SINC 0 9 | #define HARMONIC_MODE_SAW 1 10 | #define HARMONIC_MODE_SQR 2 11 | #define HARMONIC_MODE_TRI 3 12 | 13 | #define FUNC_SIN 0 14 | #define FUNC_SAW 1 15 | #define FUNC_SQR 2 16 | #define FUNC_TRI 3 17 | #define FUNC_WHITE 4 18 | #define FUNC_RAND 5 19 | 20 | //midi stuff 21 | #define MIDI_NOTE_OFF 0x80 22 | #define MIDI_NOTE_ON 0x90 23 | #define MIDI_KEYPRESSURE 0xA0 24 | #define MIDI_CONTROL_CHANGE 0xB0 25 | #define MIDI_PROGRAMCHANGE 0xC0 26 | #define MIDI_CHANNELPRESSURE 0xD0 27 | #define MIDI_PITCHBEND 0xE0 28 | 29 | #define MIDI_TYPE_MASK 0xF0 30 | #define MIDI_CHANNEL_MASK 0x0F 31 | #define MIDI_DATA_MASK 0x7F 32 | #define MIDI_PITCH_CENTER 0x2000 33 | #define MIDI_SUSTAIN_PEDAL 0x40 34 | #define MIDI_ALL_NOTES_OFF 123 35 | #define MIDI_ALL_SOUND_OFF 120 36 | 37 | 38 | 39 | //angles 40 | #define PI 3.1415926535897932384626433832795 41 | #define INV_A .00227272727272727272727272727272727272727 42 | 43 | //envelope states 44 | #define ENV_ATTACK 0 45 | #define ENV_DECAY 1 46 | #define ENV_BREAK 2 47 | #define ENV_SWELL 3 48 | #define ENV_SUSTAIN 4 49 | #define ENV_RELEASE 5 50 | -------------------------------------------------------------------------------- /test/ffthing.m: -------------------------------------------------------------------------------- 1 | %spencer jackson 2 | 3 | nharm = 200; 4 | nsamp = 2048; 5 | t=-pi:(2*pi)/2048:(1*pi-1/2048); 6 | t=[1:nharm]'*t; 7 | size(t) 8 | 9 | den = repmat(1./[1:nharm]',1,nsamp); 10 | size(den) 11 | saw = sum(repmat([-1;1],nharm/2,nsamp).*sin(t).*den); 12 | saw = -2*sum(sin(t).*den)/pi; 13 | size(saw) 14 | tmp=fft(saw); 15 | plot(1:nsamp,tmp) 16 | plot(1:nsamp,abs(tmp)) 17 | plot(1:nsamp,ifft(tmp)); 18 | %plot(saw) 19 | 20 | tmp2 = tmp; 21 | tmp2(floor(.05*nsamp):ceil(.95*nsamp)) = 0; 22 | figure(2); 23 | plot(1:nsamp,ifft(tmp2)) 24 | figure(1); 25 | -------------------------------------------------------------------------------- /test/fltr.m: -------------------------------------------------------------------------------- 1 | %spencer Jackson 2 | 3 | %filter 4 | pkg load control; 5 | 6 | w = 880*2*pi; %cutoff 7 | d = 1.707; %damping factor 8 | 9 | H = tf([w^2],[1 2*d*w w^2]); 10 | 11 | bode(H); 12 | 13 | 14 | %discretize 15 | %TODO: this isn't the right way 16 | Hz = tf(H,1/44100,'tsam'); 17 | figure() 18 | bode(Hz); 19 | -------------------------------------------------------------------------------- /test/plotIREQ.m: -------------------------------------------------------------------------------- 1 | function plotIREQ(file) 2 | 3 | [y fs b] = wavread(file); 4 | l = length(y); 5 | 6 | %eq curve 7 | figure(1) 8 | %TODO: add smoothed line 9 | semilogx(1/l:fs/l:fs/2,20*log10(abs(fft(y(:,1)))(1:ceil(l/2)))) 10 | xlim([20 20000]) 11 | title('Frequency response') 12 | xlabel('Hz') 13 | ylabel('dB') 14 | grid('on') 15 | 16 | %spectrogram 17 | figure(2) 18 | clf 19 | specgram(y(:,1),256,fs,hanning(256),256-32) 20 | title('Spectrogram') 21 | 22 | 23 | %waterfall plot 24 | %this plot is tuned for looking at room responses for resonances 25 | %figure(3) 26 | windowlen = 500;%ms 27 | rise = 100;%ms 28 | slices = 51; 29 | 30 | nfft = 2^ceil(log2(windowlen/1000*fs)); 31 | lhs = rise/1000*fs;%samples of hanning rise time 32 | win = [hanning(2*lhs)(1:lhs); tukeywin(nfft,.25)(lhs+1:end)];%window has hanning rise and rest is .25 tukey 33 | step = 2^floor(log2(length(y)/slices));%time size of each slice of spectra 34 | overlap = nfft - step; 35 | [S, f, t] = specgram (y(:,1), nfft, fs, win, overlap);%nfft - nfft/8); 36 | ff = f' * ones (1, length (t)); 37 | tt = ones (length (f), 1) * t; 38 | Sdb = 20*log10(abs(S')); 39 | %TODO: may want to smooth it a bit 40 | srf = waterfall (tt', ff'+.1, Sdb);%a minor offset is added to avoid 0 values on the log scale 41 | ax = get(srf,'parent'); 42 | set(ax,'yscale','log'); 43 | view([100,15,15]) 44 | grid('on') 45 | shading('faceted') 46 | ylim([10 200]) 47 | zmx = max(Sdb); 48 | zlim([-50 zmx+10]) 49 | xlabel('sec') 50 | ylabel('Hz') 51 | zlabel('dB') 52 | colormap('jet') 53 | 54 | 55 | figure(1) 56 | 57 | 58 | -------------------------------------------------------------------------------- /test/schrodercascade.m: -------------------------------------------------------------------------------- 1 | %spencer jackson 2 | % this is quicker (and probably more efficient) than making a bunch of code to do it 3 | 4 | g1 = .5; % gain of 1st schroeder filter 5 | N1 = 225; % delay of the 1st schroeder filter 6 | 7 | g2 = .5; % gain of next schroeder filter 8 | N2 = 556; % delay of the next schroeder filter 9 | 10 | g3 = .5; % gain of next schroeder filter 11 | N3 = 441; % delay of the next schroeder filter 12 | 13 | g4 = .5; % gain of next schroeder filter 14 | N4 = 341; % delay of the next schroeder filter 15 | 16 | 17 | pkg load control 18 | AP1 = tf([-g1 zeros(1,N1-1) 1], [1 zeros(1,N1-1) -g1],1,'variable','z^-1') 19 | AP2 = tf([-g2 zeros(1,N2-1) 1], [1 zeros(1,N2-1) -g2],1,'variable','z^-1') 20 | AP3 = tf([-g3 zeros(1,N3-1) 1], [1 zeros(1,N3-1) -g3],1,'variable','z^-1') 21 | AP4 = tf([-g4 zeros(1,N4-1) 1], [1 zeros(1,N4-1) -g4],1,'variable','z^-1') 22 | 23 | AP1*AP2*AP3*AP4 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/test.cxx: -------------------------------------------------------------------------------- 1 | // generated by Fast Light User Interface Designer (fluid) version 1.0300 2 | 3 | #include "test.h" 4 | 5 | Fl_Double_Window* FancyUI::make_window() { 6 | Fl_Double_Window* w; 7 | { Fl_Double_Window* o = new Fl_Double_Window(529, 861); 8 | w = o; 9 | o->user_data((void*)(this)); 10 | { ffffltk::Dial* o = new ffffltk::Dial(50, 20, 130, 270, "Fancyness"); 11 | o->box(FL_NO_BOX); 12 | o->color(FL_BACKGROUND_COLOR); 13 | o->selection_color(FL_INACTIVE_COLOR); 14 | o->labeltype(FL_NORMAL_LABEL); 15 | o->labelfont(0); 16 | o->labelsize(14); 17 | o->labelcolor(FL_FOREGROUND_COLOR); 18 | o->align(Fl_Align(FL_ALIGN_BOTTOM)); 19 | o->when(FL_WHEN_CHANGED); 20 | o->drawing_h = cairo_code_draw_vintagedial_get_height(); o->drawing_w = cairo_code_draw_vintagedial_get_width(); o->drawing_f = &cairo_code_draw_vintagedial_render; 21 | } // ffffltk::Dial* o 22 | o->show(); 23 | o->end(); 24 | } // Fl_Double_Window* o 25 | return w; 26 | } 27 | -------------------------------------------------------------------------------- /test/test.fl: -------------------------------------------------------------------------------- 1 | # data file for the Fltk User Interface Designer (fluid) 2 | version 1.0300 3 | header_name {.h} 4 | code_name {.cxx} 5 | class FancyUI {open 6 | } { 7 | Function {make_window()} {open 8 | } { 9 | Fl_Window {} {open 10 | xywh {1069 18 529 861} type Double 11 | code0 {o->show();} visible 12 | } { 13 | Fl_Dial {} { 14 | label Fancyness selected 15 | xywh {50 20 130 70} 16 | code0 {\#include "ffffltk.h"} 17 | code1 {o->drawing_h = cairo_code_draw_vintagedial_get_height(); o->drawing_w = cairo_code_draw_vintagedial_get_width(); o->drawing_f = &cairo_code_draw_vintagedial_render;} 18 | class {ffffltk::Dial} 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/test.h: -------------------------------------------------------------------------------- 1 | // generated by Fast Light User Interface Designer (fluid) version 1.0300 2 | 3 | #ifndef test_h 4 | #define test_h 5 | #include 6 | #include 7 | #include "ffffltk.h" 8 | 9 | class FancyUI { 10 | public: 11 | Fl_Double_Window* make_window(); 12 | }; 13 | #endif 14 | -------------------------------------------------------------------------------- /test/test_main.cxx: -------------------------------------------------------------------------------- 1 | //g++ -g -Wall -fpermissive test_main.cxx -I ../src/EnvelopeFollower/build/ -I ../src/draw -I ../src/ffffltk/ -I ../src/EnvelopeFollower/ -lGL -lntk `pkg-config --cflags --libs cairo ntk` -o test_ui 2 | 3 | #include 4 | #include 5 | 6 | //#include "test.h" 7 | #include "lushlife_ui.h" 8 | 9 | int main() 10 | { 11 | //FancyUI a;// = new FancyUI; 12 | //EnvFollowerUI* a = new EnvFollowerUI(); 13 | LushLifeUI a ;//= new EnvFollowerUI(); 14 | //LushLifeUI *a = new LushLifeUI(); 15 | 16 | //a.make_window(); 17 | //a->ui->show(); 18 | a.ui->show(); 19 | 20 | Fl::run(); 21 | 22 | //delete[] a; 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /test/testmin.c: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | 9 | float findminx(float arr[]) 10 | { 11 | //return subsample index of minima 12 | float m2 = arr[3]-arr[1]; 13 | float a,b,c; 14 | if(m2>0) 15 | { 16 | //minima is before sample 17 | a = 1.5*(-arr[0] + 3*arr[1] - 3*arr[2] + arr[3]); 18 | b = 2*arr[0] - 5*arr[1] + 4*arr[2] - arr[3]; 19 | c = .5*(-arr[0] + arr[2]); 20 | 21 | printf("less a=%f b=%f c=%f %f\n",a,b,c,b*b-4*a*c); 22 | if(!a) return -c/b; 23 | return 1-(-b+sqrt(b*b-4*a*c))/(2*a);//its possible that this is wrong but I think b-.. will be out of domain t E[0,1] 24 | } 25 | else if(m2<0) 26 | { 27 | //minima is after sample 28 | a = 1.5*(-arr[1] + 3*arr[2] - 3*arr[3] + arr[4]); 29 | b = 2*arr[1] - 5*arr[2] + 4*arr[3] - arr[4]; 30 | c = .5*(-arr[1] + arr[3]); 31 | 32 | printf("more a=%f b=%f c=%f %f\n",a,b,c,b*b-4*a*c); 33 | if(!a) return -c/b; 34 | return (-b+sqrt(b*b-4*a*c))/(2*a);//its possible that this is wrong but I think b-.. will be out of domain t E[0,1] 35 | } 36 | else return 0; 37 | } 38 | 39 | 40 | int main() 41 | { 42 | //float x[] = {6.25, 2.25, .25, .25, 2.25, 6.25}; // a parabola with minima 0 at .5 43 | //float x[] = {5.0625, 1.5625, .0625, .5625, 3.0625, 7.5625}; // a parabola with minima 0 at .25 44 | //float x[] = { 5.70732, 1.92932, 0.15132, 0.37332, 2.59532, 6.81732}; // a parabola with min at .389 45 | float x[] = {32.573513 ,3.722280 ,0.022898 ,0.139369 ,6.735691 , 46.475866}; // a parabola squared min .389 46 | //float x[] = {3, 2, 1, 1.5, 2}; //more 47 | //float x[] = {2, 1.5, 1, 2, 3}; //less 48 | 49 | printf("%f\n",findminx(x)); 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /test/waves.h: -------------------------------------------------------------------------------- 1 | //Spencer Jackson 2 | //waves.h 3 | #include"constants.h" 4 | 5 | #define TABLE_LENGTH 2520 6 | //1920 = (2^7)(3)5 7 | //2520 = (2^3)(3^2)(5)(7) 8 | #define SAW_MIN 0; 9 | #define SAW_MAX TABLE_LENGTH; 10 | 11 | 12 | //make it OO 13 | typedef struct _HYSTERESIS 14 | { 15 | double prev_phase; 16 | double prev_val; 17 | 18 | }HYSTERESIS; 19 | 20 | struct _WAVESOURCE; 21 | typedef struct _WAVESOURCE WAVESOURCE; 22 | 23 | struct _WAVESOURCE 24 | { 25 | double saw_table[TABLE_LENGTH]; 26 | double tri_table[TABLE_LENGTH]; 27 | double saw_step; 28 | double half_phase; 29 | double phase_coeff; 30 | double phase_offset; 31 | 32 | double (*wave_func[6])(WAVESOURCE* , HYSTERESIS* , double); 33 | double (*sin_func)(WAVESOURCE* , HYSTERESIS* , double); 34 | double (*saw_func)(WAVESOURCE* , HYSTERESIS* , double); 35 | double (*sqr_func)(WAVESOURCE* , HYSTERESIS* , double); 36 | double (*tri_func)(WAVESOURCE* , HYSTERESIS* , double); 37 | double (*white_func)(WAVESOURCE* , HYSTERESIS* , double); 38 | double (*rand_func)(WAVESOURCE* , HYSTERESIS* , double); 39 | 40 | double func_min; 41 | double func_max; 42 | double func_domain; 43 | 44 | double V; 45 | double V2; 46 | }; 47 | 48 | double myPow2(double x); 49 | 50 | void init_waves(WAVESOURCE* self); 51 | void init_hysteresis(HYSTERESIS *self); 52 | double mySin(WAVESOURCE* self, HYSTERESIS* mem, double x); 53 | double saw(WAVESOURCE* self, HYSTERESIS* mem, double phase); 54 | double square(WAVESOURCE* self, HYSTERESIS *mem, double phase); 55 | double triangle(WAVESOURCE* self, HYSTERESIS *mem, double phase); 56 | double white(WAVESOURCE* self, HYSTERESIS *mem, double phase); 57 | double randomsnh(WAVESOURCE* self, HYSTERESIS *mem, double phase); 58 | 59 | 60 | -------------------------------------------------------------------------------- /test/zpmapping.m: -------------------------------------------------------------------------------- 1 | %spencer jackson 2 | % zpmapping.m - visualizes the effects of sampling by plotting poles/loci from varying parameters in an analog 2 pole resonant filter and mapping the locus to the z plane 3 | 4 | 5 | %inputs 6 | cutoff = 12000; 7 | cutoff = 20:1:22000; %filter frequency hz (sweep) 8 | damp = .001:.001:1; %damping factor 9 | damp = .1 10 | fs = 44100; %sampling rate hz 11 | 12 | %magic 13 | zeta = damp; 14 | omega = 2*pi*cutoff; 15 | 16 | % omega^2/(s^2 + 2*zeta*omega + omega^2) 17 | R = -omega*zeta; %real part 18 | I = omega*sqrt(1-zeta.^2); %imaginary 19 | 20 | figure(1) 21 | plot(R,I,R,-I); 22 | title("S-Plane") 23 | grid on 24 | 25 | %map to z plane z=exp(sT) 26 | g = exp(R/fs); 27 | Rz = g.*cos(I/fs); 28 | Iz = g.*sin(I/fs); 29 | figure(2) 30 | x = -1:.01:1; 31 | y = sqrt(1-x.^2); 32 | plot(x,y,'k',x,-y,'k',Rz,Iz,Rz,-Iz); 33 | title("Z-Plane") 34 | axis("square") 35 | grid on 36 | 37 | 38 | %next step: 39 | % look at effect of approximations for that mapping 40 | --------------------------------------------------------------------------------