代码拉取完成,页面将自动刷新
<?xml version="1.0"?>
<!DOCTYPE ladspa SYSTEM "ladspa-swh.dtd">
<?xml-stylesheet href="ladspa.css" type="text/css"?>
<ladspa>
<global>
<meta name="maker" value="Andy Wingo <wingo at pobox dot com>"/>
<meta name="copyright" value="GPL"/>
<meta name="properties" value="HARD_RT_CAPABLE"/>
<code><![CDATA[
#include "ladspa-util.h"
#define LOG001 -6.9077552789f
]]></code>
</global>
<!-- ****** DECAY ****** -->
<plugin label="decay" id="1886" class="UtilityPlugin">
<name>Exponential signal decay</name>
<p>Based on work by James McCartney in SuperCollider.</p>
<callback event="instantiate"><![CDATA[
sample_rate = s_rate;
// Uninitialized variables
b = 0;
first_time = 0;
last_decay_time = 0;
y = 0;
]]></callback>
<callback event="activate"><![CDATA[
b = 0.f;
y = 0.f;
last_decay_time = 0.f;
first_time = 0;
]]></callback>
<callback event="run"><![CDATA[
int i;
if (first_time) {
plugin_data->last_decay_time = decay_time;
plugin_data->b = decay_time == 0.f ? 0.f : exp (LOG001 / (decay_time * sample_rate));
plugin_data->first_time = 0;
}
if (decay_time == last_decay_time) {
if (b == 0.f)
for (i=0; i<sample_count; i++)
out[i] = y = in[i];
else
for (i=0; i<sample_count; i++)
out[i] = y = in[i] + b * y;
} else {
LADSPA_Data b_slope;
plugin_data->b = decay_time == 0.f ? 0.f : exp (LOG001 / (decay_time * sample_rate));
b_slope = (plugin_data->b - b) / sample_count;
for (i=0; i<sample_count; i++) {
buffer_write(out[i], y = in[i] + b * y);
b += b_slope;
}
plugin_data->last_decay_time = decay_time;
}
plugin_data->y = y;
]]></callback>
<port label="in" dir="input" type="audio">
<name>Input</name>
</port>
<port label="out" dir="output" type="audio">
<name>Output</name>
</port>
<port label="decay_time" dir="input" type="control" hint="default_1">
<name>Decay Time (s)</name>
<range min="0"/>
<p>
Time for the echoes to decay by 60 decibels.
</p>
</port>
<instance-data label="y" type="LADSPA_Data" />
<instance-data label="b" type="LADSPA_Data" />
<instance-data label="last_decay_time" type="LADSPA_Data" />
<instance-data label="sample_rate" type="LADSPA_Data" />
<instance-data label="first_time" type="char" />
</plugin>
</ladspa>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。