diff --git a/Makefile.am b/Makefile.am index 7fb86c2..c548a08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,7 +10,8 @@ plugin_LTLIBRARIES = \ dc_remove_1207.la retro_flange_1208.la valve_1209.la \ sifter_1210.la tape_delay_1211.la step_muxer_1212.la \ foldover_1213.la svf_1214.la gsm_1215.la gverb_1216.la \ - phasers_1217.la harmonic_gen_1220.la surround_encoder_1401.la \ + phasers_1217.la harmonic_gen_1220.la vocoder_1337.la \ + surround_encoder_1401.la \ delayorama_1402.la dyson_compress_1403.la crossover_dist_1404.la \ valve_rect_1405.la split_1406.la alias_1407.la \ satan_maximiser_1408.la karaoke_1409.la gate_1410.la \ diff --git a/metadata/lxml2rdf.pl b/metadata/lxml2rdf.pl index 2ecd2a8..779a007 100755 --- a/metadata/lxml2rdf.pl +++ b/metadata/lxml2rdf.pl @@ -51,8 +51,9 @@ print " \n"; print " \n"; print " \n"; - if ($5) { - $defaults{$ocnt} = $5; + $hints = $5; + if ($hints && $hints =~ m((default_[a-z0-9]+))) { + $defaults{$ocnt} = $hints; } } if (m( + + + Achim Settelmeier <settel-linux@sirlab.de> (adapted by Josh Green and Hexasoft) + Vocoder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Steve Harris <steve@plugin.org.uk> VyNil (Vinyl Effect) diff --git a/vocoder_1337.xml b/vocoder_1337.xml new file mode 100644 index 0000000..556ea70 --- /dev/null +++ b/vocoder_1337.xml @@ -0,0 +1,335 @@ + + + + + + + + + + high1[i] = sample - bands->f[i] * bands->mid1[i] - bands->low1[i]; + bands->mid1[i] += bands->high1[i] * bands->c[i]; + bands->low1[i] += bands->mid1[i]; + + bands->high2[i] = bands->low1[i] - bands->f[i] * bands->mid2[i] - bands->low2[i]; + bands->mid2[i] += bands->high2[i] * bands->c[i]; + bands->low2[i] += bands->mid2[i]; + bands->y[i] = bands->high2[i] * bands->att[i]; + } + } + ]]> + + + + + Vocoder +

+ + + + + + ctrl_band_levels); + ]]> + + ctrl_band_levels[0] = band1; + plugin_data->ctrl_band_levels[1] = band2; + plugin_data->ctrl_band_levels[2] = band3; + plugin_data->ctrl_band_levels[3] = band4; + plugin_data->ctrl_band_levels[4] = band5; + plugin_data->ctrl_band_levels[5] = band6; + plugin_data->ctrl_band_levels[6] = band7; + plugin_data->ctrl_band_levels[7] = band8; + plugin_data->ctrl_band_levels[8] = band9; + plugin_data->ctrl_band_levels[9] = band10; + plugin_data->ctrl_band_levels[10] = band11; + plugin_data->ctrl_band_levels[11] = band12; + plugin_data->ctrl_band_levels[12] = band13; + plugin_data->ctrl_band_levels[13] = band14; + plugin_data->ctrl_band_levels[14] = band15; + plugin_data->ctrl_band_levels[15] = band16; + + numbands = (int)(*plugin_data->ctrl_band_count); + if (numbands < 1 || numbands > MAX_BANDS) numbands = MAX_BANDS; + + /* initialize bandpass information if num_bands control has changed, + or on first run */ + if (plugin_data->num_bands != numbands) + { + plugin_data->num_bands = numbands; + + memset(&plugin_data->bands_formant, 0, sizeof(struct bandpasses)); + for(i=0; i < numbands; i++) + { + a = 16.0 * i/(double)numbands; // stretch existing bands + + if (a < 4.0) + plugin_data->bands_formant.freq[i] = 150 + 420 * a / 4.0; + else + plugin_data->bands_formant.freq[i] = 600 * pow (1.23, a - 4.0); + + c = plugin_data->bands_formant.freq[i] * 2 * M_PI / plugin_data->sample_rate; + plugin_data->bands_formant.c[i] = c * c; + + plugin_data->bands_formant.f[i] = 0.4/c; + plugin_data->bands_formant.att[i] = + 1/(6.0 + ((exp (plugin_data->bands_formant.freq[i] + / plugin_data->sample_rate) - 1) * 10)); + + plugin_data->bands_out.decay[i] = decay_table[(int)a]; + plugin_data->bands_out.level[i] = + CLAMP (plugin_data->ctrl_band_levels[i], 0.0, 1.0); + } + memcpy(&plugin_data->bands_carrier, + &plugin_data->bands_formant, sizeof(struct bandpasses)); + + } + else /* get current values of band level controls */ + { + for (i = 0; i < numbands; i++) + plugin_data->bands_out.level[i] = CLAMP (plugin_data->ctrl_band_levels[i], + 0.0, 1.0); + } + + for (i=0; i < sample_count; i++) + { + doBandpasses (&(plugin_data->bands_carrier), + plugin_data->port_carrier[i], + plugin_data->num_bands); + doBandpasses (&(plugin_data->bands_formant), + plugin_data->port_formant[i], + plugin_data->num_bands); + + LADSPA_Data sample = 0.0; + for (j=0; j < numbands; j++) + { + plugin_data->bands_out.oldval[j] = plugin_data->bands_out.oldval[j] + + (fabs (plugin_data->bands_formant.y[j]) + - plugin_data->bands_out.oldval[j]) + * plugin_data->bands_out.decay[j]; + x = plugin_data->bands_carrier.y[j] * plugin_data->bands_out.oldval[j]; + + sample += x * plugin_data->bands_out.level[j]; + } + /* treat paning + main volume */ + pan = (int)(*plugin_data->ctrl_pan); + fl = fr = 1.0f; + if (pan != 0) { /* no paning, don't compute useless values */ + if (pan > 0) { /* reduce left */ + fl = (100.-pan)/100.; + } else { + fr = (100.+pan)/100.; + } + } + /* apply volume and paning */ + plugin_data->port_output[i] = sample * plugin_data->main_vol * fl; + plugin_data->port_output2[i] = sample * plugin_data->main_vol * fr; + } + + // Suppress unused warnings + (void)(sample_rate); + (void)(num_bands); + (void)(main_vol); + (void)(bands_formant); + (void)(bands_carrier); + (void)(bands_out); + (void)(ctrl_band_levels); + (void)(port_formant); + (void)(port_carrier); + (void)(port_output); + (void)(port_output2); + (void)(ctrl_band_count); + (void)(ctrl_pan); + (void)(run_adding_gain); + + ]]> + + + Formant-in + + + + Carrier-in + + + + Output-out + + + + Output2-out + + + + Number of bands + + + + + Left/Right + + + + + + Band 1 Level + + + + + Band 2 Level + + + + + Band 3 Level + + + + + Band 4 Level + + + + + Band 5 Level + + + + + Band 6 Level + + + + + Band 7 Level + + + + + Band 8 Level + + + + + Band 9 Level + + + + + Band 10 Level + + + + + Band 11 Level + + + + + Band 12 Level + + + + + Band 13 Level + + + + + Band 14 Level + + + + + Band 15 Level + + + + + Band 16 Level + + + + + + + + + + + + + + + + +
+