Csound Csound-dev Csound-tekno Search About

How to do FIR and IIR filtering in Csound

Date1998-07-21 10:29
Fromjames@maths.ex.ac.uk
SubjectHow to do FIR and IIR filtering in Csound
Hi All

	We are looking at doing non clasical shaped filtering, i.e. multi
pole arbituary filtering.

	Also if possible how would it do this in real time.

	Thanks for the help

Rathe

------------------------------------------------------------------------------
Rathe Hollingum (member of the CGGB)
home-page at: http://www.york.ac.uk/~rh113/
Alternative e-mail address: rathe@dial.pipex.com




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02157;
          21 Jul 98 16:05 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa22672;
          21 Jul 98 16:05 BST
Received: (qmail 25678 invoked from network); 21 Jul 1998 15:05:28 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 21 Jul 1998 15:05:28 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (QAA02134); Tue, 21 Jul 1998 16:00:04 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 21 Jul 1998 15:59:51 +0100
Received: from Thuban.AC.HMC.Edu [134.173.53.8] by hermes via ESMTP (PAA05863); Tue, 21 Jul 1998 15:59:46 +0100 (BST)
Received: from [134.173.38.61] (Spjut.Eng.HMC.Edu)
 by THUBAN.AC.HMC.EDU (PMDF V5.1-7 #28820)
 with ESMTP id <01IZNLH4RDRY8WX5ZF@THUBAN.AC.HMC.EDU> for
 csound@maths.ex.ac.uk; Tue, 21 Jul 1998 07:59:44 PDT
Date: Tue, 21 Jul 1998 08:00:59 -0700
From: Erik Spjut 
Subject: Re: How to do FIR and IIR filtering in Csound
In-reply-to: <4121.199807210929@zeno.maths.exeter.ac.uk>
X-Sender: spjut@thuban.ac.hmc.edu
To: rh113@york.ac.uk, csound@maths.ex.ac.uk
Message-id: 
MIME-version: 1.0
Content-type: text/plain; charset="us-ascii"
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

See filter2, kfilter2, zfilter2 in the Csound HTML manual for the most
general method to do arbitrary filters. For reasonable filter sizes they
will run in real time. There are lots of other ways, too. Check out lpread,
lpreson, lfreson  in the Csound manual. Also check out Russell Pinkston's
orc's and sco's. That should at least get you started.

At 10:29 AM +0100 7/21/98, james@maths.ex.ac.uk wrote:
>Hi All
>
>	We are looking at doing non clasical shaped filtering, i.e. multi
>pole arbituary filtering.
>
>	Also if possible how would it do this in real time.

-------------------------------------------------------------------------------
Erik Spjut (rhymes with cute) - Acting Director,The Center for Design Education
and/or Associate Professor of Engineering
Harvey Mudd College, Claremont, CA 91711  USA
Erik_Spjut@hmc.edu      Ph & Voice mail (909) 607-3890      Fax (909) 621-8967




Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02485;
          21 Jul 98 18:24 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa01863;
          21 Jul 98 18:24 BST
Received: (qmail 23550 invoked from network); 21 Jul 1998 17:23:46 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 21 Jul 1998 17:23:46 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA24454); Tue, 21 Jul 1998 18:21:01 +0100 (BST)
Received: from zeno.maths.exeter.ac.uk by maths.ex.ac.uk; Tue, 21 Jul 1998 18:20:51 +0100
From: james@maths.ex.ac.uk
Message-Id: <6691.199807211720@zeno.maths.exeter.ac.uk>
Subject:  PMAX question
To: csound@maths.ex.ac.uk
Date: Tue, 21 Jul 1998 18:20:51 +0100 (BST)
Reply-To: jreinsel@hotmail.com
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi,

I was trying to compile some files and I am getting a PMAX warning in 
during compilation and my resultant file has alot clips in the sound. If 
any one could please tell me what can be done about this and exactly 
what PMAX is I would greatly appreciate it. Thanks for all your time.

Joseph Reinsel

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02498;
          21 Jul 98 18:26 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa01896;
          21 Jul 98 18:26 BST
Received: (qmail 23771 invoked from network); 21 Jul 1998 17:26:35 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 21 Jul 1998 17:26:35 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA12303); Tue, 21 Jul 1998 18:23:21 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 21 Jul 1998 18:23:13 +0100
Received: from ccrma.Stanford.EDU [36.49.0.84] by hermes via ESMTP (SAA13742); Tue, 21 Jul 1998 18:23:10 +0100 (BST)
Received: from ccrma.stanford.edu ([207.97.74.55])
	by ccrma.stanford.edu (8.8.8/8.8.8) with ESMTP id KAA12032;
	Tue, 21 Jul 1998 10:21:42 -0700 (PDT)
Message-ID: <35B4CE5D.392C9715@ccrma.stanford.edu>
Date: Tue, 21 Jul 1998 13:22:37 -0400
From: Tobias Kunze 
X-Mailer: Mozilla 4.05 [en] (Win95; U)
MIME-Version: 1.0
To: ":cecilia" , 
    ":clisp" , 
    ":rosegarden" , 
    ":csound" 
Subject: (no subject)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

help


Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02504;
          21 Jul 98 18:27 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa01901;
          21 Jul 98 18:27 BST
Received: (qmail 23791 invoked from network); 21 Jul 1998 17:27:23 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 21 Jul 1998 17:27:23 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (SAA20150); Tue, 21 Jul 1998 18:23:40 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 21 Jul 1998 18:23:25 +0100
Received: from nicb@ax-nicb.axnet.it [194.184.60.149] by hermes via ESMTP (SAA06543); Tue, 21 Jul 1998 18:23:21 +0100 (BST)
Received: (from nicb@localhost)
	by ax-nicb.axnet.it (8.8.8/8.8.8) id TAA21672;
	Tue, 21 Jul 1998 19:21:19 +0200
Date: Tue, 21 Jul 1998 19:21:17 +0200 (MET DST)
From: Nicola Bernardini 
To: Csound mailing list , 
    Linux Audio Development Mailing list , 
    aimi mailing list 
Subject: [ANNOUNCE] linux csound CVS repository
Message-ID: 
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk



Some of us csound users/hackers, (mostly) working on Linux platforms, have
decided to use some of the source control tools (cvs) in maintaining the
linux sources for csound. In this development tree, we intend to track
fixes and addition to the canonical sources, and add bug fixes,  new opcodes
and functionalities. Likewise, we intend to submit appropriate bugfixes
and enhancements back to the maintainer of the canonical source.
The development tree, known as the csound CVS repository,
can also be accessed anonymously for reading (instructions below).
This way, all interested parties can have access to the latest snapshot
sources and also any intermediate linux release. We will continue to
maintain binary and source distributions in the usual places,
but we plan to be able to closely share the development process with
anybody interested.

Instructions to access the cvs repository (access has been tested
successefully with cvs client/server version 1.9.28, which can be found at
www.cyclic.com):

$ cvs -d ':pserver:anonymous@axdev.axnet.it:/home/nicb/projects/repositories' login

To: Csound mailing list , 
    Linux Audio Development Mailing list , 
    Csound Linux/Unix Development Group , 
    aimi mailing list 
Subject: [ANNOUNCE] linux csound 3.482.1a
Message-ID: 
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


Csound for linux version 3.482.1a is available from the AIMI site in Italy
ftp://musart.dist.unige.it/pub/CSOUND and will shortly be mirrored by
Dave Phillips at his repository ftp://mustec.bgsu.edu/pub/linux. 

In addition to the features of the canonical 3.482 version, this version
contains:

- fixes for diskin bugs [Nicola Bernardini]
- fixes for orchestra parser bugs [Nicola Bernardini and Robin Whittle]
- glibc patches [Robin Whittle and Damien Miller]
- standard autoconf configuration script [Nicola Bernardini and Damien Miller]
  (you know, all the ./configure business...)
- new random generator with 31 bit Park Miller Pseudo Random Number
  Generator - bipolar xbunirand family opcodes added [Robin Whittle]

Standard configuration allows dynamic linking of executables with
small footprint. Versions with and without X11 are also available
and static, debugging and profiling versions can be built easily
out of the distributed sources.

Enjoy,

Nicola
------------------------------------------------------------------------
Nicola Bernardini
E-mail: nicb@axnet.it
 
Re graphics: A picture is worth 10K words -- but only those to describe
the picture.  Hardly any sets of 10K words can be adequately described
with pictures.



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa02696;
          21 Jul 98 20:22 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa08502;
          21 Jul 98 20:22 BST
Received: (qmail 12073 invoked from network); 21 Jul 1998 19:22:10 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 21 Jul 1998 19:22:10 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (UAA17073); Tue, 21 Jul 1998 20:19:19 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Tue, 21 Jul 1998 20:19:10 +0100
Received: from front6.grolier.fr [194.158.96.55] by hermes via ESMTP (UAA04326); Tue, 21 Jul 1998 20:19:08 +0100 (BST)
Received: from club-internet.fr (ppp-112-64.villette.club-internet.fr [194.158.112.64])
	by front6.grolier.fr (8.9.0/MGC-980407-Frontal-No_Relay) with ESMTP id VAA10739;
	Tue, 21 Jul 1998 21:18:09 +0200 (MET DST)
Message-ID: <35B505AA.4485C005@club-internet.fr>
Date: Tue, 21 Jul 1998 21:18:38 +0000
From: Jean-Michel DARREMONT 
Reply-To: jmdbrady@club-internet.fr
X-Mailer: Mozilla 4.04 (Macintosh; I; PPC)
MIME-Version: 1.0
To: jreinsel@hotmail.com, csound 
Subject: Re: PMAX question
References: <6691.199807211720@zeno.maths.exeter.ac.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

> I was trying to compile some files and I am getting a PMAX warning in
> during compilation and my resultant file has alot clips in the sound. If
> any one could please tell me what can be done about this and exactly
> what PMAX is I would greatly appreciate it. Thanks for all your time.
> 
> Joseph Reinsel


PMAX is the maximum number of parameter fields allowed and is currently set to 150.
The only solution is to reduce your amount of pfields to less than 150 or to
recompile CSound with a higher PMAX.

I had this problem and ask the same question to the list. 
J.P Fitch said he is working on the subject in order to make it flexible.


-- 
Jean-Michel DARREMONT


Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04422;
          22 Jul 98 10:59 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa29046;
          22 Jul 98 10:59 BST
Received: (qmail 7853 invoked from network); 22 Jul 1998 09:59:32 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 22 Jul 1998 09:59:32 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA11673); Wed, 22 Jul 1998 10:56:01 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 22 Jul 1998 10:55:37 +0100
Received: from [193.121.99.70] by hermes via ESMTP (KAA18455); Wed, 22 Jul 1998 10:55:36 +0100 (BST)
Received: from turing.hogent.be ([193.190.88.183]) by hurricane.netgate.be
          (post.office MTA v2.0 0813 ID# 0-32575U60) with ESMTP id AAA265
          for ; Wed, 22 Jul 1998 12:00:59 +0200
From: David Schuyeteneer 
To: Csound List 
Subject: [???] distortion without clipping !!!
Date: Wed, 22 Jul 1998 11:45:55 +0200
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Message-ID: <19980722100057216.AAA265@turing.hogent.be>
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

My latest piece in Csound has annoying subtle distortion sometimes however
the signal is **never** out of range !! 
I checked the range in a GUI sample editor and also Csound never said
during
the performance that there was even a single out of range sample.

anyone ?



David.



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04428;
          22 Jul 98 10:59 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa29051;
          22 Jul 98 10:59 BST
Received: (qmail 7864 invoked from network); 22 Jul 1998 09:59:38 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 22 Jul 1998 09:59:38 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA22018); Wed, 22 Jul 1998 10:56:06 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 22 Jul 1998 10:55:39 +0100
Received: from [193.121.99.70] by hermes via ESMTP (KAA08599); Wed, 22 Jul 1998 10:55:38 +0100 (BST)
Received: from turing.hogent.be ([193.190.88.183]) by hurricane.netgate.be
          (post.office MTA v2.0 0813 ID# 0-32575U60) with ESMTP id AAB265
          for ; Wed, 22 Jul 1998 12:01:02 +0200
From: David Schuyeteneer 
To: Csound List 
Subject: [?] Higer order Butterworth filter
Date: Wed, 22 Jul 1998 11:50:40 +0200
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Message-ID: <19980722100057216.AAB265@turing.hogent.be>
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


I know that order of the standard Butterworth filter in Csound is 2, but I
want a
higher (like 6th or 8th...) order Butterworth.....Does it exist or how can
it be
created ???

I read something in the manual about a filter that can be filled in with
custom values
in its "coefficients", but that's a little way out of my knowledge on
digital sound theory..
So a little advice is wanted as I have not a clue how to use those filter
values/poles/coefficients and all that..


David.

Date1998-07-21 16:00
FromErik Spjut
SubjectRe: How to do FIR and IIR filtering in Csound
See filter2, kfilter2, zfilter2 in the Csound HTML manual for the most
general method to do arbitrary filters. For reasonable filter sizes they
will run in real time. There are lots of other ways, too. Check out lpread,
lpreson, lfreson  in the Csound manual. Also check out Russell Pinkston's
orc's and sco's. That should at least get you started.

At 10:29 AM +0100 7/21/98, james@maths.ex.ac.uk wrote:
>Hi All
>
>	We are looking at doing non clasical shaped filtering, i.e. multi
>pole arbituary filtering.
>
>	Also if possible how would it do this in real time.

-------------------------------------------------------------------------------
Erik Spjut (rhymes with cute) - Acting Director,The Center for Design Education
and/or Associate Professor of Engineering
Harvey Mudd College, Claremont, CA 91711  USA
Erik_Spjut@hmc.edu      Ph & Voice mail (909) 607-3890      Fax (909) 621-8967