This file is indexed.

/usr/lib/lv2/am_pitchshift-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
@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:amPitchshift a :Plugin ;
   a :PitchPlugin ;

   doap:name "AM pitchshifter" ;
   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#amPitchshift> ;

   :pluginProperty :hardRtCapable ;
    
   :port [
     a :InputPort, :ControlPort ;
     :name "Pitch shift" ;
     :index 0 ;
     :symbol "pitch" ;
     :minimum 0.25 ;
     :maximum 4.0 ;
     
     :default 1.0 ;
     :portProperty pprops:logarithmic ;
   ] ;
  
   :port [
     a :InputPort, :ControlPort ;
     :name "Buffer size" ;
     :index 1 ;
     :symbol "size" ;
     :minimum 1 ;
     :maximum 7 ;
     
     :default 4 ;
     :portProperty :integer ;
   ] ;
  
   :port [
     a :InputPort, :AudioPort ;
     :name "Input" ;
     :index 2 ;
     :symbol "input" ;
   ] ;
  
   :port [
     a :OutputPort, :AudioPort ;
     :name "Output" ;
     :index 3 ;
     :symbol "output" ;
   ] ;
  
   :port [
     a :OutputPort, :ControlPort ;
     :name "latency" ;
     :index 4 ;
     :symbol "latency" ;
     :portProperty :reportsLatency ;
   ] ;
  
   swhext:code """
      #include <stdlib.h>
      #include <math.h>

      #include "ladspa-util.h"

      /* Beware of dependcies if you change this */
      #define DELAY_SIZE 8192
    """ ;

   swhext:callback [
     swhext:event "instantiate" ;
     swhext:code """
      delay = calloc(DELAY_SIZE, sizeof(LADSPA_Data));
      rptr.all = 0;
      wptr = 0;
      last_size = -1;
      delay_mask = 0xFF;
      delay_ofs = 0x80;
      last_gain = 0.5f;
      count = 0;
      last_inc = 0.0f;
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "cleanup" ;
     swhext:code """
      free(plugin_data->delay);
    """ ;
   ] ;
  
   swhext:callback [
     swhext:event "run" ;
     swhext:code """
      unsigned long pos;
      fixp16 om;
      float gain = last_gain, gain_inc = last_inc;
      unsigned int i;

      om.all = f_round(pitch * 65536.0f);

      if (size != last_size) {
	int size_tmp = f_round(size);

	if (size_tmp > 7) {
	  size_tmp = 5;
	} else if (size_tmp < 1) {
	  size_tmp = 1;
	}
	plugin_data->last_size = size;

	/* Calculate the ringbuf parameters, the magick constants will need
	 * to be changed if you change DELAY_SIZE */
	delay_mask = (1 << (size_tmp + 6)) - 1;
	delay_ofs = 1 << (size_tmp + 5);
      }

      for (pos = 0; pos < sample_count; pos++) {
	float out = 0.0f;

	if (count++ > 14) {
	  float tmp;
	  count = 0;
	  tmp = 0.5f * (float)((rptr.part.in - wptr + delay_ofs/2) &
                delay_mask) / (float)delay_ofs;
	  tmp = sinf(M_PI * 2.0f * tmp) * 0.5f + 0.5f;
	  gain_inc = (tmp - gain) / 15.0f;
	}
	gain += gain_inc;

	delay[wptr] = input[pos];

	/* Add contributions from the two readpointers, scaled by thier
         * distance from the write pointer */
	i = rptr.part.in;
	out += cube_interp((float)rptr.part.fr * 0.0000152587f,
                           delay[(i - 1) & delay_mask], delay[i],
                           delay[(i + 1) & delay_mask],
                           delay[(i + 2) & delay_mask]) * (1.0f - gain);
	i += delay_ofs;
	out += cube_interp((float)rptr.part.fr * 0.0000152587f,
                           delay[(i - 1) & delay_mask], delay[i & delay_mask],
                           delay[(i + 1) & delay_mask],
                           delay[(i + 2) & delay_mask]) * gain;
	
	buffer_write(output[pos], out);

	/* Increment ringbuffer pointers */
	wptr = (wptr + 1) & delay_mask;
	rptr.all += om.all;
	rptr.part.in &= delay_mask;
      }

    plugin_data->rptr.all = rptr.all;
    plugin_data->wptr = wptr;
    plugin_data->delay_mask = delay_mask;
    plugin_data->delay_ofs = delay_ofs;
    plugin_data->last_gain = gain;
    plugin_data->count = count;
    plugin_data->last_inc = gain_inc;

    *(plugin_data->latency) = delay_ofs/2;
    """ ;
   ] ;
  
   swhext:createdBy <http://plugin.org.uk/swh-plugins/toTurtle.xsl> .