This file is indexed.

/usr/lib/lv2/sc3-swh.lv2/plugin.ttl is in swh-lv2 1.0.16+git20160519~repack0-3.

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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
@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:sc3-sidechain a pg:Group ;
   a pg:MonoGroup ;
   :symbol "sidechain" .
  
swh:sc3-main_in a pg:Group ;
   a pg:StereoGroup ;
   :symbol "main_in" .
  
swh:sc3-main_out a pg:Group ;
   a pg:StereoGroup ;
   :symbol "main_out" .
  
swh:sc3 a :Plugin ;
   a :CompressorPlugin ;

   doap:name "SC3" ;
   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#sc3> ;

   :pluginProperty :hardRtCapable ;
    
   :port [
     a :InputPort, :ControlPort ;
     :name "Attack time (ms)" ;
     :index 0 ;
     :symbol "attack" ;
     :minimum 2 ;
     :maximum 400 ;
     
     :default 101.5 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Release time (ms)" ;
     :index 1 ;
     :symbol "release" ;
     :minimum 2 ;
     :maximum 800 ;
     
     :default 401 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Threshold level (dB)" ;
     :index 2 ;
     :symbol "threshold" ;
     :minimum -30 ;
     :maximum 0 ;
     
     :default 0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Ratio (1:n)" ;
     :index 3 ;
     :symbol "ratio" ;
     :minimum 1 ;
     :maximum 10 ;
     
     :default 1.0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Knee radius (dB)" ;
     :index 4 ;
     :symbol "knee" ;
     :minimum 1 ;
     :maximum 10 ;
     
     :default 3.25 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Makeup gain (dB)" ;
     :index 5 ;
     :symbol "makeup_gain" ;
     :minimum 0 ;
     :maximum +24 ;
     
     :default 0.0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Chain balance" ;
     :index 6 ;
     :symbol "chain_bal" ;
     :minimum 0 ;
     :maximum 1 ;
     
     :default 0.0 ;
   ] ;
  
   :port [
     a :InputPort, :AudioPort ;
     :name "Sidechain" ;
     :index 7 ;
     :symbol "sidechain" ;
     :portProperty :isSideChain ;
     pg:inGroup swh:sc3-sidechain ;
     pg:role pg:centerChannel ;
   ] ;
  
   :port [
     a :InputPort, :AudioPort ;
     :name "Left input" ;
     :index 8 ;
     :symbol "left_in" ;
     pg:inGroup swh:sc3-main_in ;
     pg:role pg:leftChannel ;
   ] ;
  
   :port [
     a :InputPort, :AudioPort ;
     :name "Right input" ;
     :index 9 ;
     :symbol "right_in" ;
     pg:inGroup swh:sc3-main_in ;
     pg:role pg:rightChannel ;
   ] ;
  
   :port [
     a :OutputPort, :AudioPort ;
     :name "Left output" ;
     :index 10 ;
     :symbol "left_out" ;
     pg:inGroup swh:sc3-main_out ;
     pg:role pg:leftChannel ;
   ] ;
  
   :port [
     a :OutputPort, :AudioPort ;
     :name "Right output" ;
     :index 11 ;
     :symbol "right_out" ;
     pg:inGroup swh:sc3-main_out ;
     pg:role pg:rightChannel ;
   ] ;
  
   swhext:code """
      #include "util/db.h"
      #include "util/rms.h"

      #define A_TBL 256
    """ ;

   swhext:callback [
     swhext:event "instantiate" ;
     swhext:code """
      unsigned int i;
      float sample_rate = (float)s_rate;

      rms = rms_env_new();
      sum = 0.0f;
      amp = 0.0f;
      gain = 0.0f;
      gain_t = 0.0f;
      env = 0.0f;
      count = 0;

      as = malloc(A_TBL * sizeof(float));
      as[0] = 1.0f;
      for (i=1; i<A_TBL; i++) {
	as[i] = expf(-1.0f / (sample_rate * (float)i / (float)A_TBL));
      }

      db_init();
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "cleanup" ;
     swhext:code """
      rms_env_free(plugin_data->rms);
      free(plugin_data->as);
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "run" ;
     swhext:code """
      unsigned long pos;

      const float ga = as[f_round(attack * 0.001f * (float)(A_TBL-1))];
      const float gr = as[f_round(release * 0.001f * (float)(A_TBL-1))];
      const float rs = (ratio - 1.0f) / ratio;
      const float mug = db2lin(makeup_gain);
      const float knee_min = db2lin(threshold - knee);
      const float knee_max = db2lin(threshold + knee);
      const float chain_bali = 1.0f - chain_bal;
      const float ef_a = ga * 0.25f;
      const float ef_ai = 1.0f - ef_a;

      for (pos = 0; pos < sample_count; pos++) {
	const float lev_in = chain_bali * (left_in[pos] + right_in[pos]) * 0.5f
			     + chain_bal * sidechain[pos];
        sum += lev_in * lev_in;

        if (amp > env) {
          env = env * ga + amp * (1.0f - ga);
        } else {
          env = env * gr + amp * (1.0f - gr);
        }
        if (count++ % 4 == 3) {
          amp = rms_env_process(rms, sum * 0.25f);
          sum = 0.0f;
	  if (isnan(env)) {
	    // This can happen sometimes, but I dont know why
	    env = 0.0f;
	  } else if (env <= knee_min) {
            gain_t = 1.0f;
	  } else if (env < knee_max) {
	    const float x = -(threshold - knee - lin2db(env)) / knee;
	    gain_t = db2lin(-knee * rs * x * x * 0.25f);
          } else {
            gain_t = db2lin((threshold - lin2db(env)) * rs);
          }
        }
        gain = gain * ef_a + gain_t * ef_ai;
        buffer_write(left_out[pos], left_in[pos] * gain * mug);
        buffer_write(right_out[pos], right_in[pos] * gain * mug);
      }
      plugin_data->sum = sum;
      plugin_data->amp = amp;
      plugin_data->gain = gain;
      plugin_data->gain_t = gain_t;
      plugin_data->env = env;
      plugin_data->count = count;
    """ ;
   ] ;
  
   swhext:createdBy <http://plugin.org.uk/swh-plugins/toTurtle.xsl> .