Csound Csound-dev Csound-tekno Search About

Csound as filter

Date1999-09-05 15:28
FromTobiah
SubjectCsound as filter
I sometimes use csound in shell scripts, that can
examine a file with sndinfo, write a score and
orchestra in accordance with command line flags,
and proceed to do their synthesis.  Usually there
is an input file to read from, and a resultant
output file.

Once built these scripts can be stowed away, and
one ends up with a nice collection of filters that
look and act like normal programs.

I would love to use csound in this way as a normal
command line filter, using standard in and out.  The
problem is that when using standard in, one can not
determine the length of the input sound file, and so
a score of the proper length can not be generated.

I thought that it would be great if a score could
specify total duration as an absolute offset from 
the input soundfile's duration.  This way, the note
would stay on until input was exhausted, and then
optionally count out a few extra seconds, as would
be needed in the case of a reverb effect.

Perhaps this could be accomplished with a robust
enough orchestra with existing csound.  Any ideas?
The orc would have to sense the end of input, and then
terminate existing invocations of itself.

Thanks,

Toby


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa05659;
          5 Sep 99 15:58 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Ndkr-0005WU-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 15:58:53 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (PAA17918); Sun, 5 Sep 1999 15:55:09 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 15:54:56 +0100
Received: from lt@westnet.com [206.24.6.2] by hermes via ESMTP (PAA15303); Sun, 5 Sep 1999 15:54:55 +0100 (BST)
Received: from localhost (lt@localhost)
	by westnet.com (8.9.1/8.9.1) with ESMTP id KAA08625;
	Sun, 5 Sep 1999 10:54:48 -0400 (EDT)
Date: Sun, 5 Sep 1999 10:54:47 -0400 (EDT)
From: Larry Troxler 
To: Tobiah 
cc: Csound List 
Subject: Re: Csound as filter
In-Reply-To: <37D27E09.FB4E802A@rcsreg.com>
Message-ID: 
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


More generally, what about a ugen the terminates csound?

I think this would do what you want, and have many more uses as well.

Larry

On Sun, 5 Sep 1999, Tobiah wrote:

> I sometimes use csound in shell scripts, that can
> examine a file with sndinfo, write a score and
> orchestra in accordance with command line flags,
> and proceed to do their synthesis.  Usually there
> is an input file to read from, and a resultant
> output file.
> 
> Once built these scripts can be stowed away, and
> one ends up with a nice collection of filters that
> look and act like normal programs.
> 
> I would love to use csound in this way as a normal
> command line filter, using standard in and out.  The
> problem is that when using standard in, one can not
> determine the length of the input sound file, and so
> a score of the proper length can not be generated.
> 
> I thought that it would be great if a score could
> specify total duration as an absolute offset from 
> the input soundfile's duration.  This way, the note
> would stay on until input was exhausted, and then
> optionally count out a few extra seconds, as would
> be needed in the case of a reverb effect.
> 
> Perhaps this could be accomplished with a robust
> enough orchestra with existing csound.  Any ideas?
> The orc would have to sense the end of input, and then
> terminate existing invocations of itself.
> 
> Thanks,
> 
> Toby
> 

--  Larry Troxler  --  lt@westnet.com  --  Patterson, NY USA  --
  



Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa05780;
          5 Sep 99 16:34 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NdBJ-0006bh-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 15:22:09 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (QAA06453); Sun, 5 Sep 1999 16:30:35 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 16:30:24 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via ESMTP (QAA02830); Sun, 5 Sep 1999 16:30:23 +0100 (BST)
Received: from [138.38.97.36] (helo=maths.Bath.AC.UK ident=mmdf)
	by wallace.maths.bath.ac.uk with smtp (Exim 2.12 #1)
	id 11Nd7K-0006bC-00
	for csound@maths.ex.ac.uk; Sun, 5 Sep 1999 15:18:02 +0100
Date:     Sun, 5 Sep 99 16:30:17 BST
From: jpff@maths.bath.ac.uk
Subject:  Re: Some suggestion about little enhancements to existing opcodes
To: csound@maths.ex.ac.uk
Message-Id: 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Message written at 5 Sep 1999 13:48:28 +0100
--- Copy of mail to g.maldonado@agora.stm.it ---

1.
I do not believe you comment on poweroftwo as the function powoftwo
will only update the first sample of each block.  It would be possible
to write the a-rate function, but is it really useful?

2.
I made the changes to poscil family for negative frequencies to my
sources 

3.
wguide1 and wguide2 -- these are your opcodes, and my only concern is
any existing orchestras and the documentation.  Apart from that I am
happy to change when i have the code

4.
I have phasor work with doubles internally, and a number of
consequential changes


==John ffitch


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06118;
          5 Sep 99 19:46 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NhJG-0005Yy-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 19:46:39 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (TAA14245); Sun, 5 Sep 1999 19:41:35 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 19:41:24 +0100
Received: from mail4.lig.bellsouth.net [205.152.0.32] by hermes via ESMTP (TAA03035); Sun, 5 Sep 1999 19:41:23 +0100 (BST)
Received: from bellsouth.net (host-216-78-84-162.gnv.bellsouth.net [216.78.84.162])
	by mail4.lig.bellsouth.net (3.3.2/8.9.3) with ESMTP id OAA15387
	for ; Sun, 5 Sep 1999 14:40:54 -0400 (EDT)
Message-ID: <37D2E3E4.F81AFABC@bellsouth.net>
Date: Sun, 05 Sep 1999 14:43:00 -0700
From: patrick pagano 
X-Mailer: Mozilla 4.5 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: "csound@maths.ex.ac.uk" 
Subject: Cps2  opcode  and Just Intonation
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hello Csounders
i have been experimenting with the Cps 2 opcode for about a month or so.
Last night i decided to check the pitches with a sabine tuner and a freq
generator and too my dismay found that the 8.00 or 1/1 which i had hoped
would be 256hz (with some help from Bill alves) was in fact a eq temp C
. Can any one out there give me an idea what is wrong??
here is the instrument

sr   =   44100
kr   =   4410
ksmps  =   10
nchnls  =   2
garvbsig init 0
gaol init 0
gaor init 0


  instr   1
kpan  line 0,p3*.7,1
ipanl   =       sqrt(p5)                           ; Pan left
ipanr   =       sqrt(1-p5)                         ; Pan right
ifreq    cps2pch    p4,-1    ; refer to multiplier table #1
ifreq   =       512*ifreq/261.6;;;;;;;;;;;;;;;;;;;;;;THIS SHOULD MAKE
8.00 256hz??
k1      linen   700,.1,p3,.1
aamp    linseg  0, .002, 1, p3-.004, 1, .002, 0  ; Declick envelope
ifreq    cps2pch    p4,-1    ; refer to multiplier table #1
krtl =sqrt(2)/2*cos(kpan)-sin(kpan)
krtr =sqrt(2)/2*cos(kpan)+sin(kpan)
asound  oscili       k1,ifreq,2
aout    =       asound*aamp
aol=(asound*aamp)*krtl
aor=(asound*aamp)*krtr
gaol=gaol+aout
gaor=gaor+aor
garvbsig=garvbsig+aout
outs    aout*ipanl, aout*ipanr             ; Output stereo
endin
;;;;here is a segment of the score

;table # start  size    gen fn   1/1         17/16
9/8                 7/6
f 1      0      16      -2       1.000000   1.062500   1.125000
1.16666
;    9/7                         1323/1024      4/3          7/5
3/2         49/32           14/9            12/7         7/4
1.2857142857        1.2919921     1.333333   1.4   1.500000  1.53125
1.5555555    1.7142857   1.75
;  27/14       63/32
1.9285714    1.96875
f 2      0      8192    10      1

t  0 120
i3    0  300   8.00     .5
i3    100  200   8.08   .5
i3    200   100   8.12   .5
i1 8 0.25 9.08 .5
i1 8.25 0.25 9.08 0
i1 8.5 0.25 9.12 0.5
i1 8.75 0.25 9.08 0.5
i1 9 0.25 9.08 0.5
i1 9.25 0.25 9.08 0

any help would be greatly appreciated
thanks
pat



Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06169;
          5 Sep 99 20:07 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NgVL-0006fl-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 18:55:03 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (UAA11298); Sun, 5 Sep 1999 20:03:44 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 20:03:37 +0100
Received: from root@lix.intercom.es [194.179.21.2] by hermes via ESMTP (UAA17978); Sun, 5 Sep 1999 20:03:36 +0100 (BST)
Received: from intercom.es (iv3-15.intercom.es [195.76.131.15]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id VAA24947 for ; Sun, 5 Sep 1999 21:11:25 +0100
Message-ID: <37D2BDC3.89ACFF8C@intercom.es>
Date: Sun, 05 Sep 1999 21:00:19 +0200
From: Josep M Comajuncosas 
X-Mailer: Mozilla 4.5 [es] (Win95; I)
X-Accept-Language: es
MIME-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: Realtime decoder
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by exeter.ac.uk id UAA17978
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi guys,
I=B4m just getting into realtime Csound redering with my new P3 450 MHz
... I wonder if anyone has a csd file to decode C+ audio signals. Would
it be very expensive to use Csound for such a task ? ... it=B4s only audi=
o
input, ring modulation and realtime audio input I trhink.
Does anyone have a working example of realtime audio input&output?
hopefully it should work with a SB128 under Win98.
Thanks!

--
Josep M Comajuncosas
C/ Circumval.lacio 75  08790 Gelida - Penedes
Catalunya - SPAIN tel. 93 7792243
e-mail:          gelida@intercom.es
ET Informatica de Sistemes
e-mail: jcomajuncosas@campus.uoc.es
  http://members.tripod.com/csound/





Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06322;
          5 Sep 99 21:18 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Nika-0005aB-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 21:18:56 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (VAA15034); Sun, 5 Sep 1999 21:14:26 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 21:14:15 +0100
Received: from howl.werewolf.net [12.23.152.10] by hermes via ESMTP (VAA13511); Sun, 5 Sep 1999 21:14:14 +0100 (BST)
Received: from default (dial61.werewolf.net [12.23.153.61])
	by howl.werewolf.net (8.9.0/8.9.0) with SMTP id PAA25241
	for ; Sun, 5 Sep 1999 15:07:49 -0500 (CDT)
Message-ID: <000501bef7dc$6b4c9780$3d99170c@default>
From: Hans Mikelson 
To: Csound 
Subject: FM Tom-Toms Orc/Sco
Date: Sun, 5 Sep 1999 15:22:45 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi,

Continuing the drum thread a bit, here are some FM toms.

Bye,
Hans Mikelson

; ORC
sr      =        44100                      ; Sample rate
kr      =        4410                       ; Kontrol rate
ksmps   =        10                         ; Samples/Kontrol period
nchnls  =        2                          ; Normal stereo

;---------------------------------------------------------
; FM Tom-Tom
; Coded by Hans Mikelson 9/5/99
;---------------------------------------------------------
       instr     15

idur   =         p3            ; Duration
iamp   =         p4            ; Amplitude
ifqc   =         cpspch(p5)    ; Convert pitch to frequency
irez   =         p6            ; Resonance or Q
ifco   =         p7            ; Cut off frequency
ihit   =         p8            ; Noise duration
ihamp  =         p9            ; Noise amplitude
ipanl  =         sqrt(p10)     ; Pan left
ipanr  =         sqrt(1-p10)   ; Pan right

afqc1  linseg    1+iamp/30000, ihit*.5*idur, 1, .1, 1 ; Pitch bend
afqc   =         afqc1*afqc1                       ; Pitch bend squared
adclck linseg    0, .002, 1, idur-.004, 1, .002, 0 ; Declick envelope
aamp1  expseg    .01, .001, 1, idur-.001, .04      ; Tone envelope
aamp2  expseg    .01, .001, 1, idur*ihit-.001, .01 ; Noise envelope

arnd1  rand      ihamp                          ; Genrate noise
arnd   rezzy     arnd1, ifco, irez, 1           ; High pass mode
asig   oscil     1, afqc*ifqc*(1+arnd*aamp2), 1 ; Frequency modulation with
noise

aout   =         asig*iamp*aamp1*adclck         ; Apply amp envelope and
declick

       outs      aout*ipanl, aout*ipanr         ; Output the sound

       endin

; SCORE
f1 0 65536 10 1

; .125, .250, .375, .500, .625, .750, .875, 1.000

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.125   .13  23000  6.09   30  1200  .18    70      .2
i15  0.250   .15  25000  6.09   20  300   .22    40      .5
i15  0.500   .15  25000  6.09   20  600   .22    70      .4
i15  0.750   .25  29000  7.02   30  900   .11    95      .8

i15  0.00    1    0      6.09   20  500   .7     100       .5
s

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.125   .13  23000  6.09   30  1200  .18    30      .2
i15  0.250   .15  25000  6.09   20  300   .22    40      .5
i15  0.500   .12  21000  6.09   20  600   .22    30      .4
i15  0.750   .25  29000  6.07   30  900   .11    95      .8

i15  0.00    1    0      6.09   20  500   .7     100       .5
s

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.125   .13  23000  6.10   10  1200  .18    20      .2
i15  0.250   .15  25000  6.09   60  2300  .72    10      .5
i15  0.375   .17  23000  6.10   10  1400  .25    20      .8
i15  0.500   .15  25000  6.09   60  2600  .72    10      .4
i15  0.750   .25  29000  7.02   30  900   .11    95      .8

i15  0.00    1    0      6.09   20  500   .7     100     .5
s

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.000   .18  20000  7.01   20  400   .23    40      .9
i15  0.125   .13  23000  6.09   30  1200  .18    70      .2
i15  0.250   .15  25000  6.09   20  300   .22    40      .5
i15  0.375   .17  23000  6.10   10  1400  .25    40      .8
i15  0.500   .15  25000  6.09   20  600   .22    70      .4
i15  0.625   .12  20000  6.10   10  1000  .25    50      .5
i15  0.750   .25  29000  6.07   30  900   .11    95      .8

i15  0.00  1    0      6.09   20  500   .7     100       .5
s

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.125   .13  23000  6.09   30  1200  .18    70      .2
i15  0.250   .19  25000  6.09   20  300   .22    40      .0
i15  0.375   .13  23000  6.10   30  1400  .35    20      .8
i15  0.500   .19  25000  6.09   40  3600  .32    20      .4
i15  0.625   .12  20000  6.10   10  1000  .25    50      .99
i15  0.750   .19  29000  6.07   30  900   .11    95      .8
i15  0.875   .11  20000  7.02   10  1000  .25    30      .4

i15  0.00  1    0      6.09   20  500   .7     100       .5
s

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.000   .18  20000  7.02   20  400   .23    40      .9
i15  0.125   .13  23000  6.09   30  1200  .18    30      .2
i15  0.250   .19  25000  6.09   20  300   .22    40      .1
i15  0.375   .13  23000  6.10   10  1400  .25    40      .8
i15  0.500   .19  25000  6.07   20  600   .22    30      .4
i15  0.750   .25  29000  6.10   30  900   .11    95      .8

i15  0.00  1    0      6.09   20  500   .7     100       .5
s

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.125   .13  23000  6.09   30  1200  .18    70      .2
i15  0.250   .19  25000  6.09   20  300   .22    40      .5
i15  0.375   .13  23000  6.10   30  1400  .35    20      .8
i15  0.500   .19  25000  6.09   40  3600  .32    20      .1
i15  0.625   .12  20000  6.10   10  1000  .25    50      .5
i15  0.750   .19  29000  6.07   30  900   .11    95      .8
i15  0.875   .11  20000  7.02   10  1000  .25    30      .4

i15  0.00  1    0      6.09   20  500   .7     100       .5
s

;    Sta     Dur  Amp    Pitch  Q   Fqc   HitDur HitAmp  Pan
i15  0.000   .18  20000  7.02   20  400   .23    40      .9
i15  0.125   .13  23000  6.09   40  3200  .68    10      .2
i15  0.250   .19  25000  6.09   20  300   .22    40      .5
i15  0.375   .13  23000  6.10   40  3400  .65    10      .8
i15  0.500   .26  25000  6.07   20  600   .08    90      .4
i15  0.752   .43  25000  6.09   30  900   .08    85      .0
i15  0.745   .45  25000  6.07   30  900   .08    85      .99

i15  0.00  1    0      6.09   20  500   .7     100       .5




Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06331;
          5 Sep 99 21:27 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Nhl1-0006gy-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 20:15:19 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (VAA15261); Sun, 5 Sep 1999 21:23:51 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 21:23:38 +0100
Received: from sand.global.net.uk [195.147.248.109] (may be forged) by hermes via ESMTP (VAA02230); Sun, 5 Sep 1999 21:23:37 +0100 (BST)
Received: from p3as11a03.client.global.net.uk ([195.147.171.59] helo=dev6)
	by sand.global.net.uk with esmtp (Exim 2.05 #1)
	id 11Nioz-0007zy-00; Sun, 5 Sep 1999 21:23:30 +0100
Received: from 10.0.0.69 by dev6 ([10.0.0.69] running VPOP3) with SMTP; Sun, 5 Sep 1999 21:24:31 +0100
Date: Sun, 5 Sep 1999 21:24:30 +0100
From: Matt Southall 
X-Mailer: The Bat! (v1.33) UNREG / CD5BF9353B3B7091
Reply-To: Matt Southall 
X-Priority: 3 (Normal)
Message-ID: <8892.990905@psychology.nottingham.ac.uk>
To: Hans Mikelson 
CC: Csound 
Subject: Re: Crickets  [ot]
In-reply-To: <000901bef6eb$9bccf2c0$5a99170c@default>
References: <000901bef6eb$9bccf2c0$5a99170c@default>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Server: VPOP3 V1.3.0 - Registered to: Broadband Communications
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

HM> Summer is coming to an end but if you miss the sound of crickets you can
HM> recreate it with the following Csound orc/sco.

As a bit of an aside, when I was a PhD student, my supervisor's work
was building robotic models of cricket phonotaxis (part of their
mating behaviour). We simulated the cricket mating calls using Csound.
Off topic.. but I thought I'd share that with you all :)

Matt




Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06350;
          5 Sep 99 21:36 BST
Received: from [194.172.230.108] (helo=nett.irt.de)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Nhtu-0006h5-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 20:24:30 +0100
Received: from ppp20 (ppp-serv1.irt.de [192.168.5.71])
	by nett.irt.de (8.9.1/8.9.1) with SMTP id WAA20334;
	Sun, 5 Sep 1999 22:36:41 +0200 (METDST)
Message-ID: <37D2D7C4.4AA9@irt.de>
Date: Sun, 05 Sep 1999 22:51:16 +0200
From: Jens Groh 
Reply-To: groh@irt.de
X-Mailer: Mozilla 3.01 (Win95; I)
MIME-Version: 1.0
To: Csound mailing list 
CC: jpff@maths.bath.ac.uk, g.maldonado@agora.stm.it, peter@selene.cube.net
Subject: new "nlalp" opcode
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello Csounders!

Let me introduce this new opcode:


nlalp
---------

aresult  nlalp    ainput, klfact, knfact [, istor] 

Passive non-linear allpass filter.

INITIALIZATION
istor    -  initial disposition of internal data space. Since filtering
            incorporates a feedback loop of previous output, the initial
            status of the storage space used is significant. A zero
value
            will clear the space; a non-zero value will allow previous
            information to remain. The default value is 0.

PERFORMANCE
klfact   -  linear part of the allpass filter coefficient.
knfact   -  nonlinear part of the allpass filter coefficient. If zero,
the
            filter will be a normal, yet adjustable allpass.

DESCRIPTION
This opcode performs a "passive", non-linear allpass filter after John
Pierce
& Scott Van Duyne (US Patent 5,703,313). "Passive" means that it is
energy-
conserving, which makes it useful in physical modeling instruments, like
waveguide meshes.


You find this description including an example at:
 http://www.harmonik.de/femc/download/new_jgops.txt 
and the source code at:
 http://www.harmonik.de/femc/download/new_jgops.cod 

Another example for its use is this gong-like instrument:
 http://www.harmonik.de/femc/download/gong.csd 

Jens Groh


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06364;
          5 Sep 99 21:40 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Nj5Q-0005aN-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 21:40:29 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (VAA12671); Sun, 5 Sep 1999 21:37:05 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 21:36:45 +0100
Received: from zit-108.irt.de [194.172.230.108] by hermes via ESMTP (VAA18498); Sun, 5 Sep 1999 21:36:43 +0100 (BST)
Received: from ppp20 (ppp-serv1.irt.de [192.168.5.71])
	by nett.irt.de (8.9.1/8.9.1) with SMTP id WAA20334;
	Sun, 5 Sep 1999 22:36:41 +0200 (METDST)
Message-ID: <37D2D7C4.4AA9@irt.de>
Date: Sun, 05 Sep 1999 22:51:16 +0200
From: Jens Groh 
Reply-To: groh@irt.de
X-Mailer: Mozilla 3.01 (Win95; I)
MIME-Version: 1.0
To: Csound mailing list 
CC: jpff@maths.bath.ac.uk, g.maldonado@agora.stm.it, peter@selene.cube.net
Subject: new "nlalp" opcode
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hello Csounders!

Let me introduce this new opcode:


nlalp
---------

aresult  nlalp    ainput, klfact, knfact [, istor] 

Passive non-linear allpass filter.

INITIALIZATION
istor    -  initial disposition of internal data space. Since filtering
            incorporates a feedback loop of previous output, the initial
            status of the storage space used is significant. A zero
value
            will clear the space; a non-zero value will allow previous
            information to remain. The default value is 0.

PERFORMANCE
klfact   -  linear part of the allpass filter coefficient.
knfact   -  nonlinear part of the allpass filter coefficient. If zero,
the
            filter will be a normal, yet adjustable allpass.

DESCRIPTION
This opcode performs a "passive", non-linear allpass filter after John
Pierce
& Scott Van Duyne (US Patent 5,703,313). "Passive" means that it is
energy-
conserving, which makes it useful in physical modeling instruments, like
waveguide meshes.


You find this description including an example at:
 http://www.harmonik.de/femc/download/new_jgops.txt 
and the source code at:
 http://www.harmonik.de/femc/download/new_jgops.cod 

Another example for its use is this gong-like instrument:
 http://www.harmonik.de/femc/download/gong.csd 

Jens Groh


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06498;
          5 Sep 99 22:46 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Niyu-0006iH-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 21:33:44 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA00701); Sun, 5 Sep 1999 22:37:20 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 22:37:08 +0100
Received: from farida.a2000.nl [62.108.1.19] by hermes via ESMTP (WAA02633); Sun, 5 Sep 1999 22:37:07 +0100 (BST)
Received: from node12431.a2000.nl ([24.132.36.49] helo=cornelius)
	by smtp1.a2000.nl with smtp (Exim 2.02 #4)
	id 11Njxy-00079L-00; Sun, 5 Sep 1999 23:36:50 +0200
Reply-To: D.W.Perry@fibre.a2000.nl
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
From: Dave Perry 
To: Ben Alkov , Bill Gray , 
    Brian Whitman , Woodpecker , 
    Visorc Mailing List , 
    Csound Mailing List , Atlas 
Subject: [ANNOUNCE] Visual Orchestra build 24 released
Date: Sun, 5 Sep 1999 23:37:55 +0200
Message-ID: <000001bef7e6$ea560fc0$31248418@cornelius.a2000.nl>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Dear Csounder's

	The latest build of Visual Orchestra has just been released and is
available for download from .  This version
is a significant upgrade on the previous, find a full list of new features
and fixes on the same page.

Best wishes,

David Perry
D.W.Perry@fibre.a2000.nl



Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06504;
          5 Sep 99 22:47 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Nk84-0005bG-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 22:47:16 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA00404); Sun, 5 Sep 1999 22:43:42 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 22:43:31 +0100
Received: from rcsreg.rcsreg.com [198.176.199.30] by hermes via SMTP (WAA01127); Sun, 5 Sep 1999 22:43:30 +0100 (BST)
Received: from [63.193.151.229] by rcsreg.com (NTMail 3.02.12) with ESMTP id la029547 for ; Sun, 5 Sep 1999 14:32:34 +0100
Message-ID: <37D2E3FD.DA7A558@rcsreg.com>
Date: Sun, 05 Sep 1999 21:43:25 +0000
From: Tobiah 
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.7 i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: Csound 
Subject: Re: Crickets  [ot]
References: <000901bef6eb$9bccf2c0$5a99170c@default> <8892.990905@psychology.nottingham.ac.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

I hereby decree, (by no authority of my own) that
a post which includes the word 'csound' in some
meaningful part of the body, should for our purposes
be judged to be 'on topic'.

> As a bit of an aside, when I was a PhD student, my supervisor's work
> was building robotic models of cricket phonotaxis (part of their
> mating behaviour). We simulated the cricket mating calls using Csound.
> Off topic.. but I thought I'd share that with you all :)
> 
> Matt


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06566;
          5 Sep 99 23:43 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NjsQ-0006jK-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 22:31:06 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (XAA02649); Sun, 5 Sep 1999 23:39:09 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 5 Sep 1999 23:38:58 +0100
Received: from grynet.passagen.se [195.163.107.36] by hermes via ESMTP (XAA02930); Sun, 5 Sep 1999 23:38:57 +0100 (BST)
Received: from hem.passagen.se (z12-3-211.sbbs2.net [212.112.3.211])
	by grynet.passagen.se (8.8.6/8.8.6) with ESMTP id AAA29531
	for ; Mon, 6 Sep 1999 00:38:54 +0200 (MDT)
Message-ID: <37D2F262.41EA1D59@hem.passagen.se>
Date: Mon, 06 Sep 1999 00:44:50 +0200
From: rasmus ekman 
Organization: .
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound List 
Subject: Re: Auto-switch off Csound when input ends
References: <37D27E09.FB4E802A@rcsreg.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Suggested plot:
Use negative p3 (indefinite instrument), set to minimum
play time. Take rms of output signal (to let reverb fade out),
or take rms of input and start a counter when this is zero.
After minimum ring time (-p3 in orc), if rms is zero, 
call turnoff. (For multiple instr's you can set a global 
variable which all read, and call turnoff when true.)

Would that do, or is the situation more complex?

	re

Tobiah wrote:
> 
> The orc would have to sense the end of input, and then
> terminate existing invocations of itself.


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06692;
          6 Sep 99 1:08 BST
Received: from [204.143.176.4] (helo=mail.infohouse.com)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NlCT-0006lK-00
	for jpff@maths.bath.ac.uk; Sun, 5 Sep 1999 23:55:53 +0100
Received: from [204.143.224.52] (dial-up052.infohouse.com)
          by mail.infohouse.com (Post.Office MTA v3.5.3 release 223
          ID# 141-59479U3500L350S0V35) with ESMTP id com;
          Sun, 5 Sep 1999 20:00:57 -0400
X-Sender: ic11748@mail.infohouse.com
Message-Id: 
In-Reply-To: <37D1CD04.6FA9B8A2@westnet.com>
References: <3.0.5.32.19990904202132.007a8b90@pop.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sun, 5 Sep 1999 20:09:45 +0100
To: Larry Troxler , csound@maths.ex.ac.uk, 
    J P Fitch 
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
From: tolve 
Subject: Re: ugen test-level status in doc?

think somewhere along the way i was misinterpreted: never meant to suggest
absolutely anyone should be able to add information to a database regarding
known bugs -only multiple contributors given such access. all others simply
view.

also, as mentioned, though i'm willing to set up structure of such a
database, it would be quite a bit of work for others to maintain the
information.

do believe that at least a simple known bugs list would be useful.
certainly it is not that bizarre a concept in this world. but how about
this least possible work solution for a start:

mr ffitch declares international csound bug week at his convenience. all
users are invited to blitz the list with bugs they have encountered with
"international csound bug week" in the heading.

*all such bugs must have been in some way confirmed on this list and should
not currently be listed as solved in the most recent official ffitch
communiques*

(posts of new bugs could and should of course continue to be posted but
without the international csound bug week moniker in the subject heading)

users would be free to set up a filter to sort international csound bug
week posts for reference.

viola!

this process could be repeated any time the manual is being updated.

tolve




Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06699;
          6 Sep 99 1:13 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NmPH-0005ct-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 01:13:11 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA12986); Mon, 6 Sep 1999 01:08:25 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 01:08:13 +0100
Received: from mail.infohouse.com [204.143.176.4] by hermes via ESMTP (BAA05684); Mon, 6 Sep 1999 01:08:12 +0100 (BST)
Received: from [204.143.224.52] (dial-up052.infohouse.com)
          by mail.infohouse.com (Post.Office MTA v3.5.3 release 223
          ID# 141-59479U3500L350S0V35) with ESMTP id com;
          Sun, 5 Sep 1999 20:00:57 -0400
X-Sender: ic11748@mail.infohouse.com
Message-Id: 
In-Reply-To: <37D1CD04.6FA9B8A2@westnet.com>
References: <3.0.5.32.19990904202132.007a8b90@pop.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sun, 5 Sep 1999 20:09:45 +0100
To: Larry Troxler , csound@maths.ex.ac.uk, 
    J P Fitch 
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
From: tolve 
Subject: Re: ugen test-level status in doc?
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

think somewhere along the way i was misinterpreted: never meant to suggest
absolutely anyone should be able to add information to a database regarding
known bugs -only multiple contributors given such access. all others simply
view.

also, as mentioned, though i'm willing to set up structure of such a
database, it would be quite a bit of work for others to maintain the
information.

do believe that at least a simple known bugs list would be useful.
certainly it is not that bizarre a concept in this world. but how about
this least possible work solution for a start:

mr ffitch declares international csound bug week at his convenience. all
users are invited to blitz the list with bugs they have encountered with
"international csound bug week" in the heading.

*all such bugs must have been in some way confirmed on this list and should
not currently be listed as solved in the most recent official ffitch
communiques*

(posts of new bugs could and should of course continue to be posted but
without the international csound bug week moniker in the subject heading)

users would be free to set up a filter to sort international csound bug
week posts for reference.

viola!

this process could be repeated any time the manual is being updated.

tolve




Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06707;
          6 Sep 99 1:16 BST
Received: from [204.143.176.4] (helo=mail.infohouse.com)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NlKH-0006lO-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 00:03:57 +0100
Received: from [204.143.224.52] (dial-up052.infohouse.com)
          by mail.infohouse.com (Post.Office MTA v3.5.3 release 223
          ID# 141-59479U3500L350S0V35) with ESMTP id com;
          Sun, 5 Sep 1999 20:09:01 -0400
X-Sender: ic11748@mail.infohouse.com
Message-Id: 
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sun, 5 Sep 1999 20:17:49 +0100
To: Larry Troxler , csound@maths.ex.ac.uk, 
    J P Fitch 
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
From: tolve 
Subject: Re: ugen test-level status in doc?

better make that "international csound known bugs week"
tolve

tolve wrote
>think somewhere along the way i was misinterpreted: never meant to suggest
>absolutely anyone should be able to add information to a database
>regarding known bugs -only multiple contributors given such access. all
>others simply view.
>
>also, as mentioned, though i'm willing to set up structure of such a
>database, it would be quite a bit of work for others to maintain the
>information.
>
>do believe that at least a simple known bugs list would be useful.
>certainly it is not that bizarre a concept in this world. but how about
>this least possible work solution for a start:
>
>mr ffitch declares international csound bug week at his convenience. all
>users are invited to blitz the list with bugs they have encountered with
>"international csound bug week" in the heading.
>
>*all such bugs must have been in some way confirmed on this list and
>should not currently be listed as solved in the most recent official
>ffitch communiques*
>
>(posts of new bugs could and should of course continue to be posted but
>without the international csound bug week moniker in the subject heading)
>
>users would be free to set up a filter to sort international csound bug
>week posts for reference.
>
>viola!
>
>this process could be repeated any time the manual is being updated.
>
>tolve
>
>




Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06718;
          6 Sep 99 1:18 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NlMq-0006lQ-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 00:06:36 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (BAA06842); Mon, 6 Sep 1999 01:16:28 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 01:16:17 +0100
Received: from mail.infohouse.com [204.143.176.4] by hermes via ESMTP (BAA16078); Mon, 6 Sep 1999 01:16:16 +0100 (BST)
Received: from [204.143.224.52] (dial-up052.infohouse.com)
          by mail.infohouse.com (Post.Office MTA v3.5.3 release 223
          ID# 141-59479U3500L350S0V35) with ESMTP id com;
          Sun, 5 Sep 1999 20:09:01 -0400
X-Sender: ic11748@mail.infohouse.com
Message-Id: 
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sun, 5 Sep 1999 20:17:49 +0100
To: Larry Troxler , csound@maths.ex.ac.uk, 
    J P Fitch 
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
From: tolve 
Subject: Re: ugen test-level status in doc?
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

better make that "international csound known bugs week"
tolve

tolve wrote
>think somewhere along the way i was misinterpreted: never meant to suggest
>absolutely anyone should be able to add information to a database
>regarding known bugs -only multiple contributors given such access. all
>others simply view.
>
>also, as mentioned, though i'm willing to set up structure of such a
>database, it would be quite a bit of work for others to maintain the
>information.
>
>do believe that at least a simple known bugs list would be useful.
>certainly it is not that bizarre a concept in this world. but how about
>this least possible work solution for a start:
>
>mr ffitch declares international csound bug week at his convenience. all
>users are invited to blitz the list with bugs they have encountered with
>"international csound bug week" in the heading.
>
>*all such bugs must have been in some way confirmed on this list and
>should not currently be listed as solved in the most recent official
>ffitch communiques*
>
>(posts of new bugs could and should of course continue to be posted but
>without the international csound bug week moniker in the subject heading)
>
>users would be free to set up a filter to sort international csound bug
>week posts for reference.
>
>viola!
>
>this process could be repeated any time the manual is being updated.
>
>tolve
>
>




Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa06999;
          6 Sep 99 3:38 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Nog3-0005eL-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 03:38:39 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (DAA09372); Mon, 6 Sep 1999 03:35:54 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 03:35:43 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (DAA10137); Mon, 6 Sep 1999 03:35:42 +0100 (BST)
Received: from ulster.net (annex3-port44.ulster.net [208.133.194.44])
	by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id WAA27920;
	Sun, 5 Sep 1999 22:51:13 -0400
Message-ID: <37D32A05.AC9ECB5B@ulster.net>
Date: Sun, 05 Sep 1999 22:42:13 -0400
From: Paul Winkler 
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: peter@orpheus.selene.cube.net
CC: csound@maths.ex.ac.uk
Subject: Re: Pipes?
References: <37D0B846.DA3BB22F@ulster.net> <9909040806.AA29571@orpheus.selene.cube.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Thanks for the suggestion, Peter. That should work.

The only issue is whether one might wish to have so much data coming in
that one pipe will start to be too slow...
I need to do some testing of my ideas to find out if that will be a
problem, before I get too far into it.

Thanks,

PW


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa07034;
          6 Sep 99 4:01 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NnuD-0006oZ-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 02:49:13 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (DAA11778); Mon, 6 Sep 1999 03:58:40 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 03:58:28 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (DAA04138); Mon, 6 Sep 1999 03:58:27 +0100 (BST)
Received: from ulster.net (annex3-port44.ulster.net [208.133.194.44])
	by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id XAA30156;
	Sun, 5 Sep 1999 23:14:42 -0400
Message-ID: <37D32F86.7FBB4ABC@ulster.net>
Date: Sun, 05 Sep 1999 23:05:42 -0400
From: Paul Winkler 
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Tobiah 
CC: Csound List 
Subject: Re: Csound as filter
References: <37D27E09.FB4E802A@rcsreg.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Tobiah wrote:
> 
> I sometimes use csound in shell scripts
(snip)...

I would love to see some examples of this technique.

> I would love to use csound in this way as a normal
> command line filter, using standard in and out.  The
> problem is that when using standard in, one can not
> determine the length of the input sound file, and so
> a score of the proper length can not be generated.

I am by no means a shell-script expert, so there may well be better
solutions, but:  What about storing the length of input in an
environment variable?

let's use the hypothetical scripts "flanger" and "echo".

You might call them like this:
flanger -i input.wav | echo -o output.wav

Here's what happens:
1. "flanger" sees that it has the "-i input.wav" arguments and decides
that it must call sndinfo, parse the result to find lenght of input.wav.
2. Length in sec. is stored in environment as $WAVLENGTH
3. echo sees that it does not have a "-i" argument and thus assumes its
input is from stdin.  So it looks to $WAVLENGTH for the duration to use.
It also modifies $WAVLENGTH if it will be changing the length. This is
so subsequent filters in the pipe get the new length correct.

To make these scripts general-purpose filters, all scripts should test
for the existence of $WAVLENGTH and only call sndinfo if it does not
exist. You would then want the last called script to destroy $WAVLENGTH,
or else it will still be floating around the next time you run these
scripts. But how would the last script know it's the last one? By
checking to see whether it has a -o argument. If yes, then its output is
being written to a file and we can safely remove $WAVLENGTH. If no, we
should assume output is to a pipe or stdout.

One disadvantage: I don't know how this could be made to work with
redirection symbols > and < . Or backquotes.
 

----------------    paul winkler    ------------------
slinkP arts:  music, sound, illustration, design, etc.

zarmzarm@hotmail.com   --or-- slinkp AT ulster DOT net
http://www.ulster.net/~abigoo/
======================================================


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa07176;
          6 Sep 99 5:09 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11Nq61-0005gs-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 05:09:33 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (FAA00981); Mon, 6 Sep 1999 05:06:00 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 05:05:47 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (FAA10688); Mon, 6 Sep 1999 05:05:46 +0100 (BST)
Received: from ulster.net (annex3-port44.ulster.net [208.133.194.44])
	by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id AAA03724;
	Mon, 6 Sep 1999 00:21:59 -0400
Message-ID: <37D33F4C.CC27E042@ulster.net>
Date: Mon, 06 Sep 1999 00:13:00 -0400
From: Paul Winkler 
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Hans Mikelson 
CC: Csound 
Subject: Re: FM Tom-Toms Orc/Sco
References: <000501bef7dc$6b4c9780$3d99170c@default>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

That's a pretty cool drum!

I've discovered it can even do good kick drums of several flavors, with
some parameter tweaking like so...

i15 0      .15  32000  5.05  100  1000  .3 100 .5

i15 0.125  .15  32000  5.05  100  100  .3 20

i15 0.250  .15  32000  5.05  100  100  .8 20

i15 0.5    .15  32000  5.08  100  100  .4 20 

i15 0.625  .15  32000  5.08  6000 700  .5 100 



Hans Mikelson wrote:
> 
> Hi,
> 
> Continuing the drum thread a bit, here are some FM toms.
> 
> Bye,
> Hans Mikelson
> 
> ; ORC
> sr      =        44100                      ; Sample rate
> kr      =        4410                       ; Kontrol rate
> ksmps   =        10                         ; Samples/Kontrol period
> nchnls  =        2                          ; Normal stereo
> 
> ;---------------------------------------------------------
> ; FM Tom-Tom
> ; Coded by Hans Mikelson 9/5/99
> ;---------------------------------------------------------
>        instr     15
> 
> idur   =         p3            ; Duration
> iamp   =         p4            ; Amplitude
> ifqc   =         cpspch(p5)    ; Convert pitch to frequency
> irez   =         p6            ; Resonance or Q
> ifco   =         p7            ; Cut off frequency
> ihit   =         p8            ; Noise duration
> ihamp  =         p9            ; Noise amplitude
> ipanl  =         sqrt(p10)     ; Pan left
> ipanr  =         sqrt(1-p10)   ; Pan right
> 
> afqc1  linseg    1+iamp/30000, ihit*.5*idur, 1, .1, 1 ; Pitch bend
> afqc   =         afqc1*afqc1                       ; Pitch bend squared
> adclck linseg    0, .002, 1, idur-.004, 1, .002, 0 ; Declick envelope
> aamp1  expseg    .01, .001, 1, idur-.001, .04      ; Tone envelope
> aamp2  expseg    .01, .001, 1, idur*ihit-.001, .01 ; Noise envelope
> 
> arnd1  rand      ihamp                          ; Genrate noise
> arnd   rezzy     arnd1, ifco, irez, 1           ; High pass mode
> asig   oscil     1, afqc*ifqc*(1+arnd*aamp2), 1 ; Frequency modulation with
> noise
> 
> aout   =         asig*iamp*aamp1*adclck         ; Apply amp envelope and
> declick
> 
>        outs      aout*ipanl, aout*ipanr         ; Output the sound
> 
>        endin


----------------    paul winkler    ------------------
slinkP arts:  music, sound, illustration, design, etc.

zarmzarm@hotmail.com   --or-- slinkp AT ulster DOT net
http://www.ulster.net/~abigoo/
======================================================


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa07215;
          6 Sep 99 5:28 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NpGT-0006r9-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 04:16:17 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (FAA11953); Mon, 6 Sep 1999 05:25:51 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 05:25:40 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (FAA14046); Mon, 6 Sep 1999 05:25:39 +0100 (BST)
Received: from ulster.net (annex3-port44.ulster.net [208.133.194.44])
	by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id AAA05320
	for ; Mon, 6 Sep 1999 00:41:57 -0400
Message-ID: <37D343FA.60F416CA@ulster.net>
Date: Mon, 06 Sep 1999 00:32:58 -0400
From: Paul Winkler 
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.36 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: CSOUND list 
Subject: b statement confusion
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi,

Has anyone used the "b" (clock reset) score statement for anything?
If so, do you understand it? :)

I just played with it and either it does the opposite of what the manual
suggests, or my brain is screwed on backwards.

>From the manual (version 3.53)

B STATEMENT

     b  p1



DESCRIPTION

This statement resets the clock. 

P FIELDS

    p1 Specifies how the clock is to be set.

SPECIAL CONSIDERATIONS

If p1 is positive, the clock is reset forward by the number of beats
specibied by p1. If p1 is negative, the clock is reset
backward by the number of beats specified by p1. If p1 = 0, the clock is
returned to its original position. 
-- 

(end of manual extract)

So, to my way of thinking: If I use b -1, I have just set the clock back
by 1 beat. So if an event leaves the clock at 20, then b -1 will cause
the clock to be set to 19; subsequent events will be heard after a delay
of 1 beat while the clock counts from 19 to 20 again. Conversely, if I
use b 1, the clock will be set forward by 1 beat and any events before
"now plus 1" (in this case 21) will be skipped.

This is exactly the opposite of what seems to happen in practice.
Positive values result in pauses; negative values result in skipped
beats.


And I suppose I should point out I am currently using unofficial linux
csound version 3.53.0.1b...

Here's a score that demonstrates the confusion. (This score is for Hans
Mikelson's just-posted FM tomtom orc)




f1 0 65536 10 1

s
m kicks   ; give this section a name for use by n statements 

i15 0      .15  32000  5.05  100  1000  .3 100 .5

i15 0.125  .15  32000  5.05  100  100  .3 20

i15 0.250  .15  32000  5.05  100  100  .8 20

i15 0.5    .15  32000  5.08  100  100  .4 20 

i15 0.625  .15  32000  5.08  6000 700  .5 100 


f 0 1
s

n kicks         ; second time

n kicks        ; third time

b .5             ; results in a pause of .5 before next repeat!

n kicks

b -.5           ; results in skipping first .5 beats of next repeat!

n kicks

n kicks

----------------    paul winkler    ------------------
slinkP arts:  music, sound, illustration, design, etc.

zarmzarm@hotmail.com   --or-- slinkp AT ulster DOT net
http://www.ulster.net/~abigoo/
======================================================


Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa07395;
          6 Sep 99 7:48 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NrRM-0006xo-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 06:35:40 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (HAA17605); Mon, 6 Sep 1999 07:45:29 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 07:45:20 +0100
Received: from root@news.cube.net [194.97.64.2] by hermes via SMTP (HAA17344); Mon, 6 Sep 1999 07:45:19 +0100 (BST)
Received: from orpheus.selene.cube.net([193.149.39.225]) (1023 bytes) by salyko.cube.net
	via smtpd with P:smtp/R:bind_hosts/T:inet_zone_bind_smtp
	(sender: ) 
	id 
	for ; Mon, 6 Sep 1999 08:45:14 +0200 (MEST)
	(Smail-3.2.0.106 1999-Mar-31 #1 built 1999-Sep-2)
Received: from hermes by orpheus.selene.cube.net (NX5.67f2/NX3.0M)
	id AA00416; Mon, 6 Sep 99 08:44:39 +0200
Message-Id: <9909060644.AA00416@orpheus.selene.cube.net>
Received: by hermes.selene.cube.net (NX5.67g/NX3.0X)
	id AA00268; Mon, 6 Sep 99 08:44:35 +0200
Content-Type: text/plain
Mime-Version: 1.0 (NeXT Mail 4.2mach v148)
Received: by NeXT.Mailer (1.148)
From: Peter Neubacker 
Date: Mon,  6 Sep 99 08:44:34 +0200
To: csound@maths.ex.ac.uk
Subject: Re: Cps2  opcode  and Just Intonation
Reply-To: peter@orpheus.selene.cube.net
References: <37D2E3E4.F81AFABC@bellsouth.net>
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


> i have been experimenting with the Cps 2 opcode...

As I understand it, the cpsxpch opcode would match
your demands, as you give it a base frequency ibase.
So,   cpsxpch  8.02, -1, 2, 1.0
would give you frequencies relative to 1 Hz.

Peter


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa07409;
          6 Sep 99 7:59 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 11NskK-0005nn-00
	for jpff@maths.bath.ac.uk; Mon, 6 Sep 1999 07:59:20 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (HAA18264); Mon, 6 Sep 1999 07:57:13 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Mon, 6 Sep 1999 07:57:04 +0100
Received: from root@news.cube.net [194.97.64.2] by hermes via SMTP (HAA17333); Mon, 6 Sep 1999 07:57:04 +0100 (BST)
Received: from orpheus.selene.cube.net([193.149.39.225]) (1806 bytes) by salyko.cube.net
	via smtpd with P:smtp/R:bind_hosts/T:inet_zone_bind_smtp
	(sender: ) 
	id 
	for ; Mon, 6 Sep 1999 08:57:01 +0200 (MEST)
	(Smail-3.2.0.106 1999-Mar-31 #1 built 1999-Sep-2)
Received: from hermes by orpheus.selene.cube.net (NX5.67f2/NX3.0M)
	id AA00422; Mon, 6 Sep 99 08:56:25 +0200
Message-Id: <9909060656.AA00422@orpheus.selene.cube.net>
Received: by hermes.selene.cube.net (NX5.67g/NX3.0X)
	id AA00278; Mon, 6 Sep 99 08:56:22 +0200
Mime-Version: 1.0 (NeXT Mail 4.2mach v148)
Content-Type: multipart/alternative; boundary=NeXT-Mail-114828719-1
Content-Transfer-Encoding: 7bit
Received: by NeXT.Mailer (1.148)
From: Peter =?iso-8859-1?Q?Neub=E4cker?= 
Date: Mon,  6 Sep 99 08:56:21 +0200
To: csound@maths.ex.ac.uk
Subject: Re: Csound as filter
Reply-To: peter@orpheus.selene.cube.net
References: 
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

--NeXT-Mail-114828719-1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline



> I thought that it would be great if a score could
> specify total duration as an absolute offset from
> the input soundfile's duration.

You can change duration of a note from within the
instrument, simply by setting
p3 = isomething + ioffset
Would that do the job?

Peter

--NeXT-Mail-114828719-1
Content-Type: text/enriched; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline



Ohlfs> I thought that it would
be great if a score could

> specify total duration as an absolute offset from 

> the input soundfile's duration.


You can change duration of a note from within the

instrument, simply by setting

p3 = isomething + ioffset

Would that do the job?


Peter


--NeXT-Mail-114828719-1--

Date1999-09-05 15:54
FromLarry Troxler
SubjectRe: Csound as filter
More generally, what about a ugen the terminates csound?

I think this would do what you want, and have many more uses as well.

Larry

On Sun, 5 Sep 1999, Tobiah wrote:

> I sometimes use csound in shell scripts, that can
> examine a file with sndinfo, write a score and
> orchestra in accordance with command line flags,
> and proceed to do their synthesis.  Usually there
> is an input file to read from, and a resultant
> output file.
> 
> Once built these scripts can be stowed away, and
> one ends up with a nice collection of filters that
> look and act like normal programs.
> 
> I would love to use csound in this way as a normal
> command line filter, using standard in and out.  The
> problem is that when using standard in, one can not
> determine the length of the input sound file, and so
> a score of the proper length can not be generated.
> 
> I thought that it would be great if a score could
> specify total duration as an absolute offset from 
> the input soundfile's duration.  This way, the note
> would stay on until input was exhausted, and then
> optionally count out a few extra seconds, as would
> be needed in the case of a reverb effect.
> 
> Perhaps this could be accomplished with a robust
> enough orchestra with existing csound.  Any ideas?
> The orc would have to sense the end of input, and then
> terminate existing invocations of itself.
> 
> Thanks,
> 
> Toby
> 

--  Larry Troxler  --  lt@westnet.com  --  Patterson, NY USA  --