Csound Csound-dev Csound-tekno Search About

oscil3 glitch problem

Date1999-05-08 11:38
FromSteven Cook
Subjectoscil3 glitch problem
Hi,

I've had an odd problem with the following simple orc and sco which I have
written to test something else I am working on:

;Orc
sr     = 44100
kr     = 4410
ksmps  = 10
nchnls = 1

instr    1 ; Sine sweep generator

ilevl    = ampdb(96 + p4)
ifreq1   = p5
ifreq2   = p6

asweep   expseg  ifreq1, p3, ifreq2
aosc     oscil3  1, asweep, 1

out      aosc*ilevl

endin

;Score
f1 0 32769 10 1 ; Sine

;Level in dB, 0dB=maximum
;   Strt Leng Levl Freq1 Freq2
i1  0.00 1.47 -6      20 20000
e

The output from this contains a single sample -32768 spike about a third of
the way in for no apparent reason.

Anyone got any ideas?

Thanks,
Steve Cook.



Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa09811;
          8 May 99 17:40 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10gA9C-0001eL-00
	for jpff@maths.bath.ac.uk; Sat, 8 May 1999 17:40:19 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (RAA03663); Sat, 8 May 1999 17:38:16 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 8 May 1999 17:38:04 +0100
Received: from root@big.fishnet.net [204.89.144.3] by hermes via ESMTP (RAA15564); Sat, 8 May 1999 17:38:02 +0100 (BST)
Received: from rcsreg.com (x201.core.fishnet.net [204.89.144.201])
	by big.fishnet.net (8.9.2/8.8.5) with ESMTP id IAA09839
	for ; Sat, 8 May 1999 08:42:50 -0700 (PDT)
Message-ID: <3734694A.2F8B43DE@rcsreg.com>
Date: Sat, 08 May 1999 16:41:46 +0000
From: Tobiah 
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5 i686)
X-Accept-Language: en
MIME-Version: 1.0
CC: csound@maths.ex.ac.uk
Subject: Re: pvanel file format
References: <19990507084434.86541.qmail@hotmail.com> 
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk


> #define PVMAGIC 517730  /* look at it upside-down, esp on a 7-seg display */

What is to be sought in the word 'oellis'?

Toby


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa10042;
          8 May 99 21:06 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10gDMf-0001KC-00
	for jpff@maths.bath.ac.uk; Sat, 8 May 1999 21:06:25 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (VAA17146); Sat, 8 May 1999 21:03:48 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 8 May 1999 21:03:36 +0100
Received: from smtp3.erols.com [207.172.3.236] by hermes via ESMTP (VAA00292); Sat, 8 May 1999 21:03:34 +0100 (BST)
Received: from erols.com (209-122-227-77.s77.tnt2.nyw.ny.dialup.rcn.com [209.122.227.77])
	by smtp3.erols.com (8.8.8/8.8.5) with ESMTP id QAA02341;
	Sat, 8 May 1999 16:03:26 -0400 (EDT)
Message-ID: <3734994F.F5C1CEDC@erols.com>
Date: Sat, 08 May 1999 16:06:39 -0400
From: Paul Winkler 
X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686)
MIME-Version: 1.0
To: steve@babcom.u-net.com
CC: Csound List 
Subject: Re: oscil3 glitch problem
References: <37341418.B5FA44ED@babcom.u-net.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Steven Cook wrote:
> 
> Hi,
> 
> I've had an odd problem with the following simple orc and sco which I have
> written to test something else I am working on:
> 
> ;Orc
> sr     = 44100
> kr     = 4410
> ksmps  = 10
> nchnls = 1
> 
> instr    1 ; Sine sweep generator
> 
> ilevl    = ampdb(96 + p4)
> ifreq1   = p5
> ifreq2   = p6
> 
> asweep   expseg  ifreq1, p3, ifreq2
> aosc     oscil3  1, asweep, 1
> 
> out      aosc*ilevl
> 
> endin
> 
> ;Score
> f1 0 32769 10 1 ; Sine
> 
> ;Level in dB, 0dB=maximum
> ;   Strt Leng Levl Freq1 Freq2
> i1  0.00 1.47 -6      20 20000
> e
> 
> The output from this contains a single sample -32768 spike about a third of
> the way in for no apparent reason.
> 
> Anyone got any ideas?
> 
> Thanks,
> Steve Cook.

Do you mean a single spike, and nothing else... or a swept sine with an
unexplained spike in it?

I ran your orc and sco with no modifications and got a swept sine
wave... couldn't find any spikes anywhere. Maybe something's wrong with
your version of csound? (I'm currently running unofficial linux version
v3.53.0.1b).

By the way, using a big ftable like that, you won't see much benefit
from using oscil3. Just out of curiosity, I tried it with a table of
only eight points. If you have a sound editor that can open 4-channel
files (I use Snd on linux; on win95, maybe CoolEdit? I don't know.), you
can see clearly the difference in the output of the different oscils.
More importantly, you can hear them. With a more reasonable size of
ftable, the differences won't be as dramatic.

;Orc
sr     = 44100
kr     = 4410
ksmps  = 10
nchnls = 4

instr    1 ; Sine sweep generator

ilevl    = ampdb(96 + p4)
ifreq1   = p5
ifreq2   = p6

asweep   expseg  ifreq1, p3, ifreq2
aosc1   oscil ilevl, asweep, 1
aosc2   oscili ilevl, asweep, 1
aosc3   oscil3  ilevl, asweep, 1

outs    aosc1, aosc1, aosc2, aosc3
endin

;Score
f1 0 8 10 1 ; VERY ROUGH SINE

;Level in dB, 0dB=maximum
;   Strt Leng Levl Freq1 Freq2
i1  0.00 1.47 -6      20 20000
e




-- 

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

zarmzarm@erols.com      http://members.tripod.com/~slinkP
=========================================================


Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa10807;
          9 May 99 6:34 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10gMEb-0001Vl-00
	for jpff@maths.bath.ac.uk; Sun, 9 May 1999 06:34:41 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (GAA09658); Sun, 9 May 1999 06:31:44 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 9 May 1999 06:31:32 +0100
Received: from mail4.lig.bellsouth.net [205.152.0.32] by hermes via ESMTP (GAA00549); Sun, 9 May 1999 06:31:31 +0100 (BST)
Received: from bellsouth.net (host-216-76-185-68.gnv.bellsouth.net [216.76.185.68])
	by mail4.lig.bellsouth.net (8.8.8-spamdog/8.8.5) with ESMTP id BAA22361
	for ; Sun, 9 May 1999 01:22:34 -0400 (EDT)
Message-ID: <37351DD2.C7C4C57B@bellsouth.net>
Date: Sun, 09 May 1999 01:32:02 -0400
From: Patrick Pagano 
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound List 
Subject: Finally
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi Folks
many thanks to you all for help on Delay and reverb(especially Tobiah)
got them both working !!!!
what I am trying to do know is to get a looping delay functioning heres
my files
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

gasig init 0
instr 1
     idur        =         p3
     iamp        =         p4

     iattack     =         p5
     irelease    =         p6
     irvbtime    =         p7
     irvbgain    =         p8
     ifqc           =         p9
     kamp        linen     iamp, iattack, idur, irelease
     asig        oscili      iamp,ifqc,1
     arampsig    =         kamp * asig
     aeffect     reverb    asig, irvbtime
     arvbreturn  =         aeffect * irvbgain
     gasig=gasig+ arampsig+arvbreturn
  endin


instr 99
                kDelaydecay     init            .4;;;;;;;;;;;;;;;do I
add it here??
                iDelaytime      init            1;;;;;;;;;;;;;or here???

                asig7            delayr          iDelaytime
                                delayw          kDelaydecay * (gasig+
asig7);;;;;;;;;;do i need to add a deltapi????
                                outs             asig7 + gasig,asig7
+gasig

                gasig           =               0
endin
f1 0  8192 10  1     ;GEN10 Sine Wave

; p1=Instr  p2:Start  p3:Duration  p4:iamp  p5:iattack  p6:irelease
p7:irvbtime  p8:irvbgain  p9:ifqc
i1                      0    28   40    0.2    0.2    2.3    0.1    512
i1                      1    27   25    0.5    0.6    2.5    0.5    567
i1              2.222222    26    20    0.4    0.2    1.7    0.2    588
i1              4.444445    24    40    0.1    0.1    1.3    0.1    756
i1              6.666667    22    30    0.1    0.2    1.9    0.2    768
i1              8.888889    20    40    0.4    0.2    1.4    0.2    784
;;;;;;;;;LaMonte Youngs Well Tuned Piano Frequencies
i1              11.11111    17    30    0.2    0.1    1.4    0.1    896
i1              13.33333    15    40    0.5    0.1    2.1    0.1    1008

i1              15.55556    13    40    0.4    0.1    1.2    0.1    1024

i1              17.77778    11    60    0.4    0.2    2.5    0.2    1134

i1              18.33333    10    60    0.5    0.1    2.1    0.1    1152

i1              19.55556    10    40    0.4    0.1    1.2    0.1    1344

i1              19.77778    10    40    0.4    0.2    2.5    0.2    1512

i1                    20    10    40    0.1    0.1    1.4    0.1    1536

i99 0 30
e
;;;;;;;;how do i go about this
Any help is always appreciated
Pat



Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa10956;
          9 May 99 9:08 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10gOdF-0001Ww-00
	for jpff@maths.bath.ac.uk; Sun, 9 May 1999 09:08:17 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (JAA17301); Sun, 9 May 1999 09:05:58 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 9 May 1999 09:05:47 +0100
Received: from smtp4.erols.com [207.172.3.237] by hermes via ESMTP (JAA10476); Sun, 9 May 1999 09:05:46 +0100 (BST)
Received: from erols.com (209-122-227-171.s171.tnt2.nyw.ny.dialup.rcn.com [209.122.227.171])
	by smtp4.erols.com (8.8.8/smtp-v1) with ESMTP id EAA19922;
	Sun, 9 May 1999 04:05:34 -0400 (EDT)
Message-ID: <37354297.C86B4179@erols.com>
Date: Sun, 09 May 1999 04:08:55 -0400
From: Paul Winkler 
X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686)
MIME-Version: 1.0
To: Tobiah , Csound List 
Subject: Re: Reverb quest, again
References: <372CC78B.4C2DCA45@erols.com> <372CFBDE.50955468@rcsreg.com> <372D1058.A50C008@erols.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

I wrote:
> Yeah, I've been using DAP as well. It's really nice, though there are
> some basic interface design things that really bug me (all those damn
> windows!) It has three reverb types -- Moorer, Schroeder, and Multi-Tap.
> I think the Moorer sounds pretty good, but using it on a five-minute
> file (which I want to do here) is enough to kill me.

Actually it was the Multi-Tap mode I was thinking of. It sounds smoother
than any reverb orc/sco I've heard in Csound yet except convolution.
Might be worth trying to read the source and translate it to Csound...
but I don't know when I'd ever have time for that.

I've been doing convolve in the past few days, and it really sounds
quite good, even with less-than-pristine impulse recordings such as I
can make myself by popping balloons. I just spent part of today down in
the basement doing that... I ran out of balloons before I got the hang
of it, but I did try convolution with some of the files I did get and
it's quite remarkable. And slow... it'll take some serious
next-generation hardware to get convolve in the realm of realtime.

To anyone wishing to try it, I found this file is really quite nice (if
a big download):
http://wwwvms.utexas.edu/~fredrics/domkyrkan1.aiff

Note that something seems to be wrong with the file-- I had to try
opening it with a few different apps before I got it to read OK. And it
seems to be truncated at 4.6 seconds, after which there's a whole lot of
silence. I smoothed out the ending by mixing in a little artificial
reverb of the real reverb, and chopped the silence.

Here's an orc and sco:

; orc based on example in manual by Greg Sullivan
; NOTE: sr should equal sr of convolve file for best results!
            
        sr = 44100
        kr = 441
        ksmps = 100
        nchnls = 2

        instr   1
iwetmix = 0.012 ; Wet/dry mix. Vary as desired.
		; I've found that very low levels of wet signal are
		; adequate.
idrymix = 1 - iwetmix
ivol = .7  ; Overall volume level of reverb. May need to adjust 
            ; when wet/dry mix is changed, to avoid clipping.
iwetmix = iwetmix * ivol
idrymix = idrymix * ivol
adry1, adry2    soundin "file_you_want_to_effect" 
awet1, awet2 convolve adry1,"domkyrkan1.cv" ; convolved (wet) audio
;;; for domkyrkan1.cv: 
;;; actually I think I accidentally truncated the sound by a bad
;;; download, so it may be a longer delay time is needed!
;;; See the manual!
idel = 4.6
            ; Subtract impulse response initial delay from idel...
            ; you can also use this to increase the reverb pre-delay,
            ; jusr remember that bigger idel makes dry sound LATER.
            ; I assume .04
idel = idel - .04
adry1   delay   idrymix * adry1,idel
adry2   delay   idrymix * adry2,idel  ; Delay dry signal, to align w 
                                   ; convolved signal. Apply level 
                                   ; adjustment here too.
outs    adry1+iwetmix*awet1 , adry2+iwetmix*awet2 
endin




Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa11148;
          9 May 99 12:23 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
	by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
	id 10gRgY-0001Yj-00
	for jpff@maths.bath.ac.uk; Sun, 9 May 1999 12:23:54 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (MAA02493); Sun, 9 May 1999 12:19:59 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 9 May 1999 12:19:44 +0100
Received: from mail3.svr.pol.co.uk [195.92.193.19] by hermes via ESMTP (MAA10872); Sun, 9 May 1999 12:19:43 +0100 (BST)
Received: from modem-64.gadolinium.dialup.pol.co.uk ([62.136.31.192] helo=internetpc)
	by mail3.svr.pol.co.uk with smtp (Exim 2.12 #1)
	id 10gRcV-00058p-00
	for csound@maths.ex.ac.uk; Sun, 9 May 1999 12:19:43 +0100
Message-ID: <006801be9a0d$f5cc1e80$c01f883e@internetpc>
From: richard 
To: csound@maths.ex.ac.uk
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
Subject: Previously sent but this time from the correct address
Date: Sun, 9 May 1999 12:20:35 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0065_01BE9A16.56E10CA0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

This is a multi-part message in MIME format.

------=_NextPart_000_0065_01BE9A16.56E10CA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello. I've just subscribed and it was suggested that I introduce myself =
re csound ab/usage. I've been using csound for around 3 years now on the =
pc platform. I've been using the John Fitch version and he has been very =
helpful in giving me some pointers during my pre-web-access days. Thanks =
John. I use Csound "as is" because I have no C programming skills.
=20
Most of the stuff I've produced has amounted to a catalogue of fragments =
awaiting a form but I'm fairly pleased with a body of work which is =
available from me on cd if your interested. Contact my "distributor" - =
William Edmondes at will@unsoundauto.demon.co.uk for info. The cd =
includes my first 'serious' piece called "oboe 1997" which features =
Thomas Davey on oboe and is essentially a transfiguration of recordings =
made from a score written originally for flute. Three more recent works =
precede this on the disc and are probably more characteristic of where =
my head is at the moment.

My web site, which is lacking sound at the moment, can be found at =
http://www.simulacrum.freeserve.co.uk=20

Many thanks,

Richard

------=_NextPart_000_0065_01BE9A16.56E10CA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable








Hello. I've just subscribed and it was suggested = that I=20 introduce myself re csound ab/usage. I've been using csound for around 3 = years=20 now on the pc platform. I've been using the John Fitch version and he = has been=20 very helpful in giving me some pointers during my pre-web-access days. = Thanks=20 John. I use Csound "as is" because I have no C programming = skills.
 
Most of the stuff I've produced has amounted to a = catalogue of=20 fragments awaiting a form but I'm fairly pleased with a body of work = which is=20 available from me on cd if your interested. Contact my "distributor" - = William=20 Edmondes at will@unsoundauto.demon.co.uk= for=20 info. The cd includes my first 'serious' piece called "oboe 1997" which = features=20 Thomas Davey on oboe and is essentially a transfiguration = of recordings=20 made from a score written originally for flute. Three more recent works = precede=20 this on the disc and are probably more characteristic of where my head = is at the=20 moment.
 
My web site, which is lacking sound at the moment, = can be=20 found at http://www.simulacrum.free= serve.co.uk=20
 
Many thanks,
 
Richard
------=_NextPart_000_0065_01BE9A16.56E10CA0--