Csound Csound-dev Csound-tekno Search About

Moog LPF

Date1998-09-05 15:58
FromJosep M Comajuncosas
SubjectMoog LPF
Hi all
I´ve attached the orc code for the Moog resonant Lowpass implementation
as described in Stilson&Smith. It sound great and the filter looks
robust.
Enjoy it!


;ORCHESTRA
sr = 44100
kr = 44100
ksmps = 1

instr 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; bandlimited sawtooth generator
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ibound = sr/2
kfreq  = 100

apulse1 buzz 1, kfreq, ibound/kfreq, 1
asawdc filter2 apulse1, 1, 1, 1, -.99; leaky integrator
asaw = asawdc - .5

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Resonant filter (4-pole LPF)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;You can replace this filter with any other you like

ax = asaw

;cutoff and resonance envelopes
;quick test curves
kres init p4
kfco expseg p6, p3/2, p5, p3/2, p6


ay1 init 0
ay2 init 0
ay3 init 0
ay4 init 0

kfcon = kfco/(sr/2); use freq normalized DC to Nyquist
kp tablei kfcon, 21, 1; (approximated) tuning table
kscale tablei (kp+1)/2, 20, 1; adjust feedback (approximation)
kk = kres*kscale

; inverted feedback for corner peaking
ax = ax - kk*ay4

; 4 cascaded onepole filters (bilinear transform)
ax1 delay1 ax
ay1  = ax * (kp+1)/2 + ax1 * (kp+1)/2 - kp*ay1

ay11 delay1 ay1
ay2  = ay1 * (kp+1)/2 + ay11 * (kp+1)/2 - kp*ay2

ay21 delay1 ay2
ay3  = ay2 * (kp+1)/2 + ay21 * (kp+1)/2 - kp*ay3

ay31 delay1 ay3
ay4  = ay3 * (kp+1)/2 + ay31 * (kp+1)/2 - kp*ay4

; clipper/distorter via waveshaping
; to allow autooscillation without overdriving
; certainly more efficient with table look-up,
; but it didn´t work. Any idea?
ay4 = ay4-ay4*ay4*ay4/6; kind of bandlimited sigmoid

;filter output
; envelope
kenv linen 1, .1,p3, .1
out ay4*20000*kenv
endin

;SCORE

; a sine wave
f1 0 8193 10 1

; feedback adjusting curve
f20 0 8193 -25 0 4 8192 1

; tuning curve
f21 0 8193 -27 0 -1 2048 -.22 4096 .4 6144 .83 7168 .92 8192 1

;      resonance max fco initial & final fco
i1 0 1   .1       1000     200
i1 1 5    .8     5000    500
i1 6 5   .5      10000      50
i1 11 5  .99        8000     20
e







Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17490;
          5 Sep 98 19:33 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa18470;
          5 Sep 98 19:32 BST
Received: (qmail 5263 invoked from network); 5 Sep 1998 18:32:55 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 5 Sep 1998 18:32:55 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (TAA10904); Sat, 5 Sep 1998 19:30:30 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Sep 1998 19:30:19 +0100
Received: from pop01.globecomm.net [206.253.129.185] by hermes via ESMTP (TAA07834); Sat, 5 Sep 1998 19:30:17 +0100 (BST)
Received: from iname.com (ppp170.117.mmtl.videotron.net [207.253.117.170]) by pop01.globecomm.net (8.9.0/8.8.0) with ESMTP id OAA05002; Sat, 5 Sep 1998 14:30:00 -0400 (EDT)
Message-ID: <35F183D2.E783446@iname.com>
Date: Sat, 05 Sep 1998 14:32:50 -0400
From: Antoine Lefebvre 
X-Mailer: Mozilla 4.04 [en] (X11; I; Linux 2.0.34 i586)
MIME-Version: 1.0
To: Nicola Bernardini 
CC: Csound mailing list 
Subject: Re: Bug in OSS code? 
References: 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Nicola Bernardini wrote:

> On Thu, 3 Sep 1998, Larry Troxler wrote:
>
> [snip - we're talking about 6 seconds latency on real-time MIDI playing]
> > Sorry the above is so muddled. Hopefully Dave Phillips or someone else
> > working on the Linux version could point you to the exact source code to
> > check.
> >
> > OTOH, If you just recently downloaded the current Linux version, then
> > this should be already fixed, so maybe your problem is something else.
>
> I have no solution to this problem right now, but I am compiling a list
> of TODO things for linux which includes reported bugs (to be fixed) and
> I have included you mail in it (in the hope a kind sould finds a solution
> to the problem).

The problem of the 6 seconds delay in real time MIDI playing was not abug of the OSS
code. I finally find that it was a mistake in my use of csound
orchestra and command line.

Please, don't put this problem in the TODO list.

Antoine





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17568;
          5 Sep 98 20:28 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa23517;
          5 Sep 98 20:28 BST
Received: (qmail 19344 invoked from network); 5 Sep 1998 19:28:41 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 5 Sep 1998 19:28:41 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (UAA04179); Sat, 5 Sep 1998 20:26:31 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Sep 1998 20:26:20 +0100
Received: from monsoon.dial.pipex.net [158.43.128.69] by hermes via SMTP (UAA23930); Sat, 5 Sep 1998 20:26:20 +0100 (BST)
Received: (qmail 7571 invoked from network); 5 Sep 1998 19:26:23 -0000
Received: from userl054.uk.uudial.com (HELO dial.pipex.com) (193.149.73.121)
  by smtp.dial.pipex.com with SMTP; 5 Sep 1998 19:26:23 -0000
Message-ID: <35F1908E.D9364E79@dial.pipex.com>
Date: Sat, 05 Sep 1998 20:27:10 +0100
From: Gareth Whittock 
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Csound mailing list 
Subject: examples of orcs and scores
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Is there a repository of orcs and scores for a learner like myself to
unpick in order to understand csound? I tried the Amsterdam site but
can't seem to access it.
Gareth Whittock


Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17630;
          5 Sep 98 21:25 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa28268;
          5 Sep 98 21:24 BST
Received: (qmail 12632 invoked from network); 5 Sep 1998 20:24:57 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 5 Sep 1998 20:24:57 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA02101); Sat, 5 Sep 1998 21:19:54 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Sep 1998 21:19:46 +0100
Received: from 0@concord.televar.com [208.8.131.83] by hermes via ESMTP (VAA20682); Sat, 5 Sep 1998 21:19:44 +0100 (BST)
Received: from televar.com (eburguser026.televar.com [208.8.152.28])
	by concord.televar.com (8.8.8/8.8.8) with ESMTP id NAA01261;
	Sat, 5 Sep 1998 13:19:43 -0700 (PDT)
Message-ID: <35F1AC20.40DE6BD2@televar.com>
Date: Sat, 05 Sep 1998 13:24:49 -0800
From: Mark Polishook 
Reply-To: polishoo@cwu.edu
X-Mailer: Mozilla 4.03 (Macintosh; I; PPC)
MIME-Version: 1.0
To: Gareth Whittock , csound@maths.ex.ac.uk
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.stork
Subject: Re: examples of orcs and scores
References: <35F1908E.D9364E79@dial.pipex.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

> Is there a repository of orcs and scores for a learner like myself to
> unpick in order to understand csound?

A excellent Csound tutorial exists at:
         
http://www.sfu.ca/sca/Manuals/Csound/CsoundIndex.html#Hamel

**************************************
Mark Polishook
Assistant Professor of Composition

Music Department
Central Washington University
Ellensburg, WA 98926

e-mail: polishoo@cwu.edu
www: http://www.cwu.edu/~music/composition
tel.: 509-963-1245
fax: 509-963-1239


Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa17952;
          6 Sep 98 1:26 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa20184;
          6 Sep 98 1:25 BST
Received: (qmail 19450 invoked from network); 6 Sep 1998 00:26:03 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 6 Sep 1998 00:26:03 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (BAA01459); Sun, 6 Sep 1998 01:21:33 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Sep 1998 01:21:22 +0100
Received: from endeavor.flash.net [209.30.0.40] by hermes via ESMTP (BAA01761); Sun, 6 Sep 1998 01:21:20 +0100 (BST)
Received: from flash.net (p16.amax6.dialup.ftw1.flash.net [209.30.15.16])
	by endeavor.flash.net (8.8.8/8.8.5) with ESMTP id TAA15870;
	Sat, 5 Sep 1998 19:21:19 -0500 (CDT)
Message-ID: <35F1D585.37FB7062@flash.net>
Date: Sat, 05 Sep 1998 19:21:26 -0500
From: pete moss 
Organization: pete moss GmbH
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
To: Larry Troxler 
CC: csound@maths.ex.ac.uk
Subject: Re: [off-topic] spam from doctoraudio.com?
References: <35F08E83.30E51FBA@westnet.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

yeah, i get them and then delete them.  i didnt realize that others on the
list were getting them.  i guessed this guy picked up my address from a
web site, or browser cookie or something.  do we have a rogue on the list
selling addresses to the enemy?

pete



Larry Troxler wrote:

> Just wondering if anyone else has been receiving these UCE's from the
> doctoraudio.com domain, and what if anything, have you been able to do
> about it?
> Has anyone got anywhere in tracking it down, legal action, etc?
>
> Larry
>
>
> --  Larry Troxler --  lt@westnet.com  --  Patterson, NY USA  --





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa18593;
          6 Sep 98 10:27 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa08715;
          6 Sep 98 10:26 BST
Received: (qmail 9616 invoked from network); 6 Sep 1998 09:27:00 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
  by mercury.bath.ac.uk with SMTP; 6 Sep 1998 09:27:00 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA10048); Sun, 6 Sep 1998 10:16:13 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Sep 1998 10:16:02 +0100
Received: from mailout05.btx.dtag.de [194.25.2.153] by hermes via SMTP (KAA22961); Sun, 6 Sep 1998 10:16:00 +0100 (BST)
Received: from fwd04.btx.dtag.de (fwd04.btx.dtag.de [194.25.2.164])
	by mailout05.btx.dtag.de with smtp 
	id 0zFau3-0007on-00; Sun, 6 Sep 1998 11:14:35 +0200
Received: from pC19F12EE.dip.t-online.de (0402102285-0001(btxid)@[193.159.18.238]) 
	by fwd04.btx.dtag.de with smtp
	id ; Sun, 6 Sep 1998 11:14:25 +0200
To: polishoo@cwu.edu
Cc: Gareth Whittock , csound@maths.ex.ac.uk
Subject: Re: examples of orcs and scores
Date: Sun, 06 Sep 1998 09:15:47 GMT
Message-ID: <35f25264.1808792@pop.btx.dtag.de>
References: <35F1908E.D9364E79@dial.pipex.com> <35F1AC20.40DE6BD2@televar.com>
In-Reply-To: <35F1AC20.40DE6BD2@televar.com>
X-Mailer: Forte Agent 1.5/32.452
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Sender: 0402102285-0001@t-online.de
From: Jens Reimer 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

On Sat, 05 Sep 1998 13:24:49 -0800, you wrote:

>> Is there a repository of orcs and scores for a learner like myself to
>> unpick in order to understand csound?
>
>A excellent Csound tutorial exists at:
>         
>http://www.sfu.ca/sca/Manuals/Csound/CsoundIndex.html#Hamel
>
true, but only online.
do you know any offline tutorial (zipped or doc or anything like this..)

Und Tschüss
Jens Reimer

Email:
jens.reimer@t-online.de