| At a-rate, using rand (or randi) in 31 bit mode outputs positive numbers
only. 16 bit mode still outputs positive and negative numbers, as always.
Is this the way it is supposed to work? This observation based on Cyrix
6x86 running Winsound under Windows 95.
Thank you.
-David.
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04665;
30 Dec 98 10:48 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zvJAp-000083-00; Wed, 30 Dec 1998 10:48:19 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (KAA09859); Wed, 30 Dec 1998 10:45:56 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Wed, 30 Dec 1998 10:45:44 GMT
Received: from agora.stm.it [195.62.32.1] by hermes via ESMTP (KAA10558); Wed, 30 Dec 1998 10:45:43 GMT
Received: from agora.stm.it (ppp04-12.dial-access.stm.it [195.62.37.204]) by agora.stm.it (8.8.8/8.8.5) with ESMTP id LAA21082; Wed, 30 Dec 1998 11:45:23 +0100 (ITA)
Message-ID: <3688925B.CE1D8499@agora.stm.it>
Date: Tue, 29 Dec 1998 09:27:07 +0100
From: Gabriel Maldonado
X-Mailer: Mozilla 4.06 [en] (Win95; I)
MIME-Version: 1.0
To: Yair Kass
CC: Csound list
Subject: Re: Direct2.11 tip
References: <3687BD8A.8D1CEBF0@netvision.net.il>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
DirectCsound 2.1 suffers of a serious bug: if one use variables before it was defined, no
error messages are shown. The variables are used containig zero.
This bug is fixed in version 2.11
Yair Kass wrote:
>
> Hi list,
>
> This is something i encountered when moving
> from Direct2.1 to Direct2.11.
> I wouldn't say it's a bug (maybe an improvement)
> but i'm reporting this for those who may be interested:
>
> The code below plays a sine wave while the user
> controls the depth of a vibrato.
> Direct2.1 didn't mind that 'kenv' is used
> (as the max. value for 'kenvdp') before it is defined.
> But Direct2.11 DID.
> To fix that, just put the 'kenvdp ctrl7.........' line
> AFTER 'kenv' is defined.
>
> I know this may sound (or be) very trivial but since
> there was a difference between the two version's
> performance, I thought I'd say something.
> Hope this helps (:-}
> Yair
>
> ;------------------------------------------------------------
> sr = 44100
> kr = 441
> ksmps = 100
> nchnls = 1
>
> instr 1
> ihold ;Keep instrument on.
>
> kenvdp ctrl7 1,1, 1,kenv ;Controls the depth of the vibrato
>
> kenv oscili 0.5,2,1 ;Vib -
> kenv = kenv+0.5 ; - rato
>
> asig oscili 20000,440,1 ;Carrier
> aout = asig*kenvdp ;Modulate
> out aout
> endin
> ;--------------------------------------------------------------
> f1 0 4096 10 1 ;Simple sine wave
> f0 600
> i1 0 1
> e
> ;--------------------------------------------------------------
--
Gabriel Maldonado
http://www.agora.stm.it/G.Maldonado/home2.htm
|