[LAD] panning thoughts

fons at kokkinizita.net fons at kokkinizita.net
Sun Nov 14 11:37:42 UTC 2010


On Sun, Nov 14, 2010 at 06:14:48AM +0100, Ralf Mardorf wrote:

> Using sin/cos still is very time-consuming?

Define 'very time consuming'.
 
> I do understand The Wiki on German better, but the Wiki on English,
> pardon:
> 
> "Die Tabellierung aller Werte ist angezeigt bei
> geschwindigkeitskritischen Echtzeit-Anwendungen, wenn diese nur eine
> recht kleine Winkelauflösung
> benötigen." (http://de.wikipedia.org/wiki/Sinus_und_Kosinus#Berechnung)
> 
> Loosely translated: Tabulation for rt (when using sin/cos) for small
> angles (what ever a small angle might be) is still faster.

This is not about small angles. More exactly: 'Tabulation is the proper
solution for RT applications when only low resolution of the angle is
required'.

You won't get a single simple answer to a question that has
no such answer. It all depends on:

* The platform. DSP chips don't usually have fast sin() and
  cos() functions while on a modern PC these can be quite 
  fast.

* The application: which will define what is required in 
  terms of
     
  - absolute accuracy
  - relative accuracy
  - resolution
  - other numerical criteria
  
* How the calculation is used:

  - for each sample
  - for each N-th sample
  - for each N-th sample but only when the input changes

  and
 
  - on one or a few channels, or
  - maybe on hundreds of them.

Ciao,


-- 
FA

There are three of them, and Alleline.




More information about the Linux-audio-dev mailing list