This file is indexed.

/usr/lib/lv2/dj_flanger-swh.lv2/plugin.ttl is in swh-lv2 1.0.15+git20151104~repack0-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
183
@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:djFlanger a :Plugin ;
   a :FlangerPlugin ;

   doap:name "DJ flanger" ;
   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#djFlanger> ;

   :pluginProperty :hardRtCapable ;
    
   :port [
     a :InputPort, :ControlPort ;
     :name "LFO sync" ;
     :index 0 ;
     :symbol "sync" ;
     :default 0.0 ;
     :portProperty :toggled ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "LFO period (s)" ;
     :index 1 ;
     :symbol "period" ;
     :minimum 0.1 ;
     :maximum 32.0 ;
     
     :default 1.0 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "LFO depth (ms)" ;
     :index 2 ;
     :symbol "depth" ;
     :minimum 1 ;
     :maximum 5 ;
     
     :default 4 ;
     :default 4 ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Feedback (%)" ;
     :index 3 ;
     :symbol "feedback" ;
     :minimum -100 ;
     :maximum 100 ;
     
     :default 0.0 ;
   ] ;
  
   :port [
     a :InputPort, :AudioPort ;
     :name "Input" ;
     :index 4 ;
     :symbol "input" ;
   ] ;
  
   :port [
     a :OutputPort, :AudioPort ;
     :name "Output" ;
     :index 5 ;
     :symbol "output" ;
   ] ;
  
   swhext:code """
      #include <sys/types.h>
      #include "ladspa-util.h"

      #define DELAY_TIME 0.005f
    """ ;

   swhext:callback [
     swhext:event "instantiate" ;
     swhext:code """
      int buffer_size = 2048;

      fs = s_rate;
      while (buffer_size < fs * DELAY_TIME + 3.0f) {
	buffer_size *= 2;
      }
      buffer = calloc(buffer_size, sizeof(LADSPA_Data));
      buffer_mask = buffer_size - 1;
      buffer_pos = 0;
      x = 0.5f;
      y = 0.0f;
      last_sync = 0;
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "activate" ;
     swhext:code """
      memset(buffer, 0, (buffer_mask + 1) * sizeof(LADSPA_Data));
      last_sync = 0;
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "run" ;
     swhext:code """
      unsigned long pos;
      const float omega = 6.2831852f / (period * fs);
      const float dr = 0.001f * fs * depth;
      float fb;
      float d;
      float dout, out;
      unsigned int dof;

      if (feedback > 99.0f) {
	fb = 0.99f;
      } else if (feedback < -99.0f) {
	fb = -0.99f;
      } else {
	fb = feedback * 0.01f;
      }

      if (sync > 0) {
	if (!last_sync) {
          x = 0.5f;
          y = 0.0f;
        }
	plugin_data->last_sync = 1;
      } else {
	plugin_data->last_sync = 0;
      }

      for (pos = 0; pos < sample_count; pos++) {
	/* Write input into delay line */
	buffer[buffer_pos] = input[pos];

	/* Calcuate delay */
	d = (x + 0.5f) * dr;

	dof = f_round(d);
	//dout = buffer[(buffer_pos - f_round(d)) & buffer_mask];
	dout = cube_interp(d - floor(d),
			   buffer[(buffer_pos - dof - 3) & buffer_mask],
                           buffer[(buffer_pos - dof - 2) & buffer_mask],
                           buffer[(buffer_pos - dof - 1) & buffer_mask],
                           buffer[(buffer_pos - dof) & buffer_mask]);

	/* Write output */
	out = (buffer[buffer_pos] + dout) * 0.5f;
	buffer[buffer_pos] = input[pos] + out * fb;
	buffer_write(output[pos], out);

	/* Roll ringbuffer */
	buffer_pos = (buffer_pos + 1) & buffer_mask;

	/* Run LFO */
	x -= omega * y;
	y += omega * x;
      }

      plugin_data->x = x;
      plugin_data->y = y;
      plugin_data->buffer_pos = buffer_pos;
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "cleanup" ;
     swhext:code """
      free(plugin_data->buffer);
    """ ;
   ] ;
  
   swhext:createdBy <http://plugin.org.uk/swh-plugins/toTurtle.xsl> .