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 namespace Arts { 00005 interface Compressor : Effect { 00006 Info icon = "icons/compressor.png"; 00007 Info authors = "Matthias Kretz, Stefan Westerfeld"; 00008 Info license = _("GNU Lesser General Public License"); 00009 Info category = _("/Enhance/ArtsCompressor"); 00010 Info blurb = _("ArtsCompressor compresses the sound.\n\n" 00011 "Compression is a dynamic operation that consists of two parts:\n" 00012 "(1) the current input volume of the signal is detected\n" 00013 "(2) if it exceeds a given theshold, the volume of the output signal will be reduced\n\n" 00014 "The input volume detection has an attack and a release half-life time which can be specified - " 00015 "in milliseconds - with the corresponding properties. This envelope causes the compressor to " 00016 "adapt slowly to the actual input signal level.\n\n" 00017 "The ratio specifies how the volume of a signal should be reduced, if it exceeds the threshold. " 00018 "A compression ratio of 2:1 means for instance that if the input volume is 2 dB over the threshold, " 00019 "the output volume will be 1 dB over the threshold. Example (threshold = -10, ratio 2:1):\n" 00020 "input = -20 dB => output = -20 dB\n" 00021 "input = -10 dB => output = -10 dB\n" 00022 "input = 0 dB => output = -5 dB\n" 00023 "input = 10 dB => output = 0 dB\n" 00024 "input = 20 dB => output = 5 dB\n\n" 00025 "Compression is often thought off as an operation to make music \"sound louder\". To achieve this, " 00026 "the first step is to reduce the dynamic range like in the example above. As the loud parts of " 00027 "the music have been reduced in volume, we can now amplify everything, without risking distortion or clipping. " 00028 "This has the overall effect of the music sounding louder. In our example, an output " 00029 "amplification of 5 dB would be okay, if the input signal never exceeded 0 dB."); 00030 IStream audio_in1 = Stream (_("Audio In1"), _("Audio input 1")); 00031 IStream audio_in2 = Stream (_("Audio In2"), _("Audio input 2")); 00032 OStream audio_out1 = Stream (_("Audio Out1"), _("Compressed audio output 1")); 00033 OStream audio_out2 = Stream (_("Audio Out2"), _("Compressed audio output 2")); 00034 group _("Parameters") { 00035 Real attack = SfiReal (_("Attack [ms]"), _("Set the attack time in milliseconds"), 10.0, 0.1, 250.0, 10.0, STANDARD ":scale"); 00036 Real release = SfiReal (_("Release [ms]"), _("Set the release time in milliseconds"), 10.0, 0.1, 250.0, 10.0, STANDARD ":scale"); 00037 Real threshold_db = Gain (_("Threshold [dB]"), _("Only parts louder than threshold are compressed"), 0, -100, 0, 1, STANDARD ":scale"); 00038 Real ratio_to_one = SfiReal (_("Ratio [x:1]"), _("Set the compression ratio to x:1"), 2, 1.0, 20.0, 1, STANDARD ":scale"); 00039 Real output_db = Gain (_("Output [dB]"), _("Set the output amplification"), 0, -20, 20, 1, STANDARD ":scale"); 00040 Bool auto_output = Bool (_("Auto Output"), _("Adjust the output amplification automatically according to threshold and ratio"), FALSE, GUI); 00041 }; 00042 group "compat" { /* compatibility properties */ 00043 Real threshold = SfiReal ("", "", 1, 0.00001, 1, 0.01, "w"); 00044 Real ratio = SfiReal ("", "", 0.8, 0.0, 1.0, 0.1, "w"); 00045 Real output = SfiReal ("", "", 1, 0.1, 10.0, 1, "w"); 00046 }; 00047 }; 00048 00049 }; // Arts 00050 }; // Bse 00051 00052 /* vim:set ts=8 sw=2 sts=2 syntax=cpp: */