/usr/lib/lv2/pitch_scale-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 | @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:pitchScaleHQ a :Plugin ;
a :PitchPlugin ;
doap:name "Higher Quality Pitch Scaler" ;
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#pitchScaleHQ> ;
:pluginProperty :hardRtCapable ;
:port [
a :InputPort, :ControlPort ;
:name "Pitch co-efficient" ;
:index 0 ;
:symbol "mult" ;
:minimum 0.5 ;
:maximum 2 ;
:default 1.0 ;
] ;
:port [
a :InputPort, :AudioPort ;
:name "Input" ;
:index 1 ;
:symbol "input" ;
] ;
:port [
a :OutputPort, :AudioPort ;
:name "Output" ;
:index 2 ;
:symbol "output" ;
] ;
:port [
a :OutputPort, :ControlPort ;
:name "latency" ;
:index 3 ;
:symbol "latency" ;
:portProperty :reportsLatency ;
] ;
swhext:code """
#include "util/pitchscale.h"
#define FRAME_LENGTH 4096
#define OVER_SAMP 16
""" ;
swhext:callback [
swhext:event "run" ;
swhext:code """
pitch_scale(buffers, mult, FRAME_LENGTH, OVER_SAMP, sample_count, sample_rate, input, output, 0, 0.0);
*(plugin_data->latency) = FRAME_LENGTH - (FRAME_LENGTH
/ OVER_SAMP);
""" ;
] ;
swhext:callback [
swhext:event "instantiate" ;
swhext:code """
int i;
float arg;
buffers = malloc(sizeof(sbuffers));
sample_rate = s_rate;
buffers->gInFIFO = malloc(FRAME_LENGTH * sizeof(float));
buffers->gOutFIFO = malloc(FRAME_LENGTH * sizeof(float));
buffers->gLastPhase = malloc(FRAME_LENGTH * sizeof(float));
buffers->gSumPhase = malloc(FRAME_LENGTH * sizeof(float));
buffers->gOutputAccum = malloc(2*FRAME_LENGTH * sizeof(float));
buffers->gAnaFreq = malloc(FRAME_LENGTH * sizeof(float));
buffers->gAnaMagn = malloc(FRAME_LENGTH * sizeof(float));
buffers->gSynFreq = malloc(FRAME_LENGTH * sizeof(float));
buffers->gSynMagn = malloc(FRAME_LENGTH * sizeof(float));
buffers->gWindow = malloc(FRAME_LENGTH * sizeof(float));
arg = 2.0f * M_PI / (float)(FRAME_LENGTH-1);
for (i=0; i < FRAME_LENGTH; i++) {
// Blackman-Harris
buffers->gWindow[i] = 0.35875f - 0.48829f * cos(arg * (float)i) + 0.14128f * cos(2.0f * arg * (float)i) - 0.01168f * cos(3.0f * arg * (float)i);
// Gain correction
buffers->gWindow[i] *= 0.761f;
}
""" ;
] ;
swhext:callback [
swhext:event "activate" ;
swhext:code """
memset(buffers->gInFIFO, 0, FRAME_LENGTH*sizeof(float));
memset(buffers->gOutFIFO, 0, FRAME_LENGTH*sizeof(float));
memset(buffers->gLastPhase, 0, FRAME_LENGTH*sizeof(float)/2);
memset(buffers->gSumPhase, 0, FRAME_LENGTH*sizeof(float)/2);
memset(buffers->gOutputAccum, 0, 2*FRAME_LENGTH*sizeof(float));
memset(buffers->gAnaFreq, 0, FRAME_LENGTH*sizeof(float));
memset(buffers->gAnaMagn, 0, FRAME_LENGTH*sizeof(float));
buffers->gRover = 0;
pitch_scale(buffers, 1.0, FRAME_LENGTH, 16, FRAME_LENGTH, sample_rate, buffers->gInFIFO, buffers->gOutFIFO, 0, 0.0f);
""" ;
] ;
swhext:callback [
swhext:event "cleanup" ;
swhext:code """
free (plugin_data->buffers->gInFIFO);
free (plugin_data->buffers->gOutFIFO);
free (plugin_data->buffers->gLastPhase);
free (plugin_data->buffers->gSumPhase);
free (plugin_data->buffers->gOutputAccum);
free (plugin_data->buffers->gAnaFreq);
free (plugin_data->buffers->gAnaMagn);
free (plugin_data->buffers->gSynFreq);
free (plugin_data->buffers->gSynMagn);
free (plugin_data->buffers->gWindow);
free (plugin_data->buffers);
""" ;
] ;
swhext:createdBy <http://plugin.org.uk/swh-plugins/toTurtle.xsl> .
|