Browse Source

shiroverb changes big deletion too

pull/2/merge
nino de wit 9 years ago
parent
commit
10c49b1308
10 changed files with 1193 additions and 14990 deletions
  1. +365
    -342
      plugins/shiroverb/gen_exported.cpp
  2. +316
    -243
      plugins/shiroverb/shiroverb.gendsp
  3. +512
    -286
      plugins/shiroverb/shiroverb.maxpat
  4. +0
    -34
      plugins/shiroverb2/DistrhoPluginInfo.h
  5. +0
    -1
      plugins/shiroverb2/DistrhoPluginMaxGen.cpp
  6. +0
    -40
      plugins/shiroverb2/Makefile
  7. +0
    -639
      plugins/shiroverb2/gen_exported.cpp
  8. +0
    -37
      plugins/shiroverb2/gen_exported.h
  9. +0
    -6277
      plugins/shiroverb2/shiroverb.gendsp
  10. +0
    -7091
      plugins/shiroverb2/shiroverb.maxpat

+ 365
- 342
plugins/shiroverb/gen_exported.cpp View File

@@ -44,38 +44,39 @@ typedef struct State {
Delay m_delay_18;
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;
Delta m_delta_39;
Delta m_delta_36;
Delta m_delta_42;
Delta m_delta_33;
Phasor m_phasor_32;
Sah m_sah_37;
Sah m_sah_35;
Sah m_sah_38;
Sah m_sah_41;
Sah m_sah_40;
Sah m_sah_39;
Sah m_sah_33;
Sah m_sah_34;
Sah m_sah_44;
Sah m_sah_43;
Sah m_sah_42;
double m_history_4;
double m_history_5;
double m_history_6;
double m_history_7;
double m_history_3;
double m_history_1;
double m_history_10;
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_ratio_31;
double samples_to_seconds;
double m_history_9;
double m_ratio_25;
double m_roomsize_24;
double m_decay_27;
double m_damping_26;
double m_mix_29;
double m_shimmer_30;
double m_tone_28;
double m_mix_25;
double m_bandwidth_24;
double m_roomsize_27;
double m_shimmer_26;
double m_damping_29;
double m_tone_30;
double m_decay_28;
int vectorsize;
int __exception;
// re-initialize all member variables;
@@ -106,27 +107,28 @@ typedef struct State {
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_decay_27 = 50;
m_tone_28 = 3000;
m_mix_29 = 75;
m_shimmer_30 = 50;
m_bandwidth_24 = 75;
m_mix_25 = 75;
m_shimmer_26 = 30;
m_roomsize_27 = 200;
m_decay_28 = 50;
m_damping_29 = 50;
m_tone_30 = 1500;
m_ratio_31 = 2;
samples_to_seconds = (1 / samplerate);
m_phasor_31.reset(0);
m_delta_32.reset(0);
m_sah_33.reset(0);
m_phasor_32.reset(0);
m_delta_33.reset(0);
m_sah_34.reset(0);
m_delta_35.reset(0);
m_sah_36.reset(0);
m_sah_35.reset(0);
m_delta_36.reset(0);
m_sah_37.reset(0);
m_delta_38.reset(0);
m_sah_39.reset(0);
m_sah_38.reset(0);
m_delta_39.reset(0);
m_sah_40.reset(0);
m_delta_41.reset(0);
m_sah_42.reset(0);
m_sah_41.reset(0);
m_delta_42.reset(0);
m_sah_43.reset(0);
m_sah_44.reset(0);
genlib_reset_complete(this);
};
@@ -144,254 +146,256 @@ 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_13301 = (m_damping_29 * 0.01);
double mul_13302 = (m_mix_25 * 0.01);
double mul_13300 = (m_bandwidth_24 * 0.01);
double rsub_13299 = (1 - mul_13300);
double mul_13303 = (m_shimmer_26 * 0.01);
double expr_13519 = safediv(((m_tone_30 * 2) * 3.1415926535898), 48000);
double sin_13307 = sin(expr_13519);
double clamp_13308 = ((sin_13307 <= 1e-05) ? 1e-05 : ((sin_13307 >= 0.99999) ? 0.99999 : sin_13307));
double expr_13529 = safediv((m_roomsize_27 * 48000), 340);
double mul_13509 = (expr_13529 * 1);
double mul_13508 = (expr_13529 * 0.81649);
double mul_13507 = (expr_13529 * 0.7071);
double mul_13506 = (expr_13529 * 0.63245);
double expr_13518 = safepow(1.0418, m_decay_28);
double expr_13528 = safepow(0.001, safediv(1, (expr_13518 * 48000)));
double expr_13527 = (-safepow(expr_13528, mul_13509));
double expr_13522 = (-safepow(expr_13528, mul_13508));
double expr_13521 = (-safepow(expr_13528, mul_13507));
double expr_13520 = (-safepow(expr_13528, mul_13506));
double mul_13503 = (expr_13529 * 0.000527);
int int_13502 = int(mul_13503);
double mul_13480 = (int_13502 * 400.600006);
double mul_13459 = (int_13502 * 419.5);
double rsub_13358 = (1 - m_ratio_31);
double mul_13357 = (rsub_13358 * 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 add_13446 = (expr_13529 + 5);
double expr_13523 = safepow(expr_13528, add_13446);
double mul_13487 = (int_13502 * 568.299988);
double mul_13466 = (int_13502 * 566.700012);
double mul_13452 = (expr_13529 * 0.41);
double add_13449 = (mul_13452 + 5);
double expr_13526 = safepow(expr_13528, add_13449);
double mul_13451 = (expr_13529 * 0.3);
double add_13448 = (mul_13451 + 5);
double expr_13525 = safepow(expr_13528, add_13448);
double mul_13450 = (expr_13529 * 0.155);
double add_13447 = (mul_13450 + 5);
double expr_13524 = safepow(expr_13528, add_13447);
double mul_13501 = (expr_13529 * 0.110732);
double mul_13494 = (int_13502 * 162.100006);
double mul_13473 = (int_13502 * 144.800003);
double mul_13297 = (m_decay_28 * 2);
double clamp_13292 = ((mul_13297 <= 0) ? 0 : ((mul_13297 >= 100) ? 100 : mul_13297));
double mul_13296 = (clamp_13292 * 0.01);
double atodb_13295 = atodb(mul_13296);
double sub_13294 = (atodb_13295 - 9);
double dbtoa_13293 = dbtoa(sub_13294);
// 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);
double noise_13309 = noise();
double abs_13326 = fabs(noise_13309);
double mul_13330 = (abs_13326 * 0.25);
double noise_13310 = noise();
double abs_13327 = fabs(noise_13310);
double mul_13333 = (abs_13327 * 0.25);
double noise_13311 = noise();
double abs_13328 = fabs(noise_13311);
double mul_13336 = (abs_13328 * 0.25);
double noise_13312 = noise();
double abs_13329 = fabs(noise_13312);
double mul_13339 = (abs_13329 * 0.25);
double tap_13514 = m_delay_23.read_cubic(mul_13509);
double tap_13432 = m_delay_22.read_cubic(mul_13508);
double tap_13426 = m_delay_21.read_cubic(mul_13507);
double tap_13420 = m_delay_20.read_cubic(mul_13506);
double mul_13505 = (tap_13514 * expr_13527);
double mix_13540 = (mul_13505 + (mul_13301 * (m_history_10 - mul_13505)));
double mix_13512 = mix_13540;
double mul_13428 = (tap_13432 * expr_13522);
double mix_13541 = (mul_13428 + (mul_13301 * (m_history_9 - mul_13428)));
double mix_13430 = mix_13541;
double mul_13422 = (tap_13426 * expr_13521);
double mix_13542 = (mul_13422 + (mul_13301 * (m_history_8 - mul_13422)));
double mix_13424 = mix_13542;
double mul_13416 = (tap_13420 * expr_13520);
double mix_13543 = (mul_13416 + (mul_13301 * (m_history_7 - mul_13416)));
double mix_13418 = mix_13543;
double tap_13479 = m_delay_19.read_linear(mul_13480);
double mul_13477 = (tap_13479 * 0.625);
double tap_13458 = m_delay_18.read_linear(mul_13459);
double mul_13456 = (tap_13458 * 0.625);
double phasor_13376 = m_phasor_32(mul_13357, samples_to_seconds);
double add_13350 = ((m_history_6 + phasor_13376) + 0.75);
double mod_13349 = safemod(add_13350, 1);
double delta_13332 = m_delta_33(mod_13349);
double sah_13313 = m_sah_34(mul_13330, delta_13332, 0);
int sah_13331 = m_sah_35(4800, delta_13332, 0);
double mul_13322 = (sah_13331 * mod_13349);
double sub_13348 = (mod_13349 - 0.5);
double mul_13347 = (sub_13348 * 3.1415926535898);
double cos_13346 = cos(mul_13347);
double mul_13341 = (cos_13346 * cos_13346);
double add_13356 = ((m_history_5 + phasor_13376) + 0.5);
double mod_13355 = safemod(add_13356, 1);
double delta_13335 = m_delta_36(mod_13355);
double sah_13315 = m_sah_37(mul_13333, delta_13335, 0);
int sah_13334 = m_sah_38(4800, delta_13335, 0);
double mul_13323 = (sah_13334 * mod_13355);
double sub_13354 = (mod_13355 - 0.5);
double mul_13353 = (sub_13354 * 3.1415926535898);
double cos_13352 = cos(mul_13353);
double mul_13342 = (cos_13352 * cos_13352);
double add_13370 = ((m_history_4 + phasor_13376) + 0.25);
double mod_13369 = safemod(add_13370, 1);
double delta_13338 = m_delta_39(mod_13369);
double sah_13317 = m_sah_40(mul_13336, delta_13338, 0);
int sah_13337 = m_sah_41(4800, delta_13338, 0);
double mul_13324 = (sah_13337 * mod_13369);
double sub_13368 = (mod_13369 - 0.5);
double mul_13367 = (sub_13368 * 3.1415926535898);
double cos_13366 = cos(mul_13367);
double mul_13343 = (cos_13366 * cos_13366);
double add_13375 = ((m_history_3 + phasor_13376) + 0);
double mod_13374 = safemod(add_13375, 1);
double delta_13320 = m_delta_42(mod_13374);
double sah_13319 = m_sah_43(mul_13339, delta_13320, 0);
int sah_13340 = m_sah_44(4800, delta_13320, 0);
double mul_13325 = (sah_13340 * mod_13374);
double tap_13362 = m_delay_17.read_linear(mul_13325);
double tap_13363 = m_delay_17.read_linear(mul_13324);
double tap_13364 = m_delay_17.read_linear(mul_13323);
double tap_13365 = m_delay_17.read_linear(mul_13322);
double mul_13345 = (tap_13365 * mul_13341);
double mul_13351 = (tap_13364 * mul_13342);
double mul_13359 = (tap_13363 * mul_13343);
double sub_13373 = (mod_13374 - 0.5);
double mul_13372 = (sub_13373 * 3.1415926535898);
double cos_13371 = cos(mul_13372);
double mul_13344 = (cos_13371 * cos_13371);
double mul_13360 = (tap_13362 * mul_13344);
double add_13545 = (((mul_13360 + mul_13359) + mul_13351) + mul_13345);
double mix_13544 = (m_y_2 + (clamp_13308 * (add_13545 - m_y_2)));
double mix_13305 = mix_13544;
double mix_13546 = (in1 + (mul_13303 * (mix_13305 - in1)));
double mix_13377 = mix_13546;
double mul_13380 = (mix_13377 * 0.707);
double mix_13547 = (mul_13380 + (rsub_13299 * (m_history_1 - mul_13380)));
double mix_13516 = mix_13547;
double add_13410 = (mix_13512 + mix_13430);
double add_13408 = (mix_13424 + mix_13418);
double sub_13407 = (add_13410 - add_13408);
double mul_13389 = (sub_13407 * 0.5);
double add_13403 = (add_13410 + add_13408);
double mul_13386 = (add_13403 * 0.5);
double tap_13486 = m_delay_16.read_linear(mul_13487);
double tap_13465 = m_delay_15.read_linear(mul_13466);
double sub_13409 = (mix_13512 - mix_13430);
double sub_13406 = (mix_13424 - mix_13418);
double sub_13405 = (sub_13409 - sub_13406);
double mul_13388 = (sub_13405 * 0.5);
double add_13404 = (sub_13409 + sub_13406);
double rsub_13402 = (0 - add_13404);
double mul_13387 = (rsub_13402 * 0.5);
double tap_13434 = m_delay_14.read_cubic(add_13449);
double tap_13435 = m_delay_14.read_cubic(add_13448);
double tap_13436 = m_delay_14.read_cubic(add_13447);
double tap_13437 = m_delay_14.read_cubic(add_13446);
double mul_13444 = (tap_13434 * expr_13526);
double add_13414 = (mul_13389 + mul_13444);
double mul_13442 = (tap_13435 * expr_13525);
double add_13413 = (mul_13388 + mul_13442);
double mul_13438 = (tap_13437 * expr_13523);
double add_13411 = (mul_13386 + mul_13438);
double mul_13440 = (tap_13436 * expr_13524);
double add_13412 = (mul_13387 + mul_13440);
double mul_13484 = (tap_13486 * 0.625);
double mul_13463 = (tap_13465 * 0.625);
double tap_13500 = m_delay_13.read_cubic(mul_13501);
double mul_13498 = (tap_13500 * 0.75);
double sub_13497 = (mix_13516 - mul_13498);
double mul_13496 = (sub_13497 * 0.75);
double add_13495 = (mul_13496 + tap_13500);
double tap_13493 = m_delay_12.read_linear(mul_13494);
double tap_13472 = m_delay_11.read_linear(mul_13473);
double mul_13491 = (tap_13493 * 0.75);
double mul_13470 = (tap_13472 * 0.75);
double mul_13397 = (mul_13444 * mul_13296);
double mul_13395 = (mul_13440 * mul_13296);
double add_13383 = (mul_13397 + mul_13395);
double mul_13396 = (mul_13442 * mul_13296);
double mul_13394 = (mul_13438 * mul_13296);
double add_13382 = (mul_13396 + mul_13394);
double sub_13392 = (add_13383 - add_13382);
double mul_13401 = (mul_13389 * dbtoa_13293);
double mul_13399 = (mul_13387 * dbtoa_13293);
double add_13385 = (mul_13401 + mul_13399);
double mul_13400 = (mul_13388 * dbtoa_13293);
double mul_13398 = (mul_13386 * dbtoa_13293);
double add_13384 = (mul_13400 + mul_13398);
double sub_13393 = (add_13385 - add_13384);
double add_13379 = (sub_13393 + sub_13392);
double add_13391 = (add_13379 + mix_13377);
double sub_13490 = (add_13391 - mul_13491);
double mul_13489 = (sub_13490 * 0.75);
double add_13488 = (mul_13489 + tap_13493);
double sub_13483 = (add_13488 - mul_13484);
double mul_13482 = (sub_13483 * 0.625);
double add_13481 = (mul_13482 + tap_13486);
double sub_13476 = (add_13481 - mul_13477);
double mul_13475 = (sub_13476 * 0.625);
double add_13474 = (mul_13475 + tap_13479);
double mul_13390 = (add_13474 * mul_13302);
double out1 = (in1 + mul_13390);
double add_13381 = (add_13379 + mix_13377);
double sub_13469 = (add_13381 - mul_13470);
double mul_13468 = (sub_13469 * 0.75);
double add_13467 = (mul_13468 + tap_13472);
double sub_13462 = (add_13467 - mul_13463);
double mul_13461 = (sub_13462 * 0.625);
double add_13460 = (mul_13461 + tap_13465);
double sub_13455 = (add_13460 - mul_13456);
double mul_13454 = (sub_13455 * 0.625);
double add_13453 = (mul_13454 + tap_13458);
double mul_13378 = (add_13453 * mul_13302);
double out2 = (in1 + mul_13378);
double history_13511_next_13530 = mix_13512;
double history_13429_next_13531 = mix_13430;
double history_13423_next_13532 = mix_13424;
double history_13417_next_13533 = mix_13418;
double history_13314_next_13534 = sah_13313;
double history_13316_next_13535 = sah_13315;
double history_13318_next_13536 = sah_13317;
double history_13321_next_13537 = sah_13319;
double y0_next_13538 = mix_13305;
double history_13515_next_13539 = mix_13516;
m_delay_23.write(add_13414);
m_delay_22.write(add_13413);
m_delay_21.write(add_13412);
m_delay_20.write(add_13411);
m_delay_19.write(sub_13476);
m_delay_18.write(sub_13455);
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_16.write(sub_13483);
m_delay_15.write(sub_13462);
m_delay_14.write(add_13495);
m_delay_13.write(sub_13497);
m_delay_12.write(sub_13490);
m_delay_11.write(sub_13469);
m_history_10 = history_13511_next_13530;
m_history_9 = history_13429_next_13531;
m_history_8 = history_13423_next_13532;
m_history_7 = history_13417_next_13533;
m_history_6 = history_13314_next_13534;
m_history_5 = history_13316_next_13535;
m_history_4 = history_13318_next_13536;
m_history_3 = history_13321_next_13537;
m_y_2 = y0_next_13538;
m_history_1 = history_13515_next_13539;
m_delay_11.step();
m_delay_12.step();
m_delay_13.step();
@@ -413,26 +417,29 @@ typedef struct State {
return __exception;
};
inline void set_roomsize(double _value) {
m_roomsize_24 = (_value < 0.1 ? 0.1 : (_value > 300 ? 300 : _value));
inline void set_bandwidth(double _value) {
m_bandwidth_24 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_ratio(double _value) {
m_ratio_25 = (_value < 0.5 ? 0.5 : (_value > 2 ? 2 : _value));
inline void set_mix(double _value) {
m_mix_25 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_damping(double _value) {
m_damping_26 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
inline void set_shimmer(double _value) {
m_shimmer_26 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_roomsize(double _value) {
m_roomsize_27 = (_value < 1 ? 1 : (_value > 300 ? 300 : _value));
};
inline void set_decay(double _value) {
m_decay_27 = (_value < 0.1 ? 0.1 : (_value > 100 ? 100 : _value));
m_decay_28 = (_value < 1 ? 1 : (_value > 100 ? 100 : _value));
};
inline void set_tone(double _value) {
m_tone_28 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
inline void set_damping(double _value) {
m_damping_29 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_mix(double _value) {
m_mix_29 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
inline void set_tone(double _value) {
m_tone_30 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
};
inline void set_shimmer(double _value) {
m_shimmer_30 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
inline void set_ratio(double _value) {
m_ratio_31 = (_value < 0.5 ? 0.5 : (_value > 2 ? 2 : _value));
};
} State;
@@ -449,7 +456,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

@@ -475,13 +482,14 @@ void reset(CommonState *cself) {
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 0: self->set_bandwidth(value); break;
case 1: self->set_mix(value); break;
case 2: self->set_shimmer(value); break;
case 3: self->set_roomsize(value); break;
case 4: self->set_decay(value); break;
case 5: self->set_damping(value); break;
case 6: self->set_tone(value); break;
case 7: self->set_ratio(value); break;
default: break;
}
@@ -492,13 +500,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_bandwidth_24; break;
case 1: *value = self->m_mix_25; break;
case 2: *value = self->m_shimmer_26; break;
case 3: *value = self->m_roomsize_27; break;
case 4: *value = self->m_decay_28; break;
case 5: *value = self->m_damping_29; break;
case 6: *value = self->m_tone_30; break;
case 7: *value = self->m_ratio_31; break;
default: break;
}
@@ -516,41 +525,41 @@ 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_bandwidth_24")
pi = self->__commonstate.params + 0;
pi->name = "roomsize";
pi->name = "bandwidth";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_roomsize_24;
pi->defaultvalue = self->m_bandwidth_24;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmax = 300;
pi->outputmin = 0;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 1 ("m_ratio_25")
// initialize parameter 1 ("m_mix_25")
pi = self->__commonstate.params + 1;
pi->name = "ratio";
pi->name = "mix";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_ratio_25;
pi->defaultvalue = self->m_mix_25;
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_shimmer_26")
pi = self->__commonstate.params + 2;
pi->name = "damping";
pi->name = "shimmer";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_damping_26;
pi->defaultvalue = self->m_shimmer_26;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
@@ -560,39 +569,39 @@ void * create(double sr, long vs) {
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 3 ("m_decay_27")
// initialize parameter 3 ("m_roomsize_27")
pi = self->__commonstate.params + 3;
pi->name = "decay";
pi->name = "roomsize";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_decay_27;
pi->defaultvalue = self->m_roomsize_27;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmax = 100;
pi->outputmin = 1;
pi->outputmax = 300;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 4 ("m_tone_28")
// initialize parameter 4 ("m_decay_28")
pi = self->__commonstate.params + 4;
pi->name = "tone";
pi->name = "decay";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_28;
pi->defaultvalue = self->m_decay_28;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->outputmin = 1;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 5 ("m_mix_29")
// initialize parameter 5 ("m_damping_29")
pi = self->__commonstate.params + 5;
pi->name = "mix";
pi->name = "damping";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_mix_29;
pi->defaultvalue = self->m_damping_29;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
@@ -602,18 +611,32 @@ 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_tone_30")
pi = self->__commonstate.params + 6;
pi->name = "shimmer";
pi->name = "tone";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_shimmer_30;
pi->defaultvalue = self->m_tone_30;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 7 ("m_ratio_31")
pi = self->__commonstate.params + 7;
pi->name = "ratio";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_ratio_31;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.5;
pi->outputmax = 2;
pi->exp = 0;
pi->units = ""; // no units defined


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


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


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

@@ -1,34 +0,0 @@
/*
* 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 "Shiroverb"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Shiroverb"

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

#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_VERSION d_cconst('D', 'M', 's', 'v')

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED

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

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

+ 0
- 40
plugins/shiroverb2/Makefile View File

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

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

NAME = Shiroverb

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

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

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

include ../Makefile.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)

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

+ 0
- 639
plugins/shiroverb2/gen_exported.cpp View File

@@ -1,639 +0,0 @@
#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_21;
Delay m_delay_13;
Delay m_delay_14;
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_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;
Sah m_sah_42;
double m_history_4;
double m_history_5;
double m_history_6;
double m_history_7;
double m_history_3;
double m_history_1;
double m_y_2;
double samplerate;
double m_history_10;
double m_history_8;
double samples_to_seconds;
double m_history_9;
double m_roomsize_25;
double m_shimmer_24;
double m_ratio_27;
double m_decay_26;
double m_damping_29;
double m_mix_30;
double m_tone_28;
int vectorsize;
int __exception;
// re-initialize all member variables;
inline void reset(double __sr, int __vs) {
__exception = 0;
vectorsize = __vs;
samplerate = __sr;
m_history_1 = 0;
m_y_2 = 0;
m_history_3 = 0;
m_history_4 = 0;
m_history_5 = 0;
m_history_6 = 0;
m_history_7 = 0;
m_history_8 = 0;
m_history_9 = 0;
m_history_10 = 0;
m_delay_11.reset("m_delay_11", 7000);
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_16.reset("m_delay_16", 15000);
m_delay_17.reset("m_delay_17", 96000);
m_delay_18.reset("m_delay_18", 12000);
m_delay_19.reset("m_delay_19", 10000);
m_delay_20.reset("m_delay_20", 48000);
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_shimmer_24 = 50;
m_roomsize_25 = 200;
m_decay_26 = 50;
m_ratio_27 = 2;
m_tone_28 = 1500;
m_damping_29 = 90;
m_mix_30 = 100;
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_sah_36.reset(0);
m_sah_37.reset(0);
m_delta_38.reset(0);
m_sah_39.reset(0);
m_sah_40.reset(0);
m_delta_41.reset(0);
m_sah_42.reset(0);
m_sah_43.reset(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];
t_sample * __out2 = __outs[1];
if (__exception) {
return __exception;
} else if (( (__in1 == 0) || (__out1 == 0) || (__out2 == 0) )) {
__exception = GENLIB_ERR_NULL_BUFFER;
return __exception;
};
double mul_13 = (m_mix_30 * 0.01);
double mul_1 = (m_damping_29 * 100);
double sqrt_2 = sqrt(mul_1);
double mul_7 = (sqrt_2 * 0.01);
double mul_14 = (m_shimmer_24 * 0.01);
double expr_232 = safediv(((m_tone_28 * 2) * 3.1415926535898), 48000);
double sin_20 = sin(expr_232);
double clamp_21 = ((sin_20 <= 1e-05) ? 1e-05 : ((sin_20 >= 0.99999) ? 0.99999 : sin_20));
double expr_242 = safediv((m_roomsize_25 * 48000), 340);
double mul_221 = (expr_242 * 0.81649);
double mul_222 = (expr_242 * 1);
double mul_219 = (expr_242 * 0.63245);
double mul_220 = (expr_242 * 0.7071);
double mul_216 = (expr_242 * 0.000527);
int int_215 = int(mul_216);
double mul_193 = (int_215 * 400.600006);
double mul_172 = (int_215 * 419.5);
double add_159 = (expr_242 + 5);
double mul_8 = (m_decay_26 * 2);
double clamp_9 = ((mul_8 <= 0.1) ? 0.1 : ((mul_8 >= 100) ? 100 : mul_8));
double mul_17 = (clamp_9 * 3.6);
double expr_241 = safepow(0.001, safediv(1, (mul_17 * 48000)));
double expr_235 = (-safepow(expr_241, mul_221));
double expr_240 = (-safepow(expr_241, mul_222));
double expr_233 = (-safepow(expr_241, mul_219));
double expr_234 = (-safepow(expr_241, mul_220));
double expr_236 = safepow(expr_241, add_159);
double rsub_71 = (1 - m_ratio_27);
double mul_70 = (rsub_71 * 10);
samples_to_seconds = (1 / samplerate);
double mul_200 = (int_215 * 568.299988);
double mul_179 = (int_215 * 566.700012);
double mul_165 = (expr_242 * 0.41);
double add_162 = (mul_165 + 5);
double expr_239 = safepow(expr_241, add_162);
double mul_164 = (expr_242 * 0.3);
double add_161 = (mul_164 + 5);
double expr_238 = safepow(expr_241, add_161);
double mul_163 = (expr_242 * 0.155);
double add_160 = (mul_163 + 5);
double expr_237 = safepow(expr_241, add_160);
double mul_214 = (expr_242 * 0.110732);
double mul_207 = (int_215 * 162.100006);
double mul_186 = (int_215 * 144.800003);
double mul_12 = (m_decay_26 * 0.01);
int gt_6 = (m_decay_26 > 25);
double mul_5 = (gt_6 * m_decay_26);
double sub_3 = (mul_5 - 25);
double expr_231 = safepow(1.06347, sub_3);
double sub_10 = (expr_231 - 1);
double clamp_4 = ((sub_10 <= 0) ? 0 : ((sub_10 >= 100) ? 100 : sub_10));
double mul_16 = (clamp_4 * 0.01);
// the main sample loop;
while ((__n--)) {
const double in1 = (*(__in1++));
double noise_25 = noise();
double abs_42 = fabs(noise_25);
double mul_52 = (abs_42 * 0.25);
double noise_24 = noise();
double abs_41 = fabs(noise_24);
double mul_49 = (abs_41 * 0.25);
double noise_23 = noise();
double abs_40 = fabs(noise_23);
double mul_46 = (abs_40 * 0.25);
double noise_22 = noise();
double abs_39 = fabs(noise_22);
double mul_43 = (abs_39 * 0.25);
double tap_145 = m_delay_23.read_cubic(mul_221);
double tap_227 = m_delay_22.read_cubic(mul_222);
double tap_133 = m_delay_21.read_cubic(mul_219);
double tap_139 = m_delay_20.read_cubic(mul_220);
double tap_192 = m_delay_19.read_linear(mul_193);
double mul_190 = (tap_192 * 0.625);
double tap_171 = m_delay_18.read_linear(mul_172);
double mul_169 = (tap_171 * 0.625);
double mul_141 = (tap_145 * expr_235);
double mix_253 = (mul_141 + (mul_7 * (m_history_10 - mul_141)));
double mix_143 = mix_253;
double mul_218 = (tap_227 * expr_240);
double mix_254 = (mul_218 + (mul_7 * (m_history_9 - mul_218)));
double mix_225 = mix_254;
double sub_122 = (mix_225 - mix_143);
double mul_129 = (tap_133 * expr_233);
double mix_255 = (mul_129 + (mul_7 * (m_history_8 - mul_129)));
double mix_131 = mix_255;
double mul_135 = (tap_139 * expr_234);
double mix_256 = (mul_135 + (mul_7 * (m_history_7 - mul_135)));
double mix_137 = mix_256;
double sub_119 = (mix_137 - mix_131);
double sub_118 = (sub_122 - sub_119);
double mul_101 = (sub_118 * 0.5);
double add_123 = (mix_225 + mix_143);
double add_121 = (mix_137 + mix_131);
double sub_120 = (add_123 - add_121);
double mul_102 = (sub_120 * 0.5);
double add_116 = (add_123 + add_121);
double mul_99 = (add_116 * 0.5);
double phasor_89 = m_phasor_31(mul_70, samples_to_seconds);
double add_88 = ((m_history_6 + phasor_89) + 0);
double mod_87 = safemod(add_88, 1);
double delta_33 = m_delta_32(mod_87);
double sah_32 = m_sah_33(mul_52, delta_33, 0);
int sah_53 = m_sah_34(4800, delta_33, 0);
double mul_38 = (sah_53 * mod_87);
double sub_86 = (mod_87 - 0.5);
double mul_85 = (sub_86 * 3.1415926535898);
double cos_84 = cos(mul_85);
double mul_57 = (cos_84 * cos_84);
double add_83 = ((m_history_5 + phasor_89) + 0.25);
double mod_82 = safemod(add_83, 1);
double delta_51 = m_delta_35(mod_82);
double sah_30 = m_sah_36(mul_49, delta_51, 0);
int sah_50 = m_sah_37(4800, delta_51, 0);
double mul_37 = (sah_50 * mod_82);
double sub_81 = (mod_82 - 0.5);
double mul_80 = (sub_81 * 3.1415926535898);
double cos_79 = cos(mul_80);
double mul_56 = (cos_79 * cos_79);
double add_69 = ((m_history_4 + phasor_89) + 0.5);
double mod_68 = safemod(add_69, 1);
double delta_48 = m_delta_38(mod_68);
double sah_28 = m_sah_39(mul_46, delta_48, 0);
int sah_47 = m_sah_40(4800, delta_48, 0);
double mul_36 = (sah_47 * mod_68);
double sub_67 = (mod_68 - 0.5);
double mul_66 = (sub_67 * 3.1415926535898);
double cos_65 = cos(mul_66);
double mul_55 = (cos_65 * cos_65);
double add_63 = ((m_history_3 + phasor_89) + 0.75);
double mod_62 = safemod(add_63, 1);
double delta_45 = m_delta_41(mod_62);
double sah_26 = m_sah_42(mul_43, delta_45, 0);
int sah_44 = m_sah_43(4800, delta_45, 0);
double mul_35 = (sah_44 * mod_62);
double tap_75 = m_delay_17.read_linear(mul_38);
double tap_76 = m_delay_17.read_linear(mul_37);
double tap_77 = m_delay_17.read_linear(mul_36);
double tap_78 = m_delay_17.read_linear(mul_35);
double mul_64 = (tap_77 * mul_55);
double mul_72 = (tap_76 * mul_56);
double mul_73 = (tap_75 * mul_57);
double sub_61 = (mod_62 - 0.5);
double mul_60 = (sub_61 * 3.1415926535898);
double cos_59 = cos(mul_60);
double mul_54 = (cos_59 * cos_59);
double mul_58 = (tap_78 * mul_54);
double add_258 = (((mul_73 + mul_72) + mul_64) + mul_58);
double mix_257 = (m_y_2 + (clamp_21 * (add_258 - m_y_2)));
double mix_18 = mix_257;
double mix_259 = (in1 + (mul_14 * (mix_18 - in1)));
double mix_90 = mix_259;
double mul_93 = (mix_90 * 0.707);
double mix_260 = (mul_93 + (0.5 * (m_history_1 - mul_93)));
double mix_229 = mix_260;
double tap_199 = m_delay_16.read_linear(mul_200);
double tap_178 = m_delay_15.read_linear(mul_179);
double add_117 = (sub_122 + sub_119);
double rsub_115 = (0 - add_117);
double mul_100 = (rsub_115 * 0.5);
double tap_147 = m_delay_14.read_cubic(add_162);
double tap_148 = m_delay_14.read_cubic(add_161);
double tap_149 = m_delay_14.read_cubic(add_160);
double tap_150 = m_delay_14.read_cubic(add_159);
double mul_155 = (tap_148 * expr_238);
double add_126 = (mul_101 + mul_155);
double mul_157 = (tap_147 * expr_239);
double add_127 = (mul_102 + mul_157);
double mul_151 = (tap_150 * expr_236);
double add_124 = (mul_99 + mul_151);
double mul_153 = (tap_149 * expr_237);
double add_125 = (mul_100 + mul_153);
double mul_197 = (tap_199 * 0.625);
double mul_176 = (tap_178 * 0.625);
double tap_213 = m_delay_13.read_cubic(mul_214);
double mul_211 = (tap_213 * 0.75);
double sub_210 = (mix_229 - mul_211);
double mul_209 = (sub_210 * 0.75);
double add_208 = (mul_209 + tap_213);
double tap_206 = m_delay_12.read_linear(mul_207);
double tap_185 = m_delay_11.read_linear(mul_186);
double mul_204 = (tap_206 * 0.75);
double mul_183 = (tap_185 * 0.75);
double mul_110 = (mul_157 * mul_12);
double mul_108 = (mul_153 * mul_12);
double add_96 = (mul_110 + mul_108);
double mul_109 = (mul_155 * mul_12);
double mul_107 = (mul_151 * mul_12);
double add_95 = (mul_109 + mul_107);
double sub_105 = (add_96 - add_95);
double mul_114 = (mul_102 * mul_16);
double mul_112 = (mul_100 * mul_16);
double add_98 = (mul_114 + mul_112);
double mul_113 = (mul_101 * mul_16);
double mul_111 = (mul_99 * mul_16);
double add_97 = (mul_113 + mul_111);
double sub_106 = (add_98 - add_97);
double add_92 = (sub_106 + sub_105);
double add_104 = (add_92 + mix_90);
double sub_203 = (add_104 - mul_204);
double mul_202 = (sub_203 * 0.75);
double add_201 = (mul_202 + tap_206);
double sub_196 = (add_201 - mul_197);
double mul_195 = (sub_196 * 0.625);
double add_194 = (mul_195 + tap_199);
double sub_189 = (add_194 - mul_190);
double mul_188 = (sub_189 * 0.625);
double add_187 = (mul_188 + tap_192);
double mul_103 = (add_187 * mul_13);
double out1 = (in1 + mul_103);
double add_94 = (add_92 + mix_90);
double sub_182 = (add_94 - mul_183);
double mul_181 = (sub_182 * 0.75);
double add_180 = (mul_181 + tap_185);
double sub_175 = (add_180 - mul_176);
double mul_174 = (sub_175 * 0.625);
double add_173 = (mul_174 + tap_178);
double sub_168 = (add_173 - mul_169);
double mul_167 = (sub_168 * 0.625);
double add_166 = (mul_167 + tap_171);
double mul_91 = (add_166 * mul_13);
double out2 = (in1 + mul_91);
double history_142_next_243 = mix_143;
double history_224_next_244 = mix_225;
double history_130_next_245 = mix_131;
double history_136_next_246 = mix_137;
double history_34_next_247 = sah_32;
double history_31_next_248 = sah_30;
double history_29_next_249 = sah_28;
double history_27_next_250 = sah_26;
double y0_next_251 = mix_18;
double history_228_next_252 = mix_229;
m_delay_23.write(add_126);
m_delay_22.write(add_127);
m_delay_21.write(add_124);
m_delay_20.write(add_125);
m_delay_19.write(sub_189);
m_delay_18.write(sub_168);
m_delay_17.write(in1);
m_delay_16.write(sub_196);
m_delay_15.write(sub_175);
m_delay_14.write(add_208);
m_delay_13.write(sub_210);
m_delay_12.write(sub_203);
m_delay_11.write(sub_182);
m_history_10 = history_142_next_243;
m_history_9 = history_224_next_244;
m_history_8 = history_130_next_245;
m_history_7 = history_136_next_246;
m_history_6 = history_34_next_247;
m_history_5 = history_31_next_248;
m_history_4 = history_29_next_249;
m_history_3 = history_27_next_250;
m_y_2 = y0_next_251;
m_history_1 = history_228_next_252;
m_delay_11.step();
m_delay_12.step();
m_delay_13.step();
m_delay_14.step();
m_delay_15.step();
m_delay_16.step();
m_delay_17.step();
m_delay_18.step();
m_delay_19.step();
m_delay_20.step();
m_delay_21.step();
m_delay_22.step();
m_delay_23.step();
// assign results to output buffer;
(*(__out1++)) = out1;
(*(__out2++)) = out2;
};
return __exception;
};
inline void set_shimmer(double _value) {
m_shimmer_24 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_roomsize(double _value) {
m_roomsize_25 = (_value < 0.1 ? 0.1 : (_value > 300 ? 300 : _value));
};
inline void set_decay(double _value) {
m_decay_26 = (_value < 0.1 ? 0.1 : (_value > 100 ? 100 : _value));
};
inline void set_ratio(double _value) {
m_ratio_27 = (_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_damping(double _value) {
m_damping_29 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
inline void set_mix(double _value) {
m_mix_30 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
};
} State;


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

/// Number of signal inputs and outputs

int gen_kernel_numins = 1;
int gen_kernel_numouts = 2;

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

/// Assistive lables for the signal inputs and outputs

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

/// 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_shimmer(value); break;
case 1: self->set_roomsize(value); break;
case 2: self->set_decay(value); break;
case 3: self->set_ratio(value); break;
case 4: self->set_tone(value); break;
case 5: self->set_damping(value); break;
case 6: self->set_mix(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_shimmer_24; break;
case 1: *value = self->m_roomsize_25; break;
case 2: *value = self->m_decay_26; break;
case 3: *value = self->m_ratio_27; break;
case 4: *value = self->m_tone_28; break;
case 5: *value = self->m_damping_29; break;
case 6: *value = self->m_mix_30; 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(7 * sizeof(ParamInfo));
self->__commonstate.numparams = 7;
// initialize parameter 0 ("m_shimmer_24")
pi = self->__commonstate.params + 0;
pi->name = "shimmer";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_shimmer_24;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 1 ("m_roomsize_25")
pi = self->__commonstate.params + 1;
pi->name = "roomsize";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
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->outputmax = 300;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 2 ("m_decay_26")
pi = self->__commonstate.params + 2;
pi->name = "decay";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_decay_26;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 3 ("m_ratio_27")
pi = self->__commonstate.params + 3;
pi->name = "ratio";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_ratio_27;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0.5;
pi->outputmax = 2;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 4 ("m_tone_28")
pi = self->__commonstate.params + 4;
pi->name = "tone";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_28;
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
// initialize parameter 5 ("m_damping_29")
pi = self->__commonstate.params + 5;
pi->name = "damping";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_damping_29;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
pi->exp = 0;
pi->units = ""; // no units defined
// initialize parameter 6 ("m_mix_30")
pi = self->__commonstate.params + 6;
pi->name = "mix";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_mix_30;
pi->defaultref = 0;
pi->hasinputminmax = false;
pi->inputmin = 0;
pi->inputmax = 1;
pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
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::

+ 0
- 37
plugins/shiroverb2/gen_exported.h View File

@@ -1,37 +0,0 @@
/*******************************************************************************************************************
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.
*******************************************************************************************************************/


#include "genlib.h"
#include "genlib_exportfunctions.h"
#include "genlib_ops.h"

namespace gen_exported {

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::

+ 0
- 6277
plugins/shiroverb2/shiroverb.gendsp
File diff suppressed because it is too large
View File


+ 0
- 7091
plugins/shiroverb2/shiroverb.maxpat
File diff suppressed because it is too large
View File


Loading…
Cancel
Save