| Michael Gogins writes:
>I again move for the canonical Csound build to use double-precision
floating
>point numbers for all real numbers. I would add also to use 32-bit signed
>ints for all integers (unless there is a need for 64 bits).
The usual way to do this would be to typedef a custom type which would be
used in all code where precision is critical. e.g.
#ifdef CS_DOUBLE_PRECISION
typedef double real_t;
#else
typedef float real_t;
#endif
I can imagine situations where wholesale replacement of floats with real_ts
would probably break the code ( scanf() parameters for instance ). So even
if the canonical build moved to doubles, someone would have to work out
where this was safe or not - which means you may as well make it work both
ways with a typedef.
Ross.
[ Of course you could use templates :) ]
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03519;
5 Jun 99 16:50 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qIiU-0002dL-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 16:50:38 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (QAA05255); Sat, 5 Jun 1999 16:48:34 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 16:48:21 +0100
Received: from smtp5.mindspring.com [207.69.200.82] by hermes via ESMTP (QAA05401); Sat, 5 Jun 1999 16:48:20 +0100 (BST)
Received: from Realizer (user-2ive2qr.dialup.mindspring.com [165.247.11.91])
by smtp5.mindspring.com (8.8.5/8.8.5) with SMTP id LAA19560;
Sat, 5 Jun 1999 11:47:48 -0400 (EDT)
Message-ID: <002701beaf6b$04f9e500$79d496c0@Realizer.ngt.sungard.com>
From: Michael Gogins
To: Ross Bencina , csound@maths.ex.ac.uk
MMDF-Warning: Parse error in original version of preceding line at UK.AC.Bath.maths.omphalos
Subject: Re: Higher numerical precission in Csound
Date: Sat, 5 Jun 1999 11:47:54 -0400
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.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
This question ultimately devolves to, Does it sound good? since we are (I
hope) ultimately about music here.
Two pieces of anecdotal evidence:
I bought cables from Radio Shack to run sound from my Korg M1 to my mixer.
The synthesizer sounded fine. A little later I got some similar cables from
a musical instrument store and tried them also. Believe it or not, there was
an immediately perceptible muting of the highs with the Radio Shack cables.
The synthesizer didn't sound fine with the Radio Shack cables any more. I
couldn't believe it myself.
I used to record all my Csound pieces using CD quality soundfiles (44.1 KHz
16 bit samples). I have only the sound card that came with my PC, and it
only goes up to 48 KHz 16-bit samples. When Csound and Cool Edit became able
to handle float samples, I recorded some of my favorites Csound pieces with
float samples at 48 KHz. Again, there was an immediately perceptible
increase in detail and transparency in the sound, in spite of the fact that
the sound card driver is converting the floats back to 16 bit ints.
I know, as a programmer, that 64 or 80 bit double-precision floats will
incur fewer rounding errors than 32 bit floats. As a result of the above
experiences, I am prepared to hope, or even believe, that doing all DSP
multiplications in Csound with 64 or 80 bit floats instead of 32 bit floats
will result in an immediately perceptible increase in detail and
transparency, and a clear lowering of the noise floor.
As a musician, I must tell you that in Csound patches I hear noise and
harmonic distortion that impart a slightly metallic quality to the sound in
comparison with some other synthesis code that I have used or written. (This
is not to say that Csound sounds bad - this is a very slight difference).
I also know, as a programmer, that using fewer and more standard data types
in a large body of code makes it easier to build and to maintain.
Finally, on some platforms, 64 or 80 bit floating-point operations are
faster than 32-bit operations, which may be translated to and from the
larger format anyway.
The cache hit of larger data is a real problem, but I do not think it
outweighs the above.
-----Original Message-----
From: Ross Bencina
To: csound@maths.ex.ac.uk
Date: Saturday, June 05, 1999 9:47 AM
Subject: Re: Higher numerical precission in Csound
>Michael Gogins writes:
>
>>I again move for the canonical Csound build to use double-precision
>floating
>>point numbers for all real numbers. I would add also to use 32-bit signed
>>ints for all integers (unless there is a need for 64 bits).
>
>
>
>The usual way to do this would be to typedef a custom type which would be
>used in all code where precision is critical. e.g.
>
>#ifdef CS_DOUBLE_PRECISION
>
>typedef double real_t;
>
>#else
>
>typedef float real_t;
>
>#endif
>
>I can imagine situations where wholesale replacement of floats with real_ts
>would probably break the code ( scanf() parameters for instance ). So even
>if the canonical build moved to doubles, someone would have to work out
>where this was safe or not - which means you may as well make it work both
>ways with a typedef.
>
>Ross.
>
>[ Of course you could use templates :) ]
>
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03546;
5 Jun 99 17:02 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qItf-0001sp-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 17:02:11 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (QAA09347); Sat, 5 Jun 1999 16:59:43 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 16:59:36 +0100
Received: from root@lix.intercom.es [194.179.21.2] by hermes via ESMTP (QAA06894); Sat, 5 Jun 1999 16:59:34 +0100 (BST)
Received: from intercom.es (iv2-203.intercom.es [195.76.206.203]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id SAA11532; Sat, 5 Jun 1999 18:02:13 +0100
Message-ID: <375948F7.556E9CA9@intercom.es>
Date: Sat, 05 Jun 1999 17:57:44 +0200
From: Josep M Comajuncosas
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Michael Gogins
CC: Ross Bencina , csound@maths.ex.ac.uk
Subject: Re: Higher numerical precission in Csound
References: <002701beaf6b$04f9e500$79d496c0@Realizer.ngt.sungard.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Well I see 32 or 64 bit floats are possible for all the internal computations in
Csound. Would someone be kind enough to recompile a Windoze version for that? I
would greatly appreciate that, or maybe making such option possible for the
existing version.
--
Josep M Comajuncosas
C/ Circumval.lacio 75 08790 Gelida - Penedes
Catalunya - SPAIN
home phone : 93 7792243 / 00 34 3 7792243
Csound page at http://members.tripod.com/csound/
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03553;
5 Jun 99 17:02 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qIuN-0001sr-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 17:02:55 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (RAA08253); Sat, 5 Jun 1999 17:00:49 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 17:00:41 +0100
Received: from root@lix.intercom.es [194.179.21.2] by hermes via ESMTP (RAA15724); Sat, 5 Jun 1999 17:00:40 +0100 (BST)
Received: from intercom.es (iv2-203.intercom.es [195.76.206.203]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id SAA11608; Sat, 5 Jun 1999 18:03:19 +0100
Message-ID: <37594939.A062C5D3@intercom.es>
Date: Sat, 05 Jun 1999 17:58:49 +0200
From: Josep M Comajuncosas
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Ed Hall
CC: Csound
Subject: Re: Higher numerical precission in Csound
References: <199906050227.TAA15674@screech.weirdnoise.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Ed Hall wrote:
> Ouch! Except in limited circumstances, is there any perceivable gain
> from doubling the size of virtually all data in Csound?
Yes, it is deemed necessary for some recursive filters and other computations very
sensitive to roundoff errors.
--
Josep M Comajuncosas
C/ Circumval.lacio 75 08790 Gelida - Penedes
Catalunya - SPAIN
home phone : 93 7792243 / 00 34 3 7792243
Csound page at http://members.tripod.com/csound/
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03634;
5 Jun 99 17:54 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qJie-0001tK-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 17:54:52 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (RAA10818); Sat, 5 Jun 1999 17:51:34 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 17:51:22 +0100
Received: from root@renoir.op.net [209.152.193.4] by hermes via ESMTP (RAA03046); Sat, 5 Jun 1999 17:51:10 +0100 (BST)
Received: from someip.ppp.op.net (d-bm3-17.ppp.op.net [209.152.194.87]) by renoir.op.net (o1/$Revision: 1.18 $) with ESMTP id MAA01006 for ; Sat, 5 Jun 1999 12:50:58 -0400 (EDT)
Message-Id: <199906051650.MAA01006@renoir.op.net>
To: csound@maths.ex.ac.uk
Subject: Re: Higher numerical precission in Csound
In-reply-to: Your message of "Sat, 05 Jun 1999 11:47:54 EDT."
<002701beaf6b$04f9e500$79d496c0@Realizer.ngt.sungard.com>
Date: Sat, 05 Jun 1999 12:58:40 -0400
From: Paul Barton-Davis
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
In message <002701beaf6b$04f9e500$79d496c0@Realizer.ngt.sungard.com>you write:
>This question ultimately devolves to, Does it sound good? since we are (I
>hope) ultimately about music here.
>
>Two pieces of anecdotal evidence:
[ ... evidence elided ... ]
did you try a double blind test for this ? i was talking to a guy from
Analog Devices at MIT a couple of weeks ago, and he had lots of great
stories about anecdotal evidence like this that mysteriously
evaporated when subjected to double blind testing. He was quite bitter
about various "audiophiles" who reject such testing.
>The cache hit of larger data is a real problem, but I do not think it
>outweighs the above.
actually, it might depending on your use of Csound. if you use it
primarily for real-time synthesis, the cache hit will turn into a real
problem, by limiting what can be done in a given control cycle. if
you use it for non-RT synthesis, it isn't so much of a problem.
however, it was partly for these reasons that I use a typedef
throughout Quasimodo called "Number", and also try to avoid the
*printf() and *scanf() functions. I have aimed to be able to recompile
to use double precision by just redefining Number to be a double
rather than a float.
--p
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03669;
5 Jun 99 18:12 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qJzv-0001tV-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 18:12:43 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (SAA01778); Sat, 5 Jun 1999 18:10:31 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 18:10:24 +0100
Received: from root@lix.intercom.es [194.179.21.2] by hermes via ESMTP (SAA02945); Sat, 5 Jun 1999 18:10:22 +0100 (BST)
Received: from intercom.es (iv2-76.intercom.es [195.76.206.76]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id TAA22270; Sat, 5 Jun 1999 19:12:59 +0100
Message-ID: <375955E8.A368BE71@intercom.es>
Date: Sat, 05 Jun 1999 18:52:56 +0200
From: Josep M Comajuncosas
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Hans Mikelson
CC: csound@maths.ex.ac.uk
Subject: Re: Higher numerical precission in Csound
References: <008801beaeff$bdd68a40$5299170c@default>
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 SAA02945
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Hans Mikelson wrote:
> Hi,
>
> Maybe it would make most sense to create double precision opcodes where=
they
> are needed, if that is possible.
That could be an option, but I=F1d prefer to be able to select internal 6=
4floats
as an option at compilation. All the math, filter and ODE opcodes should =
be able
to support a 64bit mode soon, IMHO.
--
Josep M Comajuncosas
C/ Circumval.lacio 75 08790 Gelida - Penedes
Catalunya - SPAIN
home phone : 93 7792243 / 00 34 3 7792243
Csound page at http://members.tripod.com/csound/
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03680;
5 Jun 99 18:17 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qK4f-0002eK-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 18:17:37 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (SAA10043); Sat, 5 Jun 1999 18:15:28 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 18:15:16 +0100
Received: from root@renoir.op.net [209.152.193.4] by hermes via ESMTP (SAA04277); Sat, 5 Jun 1999 18:15:15 +0100 (BST)
Received: from op.net (d-bm3-17.ppp.op.net [209.152.194.87]) by renoir.op.net (o1/$Revision: 1.18 $) with ESMTP id NAA02596 for ; Sat, 5 Jun 1999 13:15:13 -0400 (EDT)
Received: (from pbd@localhost) by op.net ($Revision: 1.2 $) id NAA10568; Sat, 5 Jun 1999 13:22:55 -0400
Date: Sat, 5 Jun 1999 13:22:55 -0400
Message-Id: <199906051722.NAA10568@op.net>
From: Paul Barton-Davis
To: csound@maths.ex.ac.uk
Subject: samphold: problem with audio ouput/control gating ?
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
if you use samphold with an a-rate output and a k-rate input, you a
control-cycle's (ksmps samples) worth of constant-valued output if the
gate is zero. this data produces silence.
this means that samphold does do what i would expect, which is
continue outputting the last ksmps-worth of input data.
however, on thinking about it, its really not clear to me what it
should do under such circumstances. the chances are that playing the
last ksmps-samples over and over will result in clicking at 1/kr Hz,
because its unlikely that there are smooth amplitude transitions at
the end of loop.
any opinions ?
--p
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03864;
5 Jun 99 20:09 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qLpG-0002fE-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 20:09:50 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (UAA06889); Sat, 5 Jun 1999 20:07:21 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 20:07:09 +0100
Received: from dns2.seanet.com [199.181.164.2] by hermes via ESMTP (UAA10708); Sat, 5 Jun 1999 20:07:04 +0100 (BST)
Received: from seanet.com (cy40.dialup.seanet.com [207.12.136.40]) by mx.seanet.com (8.9.3/Seanet-8.7.3) with ESMTP id MAA13296; Sat, 5 Jun 1999 12:06:58 -0700 (PDT)
Message-ID: <375976C4.95BE31B2@seanet.com>
Date: Sat, 05 Jun 1999 12:13:08 -0700
From: Sean Costello
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Josep M Comajuncosas
CC: Csound
Subject: Re: Higher numerical precission in Csound
References: <199906050227.TAA15674@screech.weirdnoise.com> <37594939.A062C5D3@intercom.es>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Josep M Comajuncosas wrote:
>
> Ed Hall wrote:
>
> > Ouch! Except in limited circumstances, is there any perceivable gain
> > from doubling the size of virtually all data in Csound?
>
> Yes, it is deemed necessary for some recursive filters and other computations very
> sensitive to roundoff errors.
What sort of filters? Maybe higher-order filters might need this sort of precision, but it seems
like these would be better achieved using cascaded second-order sections.
More importantly: Which opcodes need to have the higher precision? As someone pointed out, the
inputs and outputs are always floats, so would this create a problem? All the internal precision in
the world won't help if it gets rounded down upon exiting the opcode. Do you need higher precision
in filters, delay lines, oscillators, or...?
Sean Costello
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa03997;
5 Jun 99 22: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 10qNek-0002gL-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 22:07:06 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA08738); Sat, 5 Jun 1999 22:05:04 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 22:04:56 +0100
Received: from root@lix.intercom.es [194.179.21.2] by hermes via ESMTP (WAA05613); Sat, 5 Jun 1999 22:04:55 +0100 (BST)
Received: from intercom.es (iv2-65.intercom.es [195.76.206.65]) by lix.intercom.es (8.7.3/8.6.12) with ESMTP id XAA18102; Sat, 5 Jun 1999 23:07:14 +0100
Message-ID: <3759900D.A13EF973@intercom.es>
Date: Sat, 05 Jun 1999 23:01:01 +0200
From: Josep M Comajuncosas
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Sean Costello
CC: Csound
Subject: Re: Higher numerical precission in Csound
References: <199906050227.TAA15674@screech.weirdnoise.com> <37594939.A062C5D3@intercom.es> <375976C4.95BE31B2@seanet.com>
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 WAA05613
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Sean Costello wrote:
> What sort of filters? Maybe higher-order filters might need this sort o=
f precision, but it seems
> like these would be better achieved using cascaded second-order section=
s.
Well I think the problem comes when one implements slightly unstable recu=
rsive filters. Believe it or
not they=B4re necessary in the modelling of waveguide bores.
> More importantly: Which opcodes need to have the higher precision? As s=
omeone pointed out, the
> inputs and outputs are always floats, so would this create a problem? A=
ll the internal precision in
> the world won't help if it gets rounded down upon exiting the opcode. D=
o you need higher precision
> in filters, delay lines, oscillators, or...?
Well filters must use the highest numerical precission available IMHO. Al=
so all the mathematic
operations, data passed internally of course and interpolating delay line=
s. Maybe with sound generators
it could be user selectable. But notice, for example, that Buzz evaluates=
a closed form expression
which divides eventually by a very small quantity and the associated nume=
rical errors can be greatly
reduced with higher precission opcodes. I think the current implementatio=
n is not very optimal in this
respect. Even if only the filter routines use more precission but the out=
put is rounded, it should make
a big difference with those unstability problems!
Hey guys, it=B4s time to work and put all this on practice! Any volunteer=
s? ;-)
--
Josep M Comajuncosas
C/ Circumval.lacio 75 08790 Gelida - Penedes
Catalunya - SPAIN
home phone : 93 7792243 / 00 34 3 7792243
Csound page at http://members.tripod.com/csound/
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04003;
5 Jun 99 22: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 10qNf2-0002gN-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 22:07:24 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA12472); Sat, 5 Jun 1999 22:05:21 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 22:05:09 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (WAA06302); Sat, 5 Jun 1999 22:05:08 +0100 (BST)
Received: from ulster.net (annex5-port17.ulster.net [208.133.196.17])
by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id RAA14239
for ; Sat, 5 Jun 1999 17:07:55 -0400
Message-ID: <3759911E.9F330CF0@ulster.net>
Date: Sat, 05 Jun 1999 17:05:34 -0400
From: paul winkler
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: Re: Older Computer Music Languages
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
I don't know about musickit, but I have an old print manual for cmusic
here. It's a xerox, and I can't find an author or a date listed on it
anywhere. I played with cmusic for a few days several years ago and
found it in some ways easier than csound, in some ways more limited (but
that may have been lack of experience... and it's not like I'm a csound
expert either).
Generally I think the score was more flexible (at least until some
recent additions to the csound score language), but the instrument
definitions were more limited. At the time of the manual I have, there
were about 35 unit generators.
There's a very short blurb on the PLUM list at
http://209.233.20.72/plum/
including an apparently dead link to a homepage.
I found a homepage at http://crca-www.ucsd.edu/cmusic/cmusic.html. It
lists ports for Sun, NeXT, VAX, and pcmusic for DOS/Windows. Nothing
about linux, and I'm not sure if source is available.
On Dave Phillips' Linux soundapps page (at
http://www.bright.net/~dlphilp/linux_soundapps.html ), Dave notes that
the DOS port called pcmusic will run on Linux under DOSEMU.
Here's a very short cmusic score (note that orc/sco are in one file in
cmusic). This should give you a basic idea of what the syntax is like.
The main things I notice are the #include statement, the liberal use of
strings in the score, including calling instruments by name rather than
number, and the pitch notation which I have often wished for in csound.
#include
instrument 0 simple ;
osc b1 p5 p6 f1 d ;
out b1;
end ;
SINE(f1);
{comments appear in curly braces }
{p1=cmd} {p2=time} {p3=ins} {p4=dur} {p5=amp} {p6=pitch}
note 0.0 simple .15 0dB A(0);
note 0.35 simple .20 -6dB Cs(1);
note 0.7 simple .10 -10dB B(0);
terminate;
{ end of score. }
An interesting contrast with Csound: you can write arithmetic
expressions using pfields within notes, but NOT within the instrument
definitions. So these are legal note definitions:
merge; {this is required to allow notes to be out of sequence}
note 0 obnoxious 1dB 1/p4Hz 0dB A(0);
note 0+rand(10) nice rand(1)-23dB 220+rand(880)Hz;
But this is an illegal line in an instrument:
osc b1 p6 1/p4Hz f2 d ; { p4 is not yet a known value. yuck. }
Interesting language. I sort of wish I had it running here...
HTH,
Paul Winkler
(new address: slinkp@ulster.net)
Jim Stevenson wrote:
>What do you listers know about cmusic?
>
>Is there anything like Next musickit for linux?
>
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04027;
5 Jun 99 22:25 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qNwU-0002gW-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 22:25:26 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA08123); Sat, 5 Jun 1999 22:23:14 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 22:23:03 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (WAA10167); Sat, 5 Jun 1999 22:23:02 +0100 (BST)
Received: from ulster.net (annex5-port17.ulster.net [208.133.196.17])
by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id RAA15495;
Sat, 5 Jun 1999 17:25:47 -0400
Message-ID: <37599550.B173A200@ulster.net>
Date: Sat, 05 Jun 1999 17:23:28 -0400
From: paul winkler
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Csound
CC: Josep M Comajuncosas ,
Sean Costello
Subject: Re: Higher numerical precission in Csound
References: <199906050227.TAA15674@screech.weirdnoise.com> <37594939.A062C5D3@intercom.es> <375976C4.95BE31B2@seanet.com> <3759900D.A13EF973@intercom.es>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
I would like to throw my hat in as one of those who DON'T want
double-precision computation to be the default. It's worth noting that
Csound's internal precision equals or exceeds that of extraordinarily
expensive "pro audio" software and hardware (a signal path that
maintains at least 24 bits of integer precision from start to end is
considered quite good; speed is always a concern, so probably most
commercial software systems don't use doubles except for rare cases that
really require it, and maybe not even then).
I understand that some folks want more precision for some purposes, and
they should have it, but not at the expense of everything running slower
on most of the hardware in existence. I think a compile-time type
selection would get us all what we want.
--Paul Winkler
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04058;
5 Jun 99 22:54 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qOOi-0001vc-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 22:54:36 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA13474); Sat, 5 Jun 1999 22:52:31 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 22:52:20 +0100
Received: from vcn.bc.ca [207.102.64.2] by hermes via ESMTP (WAA03159); Sat, 5 Jun 1999 22:52:19 +0100 (BST)
Received: from localhost (philip@localhost)
by vcn.bc.ca (8.9.2/8.9.2) with ESMTP id OAA17383
for ; Sat, 5 Jun 1999 14:52:18 -0700 (PDT)
Date: Sat, 5 Jun 1999 14:52:18 -0700 (PDT)
From: Philip Aker
To: csound@maths.ex.ac.uk
Subject: Re: Higher numerical precission in Csound
In-Reply-To: <37599550.B173A200@ulster.net>
Message-ID:
Composer: Philip Aker
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
On Sat, 5 Jun 1999, paul winkler wrote:
}I understand that some folks want more precision for some purposes, and
}they should have it, but not at the expense of everything running slower
}on most of the hardware in existence.
Floats run slower on PowerPCs. If I'm not mistaken this applies to all
the varieties (Macintosh, IBM, and Motorola). They are in fact converted
to doubles, the computation(s) performed and then re-converted to floats
on the way out. That's why I'd go for your next line...
}I think a compile-time type selection would get us all what we want.
as a reasonable solution.
Philip
Philip Aker
Composer, Pianist,
Finale Plugins
Suite 13
1405 West 11 Avenue
Vancouver BC
Canada V6H 1K9
philip@vcn.bc.ca
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04065;
5 Jun 99 22:57 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qORp-0001vi-00
for jpff@maths.bath.ac.uk; Sat, 5 Jun 1999 22:57:49 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (WAA13313); Sat, 5 Jun 1999 22:55:49 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sat, 5 Jun 1999 22:55:38 +0100
Received: from dns2.seanet.com [199.181.164.2] by hermes via ESMTP (WAA11995); Sat, 5 Jun 1999 22:55:37 +0100 (BST)
Received: from seanet.com (cy02.dialup.seanet.com [207.12.136.2]) by mx.seanet.com (8.9.3/Seanet-8.7.3) with ESMTP id OAA18231; Sat, 5 Jun 1999 14:55:25 -0700 (PDT)
Message-ID: <37599C09.15AF7A9F@seanet.com>
Date: Sat, 05 Jun 1999 14:52:09 -0700
From: Sean Costello
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Josep M Comajuncosas
CC: Csound
Subject: Re: Higher numerical precission in Csound
References: <199906050227.TAA15674@screech.weirdnoise.com> <37594939.A062C5D3@intercom.es> <375976C4.95BE31B2@seanet.com> <3759900D.A13EF973@intercom.es>
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 WAA11995
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Josep M Comajuncosas wrote:
> Well I think the problem comes when one implements slightly unstable=20
> recursive filters. Believe it or not they=B4re necessary in the=20
> modelling of waveguide bores.
What filter types? reson, 1st order, 2nd order? What sorts of coefficient=
s are needed - calculated
at i-time, k-time, or a-rate?=20
I wonder if higher numerical precision is absolutely essential for physic=
al modelling. After all,
most of the CCRMA waveguide stuff was designed in NeXTSTEP to run on a Mo=
torola 56XXX DSP, which has
24-bit integer precision only (although I think it uses 56-bit accumulati=
on).=20
It is possible that some of this stuff that was designed for integer DSPs=
will work differently, or
not at all, in floating point. I recently implemented a Hal Chamberlin qu=
adrature oscillator design
in C for Csound, based on a state-variable filter with infinite Q. Chambe=
rlin described it as always
staying at the same amplitude, but when I ran it, there was a noticable d=
rop in amplitude after 10
minutes. I think that this happened because the original design took adva=
ntage of the rounding off
of integer representation of the signal to achieve stability - the roundi=
ng off helped the unstable
filter design to achieve a steady state.=20
I have a suspicion that the answer to your problem is not simply changing=
floats to doubles in
various opcodes, but designing new opcodes from scratch that implement th=
e behavior you are seeking.
Perhaps new filter types need to be created, that have built-in limiting =
to enable instability
without blowing up (this is the next step for the quadrature oscillator).
Sean Costello
P.S. You had mentioned buzz in your email; it is worth noting that the qu=
adrature oscillator I
describe could be used to implement buzz without using table lookup. I wi=
ll actually try converting
the relevant floats to double, just to see what happens.
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04156;
6 Jun 99 0:25 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qPow-0001ya-00
for jpff@maths.bath.ac.uk; Sun, 6 Jun 1999 00:25:46 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (AAA01391); Sun, 6 Jun 1999 00:22:17 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Jun 1999 00:22:05 +0100
Received: from root@proxy3.ba.best.com [206.184.139.14] by hermes via ESMTP (AAA10104); Sun, 6 Jun 1999 00:22:04 +0100 (BST)
Received: from charlieb.com (baker.vip.best.com [206.86.232.121])
by proxy3.ba.best.com (8.9.3/8.9.2/best.out) with ESMTP id QAA29686
for ; Sat, 5 Jun 1999 16:20:45 -0700 (PDT)
Message-ID: <3759B0C3.7684BFC5@charlieb.com>
Date: Sat, 05 Jun 1999 16:20:38 -0700
From: Charles Baker
Reply-To: baker@charlieb.com
X-Mailer: Mozilla 4.6 (Macintosh; U; PPC)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound List
Subject: Re: Older Computer Music Languages
References: <3759911E.9F330CF0@ulster.net>
Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854"; x-mac-creator="4D4F5353"
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Re: Cmusic...
I tried a port of cmusic to Linux, using the SUN src....I got it to
compile, but I realized that
the code needs a complete re-write of the sound io functions to work, such
as I did to
the CARL sound utilities (ftp://www.charlieb.com/utils.tar.gz). I havn't
done this yet.
cmusic has some very nice unit generators, such as "space" and "sndfile", a
'3d' sound path
processor and a quite powerful sampling u.g., respectively.
Perhaps I will get back to this sometime...it would be a nice addition to
the linux world.
pcmusic does work, actually, as long as you don't mind having a Wndows box
in front of you...;-)...
Char lieB
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04295;
6 Jun 99 2: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 10qRQI-0001zH-00
for jpff@maths.bath.ac.uk; Sun, 6 Jun 1999 02:08:26 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (CAA02265); Sun, 6 Jun 1999 02:06:23 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Jun 1999 02:06:12 +0100
Received: from servidor.unam.mx [132.248.10.5] by hermes via ESMTP (CAA07995); Sun, 6 Jun 1999 02:06:09 +0100 (BST)
Received: from servidor.unam.mx ([132.248.111.206])
by servidor.unam.mx (8.8.8/8.8.8) with ESMTP id UAA20405;
Sat, 5 Jun 1999 20:02:25 -0600 (CST)
Message-ID: <3759837D.45C17DDC@servidor.unam.mx>
Date: Sat, 05 Jun 1999 20:07:27 +0000
From: Pablo Silva
X-Mailer: Mozilla 4.5 (Macintosh; I; PPC)
X-Accept-Language: en,es-MX
MIME-Version: 1.0
To: baker@charlieb.com
CC: Csound List
Subject: Re: Older Computer Music Languages
References: <3759911E.9F330CF0@ulster.net> <3759B0C3.7684BFC5@charlieb.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Charles Baker wrote:
> cmusic has some very nice unit generators, such as "space" and "sndfile", a
> '3d' sound path
Being totally ignorant as to the possible ramifications of this... how
would these unit generators compare to what we already have in Csound?
And would it be possible to borrow them to Csound if wanted?
Pablo
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04457;
6 Jun 99 3:50 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qT0b-0001zr-00
for jpff@maths.bath.ac.uk; Sun, 6 Jun 1999 03:50:01 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (DAA08285); Sun, 6 Jun 1999 03:47:55 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Jun 1999 03:47:38 +0100
Received: from usamail.texasonline.net [208.207.16.31] by hermes via ESMTP (DAA11143); Sun, 6 Jun 1999 03:47:36 +0100 (BST)
Received: from nmol.com (unverified [208.221.109.28]) by usamail.texasonline.net
(Vircom SMTPRS 4.0.179) with ESMTP id for ;
Sat, 5 Jun 1999 21:48:37 -0500
Message-ID: <3759E122.25250928@nmol.com>
Date: Sat, 05 Jun 1999 20:46:59 -0600
From: Mike Berry
X-Mailer: Mozilla 4.5 (Macintosh; U; PPC)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound
Subject: Re: Higher numerical precission in Csound
References: <199906050227.TAA15674@screech.weirdnoise.com> <37594939.A062C5D3@intercom.es> <375976C4.95BE31B2@seanet.com> <3759900D.A13EF973@intercom.es> <37599550.B173A200@ulster.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Actually, lots of commercial software does use doubles. No one uses 24
bit integers internally, because they are not a native type to basically
any machine. So the 24 bit conversion happens purely at i/o level, and
not internally at all. Some may use 32 bit longs, but I will bet (and
this is true of all of the pro software I have worked on) that most use
floats or doubles internally, like csound.
As for which to use, it depends on and should be chosen to match the
situation. A few years ago I did a bulk search and replace in the
csound code for floats and changed them to doubles. I then compiled on
a PPC and found that things ran slower, not faster as I expected. I
expect that the memory access hit for the cache outweighed the
precision-conversion speed increase. This was with an eye for real-time
performance (the speed loss was only a couple of percent). For file
generation, I would suggest doubles all the way through. Because csound
is so flexible, there are an infinite number of ways that an orc could
suffer from precision loss. Some will, some won't.
The place it will bite you is in things like orcs with 5 minute delay
lines. Suddenly, you will only be able to have half as many in RAM...
paul winkler wrote:
> Csound's internal precision equals or exceeds that of extraordinarily
> expensive "pro audio" software and hardware (a signal path that
> maintains at least 24 bits of integer precision from start to end is
> considered quite good; speed is always a concern, so probably most
> commercial software systems don't use doubles except for rare cases that
> really require it, and maybe not even then).
--
Mike Berry
mikeb@nmol.com
http://www.nmol.com/users/mikeb
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04674;
6 Jun 99 6:30 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qVW3-00028R-00
for jpff@maths.bath.ac.uk; Sun, 6 Jun 1999 06:30:39 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (GAA10688); Sun, 6 Jun 1999 06:28:31 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Jun 1999 06:28:18 +0100
Received: from root@ulster.net [208.148.73.65] by hermes via ESMTP (GAA03474); Sun, 6 Jun 1999 06:28:18 +0100 (BST)
Received: from ulster.net (annex2-port32.ulster.net [208.133.193.32])
by nerf.ulster.net (8.9.3/8.9.3/Debian/GNU) with ESMTP id BAA18065;
Sun, 6 Jun 1999 01:31:06 -0400
Message-ID: <375A070E.927B590D@ulster.net>
Date: Sun, 06 Jun 1999 01:28:46 -0400
From: paul winkler
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: Mike Berry
CC: Csound
Subject: Re: Higher numerical precission in Csound
References: <199906050227.TAA15674@screech.weirdnoise.com> <37594939.A062C5D3@intercom.es> <375976C4.95BE31B2@seanet.com> <3759900D.A13EF973@intercom.es> <37599550.B173A200@ulster.net> <3759E122.25250928@nmol.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
Mike Berry wrote:
>
> Actually, lots of commercial software does use doubles. No one uses 24
> bit integers internally, because they are not a native type to basically
> any machine.
"No one" as long as you're talking about computer software only; I
wasn't. Sorry if that wasn't clear. It's my understanding that quite a
lot of digital audio hardware, such as Yamaha's digital mixers, uses
24-bit integer calculations for most (all?) of the signal path. The
results are generally considered to be quite good.
Thanks for the correction on doubles in commercial software.
==P
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa04789;
6 Jun 99 8:16 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qXAY-0002ui-00
for jpff@maths.bath.ac.uk; Sun, 6 Jun 1999 08:16:34 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (IAA09844); Sun, 6 Jun 1999 08:14:30 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Jun 1999 08:14:19 +0100
Received: from root@pluto.senet.com.au [203.11.90.2] by hermes via ESMTP (IAA02974); Sun, 6 Jun 1999 08:14:16 +0100 (BST)
Received: from [203.152.254.17] (proxy5.senet.com.au [203.56.239.114])
by pluto.senet.com.au (8.9.3/8.9.1) with ESMTP id QAA14833
for ; Sun, 6 Jun 1999 16:44:00 +0930
Message-Id: <199906060714.QAA14833@pluto.senet.com.au>
X-Mailer: Microsoft Outlook Express Macintosh Edition - 4.5 (0410)
Date: Sun, 06 Jun 1999 16:42:41 +0930
Subject: Re: Higher numerical precission in Csound
From: Nathan Day
To: csound@maths.ex.ac.uk
Mime-version: 1.0
X-Priority: 3
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
I haven't really even looked at the csound code, but from what I understand
it is only the signal varibles (a-type, k-type, i-type) which are set as
single precision floats. There is nothing to stop ugens from using doubles
internally with inputs and output as singles, in fact I asumed that doubles
were used for filter coefficiants. What advantage would there be in double
precision signal varibles. The disadvantages would be slower code both from
the actually precision as well as more (2x) cache misses, and a whole lot of
work.
nathand@senet.com.au
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa05025;
6 Jun 99 10:57 BST
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 2.12 #1)
id 10qZg5-0002A8-00
for jpff@maths.bath.ac.uk; Sun, 6 Jun 1999 10:57:17 +0100
Received: from noether [144.173.8.10] by hermes via SMTP (KAA18012); Sun, 6 Jun 1999 10:53:50 +0100 (BST)
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 6 Jun 1999 10:53:39 +0100
Received: from f131.hotmail.com [207.82.251.10] by hermes via SMTP (KAA02041); Sun, 6 Jun 1999 10:53:38 +0100 (BST)
Received: (qmail 96339 invoked by uid 0); 6 Jun 1999 09:53:07 -0000
Message-ID: <19990606095307.96338.qmail@hotmail.com>
Received: from 195.144.64.98 by wy1lg.hotmail.com with HTTP;
Sun, 06 Jun 1999 02:53:05 PDT
X-Originating-IP: [195.144.64.98]
From: david ds
To: csound@maths.ex.ac.uk
Subject: where Winsound ???
Date: Sun, 06 Jun 1999 02:53:05 PDT
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
whare can i download the latest "rocking" version of winsound ??
david
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com |