BEAST/BSE - Better Audio System and Sound Engine
0.8.2
|
00001 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html 00002 include "bse/bsecxxmodule.idl"; 00003 namespace Bse { 00004 00006 namespace Standard { 00007 enum SaturationType { 00008 SATURATE_TANH = Enum (_("TANH"), _("Saturation via hyperbolic tangent function which is mostly linear for " 00009 "small levels while providing a soft curvature for high volume signals")), 00010 SATURATE_ATAN = Enum (_("ATAN"), _("Saturation via arc tangent function which is reasonably linear in the " 00011 "lower 50% but develops a strong curvature above 80%")), 00012 SATURATE_QUADRATIC = Enum (_("Quadratic"), _("Saturation via quadratic approximation which keeps a " 00013 "well-proportioned curvature across all levels")), 00014 SATURATE_SOFT_KNEE = Enum (_("Soft Knee"), _("Linear saturation with a soft knee transit into the clipping range " 00015 "(equals hard clipping at 100%) which approaches quadratic curvature " 00016 "for small levels")), 00017 SATURATE_HARD = Enum (_("Hard"), _("Hard saturation via clipping (prone to clicks)")), 00018 }; 00019 00020 interface Saturator : Bse::Effect { 00021 Info category = "/Distortion/Saturate"; 00022 Info icon = "icons/saturate.png"; 00023 Info authors = "Tim Janik"; 00024 Info blurb = ("This is 2-channel saturation module. Various saturation types are supported. " 00025 "The 'Level' parameter adjusts the maximum saturation stage output for a normalized " 00026 "input signal. " 00027 "Some saturartion types simply clip signals beyond this threshold, while others (notably " 00028 "TANH and ATAN) allow overdrive signals to pass through the saturation stage up to a certain amount. " 00029 "The output volume allows for extra amplification after the saturation stage. For saturation " 00030 "types that allow overdrive signals past the saturation stage, an output volume greater than " 00031 "0dB may result in overdrive signals as output of this module."); 00032 IStream audio_in1 = Stream ("Audio In1", "First Audio Input"); 00033 IStream audio_in2 = Stream ("Audio In2", "Second Audio Input"); 00034 OStream audio_out1 = Stream ("Audio Out1", "First Audio Output"); 00035 OStream audio_out2 = Stream ("Audio Out2", "Second Audio Output"); 00036 group "Saturation" { 00037 SaturationType saturation = SfiEnum (_("Saturation Type"), _("The type of saturation to be used"), SATURATE_TANH, STANDARD); 00038 Real level = Perc (_("Level"), 00039 _("Normalization level of the saturation curve in percent, some saturation types still " 00040 "allow overdrive signals beyond this level"), 00041 50, "scale:" STANDARD); 00042 Bool auto_output = Bool (_("Auto Output"), 00043 _("Automatically adapt the output volume according to changes in saturation level"), 00044 TRUE, STANDARD); 00045 Real output_volume = DBVolume (_("Output Volume"), _("Output stage amplification in decibel"), 0, 0, +42, "automate:" STANDARD); 00046 // Bool test_dump = Trigger ("Test Dump", "", GUI); 00047 }; 00048 }; 00049 00050 } } // Bse::Standard