| David Boothe wrote:
>
> Through a little reasoning, but mostly trial and error, I came up with
Nice work, but it's not right. The best way is to look at the source code
if you can. Here's what I get.
There are nine compulsory arguments to grain, and one optional, which is
currently undocumented. My suggestion for new documentation of grain
follows at end of post.
Errors in present documentation:
- There is no igdur argument; this must be a typo, referring to kgdur.
- There is an optional 10th argument. If non-zero, grains will always
begin reading from the start of the igfn (soundfile) table, rather
than from random points.
- Also, xamp does NOT scale amplitude as suggested, but is just a raw
value for grain amp.
> It might be fun to play around with kgdur, but it takes so long (for me,
> at least) to program grain for the results I hear in my head, that I've
> been content not to add that extra layer of uncertainty.
grain is meant for creating textures with the general flavour of the input
sound. Note that you can use fof2 or fog (as soon as the bugs are weeded out),
with random indexing of the sound table (args kphs and xspd respectively)
and get more control over the result. That is, with fog/fof2 you're not welded
into using all of the sound for a texture, but you can eg do gradually changing
textures by moving across a changing sound.
grain still might have a place however, since it's more than twice as fast
as fog/fof2 for its particular task: Massive textures of (usually short) grains.
This is an argument against making it allocate its memory dynamically.
grain does not interpolate the original sound, so due to integer division
errors output with different pitch from the original will have some
harmonic distortion (same problem as recently reported for fof2 opcode).
Regards,
re
*********** NEW DOC FOR grain OPCODE **************
ar grain xamp, xpitch, xdens, kampoff, kpitchoff, kgdur, igfn, iwfn, imgdur [, igrnd]
Generates granular synthesis textures.
INITIALISATION
igfn - The ftable number of the grain waveform. This can be just a sine wave or a sampled sound.
igwn - Ftable number of the amplitude envelope used for the grains (see also GEN20).
imgdur - Maximum grain duration in seconds. This the biggest value to be assigned to kgdur.
igrn - (optional) if non-zero, turns off grain offset randomness. This means that all grains will begin reading from the beginning of the igfn table. If zero (the default), grains will start reading from random iwfn table positions.
PERFORMANCE
xamp - Amplitude of each grain.
xpitch - Grain pitch. To use the original frequency of the input sound, use the formula
sndsr / ftlen(igfn)
where sndsr is the original sample rate of the igfn sound.
xdens - Density of grains measured in grains per second. If this is constant then the output is synchronous granular synthesis, very similar to fof. If xdens has a random element (like added noise), then the result is more like asynchronous granular synthesis.
kampoff - Maximum amplitude deviation from kamp. This means that the maximum amplitude a grain can have is kamp + kampoff and the minimum is kamp. If kampoff is set to zero then there is no random amplitude for each grain.
kpitchoff - Maximum pitch deviation from kpitch in cps. Similar to kampoff.
kgdur - Grain duration in seconds. The maximum value for this should be declared in imgdur. If kgdur at any point becomes greater than imgdur, it will be truncated to imgdur.
EXAMPLE
A texture with gradually shorter grains and wider amp and pitch spread
;;;;;;;;;;;;;;; graintest.orc
instr 1
insnd = 10
ibasfrq = 32000 / ftlen(insnd) ; Use original sample rate of insnd file
kamp expseg 8000, p3/2, 8000, p3/2, 16000
kpitch line ibasfrq, p3, ibasfrq * .8
kdens line 600, p3, 200
kaoff line 0, p3, 5000
kpoff line 0, p3, ibasfrq * .5
kgdur line .4, p3, .1
imaxgdur = .5
ar grain kamp, kpitch, kdens, kaoff, kpoff, kgdur, insnd, 5, imaxgdur, 0.0
out ar
endin
;;;;;;;;;;;;;;; graintest.sco
f5 0 512 20 2 ; Hanning window
f10 0 65536 1 "Sound.wav" 0 0 0
i1 0 10
e
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21059;
12 Apr 98 21:35 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa00408;
12 Apr 98 21:34 BST
Received: (qmail 18001 invoked from network); 12 Apr 1998 20:35:04 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 12 Apr 1998 20:35:04 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA22689); Sun, 12 Apr 1998 21:32:32 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 21:31:47 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via SMTP (VAA22101); Sun, 12 Apr 1998 21:31:37 +0100 (BST)
Received: from omphalos.maths.bath.ac.uk (maths.Bath.AC.UK) [138.38.99.25] (mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 1.82 #1)
id 0yOTPL-000448-00; Sun, 12 Apr 1998 21:31:19 +0100
Date: Sun, 12 Apr 98 21:31:28 BST
From: jpff@maths.bath.ac.uk
Subject: Re: realtime csound
To: dbarlow@omnids.com, csound@maths.ex.ac.uk
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Message written at 11 Apr 1998 18:45:55 +0100
--- Copy of mail to mikeb@nmol.com ---
In-reply-to: <352D08DC.90A164FA@nmol.com> (message from Mike Berry on Thu, 09
Apr 1998 11:43:57 -0600)
References: <01BD63A5.23521EE0.dbarlow@omnids.com> <352D08DC.90A164FA@nmol.com>
>>>>> "Mike" == Mike Berry writes:
Mike> Dustin Barlow wrote:
>>
>> Thank you John for proving my case....notice what machine is on top?
>>
Mike> Just to be ornery, notice that there is no PPC in the bunch (not John's fault
Mike> - he just doesn't have one).
Mike> --
Oh yes he has! It is however rather old (6100/66) and so is not
terribly important. I just do not use it much for sounds.
Anyway
Test Bach-d Bach-m Riss-g Riss-m Guit-d Guit-m Jame-g pvanal lpanal
Length 115.73s 115.73s 63.75s 63.75s 87.75s 87.75s 6.75s 6.75s 5.00s
------------------------------------------------------------------------------
PenII 1.98 1.32 3.86 2.69 5.17 4.5 0.33 8.24 0.55
R5000SC 4.7 3.7 2.7 2.3 6.1 4.6 0.4 3.9 2.5
...
7100/80b 12.63 9.37 9.57 7.58 17.85 14.20 1.70 - -
7200/90b 17.28 11.60 11.72 9.02 21.87 16.93 2.72 - -
where ....
7100/80 -- Macintosh 7100/80, Mac OS 7.5.3, PPC Csound Version 4/2/95
EAD, 256K L2 cache, 768K disk cache, tested by Kirk Corey
with -b40960 option set to do reasonable output buffering
(kirk-corey@uiowa.edu) on 24 Apr 96
7200/90b -- Macintosh 7200/90, Mac OS 7.5.2, PPC Csound Version 4/2/95
EAD, no L2 cache, 256K disk cache, tested by Kirk Corey
with -b40960 option set to do reasonable output buffering
(kirk-corey@uiowa.edu) on 24 Apr 96
Yep, I could do with some more recent numbers.
==John ffitch
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21065;
12 Apr 98 21:35 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa00416;
12 Apr 98 21:34 BST
Received: (qmail 18004 invoked from network); 12 Apr 1998 20:35:08 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 12 Apr 1998 20:35:08 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA12222); Sun, 12 Apr 1998 21:32:43 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 21:31:40 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via SMTP (VAA18270); Sun, 12 Apr 1998 21:31:33 +0100 (BST)
Received: from omphalos.maths.bath.ac.uk (maths.Bath.AC.UK) [138.38.99.25] (mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 1.82 #1)
id 0yOTPa-00044D-00; Sun, 12 Apr 1998 21:31:34 +0100
Date: Sun, 12 Apr 98 21:31:44 BST
From: jpff@maths.bath.ac.uk
Subject: Re: naming conventions variables/opcodes
To: csound@maths.ex.ac.uk
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Message written at 11 Apr 1998 21:21:43 +0100
--- Copy of mail to r.pinkston@mail.utexas.edu ---
In-reply-to: <3.0.1.32.19980410070153.0073bd1c@mail.utexas.edu>
(r.pinkston@mail.utexas.edu)
References: <3.0.1.32.19980410070153.0073bd1c@mail.utexas.edu>
Actually mixed case variables have been in my code forf some time.
Also _ as a character, just like C
wrt teh name clash proble, unfortunately it is not as easy as I
would like. It is high on my list to hack. i will try over Easter.
==John ffitch
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21071;
12 Apr 98 21:35 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa00432;
12 Apr 98 21:35 BST
Received: (qmail 5471 invoked from network); 12 Apr 1998 20:35:29 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 12 Apr 1998 20:35:29 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA08443); Sun, 12 Apr 1998 21:32:59 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 21:32:07 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via SMTP (VAA10537); Sun, 12 Apr 1998 21:31:54 +0100 (BST)
Received: from omphalos.maths.bath.ac.uk (maths.Bath.AC.UK) [138.38.99.25] (mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 1.82 #1)
id 0yOTPw-00044U-00; Sun, 12 Apr 1998 21:31:56 +0100
Date: Sun, 12 Apr 98 21:32:05 BST
From: jpff@maths.bath.ac.uk
Subject: Re: digest mode
To: csound@maths.ex.ac.uk
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Message written at 12 Apr 1998 15:32:37 +0100
--- Copy of mail to carwilk@prodigy.net ---
In-reply-to: <352F8845.F7666B4E@prodigy.net> (message from Carlton Wilkinson
on Sat, 11 Apr 1998 11:12:07 -0400)
References: <352F8845.F7666B4E@prodigy.net>
The reason you cannot find the information about the digest form of
csund is that it is not an official part of the list. I run a digest
service of the messages I receive. The mechanism is a LISP file in my
file space at the University, and I have not bothered to make an
automated variant of it. I suppose I could do that, but as for most
of us my time is limited. I should be marking rather than replying to
this message!
==John ffitch
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21077;
12 Apr 98 21:36 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa00465;
12 Apr 98 21:35 BST
Received: (qmail 5475 invoked from network); 12 Apr 1998 20:35:57 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 12 Apr 1998 20:35:57 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA10477); Sun, 12 Apr 1998 21:33:31 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 21:32:52 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via SMTP (VAA15263); Sun, 12 Apr 1998 21:32:42 +0100 (BST)
Received: from omphalos.maths.bath.ac.uk (maths.Bath.AC.UK) [138.38.99.25] (mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 1.82 #1)
id 0yOTQi-00044h-00; Sun, 12 Apr 1998 21:32:44 +0100
Date: Sun, 12 Apr 98 21:32:53 BST
From: jpff@maths.bath.ac.uk
Subject: Re: csound on NT...
To: csound@maths.ex.ac.uk
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Message written at 12 Apr 1998 16:11:35 +0100
--- Copy of mail to dbarlow@omnids.com ---
In-reply-to: <01BD646C.EA529C50.dbarlow@omnids.com> (message from Dustin
Barlow on Fri, 10 Apr 1998 10:39:17 -0700)
References: <01BD646C.EA529C50.dbarlow@omnids.com>
The files I have been using since October 1994 are in
ftp.maths.bath.ac.uk:pub/dream/documentation/benchmarks/...
Yes this is a long time ago and machines are much faster, and so some
of these tests may seem too small. The history is that some peopel
kept asking about relative performance, and after a number of
"wouldn't it me nice to have some benchmarks" and nothing happening, I
created this small set from files distributed from MIT. If anyone
wishes to take them over, propose a new set, and collect figures, they
are most welcome.
==John ffitch
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21089;
12 Apr 98 21:36 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa00491;
12 Apr 98 21:35 BST
Received: (qmail 5478 invoked from network); 12 Apr 1998 20:36:10 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 12 Apr 1998 20:36:10 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (VAA05670); Sun, 12 Apr 1998 21:33:42 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 21:33:12 +0100
Received: from exim@wallace.maths.bath.ac.uk [138.38.100.104] by hermes via SMTP (VAA20096); Sun, 12 Apr 1998 21:33:04 +0100 (BST)
Received: from omphalos.maths.bath.ac.uk (maths.Bath.AC.UK) [138.38.99.25] (mmdf)
by wallace.maths.bath.ac.uk with smtp (Exim 1.82 #1)
id 0yOTR3-00044n-00; Sun, 12 Apr 1998 21:33:05 +0100
Date: Sun, 12 Apr 98 21:33:14 BST
From: jpff@maths.bath.ac.uk
Subject: Re: [my vote]: ETA feature request
To: csound@maths.ex.ac.uk
Message-Id:
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Message written at 12 Apr 1998 16:58:28 +0100
In-reply-to: <352D3F2F.38D3@hem.passagen.se> (message from rasmus ekman on
Thu, 09 Apr 1998 23:35:43 +0200)
References: <352AB2F8.74B4@hexagon.se> <352D3F2F.38D3@hem.passagen.se>
Currently I have
-H or -H1 Rotating wheel
-H2 A dot printed for every buffer
-H3 The time in the output (overwritten by next time)
I can include others, ot modify these easily. I have a reasonably
generic code there now. I am not sure what it should do on Windows
for example. As ever advice listene to, but not necessarily acted
upon.
==John ffitch
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21132;
12 Apr 98 22:11 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa02403;
12 Apr 98 22:11 BST
Received: (qmail 5653 invoked from network); 12 Apr 1998 21:11:27 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 12 Apr 1998 21:11:27 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA25195); Sun, 12 Apr 1998 22:08:44 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 22:08:20 +0100
Received: from antiochus-fe0.ultra.net [146.115.8.188] by hermes via ESMTP (WAA03947); Sun, 12 Apr 1998 22:08:14 +0100 (BST)
Received: from jhvh1 (trismegist.ultranet.com [199.232.96.18]) by antiochus-fe0.ultra.net (8.8.8/ult.n14767) with SMTP id RAA31117; Sun, 12 Apr 1998 17:08:00 -0400 (EDT)
Message-Id: <3.0.3.32.19980412171049.0093cb70@pop.ma.ultranet.com>
X-Sender: maliq@pop.ma.ultranet.com
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.3 (32)
Date: Sun, 12 Apr 1998 17:10:49 -0400
To: rasmus ekman ,
David Boothe
From: Code Spaz
Subject: Re: Grain Syntax / amended documentation
Cc: Csound List
In-Reply-To: <35310695.420D@hexagon.se>
References:
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
......
I was hoping you'd catch the other apparent typos in here... you use the
args xamp and xpitch for the 'prototype' at the top, then in the body, you
use 'kamp' and kpitch'. This was confusing at first, until you posted the
example which uses the latter notation as well.
The 'x' is important to signify that these args can be init, k-rate, or
a-rate; is it not?
Thanks for revising, and keep up the good work,
DQ
>
>*********** NEW DOC FOR grain OPCODE **************
>
> ar grain xamp, xpitch, xdens, kampoff, kpitchoff, kgdur, igfn,
iwfn, imgdur [, igrnd]
>
>Generates granular synthesis textures.
>
>
>INITIALISATION
>
>igfn - The ftable number of the grain waveform. This can be just a sine
wave or a sampled sound.
>
>igwn - Ftable number of the amplitude envelope used for the grains (see
also GEN20).
>
>imgdur - Maximum grain duration in seconds. This the biggest value to be
assigned to kgdur.
>
>igrn - (optional) if non-zero, turns off grain offset randomness. This
means that all grains will begin reading from the beginning of the igfn
table. If zero (the default), grains will start reading from random iwfn
table positions.
>
>
>PERFORMANCE
>
>xamp - Amplitude of each grain.
>
>xpitch - Grain pitch. To use the original frequency of the input sound,
use the formula
> sndsr / ftlen(igfn)
> where sndsr is the original sample rate of the igfn sound.
>
>xdens - Density of grains measured in grains per second. If this is
constant then the output is synchronous granular synthesis, very similar to
fof. If xdens has a random element (like added noise), then the result is
more like asynchronous granular synthesis.
>
>kampoff - Maximum amplitude deviation from kamp. This means that the
maximum amplitude a grain can have is kamp + kampoff and the minimum is
kamp. If kampoff is set to zero then there is no random amplitude for each
grain.
>
>kpitchoff - Maximum pitch deviation from kpitch in cps. Similar to kampoff.
>
>kgdur - Grain duration in seconds. The maximum value for this should be
declared in imgdur. If kgdur at any point becomes greater than imgdur, it
will be truncated to imgdur.
>
>
>EXAMPLE
>
>A texture with gradually shorter grains and wider amp and pitch spread
>
>;;;;;;;;;;;;;;; graintest.orc
>
>instr 1
> insnd = 10
> ibasfrq = 32000 / ftlen(insnd) ; Use original sample rate of insnd file
> kamp expseg 8000, p3/2, 8000, p3/2, 16000
> kpitch line ibasfrq, p3, ibasfrq * .8
> kdens line 600, p3, 200
> kaoff line 0, p3, 5000
> kpoff line 0, p3, ibasfrq * .5
> kgdur line .4, p3, .1
> imaxgdur = .5
> ar grain kamp, kpitch, kdens, kaoff, kpoff, kgdur, insnd, 5,
imaxgdur, 0.0
>
> out ar
>endin
>
>;;;;;;;;;;;;;;; graintest.sco
>
>f5 0 512 20 2 ; Hanning window
>f10 0 65536 1 "Sound.wav" 0 0 0
>
>i1 0 10
>
>e
>
>
>
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21138;
12 Apr 98 22:12 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa02489;
12 Apr 98 22:12 BST
Received: (qmail 18661 invoked from network); 12 Apr 1998 21:12:37 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 12 Apr 1998 21:12:37 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA15023); Sun, 12 Apr 1998 22:10:16 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 22:09:52 +0100
Received: from dry3.jps.net [208.25.63.31] by hermes via ESMTP (WAA22964); Sun, 12 Apr 1998 22:09:45 +0100 (BST)
Received: from gv.net.gv.net (istk-port1370.jps.net [205.217.61.120])
by dry3.jps.net (8.8.5/8.8.5) with SMTP id OAA16954
for ; Sun, 12 Apr 1998 14:10:00 -0700 (PDT)
Message-Id: <008801bd6657$296f7480$783dd9cd@gv.net.gv.net>
Reply-To: Ken Locarnini
From: Ken Locarnini
To: CSound Mailing List
Subject: Dual or more Pentium's
Date: Sun, 12 Apr 1998 14:08:23 -0700
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.2106.4
X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
So what would multiple processors do, double the speed? the power?
Confused.
Ken
----------------------------------------------------------------------------
----
The Renew Eden Project
"You will see it, when you believe it."
----------------------------------------------------------------------------
----
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21161;
12 Apr 98 22:45 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa04111;
12 Apr 98 22:44 BST
Received: (qmail 5802 invoked from network); 12 Apr 1998 21:45:09 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 12 Apr 1998 21:45:09 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (WAA07019); Sun, 12 Apr 1998 22:38:58 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Sun, 12 Apr 98 22:38:40 +0100
Received: from wfreno@opus.vcn.bc.ca [207.102.64.2] by hermes via ESMTP (WAA17032); Sun, 12 Apr 1998 22:38:33 +0100 (BST)
Received: from localhost (wfreno@localhost)
by vcn.bc.ca (8.8.5/8.8.5) with SMTP id OAA17829;
Sun, 12 Apr 1998 14:38:11 -0700 (PDT)
Date: Sun, 12 Apr 1998 14:38:11 -0700 (PDT)
From: Wayne Freno
To: rasmus ekman
Cc: Csound list
Subject: Re: Winsound
In-Reply-To: <35309EBD.4120@hem.passagen.se>
Message-Id:
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
On Sun, 12 Apr 1998, rasmus ekman wrote:
> Wayne Freno wrote:
> >
> > I think maybe this question has been asked recently,
> > but at the time I was using the DOS version, so I didn't
> > pay much attention but...
>
> You're right, it has. The recent mails to the list *should* be
> listed by subject/name/author on
> http://www.maths.ex.ac.uk/~james/csound_list/
> but this seems broken at the moment?
Yes it seems to still be down still.
end soundbite
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21245;
13 Apr 98 0:03 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa08620;
13 Apr 98 0:03 BST
Received: (qmail 21234 invoked from network); 12 Apr 1998 23:03:25 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 12 Apr 1998 23:03:25 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (AAA06150); Mon, 13 Apr 1998 00:00:57 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Mon, 13 Apr 98 00:00:36 +0100
Received: from howl.werewolf.net [206.103.224.20] by hermes via SMTP (AAA13722); Mon, 13 Apr 1998 00:00:30 +0100 (BST)
Received: from hljmm by howl.werewolf.net via SMTP (950413.SGI.8.6.12/940406.SGI)
for id SAA02381; Sun, 12 Apr 1998 18:00:31 -0500
From: Hans Mikelson
To: csound@maths.ex.ac.uk
MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.stork
Subject: Re: naming conventions variables/opcodes
Date: Sun, 12 Apr 1998 18:00:52 -0500
Message-Id: <01bd6666$d777ec60$70e167ce@hljmm>
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.71.1712.3
X-Mimeole: Produced By Microsoft MimeOLE V4.71.1712.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hi,
In my opinion, anyone writing opcodes should avoid naming them with the
first letters k, a, i, gk, ga, or gi. krnd was probably a particularly poor
choice although perhaps its not too late to change it.
Bye,
Hans Mikelson
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21333;
13 Apr 98 0:33 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa10397;
13 Apr 98 0:33 BST
Received: (qmail 6375 invoked from network); 12 Apr 1998 23:33:33 -0000
Received: from mail.infohouse.com (HELO milhouse.infohouse.com) (206.30.88.4)
by mercury.bath.ac.uk with SMTP; 12 Apr 1998 23:33:33 -0000
Received: from [208.151.41.196] ([208.151.41.201])
by milhouse.infohouse.com (Post.Office MTA v3.1 release PO205e
ID# 141-39833U2500L250S0) with ESMTP id AAA110;
Sun, 12 Apr 1998 19:32:06 -0400
X-Sender: ic11748@mail.infohouse.com
Message-Id:
In-Reply-To: <199804111715.TAA16287@dns.rdn.it>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sun, 12 Apr 1998 19:33:16 -0400
To: jpff@maths.bath.ac.uk, csound@maths.ex.ac.uk
MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.stork
From: tolve
Subject: Re: Looking towards v3.48
hello john,
actually skimmed the manual first this time. if in fact the answer really
isn't in it, kindly consider adding capability to call "srand" to enter
value of current time into seed in the rand family. perhaps the following
from NY Software Newspaper will better explain:
"ANSI C provides two functions: nit rand(); void srand (unsigned int seed);
rand returns a pseudo-random integer based upon some calculations on a
seed, so if the program is run over and over, the output will be the same
sequence of numbers. One trick that beats this is to call srand to seed the
random number generator with the current time."
now please don't go asking me any questions about this stuff 'cause i don't
program.
thank you for your consideration and continued efforts!
tolve
>At 12.28 06/04/98 BST, you wrote:
>
>>Friends (and enemies?)
>>
>>I am looking to release a new version soon. So if you have things you
>>really want me to include this time round now is the time to speak.
>>.......
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21339;
13 Apr 98 0:36 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa10497;
13 Apr 98 0:35 BST
Received: (qmail 21928 invoked from network); 12 Apr 1998 23:35:50 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 12 Apr 1998 23:35:50 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (AAA26782); Mon, 13 Apr 1998 00:33:07 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Mon, 13 Apr 98 00:32:46 +0100
Received: from mail.infohouse.com [206.30.88.4] by hermes via ESMTP (AAA17118); Mon, 13 Apr 1998 00:32:40 +0100 (BST)
Received: from [208.151.41.196] ([208.151.41.201])
by milhouse.infohouse.com (Post.Office MTA v3.1 release PO205e
ID# 141-39833U2500L250S0) with ESMTP id AAA110;
Sun, 12 Apr 1998 19:32:06 -0400
X-Sender: ic11748@mail.infohouse.com
Message-Id:
In-Reply-To: <199804111715.TAA16287@dns.rdn.it>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sun, 12 Apr 1998 19:33:16 -0400
To: jpff@maths.bath.ac.uk, csound@maths.ex.ac.uk
MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.stork
From: tolve
Subject: Re: Looking towards v3.48
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
hello john,
actually skimmed the manual first this time. if in fact the answer really
isn't in it, kindly consider adding capability to call "srand" to enter
value of current time into seed in the rand family. perhaps the following
from NY Software Newspaper will better explain:
"ANSI C provides two functions: nit rand(); void srand (unsigned int seed);
rand returns a pseudo-random integer based upon some calculations on a
seed, so if the program is run over and over, the output will be the same
sequence of numbers. One trick that beats this is to call srand to seed the
random number generator with the current time."
now please don't go asking me any questions about this stuff 'cause i don't
program.
thank you for your consideration and continued efforts!
tolve
>At 12.28 06/04/98 BST, you wrote:
>
>>Friends (and enemies?)
>>
>>I am looking to release a new version soon. So if you have things you
>>really want me to include this time round now is the time to speak.
>>.......
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21587;
13 Apr 98 2:32 BST
Received: from mercury.bath.ac.uk by stork.maths.Bath.AC.UK id aa17116;
13 Apr 98 2:32 BST
Received: (qmail 6963 invoked from network); 13 Apr 1998 01:32:46 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by mercury.bath.ac.uk with SMTP; 13 Apr 1998 01:32:46 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (CAA01666); Mon, 13 Apr 1998 02:28:39 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Mon, 13 Apr 98 02:28:14 +0100
Received: from portal.dx.net [199.190.65.2] by hermes via ESMTP (CAA04281); Mon, 13 Apr 1998 02:28:08 +0100 (BST)
Received: from nmol.com (nmol.com [206.162.11.2])
by portal.dx.net (8.8.7/8.8.7) with SMTP id VAA12660
for ; Sun, 12 Apr 1998 21:30:18 -0400 (EDT)
X-Routed: Sun, 12 Apr 1998 19:32:08 -0500
X-Tcp-Identity: Mikeb
Received: from nmol.com [206.162.11.170] by nmol.com with smtp
id BDBPBJFP ; Sun, 12 Apr 1998 19:31:26 -0500
Message-Id: <35316AD7.8B388E8@nmol.com>
Date: Sun, 12 Apr 1998 19:31:04 -0600
From: Mike Berry
X-Mailer: Mozilla 4.04 (Macintosh; I; PPC)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: Re: Looking towards v3.48
References:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
A comment here on rand. The period of rand in csound on most platforms is
65536, or less than 2 seconds of white noise at 44.1 kHz. The repeating is audible.
I have code for a random number generator which will repeat for most seeds
about every 1 billion years at 44.1 kHz. The low end is about 100000 years.
I would be happy to pass this on to jpff. The question is: Do we replace rand
with the new code or make it a new ugen, to preserve the flawed character of
rand for old scores?
--
Mike Berry
mikeb@nmol.com
http://www.nmol.com/users/mikeb
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21691;
13 Apr 98 3:40 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa24590;
13 Apr 98 3:39 BST
Received: (qmail 25706 invoked from network); 13 Apr 1998 02:40:06 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 13 Apr 1998 02:40:06 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (DAA26569); Mon, 13 Apr 1998 03:37:05 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Mon, 13 Apr 98 03:36:40 +0100
Received: from endeavor.flash.net [209.30.0.40] by hermes via ESMTP (DAA17727); Mon, 13 Apr 1998 03:36:34 +0100 (BST)
Received: from flash.net (fwasc29-199.flash.net [209.30.57.199])
by endeavor.flash.net (8.8.8/8.8.5) with ESMTP id VAA28486
for ; Sun, 12 Apr 1998 21:36:39 -0500 (CDT)
Message-Id: <35317A6F.BE013B9C@flash.net>
Date: Sun, 12 Apr 1998 21:37:35 -0500
From: pete moss
Organization: pete moss GmbH
X-Mailer: Mozilla 4.04 [en] (Win95; I)
Mime-Version: 1.0
To: csound
Subject: [Fwd: Looking towards v3.48]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
oops, meant to send tis to the list a well as mike berry...
pete
|
|
|
|
v
pete moss wrote:
> i have had many problems in the past with the repeating sequence. and i would love to
> have a ugen which generates a longer sequence. a period of a billion years sounds
> acceptable. problem is, as you have suggested, that i have sounds that take advantage
> of the short period of rand. it might be nice to have another ugen (whats one more!) to
> generate this extra long period rand for special use. perhaps we could call it elprand
> or something. i also agree with tolve that we need a way to use the clock to seed the
> random number generator. this would be an easy addition perhaps requiring one line of
> code or as a new optional param in the instrument.
>
> pete
>
> Mike Berry wrote:
>
> > A comment here on rand. The period of rand in csound on most platforms is
> > 65536, or less than 2 seconds of white noise at 44.1 kHz. The repeating is audible.
> > I have code for a random number generator which will repeat for most seeds
> > about every 1 billion years at 44.1 kHz. The low end is about 100000 years.
> > I would be happy to pass this on to jpff. The question is: Do we replace rand
> > with the new code or make it a new ugen, to preserve the flawed character of
> > rand for old scores?
> > --
> > Mike Berry
> > mikeb@nmol.com
> > http://www.nmol.com/users/mikeb
Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22266;
13 Apr 98 12:43 BST
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa23390;
13 Apr 98 12:42 BST
Received: (qmail 18706 invoked from network); 13 Apr 1998 10:32:22 -0000
Received: from hermes.ex.ac.uk (HELO exeter.ac.uk) (144.173.6.14)
by pat.bath.ac.uk with SMTP; 13 Apr 1998 10:32:22 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (LAA15041); Mon, 13 Apr 1998 11:28:50 +0100 (BST)
Received: from hermes.ex.ac.uk by maths.ex.ac.uk; Mon, 13 Apr 98 11:28:32 +0100
Received: from mb05.swip.net [193.12.122.209] by hermes via ESMTP (LAA27526); Mon, 13 Apr 1998 11:28:25 +0100 (BST)
Received: from rasmus (dialup172-3-47.swipnet.se [130.244.172.175])
by mb05.swip.net (8.8.8/8.8.8) with SMTP
id MAA05632 for ;
Mon, 13 Apr 1998 12:28:25 +0200 (MET DST)
Message-Id: <3531E970.6E4C@hexagon.se>
Date: Mon, 13 Apr 1998 12:31:12 +0200
From: rasmus ekman
X-Mailer: Mozilla 3.0 (Win95; I)
Mime-Version: 1.0
To: Csound mailing list
Subject: Re: [my vote]: ETA feature request
References:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
jpff@maths.bath.ac.uk wrote:
>
> Currently I have
> -H or -H1 Rotating wheel
> -H2 A dot printed for every buffer
> -H3 The time in the output (overwritten by next time)
>
> I can include others, ot modify these easily. I have a reasonably
> generic code there now. I am not sure what it should do on Windows
> for example.
Why, that's obvious! Of course it should run an animation of
"Cliff the Happy Clef" while playing a 2 MB loop of Beethoven's Fifth
(optionally configurable to 8 MB of Kraftwerk's "Wir sind die Roboter").
Something similar should probably be made available for Mac users.
Otherwise, this looks pretty good to me.
re
|