This file is indexed.

/usr/lib/lv2/plate-swh.lv2/plugin.ttl is in swh-lv2 1.0.15+20130517.git978d5d8-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
@prefix : <http://lv2plug.in/ns/lv2core#> .
@prefix swh: <http://plugin.org.uk/swh-plugins/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix swhext: <http://plugin.org.uk/extensions#> .
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> .
@prefix pprops: <http://lv2plug.in/ns/ext/port-props#> .

swh:plate-in a pg:Group ;
   a pg:MonoGroup ;
   :symbol "in" .
  
swh:plate-out a pg:Group ;
   a pg:StereoGroup ;
   :symbol "out" ;
   pg:source swh:plate-in .
  
swh:plate a :Plugin ;
   a :ReverbPlugin ;

   doap:name "Plate reverb" ;
   doap:maintainer [
      foaf:name "Steve Harris";
      foaf:homepage <http://plugin.org.uk/> ;
      foaf:mbox <mailto:steve@plugin.org.uk> ;
   ] ;
   doap:license <http://usefulinc.com/doap/licenses/gpl> ;
   :documentation <http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html#plate> ;

   :pluginProperty :hardRtCapable ;
    
   :port [
     a :InputPort, :ControlPort ;
     :name "Reverb time" ;
     :index 0 ;
     :symbol "time" ;
     :minimum 0.01 ;
     :maximum 8.5 ;
     :default 4.255 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Damping" ;
     :index 1 ;
     :symbol "damping" ;
     :minimum 0 ;
     :maximum 1 ;
     :default 0.25 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Dry/wet mix" ;
     :index 2 ;
     :symbol "wet" ;
     :minimum 0 ;
     :maximum 1 ;
     :default 0.25 ;
   ] ;
  
   :port [
     a :InputPort, :AudioPort ;
     :name "Input" ;
     :index 3 ;
     :symbol "input" ;
     pg:inGroup swh:plate-in ;
     pg:role pg:centerChannel ;
   ] ;
  
   :port [
     a :OutputPort, :AudioPort ;
     :name "Left output" ;
     :index 4 ;
     :symbol "outputl" ;
     pg:inGroup swh:plate-out ;
     pg:role pg:leftChannel ;
   ] ;
  
   :port [
     a :OutputPort, :AudioPort ;
     :name "Right output" ;
     :index 5 ;
     :symbol "outputr" ;
     pg:inGroup swh:plate-out ;
     pg:role pg:leftChannel ;
   ] ;
  
   swhext:code """
      #include "util/waveguide_nl.h"

      #define LP_INNER 0.96f
      #define LP_OUTER 0.983f

      /* required for clang compilation */
      void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, float *out0, float *out1);

      #define RUN_WG(n, junct_a, junct_b) waveguide_nl_process_lin(w[n], junct_a - out[n*2+1], junct_b - out[n*2], out+n*2, out+n*2+1)
    """ ;

   swhext:callback [
     swhext:event "instantiate" ;
     swhext:code """
      w = malloc(8 * sizeof(waveguide_nl *));
      w[0] = waveguide_nl_new(2389, LP_INNER, 0.04f, 0.0f);
      w[1] = waveguide_nl_new(4742, LP_INNER, 0.17f, 0.0f);
      w[2] = waveguide_nl_new(4623, LP_INNER, 0.52f, 0.0f);
      w[3] = waveguide_nl_new(2142, LP_INNER, 0.48f, 0.0f);
      w[4] = waveguide_nl_new(5597, LP_OUTER, 0.32f, 0.0f);
      w[5] = waveguide_nl_new(3692, LP_OUTER, 0.89f, 0.0f);
      w[6] = waveguide_nl_new(5611, LP_OUTER, 0.28f, 0.0f);
      w[7] = waveguide_nl_new(3703, LP_OUTER, 0.29f, 0.0f);

      out = calloc(32, sizeof(float));
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "activate" ;
     swhext:code """
      unsigned int i;

      for (i = 0; i < 8; i++) {
	waveguide_nl_reset(w[i]);
      }
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "run" ;
     swhext:code """
      unsigned long pos;
      const float scale = powf(time * 0.117647f, 1.34f);
      const float lpscale = 1.0f - damping * 0.93;

      for (pos=0; pos<8; pos++) {
	waveguide_nl_set_delay(w[pos], w[pos]->size * scale);
      }
      for (pos=0; pos<4; pos++) {
	waveguide_nl_set_fc(w[pos], LP_INNER * lpscale);
      }
      for (; pos<8; pos++) {
	waveguide_nl_set_fc(w[pos], LP_OUTER * lpscale);
      }

      for (pos = 0; pos < sample_count; pos++) {
	const float alpha = (out[0] + out[2] + out[4] + out[6]) * 0.5f
			    + input[pos];
	const float beta = (out[1] + out[9] + out[14]) * 0.666666666f;
	const float gamma = (out[3] + out[8] + out[11]) * 0.666666666f;
	const float delta = (out[5] + out[10] + out[13]) * 0.666666666f;
	const float epsilon = (out[7] + out[12] + out[15]) * 0.666666666f;

	RUN_WG(0, beta, alpha);
	RUN_WG(1, gamma, alpha);
	RUN_WG(2, delta, alpha);
	RUN_WG(3, epsilon, alpha);
	RUN_WG(4, beta, gamma);
	RUN_WG(5, gamma, delta);
	RUN_WG(6, delta, epsilon);
	RUN_WG(7, epsilon, beta);

        outputl[pos] = beta * wet + input[pos] * (1.0f - wet);
        outputr[pos] = gamma * wet + input[pos] * (1.0f - wet);
      }
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "cleanup" ;
     swhext:code """
      unsigned int i;

      for (i = 0; i < 8; i++) {
	waveguide_nl_free(plugin_data->w[i]);
      }
      free(plugin_data->w);
      free(plugin_data->out);
    """ ;
   ] ;
  
   swhext:createdBy <http://plugin.org.uk/swh-plugins/toTurtle.xsl> .