1<?xml version="1.0"?> 2<!DOCTYPE ladspa SYSTEM "ladspa-swh.dtd"> 3<?xml-stylesheet href="ladspa.css" type="text/css"?> 4 5<ladspa> 6 <global> 7 <meta name="maker" value="Steve Harris <steve@plugin.org.uk>"/> 8 <meta name="copyright" value="GPL"/> 9 <meta name="properties" value="HARD_RT_CAPABLE"/> 10 </global> 11 12 <plugin label="karaoke" id="1409" class="UtilityPlugin"> 13 <name>Karaoke</name> 14 <p>Attempts to strip the vocals from a stereo signal.</p> 15 16 <callback event="run"><![CDATA[ 17 unsigned long pos; 18 float coef = pow(10.0f, gain * 0.05f) * 0.5f; 19 float m, s; 20 21 for (pos = 0; pos < sample_count; pos++) { 22 m = lin[pos] + rin[pos]; 23 s = lin[pos] - rin[pos]; 24 buffer_write(lout[pos], m * coef + s * 0.5f); 25 buffer_write(rout[pos], m * coef - s * 0.5f); 26 } 27 ]]></callback> 28 29 <port label="gain" dir="input" type="control" hint="default_0"> 30 <name>Vocal volume (dB)</name> 31 <p>Controls the attenuation of the vocal (centre channel) in dB's.</p> 32 <p>The greater the attenuation the greater the loss of stereo field.</p> 33 <range min="-70" max="0"/> 34 </port> 35 36 <port label="lin" dir="input" type="audio"> 37 <name>Left in</name> 38 </port> 39 40 <port label="rin" dir="input" type="audio"> 41 <name>Right in</name> 42 </port> 43 44 <port label="lout" dir="output" type="audio"> 45 <name>Left out</name> 46 </port> 47 48 <port label="rout" dir="output" type="audio"> 49 <name>Right out</name> 50 </port> 51 </plugin> 52</ladspa> 53