@prefix : . @prefix swh: . @prefix foaf: . @prefix doap: . @prefix swhext: . @prefix pg: . @prefix epp: . swh:lowpass_iir a :Plugin ; a :LowpassPlugin ; doap:name "Glame Lowpass Filter" ; doap:maintainer [ foaf:name "Steve Harris"; foaf:homepage ; foaf:mbox ; ] ; doap:license ; :documentation ; :pluginProperty :hardRtCapable ; :port [ a :InputPort, :ControlPort ; :name "Cutoff Frequency" ; :index 0 ; :symbol "cutoff" ; :minimum 0.0001 ; :maximum 0.45 ; :default 0.337525 ; :default 0.337525 ; :portProperty epp:logarithmic ; :portProperty :sampleRate ; ] ; :port [ a :InputPort, :ControlPort ; :name "Stages(2 poles per stage)" ; :index 1 ; :symbol "stages" ; :minimum 1.0 ; :maximum 10.0 ; :default 1.0 ; :portProperty :integer ; ] ; :port [ a :InputPort, :AudioPort ; :name "Input" ; :index 2 ; :symbol "input" ; ] ; :port [ a :OutputPort, :AudioPort ; :name "Output" ; :index 3 ; :symbol "output" ; ] ; swhext:code """ #include "util/iir.h" #include "ladspa-util.h" """ ; swhext:callback [ swhext:event "instantiate" ; swhext:code """ sample_rate = s_rate; """ ; ] ; swhext:callback [ swhext:event "run" ; swhext:code """ chebyshev(iirf, gt, 2*CLAMP((int)stages,1,10), IIR_STAGE_LOWPASS, cutoff/(float)sample_rate, 0.5f); iir_process_buffer_ns_5(iirf, gt, input, output, sample_count); """ ; ] ; swhext:callback [ swhext:event "activate" ; swhext:code """ plugin_data->gt = init_iir_stage(IIR_STAGE_LOWPASS,10,3,2); plugin_data->iirf = init_iirf_t(plugin_data->gt); chebyshev(plugin_data->iirf, plugin_data->gt, 2*CLAMP(f_round(*(plugin_data->stages)),1,10), IIR_STAGE_LOWPASS, *(plugin_data->cutoff)/(float)sample_rate, 0.5f); """ ; ] ; swhext:callback [ swhext:event "cleanup" ; swhext:code """ free_iirf_t(plugin_data->iirf, plugin_data->gt); free_iir_stage(plugin_data->gt); """ ; ] ; swhext:createdBy .