Re: [linux-audio-dev] TAP Scaling Limiter - how's it work?
On Wed, Feb 18, 2004 at 08:48:02AM +0100, Tom Szilagyi wrote: Paul Winkler wrote: ok - what happens if the input is a 30 hz sine wave? assume it's coming from a particularly evil keyboard player ;-) That's a particularly evil situation. :) i know :-) The fact is, if you have a normal musical signal, it will have much higher frequency components so zero-crosses occur much more frequently than this limit. I investigated this problem a bit before i settled on that 40 Hz... a mixed signal (a few instruments together), or higher pitched instruments usually give average zero-cross frequencies of 8-12 kHz. that high? no kidding? I tried it with bass guitar as well (real, no synth) and i didn't run into this limitation. Unless you tried a 5-string, there's no way you'd even get a fundamental below about 40 Hz - low E is just above 40. Low B on a 5-string is somewhere around 30 IIRC. Not too many instruments get below 40 Hz that I know of ... synths and pipe organs, mostly. And they *usually* have a lot of higher freqs mixed in. So if you take a 30 Hz sinusoidal from an oscillator and feed it into this plugin, then there will be unprocessed segments just one, right? of audio because of not fitting in the ringbuffer. OK. I wondered if it would try to process the last partial segment which might get quite different scaling than the following part of the segment when the next batch of data comes in. But if you really need that (do you?), No, just satisfying my curiosity :-) you can increase the ringbuf size and thus decrease this freq lower limit in the code... at the expense of increasing latency. That's about what I figured. Thanks!! -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's GUILDMASTER SEGWAY! (random hero from isometric.spaceninja.com)
Re: [linux-audio-dev] TAP Scaling Limiter - how's it work?
Paul Winkler wrote: The fact is, if you have a normal musical signal, it will have much higher frequency components so zero-crosses occur much more frequently than this limit. I investigated this problem a bit before i settled on that 40 Hz... a mixed signal (a few instruments together), or higher pitched instruments usually give average zero-cross frequencies of 8-12 kHz. that high? no kidding? Yes, mostly, because higher harmonics also cause zero crosses. Musical instruments are not sinusoidal waveform generators. :-) (also, the numbers above were the average frequency of zero-crosses, which mean actually half that audio frequency, because every cycle has 2 half-cycles... so that 8-12 kHz is not really surprising...) Not too many instruments get below 40 Hz that I know of ... synths and pipe organs, mostly. And they *usually* have a lot of higher freqs mixed in. That's why there is many zero-crosses in almost any case... more than what the instrument's base frequency would yield. So if you take a 30 Hz sinusoidal from an oscillator and feed it into this plugin, then there will be unprocessed segments just one, right? One per LADSPA buffer, in the worst (but not very unlikely) case. Tom
[linux-audio-dev] caps 0.1.0
pleased to announce the initial release of the caps audio plugin suite under the GNU public license. quoting http://quitte.de/dsp/caps.html : caps, the C* Audio Plugin Suite, is a collection of refined LADSPA units including instrument amplifier emulation, stomp-box classics, versatile 'virtual analog' oscillators, fractal oscillation, reverb, equalization and others. some of caps is an improvement over previous efforts (the rewritten amplifier emulation plugins for example do 8x oversampling using polyphase filters, for much cleaner sound) but most of the plugins are ex nihilo creations. for those with an interest in DSP effects but no time or opportunity to run the plugins, the data sheets provided through the above document may be interesting. enjoy, tim
Re: [linux-audio-dev] caps 0.1.0
pleased to announce the initial release of the caps audio plugin suite under the GNU public license. quoting http://quitte.de/dsp/caps.html : % make make: *** No rule to make target `ladspa.h', needed by `dep'. Stop.
Re: [linux-audio-dev] caps 0.1.0
pleased to announce the initial release of the caps audio plugin suite under the GNU public license. quoting http://quitte.de/dsp/caps.html : % make make: *** No rule to make target `ladspa.h', needed by `dep'. Stop. sorry, and thanks. $ cd caps-0.1.0 $ wget -O - http://www.ladspa.org/ladspa_sdk/ladspa.h.txt ladspa.h or download version 0.1.1 (up now). Using 0.1.1 (tried on redhat 9 and fedora core 1): g++ -Wall -O6 -ffast-math -funroll-loops -march=`uname -m` -mcpu=`uname -m` -I/usr/local/include -DVERSION=\0.1.1\ -I/usr/local/include -c Cabinet.cc Descriptor.h: In member function `void DescriptorT::autogen() [with T = Cabinet]': Cabinet.cc:168: instantiated from here Descriptor.h:36: type `Cabinet' is not a base type for type ` DescriptorCabinet' make: *** [Cabinet.o] Error 1 -- Fernando
Re: [linux-audio-dev] caps 0.1.0
[Fernando Pablo Lopez-Lezcano] Using 0.1.1 (tried on redhat 9 and fedora core 1): g++ -Wall -O6 -ffast-math -funroll-loops -march=`uname -m` -mcpu=`uname -m` -I/usr/local/include -DVERSION=\0.1.1\ -I/usr/local/include -c Cabinet.cc Descriptor.h: In member function `void DescriptorT::autogen() [with T = Cabinet]': Cabinet.cc:168: instantiated from here Descriptor.h:36: type `Cabinet' is not a base type for type ` DescriptorCabinet' make: *** [Cabinet.o] Error 1 drat. what does $ g++ --version say, please? i'm using gcc 2.95.4, and afraid it's a compiler issue. unfortunately i don't seem to have a more recent version at my disposal. tim
Re: [linux-audio-dev] caps 0.1.0
[Tim Goetze] [Fernando Pablo Lopez-Lezcano] Using 0.1.1 (tried on redhat 9 and fedora core 1): g++ -Wall -O6 -ffast-math -funroll-loops -march=`uname -m` -mcpu=`uname -m` -I/usr/local/include -DVERSION=\0.1.1\ -I/usr/local/include -c Cabinet.cc Descriptor.h: In member function `void DescriptorT::autogen() [with T = Cabinet]': Cabinet.cc:168: instantiated from here Descriptor.h:36: type `Cabinet' is not a base type for type ` DescriptorCabinet' make: *** [Cabinet.o] Error 1 drat. what does $ g++ --version say, please? i'm using gcc 2.95.4, and afraid it's a compiler issue. unfortunately i don't seem to have a more recent version at my disposal. i dug up a copy of g++-3.0 and it does fail with a different error, but in the same line. can you try the attached patch please? tim--- caps-0.1.1/Descriptor.h Tue Feb 17 23:57:33 2004 +++ Descriptor.hWed Feb 18 21:03:48 2004 @@ -33,19 +33,11 @@ void autogen() { - PortCount = sizeof (T::ports) / sizeof (LADSPA_Data *); + PortCount = (sizeof (T::port_info) / sizeof (PortInfo)); char ** names = new char * [PortCount]; LADSPA_PortDescriptor * desc = new LADSPA_PortDescriptor [PortCount]; LADSPA_PortRangeHint * ranges = new LADSPA_PortRangeHint [PortCount]; - - int port_infos = (int) (sizeof (T::port_info) / sizeof (PortInfo)); - if (PortCount != (ulong) port_infos) - { - fprintf (stderr, %d ports, %d port_infos\n, (int) PortCount, port_infos); - assert (0); - } - assert (PortCount == (ulong) port_infos); for (int i = 0; i (int) PortCount; ++i) {
Re: [linux-audio-dev] caps 0.1.0
I read: can you try the attached patch please? works with gcc-3.2, but not 3.3: In file included from Eq.h:4, from Eq.cc:31: dsp/Eq.h:167:46: missing terminating character dsp/Eq.h:181:57: missing terminating character dsp/Eq.h:185:46: missing terminating character dsp/Eq.h:194:57: missing terminating character dsp/Eq.h:199:38: missing terminating character dsp/Eq.h:205:82: missing terminating character make: *** [Eq.o] Error 1 regards, x -- [EMAIL PROTECTED] Postmodernism is german romanticism with better http://pilot.fm/special effects. (Jeff Keuss / via ctheory.com)
Re: [linux-audio-dev] caps 0.1.0
I read: can you try the attached patch please? works with gcc-3.2, but not 3.3: In file included from Eq.h:4, from Eq.cc:31: dsp/Eq.h:167:46: missing terminating character dsp/Eq.h:181:57: missing terminating character dsp/Eq.h:185:46: missing terminating character dsp/Eq.h:194:57: missing terminating character dsp/Eq.h:199:38: missing terminating character dsp/Eq.h:205:82: missing terminating character make: *** [Eq.o] Error 1 ah, glad to hear it gets better, thanks. to cure this, can you try the patch attached please? tim--- caps-0.1.1/dsp/Eq.h Mon Feb 16 16:58:56 2004 +++ dsp/Eq.hWed Feb 18 21:45:38 2004 @@ -10,10 +10,6 @@ #ifndef _DSP_EQ_H_ #define _DSP_EQ_H_ -#ifndef __i386__ -# undef USE_SSE -#endif - namespace DSP { /* BANDS must be a multiple of 4 to enable the use of SSE instructions. @@ -101,7 +97,6 @@ a[i] = b[i] = c[i] = 0; } -#ifndef USE_SSE /* per-band recursion: * y = 2 * (a * (x - x[-2]) + c * y[-1] - b * y[-2]) */ @@ -127,86 +122,6 @@ return r; } -#else /* do USE_SSE */ - /* parallelized version of above. -* -* FIXME: make asm work with -funroll-loops and the BANDS parameter -* -* per-band recursion: -* y = 2 * (a * (x - x[-2]) - b * y[-2] + c * y[-1]) -*/ - d_sample process (d_sample s) - { - int z1 = h, z2 = h ^ 1; - - float * y1 = y + z1 * BANDS; - float * y2 = y + z2 * BANDS; - - /* load 0,0,0,0 into xmm4, holding the total sum */ - asm (xorps %xmm4, %xmm4); - - /* load 2,2,2,2 into xmm3 */ - asm (movaps (%0), %%xmm3 : : p (two)); - - /* likewise, load (x - x[-2]) into xmm0 */ - float x_x2 = s - x[z2]; - asm (movss %0, %%xmm0 : : m (x_x2)); - asm (shufps $0, %xmm0, %xmm0); - - x[z2] = s; - h = z2; - - /* this fails to compile with -funroll-loops */ - for (int i = 0; i BANDS; i += 4) - { - /* esi = y2 + i (we need it later) */ - asm (mov %0, %%esi : : p (y2 + i) : %esi); - /* edi = y1 + i (we need it later) */ - asm (mov %0, %%edi : : p (y1 + i) : %edi); - - asm ( - movaps %%xmm0, %%xmm1 /* x - x[-2] into xmm1 */ - movl %0, %%eax /* a + i into eax */ - mulps (%%eax), %%xmm1 /* accu *= (x - x[-2]) */ - addl %1, %%eax /* eax += BANDS * sizeof (float) */ - movaps (%%esi), %%xmm2 /* y[-2] into xmm2 */ - mulps (%%eax), %%xmm2 /* xmm2 *= b */ - addl %1, %%eax /* eax += BANDS * sizeof (float) */ - subps %%xmm2, %%xmm1/* accu -= xmm2 */ - movaps (%%edi), %%xmm2 /* y[-1] into xmm2 */ - mulps (%%eax), %%xmm2 /* xmm2 *= c + i */ - addps %%xmm2, %%xmm1 /* accu += xmm2 */ - mulps %%xmm3, %%xmm1 /* accu *= 2 */ - movaps %%xmm1, (%%esi) /* store accu into y */ -: - : p (a + i), i (BANDS * sizeof (float)) - : %eax, %esi, %edi); - - asm ( - mov %0, %%eax /* eax = gain + i */ - mov %%eax, %%ebx
Re: [linux-audio-dev] caps 0.1.0
On Wed, 2004-02-18 at 12:50, Tim Goetze wrote: I read: can you try the attached patch please? works with gcc-3.2, but not 3.3: In file included from Eq.h:4, from Eq.cc:31: dsp/Eq.h:167:46: missing terminating character dsp/Eq.h:181:57: missing terminating character dsp/Eq.h:185:46: missing terminating character dsp/Eq.h:194:57: missing terminating character dsp/Eq.h:199:38: missing terminating character dsp/Eq.h:205:82: missing terminating character make: *** [Eq.o] Error 1 ah, glad to hear it gets better, thanks. to cure this, can you try the patch attached please? With the two patches (patch and patch-two) it builds on RH9, RH8.0, RH7.3 and FC1 (woohoo! :-) I get this warning: Reverb.cc: In constructor `Plate::Plate(double)': Reverb.cc:232: warning: passing `double' for argument 2 of `void ModLattice::init(int, int)' Reverb.cc:233: warning: passing `double' for argument 2 of `void ModLattice::init(int, int)' Two details. A make clean leaves the sources in a non-compilable state, a subsequent make gets me this: make: *** No rule to make target `/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h', needed by `Cabinet.o'. Stop. The location of ladspa.h is assumed to be /usr/local/include, that is not true on my systems (/usr/include). Not a big deal, easily fixed by redoing the link at build time. -- Fernando
Re: [linux-audio-dev] caps 0.1.0
[Fernando Pablo Lopez-Lezcano] With the two patches (patch and patch-two) it builds on RH9, RH8.0, RH7.3 and FC1 (woohoo! :-) this makes me feel sooo relieved. thanks for taking the extra time to build on 4 different systems. I get this warning: Reverb.cc: In constructor `Plate::Plate(double)': Reverb.cc:232: warning: passing `double' for argument 2 of `void ModLattice::init(int, int)' Reverb.cc:233: warning: passing `double' for argument 2 of `void ModLattice::init(int, int)' this warning is fixed in the latest, too. Two details. A make clean leaves the sources in a non-compilable state, a subsequent make gets me this: make: *** No rule to make target `/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h', needed by `Cabinet.o'. Stop. fixed now (by stripping dependency info from the makefile on make clean). The location of ladspa.h is assumed to be /usr/local/include, that is not true on my systems (/usr/include). Not a big deal, easily fixed by redoing the link at build time. the tarball now has ladspa.h in its full glory, so this won't be a problem anymore. many thanks for your patience in sorting all this out, also to Paul and CK. my apologies offered for all the compiling trouble, i hope you can still enjoy the actual contents of the package :) tim latest is http://quitte.de/dsp/caps_0.1.3.tar.gz -
Re: [linux-audio-dev] caps 0.1.0
for the record, caps 0.1.3 builds without problems on suse 9.0 / ia32. too tired to test the plugs tonight Tim Goetze wrote: many thanks for your patience in sorting all this out, also to Paul and CK. my apologies offered for all the compiling trouble, i hope you can still enjoy the actual contents of the package :) tim latest is http://quitte.de/dsp/caps_0.1.3.tar.gz - -- The handles of a craftsman's tools bespeak an absolute simplicity, the plainest forms affording the greatest range of possibilities for the user's hand. That which is overdesigned, too highly specific, anticipates outcome; the anticipation of outcome guarantees, if not failure, the absence of grace. - William Gibson, All Tomorrow's Parties Jörn Nettingsmeier Kurfürstenstr 49, 45138 Essen, Germany http://spunk.dnsalias.org (my server) http://www.linuxaudiodev.org (Linux Audio Developers)