File: plugin.xml

package info (click to toggle)
swh-lv2 1.0.16%2Bgit20160519~repack0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 1,004 kB
  • ctags: 440
  • sloc: xml: 11,889; ansic: 2,120; makefile: 120
file content (64 lines) | stat: -rw-r--r-- 1,664 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?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 &lt;wingo at pobox dot com&gt;"/>
    <meta name="copyright" value="GPL"/>
    <meta name="properties" value="HARD_RT_CAPABLE"/>
    <code><![CDATA[
      #include "ladspa-util.h"

      #define LOG001 -6.9077552789f
    ]]></code>
  </global>

  <!-- ******   IMPULSE-FC   ****** -->

  <plugin label="impulse_fc" id="1885" class="GeneratorPlugin">
    <name>Non-bandlimited single-sample impulses</name>
    <p>Based on work by James McCartney in SuperCollider.</p>
    
    <callback event="instantiate"><![CDATA[
      sample_rate = s_rate;
      phase = 0.f;
    ]]></callback>
    
    <callback event="activate"><![CDATA[
      phase = 0.f;
    ]]></callback>
    
    <callback event="run"><![CDATA[
      int i;
      float phase_step = frequency / sample_rate;

      for (i=0; i<sample_count; i++) {
        if (phase > 1.f) {
          phase -= 1.f;
          buffer_write(out[i], 1.f);
        } else {
          buffer_write(out[i], 0.f);
        }
        phase += phase_step;
      }

      plugin_data->phase = phase;
    ]]></callback>

    <port label="frequency" dir="input" type="control" hint="default_1">
      <name>Frequency (Hz)</name>
      <range min="0" max="5000"/>
      <p>
       Frequency for the impulses.
      </p>
    </port>

    <port label="out" dir="output" type="audio">
      <name>Output</name>
    </port>

    <instance-data label="sample_rate" type="LADSPA_Data" />
    <instance-data label="phase" type="float" />
  </plugin>
</ladspa>