代码拉取完成,页面将自动刷新
<?xml version="1.0"?>
<!DOCTYPE ladspa SYSTEM "ladspa-swh.dtd">
<?xml-stylesheet href="ladspa.css" type="text/css"?>
<ladspa>
<global>
<meta name="maker" value="Steve Harris <steve@plugin.org.uk>"/>
<meta name="copyright" value="GPL"/>
<meta name="properties" value="HARD_RT_CAPABLE"/>
<code><![CDATA[
#include <math.h>
#include "ladspa-util.h"
#define BUFFER_SIZE 16
#define BUFFER_MASK 15
]]></code>
</global>
<plugin label="satanMaximiser" id="1408" class="DynamicsPlugin,DistortionPlugin">
<name>Barry's Satan Maximiser</name>
<p>Formerly Stupid Compressor. Thanks to Matt Yee-King for the name.</p>
<p>Compresses signals with a stupidly short attack and decay, infinite
ratio and hard knee. Not really as a compressor, but good harsh (non-musical)
distortion.</p>
<callback event="instantiate"><![CDATA[
env = 0.0f;
buffer = malloc(sizeof(LADSPA_Data) * BUFFER_SIZE);
buffer_pos = 0;
]]></callback>
<callback event="activate"><![CDATA[
env = 0.0f;
memset(buffer, 0, sizeof(LADSPA_Data) * BUFFER_SIZE);
buffer_pos = 0;
]]></callback>
<callback event="cleanup"><![CDATA[
free(plugin_data->buffer);
]]></callback>
<callback event="run"><![CDATA[
unsigned long pos;
int delay;
float env_tr, env_sc, knee;
float env_time = env_time_p;
if (env_time < 2.0f) {
env_time = 2.0f;
}
knee = DB_CO(knee_point);
delay = f_round(env_time * 0.5f);
env_tr = 1.0f / env_time;
for (pos = 0; pos < sample_count; pos++) {
if (fabs(input[pos]) > env) {
env = fabs(input[pos]);
} else {
env = fabs(input[pos]) * env_tr + env * (1.0f - env_tr);
}
if (env <= knee) {
env_sc = 1.0f / knee;
} else {
env_sc = 1.0f / env;
}
buffer[buffer_pos] = input[pos];
buffer_write(output[pos], buffer[(buffer_pos - delay) & BUFFER_MASK] * env_sc);
buffer_pos = (buffer_pos + 1) & BUFFER_MASK;
}
plugin_data->env = env;
plugin_data->buffer_pos = buffer_pos;
]]></callback>
<port label="env_time_p" dir="input" type="control" hint="default_maximum">
<name>Decay time (samples)</name>
<p>Controls the envelope decay time.</p>
<range min="2" max="30"/>
</port>
<port label="knee_point" dir="input" type="control" hint="default_0">
<name>Knee point (dB)</name>
<p>Controls the knee roll-off point, ie. the point above which the compression kicks in. 0 will have no effect, -90 will remove virtually all dynamic range.</p>
<range min="-90" max="0"/>
</port>
<port label="input" dir="input" type="audio">
<name>Input</name>
</port>
<port label="output" dir="output" type="audio">
<name>Output</name>
</port>
<instance-data label="env" type="float" />
<instance-data label="buffer" type="LADSPA_Data *" />
<instance-data label="buffer_pos" type="unsigned int" />
</plugin>
</ladspa>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。