Browse Source

Larynx added

tags/v1.0
ninodewit 9 years ago
parent
commit
13b3fdd570
51 changed files with 5345 additions and 5901 deletions
  1. +5
    -0
      Makefile
  2. +11
    -2
      dpf/distrho/extra/String.hpp
  3. +0
    -46
      modguis/Modulay.modgui/manifest.ttl
  4. +0
    -49
      modguis/Modulay.modgui/modgui/icon-modulay.html
  5. BIN
      modguis/Modulay.modgui/modgui/knobs/boxy/black.png
  6. BIN
      modguis/Modulay.modgui/modgui/pedals/boxy75/racing.png
  7. BIN
      modguis/Modulay.modgui/modgui/pedals/footswitch.png
  8. BIN
      modguis/Modulay.modgui/modgui/screenshot-modulay.png
  9. +0
    -1093
      modguis/Modulay.modgui/modgui/stylesheet-modulay.css
  10. BIN
      modguis/Modulay.modgui/modgui/thumbnail-modulay.png
  11. BIN
      modguis/Modulay.modgui/modgui/utils/dropdown-arrow-black.png
  12. BIN
      modguis/Modulay.modgui/modgui/utils/dropdown-arrow-white.png
  13. +0
    -42
      modguis/Pitchotto.modgui/manifest.ttl
  14. +0
    -49
      modguis/Pitchotto.modgui/modgui/icon-pitchotto.html
  15. BIN
      modguis/Pitchotto.modgui/modgui/knobs/boxy/black.png
  16. BIN
      modguis/Pitchotto.modgui/modgui/pedals/boxy/red.png
  17. BIN
      modguis/Pitchotto.modgui/modgui/pedals/footswitch.png
  18. BIN
      modguis/Pitchotto.modgui/modgui/screenshot-pitchotto.png
  19. +0
    -1093
      modguis/Pitchotto.modgui/modgui/stylesheet-pitchotto.css
  20. BIN
      modguis/Pitchotto.modgui/modgui/thumbnail-pitchotto.png
  21. BIN
      modguis/Pitchotto.modgui/modgui/utils/dropdown-arrow-black.png
  22. BIN
      modguis/Pitchotto.modgui/modgui/utils/dropdown-arrow-white.png
  23. +0
    -50
      modguis/Shiroverb.modgui/manifest.ttl
  24. +0
    -49
      modguis/Shiroverb.modgui/modgui/icon-shiroverb.html
  25. BIN
      modguis/Shiroverb.modgui/modgui/knobs/boxy/black.png
  26. BIN
      modguis/Shiroverb.modgui/modgui/pedals/boxy75/petrol.png
  27. BIN
      modguis/Shiroverb.modgui/modgui/pedals/footswitch.png
  28. BIN
      modguis/Shiroverb.modgui/modgui/screenshot-shiroverb.png
  29. +0
    -1093
      modguis/Shiroverb.modgui/modgui/stylesheet-shiroverb.css
  30. BIN
      modguis/Shiroverb.modgui/modgui/thumbnail-shiroverb.png
  31. BIN
      modguis/Shiroverb.modgui/modgui/utils/dropdown-arrow-black.png
  32. BIN
      modguis/Shiroverb.modgui/modgui/utils/dropdown-arrow-white.png
  33. +1
    -1
      plugins/Makefile.DPF-Max-Gen.mk
  34. +17
    -9
      plugins/common/gen_dsp/genlib.cpp
  35. +13
    -38
      plugins/common/gen_dsp/genlib.h
  36. +3
    -5
      plugins/common/gen_dsp/genlib_common.h
  37. +1
    -4
      plugins/common/gen_dsp/genlib_ops.h
  38. +34
    -0
      plugins/larynx/DistrhoPluginInfo.h
  39. +1
    -0
      plugins/larynx/DistrhoPluginMaxGen.cpp
  40. +40
    -0
      plugins/larynx/Makefile
  41. +246
    -0
      plugins/larynx/gen_exported.cpp
  42. +14
    -20
      plugins/larynx/gen_exported.h
  43. +459
    -0
      plugins/larynx/larynx.gendsp
  44. +1095
    -0
      plugins/larynx/larynx.maxpat
  45. +140
    -128
      plugins/modulay/gen_exported.cpp
  46. +423
    -314
      plugins/modulay/modulay.gendsp
  47. +901
    -415
      plugins/modulay/modulay.maxpat
  48. +1
    -1
      plugins/shiroverb/DistrhoPluginInfo.h
  49. +381
    -352
      plugins/shiroverb/gen_exported.cpp
  50. +630
    -500
      plugins/shiroverb/shiroverb.gendsp
  51. +929
    -548
      plugins/shiroverb/shiroverb.maxpat

+ 5
- 0
Makefile View File

@@ -51,6 +51,7 @@ endif
$(MAKE) all -C plugins/bitcrush
$(MAKE) all -C plugins/freeverb
$(MAKE) all -C plugins/gigaverb
$(MAKE) all -C plugins/larynx
$(MAKE) all -C plugins/modulay
$(MAKE) all -C plugins/pitchotto
$(MAKE) all -C plugins/pitchshift
@@ -99,6 +100,7 @@ endif
$(MAKE) clean -C plugins/bitcrush
$(MAKE) clean -C plugins/freeverb
$(MAKE) clean -C plugins/gigaverb
$(MAKE) clean -C plugins/larynx
$(MAKE) clean -C plugins/modulay
$(MAKE) clean -C plugins/pitchotto
$(MAKE) clean -C plugins/pitchshift
@@ -134,6 +136,9 @@ endif
cp modguis/MVerb.modgui/manifest.ttl $(DESTDIR)$(PREFIX)/lib/lv2/MVerb.lv2/modgui.ttl

# Max-Gen stuff
cp -r modguis/Larynx.modgui/modgui $(DESTDIR)$(PREFIX)/lib/lv2/Larynx.lv2/
cp modguis/Larynx.modgui/manifest.ttl $(DESTDIR)$(PREFIX)/lib/lv2/Larynx.lv2/modgui.ttl

cp -r modguis/Modulay.modgui/modgui $(DESTDIR)$(PREFIX)/lib/lv2/Modulay.lv2/
cp modguis/Modulay.modgui/manifest.ttl $(DESTDIR)$(PREFIX)/lib/lv2/Modulay.lv2/modgui.ttl



+ 11
- 2
dpf/distrho/extra/String.hpp View File

@@ -54,11 +54,20 @@ public:
/*
* Simple char string.
*/
explicit String(char* const strBuf) noexcept
explicit String(char* const strBuf, const bool copyData = true) noexcept
: fBuffer(_null()),
fBufferLen(0)
{
_dup(strBuf);
if (copyData || strBuf == nullptr)
{
_dup(strBuf);
}
else
{
fBuffer = strBuf;
fBufferLen = std::strlen(strBuf);
}

}

/*


+ 0
- 46
modguis/Modulay.modgui/manifest.ttl View File

@@ -1,46 +0,0 @@
@prefix modgui: <http://moddevices.com/ns/modgui#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .

<http://distrho.sf.net/plugins/Modulay>
modgui:gui [
modgui:resourcesDirectory <modgui> ;
modgui:iconTemplate <modgui/icon-modulay.html> ;
modgui:stylesheet <modgui/stylesheet-modulay.css> ;
modgui:screenshot <modgui/screenshot-modulay.png> ;
modgui:thumbnail <modgui/thumbnail-modulay.png> ;
modgui:brand "Shiro" ;
modgui:label "Modulay" ;
modgui:model "boxy" ;
modgui:panel "7-knobs" ;
modgui:color "racing" ;
modgui:knob "black" ;
modgui:port [
lv2:index 0 ;
lv2:symbol "time" ;
lv2:name "time" ;
] , [
lv2:index 1 ;
lv2:symbol "repeats" ;
lv2:name "repeats" ;
] , [
lv2:index 2 ;
lv2:symbol "cutoff" ;
lv2:name "cutoff" ;
] , [
lv2:index 3 ;
lv2:symbol "mix" ;
lv2:name "mix" ;
] , [
lv2:index 4 ;
lv2:symbol "depth" ;
lv2:name "depth" ;
] , [
lv2:index 5 ;
lv2:symbol "rate" ;
lv2:name "rate" ;
] , [
lv2:index 6 ;
lv2:symbol "delay" ;
lv2:name "delay" ;
] ;
] .

+ 0
- 49
modguis/Modulay.modgui/modgui/icon-modulay.html View File

@@ -1,49 +0,0 @@
<div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-seven-knobs mod-boxy75 mod-{{color}} {{color}}">
<div mod-role="drag-handle" class="mod-drag-handle"></div>
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div>
<div class="mod-plugin-name"><h1>{{label}}</h1></div>
<div class="mod-light on" mod-role="bypass-light"></div>
<div class="mod-control-group mod-{{knob}} clearfix">
{{#controls}}
<div class="mod-knob">
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div>
<span class="mod-knob-title">{{name}}</span>
</div>
{{/controls}}
</div>
<div class="mod-footswitch" mod-role="bypass"></div>
<div class="mod-pedal-input">
{{#effect.ports.audio.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.audio.input}}
{{#effect.ports.midi.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.midi.input}}
{{#effect.ports.cv.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.cv.input}}
</div>
<div class="mod-pedal-output">
{{#effect.ports.audio.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.audio.output}}
{{#effect.ports.midi.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.midi.output}}
{{#effect.ports.cv.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.cv.output}}
</div>
</div>

BIN
modguis/Modulay.modgui/modgui/knobs/boxy/black.png View File

Before After
Width: 8320  |  Height: 128  |  Size: 382KB

BIN
modguis/Modulay.modgui/modgui/pedals/boxy75/racing.png View File

Before After
Width: 326  |  Height: 431  |  Size: 236KB

BIN
modguis/Modulay.modgui/modgui/pedals/footswitch.png View File

Before After
Width: 88  |  Height: 176  |  Size: 13KB

BIN
modguis/Modulay.modgui/modgui/screenshot-modulay.png View File

Before After
Width: 357  |  Height: 430  |  Size: 235KB

+ 0
- 1093
modguis/Modulay.modgui/modgui/stylesheet-modulay.css
File diff suppressed because it is too large
View File


BIN
modguis/Modulay.modgui/modgui/thumbnail-modulay.png View File

Before After
Width: 53  |  Height: 64  |  Size: 6.4KB

BIN
modguis/Modulay.modgui/modgui/utils/dropdown-arrow-black.png View File

Before After
Width: 13  |  Height: 6  |  Size: 982B

BIN
modguis/Modulay.modgui/modgui/utils/dropdown-arrow-white.png View File

Before After
Width: 13  |  Height: 6  |  Size: 977B

+ 0
- 42
modguis/Pitchotto.modgui/manifest.ttl View File

@@ -1,42 +0,0 @@
@prefix modgui: <http://moddevices.com/ns/modgui#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .

<http://distrho.sf.net/plugins/Pitchotto>
modgui:gui [
modgui:resourcesDirectory <modgui> ;
modgui:iconTemplate <modgui/icon-pitchotto.html> ;
modgui:stylesheet <modgui/stylesheet-pitchotto.css> ;
modgui:screenshot <modgui/screenshot-pitchotto.png> ;
modgui:thumbnail <modgui/thumbnail-pitchotto.png> ;
modgui:brand "Shiro" ;
modgui:label "Pitchotto" ;
modgui:model "boxy" ;
modgui:panel "6-knobs" ;
modgui:color "red" ;
modgui:knob "black" ;
modgui:port [
lv2:index 0 ;
lv2:symbol "ratio1" ;
lv2:name "ratio1" ;
] , [
lv2:index 1 ;
lv2:symbol "ratio2" ;
lv2:name "ratio2" ;
] , [
lv2:index 2 ;
lv2:symbol "mix" ;
lv2:name "mix" ;
] , [
lv2:index 3 ;
lv2:symbol "delay1" ;
lv2:name "delay1" ;
] , [
lv2:index 4 ;
lv2:symbol "delay2" ;
lv2:name "delay2" ;
] , [
lv2:index 5 ;
lv2:symbol "cutoff" ;
lv2:name "cutoff" ;
] ;
] .

+ 0
- 49
modguis/Pitchotto.modgui/modgui/icon-pitchotto.html View File

@@ -1,49 +0,0 @@
<div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-six-knobs mod-{{color}} {{color}}">
<div mod-role="drag-handle" class="mod-drag-handle"></div>
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div>
<div class="mod-plugin-name"><h1>{{label}}</h1></div>
<div class="mod-light on" mod-role="bypass-light"></div>
<div class="mod-control-group mod-{{knob}} clearfix">
{{#controls}}
<div class="mod-knob">
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div>
<span class="mod-knob-title">{{name}}</span>
</div>
{{/controls}}
</div>
<div class="mod-footswitch" mod-role="bypass"></div>
<div class="mod-pedal-input">
{{#effect.ports.audio.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.audio.input}}
{{#effect.ports.midi.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.midi.input}}
{{#effect.ports.cv.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.cv.input}}
</div>
<div class="mod-pedal-output">
{{#effect.ports.audio.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.audio.output}}
{{#effect.ports.midi.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.midi.output}}
{{#effect.ports.cv.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.cv.output}}
</div>
</div>

BIN
modguis/Pitchotto.modgui/modgui/knobs/boxy/black.png View File

Before After
Width: 8320  |  Height: 128  |  Size: 382KB

BIN
modguis/Pitchotto.modgui/modgui/pedals/boxy/red.png View File

Before After
Width: 230  |  Height: 431  |  Size: 173KB

BIN
modguis/Pitchotto.modgui/modgui/pedals/footswitch.png View File

Before After
Width: 88  |  Height: 176  |  Size: 13KB

BIN
modguis/Pitchotto.modgui/modgui/screenshot-pitchotto.png View File

Before After
Width: 261  |  Height: 430  |  Size: 167KB

+ 0
- 1093
modguis/Pitchotto.modgui/modgui/stylesheet-pitchotto.css
File diff suppressed because it is too large
View File


BIN
modguis/Pitchotto.modgui/modgui/thumbnail-pitchotto.png View File

Before After
Width: 38  |  Height: 64  |  Size: 5.2KB

BIN
modguis/Pitchotto.modgui/modgui/utils/dropdown-arrow-black.png View File

Before After
Width: 13  |  Height: 6  |  Size: 982B

BIN
modguis/Pitchotto.modgui/modgui/utils/dropdown-arrow-white.png View File

Before After
Width: 13  |  Height: 6  |  Size: 977B

+ 0
- 50
modguis/Shiroverb.modgui/manifest.ttl View File

@@ -1,50 +0,0 @@
@prefix modgui: <http://moddevices.com/ns/modgui#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .

<http://distrho.sf.net/plugins/Shiroverb>
modgui:gui [
modgui:resourcesDirectory <modgui> ;
modgui:iconTemplate <modgui/icon-shiroverb.html> ;
modgui:stylesheet <modgui/stylesheet-shiroverb.css> ;
modgui:screenshot <modgui/screenshot-shiroverb.png> ;
modgui:thumbnail <modgui/thumbnail-shiroverb.png> ;
modgui:brand "Shiro" ;
modgui:label "Shiroverb" ;
modgui:model "boxy" ;
modgui:panel "8-knobs" ;
modgui:color "petrol" ;
modgui:knob "black" ;
modgui:port [
lv2:index 0 ;
lv2:symbol "decay" ;
lv2:name "decay" ;
] , [
lv2:index 1 ;
lv2:symbol "tail" ;
lv2:name "tail" ;
] , [
lv2:index 2 ;
lv2:symbol "damping" ;
lv2:name "damping" ;
] , [
lv2:index 3 ;
lv2:symbol "mix" ;
lv2:name "mix" ;
] , [
lv2:index 4 ;
lv2:symbol "roomsize" ;
lv2:name "roomsize" ;
] , [
lv2:index 5 ;
lv2:symbol "ratio" ;
lv2:name "ratio" ;
] , [
lv2:index 6 ;
lv2:symbol "cutoff" ;
lv2:name "cutoff" ;
] , [
lv2:index 7 ;
lv2:symbol "shimmer" ;
lv2:name "shimmer" ;
] ;
] .

+ 0
- 49
modguis/Shiroverb.modgui/modgui/icon-shiroverb.html View File

@@ -1,49 +0,0 @@
<div class="mod-pedal mod-pedal-boxy{{{cns}}} mod-eight-knobs mod-boxy75 mod-{{color}} {{color}}">
<div mod-role="drag-handle" class="mod-drag-handle"></div>
<div class="mod-plugin-brand"><h1>{{brand}}</h1></div>
<div class="mod-plugin-name"><h1>{{label}}</h1></div>
<div class="mod-light on" mod-role="bypass-light"></div>
<div class="mod-control-group mod-{{knob}} clearfix">
{{#controls}}
<div class="mod-knob">
<div class="mod-knob-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div>
<span class="mod-knob-title">{{name}}</span>
</div>
{{/controls}}
</div>
<div class="mod-footswitch" mod-role="bypass"></div>
<div class="mod-pedal-input">
{{#effect.ports.audio.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.audio.input}}
{{#effect.ports.midi.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.midi.input}}
{{#effect.ports.cv.input}}
<div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-input-image"></div>
</div>
{{/effect.ports.cv.input}}
</div>
<div class="mod-pedal-output">
{{#effect.ports.audio.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.audio.output}}
{{#effect.ports.midi.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.midi.output}}
{{#effect.ports.cv.output}}
<div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-cv-port" mod-port-symbol="{{symbol}}">
<div class="mod-pedal-output-image"></div>
</div>
{{/effect.ports.cv.output}}
</div>
</div>

BIN
modguis/Shiroverb.modgui/modgui/knobs/boxy/black.png View File

Before After
Width: 8320  |  Height: 128  |  Size: 382KB

BIN
modguis/Shiroverb.modgui/modgui/pedals/boxy75/petrol.png View File

Before After
Width: 326  |  Height: 431  |  Size: 245KB

BIN
modguis/Shiroverb.modgui/modgui/pedals/footswitch.png View File

Before After
Width: 88  |  Height: 176  |  Size: 13KB

BIN
modguis/Shiroverb.modgui/modgui/screenshot-shiroverb.png View File

Before After
Width: 357  |  Height: 430  |  Size: 241KB

+ 0
- 1093
modguis/Shiroverb.modgui/modgui/stylesheet-shiroverb.css
File diff suppressed because it is too large
View File


BIN
modguis/Shiroverb.modgui/modgui/thumbnail-shiroverb.png View File

Before After
Width: 53  |  Height: 64  |  Size: 6.9KB

BIN
modguis/Shiroverb.modgui/modgui/utils/dropdown-arrow-black.png View File

Before After
Width: 13  |  Height: 6  |  Size: 982B

BIN
modguis/Shiroverb.modgui/modgui/utils/dropdown-arrow-white.png View File

Before After
Width: 13  |  Height: 6  |  Size: 977B

+ 1
- 1
plugins/Makefile.DPF-Max-Gen.mk View File

@@ -18,7 +18,7 @@ endif
TARGET_DIR = ../../bin

BUILD_C_FLAGS += -I.
BUILD_CXX_FLAGS += -I. -I../common -I../common/gen_dsp -I../../dpf/distrho -I../../dpf/dgl
BUILD_CXX_FLAGS += -I. -I../common -I../common/gen_dsp -I../../dpf/distrho -I../../dpf/dgl -Wno-unused-parameter

ifeq ($(HAVE_DGL),true)
BASE_FLAGS += -DHAVE_DGL


+ 17
- 9
plugins/common/gen_dsp/genlib.cpp View File

@@ -24,13 +24,18 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "stdio.h"
#include "string.h"

#ifdef pow
#undef pow
#endif
#include <cmath>
#include <malloc.h>

#define malloc_size malloc_usable_size
#if DISTRHO_OS_MAC
# include <malloc/malloc.h>
#else
# include <malloc.h>
# if DISTRHO_OS_WINDOWS
# define malloc_size _msize
# else
# define malloc_size malloc_usable_size
# endif
#endif

// DATA_MAXIMUM_ELEMENTS * 8 bytes = 256 mb limit
#define DATA_MAXIMUM_ELEMENTS (33554432)
@@ -63,7 +68,7 @@ t_ptr sysmem_resizeptr(void *ptr, t_ptr_size newsize)

t_ptr sysmem_resizeptrclear(void *ptr, t_ptr_size newsize)
{
long oldsize = malloc_size(ptr);
t_ptr_size oldsize = malloc_size(ptr);
t_ptr p = (t_ptr)realloc(ptr, newsize);
if (p) {
@@ -170,6 +175,7 @@ t_genlib_err genlib_buffer_perform_begin(t_genlib_buffer *b)
{
return 0; // to be implemented
}

void genlib_buffer_perform_end(t_genlib_buffer *b)
{
// to be implemented
@@ -177,7 +183,7 @@ void genlib_buffer_perform_end(t_genlib_buffer *b)

t_sample gen_msp_pow(t_sample value, t_sample power)
{
return pow(value, power);
return powf(value, power);
}

void genlib_data_setbuffer(t_genlib_data *b, void *ref) {
@@ -186,8 +192,8 @@ void genlib_data_setbuffer(t_genlib_data *b, void *ref) {

typedef struct {
t_genlib_data_info info;
t_sample cursor; // used by Delay
//t_symbol * name;
t_sample cursor; // used by Delay
//t_symbol * name;
} t_dsp_gen_data;

t_genlib_data * genlib_obtain_data_from_reference(void *ref)
@@ -352,3 +358,5 @@ void genlib_data_resize(t_genlib_data *b, long s, long c) {
}

void genlib_reset_complete(void *data) {}



+ 13
- 38
plugins/common/gen_dsp/genlib.h View File

@@ -26,26 +26,7 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//////////// genlib.h ////////////
// genlib.h -- max (gen~) version

#ifndef GEN_WINDOWS
#ifndef _SIZE_T
#define _SIZE_T
typedef __typeof__(sizeof(int)) size_t;
#endif
#endif

#ifndef __INT32_TYPE__
#define __INT32_TYPE__ int
#endif

#ifdef MSP_ON_CLANG
// gen~ hosted:
typedef unsigned __INT32_TYPE__ uint32_t;
typedef unsigned __INT64_TYPE__ uint64_t;
#else
#ifdef __GNUC__
#include <stdint.h>
#endif
#endif
#include "DistrhoUtils.hpp"

#define inf (__DBL_MAX__)
#define GEN_UINT_MAX (4294967295)
@@ -54,27 +35,21 @@ typedef __typeof__(sizeof(int)) size_t;
#define C74_CONST const

// max_types.h:
// #ifdef C74_X64
// typedef unsigned long long t_ptr_uint;
// typedef long long t_ptr_int;
// typedef double t_atom_float;
// typedef t_ptr_uint t_getbytes_size;
// #else
typedef unsigned long t_ptr_uint;
typedef long t_ptr_int;
typedef float t_atom_float;
typedef short t_getbytes_size;
// #endif
typedef uintptr_t t_ptr_uint;
typedef intptr_t t_ptr_int;
typedef float t_atom_float;
typedef t_ptr_uint t_getbytes_size;

typedef uint32_t t_uint32;
typedef t_ptr_int t_atom_long; // the type that is an A_LONG in an atom

typedef t_ptr_int t_int; ///< an integer @ingroup misc
typedef t_ptr_int t_int; ///< an integer @ingroup misc
typedef t_ptr_uint t_ptr_size; ///< unsigned pointer-sized value for counting (like size_t) @ingroup misc
typedef t_ptr_int t_atom_long; ///< the type that is an A_LONG in a #t_atom @ingroup misc
typedef t_atom_long t_max_err; ///< an integer value suitable to be returned as an error code @ingroup misc

extern "C" {

// string reference handling:
void * genlib_obtain_reference_from_string(const char * name);
char *genlib_reference_getname(void *ref);
@@ -99,12 +74,12 @@ extern "C" {
// other notification:
void genlib_reset_complete(void *data);
// get/set state of parameters
size_t genlib_getstatesize(CommonState *cself, getparameter_method getmethod);
short genlib_getstate(CommonState *cself, char *state, getparameter_method getmethod);
short genlib_setstate(CommonState *cself, const char *state, setparameter_method setmethod);
// get/set state of parameters
size_t genlib_getstatesize(CommonState *cself, getparameter_method getmethod);
short genlib_getstate(CommonState *cself, char *state, getparameter_method getmethod);
short genlib_setstate(CommonState *cself, const char *state, setparameter_method setmethod);
}; // extern "C"
#define genlib_sysmem_newptr(s) sysmem_newptr(s)


+ 3
- 5
plugins/common/gen_dsp/genlib_common.h View File

@@ -21,17 +21,15 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef GENLIB_COMMON_H
#define GENLIB_COMMON_H 1

#include "genlib_common_win.h"

//////////// genlib_common.h ////////////
// common data structure header file -- this is the stuff required by the
// common code and accessed by the export and max code
#define DSP_GEN_MAX_SIGNALS 16
#define DSP_GEN_MAX_SIGNALS 16

typedef float t_sample;
typedef float t_param;
typedef char *t_ptr;
typedef char *t_ptr;
typedef long t_genlib_err;
typedef enum {


+ 1
- 4
plugins/common/gen_dsp/genlib_ops.h View File

@@ -35,10 +35,7 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define GENLIB_PI_OVER_4 (0.785398163397448309615660845819875721f)
#define GENLIB_1_OVER_LOG_2 (1.442695040888963f)

// denormal numbers cannot occur when hosted in MSP:
// #ifdef MSP_ON_CLANG
#define GENLIB_NO_DENORM_TEST 1
// #endif
#define GENLIB_NO_DENORM_TEST 1

// assumes v is a 64-bit double:
#define GENLIB_IS_NAN_DOUBLE(v) (((((uint32_t *)&(v))[1])&0x7fe00000)==0x7fe00000)


+ 34
- 0
plugins/larynx/DistrhoPluginInfo.h View File

@@ -0,0 +1,34 @@
/*
* Copyright (C) 2015 Nino de Wit <ninodig@hotmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with
* or without fee is hereby granted, provided that the above copyright notice and this
* permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "SHIRO"
#define DISTRHO_PLUGIN_NAME "Larynx"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Larynx"

#define DISTRHO_PLUGIN_HAS_UI 0
#define DISTRHO_PLUGIN_IS_RT_SAFE 0
#define DISTRHO_PLUGIN_NUM_INPUTS 1
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1
#define DISTRHO_PLUGIN_USES_MODGUI 1

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ModulatorPlugin"

#define DISTRHO_PLUGIN_DESCRIPTION "Vibrato with tone control"
#define DISTRHO_PLUGIN_VERSION d_cconst('D', 'V', 'b', 'r')

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED

+ 1
- 0
plugins/larynx/DistrhoPluginMaxGen.cpp View File

@@ -0,0 +1 @@
../common/DistrhoPluginMaxGen.cpp

+ 40
- 0
plugins/larynx/Makefile View File

@@ -0,0 +1,40 @@
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#

# --------------------------------------------------------------
# Project name, used for binaries

NAME = Larynx

# --------------------------------------------------------------
# Files to build

OBJS_DSP = \
DistrhoPluginMaxGen.cpp.o \
gen_exported.cpp.o

# --------------------------------------------------------------
# Do some magic

include ../Makefile.DPF-Max-Gen.mk

# --------------------------------------------------------------
# Enable all possible plugin types

ifeq ($(HAVE_JACK),true)
TARGETS += jack
endif

ifeq ($(LINUX),true)
TARGETS += ladspa
endif

TARGETS += lv2_dsp
TARGETS += vst

all: $(TARGETS)

# --------------------------------------------------------------

+ 246
- 0
plugins/larynx/gen_exported.cpp View File

@@ -0,0 +1,246 @@
#include "gen_exported.h"

namespace gen_exported {


/*******************************************************************************************************************
Copyright (c) 2012 Cycling '74

Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************************************************************************/


// global noise generator
Noise noise;
static const int GENLIB_LOOPCOUNT_BAIL = 100000;


// The State struct contains all the state and procedures for the gendsp kernel
typedef struct State {
CommonState __commonstate;
Delay m_delay_3;
SineCycle m_cycle_7;
SineData __sinedata;
double m_depth_5;
double m_tone_6;
double samplerate;
double m_rate_4;
double m_y_2;
double m_smth_1;
int vectorsize;
int __exception;
// re-initialize all member variables;
inline void reset(double __sr, int __vs) {
__exception = 0;
vectorsize = __vs;
samplerate = __sr;
m_smth_1 = 0;
m_y_2 = 0;
m_delay_3.reset("m_delay_3", 48000);
m_rate_4 = 5;
m_depth_5 = 1;
m_tone_6 = 6000;
m_cycle_7.reset(samplerate, 0);
genlib_reset_complete(this);
};
// the signal processing routine;
inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) {
vectorsize = __n;
const t_sample * __in1 = __ins[0];
t_sample * __out1 = __outs[0];
if (__exception) {
return __exception;
} else if (( (__in1 == 0) || (__out1 == 0) )) {
__exception = GENLIB_ERR_NULL_BUFFER;
return __exception;
};
double expr_12601 = safediv(((m_tone_6 * 2) * 3.1415926535898), 48000);
double sin_12592 = sin(expr_12601);
double clamp_12593 = ((sin_12592 <= 1e-05) ? 1e-05 : ((sin_12592 >= 0.99999) ? 0.99999 : sin_12592));
// the main sample loop;
while ((__n--)) {
const double in1 = (*(__in1++));
double mix_12606 = (m_y_2 + (clamp_12593 * (in1 - m_y_2)));
double mix_12590 = mix_12606;
m_cycle_7.freq(m_rate_4);
double cycle_12596 = m_cycle_7(__sinedata);
double cycleindex_12597 = m_cycle_7.phase();
double add_12595 = (cycle_12596 + 1);
double mul_12594 = (add_12595 * 0.5);
double mul_12598 = (m_depth_5 * mul_12594);
double mstosamps_12589 = (mul_12598 * (samplerate * 0.001));
double mix_12607 = (mstosamps_12589 + (0.999 * (m_smth_1 - mstosamps_12589)));
double mix_12588 = mix_12607;
double tap_12600 = m_delay_3.read_linear(mix_12588);
double out1 = tap_12600;
double y0_next_12602 = mix_12590;
double smth_next_12603 = mix_12588;
m_delay_3.write(mix_12590);
m_y_2 = y0_next_12602;
m_smth_1 = smth_next_12603;
m_delay_3.step();
// assign results to output buffer;
(*(__out1++)) = out1;
};
return __exception;
};
inline void set_rate(double _value) {
m_rate_4 = (_value < 0.1 ? 0.1 : (_value > 10 ? 10 : _value));
};
inline void set_depth(double _value) {
m_depth_5 = (_value < 0 ? 0 : (_value > 5 ? 5 : _value));
};
inline void set_tone(double _value) {
m_tone_6 = (_value < 500 ? 500 : (_value > 12000 ? 12000 : _value));
};
} State;


///
/// Configuration for the genlib API
///

/// Number of signal inputs and outputs

int gen_kernel_numins = 1;
int gen_kernel_numouts = 1;

int num_inputs() { return gen_kernel_numins; }
int num_outputs() { return gen_kernel_numouts; }
int num_params() { return 3; }

/// Assistive lables for the signal inputs and outputs

const char * gen_kernel_innames[] = { "in1" };
const char * gen_kernel_outnames[] = { "out1" };

/// Invoke the signal process of a State object

int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n) {
State * self = (State *)cself;
return self->perform(ins, outs, n);
}

/// Reset all parameters and stateful operators of a State object

void reset(CommonState *cself) {
State * self = (State *)cself;
self->reset(cself->sr, cself->vs);
}

/// Set a parameter of a State object

void setparameter(CommonState *cself, long index, double value, void *ref) {
State * self = (State *)cself;
switch (index) {
case 0: self->set_rate(value); break;
case 1: self->set_depth(value); break;
case 2: self->set_tone(value); break;
default: break;
}
}

/// Get the value of a parameter of a State object

void getparameter(CommonState *cself, long index, double *value) {
State *self = (State *)cself;
switch (index) {
case 0: *value = self->m_rate_4; break;
case 1: *value = self->m_depth_5; break;
case 2: *value = self->m_tone_6; break;
default: break;
}
}

/// Allocate and configure a new State object and it's internal CommonState:

void * create(double sr, long vs) {
State *self = new State;
self->reset(sr, vs);
ParamInfo *pi;
self->__commonstate.inputnames = gen_kernel_innames;
self->__commonstate.outputnames = gen_kernel_outnames;
self->__commonstate.numins = gen_kernel_numins;
self->__commonstate.numouts = gen_kernel_numouts;
self->__commonstate.sr = sr;
self->__commonstate.vs = vs;
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(3 * sizeof(ParamInfo));
self->__commonstate.numparams = 3;
// initialize parameter 0 ("m_rate_4")
pi = self->__commonstate.params + 0;
pi->name = "rate";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_rate_4;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmax = 10;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 1 ("m_depth_5")
pi = self->__commonstate.params + 1;
pi->name = "depth";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_depth_5;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 5;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 2 ("m_tone_6")
pi = self->__commonstate.params + 2;
pi->name = "tone";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_6;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 500;
pi->outputmax = 12000;
pi->exp = 0;
pi->units = ""; // no units defined
return self;
}

/// Release all resources and memory used by a State object:

void destroy(CommonState *cself) {
State * self = (State *)cself;
genlib_sysmem_freeptr(cself->params);
delete self;
}


} // gen_exported::

plugins/common/gen_dsp/genlib_common_win.h → plugins/larynx/gen_exported.h View File

@@ -17,27 +17,21 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*******************************************************************************************************************/

#ifndef GENLIB_COMMON_WIN_H
#define GENLIB_COMMON_WIN_H

#ifdef _MSC_VER
#define GEN_WINDOWS
#endif
#include "genlib.h"
#include "genlib_exportfunctions.h"
#include "genlib_ops.h"

#ifdef GEN_WINDOWS
namespace gen_exported {

#include <malloc.h>
#include <limits>

typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#define malloc_size _msize
#define __DBL_EPSILON__ (DBL_EPSILON)

#endif

#endif
int num_inputs();
int num_outputs();
int num_params();
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n);
void reset(CommonState *cself);
void setparameter(CommonState *cself, long index, double value, void *ref);
void getparameter(CommonState *cself, long index, double *value);
void * create(double sr, long vs);
void destroy(CommonState *cself);

} // gen_exported::

+ 459
- 0
plugins/larynx/larynx.gendsp View File

@@ -0,0 +1,459 @@
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 9,
"architecture" : "x86"
}
,
"rect" : [ 0.0, 48.0, 960.0, 705.0 ],
"bgcolor" : [ 0.9, 0.9, 0.9, 1.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 0,
"gridsize" : [ 15.0, 15.0 ],
"gridsnaponopen" : 0,
"statusbarvisible" : 2,
"toolbarvisible" : 1,
"boxanimatetime" : 200,
"imprint" : 0,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"description" : "",
"digest" : "",
"tags" : "",
"boxes" : [ {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-80",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 114.0, 372.0, 75.0, 20.0 ],
"text" : "history smth"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-81",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 51.0, 372.0, 63.0, 20.0 ],
"text" : "mix 0.999"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-40",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 51.0, 342.0, 72.0, 20.0 ],
"text" : "mstosamps"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-15",
"maxclass" : "newobj",
"numinlets" : 3,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 30.5, 166.0, 46.0, 20.0 ],
"text" : "mix"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-16",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 57.5, 66.0, 144.0, 20.0 ],
"text" : "expr out=in1*2*PI/48000\\;"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-24",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 30.5, 141.0, 72.0, 20.0 ],
"text" : "history y0 0"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-31",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 57.5, 91.0, 26.0, 20.0 ],
"text" : "sin"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-35",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 57.5, 116.0, 125.0, 20.0 ],
"text" : "clip 0.00001 0.99999"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-38",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 57.5, 41.0, 234.0, 20.0 ],
"text" : "param tone 6000 @min 500 @max 12000"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-62",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 64.5, 292.0, 35.0, 20.0 ],
"text" : "* 0.5"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-61",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 64.5, 267.0, 28.0, 20.0 ],
"text" : "+ 1"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-11",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 64.5, 216.0, 188.0, 20.0 ],
"text" : "param rate 5 @min 0.1 @max 10"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-58",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 64.5, 241.5, 38.0, 20.0 ],
"text" : "cycle"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-52",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 51.0, 317.0, 32.5, 20.0 ],
"text" : "*"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-49",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 51.0, 191.0, 181.0, 20.0 ],
"text" : "param depth 1 @min 0 @max 5"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-29",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 31.0, 402.0, 39.0, 20.0 ],
"text" : "delay"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-1",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 44.0, 16.0, 30.0, 20.0 ],
"text" : "in 1"
}

}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-4",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 31.0, 427.0, 37.0, 20.0 ],
"text" : "out 1"
}

}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-15", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-1", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-58", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-11", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-24", 0 ],
"disabled" : 0,
"hidden" : 0,
"midpoints" : [ 40.0, 193.0, 13.0, 193.0, 13.0, 133.0, 40.0, 133.0 ],
"source" : [ "obj-15", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-29", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-15", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-31", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-16", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-15", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-24", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-4", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-29", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-35", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-31", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-15", 2 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-35", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-16", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-38", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-81", 0 ],
"disabled" : 0,
"hidden" : 0,
"midpoints" : [ 60.5, 365.0, 60.5, 365.0 ],
"source" : [ "obj-40", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-52", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-49", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-40", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-52", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-61", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-58", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-62", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-61", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-52", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-62", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-81", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-80", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-29", 1 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-81", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-80", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-81", 0 ]
}

}
]
}

}

+ 1095
- 0
plugins/larynx/larynx.maxpat
File diff suppressed because it is too large
View File


+ 140
- 128
plugins/modulay/gen_exported.cpp View File

@@ -31,20 +31,22 @@ static const int GENLIB_LOOPCOUNT_BAIL = 100000;
// The State struct contains all the state and procedures for the gendsp kernel
typedef struct State {
CommonState __commonstate;
DCBlock m_dcblock_11;
Delay m_delay_2;
Delay m_delay_3;
SineCycle m_cycle_12;
DCBlock m_dcblock_13;
Delay m_delay_5;
Delay m_delay_4;
SineCycle m_cycle_14;
SineData __sinedata;
double m_mix_9;
double m_morph_9;
double m_tone_10;
double m_mix_12;
double m_repeats_11;
double m_rate_8;
double m_morph_10;
double m_time_6;
double m_smth_3;
double m_depth_7;
double m_repeats_5;
double m_time_4;
double m_tone_6;
double m_smth_1;
double samplerate;
double m_y_1;
double m_y_2;
int vectorsize;
int __exception;
// re-initialize all member variables;
@@ -52,18 +54,20 @@ typedef struct State {
__exception = 0;
vectorsize = __vs;
samplerate = __sr;
m_y_1 = 0;
m_delay_2.reset("m_delay_2", 48000);
m_delay_3.reset("m_delay_3", 48000);
m_time_4 = 500;
m_repeats_5 = 75;
m_tone_6 = 2500;
m_smth_1 = 0;
m_y_2 = 0;
m_smth_3 = 0;
m_delay_4.reset("m_delay_4", 48000);
m_delay_5.reset("m_delay_5", 48000);
m_time_6 = 500;
m_depth_7 = 1;
m_rate_8 = 2;
m_mix_9 = 100;
m_morph_10 = 50;
m_dcblock_11.reset();
m_cycle_12.reset(samplerate, 0);
m_morph_9 = 50;
m_tone_10 = 3000;
m_repeats_11 = 75;
m_mix_12 = 100;
m_dcblock_13.reset();
m_cycle_14.reset(samplerate, 0);
genlib_reset_complete(this);
};
@@ -80,64 +84,72 @@ typedef struct State {
return __exception;
};
double mstosamps_1384 = (m_time_4 * (samplerate * 0.001));
double mul_1357 = (m_mix_9 * 0.01);
double expr_1364 = safediv(((m_tone_6 * 2) * 3.1415926535898), 48000);
double sin_1365 = sin(expr_1364);
double clamp_1366 = ((sin_1365 <= 1e-05) ? 1e-05 : ((sin_1365 >= 0.99999) ? 0.99999 : sin_1365));
double mul_1385 = (m_morph_10 * -1);
double add_1386 = (mul_1385 + 150);
double mul_1387 = (add_1386 * 0.01);
double mul_1390 = (mul_1387 * mul_1357);
double mul_1361 = (m_repeats_5 * 0.01);
double mul_1352 = (m_morph_10 * -1.4);
double add_1350 = (mul_1352 + 70);
double abs_1351 = fabs(add_1350);
double mul_1359 = (abs_1351 * 0.01);
double mul_1354 = (m_morph_10 * 1.4);
double sub_1353 = (mul_1354 - 70);
double mul_1360 = (sub_1353 * 0.01);
int lt_1343 = (m_morph_10 < 50);
double mul_1388 = (m_morph_10 * -0.4);
double add_1389 = (mul_1388 + 20);
double mul_1344 = (lt_1343 * add_1389);
int gt_1348 = (m_morph_10 > 50);
double mul_1349 = (gt_1348 * m_morph_10);
double mul_1346 = (mul_1349 * -0.6);
double add_1347 = (mul_1346 + 130);
double clamp_1345 = ((add_1347 <= 70) ? 70 : ((add_1347 >= 100) ? 100 : add_1347));
double mul_1358 = (clamp_1345 * 0.01);
double mul_12532 = (m_mix_12 * 0.01);
double mstosamps_12544 = (m_time_6 * (samplerate * 0.001));
double expr_12576 = safediv(((m_tone_10 * 2) * 3.1415926535898), 48000);
double sin_12539 = sin(expr_12576);
double clamp_12540 = ((sin_12539 <= 1e-05) ? 1e-05 : ((sin_12539 >= 0.99999) ? 0.99999 : sin_12539));
double mul_12536 = (m_repeats_11 * 0.01);
double mul_12557 = (m_morph_9 * -0.8);
double add_12555 = (mul_12557 + 40);
double abs_12556 = fabs(add_12555);
double mul_12560 = (abs_12556 * 0.01);
int lt_12547 = (m_morph_9 < 50);
double mul_12529 = (m_morph_9 * -0.8);
double add_12527 = (mul_12529 + 40);
double abs_12528 = fabs(add_12527);
double rsub_12526 = (80 - abs_12528);
double mul_12530 = (rsub_12526 * 0.01);
double mul_12546 = (m_morph_9 * -0.4);
double add_12545 = (mul_12546 + 20);
double mul_12548 = (lt_12547 * add_12545);
double mul_12559 = (m_morph_9 * 0.8);
double sub_12558 = (mul_12559 - 40);
double mul_12561 = (sub_12558 * 0.01);
int gt_12553 = (m_morph_9 > 50);
double mul_12552 = (gt_12553 * m_morph_9);
double sub_12551 = (mul_12552 - 50);
double clamp_12550 = ((sub_12551 <= 0) ? 0 : ((sub_12551 >= 50) ? 50 : sub_12551));
double mul_12554 = (clamp_12550 * 0.04);
double add_12549 = (mul_12548 + mul_12554);
// the main sample loop;
while ((__n--)) {
const double in1 = (*(__in1++));
double tap_1383 = m_delay_3.read_cubic(mstosamps_1384);
double mix_6935 = (m_y_1 + (clamp_1366 * (tap_1383 - m_y_1)));
double mix_1363 = mix_6935;
double mul_1380 = (mix_1363 * mul_1361);
double dcblock_1355 = m_dcblock_11(mul_1380);
double clamp_1356 = ((dcblock_1355 <= -1) ? -1 : ((dcblock_1355 >= 1) ? 1 : dcblock_1355));
m_cycle_12.freq(m_rate_8);
double cycle_1369 = m_cycle_12(__sinedata);
double cycleindex_1370 = m_cycle_12.phase();
double add_1368 = (cycle_1369 + 1);
double mul_1367 = (add_1368 * 0.5);
double mul_1372 = (m_depth_7 * mul_1367);
double add_1371 = (mul_1344 + mul_1372);
double mstosamps_1362 = (add_1371 * (samplerate * 0.001));
double tap_1377 = m_delay_2.read_linear(mstosamps_1362);
double mul_1375 = (tap_1377 * mul_1358);
double mul_1373 = (tap_1377 * mul_1360);
double add_1379 = (mix_1363 + mul_1373);
double mul_1374 = (add_1379 * mul_1359);
double add_1378 = (mul_1374 + mul_1375);
double mul_1381 = (add_1378 * mul_1390);
double out1 = (mul_1381 + in1);
double y0_next_1391 = mix_1363;
m_delay_3.write((clamp_1356 + in1));
m_delay_2.write(add_1379);
m_y_1 = y0_next_1391;
m_delay_2.step();
m_delay_3.step();
double mix_12584 = (mstosamps_12544 + (0.999 * (m_smth_3 - mstosamps_12544)));
double mix_12533 = mix_12584;
double tap_12543 = m_delay_5.read_linear(mix_12533);
double mix_12585 = (m_y_2 + (clamp_12540 * (tap_12543 - m_y_2)));
double mix_12537 = mix_12585;
double mul_12541 = (mix_12537 * mul_12536);
double dcblock_12534 = m_dcblock_13(mul_12541);
double clamp_12535 = ((dcblock_12534 <= -1) ? -1 : ((dcblock_12534 >= 1) ? 1 : dcblock_12534));
double mul_12566 = (mix_12537 * mul_12560);
m_cycle_14.freq(m_rate_8);
double cycle_12571 = m_cycle_14(__sinedata);
double cycleindex_12572 = m_cycle_14.phase();
double add_12570 = (cycle_12571 + 1);
double mul_12569 = (add_12570 * 0.5);
double mul_12573 = (m_depth_7 * mul_12569);
double add_12562 = (mul_12573 + add_12549);
double mstosamps_12568 = (add_12562 * (samplerate * 0.001));
double mix_12586 = (mstosamps_12568 + (0.999 * (m_smth_1 - mstosamps_12568)));
double mix_12567 = mix_12586;
double tap_12575 = m_delay_4.read_linear(mix_12567);
double mul_12563 = (tap_12575 * mul_12530);
double mul_12531 = ((mul_12563 + mul_12566) * mul_12532);
double out1 = (mul_12531 + in1);
double mul_12564 = (tap_12575 * mul_12561);
double add_12565 = (mix_12537 + mul_12564);
double smth1_next_12577 = mix_12533;
double y0_next_12578 = mix_12537;
double smth2_next_12579 = mix_12567;
m_delay_5.write((clamp_12535 + in1));
m_delay_4.write(add_12565);
m_smth_3 = smth1_next_12577;
m_y_2 = y0_next_12578;
m_smth_1 = smth2_next_12579;
m_delay_4.step();
m_delay_5.step();
// assign results to output buffer;
(*(__out1++)) = out1;
@@ -146,25 +158,25 @@ typedef struct State {
};
inline void set_time(double _value) {
m_time_4 = (_value < 20 ? 20 : (_value > 1000 ? 1000 : _value));
};
inline void set_repeats(double _value) {
m_repeats_5 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_tone(double _value) {
m_tone_6 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
m_time_6 = (_value < 20 ? 20 : (_value > 1000 ? 1000 : _value));
};
inline void set_depth(double _value) {
m_depth_7 = (_value < 0 ? 0 : (_value > 5 ? 5 : _value));
m_depth_7 = (_value < 0 ? 0 : (_value > 3 ? 3 : _value));
};
inline void set_rate(double _value) {
m_rate_8 = (_value < 0.1 ? 0.1 : (_value > 10 ? 10 : _value));
};
inline void set_mix(double _value) {
m_mix_9 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
m_rate_8 = (_value < 0.1 ? 0.1 : (_value > 5 ? 5 : _value));
};
inline void set_morph(double _value) {
m_morph_10 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
m_morph_9 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_tone(double _value) {
m_tone_10 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
};
inline void set_repeats(double _value) {
m_repeats_11 = (_value < 0 ? 0 : (_value > 110 ? 110 : _value));
};
inline void set_mix(double _value) {
m_mix_12 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
} State;
@@ -208,12 +220,12 @@ void setparameter(CommonState *cself, long index, double value, void *ref) {
State * self = (State *)cself;
switch (index) {
case 0: self->set_time(value); break;
case 1: self->set_repeats(value); break;
case 2: self->set_tone(value); break;
case 3: self->set_depth(value); break;
case 4: self->set_rate(value); break;
case 5: self->set_mix(value); break;
case 6: self->set_morph(value); break;
case 1: self->set_depth(value); break;
case 2: self->set_rate(value); break;
case 3: self->set_morph(value); break;
case 4: self->set_tone(value); break;
case 5: self->set_repeats(value); break;
case 6: self->set_mix(value); break;
default: break;
}
@@ -224,13 +236,13 @@ void setparameter(CommonState *cself, long index, double value, void *ref) {
void getparameter(CommonState *cself, long index, double *value) {
State *self = (State *)cself;
switch (index) {
case 0: *value = self->m_time_4; break;
case 1: *value = self->m_repeats_5; break;
case 2: *value = self->m_tone_6; break;
case 3: *value = self->m_depth_7; break;
case 4: *value = self->m_rate_8; break;
case 5: *value = self->m_mix_9; break;
case 6: *value = self->m_morph_10; break;
case 0: *value = self->m_time_6; break;
case 1: *value = self->m_depth_7; break;
case 2: *value = self->m_rate_8; break;
case 3: *value = self->m_morph_9; break;
case 4: *value = self->m_tone_10; break;
case 5: *value = self->m_repeats_11; break;
case 6: *value = self->m_mix_12; break;
default: break;
}
@@ -250,11 +262,11 @@ void * create(double sr, long vs) {
self->__commonstate.vs = vs;
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(7 * sizeof(ParamInfo));
self->__commonstate.numparams = 7;
// initialize parameter 0 ("m_time_4")
// initialize parameter 0 ("m_time_6")
pi = self->__commonstate.params + 0;
pi->name = "time";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_time_4;
pi->defaultvalue = self->m_time_6;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
@@ -264,81 +276,81 @@ void * create(double sr, long vs) {
pi->outputmax = 1000;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 1 ("m_repeats_5")
// initialize parameter 1 ("m_depth_7")
pi = self->__commonstate.params + 1;
pi->name = "repeats";
pi->name = "depth";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_repeats_5;
pi->defaultvalue = self->m_depth_7;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
pi->outputmax = 3;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 2 ("m_tone_6")
// initialize parameter 2 ("m_rate_8")
pi = self->__commonstate.params + 2;
pi->name = "tone";
pi->name = "rate";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_6;
pi->defaultvalue = self->m_rate_8;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->outputmin = 0.1;
pi->outputmax = 5;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 3 ("m_depth_7")
// initialize parameter 3 ("m_morph_9")
pi = self->__commonstate.params + 3;
pi->name = "depth";
pi->name = "morph";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_depth_7;
pi->defaultvalue = self->m_morph_9;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 5;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 4 ("m_rate_8")
// initialize parameter 4 ("m_tone_10")
pi = self->__commonstate.params + 4;
pi->name = "rate";
pi->name = "tone";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_rate_8;
pi->defaultvalue = self->m_tone_10;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmax = 10;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 5 ("m_mix_9")
// initialize parameter 5 ("m_repeats_11")
pi = self->__commonstate.params + 5;
pi->name = "mix";
pi->name = "repeats";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_mix_9;
pi->defaultvalue = self->m_repeats_11;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
pi->outputmax = 110;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 6 ("m_morph_10")
// initialize parameter 6 ("m_mix_12")
pi = self->__commonstate.params + 6;
pi->name = "morph";
pi->name = "mix";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_morph_10;
pi->defaultvalue = self->m_mix_12;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;


+ 423
- 314
plugins/modulay/modulay.gendsp
File diff suppressed because it is too large
View File


+ 901
- 415
plugins/modulay/modulay.maxpat
File diff suppressed because it is too large
View File


+ 1
- 1
plugins/shiroverb/DistrhoPluginInfo.h View File

@@ -28,7 +28,7 @@

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"

#define DISTRHO_PLUGIN_DESCRIPTION "Shiroverb is a shimmer-reverb based on the \"Gigaverb\"-genpatch, ported from the implementation by Juhana Sadeharju, and the \"Pitch-Shift\"-genpatch, both in Max."
#define DISTRHO_PLUGIN_DESCRIPTION "Shiroverb is a shimmer-reverb based on the \"Gigaverb\"-genpatch, ported from the implementation by Juhana Sadeharju, and the \"Pitch-Shift\"-genpatch, both in Max MSP."
#define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 's', 'v')

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED

+ 381
- 352
plugins/shiroverb/gen_exported.cpp View File

@@ -31,51 +31,53 @@ static const int GENLIB_LOOPCOUNT_BAIL = 100000;
// The State struct contains all the state and procedures for the gendsp kernel
typedef struct State {
CommonState __commonstate;
Delay m_delay_21;
Delay m_delay_13;
Delay m_delay_22;
Delay m_delay_14;
Delay m_delay_15;
Delay m_delay_13;
Delay m_delay_12;
Delay m_delay_11;
Delay m_delay_23;
Delay m_delay_15;
Delay m_delay_17;
Delay m_delay_16;
Delay m_delay_19;
Delay m_delay_18;
Delay m_delay_17;
Delay m_delay_20;
Delay m_delay_22;
Delta m_delta_38;
Delta m_delta_35;
Delta m_delta_41;
Delta m_delta_32;
Phasor m_phasor_31;
Sah m_sah_36;
Sah m_sah_34;
Sah m_sah_37;
Sah m_sah_40;
Sah m_sah_39;
Sah m_sah_33;
Sah m_sah_43;
Delay m_delay_19;
Delay m_delay_21;
Delay m_delay_24;
Delta m_delta_34;
Delta m_delta_43;
Delta m_delta_37;
Delta m_delta_40;
Phasor m_phasor_33;
Sah m_sah_42;
double m_history_4;
Sah m_sah_41;
Sah m_sah_39;
Sah m_sah_36;
Sah m_sah_38;
Sah m_sah_35;
Sah m_sah_44;
Sah m_sah_45;
double m_history_10;
double m_history_5;
double m_history_6;
double m_history_7;
double m_history_3;
double m_history_1;
double m_smth_11;
double m_history_4;
double m_y_2;
double m_history_3;
double samplerate;
double m_history_10;
double m_history_1;
double m_history_9;
double m_history_8;
double m_tone_32;
double samples_to_seconds;
double m_history_9;
double m_ratio_25;
double m_roomsize_24;
double m_shimmer_26;
double m_roomsize_25;
double m_damping_28;
double m_decay_27;
double m_damping_26;
double m_mix_29;
double m_shimmer_30;
double m_tone_28;
double m_bandwidth_30;
double m_mix_31;
double m_ratio_29;
int vectorsize;
int __exception;
// re-initialize all member variables;
@@ -93,40 +95,42 @@ typedef struct State {
m_history_8 = 0;
m_history_9 = 0;
m_history_10 = 0;
m_delay_11.reset("m_delay_11", 7000);
m_smth_11 = 0;
m_delay_12.reset("m_delay_12", 5000);
m_delay_13.reset("m_delay_13", 6000);
m_delay_14.reset("m_delay_14", 48000);
m_delay_15.reset("m_delay_15", 16000);
m_delay_13.reset("m_delay_13", 7000);
m_delay_14.reset("m_delay_14", 6000);
m_delay_15.reset("m_delay_15", 48000);
m_delay_16.reset("m_delay_16", 15000);
m_delay_17.reset("m_delay_17", 96000);
m_delay_18.reset("m_delay_18", 12000);
m_delay_17.reset("m_delay_17", 16000);
m_delay_18.reset("m_delay_18", 96000);
m_delay_19.reset("m_delay_19", 10000);
m_delay_20.reset("m_delay_20", 48000);
m_delay_20.reset("m_delay_20", 12000);
m_delay_21.reset("m_delay_21", 48000);
m_delay_22.reset("m_delay_22", 48000);
m_delay_23.reset("m_delay_23", 48000);
m_roomsize_24 = 100;
m_ratio_25 = 2;
m_damping_26 = 75;
m_delay_24.reset("m_delay_24", 48000);
m_roomsize_25 = 150;
m_shimmer_26 = 50;
m_decay_27 = 50;
m_tone_28 = 3000;
m_mix_29 = 75;
m_shimmer_30 = 50;
m_damping_28 = 50;
m_ratio_29 = 2;
m_bandwidth_30 = 75;
m_mix_31 = 50;
m_tone_32 = 1500;
samples_to_seconds = (1 / samplerate);
m_phasor_31.reset(0);
m_delta_32.reset(0);
m_sah_33.reset(0);
m_sah_34.reset(0);
m_delta_35.reset(0);
m_phasor_33.reset(0);
m_delta_34.reset(0);
m_sah_35.reset(0);
m_sah_36.reset(0);
m_sah_37.reset(0);
m_delta_38.reset(0);
m_delta_37.reset(0);
m_sah_38.reset(0);
m_sah_39.reset(0);
m_sah_40.reset(0);
m_delta_41.reset(0);
m_delta_40.reset(0);
m_sah_41.reset(0);
m_sah_42.reset(0);
m_sah_43.reset(0);
m_delta_43.reset(0);
m_sah_44.reset(0);
m_sah_45.reset(0);
genlib_reset_complete(this);
};
@@ -144,255 +148,260 @@ typedef struct State {
return __exception;
};
double mul_6640 = (m_damping_26 * 0.01);
double mul_6639 = (m_mix_29 * 0.01);
double mul_6641 = (m_shimmer_30 * 0.01);
double expr_6646 = safediv(((m_tone_28 * 2) * 3.1415926535898), 48000);
double sin_6647 = sin(expr_6646);
double clamp_6648 = ((sin_6647 <= 1e-05) ? 1e-05 : ((sin_6647 >= 0.99999) ? 0.99999 : sin_6647));
double expr_6857 = safediv((m_roomsize_24 * 48000), 340);
double mul_6849 = (expr_6857 * 1);
double mul_6846 = (expr_6857 * 0.63245);
double mul_6847 = (expr_6857 * 0.7071);
double mul_6848 = (expr_6857 * 0.81649);
double mul_6644 = (m_decay_27 * 3.6);
double expr_6850 = safepow(0.001, safediv(1, (mul_6644 * 48000)));
double expr_6844 = (-safepow(expr_6850, mul_6849));
double expr_6755 = (-safepow(expr_6850, mul_6846));
double expr_6761 = (-safepow(expr_6850, mul_6847));
double expr_6767 = (-safepow(expr_6850, mul_6848));
double mul_6843 = (expr_6857 * 0.000527);
int int_6842 = int(mul_6843);
double mul_6820 = (int_6842 * 400.600006);
double mul_6799 = (int_6842 * 419.5);
double rsub_6698 = (1 - m_ratio_25);
double mul_6697 = (rsub_6698 * 10);
double mul_11 = (m_damping_28 * 0.01);
double expr_239 = safediv((m_roomsize_25 * 48000), 340);
double mul_12 = (m_mix_31 * 0.01);
double mul_10 = (m_bandwidth_30 * 0.01);
double rsub_9 = (1 - mul_10);
double expr_229 = safediv(((m_tone_32 * 2) * 3.1415926535898), 48000);
double sin_17 = sin(expr_229);
double clamp_18 = ((sin_17 <= 1e-05) ? 1e-05 : ((sin_17 >= 0.99999) ? 0.99999 : sin_17));
double mul_13 = (m_shimmer_26 * 0.01);
double expr_228 = safepow(1.0418, m_decay_27);
double expr_238 = safepow(0.001, safediv(1, (expr_228 * 48000)));
double rsub_68 = (1 - m_ratio_29);
double mul_67 = (rsub_68 * 10);
samples_to_seconds = (1 / samplerate);
double add_6786 = (expr_6857 + 5);
double expr_6779 = safepow(expr_6850, add_6786);
double mul_6827 = (int_6842 * 568.299988);
double mul_6806 = (int_6842 * 566.700012);
double mul_6792 = (expr_6857 * 0.41);
double add_6789 = (mul_6792 + 5);
double expr_6785 = safepow(expr_6850, add_6789);
double mul_6791 = (expr_6857 * 0.3);
double add_6788 = (mul_6791 + 5);
double expr_6783 = safepow(expr_6850, add_6788);
double mul_6790 = (expr_6857 * 0.155);
double add_6787 = (mul_6790 + 5);
double expr_6781 = safepow(expr_6850, add_6787);
double mul_6841 = (expr_6857 * 0.110732);
double mul_6834 = (int_6842 * 162.100006);
double mul_6813 = (int_6842 * 144.800003);
double expr_6861 = safepow(1.0472, m_decay_27);
double sub_6862 = (expr_6861 - 1);
double mul_6643 = (sub_6862 * 0.01);
double mul_6859 = (m_decay_27 * 0.75);
double add_6858 = (mul_6859 + 25);
double mul_6860 = (add_6858 * 0.01);
double mul_7 = (m_decay_27 * 2);
double clamp_2 = ((mul_7 <= 0) ? 0 : ((mul_7 >= 100) ? 100 : mul_7));
double mul_6 = (clamp_2 * 0.01);
double atodb_5 = atodb(mul_6);
double sub_4 = (atodb_5 - 9);
double dbtoa_3 = dbtoa(sub_4);
// the main sample loop;
while ((__n--)) {
const double in1 = (*(__in1++));
double noise_6650 = noise();
double abs_6667 = fabs(noise_6650);
double mul_6673 = (abs_6667 * 0.25);
double noise_6649 = noise();
double abs_6666 = fabs(noise_6649);
double mul_6670 = (abs_6666 * 0.25);
double noise_6651 = noise();
double abs_6668 = fabs(noise_6651);
double mul_6676 = (abs_6668 * 0.25);
double noise_6652 = noise();
double abs_6669 = fabs(noise_6652);
double mul_6679 = (abs_6669 * 0.25);
double tap_6854 = m_delay_23.read_linear(mul_6849);
double tap_6760 = m_delay_22.read_linear(mul_6846);
double tap_6766 = m_delay_21.read_linear(mul_6847);
double tap_6772 = m_delay_20.read_linear(mul_6848);
double mul_6845 = (tap_6854 * expr_6844);
double mix_6913 = (mul_6845 + (mul_6640 * (m_history_10 - mul_6845)));
double mix_6852 = mix_6913;
double mul_6756 = (tap_6760 * expr_6755);
double mix_6914 = (mul_6756 + (mul_6640 * (m_history_9 - mul_6756)));
double mix_6758 = mix_6914;
double mul_6762 = (tap_6766 * expr_6761);
double mix_6915 = (mul_6762 + (mul_6640 * (m_history_8 - mul_6762)));
double mix_6764 = mix_6915;
double mul_6768 = (tap_6772 * expr_6767);
double mix_6916 = (mul_6768 + (mul_6640 * (m_history_7 - mul_6768)));
double mix_6770 = mix_6916;
double tap_6819 = m_delay_19.read_linear(mul_6820);
double mul_6817 = (tap_6819 * 0.625);
double tap_6798 = m_delay_18.read_linear(mul_6799);
double mul_6796 = (tap_6798 * 0.625);
double phasor_6716 = m_phasor_31(mul_6697, samples_to_seconds);
double add_6696 = ((m_history_6 + phasor_6716) + 0.5);
double mod_6695 = safemod(add_6696, 1);
double delta_6675 = m_delta_32(mod_6695);
double sah_6655 = m_sah_33(mul_6673, delta_6675, 0);
int sah_6674 = m_sah_34(4800, delta_6675, 0);
double mul_6663 = (sah_6674 * mod_6695);
double sub_6694 = (mod_6695 - 0.5);
double mul_6693 = (sub_6694 * 3.1415926535898);
double cos_6692 = cos(mul_6693);
double mul_6682 = (cos_6692 * cos_6692);
double add_6690 = ((m_history_5 + phasor_6716) + 0.75);
double mod_6689 = safemod(add_6690, 1);
double delta_6672 = m_delta_35(mod_6689);
double sah_6653 = m_sah_36(mul_6670, delta_6672, 0);
int sah_6671 = m_sah_37(4800, delta_6672, 0);
double mul_6662 = (sah_6671 * mod_6689);
double sub_6688 = (mod_6689 - 0.5);
double mul_6687 = (sub_6688 * 3.1415926535898);
double cos_6686 = cos(mul_6687);
double mul_6681 = (cos_6686 * cos_6686);
double add_6710 = ((m_history_4 + phasor_6716) + 0.25);
double mod_6709 = safemod(add_6710, 1);
double delta_6678 = m_delta_38(mod_6709);
double sah_6657 = m_sah_39(mul_6676, delta_6678, 0);
int sah_6677 = m_sah_40(4800, delta_6678, 0);
double mul_6664 = (sah_6677 * mod_6709);
double sub_6708 = (mod_6709 - 0.5);
double mul_6707 = (sub_6708 * 3.1415926535898);
double cos_6706 = cos(mul_6707);
double mul_6683 = (cos_6706 * cos_6706);
double add_6715 = ((m_history_3 + phasor_6716) + 0);
double mod_6714 = safemod(add_6715, 1);
double delta_6660 = m_delta_41(mod_6714);
double sah_6659 = m_sah_42(mul_6679, delta_6660, 0);
int sah_6680 = m_sah_43(4800, delta_6660, 0);
double mul_6665 = (sah_6680 * mod_6714);
double tap_6702 = m_delay_17.read_linear(mul_6665);
double tap_6703 = m_delay_17.read_linear(mul_6664);
double tap_6704 = m_delay_17.read_linear(mul_6663);
double tap_6705 = m_delay_17.read_linear(mul_6662);
double mul_6685 = (tap_6705 * mul_6681);
double mul_6691 = (tap_6704 * mul_6682);
double mul_6699 = (tap_6703 * mul_6683);
double sub_6713 = (mod_6714 - 0.5);
double mul_6712 = (sub_6713 * 3.1415926535898);
double cos_6711 = cos(mul_6712);
double mul_6684 = (cos_6711 * cos_6711);
double mul_6700 = (tap_6702 * mul_6684);
double add_6918 = (((mul_6700 + mul_6699) + mul_6691) + mul_6685);
double mix_6917 = (m_y_2 + (clamp_6648 * (add_6918 - m_y_2)));
double mix_6645 = mix_6917;
double mix_6919 = (in1 + (mul_6641 * (mix_6645 - in1)));
double mix_6717 = mix_6919;
double mul_6720 = (mix_6717 * 0.707);
double mix_6920 = (mul_6720 + (0.5 * (m_history_1 - mul_6720)));
double mix_6856 = mix_6920;
double add_6750 = (mix_6852 + mix_6770);
double add_6748 = (mix_6764 + mix_6758);
double sub_6747 = (add_6750 - add_6748);
double mul_6729 = (sub_6747 * 0.5);
double add_6743 = (add_6750 + add_6748);
double mul_6726 = (add_6743 * 0.5);
double tap_6826 = m_delay_16.read_linear(mul_6827);
double tap_6805 = m_delay_15.read_linear(mul_6806);
double sub_6749 = (mix_6852 - mix_6770);
double sub_6746 = (mix_6764 - mix_6758);
double sub_6745 = (sub_6749 - sub_6746);
double mul_6728 = (sub_6745 * 0.5);
double add_6744 = (sub_6749 + sub_6746);
double rsub_6742 = (0 - add_6744);
double mul_6727 = (rsub_6742 * 0.5);
double tap_6774 = m_delay_14.read_linear(add_6789);
double tap_6775 = m_delay_14.read_linear(add_6788);
double tap_6776 = m_delay_14.read_linear(add_6787);
double tap_6777 = m_delay_14.read_linear(add_6786);
double mul_6784 = (tap_6774 * expr_6785);
double add_6754 = (mul_6729 + mul_6784);
double mul_6778 = (tap_6777 * expr_6779);
double add_6751 = (mul_6726 + mul_6778);
double mul_6782 = (tap_6775 * expr_6783);
double add_6753 = (mul_6728 + mul_6782);
double mul_6780 = (tap_6776 * expr_6781);
double add_6752 = (mul_6727 + mul_6780);
double mul_6824 = (tap_6826 * 0.625);
double mul_6803 = (tap_6805 * 0.625);
double tap_6840 = m_delay_13.read_linear(mul_6841);
double mul_6838 = (tap_6840 * 0.75);
double sub_6837 = (mix_6856 - mul_6838);
double mul_6836 = (sub_6837 * 0.75);
double add_6835 = (mul_6836 + tap_6840);
double tap_6833 = m_delay_12.read_linear(mul_6834);
double tap_6812 = m_delay_11.read_linear(mul_6813);
double mul_6831 = (tap_6833 * 0.75);
double mul_6810 = (tap_6812 * 0.75);
double mul_6741 = (mul_6729 * mul_6643);
double mul_6739 = (mul_6727 * mul_6643);
double add_6725 = (mul_6741 + mul_6739);
double mul_6740 = (mul_6728 * mul_6643);
double mul_6738 = (mul_6726 * mul_6643);
double add_6724 = (mul_6740 + mul_6738);
double sub_6733 = (add_6725 - add_6724);
double mul_6737 = (mul_6784 * mul_6860);
double mul_6735 = (mul_6780 * mul_6860);
double add_6723 = (mul_6737 + mul_6735);
double mul_6736 = (mul_6782 * mul_6860);
double mul_6734 = (mul_6778 * mul_6860);
double add_6722 = (mul_6736 + mul_6734);
double sub_6732 = (add_6723 - add_6722);
double add_6719 = (sub_6733 + sub_6732);
double add_6731 = (add_6719 + mix_6717);
double sub_6830 = (add_6731 - mul_6831);
double mul_6829 = (sub_6830 * 0.75);
double add_6828 = (mul_6829 + tap_6833);
double sub_6823 = (add_6828 - mul_6824);
double mul_6822 = (sub_6823 * 0.625);
double add_6821 = (mul_6822 + tap_6826);
double sub_6816 = (add_6821 - mul_6817);
double mul_6815 = (sub_6816 * 0.625);
double add_6814 = (mul_6815 + tap_6819);
double mul_6730 = (add_6814 * mul_6639);
double out1 = (in1 + mul_6730);
double add_6721 = (add_6719 + mix_6717);
double sub_6809 = (add_6721 - mul_6810);
double mul_6808 = (sub_6809 * 0.75);
double add_6807 = (mul_6808 + tap_6812);
double sub_6802 = (add_6807 - mul_6803);
double mul_6801 = (sub_6802 * 0.625);
double add_6800 = (mul_6801 + tap_6805);
double sub_6795 = (add_6800 - mul_6796);
double mul_6794 = (sub_6795 * 0.625);
double add_6793 = (mul_6794 + tap_6798);
double mul_6718 = (add_6793 * mul_6639);
double out2 = (in1 + mul_6718);
double history_6851_next_6863 = mix_6852;
double history_6757_next_6864 = mix_6758;
double history_6763_next_6865 = mix_6764;
double history_6769_next_6866 = mix_6770;
double history_6656_next_6867 = sah_6655;
double history_6654_next_6868 = sah_6653;
double history_6658_next_6869 = sah_6657;
double history_6661_next_6870 = sah_6659;
double y0_next_6871 = mix_6645;
double history_6855_next_6872 = mix_6856;
m_delay_23.write(add_6754);
m_delay_22.write(add_6751);
m_delay_21.write(add_6752);
m_delay_20.write(add_6753);
m_delay_19.write(sub_6816);
m_delay_18.write(sub_6795);
m_delay_17.write(in1);
m_delay_16.write(sub_6823);
m_delay_15.write(sub_6802);
m_delay_14.write(add_6835);
m_delay_13.write(sub_6837);
m_delay_12.write(sub_6830);
m_delay_11.write(sub_6809);
m_history_10 = history_6851_next_6863;
m_history_9 = history_6757_next_6864;
m_history_8 = history_6763_next_6865;
m_history_7 = history_6769_next_6866;
m_history_6 = history_6656_next_6867;
m_history_5 = history_6654_next_6868;
m_history_4 = history_6658_next_6869;
m_history_3 = history_6661_next_6870;
m_y_2 = y0_next_6871;
m_history_1 = history_6855_next_6872;
m_delay_11.step();
double mix_251 = (expr_239 + (0.999 * (m_smth_11 - expr_239)));
double mix_1 = mix_251;
double mul_216 = (mix_1 * 0.63245);
double tap_130 = m_delay_24.read_linear(mul_216);
double noise_20 = noise();
double abs_37 = fabs(noise_20);
double mul_43 = (abs_37 * 0.25);
double noise_21 = noise();
double abs_38 = fabs(noise_21);
double mul_46 = (abs_38 * 0.25);
double mul_219 = (mix_1 * 1);
double tap_224 = m_delay_23.read_linear(mul_219);
double noise_22 = noise();
double abs_39 = fabs(noise_22);
double mul_49 = (abs_39 * 0.25);
double mul_217 = (mix_1 * 0.7071);
double tap_136 = m_delay_22.read_linear(mul_217);
double noise_19 = noise();
double abs_36 = fabs(noise_19);
double mul_40 = (abs_36 * 0.25);
double mul_218 = (mix_1 * 0.81649);
double tap_142 = m_delay_21.read_linear(mul_218);
double expr_230 = (-safepow(expr_238, mul_216));
double mul_126 = (tap_130 * expr_230);
double mix_252 = (mul_126 + (mul_11 * (m_history_10 - mul_126)));
double mix_128 = mix_252;
double expr_237 = (-safepow(expr_238, mul_219));
double mul_215 = (tap_224 * expr_237);
double mix_253 = (mul_215 + (mul_11 * (m_history_9 - mul_215)));
double mix_222 = mix_253;
double expr_231 = (-safepow(expr_238, mul_217));
double mul_132 = (tap_136 * expr_231);
double mix_254 = (mul_132 + (mul_11 * (m_history_8 - mul_132)));
double mix_134 = mix_254;
double expr_232 = (-safepow(expr_238, mul_218));
double mul_138 = (tap_142 * expr_232);
double mix_255 = (mul_138 + (mul_11 * (m_history_7 - mul_138)));
double mix_140 = mix_255;
double mul_213 = (mix_1 * 0.000527);
int int_212 = int(mul_213);
double mul_169 = (int_212 * 419.5);
double tap_168 = m_delay_20.read_linear(mul_169);
double mul_166 = (tap_168 * 0.625);
double mul_190 = (int_212 * 400.600006);
double tap_189 = m_delay_19.read_linear(mul_190);
double mul_187 = (tap_189 * 0.625);
double add_120 = (mix_222 + mix_140);
double add_118 = (mix_134 + mix_128);
double add_113 = (add_120 + add_118);
double mul_96 = (add_113 * 0.5);
double sub_117 = (add_120 - add_118);
double mul_99 = (sub_117 * 0.5);
double add_156 = (mix_1 + 5);
double expr_233 = safepow(expr_238, add_156);
double phasor_86 = m_phasor_33(mul_67, samples_to_seconds);
double add_66 = ((m_history_6 + phasor_86) + 0.5);
double mod_65 = safemod(add_66, 1);
double delta_45 = m_delta_34(mod_65);
double sah_25 = m_sah_35(mul_43, delta_45, 0);
int sah_44 = m_sah_36(4800, delta_45, 0);
double mul_33 = (sah_44 * mod_65);
double sub_64 = (mod_65 - 0.5);
double mul_63 = (sub_64 * 3.1415926535898);
double cos_62 = cos(mul_63);
double mul_52 = (cos_62 * cos_62);
double add_80 = ((m_history_5 + phasor_86) + 0.25);
double mod_79 = safemod(add_80, 1);
double delta_48 = m_delta_37(mod_79);
double sah_27 = m_sah_38(mul_46, delta_48, 0);
int sah_47 = m_sah_39(4800, delta_48, 0);
double mul_34 = (sah_47 * mod_79);
double sub_78 = (mod_79 - 0.5);
double mul_77 = (sub_78 * 3.1415926535898);
double cos_76 = cos(mul_77);
double mul_53 = (cos_76 * cos_76);
double add_85 = ((m_history_4 + phasor_86) + 0);
double mod_84 = safemod(add_85, 1);
double delta_30 = m_delta_40(mod_84);
double sah_29 = m_sah_41(mul_49, delta_30, 0);
int sah_50 = m_sah_42(4800, delta_30, 0);
double mul_35 = (sah_50 * mod_84);
double sub_83 = (mod_84 - 0.5);
double mul_82 = (sub_83 * 3.1415926535898);
double cos_81 = cos(mul_82);
double mul_54 = (cos_81 * cos_81);
double add_60 = ((m_history_3 + phasor_86) + 0.75);
double mod_59 = safemod(add_60, 1);
double delta_42 = m_delta_43(mod_59);
double sah_23 = m_sah_44(mul_40, delta_42, 0);
int sah_41 = m_sah_45(4800, delta_42, 0);
double mul_32 = (sah_41 * mod_59);
double tap_72 = m_delay_18.read_linear(mul_35);
double tap_73 = m_delay_18.read_linear(mul_34);
double tap_74 = m_delay_18.read_linear(mul_33);
double tap_75 = m_delay_18.read_linear(mul_32);
double mul_61 = (tap_74 * mul_52);
double mul_69 = (tap_73 * mul_53);
double mul_70 = (tap_72 * mul_54);
double sub_58 = (mod_59 - 0.5);
double mul_57 = (sub_58 * 3.1415926535898);
double cos_56 = cos(mul_57);
double mul_51 = (cos_56 * cos_56);
double mul_55 = (tap_75 * mul_51);
double add_257 = (((mul_70 + mul_69) + mul_61) + mul_55);
double mix_256 = (m_y_2 + (clamp_18 * (add_257 - m_y_2)));
double mix_15 = mix_256;
double mix_258 = (in1 + (mul_13 * (mix_15 - in1)));
double mix_87 = mix_258;
double mul_90 = (mix_87 * 0.707);
double mix_259 = (mul_90 + (rsub_9 * (m_history_1 - mul_90)));
double mix_226 = mix_259;
double mul_176 = (int_212 * 566.700012);
double tap_175 = m_delay_17.read_linear(mul_176);
double mul_197 = (int_212 * 568.299988);
double tap_196 = m_delay_16.read_linear(mul_197);
double sub_119 = (mix_222 - mix_140);
double sub_116 = (mix_134 - mix_128);
double sub_115 = (sub_119 - sub_116);
double mul_98 = (sub_115 * 0.5);
double add_114 = (sub_119 + sub_116);
double rsub_112 = (0 - add_114);
double mul_97 = (rsub_112 * 0.5);
double mul_162 = (mix_1 * 0.41);
double add_159 = (mul_162 + 5);
double expr_236 = safepow(expr_238, add_159);
double mul_161 = (mix_1 * 0.3);
double add_158 = (mul_161 + 5);
double expr_235 = safepow(expr_238, add_158);
double mul_160 = (mix_1 * 0.155);
double add_157 = (mul_160 + 5);
double tap_144 = m_delay_15.read_linear(add_159);
double tap_145 = m_delay_15.read_linear(add_158);
double tap_146 = m_delay_15.read_linear(add_157);
double tap_147 = m_delay_15.read_linear(add_156);
double mul_148 = (tap_147 * expr_233);
double add_121 = (mul_96 + mul_148);
double mul_154 = (tap_144 * expr_236);
double add_124 = (mul_99 + mul_154);
double mul_152 = (tap_145 * expr_235);
double add_123 = (mul_98 + mul_152);
double expr_234 = safepow(expr_238, add_157);
double mul_150 = (tap_146 * expr_234);
double add_122 = (mul_97 + mul_150);
double mul_173 = (tap_175 * 0.625);
double mul_194 = (tap_196 * 0.625);
double mul_211 = (mix_1 * 0.110732);
double tap_210 = m_delay_14.read_cubic(mul_211);
double mul_208 = (tap_210 * 0.75);
double sub_207 = (mix_226 - mul_208);
double mul_206 = (sub_207 * 0.75);
double add_205 = (mul_206 + tap_210);
double mul_183 = (int_212 * 144.800003);
double tap_182 = m_delay_13.read_linear(mul_183);
double mul_204 = (int_212 * 162.100006);
double tap_203 = m_delay_12.read_linear(mul_204);
double mul_180 = (tap_182 * 0.75);
double mul_201 = (tap_203 * 0.75);
double mul_107 = (mul_154 * mul_6);
double mul_105 = (mul_150 * mul_6);
double add_93 = (mul_107 + mul_105);
double mul_106 = (mul_152 * mul_6);
double mul_104 = (mul_148 * mul_6);
double add_92 = (mul_106 + mul_104);
double sub_102 = (add_93 - add_92);
double mul_111 = (mul_99 * dbtoa_3);
double mul_109 = (mul_97 * dbtoa_3);
double add_95 = (mul_111 + mul_109);
double mul_110 = (mul_98 * dbtoa_3);
double mul_108 = (mul_96 * dbtoa_3);
double add_94 = (mul_110 + mul_108);
double sub_103 = (add_95 - add_94);
double add_89 = (sub_103 + sub_102);
double add_91 = (add_89 + mix_87);
double sub_179 = (add_91 - mul_180);
double mul_178 = (sub_179 * 0.75);
double add_177 = (mul_178 + tap_182);
double sub_172 = (add_177 - mul_173);
double mul_171 = (sub_172 * 0.625);
double add_170 = (mul_171 + tap_175);
double sub_165 = (add_170 - mul_166);
double mul_164 = (sub_165 * 0.625);
double add_163 = (mul_164 + tap_168);
double mul_88 = (add_163 * mul_12);
double out2 = (in1 + mul_88);
double add_101 = (add_89 + mix_87);
double sub_200 = (add_101 - mul_201);
double mul_199 = (sub_200 * 0.75);
double add_198 = (mul_199 + tap_203);
double sub_193 = (add_198 - mul_194);
double mul_192 = (sub_193 * 0.625);
double add_191 = (mul_192 + tap_196);
double sub_186 = (add_191 - mul_187);
double mul_185 = (sub_186 * 0.625);
double add_184 = (mul_185 + tap_189);
double mul_100 = (add_184 * mul_12);
double out1 = (in1 + mul_100);
double smth_next_240 = mix_1;
double history_127_next_241 = mix_128;
double history_221_next_242 = mix_222;
double history_133_next_243 = mix_134;
double history_139_next_244 = mix_140;
double history_26_next_245 = sah_25;
double history_28_next_246 = sah_27;
double history_31_next_247 = sah_29;
double history_24_next_248 = sah_23;
double y0_next_249 = mix_15;
double history_225_next_250 = mix_226;
m_delay_24.write(add_121);
m_delay_23.write(add_124);
m_delay_22.write(add_122);
m_delay_21.write(add_123);
m_delay_20.write(sub_165);
m_delay_19.write(sub_186);
m_delay_18.write(in1);
m_delay_17.write(sub_172);
m_delay_16.write(sub_193);
m_delay_15.write(add_205);
m_delay_14.write(sub_207);
m_delay_13.write(sub_179);
m_delay_12.write(sub_200);
m_smth_11 = smth_next_240;
m_history_10 = history_127_next_241;
m_history_9 = history_221_next_242;
m_history_8 = history_133_next_243;
m_history_7 = history_139_next_244;
m_history_6 = history_26_next_245;
m_history_5 = history_28_next_246;
m_history_4 = history_31_next_247;
m_history_3 = history_24_next_248;
m_y_2 = y0_next_249;
m_history_1 = history_225_next_250;
m_delay_12.step();
m_delay_13.step();
m_delay_14.step();
@@ -405,6 +414,7 @@ typedef struct State {
m_delay_21.step();
m_delay_22.step();
m_delay_23.step();
m_delay_24.step();
// assign results to output buffer;
(*(__out1++)) = out1;
(*(__out2++)) = out2;
@@ -414,25 +424,28 @@ typedef struct State {
};
inline void set_roomsize(double _value) {
m_roomsize_24 = (_value < 0.1 ? 0.1 : (_value > 300 ? 300 : _value));
m_roomsize_25 = (_value < 1 ? 1 : (_value > 300 ? 300 : _value));
};
inline void set_ratio(double _value) {
m_ratio_25 = (_value < 0.5 ? 0.5 : (_value > 2 ? 2 : _value));
inline void set_shimmer(double _value) {
m_shimmer_26 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_decay(double _value) {
m_decay_27 = (_value < 1 ? 1 : (_value > 100 ? 100 : _value));
};
inline void set_damping(double _value) {
m_damping_26 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
m_damping_28 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_decay(double _value) {
m_decay_27 = (_value < 0.1 ? 0.1 : (_value > 100 ? 100 : _value));
inline void set_ratio(double _value) {
m_ratio_29 = (_value < 0.5 ? 0.5 : (_value > 2 ? 2 : _value));
};
inline void set_tone(double _value) {
m_tone_28 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
inline void set_bandwidth(double _value) {
m_bandwidth_30 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_mix(double _value) {
m_mix_29 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
m_mix_31 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_shimmer(double _value) {
m_shimmer_30 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
inline void set_tone(double _value) {
m_tone_32 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
};
} State;
@@ -449,7 +462,7 @@ int gen_kernel_numouts = 2;

int num_inputs() { return gen_kernel_numins; }
int num_outputs() { return gen_kernel_numouts; }
int num_params() { return 7; }
int num_params() { return 8; }

/// Assistive lables for the signal inputs and outputs

@@ -476,12 +489,13 @@ void setparameter(CommonState *cself, long index, double value, void *ref) {
State * self = (State *)cself;
switch (index) {
case 0: self->set_roomsize(value); break;
case 1: self->set_ratio(value); break;
case 2: self->set_damping(value); break;
case 3: self->set_decay(value); break;
case 4: self->set_tone(value); break;
case 5: self->set_mix(value); break;
case 6: self->set_shimmer(value); break;
case 1: self->set_shimmer(value); break;
case 2: self->set_decay(value); break;
case 3: self->set_damping(value); break;
case 4: self->set_ratio(value); break;
case 5: self->set_bandwidth(value); break;
case 6: self->set_mix(value); break;
case 7: self->set_tone(value); break;
default: break;
}
@@ -492,13 +506,14 @@ void setparameter(CommonState *cself, long index, double value, void *ref) {
void getparameter(CommonState *cself, long index, double *value) {
State *self = (State *)cself;
switch (index) {
case 0: *value = self->m_roomsize_24; break;
case 1: *value = self->m_ratio_25; break;
case 2: *value = self->m_damping_26; break;
case 3: *value = self->m_decay_27; break;
case 4: *value = self->m_tone_28; break;
case 5: *value = self->m_mix_29; break;
case 6: *value = self->m_shimmer_30; break;
case 0: *value = self->m_roomsize_25; break;
case 1: *value = self->m_shimmer_26; break;
case 2: *value = self->m_decay_27; break;
case 3: *value = self->m_damping_28; break;
case 4: *value = self->m_ratio_29; break;
case 5: *value = self->m_bandwidth_30; break;
case 6: *value = self->m_mix_31; break;
case 7: *value = self->m_tone_32; break;
default: break;
}
@@ -516,83 +531,83 @@ void * create(double sr, long vs) {
self->__commonstate.numouts = gen_kernel_numouts;
self->__commonstate.sr = sr;
self->__commonstate.vs = vs;
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(7 * sizeof(ParamInfo));
self->__commonstate.numparams = 7;
// initialize parameter 0 ("m_roomsize_24")
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(8 * sizeof(ParamInfo));
self->__commonstate.numparams = 8;
// initialize parameter 0 ("m_roomsize_25")
pi = self->__commonstate.params + 0;
pi->name = "roomsize";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_roomsize_24;
pi->defaultvalue = self->m_roomsize_25;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmin = 1;
pi->outputmax = 300;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 1 ("m_ratio_25")
// initialize parameter 1 ("m_shimmer_26")
pi = self->__commonstate.params + 1;
pi->name = "ratio";
pi->name = "shimmer";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_ratio_25;
pi->defaultvalue = self->m_shimmer_26;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.5;
pi->outputmax = 2;
pi->outputmin = 0;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 2 ("m_damping_26")
// initialize parameter 2 ("m_decay_27")
pi = self->__commonstate.params + 2;
pi->name = "damping";
pi->name = "decay";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_damping_26;
pi->defaultvalue = self->m_decay_27;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmin = 1;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 3 ("m_decay_27")
// initialize parameter 3 ("m_damping_28")
pi = self->__commonstate.params + 3;
pi->name = "decay";
pi->name = "damping";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_decay_27;
pi->defaultvalue = self->m_damping_28;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmin = 0;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 4 ("m_tone_28")
// initialize parameter 4 ("m_ratio_29")
pi = self->__commonstate.params + 4;
pi->name = "tone";
pi->name = "ratio";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_28;
pi->defaultvalue = self->m_ratio_29;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->outputmin = 0.5;
pi->outputmax = 2;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 5 ("m_mix_29")
// initialize parameter 5 ("m_bandwidth_30")
pi = self->__commonstate.params + 5;
pi->name = "mix";
pi->name = "bandwidth";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_mix_29;
pi->defaultvalue = self->m_bandwidth_30;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
@@ -602,11 +617,11 @@ void * create(double sr, long vs) {
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 6 ("m_shimmer_30")
// initialize parameter 6 ("m_mix_31")
pi = self->__commonstate.params + 6;
pi->name = "shimmer";
pi->name = "mix";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_shimmer_30;
pi->defaultvalue = self->m_mix_31;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
@@ -616,6 +631,20 @@ void * create(double sr, long vs) {
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 7 ("m_tone_32")
pi = self->__commonstate.params + 7;
pi->name = "tone";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_32;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->exp = 0;
pi->units = ""; // no units defined
return self;
}


+ 630
- 500
plugins/shiroverb/shiroverb.gendsp
File diff suppressed because it is too large
View File


+ 929
- 548
plugins/shiroverb/shiroverb.maxpat
File diff suppressed because it is too large
View File


Loading…
Cancel
Save