Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Dave Gamble
While I think of it, could I just throw in that double precision analysis is MUCH more interesting to anyone implementing on a modern CPU? For embedded stuff, single precision and fixed are obviously the big options (though I can't remember when/why I would have tried implementing a

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Tim Blechmann
Actually, I'll go one further: In 2013, single precision is just time wasting. It's a pathological case for analysis, but it shouldn't represent real-world usage. I'm reminded of a conversation I had with my PhD supervisor 12 years ago, when showing him some source which caused him to

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Ross Bencina
On 12/11/2013 7:40 PM, Tim Blechmann wrote: some real-world benchmarks from the csound community imply a performance difference of roughly 10% [1]. Csound doesn't have a facility for running multiple filters in parallel though does it? not even 2 in parallel for stereo. 4 biquads in

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Dave Gamble
On Tuesday, November 12, 2013, Vadim Zavalishin wrote: On 12-Nov-13 09:05, Dave Gamble wrote: Actually, I'll go one further: In 2013, single precision is just time wasting. It's a pathological case for analysis, but it shouldn't represent real-world usage. I'm reminded of a conversation I

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Vadim Zavalishin
On 12-Nov-13 09:53, Dave Gamble wrote: PS. Time-varying performance is another word. Nonlinearities is the third one. Not criticisms I'm at all familiar with, I'm afraid. Can you expand? As we are talking about inferiority of DF compared to ZDF, I just mentioned the other two, which are

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Dave Gamble
Heya, On Tuesday, November 12, 2013, Vadim Zavalishin wrote: On 12-Nov-13 09:53, Dave Gamble wrote: PS. Time-varying performance is another word. Nonlinearities is the third one. Not criticisms I'm at all familiar with, I'm afraid. Can you expand? As we are talking about inferiority of

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Vadim Zavalishin
On 12-Nov-13 10:01, Dave Gamble wrote: Because switching from double to float will bring extremely small performance gains in CPU cost, and potentially sizeable problems with numerical issues. I'd be very careful with statements like that. There are people with exactly the opposite

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Nigel Redmon
Hi Ross, The exact answer depends on the exact hardware. It's pretty trivial on the 56k, of course (the 56-bit accumultor works automatically with the MAC instruction, quantization happens automatically when saving to 24-bit, just take the difference and feed it back for the noise shaping). If

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Dave Gamble
On Tuesday, November 12, 2013, Vadim Zavalishin wrote: On 12-Nov-13 10:01, Dave Gamble wrote: Because switching from double to float will bring extremely small performance gains in CPU cost, and potentially sizeable problems with numerical issues. I'd be very careful with statements like

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Vadim Zavalishin
On 12-Nov-13 10:10, Dave Gamble wrote: So let me go out on a limb here: if you take some single precision code and up it to double, and things get WORSE then there is something very strange about your original code that merits investigation. It's very easy. As I mentioned in my other email,

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Nigel Redmon
In some cases error feedback methods for floating point would be interesting if they exist. The problem is that the error is lost in the floating point hardware—you put in two floats and get back float of the same size. Something fell into a bit bucket that you don't have access to.

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Tim Blechmann
One word: SIMD well, when benchmarking my performance code, about 2% of the CPU time is spent in vector code, while about 60% is spent in scalar filter code. Hi Tim I can't believe vector code is running 30 times faster than the scalar code :-D :-D :-D scalar/vector parts of the same

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Oskari Tammelin
On Tue, 12 Nov 2013 10:40:25 +0200, Tim Blechmann t...@klingt.org wrote: well, when benchmarking my performance code, about 2% of the CPU time is spent in vector code, while about 60% is spent in scalar filter code. of course one can run 4 parallel single-precision filters or 2 double-precision

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Didier Dambrin
IMHO, a piece of DSP code is generally used in something else, rarely on its own. Whether it ends up as part of a bigger project or in a plugin, it'd better not waste CPU. All I know is that SIMD is made for DSP, whether it's sound or image processing it's where most of the CPU goes, so if

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Dave Gamble
As an alternative perspective on this, consider the idea that creating a shipping piece of DSP code requires two (hopefully) distinct phases- 1. Understanding what you're doing, and making it work. 2. Optimising it for a production environment. I claim that introducing SIMD in 1 is just over

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread STEFFAN DIEDRICHSEN
On 12.11.2013, at 10:16, Vadim Zavalishin vadim.zavalis...@native-instruments.de wrote: It's very easy. As I mentioned in my other email, switching from float to double halves the number of available SIMD channels, which means you need to run your code twice as many times. Right. But with

[music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Theo Verelst
Suppose we take a simple 1st order low-pass (or high-pass) filter in the digital domain, and compare it with the corresponding electronic implementation, preferably as a network theory example, ignoring electro-magnetics, Johnson noise, and physical delay of currents through wires, which are

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Dave Gamble
Hi, I'm going to have a go at answering, but there will be points where I'm not sure exactly what you're saying. I'll be as clear as possible and request clarification. On Tue, Nov 12, 2013 at 3:56 PM, Theo Verelst theo...@theover.org wrote: Suppose we take a simple 1st order low-pass (or

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread vadim.zavalishin
On Tue, 12 Nov 2013 16:56:27 +0100, Theo Verelst wrote: Anyone want to explain to me what their most or least favorite implementation of thus simple, single order filter without feedback in the digital domain will do when we feed it with an impulse, a shifted step (occurring between samples),

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Dave Gamble
On Tue, Nov 12, 2013 at 4:48 PM, vadim.zavalishin vadim.zavalis...@native-instruments.de wrote: PS. Speaking of EE, I believe this simple RC filter *does* have feedback, from the capacitor's voltage via the resistor's voltage to the capacitor's charging current. Which is also immediately

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Theo Verelst
Dave Gamble wrote: On Tue, Nov 12, 2013 at 3:56 PM, Theo Verelsttheo...@theover.org wrote: Suppose . So lets take the equivalent of this simple filter in the digital domain (e.g. as function of a z^-1 network, and see what happens. Well, there's obviously no direct equivalent. It comes

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Theo Verelst
Dave Gamble wrote: On Tue, Nov 12, 2013 at 4:48 PM, vadim.zavalishin vadim.zavalis...@native-instruments.de wrote: PS. Speaking of EE, I believe this simple RC filter *does* have feedback, from the capacitor's voltage via the resistor's voltage to the capacitor's charging current. Which is

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Dave Gamble
Hi, On Tue, Nov 12, 2013 at 4:52 PM, Theo Verelst theo...@theover.org wrote: Dave Gamble wrote: On Tue, Nov 12, 2013 at 3:56 PM, Theo Verelsttheo...@theover.org wrote: Suppose . So lets take the equivalent of this simple filter in the digital domain (e.g. as function of a z^-1

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Dave Gamble
Heya, On Tue, Nov 12, 2013 at 4:54 PM, Theo Verelst theo...@theover.org wrote: vadim.zavalishin wrote: On Tue, 12 Nov 2013 16:56:27 +0100, Theo Verelst wrote: Anyone want to explain to me what their most or least favorite implementation of thus simple, single order filter without

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Dave Gamble
On Tue, Nov 12, 2013 at 4:56 PM, Theo Verelst theo...@theover.org wrote: Dave Gamble wrote: On Tue, Nov 12, 2013 at 4:48 PM, vadim.zavalishin vadim.zavalis...@native-instruments.de wrote: PS. Speaking of EE, I believe this simple RC filter *does* have feedback, from the capacitor's

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread vadim.zavalishin
On Tue, 12 Nov 2013 17:54:49 +0100, Theo Verelst wrote: vadim.zavalishin wrote: I'm not sure this question has very large practical significance within music DSP context (although I can admit that sometimes it can have one). Most of the time you are concerned just with the frequency response of

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread vadim.zavalishin
On Tue, 12 Nov 2013 17:54:49 +0100, Theo Verelst wrote: To me, that is for instance why it all sounds so horribly distorted, so, in the phase of the advent of new Electronics with New (better) Converters, its spells out the **essence** of my comments, so there you go. All is one too strong

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread vadim.zavalishin
On Tue, 12 Nov 2013 17:10:15 +, Dave Gamble wrote: As soon as I see a pole in the transfer function, I yell FEEDBACK and run around the room waving my arms. ;) In doing this, are you trying to compute the residue at the pole by using the Cauchy integral formula? Sorry, couldn't resist

Re: [music-dsp] A rephrasing of some of my sampling theory related concerns

2013-11-12 Thread Dave Gamble
On Tue, Nov 12, 2013 at 5:22 PM, vadim.zavalishin vadim.zavalis...@native-instruments.de wrote: On Tue, 12 Nov 2013 17:10:15 +, Dave Gamble wrote: As soon as I see a pole in the transfer function, I yell FEEDBACK and run around the room waving my arms. ;) In doing this, are you

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Lubomir I. Ivanov
On 6 November 2013 11:45, Andrew Simper a...@cytomic.com wrote: Here is an updated version of the optimised trapezoidal integrated svf which bundles up all previous state into equivalent currents for the capacitors, which is how I solve non-linear circuits (although this solution is just the

Re: [music-dsp] Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Theo Verelst
Lubomir I. Ivanov wrote: On 6 November 2013 11:45, Andrew Simper a...@cytomic.com wrote: ... actually trapezoidal is all over quantum mechanics because, say in comparison to midpoint you will get those control and state variable intermediates that mess calculation quite badly in cases that you

Re: [music-dsp] R: Trapezoidal integrated optimised SVF v2

2013-11-12 Thread Andrew Simper
On 10 November 2013 18:12, Dominique Würtz dwue...@gmx.net wrote: Am Freitag, den 08.11.2013, 11:03 +0100 schrieb Marco Lo Monaco: I think a crucial point is that besides replicating steady state response of your analog system, you also want to preserve the time-varying behavior (modulating

[music-dsp] Implicit integration is an important term, ZDF is not

2013-11-12 Thread Andrew Simper
Now for all those people scratching their heads of the whole Zero Delay Feedback, here is the deal: Any implicit integration method applied to numerically integrate something is by its very definition using Zero Delay Feedback, linear or non-linear this is the case. You can completely ignore that